@nocobase/plugin-graph-collection-manager 0.14.0-alpha.6 → 0.14.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(ee,R){typeof exports=="object"&&typeof module!="undefined"?R(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("@formily/shared"),require("@formily/react"),require("@formily/reactive"),require("@nocobase/utils/client"),require("antd"),require("react-i18next"),require("@emotion/css"),require("lodash"),require("react-router-dom"),require("ahooks")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react","@ant-design/icons","@formily/shared","@formily/react","@formily/reactive","@nocobase/utils/client","antd","react-i18next","@emotion/css","lodash","react-router-dom","ahooks"],R):(ee=typeof globalThis!="undefined"?globalThis:ee||self,R(ee["@nocobase/plugin-graph-collection-manager"]={},ee["@nocobase/client"],ee.jsxRuntime,ee.react,ee["@ant-design/icons"],ee["@formily/shared"],ee["@formily/react"],ee["@formily/reactive"],ee["@nocobase/utils"],ee.antd,ee["react-i18next"],ee["@emotion/css"],ee.lodash,ee["react-router-dom"],ee.ahooks))})(this,function(ee,R,_,H,Ie,fo,Qt,go,pn,ue,Za,Ar,$u,Nb,G2){"use strict";var MW=Object.defineProperty,_W=Object.defineProperties;var NW=Object.getOwnPropertyDescriptors;var Bu=Object.getOwnPropertySymbols;var B2=Object.prototype.hasOwnProperty,$2=Object.prototype.propertyIsEnumerable;var D2=(ee,R,_)=>R in ee?MW(ee,R,{enumerable:!0,configurable:!0,writable:!0,value:_}):ee[R]=_,se=(ee,R)=>{for(var _ in R||(R={}))B2.call(R,_)&&D2(ee,_,R[_]);if(Bu)for(var _ of Bu(R))$2.call(R,_)&&D2(ee,_,R[_]);return ee},Ve=(ee,R)=>_W(ee,NW(R));var z2=(ee,R)=>{var _={};for(var H in ee)B2.call(ee,H)&&R.indexOf(H)<0&&(_[H]=ee[H]);if(ee!=null&&Bu)for(var H of Bu(ee))R.indexOf(H)<0&&$2.call(ee,H)&&(_[H]=ee[H]);return _};var Ge=(ee,R,_)=>new Promise((H,Ie)=>{var fo=pn=>{try{go(_.next(pn))}catch(ue){Ie(ue)}},Qt=pn=>{try{go(_.throw(pn))}catch(ue){Ie(ue)}},go=pn=>pn.done?H(pn.value):Promise.resolve(pn.value).then(fo,Qt);go((_=_.apply(ee,R)).next())});const di=H.createContext(null),kb=n=>{const{record:e,setTargetNode:t,node:r,handelOpenPorts:i}=n;return _.jsx(di.Provider,{value:{node:r,record:e,positionTargetNode:s=>{t(s||r)},openPorts:i},children:n.children})},H2=(n,e)=>{const t=R.useRequest(()=>Promise.resolve({data:e}),Ve(se({},n),{manual:!0})),r=R.useActionContext();return H.useEffect(()=>{r.visible&&t.run()},[r.visible]),t};Qt.observer(()=>{const{record:n}=H.useContext(di),e=R.useCompile();return _.jsx("div",{children:_.jsx(ue.Select,{popupMatchSelectWidth:!1,disabled:!0,value:n.name,options:[{value:n.name,label:e(n.title)}]})})},{displayName:"SourceCollection"});const Tr=()=>{const n=Qt.useForm(),e=R.useActionContext();return{run(){return Ge(this,null,function*(){e.setVisible(!1),n.reset()})}}},Ib=n=>{const e=Qt.useForm(),t=R.useAPIClient(),r=R.useActionContext(),{refreshCM:i}=R.useCollectionManager();return{run(){return Ge(this,null,function*(){yield e.submit(),yield t.resource("collections").create({values:e.values}),r.setVisible(!1),yield e.reset(),n("last"),yield i()})}}},Lb=(n,e)=>{const t=Qt.useForm(),r=R.useAPIClient(),i=R.useActionContext(),{refreshCM:s}=R.useCollectionManager(),{positionTargetNode:o,openPorts:a}=H.useContext(di),{getValues:l}=R.useCollectionFieldFormValues();return{run(){return Ge(this,null,function*(){yield t.submit();const u=l(),h=pn.lodash.omit(u,["key","uiSchemaUid","collectionName","autoCreateReverseField","uiSchema.x-uid","reverseField.key","reverseField.uiSchemaUid"]),f=!["obo","oho","o2o","o2m","m2o","m2m","linkTo","id"].includes(u.interface),{data:{data:d}}=yield r.resource("collections.fields",n).create({values:h});e&&(yield r.resource("fields").move({sourceId:d.key,targetId:e,targetScope:n,method:"insertAfter"})),i.setVisible(!1),yield t.reset(),o(),f&&a&&a(),yield s()})}}},U2=({collectionName:n,name:e,key:t})=>{const{refreshCM:r}=R.useCollectionManager(),{t:i}=Za.useTranslation(),s=Qt.useForm(),o=R.useActionContext(),a=R.useAPIClient(),{positionTargetNode:l,node:c}=H.useContext(di);return{run(){return Ge(this,null,function*(){var h;yield s.submit(),yield a.resource("collections.fields",n).update({filterByTk:e,values:s.values}),o.setVisible(!1),ue.message.success(i("Saved successfully")),l(),r(),c.setPortProp(t,"uiSchema",{title:(h=s.values)==null?void 0:h.uiSchema.title}),yield s.reset()})}}},zu=()=>{const{t:n}=Za.useTranslation(),e=Qt.useForm(),t=R.useActionContext(),{name:r}=e.values,i=R.useAPIClient(),{refreshCM:s}=R.useCollectionManager(),{positionTargetNode:o}=H.useContext(di);return{run(){return Ge(this,null,function*(){yield e.submit(),yield i.resource("collections").update({filterByTk:r,values:se({},pn.lodash.omit(e.values,["fields"]))}),t.setVisible(!1),ue.message.success(n("Saved successfully")),yield e.reset(),o(),s()})}}},W2=n=>{const e=R.useAPIClient();return{run(){return Ge(this,null,function*(){yield e.resource("collections").destroy({filterByTk:n}),yield e.resource("graphPositions").destroy({filter:{collectionName:n}})})}}},X2=n=>{const{name:e}=n,{run:t}=W2(e),{refreshCM:r}=R.useCollectionManager(),{positionTargetNode:i}=H.useContext(di);return{run(){return Ge(this,null,function*(){yield t(),i("destory"),yield r()})}}},Y2=(n,e)=>{const t=R.useAPIClient(),{positionTargetNode:r}=H.useContext(di);return{run(){return Ge(this,null,function*(){yield t.resource("collections.fields",n).destroy({filterByTk:e}),r()})}}},K2=n=>{const{collectionName:e,name:t}=n,{refreshCM:r}=R.useCollectionManager(),{run:i}=Y2(e,t);return{run(){return Ge(this,null,function*(){yield i(),yield r()})}}},Fu=n=>(e,{targetScope:t})=>{e.loading=!0,n(t).then(go.action.bound(r=>{e.dataSource=r,e.loading=!1})).catch(r=>{pn.error(r)})};typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),function(n){n.forEach(e=>{Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value(...t){const r=document.createDocumentFragment();t.forEach(i=>{const s=i instanceof Node;r.appendChild(s?i:document.createTextNode(String(i)))}),this.appendChild(r)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class Nn{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function e(){return(t,r,i)=>{const s=i.value,o=t.__proto__;i.value=function(){this.disposed||(s.call(this),o.dispose.call(this))}}}n.dispose=e})(Nn||(Nn={}));class Rb{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(e=>{e.dispose()}),this.items.clear())}contains(e){return this.items.has(e)}add(e){this.items.add(e)}remove(e){this.items.delete(e)}clear(){this.items.clear()}}(function(n){function e(t){const r=new n;return t.forEach(i=>{r.add(i)}),r}n.from=e})(Rb||(Rb={}));var J2=typeof global=="object"&&global&&global.Object===Object&&global;const jb=J2;var Q2=typeof self=="object"&&self&&self.Object===Object&&self,Z2=jb||Q2||Function("return this")();const mn=Z2;var eN=mn.Symbol;const Zt=eN;var Db=Object.prototype,tN=Db.hasOwnProperty,nN=Db.toString,po=Zt?Zt.toStringTag:void 0;function rN(n){var e=tN.call(n,po),t=n[po];try{n[po]=void 0;var r=!0}catch(s){}var i=nN.call(n);return r&&(e?n[po]=t:delete n[po]),i}var iN=Object.prototype,sN=iN.toString;function oN(n){return sN.call(n)}var aN="[object Null]",lN="[object Undefined]",Bb=Zt?Zt.toStringTag:void 0;function Or(n){return n==null?n===void 0?lN:aN:Bb&&Bb in Object(n)?rN(n):oN(n)}function yn(n){return n!=null&&typeof n=="object"}var cN="[object Symbol]";function kn(n){return typeof n=="symbol"||yn(n)&&Or(n)==cN}function mo(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var uN=Array.isArray;const Ct=uN;var hN=1/0,$b=Zt?Zt.prototype:void 0,zb=$b?$b.toString:void 0;function Fb(n){if(typeof n=="string")return n;if(Ct(n))return mo(n,Fb)+"";if(kn(n))return zb?zb.call(n):"";var e=n+"";return e=="0"&&1/n==-hN?"-0":e}var fN=/\s/;function dN(n){for(var e=n.length;e--&&fN.test(n.charAt(e)););return e}var gN=/^\s+/;function pN(n){return n&&n.slice(0,dN(n)+1).replace(gN,"")}function Ze(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var qb=0/0,mN=/^[-+]0x[0-9a-f]+$/i,yN=/^0b[01]+$/i,vN=/^0o[0-7]+$/i,bN=parseInt;function yo(n){if(typeof n=="number")return n;if(kn(n))return qb;if(Ze(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Ze(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=pN(n);var t=yN.test(n);return t||vN.test(n)?bN(n.slice(2),t?2:8):mN.test(n)?qb:+n}function Xi(n){return n}var wN="[object AsyncFunction]",xN="[object Function]",CN="[object GeneratorFunction]",SN="[object Proxy]";function qu(n){if(!Ze(n))return!1;var e=Or(n);return e==xN||e==CN||e==wN||e==SN}var PN=mn["__core-js_shared__"];const Vu=PN;var Vb=function(){var n=/[^.]+$/.exec(Vu&&Vu.keys&&Vu.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function EN(n){return!!Vb&&Vb in n}var AN=Function.prototype,TN=AN.toString;function gi(n){if(n!=null){try{return TN.call(n)}catch(e){}try{return n+""}catch(e){}}return""}var ON=/[\\^$.*+?()[\]{}|]/g,MN=/^\[object .+?Constructor\]$/,_N=Function.prototype,NN=Object.prototype,kN=_N.toString,IN=NN.hasOwnProperty,LN=RegExp("^"+kN.call(IN).replace(ON,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function RN(n){if(!Ze(n)||EN(n))return!1;var e=qu(n)?LN:MN;return e.test(gi(n))}function jN(n,e){return n==null?void 0:n[e]}function pi(n,e){var t=jN(n,e);return RN(t)?t:void 0}var DN=pi(mn,"WeakMap");const Gu=DN;var Gb=Object.create,BN=function(){function n(){}return function(e){if(!Ze(e))return{};if(Gb)return Gb(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();const $N=BN;function Hb(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function zN(){}function Ub(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var FN=800,qN=16,VN=Date.now;function GN(n){var e=0,t=0;return function(){var r=VN(),i=qN-(r-t);if(t=r,i>0){if(++e>=FN)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function HN(n){return function(){return n}}var UN=function(){try{var n=pi(Object,"defineProperty");return n({},"",{}),n}catch(e){}}();const el=UN;var WN=el?function(n,e){return el(n,"toString",{configurable:!0,enumerable:!1,value:HN(e),writable:!0})}:Xi,XN=GN(WN);const YN=XN;function KN(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}function JN(n,e,t,r){for(var i=n.length,s=t+(r?1:-1);r?s--:++s<i;)if(e(n[s],s,n))return s;return-1}function QN(n){return n!==n}function ZN(n,e,t){for(var r=t-1,i=n.length;++r<i;)if(n[r]===e)return r;return-1}function ek(n,e,t){return e===e?ZN(n,e,t):JN(n,QN,t)}function Wb(n,e){var t=n==null?0:n.length;return!!t&&ek(n,e,0)>-1}var tk=9007199254740991,nk=/^(?:0|[1-9]\d*)$/;function Hu(n,e){var t=typeof n;return e=e==null?tk:e,!!e&&(t=="number"||t!="symbol"&&nk.test(n))&&n>-1&&n%1==0&&n<e}function tl(n,e,t){e=="__proto__"&&el?el(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function Yi(n,e){return n===e||n!==n&&e!==e}var rk=Object.prototype,ik=rk.hasOwnProperty;function Xb(n,e,t){var r=n[e];(!(ik.call(n,e)&&Yi(r,t))||t===void 0&&!(e in n))&&tl(n,e,t)}function vo(n,e,t,r){var i=!t;t||(t={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=r?r(t[a],n[a],a,t,n):void 0;l===void 0&&(l=n[a]),i?tl(t,a,l):Xb(t,a,l)}return t}var Yb=Math.max;function sk(n,e,t){return e=Yb(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,s=Yb(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(o),Hb(n,this,a)}}function Ki(n,e){return YN(sk(n,e,Xi),n+"")}var ok=9007199254740991;function Uu(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ok}function mi(n){return n!=null&&Uu(n.length)&&!qu(n)}function nl(n,e,t){if(!Ze(t))return!1;var r=typeof e;return(r=="number"?mi(t)&&Hu(e,t.length):r=="string"&&e in t)?Yi(t[e],n):!1}function Kb(n){return Ki(function(e,t){var r=-1,i=t.length,s=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(s=n.length>3&&typeof s=="function"?(i--,s):void 0,o&&nl(t[0],t[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=t[r];a&&n(e,a,r,s)}return e})}var ak=Object.prototype;function rl(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||ak;return n===t}function lk(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var ck="[object Arguments]";function Jb(n){return yn(n)&&Or(n)==ck}var Qb=Object.prototype,uk=Qb.hasOwnProperty,hk=Qb.propertyIsEnumerable,fk=Jb(function(){return arguments}())?Jb:function(n){return yn(n)&&uk.call(n,"callee")&&!hk.call(n,"callee")};const Ji=fk;function dk(){return!1}var Zb=typeof ee=="object"&&ee&&!ee.nodeType&&ee,e0=Zb&&typeof module=="object"&&module&&!module.nodeType&&module,gk=e0&&e0.exports===Zb,t0=gk?mn.Buffer:void 0,pk=t0?t0.isBuffer:void 0,mk=pk||dk;const Qi=mk;var yk="[object Arguments]",vk="[object Array]",bk="[object Boolean]",wk="[object Date]",xk="[object Error]",Ck="[object Function]",Sk="[object Map]",Pk="[object Number]",Ek="[object Object]",Ak="[object RegExp]",Tk="[object Set]",Ok="[object String]",Mk="[object WeakMap]",_k="[object ArrayBuffer]",Nk="[object DataView]",kk="[object Float32Array]",Ik="[object Float64Array]",Lk="[object Int8Array]",Rk="[object Int16Array]",jk="[object Int32Array]",Dk="[object Uint8Array]",Bk="[object Uint8ClampedArray]",$k="[object Uint16Array]",zk="[object Uint32Array]",Me={};Me[kk]=Me[Ik]=Me[Lk]=Me[Rk]=Me[jk]=Me[Dk]=Me[Bk]=Me[$k]=Me[zk]=!0,Me[yk]=Me[vk]=Me[_k]=Me[bk]=Me[Nk]=Me[wk]=Me[xk]=Me[Ck]=Me[Sk]=Me[Pk]=Me[Ek]=Me[Ak]=Me[Tk]=Me[Ok]=Me[Mk]=!1;function Fk(n){return yn(n)&&Uu(n.length)&&!!Me[Or(n)]}function bo(n){return function(e){return n(e)}}var n0=typeof ee=="object"&&ee&&!ee.nodeType&&ee,wo=n0&&typeof module=="object"&&module&&!module.nodeType&&module,qk=wo&&wo.exports===n0,Wu=qk&&jb.process,Vk=function(){try{var n=wo&&wo.require&&wo.require("util").types;return n||Wu&&Wu.binding&&Wu.binding("util")}catch(e){}}();const Zi=Vk;var r0=Zi&&Zi.isTypedArray,Gk=r0?bo(r0):Fk;const il=Gk;var Hk=Object.prototype,Uk=Hk.hasOwnProperty;function i0(n,e){var t=Ct(n),r=!t&&Ji(n),i=!t&&!r&&Qi(n),s=!t&&!r&&!i&&il(n),o=t||r||i||s,a=o?lk(n.length,String):[],l=a.length;for(var c in n)(e||Uk.call(n,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Hu(c,l)))&&a.push(c);return a}function s0(n,e){return function(t){return n(e(t))}}var Wk=s0(Object.keys,Object);const Xk=Wk;var Yk=Object.prototype,Kk=Yk.hasOwnProperty;function o0(n){if(!rl(n))return Xk(n);var e=[];for(var t in Object(n))Kk.call(n,t)&&t!="constructor"&&e.push(t);return e}function xo(n){return mi(n)?i0(n):o0(n)}function Jk(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var Qk=Object.prototype,Zk=Qk.hasOwnProperty;function eI(n){if(!Ze(n))return Jk(n);var e=rl(n),t=[];for(var r in n)r=="constructor"&&(e||!Zk.call(n,r))||t.push(r);return t}function es(n){return mi(n)?i0(n,!0):eI(n)}var tI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nI=/^\w*$/;function Xu(n,e){if(Ct(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||kn(n)?!0:nI.test(n)||!tI.test(n)||e!=null&&n in Object(e)}var rI=pi(Object,"create");const Co=rI;function iI(){this.__data__=Co?Co(null):{},this.size=0}function sI(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var oI="__lodash_hash_undefined__",aI=Object.prototype,lI=aI.hasOwnProperty;function cI(n){var e=this.__data__;if(Co){var t=e[n];return t===oI?void 0:t}return lI.call(e,n)?e[n]:void 0}var uI=Object.prototype,hI=uI.hasOwnProperty;function fI(n){var e=this.__data__;return Co?e[n]!==void 0:hI.call(e,n)}var dI="__lodash_hash_undefined__";function gI(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Co&&e===void 0?dI:e,this}function yi(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}yi.prototype.clear=iI,yi.prototype.delete=sI,yi.prototype.get=cI,yi.prototype.has=fI,yi.prototype.set=gI;function pI(){this.__data__=[],this.size=0}function sl(n,e){for(var t=n.length;t--;)if(Yi(n[t][0],e))return t;return-1}var mI=Array.prototype,yI=mI.splice;function vI(n){var e=this.__data__,t=sl(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():yI.call(e,t,1),--this.size,!0}function bI(n){var e=this.__data__,t=sl(e,n);return t<0?void 0:e[t][1]}function wI(n){return sl(this.__data__,n)>-1}function xI(n,e){var t=this.__data__,r=sl(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function Xn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Xn.prototype.clear=pI,Xn.prototype.delete=vI,Xn.prototype.get=bI,Xn.prototype.has=wI,Xn.prototype.set=xI;var CI=pi(mn,"Map");const So=CI;function SI(){this.size=0,this.__data__={hash:new yi,map:new(So||Xn),string:new yi}}function PI(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function ol(n,e){var t=n.__data__;return PI(e)?t[typeof e=="string"?"string":"hash"]:t.map}function EI(n){var e=ol(this,n).delete(n);return this.size-=e?1:0,e}function AI(n){return ol(this,n).get(n)}function TI(n){return ol(this,n).has(n)}function OI(n,e){var t=ol(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Yn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Yn.prototype.clear=SI,Yn.prototype.delete=EI,Yn.prototype.get=AI,Yn.prototype.has=TI,Yn.prototype.set=OI;var MI="Expected a function";function Yu(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(MI);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=t.cache;if(s.has(i))return s.get(i);var o=n.apply(this,r);return t.cache=s.set(i,o)||s,o};return t.cache=new(Yu.Cache||Yn),t}Yu.Cache=Yn;var _I=500;function NI(n){var e=Yu(n,function(r){return t.size===_I&&t.clear(),r}),t=e.cache;return e}var kI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,II=/\\(\\)?/g,LI=NI(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(kI,function(t,r,i,s){e.push(i?s.replace(II,"$1"):r||t)}),e});const RI=LI;function Po(n){return n==null?"":Fb(n)}function a0(n,e){return Ct(n)?n:Xu(n,e)?[n]:RI(Po(n))}var jI=1/0;function al(n){if(typeof n=="string"||kn(n))return n;var e=n+"";return e=="0"&&1/n==-jI?"-0":e}function Ku(n,e){e=a0(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[al(e[t++])];return t&&t==r?n:void 0}function DI(n,e,t){var r=n==null?void 0:Ku(n,e);return r===void 0?t:r}function Ju(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var l0=Zt?Zt.isConcatSpreadable:void 0;function BI(n){return Ct(n)||Ji(n)||!!(l0&&n&&n[l0])}function ll(n,e,t,r,i){var s=-1,o=n.length;for(t||(t=BI),i||(i=[]);++s<o;){var a=n[s];e>0&&t(a)?e>1?ll(a,e-1,t,r,i):Ju(i,a):r||(i[i.length]=a)}return i}var $I=s0(Object.getPrototypeOf,Object);const Qu=$I;var zI="[object Object]",FI=Function.prototype,qI=Object.prototype,c0=FI.toString,VI=qI.hasOwnProperty,GI=c0.call(Object);function In(n){if(!yn(n)||Or(n)!=zI)return!1;var e=Qu(n);if(e===null)return!0;var t=VI.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&c0.call(t)==GI}function HI(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=n[r+e];return s}function UI(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:HI(n,e,t)}var WI="\\ud800-\\udfff",XI="\\u0300-\\u036f",YI="\\ufe20-\\ufe2f",KI="\\u20d0-\\u20ff",JI=XI+YI+KI,QI="\\ufe0e\\ufe0f",ZI="\\u200d",eL=RegExp("["+ZI+WI+JI+QI+"]");function u0(n){return eL.test(n)}function tL(n){return n.split("")}var h0="\\ud800-\\udfff",nL="\\u0300-\\u036f",rL="\\ufe20-\\ufe2f",iL="\\u20d0-\\u20ff",sL=nL+rL+iL,oL="\\ufe0e\\ufe0f",aL="["+h0+"]",Zu="["+sL+"]",eh="\\ud83c[\\udffb-\\udfff]",lL="(?:"+Zu+"|"+eh+")",f0="[^"+h0+"]",d0="(?:\\ud83c[\\udde6-\\uddff]){2}",g0="[\\ud800-\\udbff][\\udc00-\\udfff]",cL="\\u200d",p0=lL+"?",m0="["+oL+"]?",uL="(?:"+cL+"(?:"+[f0,d0,g0].join("|")+")"+m0+p0+")*",hL=m0+p0+uL,fL="(?:"+[f0+Zu+"?",Zu,d0,g0,aL].join("|")+")",dL=RegExp(eh+"(?="+eh+")|"+fL+hL,"g");function gL(n){return n.match(dL)||[]}function pL(n){return u0(n)?gL(n):tL(n)}function y0(n){return function(e){e=Po(e);var t=u0(e)?pL(e):void 0,r=t?t[0]:e.charAt(0),i=t?UI(t,1).join(""):e.slice(1);return r[n]()+i}}var mL=y0("toUpperCase");const cl=mL;function yL(n){return cl(Po(n).toLowerCase())}function vL(n,e,t,r){var i=-1,s=n==null?0:n.length;for(r&&s&&(t=n[++i]);++i<s;)t=e(t,n[i],i,n);return t}function bL(n){return function(e){return n==null?void 0:n[e]}}var wL={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},xL=bL(wL);const CL=xL;var SL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,PL="\\u0300-\\u036f",EL="\\ufe20-\\ufe2f",AL="\\u20d0-\\u20ff",TL=PL+EL+AL,OL="["+TL+"]",ML=RegExp(OL,"g");function _L(n){return n=Po(n),n&&n.replace(SL,CL).replace(ML,"")}var NL=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function kL(n){return n.match(NL)||[]}var IL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function LL(n){return IL.test(n)}var v0="\\ud800-\\udfff",RL="\\u0300-\\u036f",jL="\\ufe20-\\ufe2f",DL="\\u20d0-\\u20ff",BL=RL+jL+DL,b0="\\u2700-\\u27bf",w0="a-z\\xdf-\\xf6\\xf8-\\xff",$L="\\xac\\xb1\\xd7\\xf7",zL="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",FL="\\u2000-\\u206f",qL=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",x0="A-Z\\xc0-\\xd6\\xd8-\\xde",VL="\\ufe0e\\ufe0f",C0=$L+zL+FL+qL,S0="['’]",P0="["+C0+"]",GL="["+BL+"]",E0="\\d+",HL="["+b0+"]",A0="["+w0+"]",T0="[^"+v0+C0+E0+b0+w0+x0+"]",UL="\\ud83c[\\udffb-\\udfff]",WL="(?:"+GL+"|"+UL+")",XL="[^"+v0+"]",O0="(?:\\ud83c[\\udde6-\\uddff]){2}",M0="[\\ud800-\\udbff][\\udc00-\\udfff]",ts="["+x0+"]",YL="\\u200d",_0="(?:"+A0+"|"+T0+")",KL="(?:"+ts+"|"+T0+")",N0="(?:"+S0+"(?:d|ll|m|re|s|t|ve))?",k0="(?:"+S0+"(?:D|LL|M|RE|S|T|VE))?",I0=WL+"?",L0="["+VL+"]?",JL="(?:"+YL+"(?:"+[XL,O0,M0].join("|")+")"+L0+I0+")*",QL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ZL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",eR=L0+I0+JL,tR="(?:"+[HL,O0,M0].join("|")+")"+eR,nR=RegExp([ts+"?"+A0+"+"+N0+"(?="+[P0,ts,"$"].join("|")+")",KL+"+"+k0+"(?="+[P0,ts+_0,"$"].join("|")+")",ts+"?"+_0+"+"+N0,ts+"+"+k0,ZL,QL,E0,tR].join("|"),"g");function rR(n){return n.match(nR)||[]}function iR(n,e,t){return n=Po(n),e=t?void 0:e,e===void 0?LL(n)?rR(n):kL(n):n.match(e)||[]}var sR="['’]",oR=RegExp(sR,"g");function R0(n){return function(e){return vL(iR(_L(e).replace(oR,"")),n,"")}}var aR=R0(function(n,e,t){return e=e.toLowerCase(),n+(t?yL(e):e)});const ul=aR;function lR(n,e,t){return n===n&&(t!==void 0&&(n=n<=t?n:t),e!==void 0&&(n=n>=e?n:e)),n}function en(n,e,t){return t===void 0&&(t=e,e=void 0),t!==void 0&&(t=yo(t),t=t===t?t:0),e!==void 0&&(e=yo(e),e=e===e?e:0),lR(yo(n),e,t)}function cR(){this.__data__=new Xn,this.size=0}function uR(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function hR(n){return this.__data__.get(n)}function fR(n){return this.__data__.has(n)}var dR=200;function gR(n,e){var t=this.__data__;if(t instanceof Xn){var r=t.__data__;if(!So||r.length<dR-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Yn(r)}return t.set(n,e),this.size=t.size,this}function vn(n){var e=this.__data__=new Xn(n);this.size=e.size}vn.prototype.clear=cR,vn.prototype.delete=uR,vn.prototype.get=hR,vn.prototype.has=fR,vn.prototype.set=gR;function pR(n,e){return n&&vo(e,xo(e),n)}function mR(n,e){return n&&vo(e,es(e),n)}var j0=typeof ee=="object"&&ee&&!ee.nodeType&&ee,D0=j0&&typeof module=="object"&&module&&!module.nodeType&&module,yR=D0&&D0.exports===j0,B0=yR?mn.Buffer:void 0,$0=B0?B0.allocUnsafe:void 0;function z0(n,e){if(e)return n.slice();var t=n.length,r=$0?$0(t):new n.constructor(t);return n.copy(r),r}function vR(n,e){for(var t=-1,r=n==null?0:n.length,i=0,s=[];++t<r;){var o=n[t];e(o,t,n)&&(s[i++]=o)}return s}function F0(){return[]}var bR=Object.prototype,wR=bR.propertyIsEnumerable,q0=Object.getOwnPropertySymbols,xR=q0?function(n){return n==null?[]:(n=Object(n),vR(q0(n),function(e){return wR.call(n,e)}))}:F0;const th=xR;function CR(n,e){return vo(n,th(n),e)}var SR=Object.getOwnPropertySymbols,PR=SR?function(n){for(var e=[];n;)Ju(e,th(n)),n=Qu(n);return e}:F0;const V0=PR;function ER(n,e){return vo(n,V0(n),e)}function G0(n,e,t){var r=e(n);return Ct(n)?r:Ju(r,t(n))}function nh(n){return G0(n,xo,th)}function AR(n){return G0(n,es,V0)}var TR=pi(mn,"DataView");const rh=TR;var OR=pi(mn,"Promise");const ih=OR;var MR=pi(mn,"Set");const ns=MR;var H0="[object Map]",_R="[object Object]",U0="[object Promise]",W0="[object Set]",X0="[object WeakMap]",Y0="[object DataView]",NR=gi(rh),kR=gi(So),IR=gi(ih),LR=gi(ns),RR=gi(Gu),vi=Or;(rh&&vi(new rh(new ArrayBuffer(1)))!=Y0||So&&vi(new So)!=H0||ih&&vi(ih.resolve())!=U0||ns&&vi(new ns)!=W0||Gu&&vi(new Gu)!=X0)&&(vi=function(n){var e=Or(n),t=e==_R?n.constructor:void 0,r=t?gi(t):"";if(r)switch(r){case NR:return Y0;case kR:return H0;case IR:return U0;case LR:return W0;case RR:return X0}return e});const rs=vi;var jR=Object.prototype,DR=jR.hasOwnProperty;function BR(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&DR.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var $R=mn.Uint8Array;const hl=$R;function sh(n){var e=new n.constructor(n.byteLength);return new hl(e).set(new hl(n)),e}function zR(n,e){var t=e?sh(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}var FR=/\w*$/;function qR(n){var e=new n.constructor(n.source,FR.exec(n));return e.lastIndex=n.lastIndex,e}var K0=Zt?Zt.prototype:void 0,J0=K0?K0.valueOf:void 0;function VR(n){return J0?Object(J0.call(n)):{}}function Q0(n,e){var t=e?sh(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var GR="[object Boolean]",HR="[object Date]",UR="[object Map]",WR="[object Number]",XR="[object RegExp]",YR="[object Set]",KR="[object String]",JR="[object Symbol]",QR="[object ArrayBuffer]",ZR="[object DataView]",ej="[object Float32Array]",tj="[object Float64Array]",nj="[object Int8Array]",rj="[object Int16Array]",ij="[object Int32Array]",sj="[object Uint8Array]",oj="[object Uint8ClampedArray]",aj="[object Uint16Array]",lj="[object Uint32Array]";function cj(n,e,t){var r=n.constructor;switch(e){case QR:return sh(n);case GR:case HR:return new r(+n);case ZR:return zR(n,t);case ej:case tj:case nj:case rj:case ij:case sj:case oj:case aj:case lj:return Q0(n,t);case UR:return new r;case WR:case KR:return new r(n);case XR:return qR(n);case YR:return new r;case JR:return VR(n)}}function Z0(n){return typeof n.constructor=="function"&&!rl(n)?$N(Qu(n)):{}}var uj="[object Map]";function hj(n){return yn(n)&&rs(n)==uj}var e1=Zi&&Zi.isMap,fj=e1?bo(e1):hj;const dj=fj;var gj="[object Set]";function pj(n){return yn(n)&&rs(n)==gj}var t1=Zi&&Zi.isSet,mj=t1?bo(t1):pj;const yj=mj;var vj=1,bj=2,wj=4,n1="[object Arguments]",xj="[object Array]",Cj="[object Boolean]",Sj="[object Date]",Pj="[object Error]",r1="[object Function]",Ej="[object GeneratorFunction]",Aj="[object Map]",Tj="[object Number]",i1="[object Object]",Oj="[object RegExp]",Mj="[object Set]",_j="[object String]",Nj="[object Symbol]",kj="[object WeakMap]",Ij="[object ArrayBuffer]",Lj="[object DataView]",Rj="[object Float32Array]",jj="[object Float64Array]",Dj="[object Int8Array]",Bj="[object Int16Array]",$j="[object Int32Array]",zj="[object Uint8Array]",Fj="[object Uint8ClampedArray]",qj="[object Uint16Array]",Vj="[object Uint32Array]",Ee={};Ee[n1]=Ee[xj]=Ee[Ij]=Ee[Lj]=Ee[Cj]=Ee[Sj]=Ee[Rj]=Ee[jj]=Ee[Dj]=Ee[Bj]=Ee[$j]=Ee[Aj]=Ee[Tj]=Ee[i1]=Ee[Oj]=Ee[Mj]=Ee[_j]=Ee[Nj]=Ee[zj]=Ee[Fj]=Ee[qj]=Ee[Vj]=!0,Ee[Pj]=Ee[r1]=Ee[kj]=!1;function Eo(n,e,t,r,i,s){var o,a=e&vj,l=e&bj,c=e&wj;if(t&&(o=i?t(n,r,i,s):t(n)),o!==void 0)return o;if(!Ze(n))return n;var u=Ct(n);if(u){if(o=BR(n),!a)return Ub(n,o)}else{var h=rs(n),f=h==r1||h==Ej;if(Qi(n))return z0(n,a);if(h==i1||h==n1||f&&!i){if(o=l||f?{}:Z0(n),!a)return l?ER(n,mR(o,n)):CR(n,pR(o,n))}else{if(!Ee[h])return i?n:{};o=cj(n,h,a)}}s||(s=new vn);var d=s.get(n);if(d)return d;s.set(n,o),yj(n)?n.forEach(function(b){o.add(Eo(b,e,t,b,n,s))}):dj(n)&&n.forEach(function(b,m){o.set(m,Eo(b,e,t,m,n,s))});var g=c?l?AR:nh:l?es:xo,p=u?void 0:g(n);return KN(p||n,function(b,m){p&&(m=b,b=n[m]),Xb(o,m,Eo(b,e,t,m,n,s))}),o}var Gj=4;function oh(n){return Eo(n,Gj)}var Hj=1,Uj=4;function He(n){return Eo(n,Hj|Uj)}var Wj="__lodash_hash_undefined__";function Xj(n){return this.__data__.set(n,Wj),this}function Yj(n){return this.__data__.has(n)}function is(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Yn;++e<t;)this.add(n[e])}is.prototype.add=is.prototype.push=Xj,is.prototype.has=Yj;function Kj(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function ah(n,e){return n.has(e)}var Jj=1,Qj=2;function s1(n,e,t,r,i,s){var o=t&Jj,a=n.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(n),u=s.get(e);if(c&&u)return c==e&&u==n;var h=-1,f=!0,d=t&Qj?new is:void 0;for(s.set(n,e),s.set(e,n);++h<a;){var g=n[h],p=e[h];if(r)var b=o?r(p,g,h,e,n,s):r(g,p,h,n,e,s);if(b!==void 0){if(b)continue;f=!1;break}if(d){if(!Kj(e,function(m,y){if(!ah(d,y)&&(g===m||i(g,m,t,r,s)))return d.push(y)})){f=!1;break}}else if(!(g===p||i(g,p,t,r,s))){f=!1;break}}return s.delete(n),s.delete(e),f}function Zj(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function lh(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var eD=1,tD=2,nD="[object Boolean]",rD="[object Date]",iD="[object Error]",sD="[object Map]",oD="[object Number]",aD="[object RegExp]",lD="[object Set]",cD="[object String]",uD="[object Symbol]",hD="[object ArrayBuffer]",fD="[object DataView]",o1=Zt?Zt.prototype:void 0,ch=o1?o1.valueOf:void 0;function dD(n,e,t,r,i,s,o){switch(t){case fD:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case hD:return!(n.byteLength!=e.byteLength||!s(new hl(n),new hl(e)));case nD:case rD:case oD:return Yi(+n,+e);case iD:return n.name==e.name&&n.message==e.message;case aD:case cD:return n==e+"";case sD:var a=Zj;case lD:var l=r&eD;if(a||(a=lh),n.size!=e.size&&!l)return!1;var c=o.get(n);if(c)return c==e;r|=tD,o.set(n,e);var u=s1(a(n),a(e),r,i,s,o);return o.delete(n),u;case uD:if(ch)return ch.call(n)==ch.call(e)}return!1}var gD=1,pD=Object.prototype,mD=pD.hasOwnProperty;function yD(n,e,t,r,i,s){var o=t&gD,a=nh(n),l=a.length,c=nh(e),u=c.length;if(l!=u&&!o)return!1;for(var h=l;h--;){var f=a[h];if(!(o?f in e:mD.call(e,f)))return!1}var d=s.get(n),g=s.get(e);if(d&&g)return d==e&&g==n;var p=!0;s.set(n,e),s.set(e,n);for(var b=o;++h<l;){f=a[h];var m=n[f],y=e[f];if(r)var v=o?r(y,m,f,e,n,s):r(m,y,f,n,e,s);if(!(v===void 0?m===y||i(m,y,t,r,s):v)){p=!1;break}b||(b=f=="constructor")}if(p&&!b){var w=n.constructor,x=e.constructor;w!=x&&"constructor"in n&&"constructor"in e&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(p=!1)}return s.delete(n),s.delete(e),p}var vD=1,a1="[object Arguments]",l1="[object Array]",fl="[object Object]",bD=Object.prototype,c1=bD.hasOwnProperty;function wD(n,e,t,r,i,s){var o=Ct(n),a=Ct(e),l=o?l1:rs(n),c=a?l1:rs(e);l=l==a1?fl:l,c=c==a1?fl:c;var u=l==fl,h=c==fl,f=l==c;if(f&&Qi(n)){if(!Qi(e))return!1;o=!0,u=!1}if(f&&!u)return s||(s=new vn),o||il(n)?s1(n,e,t,r,i,s):dD(n,e,l,t,r,i,s);if(!(t&vD)){var d=u&&c1.call(n,"__wrapped__"),g=h&&c1.call(e,"__wrapped__");if(d||g){var p=d?n.value():n,b=g?e.value():e;return s||(s=new vn),i(p,b,t,r,s)}}return f?(s||(s=new vn),yD(n,e,t,r,i,s)):!1}function dl(n,e,t,r,i){return n===e?!0:n==null||e==null||!yn(n)&&!yn(e)?n!==n&&e!==e:wD(n,e,t,r,dl,i)}var xD=1,CD=2;function SD(n,e,t,r){var i=t.length,s=i,o=!r;if(n==null)return!s;for(n=Object(n);i--;){var a=t[i];if(o&&a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++i<s;){a=t[i];var l=a[0],c=n[l],u=a[1];if(o&&a[2]){if(c===void 0&&!(l in n))return!1}else{var h=new vn;if(r)var f=r(c,u,l,n,e,h);if(!(f===void 0?dl(u,c,xD|CD,r,h):f))return!1}}return!0}function u1(n){return n===n&&!Ze(n)}function PD(n){for(var e=xo(n),t=e.length;t--;){var r=e[t],i=n[r];e[t]=[r,i,u1(i)]}return e}function h1(n,e){return function(t){return t==null?!1:t[n]===e&&(e!==void 0||n in Object(t))}}function ED(n){var e=PD(n);return e.length==1&&e[0][2]?h1(e[0][0],e[0][1]):function(t){return t===n||SD(t,n,e)}}function AD(n,e){return n!=null&&e in Object(n)}function f1(n,e,t){e=a0(e,n);for(var r=-1,i=e.length,s=!1;++r<i;){var o=al(e[r]);if(!(s=n!=null&&t(n,o)))break;n=n[o]}return s||++r!=i?s:(i=n==null?0:n.length,!!i&&Uu(i)&&Hu(o,i)&&(Ct(n)||Ji(n)))}function TD(n,e){return n!=null&&f1(n,e,AD)}var OD=1,MD=2;function _D(n,e){return Xu(n)&&u1(e)?h1(al(n),e):function(t){var r=DI(t,n);return r===void 0&&r===e?TD(t,n):dl(e,r,OD|MD)}}function ND(n){return function(e){return e==null?void 0:e[n]}}function kD(n){return function(e){return Ku(e,n)}}function ID(n){return Xu(n)?ND(al(n)):kD(n)}function uh(n){return typeof n=="function"?n:n==null?Xi:typeof n=="object"?Ct(n)?_D(n[0],n[1]):ED(n):ID(n)}function LD(n,e,t,r){for(var i=-1,s=n==null?0:n.length;++i<s;){var o=n[i];e(r,o,t(o),n)}return r}function RD(n){return function(e,t,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[n?a:++i];if(t(s[l],l,s)===!1)break}return e}}var jD=RD();const d1=jD;function DD(n,e){return n&&d1(n,e,xo)}function BD(n,e){return function(t,r){if(t==null)return t;if(!mi(t))return n(t,r);for(var i=t.length,s=e?i:-1,o=Object(t);(e?s--:++s<i)&&r(o[s],s,o)!==!1;);return t}}var $D=BD(DD);const g1=$D;function zD(n,e,t,r){return g1(n,function(i,s,o){e(r,i,t(i),o)}),r}function FD(n,e){return function(t,r){var i=Ct(t)?LD:zD,s=e?e():{};return i(t,n,uh(r),s)}}var qD=function(){return mn.Date.now()};const hh=qD;var VD="Expected a function",GD=Math.max,HD=Math.min;function fh(n,e,t){var r,i,s,o,a,l,c=0,u=!1,h=!1,f=!0;if(typeof n!="function")throw new TypeError(VD);e=yo(e)||0,Ze(t)&&(u=!!t.leading,h="maxWait"in t,s=h?GD(yo(t.maxWait)||0,e):s,f="trailing"in t?!!t.trailing:f);function d(C){var S=r,E=i;return r=i=void 0,c=C,o=n.apply(E,S),o}function g(C){return c=C,a=setTimeout(m,e),u?d(C):o}function p(C){var S=C-l,E=C-c,T=e-S;return h?HD(T,s-E):T}function b(C){var S=C-l,E=C-c;return l===void 0||S>=e||S<0||h&&E>=s}function m(){var C=hh();if(b(C))return y(C);a=setTimeout(m,p(C))}function y(C){return a=void 0,f&&r?d(C):(r=i=void 0,o)}function v(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function w(){return a===void 0?o:y(hh())}function x(){var C=hh(),S=b(C);if(r=arguments,i=this,l=C,S){if(a===void 0)return g(l);if(h)return clearTimeout(a),a=setTimeout(m,e),d(l)}return a===void 0&&(a=setTimeout(m,e)),o}return x.cancel=v,x.flush=w,x}var p1=Object.prototype,UD=p1.hasOwnProperty,WD=Ki(function(n,e){n=Object(n);var t=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&nl(e[0],e[1],i)&&(r=1);++t<r;)for(var s=e[t],o=es(s),a=-1,l=o.length;++a<l;){var c=o[a],u=n[c];(u===void 0||Yi(u,p1[c])&&!UD.call(n,c))&&(n[c]=s[c])}return n});const XD=WD;function dh(n,e,t){(t!==void 0&&!Yi(n[e],t)||t===void 0&&!(e in n))&&tl(n,e,t)}function gl(n){return yn(n)&&mi(n)}function gh(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function YD(n){return vo(n,es(n))}function KD(n,e,t,r,i,s,o){var a=gh(n,t),l=gh(e,t),c=o.get(l);if(c){dh(n,t,c);return}var u=s?s(a,l,t+"",n,e,o):void 0,h=u===void 0;if(h){var f=Ct(l),d=!f&&Qi(l),g=!f&&!d&&il(l);u=l,f||d||g?Ct(a)?u=a:gl(a)?u=Ub(a):d?(h=!1,u=z0(l,!0)):g?(h=!1,u=Q0(l,!0)):u=[]:In(l)||Ji(l)?(u=a,Ji(a)?u=YD(a):(!Ze(a)||qu(a))&&(u=Z0(l))):h=!1}h&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),dh(n,t,u)}function pl(n,e,t,r,i){n!==e&&d1(e,function(s,o){if(i||(i=new vn),Ze(s))KD(n,e,o,t,pl,r,i);else{var a=r?r(gh(n,o),s,o+"",n,e,i):void 0;a===void 0&&(a=s),dh(n,o,a)}},es)}function m1(n,e,t,r,i,s){return Ze(n)&&Ze(e)&&(s.set(e,n),pl(n,e,void 0,m1,s),s.delete(e)),n}var JD=Kb(function(n,e,t,r){pl(n,e,t,r)});const QD=JD;var ZD=Ki(function(n){return n.push(void 0,m1),Hb(QD,void 0,n)});const y1=ZD;function v1(n,e,t){for(var r=-1,i=n==null?0:n.length;++r<i;)if(t(e,n[r]))return!0;return!1}var eB=200;function tB(n,e,t,r){var i=-1,s=Wb,o=!0,a=n.length,l=[],c=e.length;if(!a)return l;t&&(e=mo(e,bo(t))),r?(s=v1,o=!1):e.length>=eB&&(s=ah,o=!1,e=new is(e));e:for(;++i<a;){var u=n[i],h=t==null?u:t(u);if(u=r||u!==0?u:0,o&&h===h){for(var f=c;f--;)if(e[f]===h)continue e;l.push(u)}else s(e,h,r)||l.push(u)}return l}var nB=Ki(function(n,e){return gl(n)?tB(n,ll(e,1,gl,!0)):[]});const rB=nB;function iB(n,e){var t=-1,r=mi(n)?Array(n.length):[];return g1(n,function(i,s,o){r[++t]=e(i,s,o)}),r}var sB=Object.prototype,oB=sB.hasOwnProperty,aB=FD(function(n,e,t){oB.call(n,t)?n[t].push(e):tl(n,t,[e])});const b1=aB;function lB(n,e){return n>e}var cB=Object.prototype,uB=cB.hasOwnProperty;function hB(n,e){return n!=null&&uB.call(n,e)}function ml(n,e){return n!=null&&f1(n,e,hB)}var fB="[object Map]",dB="[object Set]",gB=Object.prototype,pB=gB.hasOwnProperty;function w1(n){if(n==null)return!0;if(mi(n)&&(Ct(n)||typeof n=="string"||typeof n.splice=="function"||Qi(n)||il(n)||Ji(n)))return!n.length;var e=rs(n);if(e==fB||e==dB)return!n.size;if(rl(n))return!o0(n).length;for(var t in n)if(pB.call(n,t))return!1;return!0}function Kn(n,e){return dl(n,e)}var mB="[object Number]";function x1(n){return typeof n=="number"||yn(n)&&Or(n)==mB}var yB=y0("toLowerCase");const vB=yB;function bB(n,e,t){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=e(s);if(o!=null&&(a===void 0?o===o&&!kn(o):t(o,a)))var a=o,l=s}return l}function wB(n){return n&&n.length?bB(n,Xi,lB):void 0}var xB=Kb(function(n,e,t){pl(n,e,t)});const De=xB;function CB(n,e){var t=n.length;for(n.sort(e);t--;)n[t]=n[t].value;return n}function SB(n,e){if(n!==e){var t=n!==void 0,r=n===null,i=n===n,s=kn(n),o=e!==void 0,a=e===null,l=e===e,c=kn(e);if(!a&&!c&&!s&&n>e||s&&o&&l&&!a&&!c||r&&o&&l||!t&&l||!i)return 1;if(!r&&!s&&!c&&n<e||c&&t&&i&&!r&&!s||a&&t&&i||!o&&i||!l)return-1}return 0}function PB(n,e,t){for(var r=-1,i=n.criteria,s=e.criteria,o=i.length,a=t.length;++r<o;){var l=SB(i[r],s[r]);if(l){if(r>=a)return l;var c=t[r];return l*(c=="desc"?-1:1)}}return n.index-e.index}function EB(n,e,t){e.length?e=mo(e,function(s){return Ct(s)?function(o){return Ku(o,s.length===1?s[0]:s)}:s}):e=[Xi];var r=-1;e=mo(e,bo(uh));var i=iB(n,function(s,o,a){var l=mo(e,function(c){return c(s)});return{criteria:l,index:++r,value:s}});return CB(i,function(s,o){return PB(s,o,t)})}var AB=Ki(function(n,e){if(n==null)return[];var t=e.length;return t>1&&nl(n,e[0],e[1])?e=[]:t>2&&nl(e[0],e[1],e[2])&&(e=[e[0]]),EB(n,ll(e,1),[])});const C1=AB;var TB=4294967295,OB=TB-1,MB=Math.floor,_B=Math.min;function S1(n,e,t,r){var i=0,s=n==null?0:n.length;if(s===0)return 0;e=t(e);for(var o=e!==e,a=e===null,l=kn(e),c=e===void 0;i<s;){var u=MB((i+s)/2),h=t(n[u]),f=h!==void 0,d=h===null,g=h===h,p=kn(h);if(o)var b=r||g;else c?b=g&&(r||f):a?b=g&&f&&(r||!d):l?b=g&&f&&!d&&(r||!p):d||p?b=!1:b=r?h<=e:h<e;b?i=u+1:s=u}return _B(s,OB)}var NB=4294967295,kB=NB>>>1;function IB(n,e,t){var r=0,i=n==null?r:n.length;if(typeof e=="number"&&e===e&&i<=kB){for(;r<i;){var s=r+i>>>1,o=n[s];o!==null&&!kn(o)&&(t?o<=e:o<e)?r=s+1:i=s}return i}return S1(n,e,Xi,t)}function LB(n,e){return IB(n,e)}function RB(n,e,t){return S1(n,e,uh(t))}var jB=R0(function(n,e,t){return n+(t?" ":"")+cl(e)});const DB=jB;var BB="Expected a function";function $B(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(BB);return Ze(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),fh(n,e,{leading:r,maxWait:e,trailing:i})}var zB=1/0,FB=ns&&1/lh(new ns([,-0]))[1]==zB?function(n){return new ns(n)}:zN;const qB=FB;var VB=200;function P1(n,e,t){var r=-1,i=Wb,s=n.length,o=!0,a=[],l=a;if(t)o=!1,i=v1;else if(s>=VB){var c=e?null:qB(n);if(c)return lh(c);o=!1,i=ah,l=new is}else l=e?[]:a;e:for(;++r<s;){var u=n[r],h=e?e(u):u;if(u=t||u!==0?u:0,o&&h===h){for(var f=l.length;f--;)if(l[f]===h)continue e;e&&l.push(h),a.push(u)}else i(l,h,t)||(l!==a&&l.push(h),a.push(u))}return a}var GB=Ki(function(n){return P1(ll(n,1,gl,!0))});const E1=GB;function A1(n){return n&&n.length?P1(n):[]}function T1(n,e,t){if(t)switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2]);case 4:return n.call(e,t[0],t[1],t[2],t[3]);case 5:return n.call(e,t[0],t[1],t[2],t[3],t[4]);case 6:return n.call(e,t[0],t[1],t[2],t[3],t[4],t[5]);default:return n.apply(e,t)}return n.call(e)}function J(n,e,...t){return T1(n,e,t)}function HB(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function O1(n){return n!=null&&(n instanceof Promise||HB(n))}function M1(...n){const e=[];if(n.forEach(r=>{Array.isArray(r)?e.push(...r):e.push(r)}),e.some(r=>O1(r))){const r=e.map(i=>O1(i)?i:Promise.resolve(i!==!1));return Promise.all(r).then(i=>i.reduce((s,o)=>o!==!1&&s,!0))}return e.every(r=>r!==!1)}function ph(n,e){const t=[];for(let r=0;r<n.length;r+=2){const i=n[r],s=n[r+1],o=Array.isArray(e)?e:[e],a=T1(i,s,o);t.push(a)}return M1(t)}class UB{constructor(){this.listeners={}}on(e,t,r){return t==null?this:(this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t,r),this)}once(e,t,r){const i=(...s)=>(this.off(e,i),ph([t,r],s));return this.on(e,i,this)}off(e,t,r){if(!(e||t||r))return this.listeners={},this;const i=this.listeners;return(e?[e]:Object.keys(i)).forEach(o=>{const a=i[o];if(a){if(!(t||r)){delete i[o];return}for(let l=a.length-2;l>=0;l-=2)t&&a[l]!==t||r&&a[l+1]!==r||a.splice(l,2)}}),this}trigger(e,...t){let r=!0;if(e!=="*"){const s=this.listeners[e];s!=null&&(r=ph([...s],t))}const i=this.listeners["*"];return i!=null?M1([r,ph([...i],[e,...t])]):r}emit(e,...t){return this.trigger(e,...t)}}function WB(n,...e){e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(r=>{r!=="constructor"&&Object.defineProperty(n.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r))})})}const XB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])};function YB(n,e){XB(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}let KB=class{};const JB=/^\s*class\s+/.test(`${KB}`)||/^\s*class\s*\{/.test(`${class{}}`);function mh(n,e){let t;return JB?t=class extends e{}:(t=function(){return e.apply(this,arguments)},YB(t,e)),Object.defineProperty(t,"name",{value:n}),t}function _1(n){return n==="__proto__"}function yh(n,e,t="/"){let r;const i=Array.isArray(e)?e:e.split(t);if(i.length)for(r=n;i.length;){const s=i.shift();if(Object(r)===r&&s&&s in r)r=r[s];else return}return r}function ss(n,e,t,r="/"){const i=Array.isArray(e)?e:e.split(r),s=i.pop();if(s&&!_1(s)){let o=n;i.forEach(a=>{_1(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[s]=t}return n}function N1(n,e,t="/"){const r=Array.isArray(e)?e.slice():e.split(t),i=r.pop();if(i)if(r.length>0){const s=yh(n,r);s&&delete s[i]}else delete n[i];return n}class St extends UB{}(function(n){n.dispose=Nn.dispose})(St||(St={})),WB(St,Nn);const k1=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},I1=k1(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),vh=k1(n=>DB(ul(n)).replace(/ /g,""));function bh(n){let e=2166136261,t=!1,r=n;for(let i=0,s=r.length;i<s;i+=1){let o=r.charCodeAt(i);o>127&&!t&&(r=unescape(encodeURIComponent(r)),o=r.charCodeAt(i),t=!0),e^=o,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function wh(){let n="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let t=0,r=e.length;t<r;t+=1){const i=e[t],s=Math.random()*16|0,o=i==="x"?s:i==="y"?s&3|8:i;n+=o.toString(16)}return n}function QB(n,e,t){const r=Math.min(2,Math.floor(n.length*.34));let i=Math.floor(n.length*.4)+1,s,o=!1;const a=n.toLowerCase();for(const l of e){const c=t(l);if(c!==void 0&&Math.abs(c.length-a.length)<=r){const u=c.toLowerCase();if(u===a){if(c===n)continue;return l}if(o||c.length<3)continue;const h=ZB(a,u,i-1);if(h===void 0)continue;h<3?(o=!0,s=l):(i=h,s=l)}}return s}function ZB(n,e,t){let r=new Array(e.length+1),i=new Array(e.length+1);const s=t+1;for(let a=0;a<=e.length;a+=1)r[a]=a;for(let a=1;a<=n.length;a+=1){const l=n.charCodeAt(a-1),c=a>t?a-t:1,u=e.length>t+a?t+a:e.length;i[0]=a;let h=a;for(let d=1;d<c;d+=1)i[d]=s;for(let d=c;d<=u;d+=1){const g=l===e.charCodeAt(d-1)?r[d-1]:Math.min(r[d]+1,i[d-1]+1,r[d-1]+2);i[d]=g,h=Math.min(h,g)}for(let d=u+1;d<=e.length;d+=1)i[d]=s;if(h>t)return;const f=r;r=i,i=f}const o=r[e.length];return o>t?void 0:o}function Jn(n){return typeof n=="string"&&n.slice(-1)==="%"}function Gt(n,e){if(n==null)return 0;let t;if(typeof n=="string"){if(t=parseFloat(n),Jn(n)&&(t/=100,Number.isFinite(t)))return t*e}else t=n;return Number.isFinite(t)?t>0&&t<1?t*e:t:0}function Ln(n){if(typeof n=="object"){let t=0,r=0,i=0,s=0;return n.vertical!=null&&Number.isFinite(n.vertical)&&(r=s=n.vertical),n.horizontal!=null&&Number.isFinite(n.horizontal)&&(i=t=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(t=n.left),n.top!=null&&Number.isFinite(n.top)&&(r=n.top),n.right!=null&&Number.isFinite(n.right)&&(i=n.right),n.bottom!=null&&Number.isFinite(n.bottom)&&(s=n.bottom),{top:r,right:i,bottom:s,left:t}}let e=0;return n!=null&&Number.isFinite(n)&&(e=n),{top:e,right:e,bottom:e,left:e}}let xh=!1,L1=!1,R1=!1,j1=!1,D1=!1,B1=!1,$1=!1,z1=!1,F1=!1,q1=!1,V1=!1,G1=!1,H1=!1,U1=!1,W1=!1,X1=!1;if(typeof navigator=="object"){const n=navigator.userAgent;xh=n.indexOf("Macintosh")>=0,L1=!!n.match(/(iPad|iPhone|iPod)/g),R1=n.indexOf("Windows")>=0,j1=n.indexOf("MSIE")>=0,D1=!!n.match(/Trident\/7\./),B1=!!n.match(/Edge\//),$1=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,F1=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,q1=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,V1=n.indexOf("Firefox/")>=0,G1=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(X1=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(z1=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,U1=window.PointerEvent!=null&&!xh),typeof document=="object"){H1="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){W1=!0}}),e=document.createElement("div");e.addEventListener&&e.addEventListener("click",()=>{},n)}catch(n){}}var tn;(function(n){n.IS_MAC=xh,n.IS_IOS=L1,n.IS_WINDOWS=R1,n.IS_IE=j1,n.IS_IE11=D1,n.IS_EDGE=B1,n.IS_NETSCAPE=$1,n.IS_CHROME_APP=z1,n.IS_CHROME=F1,n.IS_OPERA=q1,n.IS_FIREFOX=V1,n.IS_SAFARI=G1,n.SUPPORT_TOUCH=H1,n.SUPPORT_POINTER=U1,n.SUPPORT_PASSIVE=W1,n.NO_FOREIGNOBJECT=X1,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(tn||(tn={})),function(n){function e(){const s=window.module;return s!=null&&s.hot!=null&&s.hot.status!=null?s.hot.status():"unkonwn"}n.getHMRStatus=e;function t(){return e()==="apply"}n.isApplyingHMR=t;const r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function i(s){const o=document.createElement(r[s]||"div"),a=`on${s}`;let l=a in o;return l||(o.setAttribute(a,"return;"),l=typeof o[a]=="function"),l}n.isEventSupported=i}(tn||(tn={}));const Ch=/[\t\r\n\f]/g,Sh=/\S+/g,os=n=>` ${n} `;function as(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function ls(n,e){if(n==null||e==null)return!1;const t=os(as(n)),r=os(e);return n.nodeType===1?t.replace(Ch," ").includes(r):!1}function Z(n,e){if(!(n==null||e==null)){if(typeof e=="function")return Z(n,e(as(n)));if(typeof e=="string"&&n.nodeType===1){const t=e.match(Sh)||[],r=os(as(n)).replace(Ch," ");let i=t.reduce((s,o)=>s.indexOf(os(o))<0?`${s}${o} `:s,r);i=i.trim(),r!==i&&n.setAttribute("class",i)}}}function yt(n,e){if(n!=null){if(typeof e=="function")return yt(n,e(as(n)));if((!e||typeof e=="string")&&n.nodeType===1){const t=(e||"").match(Sh)||[],r=os(as(n)).replace(Ch," ");let i=t.reduce((s,o)=>{const a=os(o);return s.indexOf(a)>-1?s.replace(a," "):s},r);i=e?i.trim():"",r!==i&&n.setAttribute("class",i)}}}function Y1(n,e,t){if(!(n==null||e==null)){if(t!=null&&typeof e=="string"){t?Z(n,e):yt(n,e);return}if(typeof e=="function")return Y1(n,e(as(n),t),t);typeof e=="string"&&(e.match(Sh)||[]).forEach(i=>{ls(n,i)?yt(n,i):Z(n,i)})}}let K1=0;function e$(){return K1+=1,`v${K1}`}function Ph(n){return(n.id==null||n.id==="")&&(n.id=e$()),n.id}function Mr(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const ut={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},J1="1.1";function Q1(n,e=document){return e.createElement(n)}function Eh(n,e=ut.xhtml,t=document){return t.createElementNS(e,n)}function Qn(n,e=document){return Eh(n,ut.svg,e)}function yl(n){if(n){const t=`<svg xmlns="${ut.svg}" xmlns:xlink="${ut.xlink}" version="${J1}">${n}</svg>`,{documentElement:r}=t$(t,{async:!1});return r}const e=document.createElementNS(ut.svg,"svg");return e.setAttributeNS(ut.xmlns,"xmlns:xlink",ut.xlink),e.setAttribute("version",J1),e}function t$(n,e={}){let t;try{const r=new DOMParser;if(e.async!=null){const i=r;i.async=e.async}t=r.parseFromString(n,e.mimeType||"text/xml")}catch(r){t=void 0}if(!t||t.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return t}function n$(n,e=!0){const t=n.nodeName;return e?t.toLowerCase():t.toUpperCase()}function Ah(n){let e=0,t=n.previousSibling;for(;t;)t.nodeType===1&&(e+=1),t=t.previousSibling;return e}function r$(n,e){return n.querySelectorAll(e)}function i$(n,e){return n.querySelector(e)}function Z1(n,e,t){const r=n.ownerSVGElement;let i=n.parentNode;for(;i&&i!==t&&i!==r;){if(ls(i,e))return i;i=i.parentNode}return null}function ew(n,e){const t=e&&e.parentNode;return n===t||!!(t&&t.nodeType===1&&n.compareDocumentPosition(t)&16)}function Zn(n){n&&(Array.isArray(n)?n:[n]).forEach(t=>{t.parentNode&&t.parentNode.removeChild(t)})}function Ao(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Rn(n,e){(Array.isArray(e)?e:[e]).forEach(r=>{r!=null&&n.appendChild(r)})}function tw(n,e){const t=n.firstChild;return t?To(t,e):Rn(n,e)}function To(n,e){const t=n.parentNode;t&&(Array.isArray(e)?e:[e]).forEach(i=>{i!=null&&t.insertBefore(i,n)})}function s$(n,e){const t=n.parentNode;t&&(Array.isArray(e)?e:[e]).forEach(i=>{i!=null&&t.insertBefore(i,n.nextSibling)})}function _r(n,e){e!=null&&e.appendChild(n)}function o$(n){return!!n&&n.nodeType===1}function nw(n){try{return n instanceof HTMLElement}catch(e){return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function a$(n,e){const t=[];let r=n.firstChild;for(;r;r=r.nextSibling)r.nodeType===1&&(!e||ls(r,e))&&t.push(r);return t}const rw=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust"];function l$(n,e){return n.getAttribute(e)}function Th(n,e){const t=sw(e);t.ns?n.hasAttributeNS(t.ns,t.local)&&n.removeAttributeNS(t.ns,t.local):n.hasAttribute(e)&&n.removeAttribute(e)}function Oh(n,e,t){if(t==null)return Th(n,e);const r=sw(e);r.ns&&typeof t=="string"?n.setAttributeNS(r.ns,e,t):e==="id"?n.id=`${t}`:n.setAttribute(e,`${t}`)}function iw(n,e){Object.keys(e).forEach(t=>{Oh(n,t,e[t])})}function de(n,e,t){if(e==null){const r=n.attributes,i={};for(let s=0;s<r.length;s+=1)i[r[s].name]=r[s].value;return i}if(typeof e=="string"&&t===void 0)return n.getAttribute(e);typeof e=="object"?iw(n,e):Oh(n,e,t)}function sw(n){if(n.indexOf(":")!==-1){const e=n.split(":");return{ns:ut[e[0]],local:e[1]}}return{ns:null,local:n}}function Oo(n){const e={};return Object.keys(n).forEach(t=>{const r=rw.includes(t)?t:I1(t);e[r]=n[t]}),e}function vl(n){const e={};return n.split(";").forEach(r=>{const i=r.trim();if(i){const s=i.split("=");s.length&&(e[s[0].trim()]=s[1]?s[1].trim():"")}}),e}function Mh(n,e){return Object.keys(e).forEach(t=>{if(t==="class")n[t]=n[t]?`${n[t]} ${e[t]}`:e[t];else if(t==="style"){const r=typeof n[t]=="object",i=typeof e[t]=="object";let s,o;r&&i?(s=n[t],o=e[t]):r?(s=n[t],o=vl(e[t])):i?(s=vl(n[t]),o=e[t]):(s=vl(n[t]),o=vl(e[t])),n[t]=Mh(s,o)}else n[t]=e[t]}),n}function c$(n,e,t={}){const r=t.offset||0,i=[],s=[];let o,a,l=null;for(let c=0;c<n.length;c+=1){o=s[c]=n[c];for(let u=0,h=e.length;u<h;u+=1){const f=e[u],d=f.start+r,g=f.end+r;c>=d&&c<g&&(typeof o=="string"?o=s[c]={t:n[c],attrs:f.attrs}:o.attrs=Mh(Mh({},o.attrs),f.attrs),t.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(u)))}a=s[c-1],a?Ze(o)&&Ze(a)?(l=l,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?l.t+=o.t:(i.push(l),l=o)):Ze(o)||Ze(a)?(l=l,i.push(l),l=o):l=(l||"")+o:l=o}return l!=null&&i.push(l),i}function u$(n){return n.replace(/ /g," ")}var ow;(function(n){function e(c){const u="data:";return c.substr(0,u.length)===u}n.isDataUrl=e;function t(c,u){if(!c||e(c)){setTimeout(()=>u(null,c));return}const h=()=>{u(new Error(`Failed to load image: ${c}`))},f=window.FileReader?g=>{if(g.status===200){const p=new FileReader;p.onload=b=>{const m=b.target.result;u(null,m)},p.onerror=h,p.readAsDataURL(g.response)}else h()}:g=>{const p=b=>{const y=[];for(let v=0;v<b.length;v+=32768)y.push(String.fromCharCode.apply(null,b.subarray(v,v+32768)));return y.join("")};if(g.status===200){let b=c.split(".").pop()||"png";b==="svg"&&(b="svg+xml");const m=`data:image/${b};base64,`,y=new Uint8Array(g.response),v=m+btoa(p(y));u(null,v)}else h()},d=new XMLHttpRequest;d.responseType=window.FileReader?"blob":"arraybuffer",d.open("GET",c,!0),d.addEventListener("error",h),d.addEventListener("load",()=>f(d)),d.send()}n.imageToDataUri=t;function r(c){let u=c.replace(/\s/g,"");u=decodeURIComponent(u);const h=u.indexOf(","),f=u.slice(0,h),d=f.split(":")[1].split(";")[0],g=u.slice(h+1);let p;f.indexOf("base64")>=0?p=atob(g):p=unescape(encodeURIComponent(g));const b=new Uint8Array(p.length);for(let m=0;m<p.length;m+=1)b[m]=p.charCodeAt(m);return new Blob([b],{type:d})}n.dataUriToBlob=r;function i(c,u){const h=window.navigator.msSaveBlob;if(h)h(c,u);else{const f=window.URL.createObjectURL(c),d=document.createElement("a");d.href=f,d.download=u,document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(f)}}n.downloadBlob=i;function s(c,u){const h=r(c);i(h,u)}n.downloadDataUri=s;function o(c){const u=c.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return u&&u[2]?u[2].replace(/\s+/," ").split(" "):null}function a(c){const u=parseFloat(c);return Number.isNaN(u)?null:u}function l(c,u={}){let h=null;const f=v=>(h==null&&(h=o(c)),h!=null?a(h[v]):null),d=v=>{const w=c.match(v);return w&&w[2]?a(w[2]):null};let g=u.width;if(g==null&&(g=d(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),g==null&&(g=f(2)),g==null)throw new Error("Can not parse width from svg string");let p=u.height;if(p==null&&(p=d(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),p==null&&(p=f(3)),p==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(c).replace(/'/g,"%27").replace(/"/g,"%22")}`}n.svgToDataUrl=l})(ow||(ow={}));let bi;const h$={px(n){return n},mm(n){return bi*n},cm(n){return bi*n*10},in(n){return bi*n*25.4},pt(n){return bi*(25.4*n/72)},pc(n){return bi*(25.4*n/6)}};var aw;(function(n){function e(r,i,s){const o=document.createElement("div"),a=o.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=r+(s||"px"),a.height=i+(s||"px"),document.body.appendChild(o);const l=o.getBoundingClientRect(),c={width:l.width||0,height:l.height||0};return document.body.removeChild(o),c}n.measure=e;function t(r,i){bi==null&&(bi=e("1","1","mm").width);const s=i?h$[i]:null;return s?s(r):r}n.toPx=t})(aw||(aw={}));const f$=/-(.)/g;function d$(n){return n.replace(f$,(e,t)=>t.toUpperCase())}const _h={},lw=["webkit","ms","moz","o"],cw=document?document.createElement("div").style:{};function g$(n){for(let e=0;e<lw.length;e+=1){const t=lw[e]+n;if(t in cw)return t}return null}function p$(n){const e=d$(n);if(_h[e]==null){const t=e.charAt(0).toUpperCase()+e.slice(1);_h[e]=e in cw?e:g$(t)}return _h[e]}function uw(n,e){const t=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return t&&e?t.getPropertyValue(e)||t[e]:t}const m$={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function y$(n){return/^--/.test(n)}function bl(n,e,t){const r=window.getComputedStyle(n,null);return t?r.getPropertyValue(e)||void 0:r[e]||n.style[e]}function wl(n,e){return parseInt(bl(n,e),10)||0}function v$(n,e){return!m$[n]&&typeof e=="number"?`${e}px`:e}function ve(n,e,t){if(typeof e=="string"){const r=y$(e);if(r||(e=p$(e)),t===void 0)return bl(n,e,r);r||(t=v$(e,t));const i=n.style;r?i.setProperty(e,t):i[e]=t;return}for(const r in e)ve(n,r,e[r])}const xl=new WeakMap;function hw(n,e){const t=ul(e),r=xl.get(n);if(r)return r[t]}function b$(n,e,t){const r=ul(e),i=xl.get(n);i?i[r]=t:xl.set(n,{[r]:t})}function wi(n,e,t){if(!e){const r={};return Object.keys(xl).forEach(i=>{r[i]=hw(n,i)}),r}if(typeof e=="string"){if(t===void 0)return hw(n,e);b$(n,e,t);return}for(const r in e)wi(n,r,e[r])}const w$={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};function Nh(n,e,t){if(e){if(typeof e=="string"){if(e=w$[e]||e,arguments.length<3)return n[e];n[e]=t;return}for(const r in e)Nh(n,r,e[r])}}class te{get[Symbol.toStringTag](){return te.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(e){this.node.id=e}constructor(e,t,r){if(!e)throw new TypeError("Invalid element to create vector");let i;if(te.isVector(e))i=e.node;else if(typeof e=="string")if(e.toLowerCase()==="svg")i=yl();else if(e[0]==="<"){const s=yl(e);i=document.importNode(s.firstChild,!0)}else i=document.createElementNS(ut.svg,e);else i=e;this.node=i,t&&this.setAttributes(t),r&&this.append(r)}transform(e,t){return e==null?hs(this.node):(hs(this.node,e,t),this)}translate(e,t=0,r={}){return e==null?ww(this.node):(ww(this.node,e,t,r),this)}rotate(e,t,r,i={}){return e==null?Lh(this.node):(Lh(this.node,e,t,r,i),this)}scale(e,t){return e==null?Rh(this.node):(Rh(this.node,e,t),this)}getTransformToElement(e){const t=te.toNode(e);return No(this.node,t)}removeAttribute(e){return Th(this.node,e),this}getAttribute(e){return l$(this.node,e)}setAttribute(e,t){return Oh(this.node,e,t),this}setAttributes(e){return iw(this.node,e),this}attr(e,t){return e==null?de(this.node):typeof e=="string"&&t===void 0?de(this.node,e):(typeof e=="object"?de(this.node,e):de(this.node,e,t),this)}svg(){return this.node instanceof SVGSVGElement?this:te.create(this.node.ownerSVGElement)}defs(){const e=this.svg()||this,t=e.node.getElementsByTagName("defs")[0];return t?te.create(t):te.create("defs").appendTo(e)}text(e,t={}){return gw(this.node,e,t),this}tagName(){return n$(this.node)}clone(){return te.create(this.node.cloneNode(!0))}remove(){return Zn(this.node),this}empty(){return Ao(this.node),this}append(e){return Rn(this.node,te.toNodes(e)),this}appendTo(e){return _r(this.node,te.isVector(e)?e.node:e),this}prepend(e){return tw(this.node,te.toNodes(e)),this}before(e){return To(this.node,te.toNodes(e)),this}replace(e){return this.node.parentNode&&this.node.parentNode.replaceChild(te.toNode(e),this.node),te.create(e)}first(){return this.node.firstChild?te.create(this.node.firstChild):null}last(){return this.node.lastChild?te.create(this.node.lastChild):null}get(e){const t=this.node.childNodes[e];return t?te.create(t):null}indexOf(e){return Array.prototype.slice.call(this.node.childNodes).indexOf(te.toNode(e))}find(e){const t=[],r=r$(this.node,e);if(r)for(let i=0,s=r.length;i<s;i+=1)t.push(te.create(r[i]));return t}findOne(e){const t=i$(this.node,e);return t?te.create(t):null}findParentByClass(e,t){const r=Z1(this.node,e,t);return r?te.create(r):null}matches(e){const t=this.node;this.node.matches;const r=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return r&&r.call(t,e)}contains(e){return ew(this.node,te.isVector(e)?e.node:e)}wrap(e){const t=te.create(e),r=this.node.parentNode;return r!=null&&r.insertBefore(t.node,this.node),t.append(this)}parent(e){let t=this;if(t.node.parentNode==null)return null;if(t=te.create(t.node.parentNode),e==null)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=te.create(t.node.parentNode));return t}children(){const e=this.node.childNodes,t=[];for(let r=0;r<e.length;r+=1)e[r].nodeType===1&&t.push(te.create(e[r]));return t}eachChild(e,t){const r=this.children();for(let i=0,s=r.length;i<s;i+=1)e.call(r[i],r[i],i,r),t&&r[i].eachChild(e,t);return this}index(){return Ah(this.node)}hasClass(e){return ls(this.node,e)}addClass(e){return Z(this.node,e),this}removeClass(e){return yt(this.node,e),this}toggleClass(e,t){return Y1(this.node,e,t),this}toLocalPoint(e,t){return F$(this.node,e,t)}sample(e=1){return this.node instanceof SVGPathElement?E$(this.node,e):[]}toPath(){return te.create(k$(this.node))}toPathData(){return vw(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function e(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],l=o;return(a==null||a===n.toStringTag)&&l.node instanceof SVGElement&&typeof l.sample=="function"&&typeof l.toPath=="function"}n.isVector=e;function t(o,a,l){return new n(o,a,l)}n.create=t;function r(o){if(o[0]==="<"){const a=yl(o),l=[];for(let c=0,u=a.childNodes.length;c<u;c+=1){const h=a.childNodes[c];l.push(t(document.importNode(h,!0)))}return l}return[t(o)]}n.createVectors=r;function i(o){return e(o)?o.node:o}n.toNode=i;function s(o){return Array.isArray(o)?o.map(a=>i(a)):[i(o)]}n.toNodes=s})(te||(te={}));const fw=document.createElement("canvas").getContext("2d");function x$(n,e){const t=te.create(e),r=te.create("textPath"),i=n.d;if(i&&n["xlink:href"]===void 0){const s=te.create("path").attr("d",i).appendTo(t.defs());r.attr("xlink:href",`#${s.id}`)}return typeof n=="object"&&r.attr(n),r.node}function C$(n,e,t){const r=t.eol,i=t.baseSize,s=t.lineHeight;let o=0,a;const l={},c=e.length-1;for(let u=0;u<=c;u+=1){let h=e[u],f=null;if(typeof h=="object"){const d=h.attrs,g=te.create("tspan",d);a=g.node;let p=h.t;r&&u===c&&(p+=r),a.textContent=p;const b=d.class;b&&g.addClass(b),t.includeAnnotationIndices&&g.attr("annotations",h.annotations.join(",")),f=parseFloat(d["font-size"]),f===void 0&&(f=i),f&&f>o&&(o=f)}else r&&u===c&&(h+=r),a=document.createTextNode(h||" "),i&&i>o&&(o=i);n.appendChild(a)}return o&&(l.maxFontSize=o),s?l.lineHeight=s:o&&(l.lineHeight=o*1.2),l}const dw=/em$/;function Cl(n,e){const t=parseFloat(n);return dw.test(n)?t*e:t}function S$(n,e,t,r){if(!Array.isArray(e))return 0;const i=e.length;if(!i)return 0;let s=e[0];const o=Cl(s.maxFontSize,t)||t;let a=0;const l=Cl(r,t);for(let h=1;h<i;h+=1){s=e[h];const f=Cl(s.lineHeight,t)||l;a+=f}const c=Cl(s.maxFontSize,t)||t;let u;switch(n){case"middle":u=o/2-.15*c-a/2;break;case"bottom":u=-(.25*c)-a;break;case"top":default:u=.8*o;break}return u}function gw(n,e,t={}){e=u$(e);const r=t.eol;let i=t.textPath;const s=t.textVerticalAnchor,o=s==="middle"||s==="bottom"||s==="top";let a=t.x;a===void 0&&(a=n.getAttribute("x")||0);const l=t.includeAnnotationIndices;let c=t.annotations;c&&!Array.isArray(c)&&(c=[c]);const u=t.lineHeight,h=u==="auto",f=h?"1.5em":u||"1em";let d=!0;const g=n.childNodes;if(g.length===1){const T=g[0];T&&T.tagName.toUpperCase()==="TITLE"&&(d=!1)}d&&Ao(n),de(n,{"xml:space":"preserve",display:e||t.displayEmpty?null:"none"});const p=de(n,"font-size");let b=parseFloat(p);b||(b=16,(o||c)&&!p&&de(n,"font-size",`${b}`));let m;i?(typeof i=="string"&&(i={d:i}),m=x$(i,n)):m=document.createDocumentFragment();let y,v=0,w;const x=e.split(`
1
+ (function(ee,R){typeof exports=="object"&&typeof module!="undefined"?R(exports,require("@nocobase/client"),require("react/jsx-runtime"),require("react"),require("@ant-design/icons"),require("@formily/shared"),require("@formily/react"),require("@formily/reactive"),require("@nocobase/utils/client"),require("antd"),require("react-i18next"),require("@emotion/css"),require("lodash"),require("react-router-dom"),require("ahooks")):typeof define=="function"&&define.amd?define(["exports","@nocobase/client","react/jsx-runtime","react","@ant-design/icons","@formily/shared","@formily/react","@formily/reactive","@nocobase/utils/client","antd","react-i18next","@emotion/css","lodash","react-router-dom","ahooks"],R):(ee=typeof globalThis!="undefined"?globalThis:ee||self,R(ee["@nocobase/plugin-graph-collection-manager"]={},ee["@nocobase/client"],ee.jsxRuntime,ee.react,ee["@ant-design/icons"],ee["@formily/shared"],ee["@formily/react"],ee["@formily/reactive"],ee["@nocobase/utils"],ee.antd,ee["react-i18next"],ee["@emotion/css"],ee.lodash,ee["react-router-dom"],ee.ahooks))})(this,function(ee,R,_,H,Ie,fo,Qt,go,pn,ue,Za,Ar,$u,Nb,G2){"use strict";var MW=Object.defineProperty,_W=Object.defineProperties;var NW=Object.getOwnPropertyDescriptors;var Bu=Object.getOwnPropertySymbols;var B2=Object.prototype.hasOwnProperty,$2=Object.prototype.propertyIsEnumerable;var D2=(ee,R,_)=>R in ee?MW(ee,R,{enumerable:!0,configurable:!0,writable:!0,value:_}):ee[R]=_,se=(ee,R)=>{for(var _ in R||(R={}))B2.call(R,_)&&D2(ee,_,R[_]);if(Bu)for(var _ of Bu(R))$2.call(R,_)&&D2(ee,_,R[_]);return ee},Ve=(ee,R)=>_W(ee,NW(R));var z2=(ee,R)=>{var _={};for(var H in ee)B2.call(ee,H)&&R.indexOf(H)<0&&(_[H]=ee[H]);if(ee!=null&&Bu)for(var H of Bu(ee))R.indexOf(H)<0&&$2.call(ee,H)&&(_[H]=ee[H]);return _};var Ge=(ee,R,_)=>new Promise((H,Ie)=>{var fo=pn=>{try{go(_.next(pn))}catch(ue){Ie(ue)}},Qt=pn=>{try{go(_.throw(pn))}catch(ue){Ie(ue)}},go=pn=>pn.done?H(pn.value):Promise.resolve(pn.value).then(fo,Qt);go((_=_.apply(ee,R)).next())});const di=H.createContext(null),kb=n=>{const{record:e,setTargetNode:t,node:r,handelOpenPorts:i}=n;return _.jsx(di.Provider,{value:{node:r,record:e,positionTargetNode:s=>{t(s||r)},openPorts:i},children:n.children})},H2=(n,e)=>{const t=R.useRequest(()=>Promise.resolve({data:e}),Ve(se({},n),{manual:!0})),r=R.useActionContext();return H.useEffect(()=>{r.visible&&t.run()},[r.visible]),t};Qt.observer(()=>{const{record:n}=H.useContext(di),e=R.useCompile();return _.jsx("div",{children:_.jsx(ue.Select,{"data-testid":"antd-select",popupMatchSelectWidth:!1,disabled:!0,value:n.name,options:[{value:n.name,label:e(n.title)}]})})},{displayName:"SourceCollection"});const Tr=()=>{const n=Qt.useForm(),e=R.useActionContext();return{run(){return Ge(this,null,function*(){e.setVisible(!1),n.reset()})}}},Ib=n=>{const e=Qt.useForm(),t=R.useAPIClient(),r=R.useActionContext(),{refreshCM:i}=R.useCollectionManager();return{run(){return Ge(this,null,function*(){yield e.submit(),yield t.resource("collections").create({values:e.values}),r.setVisible(!1),yield e.reset(),n("last"),yield i()})}}},Lb=(n,e)=>{const t=Qt.useForm(),r=R.useAPIClient(),i=R.useActionContext(),{refreshCM:s}=R.useCollectionManager(),{positionTargetNode:o,openPorts:a}=H.useContext(di),{getValues:l}=R.useCollectionFieldFormValues();return{run(){return Ge(this,null,function*(){yield t.submit();const u=l(),h=pn.lodash.omit(u,["key","uiSchemaUid","collectionName","autoCreateReverseField","uiSchema.x-uid","reverseField.key","reverseField.uiSchemaUid"]),f=!["obo","oho","o2o","o2m","m2o","m2m","linkTo","id"].includes(u.interface),{data:{data:d}}=yield r.resource("collections.fields",n).create({values:h});e&&(yield r.resource("fields").move({sourceId:d.key,targetId:e,targetScope:n,method:"insertAfter"})),i.setVisible(!1),yield t.reset(),o(),f&&a&&a(),yield s()})}}},U2=({collectionName:n,name:e,key:t})=>{const{refreshCM:r}=R.useCollectionManager(),{t:i}=Za.useTranslation(),s=Qt.useForm(),o=R.useActionContext(),a=R.useAPIClient(),{positionTargetNode:l,node:c}=H.useContext(di);return{run(){return Ge(this,null,function*(){var h;yield s.submit(),yield a.resource("collections.fields",n).update({filterByTk:e,values:s.values}),o.setVisible(!1),ue.message.success(i("Saved successfully")),l(),r(),c.setPortProp(t,"uiSchema",{title:(h=s.values)==null?void 0:h.uiSchema.title}),yield s.reset()})}}},zu=()=>{const{t:n}=Za.useTranslation(),e=Qt.useForm(),t=R.useActionContext(),{name:r}=e.values,i=R.useAPIClient(),{refreshCM:s}=R.useCollectionManager(),{positionTargetNode:o}=H.useContext(di);return{run(){return Ge(this,null,function*(){yield e.submit(),yield i.resource("collections").update({filterByTk:r,values:se({},pn.lodash.omit(e.values,["fields"]))}),t.setVisible(!1),ue.message.success(n("Saved successfully")),yield e.reset(),o(),s()})}}},W2=n=>{const e=R.useAPIClient();return{run(){return Ge(this,null,function*(){yield e.resource("collections").destroy({filterByTk:n}),yield e.resource("graphPositions").destroy({filter:{collectionName:n}})})}}},X2=n=>{const{name:e}=n,{run:t}=W2(e),{refreshCM:r}=R.useCollectionManager(),{positionTargetNode:i}=H.useContext(di);return{run(){return Ge(this,null,function*(){yield t(),i("destory"),yield r()})}}},Y2=(n,e)=>{const t=R.useAPIClient(),{positionTargetNode:r}=H.useContext(di);return{run(){return Ge(this,null,function*(){yield t.resource("collections.fields",n).destroy({filterByTk:e}),r()})}}},K2=n=>{const{collectionName:e,name:t}=n,{refreshCM:r}=R.useCollectionManager(),{run:i}=Y2(e,t);return{run(){return Ge(this,null,function*(){yield i(),yield r()})}}},Fu=n=>(e,{targetScope:t})=>{e.loading=!0,n(t).then(go.action.bound(r=>{e.dataSource=r,e.loading=!1})).catch(r=>{pn.error(r)})};typeof window=="object"&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),function(n){n.forEach(e=>{Object.prototype.hasOwnProperty.call(e,"append")||Object.defineProperty(e,"append",{configurable:!0,enumerable:!0,writable:!0,value(...t){const r=document.createDocumentFragment();t.forEach(i=>{const s=i instanceof Node;r.appendChild(s?i:document.createTextNode(String(i)))}),this.appendChild(r)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]);class Nn{get disposed(){return this._disposed===!0}dispose(){this._disposed=!0}}(function(n){function e(){return(t,r,i)=>{const s=i.value,o=t.__proto__;i.value=function(){this.disposed||(s.call(this),o.dispose.call(this))}}}n.dispose=e})(Nn||(Nn={}));class Rb{constructor(){this.isDisposed=!1,this.items=new Set}get disposed(){return this.isDisposed}dispose(){this.isDisposed||(this.isDisposed=!0,this.items.forEach(e=>{e.dispose()}),this.items.clear())}contains(e){return this.items.has(e)}add(e){this.items.add(e)}remove(e){this.items.delete(e)}clear(){this.items.clear()}}(function(n){function e(t){const r=new n;return t.forEach(i=>{r.add(i)}),r}n.from=e})(Rb||(Rb={}));var J2=typeof global=="object"&&global&&global.Object===Object&&global;const jb=J2;var Q2=typeof self=="object"&&self&&self.Object===Object&&self,Z2=jb||Q2||Function("return this")();const mn=Z2;var eN=mn.Symbol;const Zt=eN;var Db=Object.prototype,tN=Db.hasOwnProperty,nN=Db.toString,po=Zt?Zt.toStringTag:void 0;function rN(n){var e=tN.call(n,po),t=n[po];try{n[po]=void 0;var r=!0}catch(s){}var i=nN.call(n);return r&&(e?n[po]=t:delete n[po]),i}var iN=Object.prototype,sN=iN.toString;function oN(n){return sN.call(n)}var aN="[object Null]",lN="[object Undefined]",Bb=Zt?Zt.toStringTag:void 0;function Or(n){return n==null?n===void 0?lN:aN:Bb&&Bb in Object(n)?rN(n):oN(n)}function yn(n){return n!=null&&typeof n=="object"}var cN="[object Symbol]";function kn(n){return typeof n=="symbol"||yn(n)&&Or(n)==cN}function mo(n,e){for(var t=-1,r=n==null?0:n.length,i=Array(r);++t<r;)i[t]=e(n[t],t,n);return i}var uN=Array.isArray;const Ct=uN;var hN=1/0,$b=Zt?Zt.prototype:void 0,zb=$b?$b.toString:void 0;function Fb(n){if(typeof n=="string")return n;if(Ct(n))return mo(n,Fb)+"";if(kn(n))return zb?zb.call(n):"";var e=n+"";return e=="0"&&1/n==-hN?"-0":e}var fN=/\s/;function dN(n){for(var e=n.length;e--&&fN.test(n.charAt(e)););return e}var gN=/^\s+/;function pN(n){return n&&n.slice(0,dN(n)+1).replace(gN,"")}function Ze(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}var qb=0/0,mN=/^[-+]0x[0-9a-f]+$/i,yN=/^0b[01]+$/i,vN=/^0o[0-7]+$/i,bN=parseInt;function yo(n){if(typeof n=="number")return n;if(kn(n))return qb;if(Ze(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=Ze(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=pN(n);var t=yN.test(n);return t||vN.test(n)?bN(n.slice(2),t?2:8):mN.test(n)?qb:+n}function Xi(n){return n}var wN="[object AsyncFunction]",xN="[object Function]",CN="[object GeneratorFunction]",SN="[object Proxy]";function qu(n){if(!Ze(n))return!1;var e=Or(n);return e==xN||e==CN||e==wN||e==SN}var PN=mn["__core-js_shared__"];const Vu=PN;var Vb=function(){var n=/[^.]+$/.exec(Vu&&Vu.keys&&Vu.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function EN(n){return!!Vb&&Vb in n}var AN=Function.prototype,TN=AN.toString;function gi(n){if(n!=null){try{return TN.call(n)}catch(e){}try{return n+""}catch(e){}}return""}var ON=/[\\^$.*+?()[\]{}|]/g,MN=/^\[object .+?Constructor\]$/,_N=Function.prototype,NN=Object.prototype,kN=_N.toString,IN=NN.hasOwnProperty,LN=RegExp("^"+kN.call(IN).replace(ON,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function RN(n){if(!Ze(n)||EN(n))return!1;var e=qu(n)?LN:MN;return e.test(gi(n))}function jN(n,e){return n==null?void 0:n[e]}function pi(n,e){var t=jN(n,e);return RN(t)?t:void 0}var DN=pi(mn,"WeakMap");const Gu=DN;var Gb=Object.create,BN=function(){function n(){}return function(e){if(!Ze(e))return{};if(Gb)return Gb(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();const $N=BN;function Hb(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function zN(){}function Ub(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var FN=800,qN=16,VN=Date.now;function GN(n){var e=0,t=0;return function(){var r=VN(),i=qN-(r-t);if(t=r,i>0){if(++e>=FN)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function HN(n){return function(){return n}}var UN=function(){try{var n=pi(Object,"defineProperty");return n({},"",{}),n}catch(e){}}();const el=UN;var WN=el?function(n,e){return el(n,"toString",{configurable:!0,enumerable:!1,value:HN(e),writable:!0})}:Xi,XN=GN(WN);const YN=XN;function KN(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}function JN(n,e,t,r){for(var i=n.length,s=t+(r?1:-1);r?s--:++s<i;)if(e(n[s],s,n))return s;return-1}function QN(n){return n!==n}function ZN(n,e,t){for(var r=t-1,i=n.length;++r<i;)if(n[r]===e)return r;return-1}function ek(n,e,t){return e===e?ZN(n,e,t):JN(n,QN,t)}function Wb(n,e){var t=n==null?0:n.length;return!!t&&ek(n,e,0)>-1}var tk=9007199254740991,nk=/^(?:0|[1-9]\d*)$/;function Hu(n,e){var t=typeof n;return e=e==null?tk:e,!!e&&(t=="number"||t!="symbol"&&nk.test(n))&&n>-1&&n%1==0&&n<e}function tl(n,e,t){e=="__proto__"&&el?el(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function Yi(n,e){return n===e||n!==n&&e!==e}var rk=Object.prototype,ik=rk.hasOwnProperty;function Xb(n,e,t){var r=n[e];(!(ik.call(n,e)&&Yi(r,t))||t===void 0&&!(e in n))&&tl(n,e,t)}function vo(n,e,t,r){var i=!t;t||(t={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=r?r(t[a],n[a],a,t,n):void 0;l===void 0&&(l=n[a]),i?tl(t,a,l):Xb(t,a,l)}return t}var Yb=Math.max;function sk(n,e,t){return e=Yb(e===void 0?n.length-1:e,0),function(){for(var r=arguments,i=-1,s=Yb(r.length-e,0),o=Array(s);++i<s;)o[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=t(o),Hb(n,this,a)}}function Ki(n,e){return YN(sk(n,e,Xi),n+"")}var ok=9007199254740991;function Uu(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ok}function mi(n){return n!=null&&Uu(n.length)&&!qu(n)}function nl(n,e,t){if(!Ze(t))return!1;var r=typeof e;return(r=="number"?mi(t)&&Hu(e,t.length):r=="string"&&e in t)?Yi(t[e],n):!1}function Kb(n){return Ki(function(e,t){var r=-1,i=t.length,s=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(s=n.length>3&&typeof s=="function"?(i--,s):void 0,o&&nl(t[0],t[1],o)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var a=t[r];a&&n(e,a,r,s)}return e})}var ak=Object.prototype;function rl(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||ak;return n===t}function lk(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var ck="[object Arguments]";function Jb(n){return yn(n)&&Or(n)==ck}var Qb=Object.prototype,uk=Qb.hasOwnProperty,hk=Qb.propertyIsEnumerable,fk=Jb(function(){return arguments}())?Jb:function(n){return yn(n)&&uk.call(n,"callee")&&!hk.call(n,"callee")};const Ji=fk;function dk(){return!1}var Zb=typeof ee=="object"&&ee&&!ee.nodeType&&ee,e0=Zb&&typeof module=="object"&&module&&!module.nodeType&&module,gk=e0&&e0.exports===Zb,t0=gk?mn.Buffer:void 0,pk=t0?t0.isBuffer:void 0,mk=pk||dk;const Qi=mk;var yk="[object Arguments]",vk="[object Array]",bk="[object Boolean]",wk="[object Date]",xk="[object Error]",Ck="[object Function]",Sk="[object Map]",Pk="[object Number]",Ek="[object Object]",Ak="[object RegExp]",Tk="[object Set]",Ok="[object String]",Mk="[object WeakMap]",_k="[object ArrayBuffer]",Nk="[object DataView]",kk="[object Float32Array]",Ik="[object Float64Array]",Lk="[object Int8Array]",Rk="[object Int16Array]",jk="[object Int32Array]",Dk="[object Uint8Array]",Bk="[object Uint8ClampedArray]",$k="[object Uint16Array]",zk="[object Uint32Array]",Me={};Me[kk]=Me[Ik]=Me[Lk]=Me[Rk]=Me[jk]=Me[Dk]=Me[Bk]=Me[$k]=Me[zk]=!0,Me[yk]=Me[vk]=Me[_k]=Me[bk]=Me[Nk]=Me[wk]=Me[xk]=Me[Ck]=Me[Sk]=Me[Pk]=Me[Ek]=Me[Ak]=Me[Tk]=Me[Ok]=Me[Mk]=!1;function Fk(n){return yn(n)&&Uu(n.length)&&!!Me[Or(n)]}function bo(n){return function(e){return n(e)}}var n0=typeof ee=="object"&&ee&&!ee.nodeType&&ee,wo=n0&&typeof module=="object"&&module&&!module.nodeType&&module,qk=wo&&wo.exports===n0,Wu=qk&&jb.process,Vk=function(){try{var n=wo&&wo.require&&wo.require("util").types;return n||Wu&&Wu.binding&&Wu.binding("util")}catch(e){}}();const Zi=Vk;var r0=Zi&&Zi.isTypedArray,Gk=r0?bo(r0):Fk;const il=Gk;var Hk=Object.prototype,Uk=Hk.hasOwnProperty;function i0(n,e){var t=Ct(n),r=!t&&Ji(n),i=!t&&!r&&Qi(n),s=!t&&!r&&!i&&il(n),o=t||r||i||s,a=o?lk(n.length,String):[],l=a.length;for(var c in n)(e||Uk.call(n,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Hu(c,l)))&&a.push(c);return a}function s0(n,e){return function(t){return n(e(t))}}var Wk=s0(Object.keys,Object);const Xk=Wk;var Yk=Object.prototype,Kk=Yk.hasOwnProperty;function o0(n){if(!rl(n))return Xk(n);var e=[];for(var t in Object(n))Kk.call(n,t)&&t!="constructor"&&e.push(t);return e}function xo(n){return mi(n)?i0(n):o0(n)}function Jk(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var Qk=Object.prototype,Zk=Qk.hasOwnProperty;function eI(n){if(!Ze(n))return Jk(n);var e=rl(n),t=[];for(var r in n)r=="constructor"&&(e||!Zk.call(n,r))||t.push(r);return t}function es(n){return mi(n)?i0(n,!0):eI(n)}var tI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nI=/^\w*$/;function Xu(n,e){if(Ct(n))return!1;var t=typeof n;return t=="number"||t=="symbol"||t=="boolean"||n==null||kn(n)?!0:nI.test(n)||!tI.test(n)||e!=null&&n in Object(e)}var rI=pi(Object,"create");const Co=rI;function iI(){this.__data__=Co?Co(null):{},this.size=0}function sI(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var oI="__lodash_hash_undefined__",aI=Object.prototype,lI=aI.hasOwnProperty;function cI(n){var e=this.__data__;if(Co){var t=e[n];return t===oI?void 0:t}return lI.call(e,n)?e[n]:void 0}var uI=Object.prototype,hI=uI.hasOwnProperty;function fI(n){var e=this.__data__;return Co?e[n]!==void 0:hI.call(e,n)}var dI="__lodash_hash_undefined__";function gI(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Co&&e===void 0?dI:e,this}function yi(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}yi.prototype.clear=iI,yi.prototype.delete=sI,yi.prototype.get=cI,yi.prototype.has=fI,yi.prototype.set=gI;function pI(){this.__data__=[],this.size=0}function sl(n,e){for(var t=n.length;t--;)if(Yi(n[t][0],e))return t;return-1}var mI=Array.prototype,yI=mI.splice;function vI(n){var e=this.__data__,t=sl(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():yI.call(e,t,1),--this.size,!0}function bI(n){var e=this.__data__,t=sl(e,n);return t<0?void 0:e[t][1]}function wI(n){return sl(this.__data__,n)>-1}function xI(n,e){var t=this.__data__,r=sl(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function Xn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Xn.prototype.clear=pI,Xn.prototype.delete=vI,Xn.prototype.get=bI,Xn.prototype.has=wI,Xn.prototype.set=xI;var CI=pi(mn,"Map");const So=CI;function SI(){this.size=0,this.__data__={hash:new yi,map:new(So||Xn),string:new yi}}function PI(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function ol(n,e){var t=n.__data__;return PI(e)?t[typeof e=="string"?"string":"hash"]:t.map}function EI(n){var e=ol(this,n).delete(n);return this.size-=e?1:0,e}function AI(n){return ol(this,n).get(n)}function TI(n){return ol(this,n).has(n)}function OI(n,e){var t=ol(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function Yn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}Yn.prototype.clear=SI,Yn.prototype.delete=EI,Yn.prototype.get=AI,Yn.prototype.has=TI,Yn.prototype.set=OI;var MI="Expected a function";function Yu(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(MI);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=t.cache;if(s.has(i))return s.get(i);var o=n.apply(this,r);return t.cache=s.set(i,o)||s,o};return t.cache=new(Yu.Cache||Yn),t}Yu.Cache=Yn;var _I=500;function NI(n){var e=Yu(n,function(r){return t.size===_I&&t.clear(),r}),t=e.cache;return e}var kI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,II=/\\(\\)?/g,LI=NI(function(n){var e=[];return n.charCodeAt(0)===46&&e.push(""),n.replace(kI,function(t,r,i,s){e.push(i?s.replace(II,"$1"):r||t)}),e});const RI=LI;function Po(n){return n==null?"":Fb(n)}function a0(n,e){return Ct(n)?n:Xu(n,e)?[n]:RI(Po(n))}var jI=1/0;function al(n){if(typeof n=="string"||kn(n))return n;var e=n+"";return e=="0"&&1/n==-jI?"-0":e}function Ku(n,e){e=a0(e,n);for(var t=0,r=e.length;n!=null&&t<r;)n=n[al(e[t++])];return t&&t==r?n:void 0}function DI(n,e,t){var r=n==null?void 0:Ku(n,e);return r===void 0?t:r}function Ju(n,e){for(var t=-1,r=e.length,i=n.length;++t<r;)n[i+t]=e[t];return n}var l0=Zt?Zt.isConcatSpreadable:void 0;function BI(n){return Ct(n)||Ji(n)||!!(l0&&n&&n[l0])}function ll(n,e,t,r,i){var s=-1,o=n.length;for(t||(t=BI),i||(i=[]);++s<o;){var a=n[s];e>0&&t(a)?e>1?ll(a,e-1,t,r,i):Ju(i,a):r||(i[i.length]=a)}return i}var $I=s0(Object.getPrototypeOf,Object);const Qu=$I;var zI="[object Object]",FI=Function.prototype,qI=Object.prototype,c0=FI.toString,VI=qI.hasOwnProperty,GI=c0.call(Object);function In(n){if(!yn(n)||Or(n)!=zI)return!1;var e=Qu(n);if(e===null)return!0;var t=VI.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&c0.call(t)==GI}function HI(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(i);++r<i;)s[r]=n[r+e];return s}function UI(n,e,t){var r=n.length;return t=t===void 0?r:t,!e&&t>=r?n:HI(n,e,t)}var WI="\\ud800-\\udfff",XI="\\u0300-\\u036f",YI="\\ufe20-\\ufe2f",KI="\\u20d0-\\u20ff",JI=XI+YI+KI,QI="\\ufe0e\\ufe0f",ZI="\\u200d",eL=RegExp("["+ZI+WI+JI+QI+"]");function u0(n){return eL.test(n)}function tL(n){return n.split("")}var h0="\\ud800-\\udfff",nL="\\u0300-\\u036f",rL="\\ufe20-\\ufe2f",iL="\\u20d0-\\u20ff",sL=nL+rL+iL,oL="\\ufe0e\\ufe0f",aL="["+h0+"]",Zu="["+sL+"]",eh="\\ud83c[\\udffb-\\udfff]",lL="(?:"+Zu+"|"+eh+")",f0="[^"+h0+"]",d0="(?:\\ud83c[\\udde6-\\uddff]){2}",g0="[\\ud800-\\udbff][\\udc00-\\udfff]",cL="\\u200d",p0=lL+"?",m0="["+oL+"]?",uL="(?:"+cL+"(?:"+[f0,d0,g0].join("|")+")"+m0+p0+")*",hL=m0+p0+uL,fL="(?:"+[f0+Zu+"?",Zu,d0,g0,aL].join("|")+")",dL=RegExp(eh+"(?="+eh+")|"+fL+hL,"g");function gL(n){return n.match(dL)||[]}function pL(n){return u0(n)?gL(n):tL(n)}function y0(n){return function(e){e=Po(e);var t=u0(e)?pL(e):void 0,r=t?t[0]:e.charAt(0),i=t?UI(t,1).join(""):e.slice(1);return r[n]()+i}}var mL=y0("toUpperCase");const cl=mL;function yL(n){return cl(Po(n).toLowerCase())}function vL(n,e,t,r){var i=-1,s=n==null?0:n.length;for(r&&s&&(t=n[++i]);++i<s;)t=e(t,n[i],i,n);return t}function bL(n){return function(e){return n==null?void 0:n[e]}}var wL={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},xL=bL(wL);const CL=xL;var SL=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,PL="\\u0300-\\u036f",EL="\\ufe20-\\ufe2f",AL="\\u20d0-\\u20ff",TL=PL+EL+AL,OL="["+TL+"]",ML=RegExp(OL,"g");function _L(n){return n=Po(n),n&&n.replace(SL,CL).replace(ML,"")}var NL=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function kL(n){return n.match(NL)||[]}var IL=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function LL(n){return IL.test(n)}var v0="\\ud800-\\udfff",RL="\\u0300-\\u036f",jL="\\ufe20-\\ufe2f",DL="\\u20d0-\\u20ff",BL=RL+jL+DL,b0="\\u2700-\\u27bf",w0="a-z\\xdf-\\xf6\\xf8-\\xff",$L="\\xac\\xb1\\xd7\\xf7",zL="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",FL="\\u2000-\\u206f",qL=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",x0="A-Z\\xc0-\\xd6\\xd8-\\xde",VL="\\ufe0e\\ufe0f",C0=$L+zL+FL+qL,S0="['’]",P0="["+C0+"]",GL="["+BL+"]",E0="\\d+",HL="["+b0+"]",A0="["+w0+"]",T0="[^"+v0+C0+E0+b0+w0+x0+"]",UL="\\ud83c[\\udffb-\\udfff]",WL="(?:"+GL+"|"+UL+")",XL="[^"+v0+"]",O0="(?:\\ud83c[\\udde6-\\uddff]){2}",M0="[\\ud800-\\udbff][\\udc00-\\udfff]",ts="["+x0+"]",YL="\\u200d",_0="(?:"+A0+"|"+T0+")",KL="(?:"+ts+"|"+T0+")",N0="(?:"+S0+"(?:d|ll|m|re|s|t|ve))?",k0="(?:"+S0+"(?:D|LL|M|RE|S|T|VE))?",I0=WL+"?",L0="["+VL+"]?",JL="(?:"+YL+"(?:"+[XL,O0,M0].join("|")+")"+L0+I0+")*",QL="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ZL="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",eR=L0+I0+JL,tR="(?:"+[HL,O0,M0].join("|")+")"+eR,nR=RegExp([ts+"?"+A0+"+"+N0+"(?="+[P0,ts,"$"].join("|")+")",KL+"+"+k0+"(?="+[P0,ts+_0,"$"].join("|")+")",ts+"?"+_0+"+"+N0,ts+"+"+k0,ZL,QL,E0,tR].join("|"),"g");function rR(n){return n.match(nR)||[]}function iR(n,e,t){return n=Po(n),e=t?void 0:e,e===void 0?LL(n)?rR(n):kL(n):n.match(e)||[]}var sR="['’]",oR=RegExp(sR,"g");function R0(n){return function(e){return vL(iR(_L(e).replace(oR,"")),n,"")}}var aR=R0(function(n,e,t){return e=e.toLowerCase(),n+(t?yL(e):e)});const ul=aR;function lR(n,e,t){return n===n&&(t!==void 0&&(n=n<=t?n:t),e!==void 0&&(n=n>=e?n:e)),n}function en(n,e,t){return t===void 0&&(t=e,e=void 0),t!==void 0&&(t=yo(t),t=t===t?t:0),e!==void 0&&(e=yo(e),e=e===e?e:0),lR(yo(n),e,t)}function cR(){this.__data__=new Xn,this.size=0}function uR(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function hR(n){return this.__data__.get(n)}function fR(n){return this.__data__.has(n)}var dR=200;function gR(n,e){var t=this.__data__;if(t instanceof Xn){var r=t.__data__;if(!So||r.length<dR-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new Yn(r)}return t.set(n,e),this.size=t.size,this}function vn(n){var e=this.__data__=new Xn(n);this.size=e.size}vn.prototype.clear=cR,vn.prototype.delete=uR,vn.prototype.get=hR,vn.prototype.has=fR,vn.prototype.set=gR;function pR(n,e){return n&&vo(e,xo(e),n)}function mR(n,e){return n&&vo(e,es(e),n)}var j0=typeof ee=="object"&&ee&&!ee.nodeType&&ee,D0=j0&&typeof module=="object"&&module&&!module.nodeType&&module,yR=D0&&D0.exports===j0,B0=yR?mn.Buffer:void 0,$0=B0?B0.allocUnsafe:void 0;function z0(n,e){if(e)return n.slice();var t=n.length,r=$0?$0(t):new n.constructor(t);return n.copy(r),r}function vR(n,e){for(var t=-1,r=n==null?0:n.length,i=0,s=[];++t<r;){var o=n[t];e(o,t,n)&&(s[i++]=o)}return s}function F0(){return[]}var bR=Object.prototype,wR=bR.propertyIsEnumerable,q0=Object.getOwnPropertySymbols,xR=q0?function(n){return n==null?[]:(n=Object(n),vR(q0(n),function(e){return wR.call(n,e)}))}:F0;const th=xR;function CR(n,e){return vo(n,th(n),e)}var SR=Object.getOwnPropertySymbols,PR=SR?function(n){for(var e=[];n;)Ju(e,th(n)),n=Qu(n);return e}:F0;const V0=PR;function ER(n,e){return vo(n,V0(n),e)}function G0(n,e,t){var r=e(n);return Ct(n)?r:Ju(r,t(n))}function nh(n){return G0(n,xo,th)}function AR(n){return G0(n,es,V0)}var TR=pi(mn,"DataView");const rh=TR;var OR=pi(mn,"Promise");const ih=OR;var MR=pi(mn,"Set");const ns=MR;var H0="[object Map]",_R="[object Object]",U0="[object Promise]",W0="[object Set]",X0="[object WeakMap]",Y0="[object DataView]",NR=gi(rh),kR=gi(So),IR=gi(ih),LR=gi(ns),RR=gi(Gu),vi=Or;(rh&&vi(new rh(new ArrayBuffer(1)))!=Y0||So&&vi(new So)!=H0||ih&&vi(ih.resolve())!=U0||ns&&vi(new ns)!=W0||Gu&&vi(new Gu)!=X0)&&(vi=function(n){var e=Or(n),t=e==_R?n.constructor:void 0,r=t?gi(t):"";if(r)switch(r){case NR:return Y0;case kR:return H0;case IR:return U0;case LR:return W0;case RR:return X0}return e});const rs=vi;var jR=Object.prototype,DR=jR.hasOwnProperty;function BR(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&DR.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var $R=mn.Uint8Array;const hl=$R;function sh(n){var e=new n.constructor(n.byteLength);return new hl(e).set(new hl(n)),e}function zR(n,e){var t=e?sh(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}var FR=/\w*$/;function qR(n){var e=new n.constructor(n.source,FR.exec(n));return e.lastIndex=n.lastIndex,e}var K0=Zt?Zt.prototype:void 0,J0=K0?K0.valueOf:void 0;function VR(n){return J0?Object(J0.call(n)):{}}function Q0(n,e){var t=e?sh(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var GR="[object Boolean]",HR="[object Date]",UR="[object Map]",WR="[object Number]",XR="[object RegExp]",YR="[object Set]",KR="[object String]",JR="[object Symbol]",QR="[object ArrayBuffer]",ZR="[object DataView]",ej="[object Float32Array]",tj="[object Float64Array]",nj="[object Int8Array]",rj="[object Int16Array]",ij="[object Int32Array]",sj="[object Uint8Array]",oj="[object Uint8ClampedArray]",aj="[object Uint16Array]",lj="[object Uint32Array]";function cj(n,e,t){var r=n.constructor;switch(e){case QR:return sh(n);case GR:case HR:return new r(+n);case ZR:return zR(n,t);case ej:case tj:case nj:case rj:case ij:case sj:case oj:case aj:case lj:return Q0(n,t);case UR:return new r;case WR:case KR:return new r(n);case XR:return qR(n);case YR:return new r;case JR:return VR(n)}}function Z0(n){return typeof n.constructor=="function"&&!rl(n)?$N(Qu(n)):{}}var uj="[object Map]";function hj(n){return yn(n)&&rs(n)==uj}var e1=Zi&&Zi.isMap,fj=e1?bo(e1):hj;const dj=fj;var gj="[object Set]";function pj(n){return yn(n)&&rs(n)==gj}var t1=Zi&&Zi.isSet,mj=t1?bo(t1):pj;const yj=mj;var vj=1,bj=2,wj=4,n1="[object Arguments]",xj="[object Array]",Cj="[object Boolean]",Sj="[object Date]",Pj="[object Error]",r1="[object Function]",Ej="[object GeneratorFunction]",Aj="[object Map]",Tj="[object Number]",i1="[object Object]",Oj="[object RegExp]",Mj="[object Set]",_j="[object String]",Nj="[object Symbol]",kj="[object WeakMap]",Ij="[object ArrayBuffer]",Lj="[object DataView]",Rj="[object Float32Array]",jj="[object Float64Array]",Dj="[object Int8Array]",Bj="[object Int16Array]",$j="[object Int32Array]",zj="[object Uint8Array]",Fj="[object Uint8ClampedArray]",qj="[object Uint16Array]",Vj="[object Uint32Array]",Ee={};Ee[n1]=Ee[xj]=Ee[Ij]=Ee[Lj]=Ee[Cj]=Ee[Sj]=Ee[Rj]=Ee[jj]=Ee[Dj]=Ee[Bj]=Ee[$j]=Ee[Aj]=Ee[Tj]=Ee[i1]=Ee[Oj]=Ee[Mj]=Ee[_j]=Ee[Nj]=Ee[zj]=Ee[Fj]=Ee[qj]=Ee[Vj]=!0,Ee[Pj]=Ee[r1]=Ee[kj]=!1;function Eo(n,e,t,r,i,s){var o,a=e&vj,l=e&bj,c=e&wj;if(t&&(o=i?t(n,r,i,s):t(n)),o!==void 0)return o;if(!Ze(n))return n;var u=Ct(n);if(u){if(o=BR(n),!a)return Ub(n,o)}else{var h=rs(n),f=h==r1||h==Ej;if(Qi(n))return z0(n,a);if(h==i1||h==n1||f&&!i){if(o=l||f?{}:Z0(n),!a)return l?ER(n,mR(o,n)):CR(n,pR(o,n))}else{if(!Ee[h])return i?n:{};o=cj(n,h,a)}}s||(s=new vn);var d=s.get(n);if(d)return d;s.set(n,o),yj(n)?n.forEach(function(b){o.add(Eo(b,e,t,b,n,s))}):dj(n)&&n.forEach(function(b,m){o.set(m,Eo(b,e,t,m,n,s))});var g=c?l?AR:nh:l?es:xo,p=u?void 0:g(n);return KN(p||n,function(b,m){p&&(m=b,b=n[m]),Xb(o,m,Eo(b,e,t,m,n,s))}),o}var Gj=4;function oh(n){return Eo(n,Gj)}var Hj=1,Uj=4;function He(n){return Eo(n,Hj|Uj)}var Wj="__lodash_hash_undefined__";function Xj(n){return this.__data__.set(n,Wj),this}function Yj(n){return this.__data__.has(n)}function is(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new Yn;++e<t;)this.add(n[e])}is.prototype.add=is.prototype.push=Xj,is.prototype.has=Yj;function Kj(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function ah(n,e){return n.has(e)}var Jj=1,Qj=2;function s1(n,e,t,r,i,s){var o=t&Jj,a=n.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=s.get(n),u=s.get(e);if(c&&u)return c==e&&u==n;var h=-1,f=!0,d=t&Qj?new is:void 0;for(s.set(n,e),s.set(e,n);++h<a;){var g=n[h],p=e[h];if(r)var b=o?r(p,g,h,e,n,s):r(g,p,h,n,e,s);if(b!==void 0){if(b)continue;f=!1;break}if(d){if(!Kj(e,function(m,y){if(!ah(d,y)&&(g===m||i(g,m,t,r,s)))return d.push(y)})){f=!1;break}}else if(!(g===p||i(g,p,t,r,s))){f=!1;break}}return s.delete(n),s.delete(e),f}function Zj(n){var e=-1,t=Array(n.size);return n.forEach(function(r,i){t[++e]=[i,r]}),t}function lh(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var eD=1,tD=2,nD="[object Boolean]",rD="[object Date]",iD="[object Error]",sD="[object Map]",oD="[object Number]",aD="[object RegExp]",lD="[object Set]",cD="[object String]",uD="[object Symbol]",hD="[object ArrayBuffer]",fD="[object DataView]",o1=Zt?Zt.prototype:void 0,ch=o1?o1.valueOf:void 0;function dD(n,e,t,r,i,s,o){switch(t){case fD:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case hD:return!(n.byteLength!=e.byteLength||!s(new hl(n),new hl(e)));case nD:case rD:case oD:return Yi(+n,+e);case iD:return n.name==e.name&&n.message==e.message;case aD:case cD:return n==e+"";case sD:var a=Zj;case lD:var l=r&eD;if(a||(a=lh),n.size!=e.size&&!l)return!1;var c=o.get(n);if(c)return c==e;r|=tD,o.set(n,e);var u=s1(a(n),a(e),r,i,s,o);return o.delete(n),u;case uD:if(ch)return ch.call(n)==ch.call(e)}return!1}var gD=1,pD=Object.prototype,mD=pD.hasOwnProperty;function yD(n,e,t,r,i,s){var o=t&gD,a=nh(n),l=a.length,c=nh(e),u=c.length;if(l!=u&&!o)return!1;for(var h=l;h--;){var f=a[h];if(!(o?f in e:mD.call(e,f)))return!1}var d=s.get(n),g=s.get(e);if(d&&g)return d==e&&g==n;var p=!0;s.set(n,e),s.set(e,n);for(var b=o;++h<l;){f=a[h];var m=n[f],y=e[f];if(r)var v=o?r(y,m,f,e,n,s):r(m,y,f,n,e,s);if(!(v===void 0?m===y||i(m,y,t,r,s):v)){p=!1;break}b||(b=f=="constructor")}if(p&&!b){var w=n.constructor,x=e.constructor;w!=x&&"constructor"in n&&"constructor"in e&&!(typeof w=="function"&&w instanceof w&&typeof x=="function"&&x instanceof x)&&(p=!1)}return s.delete(n),s.delete(e),p}var vD=1,a1="[object Arguments]",l1="[object Array]",fl="[object Object]",bD=Object.prototype,c1=bD.hasOwnProperty;function wD(n,e,t,r,i,s){var o=Ct(n),a=Ct(e),l=o?l1:rs(n),c=a?l1:rs(e);l=l==a1?fl:l,c=c==a1?fl:c;var u=l==fl,h=c==fl,f=l==c;if(f&&Qi(n)){if(!Qi(e))return!1;o=!0,u=!1}if(f&&!u)return s||(s=new vn),o||il(n)?s1(n,e,t,r,i,s):dD(n,e,l,t,r,i,s);if(!(t&vD)){var d=u&&c1.call(n,"__wrapped__"),g=h&&c1.call(e,"__wrapped__");if(d||g){var p=d?n.value():n,b=g?e.value():e;return s||(s=new vn),i(p,b,t,r,s)}}return f?(s||(s=new vn),yD(n,e,t,r,i,s)):!1}function dl(n,e,t,r,i){return n===e?!0:n==null||e==null||!yn(n)&&!yn(e)?n!==n&&e!==e:wD(n,e,t,r,dl,i)}var xD=1,CD=2;function SD(n,e,t,r){var i=t.length,s=i,o=!r;if(n==null)return!s;for(n=Object(n);i--;){var a=t[i];if(o&&a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++i<s;){a=t[i];var l=a[0],c=n[l],u=a[1];if(o&&a[2]){if(c===void 0&&!(l in n))return!1}else{var h=new vn;if(r)var f=r(c,u,l,n,e,h);if(!(f===void 0?dl(u,c,xD|CD,r,h):f))return!1}}return!0}function u1(n){return n===n&&!Ze(n)}function PD(n){for(var e=xo(n),t=e.length;t--;){var r=e[t],i=n[r];e[t]=[r,i,u1(i)]}return e}function h1(n,e){return function(t){return t==null?!1:t[n]===e&&(e!==void 0||n in Object(t))}}function ED(n){var e=PD(n);return e.length==1&&e[0][2]?h1(e[0][0],e[0][1]):function(t){return t===n||SD(t,n,e)}}function AD(n,e){return n!=null&&e in Object(n)}function f1(n,e,t){e=a0(e,n);for(var r=-1,i=e.length,s=!1;++r<i;){var o=al(e[r]);if(!(s=n!=null&&t(n,o)))break;n=n[o]}return s||++r!=i?s:(i=n==null?0:n.length,!!i&&Uu(i)&&Hu(o,i)&&(Ct(n)||Ji(n)))}function TD(n,e){return n!=null&&f1(n,e,AD)}var OD=1,MD=2;function _D(n,e){return Xu(n)&&u1(e)?h1(al(n),e):function(t){var r=DI(t,n);return r===void 0&&r===e?TD(t,n):dl(e,r,OD|MD)}}function ND(n){return function(e){return e==null?void 0:e[n]}}function kD(n){return function(e){return Ku(e,n)}}function ID(n){return Xu(n)?ND(al(n)):kD(n)}function uh(n){return typeof n=="function"?n:n==null?Xi:typeof n=="object"?Ct(n)?_D(n[0],n[1]):ED(n):ID(n)}function LD(n,e,t,r){for(var i=-1,s=n==null?0:n.length;++i<s;){var o=n[i];e(r,o,t(o),n)}return r}function RD(n){return function(e,t,r){for(var i=-1,s=Object(e),o=r(e),a=o.length;a--;){var l=o[n?a:++i];if(t(s[l],l,s)===!1)break}return e}}var jD=RD();const d1=jD;function DD(n,e){return n&&d1(n,e,xo)}function BD(n,e){return function(t,r){if(t==null)return t;if(!mi(t))return n(t,r);for(var i=t.length,s=e?i:-1,o=Object(t);(e?s--:++s<i)&&r(o[s],s,o)!==!1;);return t}}var $D=BD(DD);const g1=$D;function zD(n,e,t,r){return g1(n,function(i,s,o){e(r,i,t(i),o)}),r}function FD(n,e){return function(t,r){var i=Ct(t)?LD:zD,s=e?e():{};return i(t,n,uh(r),s)}}var qD=function(){return mn.Date.now()};const hh=qD;var VD="Expected a function",GD=Math.max,HD=Math.min;function fh(n,e,t){var r,i,s,o,a,l,c=0,u=!1,h=!1,f=!0;if(typeof n!="function")throw new TypeError(VD);e=yo(e)||0,Ze(t)&&(u=!!t.leading,h="maxWait"in t,s=h?GD(yo(t.maxWait)||0,e):s,f="trailing"in t?!!t.trailing:f);function d(C){var S=r,E=i;return r=i=void 0,c=C,o=n.apply(E,S),o}function g(C){return c=C,a=setTimeout(m,e),u?d(C):o}function p(C){var S=C-l,E=C-c,T=e-S;return h?HD(T,s-E):T}function b(C){var S=C-l,E=C-c;return l===void 0||S>=e||S<0||h&&E>=s}function m(){var C=hh();if(b(C))return y(C);a=setTimeout(m,p(C))}function y(C){return a=void 0,f&&r?d(C):(r=i=void 0,o)}function v(){a!==void 0&&clearTimeout(a),c=0,r=l=i=a=void 0}function w(){return a===void 0?o:y(hh())}function x(){var C=hh(),S=b(C);if(r=arguments,i=this,l=C,S){if(a===void 0)return g(l);if(h)return clearTimeout(a),a=setTimeout(m,e),d(l)}return a===void 0&&(a=setTimeout(m,e)),o}return x.cancel=v,x.flush=w,x}var p1=Object.prototype,UD=p1.hasOwnProperty,WD=Ki(function(n,e){n=Object(n);var t=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&nl(e[0],e[1],i)&&(r=1);++t<r;)for(var s=e[t],o=es(s),a=-1,l=o.length;++a<l;){var c=o[a],u=n[c];(u===void 0||Yi(u,p1[c])&&!UD.call(n,c))&&(n[c]=s[c])}return n});const XD=WD;function dh(n,e,t){(t!==void 0&&!Yi(n[e],t)||t===void 0&&!(e in n))&&tl(n,e,t)}function gl(n){return yn(n)&&mi(n)}function gh(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function YD(n){return vo(n,es(n))}function KD(n,e,t,r,i,s,o){var a=gh(n,t),l=gh(e,t),c=o.get(l);if(c){dh(n,t,c);return}var u=s?s(a,l,t+"",n,e,o):void 0,h=u===void 0;if(h){var f=Ct(l),d=!f&&Qi(l),g=!f&&!d&&il(l);u=l,f||d||g?Ct(a)?u=a:gl(a)?u=Ub(a):d?(h=!1,u=z0(l,!0)):g?(h=!1,u=Q0(l,!0)):u=[]:In(l)||Ji(l)?(u=a,Ji(a)?u=YD(a):(!Ze(a)||qu(a))&&(u=Z0(l))):h=!1}h&&(o.set(l,u),i(u,l,r,s,o),o.delete(l)),dh(n,t,u)}function pl(n,e,t,r,i){n!==e&&d1(e,function(s,o){if(i||(i=new vn),Ze(s))KD(n,e,o,t,pl,r,i);else{var a=r?r(gh(n,o),s,o+"",n,e,i):void 0;a===void 0&&(a=s),dh(n,o,a)}},es)}function m1(n,e,t,r,i,s){return Ze(n)&&Ze(e)&&(s.set(e,n),pl(n,e,void 0,m1,s),s.delete(e)),n}var JD=Kb(function(n,e,t,r){pl(n,e,t,r)});const QD=JD;var ZD=Ki(function(n){return n.push(void 0,m1),Hb(QD,void 0,n)});const y1=ZD;function v1(n,e,t){for(var r=-1,i=n==null?0:n.length;++r<i;)if(t(e,n[r]))return!0;return!1}var eB=200;function tB(n,e,t,r){var i=-1,s=Wb,o=!0,a=n.length,l=[],c=e.length;if(!a)return l;t&&(e=mo(e,bo(t))),r?(s=v1,o=!1):e.length>=eB&&(s=ah,o=!1,e=new is(e));e:for(;++i<a;){var u=n[i],h=t==null?u:t(u);if(u=r||u!==0?u:0,o&&h===h){for(var f=c;f--;)if(e[f]===h)continue e;l.push(u)}else s(e,h,r)||l.push(u)}return l}var nB=Ki(function(n,e){return gl(n)?tB(n,ll(e,1,gl,!0)):[]});const rB=nB;function iB(n,e){var t=-1,r=mi(n)?Array(n.length):[];return g1(n,function(i,s,o){r[++t]=e(i,s,o)}),r}var sB=Object.prototype,oB=sB.hasOwnProperty,aB=FD(function(n,e,t){oB.call(n,t)?n[t].push(e):tl(n,t,[e])});const b1=aB;function lB(n,e){return n>e}var cB=Object.prototype,uB=cB.hasOwnProperty;function hB(n,e){return n!=null&&uB.call(n,e)}function ml(n,e){return n!=null&&f1(n,e,hB)}var fB="[object Map]",dB="[object Set]",gB=Object.prototype,pB=gB.hasOwnProperty;function w1(n){if(n==null)return!0;if(mi(n)&&(Ct(n)||typeof n=="string"||typeof n.splice=="function"||Qi(n)||il(n)||Ji(n)))return!n.length;var e=rs(n);if(e==fB||e==dB)return!n.size;if(rl(n))return!o0(n).length;for(var t in n)if(pB.call(n,t))return!1;return!0}function Kn(n,e){return dl(n,e)}var mB="[object Number]";function x1(n){return typeof n=="number"||yn(n)&&Or(n)==mB}var yB=y0("toLowerCase");const vB=yB;function bB(n,e,t){for(var r=-1,i=n.length;++r<i;){var s=n[r],o=e(s);if(o!=null&&(a===void 0?o===o&&!kn(o):t(o,a)))var a=o,l=s}return l}function wB(n){return n&&n.length?bB(n,Xi,lB):void 0}var xB=Kb(function(n,e,t){pl(n,e,t)});const De=xB;function CB(n,e){var t=n.length;for(n.sort(e);t--;)n[t]=n[t].value;return n}function SB(n,e){if(n!==e){var t=n!==void 0,r=n===null,i=n===n,s=kn(n),o=e!==void 0,a=e===null,l=e===e,c=kn(e);if(!a&&!c&&!s&&n>e||s&&o&&l&&!a&&!c||r&&o&&l||!t&&l||!i)return 1;if(!r&&!s&&!c&&n<e||c&&t&&i&&!r&&!s||a&&t&&i||!o&&i||!l)return-1}return 0}function PB(n,e,t){for(var r=-1,i=n.criteria,s=e.criteria,o=i.length,a=t.length;++r<o;){var l=SB(i[r],s[r]);if(l){if(r>=a)return l;var c=t[r];return l*(c=="desc"?-1:1)}}return n.index-e.index}function EB(n,e,t){e.length?e=mo(e,function(s){return Ct(s)?function(o){return Ku(o,s.length===1?s[0]:s)}:s}):e=[Xi];var r=-1;e=mo(e,bo(uh));var i=iB(n,function(s,o,a){var l=mo(e,function(c){return c(s)});return{criteria:l,index:++r,value:s}});return CB(i,function(s,o){return PB(s,o,t)})}var AB=Ki(function(n,e){if(n==null)return[];var t=e.length;return t>1&&nl(n,e[0],e[1])?e=[]:t>2&&nl(e[0],e[1],e[2])&&(e=[e[0]]),EB(n,ll(e,1),[])});const C1=AB;var TB=4294967295,OB=TB-1,MB=Math.floor,_B=Math.min;function S1(n,e,t,r){var i=0,s=n==null?0:n.length;if(s===0)return 0;e=t(e);for(var o=e!==e,a=e===null,l=kn(e),c=e===void 0;i<s;){var u=MB((i+s)/2),h=t(n[u]),f=h!==void 0,d=h===null,g=h===h,p=kn(h);if(o)var b=r||g;else c?b=g&&(r||f):a?b=g&&f&&(r||!d):l?b=g&&f&&!d&&(r||!p):d||p?b=!1:b=r?h<=e:h<e;b?i=u+1:s=u}return _B(s,OB)}var NB=4294967295,kB=NB>>>1;function IB(n,e,t){var r=0,i=n==null?r:n.length;if(typeof e=="number"&&e===e&&i<=kB){for(;r<i;){var s=r+i>>>1,o=n[s];o!==null&&!kn(o)&&(t?o<=e:o<e)?r=s+1:i=s}return i}return S1(n,e,Xi,t)}function LB(n,e){return IB(n,e)}function RB(n,e,t){return S1(n,e,uh(t))}var jB=R0(function(n,e,t){return n+(t?" ":"")+cl(e)});const DB=jB;var BB="Expected a function";function $B(n,e,t){var r=!0,i=!0;if(typeof n!="function")throw new TypeError(BB);return Ze(t)&&(r="leading"in t?!!t.leading:r,i="trailing"in t?!!t.trailing:i),fh(n,e,{leading:r,maxWait:e,trailing:i})}var zB=1/0,FB=ns&&1/lh(new ns([,-0]))[1]==zB?function(n){return new ns(n)}:zN;const qB=FB;var VB=200;function P1(n,e,t){var r=-1,i=Wb,s=n.length,o=!0,a=[],l=a;if(t)o=!1,i=v1;else if(s>=VB){var c=e?null:qB(n);if(c)return lh(c);o=!1,i=ah,l=new is}else l=e?[]:a;e:for(;++r<s;){var u=n[r],h=e?e(u):u;if(u=t||u!==0?u:0,o&&h===h){for(var f=l.length;f--;)if(l[f]===h)continue e;e&&l.push(h),a.push(u)}else i(l,h,t)||(l!==a&&l.push(h),a.push(u))}return a}var GB=Ki(function(n){return P1(ll(n,1,gl,!0))});const E1=GB;function A1(n){return n&&n.length?P1(n):[]}function T1(n,e,t){if(t)switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2]);case 4:return n.call(e,t[0],t[1],t[2],t[3]);case 5:return n.call(e,t[0],t[1],t[2],t[3],t[4]);case 6:return n.call(e,t[0],t[1],t[2],t[3],t[4],t[5]);default:return n.apply(e,t)}return n.call(e)}function J(n,e,...t){return T1(n,e,t)}function HB(n){return typeof n=="object"&&n.then&&typeof n.then=="function"}function O1(n){return n!=null&&(n instanceof Promise||HB(n))}function M1(...n){const e=[];if(n.forEach(r=>{Array.isArray(r)?e.push(...r):e.push(r)}),e.some(r=>O1(r))){const r=e.map(i=>O1(i)?i:Promise.resolve(i!==!1));return Promise.all(r).then(i=>i.reduce((s,o)=>o!==!1&&s,!0))}return e.every(r=>r!==!1)}function ph(n,e){const t=[];for(let r=0;r<n.length;r+=2){const i=n[r],s=n[r+1],o=Array.isArray(e)?e:[e],a=T1(i,s,o);t.push(a)}return M1(t)}class UB{constructor(){this.listeners={}}on(e,t,r){return t==null?this:(this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t,r),this)}once(e,t,r){const i=(...s)=>(this.off(e,i),ph([t,r],s));return this.on(e,i,this)}off(e,t,r){if(!(e||t||r))return this.listeners={},this;const i=this.listeners;return(e?[e]:Object.keys(i)).forEach(o=>{const a=i[o];if(a){if(!(t||r)){delete i[o];return}for(let l=a.length-2;l>=0;l-=2)t&&a[l]!==t||r&&a[l+1]!==r||a.splice(l,2)}}),this}trigger(e,...t){let r=!0;if(e!=="*"){const s=this.listeners[e];s!=null&&(r=ph([...s],t))}const i=this.listeners["*"];return i!=null?M1([r,ph([...i],[e,...t])]):r}emit(e,...t){return this.trigger(e,...t)}}function WB(n,...e){e.forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(r=>{r!=="constructor"&&Object.defineProperty(n.prototype,r,Object.getOwnPropertyDescriptor(t.prototype,r))})})}const XB=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])};function YB(n,e){XB(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}let KB=class{};const JB=/^\s*class\s+/.test(`${KB}`)||/^\s*class\s*\{/.test(`${class{}}`);function mh(n,e){let t;return JB?t=class extends e{}:(t=function(){return e.apply(this,arguments)},YB(t,e)),Object.defineProperty(t,"name",{value:n}),t}function _1(n){return n==="__proto__"}function yh(n,e,t="/"){let r;const i=Array.isArray(e)?e:e.split(t);if(i.length)for(r=n;i.length;){const s=i.shift();if(Object(r)===r&&s&&s in r)r=r[s];else return}return r}function ss(n,e,t,r="/"){const i=Array.isArray(e)?e:e.split(r),s=i.pop();if(s&&!_1(s)){let o=n;i.forEach(a=>{_1(a)||(o[a]==null&&(o[a]={}),o=o[a])}),o[s]=t}return n}function N1(n,e,t="/"){const r=Array.isArray(e)?e.slice():e.split(t),i=r.pop();if(i)if(r.length>0){const s=yh(n,r);s&&delete s[i]}else delete n[i];return n}class St extends UB{}(function(n){n.dispose=Nn.dispose})(St||(St={})),WB(St,Nn);const k1=n=>{const e=Object.create(null);return t=>e[t]||(e[t]=n(t))},I1=k1(n=>n.replace(/\B([A-Z])/g,"-$1").toLowerCase()),vh=k1(n=>DB(ul(n)).replace(/ /g,""));function bh(n){let e=2166136261,t=!1,r=n;for(let i=0,s=r.length;i<s;i+=1){let o=r.charCodeAt(i);o>127&&!t&&(r=unescape(encodeURIComponent(r)),o=r.charCodeAt(i),t=!0),e^=o,e+=(e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24)}return e>>>0}function wh(){let n="";const e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";for(let t=0,r=e.length;t<r;t+=1){const i=e[t],s=Math.random()*16|0,o=i==="x"?s:i==="y"?s&3|8:i;n+=o.toString(16)}return n}function QB(n,e,t){const r=Math.min(2,Math.floor(n.length*.34));let i=Math.floor(n.length*.4)+1,s,o=!1;const a=n.toLowerCase();for(const l of e){const c=t(l);if(c!==void 0&&Math.abs(c.length-a.length)<=r){const u=c.toLowerCase();if(u===a){if(c===n)continue;return l}if(o||c.length<3)continue;const h=ZB(a,u,i-1);if(h===void 0)continue;h<3?(o=!0,s=l):(i=h,s=l)}}return s}function ZB(n,e,t){let r=new Array(e.length+1),i=new Array(e.length+1);const s=t+1;for(let a=0;a<=e.length;a+=1)r[a]=a;for(let a=1;a<=n.length;a+=1){const l=n.charCodeAt(a-1),c=a>t?a-t:1,u=e.length>t+a?t+a:e.length;i[0]=a;let h=a;for(let d=1;d<c;d+=1)i[d]=s;for(let d=c;d<=u;d+=1){const g=l===e.charCodeAt(d-1)?r[d-1]:Math.min(r[d]+1,i[d-1]+1,r[d-1]+2);i[d]=g,h=Math.min(h,g)}for(let d=u+1;d<=e.length;d+=1)i[d]=s;if(h>t)return;const f=r;r=i,i=f}const o=r[e.length];return o>t?void 0:o}function Jn(n){return typeof n=="string"&&n.slice(-1)==="%"}function Gt(n,e){if(n==null)return 0;let t;if(typeof n=="string"){if(t=parseFloat(n),Jn(n)&&(t/=100,Number.isFinite(t)))return t*e}else t=n;return Number.isFinite(t)?t>0&&t<1?t*e:t:0}function Ln(n){if(typeof n=="object"){let t=0,r=0,i=0,s=0;return n.vertical!=null&&Number.isFinite(n.vertical)&&(r=s=n.vertical),n.horizontal!=null&&Number.isFinite(n.horizontal)&&(i=t=n.horizontal),n.left!=null&&Number.isFinite(n.left)&&(t=n.left),n.top!=null&&Number.isFinite(n.top)&&(r=n.top),n.right!=null&&Number.isFinite(n.right)&&(i=n.right),n.bottom!=null&&Number.isFinite(n.bottom)&&(s=n.bottom),{top:r,right:i,bottom:s,left:t}}let e=0;return n!=null&&Number.isFinite(n)&&(e=n),{top:e,right:e,bottom:e,left:e}}let xh=!1,L1=!1,R1=!1,j1=!1,D1=!1,B1=!1,$1=!1,z1=!1,F1=!1,q1=!1,V1=!1,G1=!1,H1=!1,U1=!1,W1=!1,X1=!1;if(typeof navigator=="object"){const n=navigator.userAgent;xh=n.indexOf("Macintosh")>=0,L1=!!n.match(/(iPad|iPhone|iPod)/g),R1=n.indexOf("Windows")>=0,j1=n.indexOf("MSIE")>=0,D1=!!n.match(/Trident\/7\./),B1=!!n.match(/Edge\//),$1=n.indexOf("Mozilla/")>=0&&n.indexOf("MSIE")<0&&n.indexOf("Edge/")<0,F1=n.indexOf("Chrome/")>=0&&n.indexOf("Edge/")<0,q1=n.indexOf("Opera/")>=0||n.indexOf("OPR/")>=0,V1=n.indexOf("Firefox/")>=0,G1=n.indexOf("AppleWebKit/")>=0&&n.indexOf("Chrome/")<0&&n.indexOf("Edge/")<0,typeof document=="object"&&(X1=!document.createElementNS||`${document.createElementNS("http://www.w3.org/2000/svg","foreignObject")}`!="[object SVGForeignObjectElement]"||n.indexOf("Opera/")>=0)}if(typeof window=="object"&&(z1=window.chrome!=null&&window.chrome.app!=null&&window.chrome.app.runtime!=null,U1=window.PointerEvent!=null&&!xh),typeof document=="object"){H1="ontouchstart"in document.documentElement;try{const n=Object.defineProperty({},"passive",{get(){W1=!0}}),e=document.createElement("div");e.addEventListener&&e.addEventListener("click",()=>{},n)}catch(n){}}var tn;(function(n){n.IS_MAC=xh,n.IS_IOS=L1,n.IS_WINDOWS=R1,n.IS_IE=j1,n.IS_IE11=D1,n.IS_EDGE=B1,n.IS_NETSCAPE=$1,n.IS_CHROME_APP=z1,n.IS_CHROME=F1,n.IS_OPERA=q1,n.IS_FIREFOX=V1,n.IS_SAFARI=G1,n.SUPPORT_TOUCH=H1,n.SUPPORT_POINTER=U1,n.SUPPORT_PASSIVE=W1,n.NO_FOREIGNOBJECT=X1,n.SUPPORT_FOREIGNOBJECT=!n.NO_FOREIGNOBJECT})(tn||(tn={})),function(n){function e(){const s=window.module;return s!=null&&s.hot!=null&&s.hot.status!=null?s.hot.status():"unkonwn"}n.getHMRStatus=e;function t(){return e()==="apply"}n.isApplyingHMR=t;const r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};function i(s){const o=document.createElement(r[s]||"div"),a=`on${s}`;let l=a in o;return l||(o.setAttribute(a,"return;"),l=typeof o[a]=="function"),l}n.isEventSupported=i}(tn||(tn={}));const Ch=/[\t\r\n\f]/g,Sh=/\S+/g,os=n=>` ${n} `;function as(n){return n&&n.getAttribute&&n.getAttribute("class")||""}function ls(n,e){if(n==null||e==null)return!1;const t=os(as(n)),r=os(e);return n.nodeType===1?t.replace(Ch," ").includes(r):!1}function Z(n,e){if(!(n==null||e==null)){if(typeof e=="function")return Z(n,e(as(n)));if(typeof e=="string"&&n.nodeType===1){const t=e.match(Sh)||[],r=os(as(n)).replace(Ch," ");let i=t.reduce((s,o)=>s.indexOf(os(o))<0?`${s}${o} `:s,r);i=i.trim(),r!==i&&n.setAttribute("class",i)}}}function yt(n,e){if(n!=null){if(typeof e=="function")return yt(n,e(as(n)));if((!e||typeof e=="string")&&n.nodeType===1){const t=(e||"").match(Sh)||[],r=os(as(n)).replace(Ch," ");let i=t.reduce((s,o)=>{const a=os(o);return s.indexOf(a)>-1?s.replace(a," "):s},r);i=e?i.trim():"",r!==i&&n.setAttribute("class",i)}}}function Y1(n,e,t){if(!(n==null||e==null)){if(t!=null&&typeof e=="string"){t?Z(n,e):yt(n,e);return}if(typeof e=="function")return Y1(n,e(as(n),t),t);typeof e=="string"&&(e.match(Sh)||[]).forEach(i=>{ls(n,i)?yt(n,i):Z(n,i)})}}let K1=0;function e$(){return K1+=1,`v${K1}`}function Ph(n){return(n.id==null||n.id==="")&&(n.id=e$()),n.id}function Mr(n){return n==null?!1:typeof n.getScreenCTM=="function"&&n instanceof SVGElement}const ut={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xml:"http://www.w3.org/XML/1998/namespace",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml"},J1="1.1";function Q1(n,e=document){return e.createElement(n)}function Eh(n,e=ut.xhtml,t=document){return t.createElementNS(e,n)}function Qn(n,e=document){return Eh(n,ut.svg,e)}function yl(n){if(n){const t=`<svg xmlns="${ut.svg}" xmlns:xlink="${ut.xlink}" version="${J1}">${n}</svg>`,{documentElement:r}=t$(t,{async:!1});return r}const e=document.createElementNS(ut.svg,"svg");return e.setAttributeNS(ut.xmlns,"xmlns:xlink",ut.xlink),e.setAttribute("version",J1),e}function t$(n,e={}){let t;try{const r=new DOMParser;if(e.async!=null){const i=r;i.async=e.async}t=r.parseFromString(n,e.mimeType||"text/xml")}catch(r){t=void 0}if(!t||t.getElementsByTagName("parsererror").length)throw new Error(`Invalid XML: ${n}`);return t}function n$(n,e=!0){const t=n.nodeName;return e?t.toLowerCase():t.toUpperCase()}function Ah(n){let e=0,t=n.previousSibling;for(;t;)t.nodeType===1&&(e+=1),t=t.previousSibling;return e}function r$(n,e){return n.querySelectorAll(e)}function i$(n,e){return n.querySelector(e)}function Z1(n,e,t){const r=n.ownerSVGElement;let i=n.parentNode;for(;i&&i!==t&&i!==r;){if(ls(i,e))return i;i=i.parentNode}return null}function ew(n,e){const t=e&&e.parentNode;return n===t||!!(t&&t.nodeType===1&&n.compareDocumentPosition(t)&16)}function Zn(n){n&&(Array.isArray(n)?n:[n]).forEach(t=>{t.parentNode&&t.parentNode.removeChild(t)})}function Ao(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function Rn(n,e){(Array.isArray(e)?e:[e]).forEach(r=>{r!=null&&n.appendChild(r)})}function tw(n,e){const t=n.firstChild;return t?To(t,e):Rn(n,e)}function To(n,e){const t=n.parentNode;t&&(Array.isArray(e)?e:[e]).forEach(i=>{i!=null&&t.insertBefore(i,n)})}function s$(n,e){const t=n.parentNode;t&&(Array.isArray(e)?e:[e]).forEach(i=>{i!=null&&t.insertBefore(i,n.nextSibling)})}function _r(n,e){e!=null&&e.appendChild(n)}function o$(n){return!!n&&n.nodeType===1}function nw(n){try{return n instanceof HTMLElement}catch(e){return typeof n=="object"&&n.nodeType===1&&typeof n.style=="object"&&typeof n.ownerDocument=="object"}}function a$(n,e){const t=[];let r=n.firstChild;for(;r;r=r.nextSibling)r.nodeType===1&&(!e||ls(r,e))&&t.push(r);return t}const rw=["viewBox","attributeName","attributeType","repeatCount","textLength","lengthAdjust"];function l$(n,e){return n.getAttribute(e)}function Th(n,e){const t=sw(e);t.ns?n.hasAttributeNS(t.ns,t.local)&&n.removeAttributeNS(t.ns,t.local):n.hasAttribute(e)&&n.removeAttribute(e)}function Oh(n,e,t){if(t==null)return Th(n,e);const r=sw(e);r.ns&&typeof t=="string"?n.setAttributeNS(r.ns,e,t):e==="id"?n.id=`${t}`:n.setAttribute(e,`${t}`)}function iw(n,e){Object.keys(e).forEach(t=>{Oh(n,t,e[t])})}function de(n,e,t){if(e==null){const r=n.attributes,i={};for(let s=0;s<r.length;s+=1)i[r[s].name]=r[s].value;return i}if(typeof e=="string"&&t===void 0)return n.getAttribute(e);typeof e=="object"?iw(n,e):Oh(n,e,t)}function sw(n){if(n.indexOf(":")!==-1){const e=n.split(":");return{ns:ut[e[0]],local:e[1]}}return{ns:null,local:n}}function Oo(n){const e={};return Object.keys(n).forEach(t=>{const r=rw.includes(t)?t:I1(t);e[r]=n[t]}),e}function vl(n){const e={};return n.split(";").forEach(r=>{const i=r.trim();if(i){const s=i.split("=");s.length&&(e[s[0].trim()]=s[1]?s[1].trim():"")}}),e}function Mh(n,e){return Object.keys(e).forEach(t=>{if(t==="class")n[t]=n[t]?`${n[t]} ${e[t]}`:e[t];else if(t==="style"){const r=typeof n[t]=="object",i=typeof e[t]=="object";let s,o;r&&i?(s=n[t],o=e[t]):r?(s=n[t],o=vl(e[t])):i?(s=vl(n[t]),o=e[t]):(s=vl(n[t]),o=vl(e[t])),n[t]=Mh(s,o)}else n[t]=e[t]}),n}function c$(n,e,t={}){const r=t.offset||0,i=[],s=[];let o,a,l=null;for(let c=0;c<n.length;c+=1){o=s[c]=n[c];for(let u=0,h=e.length;u<h;u+=1){const f=e[u],d=f.start+r,g=f.end+r;c>=d&&c<g&&(typeof o=="string"?o=s[c]={t:n[c],attrs:f.attrs}:o.attrs=Mh(Mh({},o.attrs),f.attrs),t.includeAnnotationIndices&&(o.annotations==null&&(o.annotations=[]),o.annotations.push(u)))}a=s[c-1],a?Ze(o)&&Ze(a)?(l=l,JSON.stringify(o.attrs)===JSON.stringify(a.attrs)?l.t+=o.t:(i.push(l),l=o)):Ze(o)||Ze(a)?(l=l,i.push(l),l=o):l=(l||"")+o:l=o}return l!=null&&i.push(l),i}function u$(n){return n.replace(/ /g," ")}var ow;(function(n){function e(c){const u="data:";return c.substr(0,u.length)===u}n.isDataUrl=e;function t(c,u){if(!c||e(c)){setTimeout(()=>u(null,c));return}const h=()=>{u(new Error(`Failed to load image: ${c}`))},f=window.FileReader?g=>{if(g.status===200){const p=new FileReader;p.onload=b=>{const m=b.target.result;u(null,m)},p.onerror=h,p.readAsDataURL(g.response)}else h()}:g=>{const p=b=>{const y=[];for(let v=0;v<b.length;v+=32768)y.push(String.fromCharCode.apply(null,b.subarray(v,v+32768)));return y.join("")};if(g.status===200){let b=c.split(".").pop()||"png";b==="svg"&&(b="svg+xml");const m=`data:image/${b};base64,`,y=new Uint8Array(g.response),v=m+btoa(p(y));u(null,v)}else h()},d=new XMLHttpRequest;d.responseType=window.FileReader?"blob":"arraybuffer",d.open("GET",c,!0),d.addEventListener("error",h),d.addEventListener("load",()=>f(d)),d.send()}n.imageToDataUri=t;function r(c){let u=c.replace(/\s/g,"");u=decodeURIComponent(u);const h=u.indexOf(","),f=u.slice(0,h),d=f.split(":")[1].split(";")[0],g=u.slice(h+1);let p;f.indexOf("base64")>=0?p=atob(g):p=unescape(encodeURIComponent(g));const b=new Uint8Array(p.length);for(let m=0;m<p.length;m+=1)b[m]=p.charCodeAt(m);return new Blob([b],{type:d})}n.dataUriToBlob=r;function i(c,u){const h=window.navigator.msSaveBlob;if(h)h(c,u);else{const f=window.URL.createObjectURL(c),d=document.createElement("a");d.href=f,d.download=u,document.body.appendChild(d),d.click(),document.body.removeChild(d),window.URL.revokeObjectURL(f)}}n.downloadBlob=i;function s(c,u){const h=r(c);i(h,u)}n.downloadDataUri=s;function o(c){const u=c.match(/<svg[^>]*viewBox\s*=\s*(["']?)(.+?)\1[^>]*>/i);return u&&u[2]?u[2].replace(/\s+/," ").split(" "):null}function a(c){const u=parseFloat(c);return Number.isNaN(u)?null:u}function l(c,u={}){let h=null;const f=v=>(h==null&&(h=o(c)),h!=null?a(h[v]):null),d=v=>{const w=c.match(v);return w&&w[2]?a(w[2]):null};let g=u.width;if(g==null&&(g=d(/<svg[^>]*width\s*=\s*(["']?)(.+?)\1[^>]*>/i)),g==null&&(g=f(2)),g==null)throw new Error("Can not parse width from svg string");let p=u.height;if(p==null&&(p=d(/<svg[^>]*height\s*=\s*(["']?)(.+?)\1[^>]*>/i)),p==null&&(p=f(3)),p==null)throw new Error("Can not parse height from svg string");return`data:image/svg+xml,${encodeURIComponent(c).replace(/'/g,"%27").replace(/"/g,"%22")}`}n.svgToDataUrl=l})(ow||(ow={}));let bi;const h$={px(n){return n},mm(n){return bi*n},cm(n){return bi*n*10},in(n){return bi*n*25.4},pt(n){return bi*(25.4*n/72)},pc(n){return bi*(25.4*n/6)}};var aw;(function(n){function e(r,i,s){const o=document.createElement("div"),a=o.style;a.display="inline-block",a.position="absolute",a.left="-15000px",a.top="-15000px",a.width=r+(s||"px"),a.height=i+(s||"px"),document.body.appendChild(o);const l=o.getBoundingClientRect(),c={width:l.width||0,height:l.height||0};return document.body.removeChild(o),c}n.measure=e;function t(r,i){bi==null&&(bi=e("1","1","mm").width);const s=i?h$[i]:null;return s?s(r):r}n.toPx=t})(aw||(aw={}));const f$=/-(.)/g;function d$(n){return n.replace(f$,(e,t)=>t.toUpperCase())}const _h={},lw=["webkit","ms","moz","o"],cw=document?document.createElement("div").style:{};function g$(n){for(let e=0;e<lw.length;e+=1){const t=lw[e]+n;if(t in cw)return t}return null}function p$(n){const e=d$(n);if(_h[e]==null){const t=e.charAt(0).toUpperCase()+e.slice(1);_h[e]=e in cw?e:g$(t)}return _h[e]}function uw(n,e){const t=n.ownerDocument&&n.ownerDocument.defaultView&&n.ownerDocument.defaultView.opener?n.ownerDocument.defaultView.getComputedStyle(n,null):window.getComputedStyle(n,null);return t&&e?t.getPropertyValue(e)||t[e]:t}const m$={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function y$(n){return/^--/.test(n)}function bl(n,e,t){const r=window.getComputedStyle(n,null);return t?r.getPropertyValue(e)||void 0:r[e]||n.style[e]}function wl(n,e){return parseInt(bl(n,e),10)||0}function v$(n,e){return!m$[n]&&typeof e=="number"?`${e}px`:e}function ve(n,e,t){if(typeof e=="string"){const r=y$(e);if(r||(e=p$(e)),t===void 0)return bl(n,e,r);r||(t=v$(e,t));const i=n.style;r?i.setProperty(e,t):i[e]=t;return}for(const r in e)ve(n,r,e[r])}const xl=new WeakMap;function hw(n,e){const t=ul(e),r=xl.get(n);if(r)return r[t]}function b$(n,e,t){const r=ul(e),i=xl.get(n);i?i[r]=t:xl.set(n,{[r]:t})}function wi(n,e,t){if(!e){const r={};return Object.keys(xl).forEach(i=>{r[i]=hw(n,i)}),r}if(typeof e=="string"){if(t===void 0)return hw(n,e);b$(n,e,t);return}for(const r in e)wi(n,r,e[r])}const w$={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};function Nh(n,e,t){if(e){if(typeof e=="string"){if(e=w$[e]||e,arguments.length<3)return n[e];n[e]=t;return}for(const r in e)Nh(n,r,e[r])}}class te{get[Symbol.toStringTag](){return te.toStringTag}get type(){return this.node.nodeName}get id(){return this.node.id}set id(e){this.node.id=e}constructor(e,t,r){if(!e)throw new TypeError("Invalid element to create vector");let i;if(te.isVector(e))i=e.node;else if(typeof e=="string")if(e.toLowerCase()==="svg")i=yl();else if(e[0]==="<"){const s=yl(e);i=document.importNode(s.firstChild,!0)}else i=document.createElementNS(ut.svg,e);else i=e;this.node=i,t&&this.setAttributes(t),r&&this.append(r)}transform(e,t){return e==null?hs(this.node):(hs(this.node,e,t),this)}translate(e,t=0,r={}){return e==null?ww(this.node):(ww(this.node,e,t,r),this)}rotate(e,t,r,i={}){return e==null?Lh(this.node):(Lh(this.node,e,t,r,i),this)}scale(e,t){return e==null?Rh(this.node):(Rh(this.node,e,t),this)}getTransformToElement(e){const t=te.toNode(e);return No(this.node,t)}removeAttribute(e){return Th(this.node,e),this}getAttribute(e){return l$(this.node,e)}setAttribute(e,t){return Oh(this.node,e,t),this}setAttributes(e){return iw(this.node,e),this}attr(e,t){return e==null?de(this.node):typeof e=="string"&&t===void 0?de(this.node,e):(typeof e=="object"?de(this.node,e):de(this.node,e,t),this)}svg(){return this.node instanceof SVGSVGElement?this:te.create(this.node.ownerSVGElement)}defs(){const e=this.svg()||this,t=e.node.getElementsByTagName("defs")[0];return t?te.create(t):te.create("defs").appendTo(e)}text(e,t={}){return gw(this.node,e,t),this}tagName(){return n$(this.node)}clone(){return te.create(this.node.cloneNode(!0))}remove(){return Zn(this.node),this}empty(){return Ao(this.node),this}append(e){return Rn(this.node,te.toNodes(e)),this}appendTo(e){return _r(this.node,te.isVector(e)?e.node:e),this}prepend(e){return tw(this.node,te.toNodes(e)),this}before(e){return To(this.node,te.toNodes(e)),this}replace(e){return this.node.parentNode&&this.node.parentNode.replaceChild(te.toNode(e),this.node),te.create(e)}first(){return this.node.firstChild?te.create(this.node.firstChild):null}last(){return this.node.lastChild?te.create(this.node.lastChild):null}get(e){const t=this.node.childNodes[e];return t?te.create(t):null}indexOf(e){return Array.prototype.slice.call(this.node.childNodes).indexOf(te.toNode(e))}find(e){const t=[],r=r$(this.node,e);if(r)for(let i=0,s=r.length;i<s;i+=1)t.push(te.create(r[i]));return t}findOne(e){const t=i$(this.node,e);return t?te.create(t):null}findParentByClass(e,t){const r=Z1(this.node,e,t);return r?te.create(r):null}matches(e){const t=this.node;this.node.matches;const r=t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector||null;return r&&r.call(t,e)}contains(e){return ew(this.node,te.isVector(e)?e.node:e)}wrap(e){const t=te.create(e),r=this.node.parentNode;return r!=null&&r.insertBefore(t.node,this.node),t.append(this)}parent(e){let t=this;if(t.node.parentNode==null)return null;if(t=te.create(t.node.parentNode),e==null)return t;do if(typeof e=="string"?t.matches(e):t instanceof e)return t;while(t=te.create(t.node.parentNode));return t}children(){const e=this.node.childNodes,t=[];for(let r=0;r<e.length;r+=1)e[r].nodeType===1&&t.push(te.create(e[r]));return t}eachChild(e,t){const r=this.children();for(let i=0,s=r.length;i<s;i+=1)e.call(r[i],r[i],i,r),t&&r[i].eachChild(e,t);return this}index(){return Ah(this.node)}hasClass(e){return ls(this.node,e)}addClass(e){return Z(this.node,e),this}removeClass(e){return yt(this.node,e),this}toggleClass(e,t){return Y1(this.node,e,t),this}toLocalPoint(e,t){return F$(this.node,e,t)}sample(e=1){return this.node instanceof SVGPathElement?E$(this.node,e):[]}toPath(){return te.create(k$(this.node))}toPathData(){return vw(this.node)}}(function(n){n.toStringTag=`X6.${n.name}`;function e(o){if(o==null)return!1;if(o instanceof n)return!0;const a=o[Symbol.toStringTag],l=o;return(a==null||a===n.toStringTag)&&l.node instanceof SVGElement&&typeof l.sample=="function"&&typeof l.toPath=="function"}n.isVector=e;function t(o,a,l){return new n(o,a,l)}n.create=t;function r(o){if(o[0]==="<"){const a=yl(o),l=[];for(let c=0,u=a.childNodes.length;c<u;c+=1){const h=a.childNodes[c];l.push(t(document.importNode(h,!0)))}return l}return[t(o)]}n.createVectors=r;function i(o){return e(o)?o.node:o}n.toNode=i;function s(o){return Array.isArray(o)?o.map(a=>i(a)):[i(o)]}n.toNodes=s})(te||(te={}));const fw=document.createElement("canvas").getContext("2d");function x$(n,e){const t=te.create(e),r=te.create("textPath"),i=n.d;if(i&&n["xlink:href"]===void 0){const s=te.create("path").attr("d",i).appendTo(t.defs());r.attr("xlink:href",`#${s.id}`)}return typeof n=="object"&&r.attr(n),r.node}function C$(n,e,t){const r=t.eol,i=t.baseSize,s=t.lineHeight;let o=0,a;const l={},c=e.length-1;for(let u=0;u<=c;u+=1){let h=e[u],f=null;if(typeof h=="object"){const d=h.attrs,g=te.create("tspan",d);a=g.node;let p=h.t;r&&u===c&&(p+=r),a.textContent=p;const b=d.class;b&&g.addClass(b),t.includeAnnotationIndices&&g.attr("annotations",h.annotations.join(",")),f=parseFloat(d["font-size"]),f===void 0&&(f=i),f&&f>o&&(o=f)}else r&&u===c&&(h+=r),a=document.createTextNode(h||" "),i&&i>o&&(o=i);n.appendChild(a)}return o&&(l.maxFontSize=o),s?l.lineHeight=s:o&&(l.lineHeight=o*1.2),l}const dw=/em$/;function Cl(n,e){const t=parseFloat(n);return dw.test(n)?t*e:t}function S$(n,e,t,r){if(!Array.isArray(e))return 0;const i=e.length;if(!i)return 0;let s=e[0];const o=Cl(s.maxFontSize,t)||t;let a=0;const l=Cl(r,t);for(let h=1;h<i;h+=1){s=e[h];const f=Cl(s.lineHeight,t)||l;a+=f}const c=Cl(s.maxFontSize,t)||t;let u;switch(n){case"middle":u=o/2-.15*c-a/2;break;case"bottom":u=-(.25*c)-a;break;case"top":default:u=.8*o;break}return u}function gw(n,e,t={}){e=u$(e);const r=t.eol;let i=t.textPath;const s=t.textVerticalAnchor,o=s==="middle"||s==="bottom"||s==="top";let a=t.x;a===void 0&&(a=n.getAttribute("x")||0);const l=t.includeAnnotationIndices;let c=t.annotations;c&&!Array.isArray(c)&&(c=[c]);const u=t.lineHeight,h=u==="auto",f=h?"1.5em":u||"1em";let d=!0;const g=n.childNodes;if(g.length===1){const T=g[0];T&&T.tagName.toUpperCase()==="TITLE"&&(d=!1)}d&&Ao(n),de(n,{"xml:space":"preserve",display:e||t.displayEmpty?null:"none"});const p=de(n,"font-size");let b=parseFloat(p);b||(b=16,(o||c)&&!p&&de(n,"font-size",`${b}`));let m;i?(typeof i=="string"&&(i={d:i}),m=x$(i,n)):m=document.createDocumentFragment();let y,v=0,w;const x=e.split(`
2
2
  `),C=[],S=x.length-1;for(let T=0;T<=S;T+=1){y=f;let O="v-line";const A=Qn("tspan");let k,F=x[T];if(F)if(c){const Y=c$(F,c,{offset:-v,includeAnnotationIndices:l});k=C$(A,Y,{eol:T!==S&&r,baseSize:b,lineHeight:h?null:f,includeAnnotationIndices:l});const M=k.lineHeight;M&&h&&T!==0&&(y=M),T===0&&(w=k.maxFontSize*.8)}else r&&T!==S&&(F+=r),A.textContent=F;else{A.textContent="-",O+=" v-empty-line";const Y=A.style;Y.fillOpacity=0,Y.strokeOpacity=0,c&&(k={})}k&&C.push(k),T>0&&A.setAttribute("dy",y),(T>0||i)&&A.setAttribute("x",a),A.className.baseVal=O,m.appendChild(A),v+=F.length+1}if(o)if(c)y=S$(s,C,b,f);else if(s==="top")y="0.8em";else{let T;switch(S>0?(T=parseFloat(f)||1,T*=S,dw.test(f)||(T/=b)):T=0,s){case"middle":y=`${.3-T/2}em`;break;case"bottom":y=`${-T-.3}em`;break}}else s===0?y="0em":s?y=s:(y=0,n.getAttribute("y")==null&&n.setAttribute("y",`${w||"0.8em"}`));m.firstChild.setAttribute("dy",y),n.appendChild(m)}function Mo(n,e={}){if(!n)return{width:0};const t=[],r=e["font-size"]?`${parseFloat(e["font-size"])}px`:"14px";return t.push(e["font-style"]||"normal"),t.push(e["font-variant"]||"normal"),t.push(e["font-weight"]||400),t.push(r),t.push(e["font-family"]||"sans-serif"),fw.font=t.join(" "),fw.measureText(n)}function pw(n,e,t,r={}){if(e>=t)return[n,""];const i=n.length,s={};let o=Math.round(e/t*i-1);for(o<0&&(o=0);o>=0&&o<i;){const a=n.slice(0,o),l=s[a]||Mo(a,r).width,c=n.slice(0,o+1),u=s[c]||Mo(c,r).width;if(s[a]=l,s[c]=u,l>e)o-=1;else if(u<=e)o+=1;else break}return[n.slice(0,o),n.slice(o)]}function P$(n,e,t={},r={}){const i=e.width,s=e.height,o=r.eol||`
3
3
  `,{width:a}=Mo(n,t);if(a<i)return n;const l=[],c=t.fontSize||14,u=t.lineHeight?parseFloat(t.lineHeight):Math.ceil(c*1.4),h=Math.floor(s/u);let f=n,d=a,g=r.ellipsis,p=0;g&&(typeof g!="string"&&(g="…"),p=Mo(g,t).width);for(let b=0;b<h;b+=1)if(d>i)if(b===h-1){const[y]=pw(f,i-p,d,t);l.push(g?`${y}${g}`:y)}else{const[y,v]=pw(f,i,d,t);l.push(y),f=v,d=Mo(f,t).width}else{l.push(f);break}return l.join(o)}const kh=.551784;function vt(n,e,t=NaN){const r=n.getAttribute(e);if(r==null)return t;const i=parseFloat(r);return Number.isNaN(i)?t:i}function E$(n,e=1){const t=n.getTotalLength(),r=[];let i=0,s;for(;i<t;)s=n.getPointAtLength(i),r.push({distance:i,x:s.x,y:s.y}),i+=e;return r}function A$(n){return["M",vt(n,"x1"),vt(n,"y1"),"L",vt(n,"x2"),vt(n,"y2")].join(" ")}function T$(n){const e=Sl(n);return e.length===0?null:`${mw(e)} Z`}function O$(n){const e=Sl(n);return e.length===0?null:mw(e)}function mw(n){return`M ${n.map(t=>`${t.x} ${t.y}`).join(" L")}`}function Sl(n){const e=[],t=n.points;if(t)for(let r=0,i=t.numberOfItems;r<i;r+=1)e.push(t.getItem(r));return e}function M$(n){const e=vt(n,"cx",0),t=vt(n,"cy",0),r=vt(n,"r"),i=r*kh;return["M",e,t-r,"C",e+i,t-r,e+r,t-i,e+r,t,"C",e+r,t+i,e+i,t+r,e,t+r,"C",e-i,t+r,e-r,t+i,e-r,t,"C",e-r,t-i,e-i,t-r,e,t-r,"Z"].join(" ")}function _$(n){const e=vt(n,"cx",0),t=vt(n,"cy",0),r=vt(n,"rx"),i=vt(n,"ry")||r,s=r*kh,o=i*kh;return["M",e,t-i,"C",e+s,t-i,e+r,t-o,e+r,t,"C",e+r,t+o,e+s,t+i,e,t+i,"C",e-s,t+i,e-r,t+o,e-r,t,"C",e-r,t-o,e-s,t-i,e,t-i,"Z"].join(" ")}function N$(n){return yw({x:vt(n,"x",0),y:vt(n,"y",0),width:vt(n,"width",0),height:vt(n,"height",0),rx:vt(n,"rx",0),ry:vt(n,"ry",0)})}function yw(n){let e;const t=n.x,r=n.y,i=n.width,s=n.height,o=Math.min(n.rx||n["top-rx"]||0,i/2),a=Math.min(n.rx||n["bottom-rx"]||0,i/2),l=Math.min(n.ry||n["top-ry"]||0,s/2),c=Math.min(n.ry||n["bottom-ry"]||0,s/2);return o||a||l||c?e=["M",t,r+l,"v",s-l-c,"a",a,c,0,0,0,a,c,"h",i-2*a,"a",a,c,0,0,0,a,-c,"v",-(s-c-l),"a",o,l,0,0,0,-o,-l,"h",-(i-2*o),"a",o,l,0,0,0,-o,l,"Z"]:e=["M",t,r,"H",t+i,"V",r+s,"H",t,"V",r,"Z"],e.join(" ")}function k$(n){const e=Qn("path");de(e,de(n));const t=vw(n);return t&&e.setAttribute("d",t),e}function vw(n){const e=n.tagName.toLowerCase();switch(e){case"path":return n.getAttribute("d");case"line":return A$(n);case"polygon":return T$(n);case"polyline":return O$(n);case"ellipse":return _$(n);case"circle":return M$(n);case"rect":return N$(n)}throw new Error(`"${e}" cannot be converted to svg path element.`)}const Pl=Qn("svg"),I$=/(\w+)\(([^,)]+),?([^)]+)?\)/gi,bw=/[ ,]+/,L$=/^(\w+)\((.*)\)/;function R$(n,e){const t=Pl.createSVGPoint();return t.x=n,t.y=e,t}function ht(n){const e=Pl.createSVGMatrix();if(n!=null){const t=n,r=e;for(const i in t)r[i]=t[i]}return e}function _o(n){return n!=null?(n instanceof DOMMatrix||(n=ht(n)),Pl.createSVGTransformFromMatrix(n)):Pl.createSVGTransform()}function cs(n){let e=ht();const t=n!=null&&n.match(I$);if(!t)return e;for(let r=0,i=t.length;r<i;r+=1){const o=t[r].match(L$);if(o){let a,l,c,u,h,f=ht();const d=o[2].split(bw);switch(o[1].toLowerCase()){case"scale":a=parseFloat(d[0]),l=d[1]===void 0?a:parseFloat(d[1]),f=f.scaleNonUniform(a,l);break;case"translate":c=parseFloat(d[0]),u=parseFloat(d[1]),f=f.translate(c,u);break;case"rotate":h=parseFloat(d[0]),c=parseFloat(d[1])||0,u=parseFloat(d[2])||0,c!==0||u!==0?f=f.translate(c,u).rotate(h).translate(-c,-u):f=f.rotate(h);break;case"skewx":h=parseFloat(d[0]),f=f.skewX(h);break;case"skewy":h=parseFloat(d[0]),f=f.skewY(h);break;case"matrix":f.a=parseFloat(d[0]),f.b=parseFloat(d[1]),f.c=parseFloat(d[2]),f.d=parseFloat(d[3]),f.e=parseFloat(d[4]),f.f=parseFloat(d[5]);break;default:continue}e=e.multiply(f)}}return e}function us(n){const e=n||{},t=e.a!=null?e.a:1,r=e.b!=null?e.b:0,i=e.c!=null?e.c:0,s=e.d!=null?e.d:1,o=e.e!=null?e.e:0,a=e.f!=null?e.f:0;return`matrix(${t},${r},${i},${s},${o},${a})`}function El(n){let e,t,r;if(n){const s=bw;if(n.trim().indexOf("matrix")>=0){const o=cs(n),a=j$(o);e=[a.translateX,a.translateY],t=[a.rotation],r=[a.scaleX,a.scaleY];const l=[];(e[0]!==0||e[1]!==0)&&l.push(`translate(${e.join(",")})`),(r[0]!==1||r[1]!==1)&&l.push(`scale(${r.join(",")})`),t[0]!==0&&l.push(`rotate(${t[0]})`),n=l.join(" ")}else{const o=n.match(/translate\((.*?)\)/);o&&(e=o[1].split(s));const a=n.match(/rotate\((.*?)\)/);a&&(t=a[1].split(s));const l=n.match(/scale\((.*?)\)/);l&&(r=l[1].split(s))}}const i=r&&r[0]?parseFloat(r[0]):1;return{raw:n||"",translation:{tx:e&&e[0]?parseInt(e[0],10):0,ty:e&&e[1]?parseInt(e[1],10):0},rotation:{angle:t&&t[0]?parseInt(t[0],10):0,cx:t&&t[1]?parseInt(t[1],10):void 0,cy:t&&t[2]?parseInt(t[2],10):void 0},scale:{sx:i,sy:r&&r[1]?parseFloat(r[1]):i}}}function Ih(n,e){const t=e.x*n.a+e.y*n.c+0,r=e.x*n.b+e.y*n.d+0;return{x:t,y:r}}function j$(n){const e=Ih(n,{x:0,y:1}),t=Ih(n,{x:1,y:0}),r=180/Math.PI*Math.atan2(e.y,e.x)-90,i=180/Math.PI*Math.atan2(t.y,t.x);return{skewX:r,skewY:i,translateX:n.e,translateY:n.f,scaleX:Math.sqrt(n.a*n.a+n.b*n.b),scaleY:Math.sqrt(n.c*n.c+n.d*n.d),rotation:r}}function D$(n){let e,t,r,i;return n?(e=n.a==null?1:n.a,i=n.d==null?1:n.d,t=n.b,r=n.c):e=i=1,{sx:t?Math.sqrt(e*e+t*t):e,sy:r?Math.sqrt(r*r+i*i):i}}function B$(n){let e={x:0,y:1};n&&(e=Ih(n,e));const t=180*Math.atan2(e.y,e.x)/Math.PI%360-90;return{angle:t%360+(t<0?360:0)}}function $$(n){return{tx:n&&n.e||0,ty:n&&n.f||0}}function hs(n,e,t={}){if(e==null)return cs(de(n,"transform"));if(t.absolute){n.setAttribute("transform",us(e));return}const r=n.transform,i=_o(e);r.baseVal.appendItem(i)}function ww(n,e,t=0,r={}){let i=de(n,"transform");const s=El(i);if(e==null)return s.translation;i=s.raw,i=i.replace(/translate\([^)]*\)/g,"").trim();const o=r.absolute?e:s.translation.tx+e,a=r.absolute?t:s.translation.ty+t,l=`translate(${o},${a})`;n.setAttribute("transform",`${l} ${i}`.trim())}function Lh(n,e,t,r,i={}){let s=de(n,"transform");const o=El(s);if(e==null)return o.rotation;s=o.raw,s=s.replace(/rotate\([^)]*\)/g,"").trim(),e%=360;const a=i.absolute?e:o.rotation.angle+e,l=t!=null&&r!=null?`,${t},${r}`:"",c=`rotate(${a}${l})`;n.setAttribute("transform",`${s} ${c}`.trim())}function Rh(n,e,t){let r=de(n,"transform");const i=El(r);if(e==null)return i.scale;t=t==null?e:t,r=i.raw,r=r.replace(/scale\([^)]*\)/g,"").trim();const s=`scale(${e},${t})`;n.setAttribute("transform",`${r} ${s}`.trim())}function No(n,e){if(Mr(e)&&Mr(n)){const t=e.getScreenCTM(),r=n.getScreenCTM();if(t&&r)return t.inverse().multiply(r)}return ht()}function z$(n,e){let t=ht();if(Mr(e)&&Mr(n)){let r=n;const i=[];for(;r&&r!==e;){const s=r.getAttribute("transform")||null,o=cs(s);i.push(o),r=r.parentNode}i.reverse().forEach(s=>{t=t.multiply(s)})}return t}function F$(n,e,t){const r=n instanceof SVGSVGElement?n:n.ownerSVGElement,i=r.createSVGPoint();i.x=e,i.y=t;try{const s=r.getScreenCTM(),o=i.matrixTransform(s.inverse()),a=No(n,r).inverse();return o.matrixTransform(a)}catch(s){return i}}var nn;(function(n){const e={};function t(s){return e[s]||{}}n.get=t;function r(s,o){e[s]=o}n.register=r;function i(s){delete e[s]}n.unregister=i})(nn||(nn={}));var xi;(function(n){const e=new WeakMap;function t(s){return e.has(s)||e.set(s,{events:Object.create(null)}),e.get(s)}n.ensure=t;function r(s){return e.get(s)}n.get=r;function i(s){return e.delete(s)}n.remove=i})(xi||(xi={}));var oe;(function(n){n.returnTrue=()=>!0,n.returnFalse=()=>!1;function e(i){i.stopPropagation()}n.stopPropagationCallback=e;function t(i,s,o){i.addEventListener!=null&&i.addEventListener(s,o)}n.addEventListener=t;function r(i,s,o){i.removeEventListener!=null&&i.removeEventListener(s,o)}n.removeEventListener=r})(oe||(oe={})),function(n){const e=/[^\x20\t\r\n\f]+/g,t=/^([^.]*)(?:\.(.+)|)/;function r(a){return(a||"").match(e)||[""]}n.splitType=r;function i(a){const l=t.exec(a)||[];return{originType:l[1]?l[1].trim():l[1],namespaces:l[2]?l[2].split(".").map(c=>c.trim()).sort():[]}}n.normalizeType=i;function s(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType}n.isValidTarget=s;function o(a,l){if(l){const c=a;return c.querySelector!=null&&c.querySelector(l)!=null}return!0}n.isValidSelector=o}(oe||(oe={})),function(n){let e=0;const t=new WeakMap;function r(a){return t.has(a)||(t.set(a,e),e+=1),t.get(a)}n.ensureHandlerId=r;function i(a){return t.get(a)}n.getHandlerId=i;function s(a){return t.delete(a)}n.removeHandlerId=s;function o(a,l){return t.set(a,l)}n.setHandlerId=o}(oe||(oe={})),function(n){function e(t,r){const i=[],s=xi.get(t),o=s&&s.events&&s.events[r.type],a=o&&o.handlers||[],l=o?o.delegateCount:0;if(l>0&&!(r.type==="click"&&typeof r.button=="number"&&r.button>=1)){for(let c=r.target;c!==t;c=c.parentNode||t)if(c.nodeType===1&&!(r.type==="click"&&c.disabled===!0)){const u=[],h={};for(let f=0;f<l;f+=1){const d=a[f],g=d.selector;if(g!=null&&h[g]==null){const p=t,b=[];p.querySelectorAll(g).forEach(m=>{b.push(m)}),h[g]=b.includes(c)}h[g]&&u.push(d)}u.length&&i.push({elem:c,handlers:u})}}return l<a.length&&i.push({elem:t,handlers:a.slice(l)}),i}n.getHandlerQueue=e}(oe||(oe={})),function(n){function e(t){return t!=null&&t===t.window}n.isWindow=e}(oe||(oe={})),function(n){function e(t,r){const i=t.nodeType===9?t.documentElement:t,s=r&&r.parentNode;return t===s||!!(s&&s.nodeType===1&&(i.contains?i.contains(s):t.compareDocumentPosition&&t.compareDocumentPosition(s)&16))}n.contains=e}(oe||(oe={}));class jn{constructor(e,t){this.isDefaultPrevented=oe.returnFalse,this.isPropagationStopped=oe.returnFalse,this.isImmediatePropagationStopped=oe.returnFalse,this.isSimulated=!1,this.preventDefault=()=>{const r=this.originalEvent;this.isDefaultPrevented=oe.returnTrue,r&&!this.isSimulated&&r.preventDefault()},this.stopPropagation=()=>{const r=this.originalEvent;this.isPropagationStopped=oe.returnTrue,r&&!this.isSimulated&&r.stopPropagation()},this.stopImmediatePropagation=()=>{const r=this.originalEvent;this.isImmediatePropagationStopped=oe.returnTrue,r&&!this.isSimulated&&r.stopImmediatePropagation(),this.stopPropagation()},typeof e=="string"?this.type=e:e.type&&(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?oe.returnTrue:oe.returnFalse,this.target=e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget,this.timeStamp=e.timeStamp),t&&Object.assign(this,t),this.timeStamp||(this.timeStamp=Date.now())}}(function(n){function e(t){return t instanceof n?t:new n(t)}n.create=e})(jn||(jn={})),function(n){function e(t,r){Object.defineProperty(n.prototype,t,{enumerable:!0,configurable:!0,get:typeof r=="function"?function(){if(this.originalEvent)return r(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set(i){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:i})}})}n.addProperty=e}(jn||(jn={})),function(n){const e={bubbles:!0,cancelable:!0,eventPhase:!0,detail:!0,view:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pageX:!0,pageY:!0,screenX:!0,screenY:!0,toElement:!0,pointerId:!0,pointerType:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,touches:!0,changedTouches:!0,targetTouches:!0,which:!0,altKey:!0,ctrlKey:!0,metaKey:!0,shiftKey:!0};Object.keys(e).forEach(t=>n.addProperty(t,e[t]))}(jn||(jn={})),function(n){nn.register("load",{noBubble:!0})}(),function(n){nn.register("beforeunload",{postDispatch(e,t){t.result!==void 0&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}})}(),function(n){nn.register("mouseenter",{delegateType:"mouseover",bindType:"mouseover",handle(e,t){let r;const i=t.relatedTarget,s=t.handleObj;return(!i||i!==e&&!oe.contains(e,i))&&(t.type=s.originType,r=s.handler.call(e,t),t.type="mouseover"),r}}),nn.register("mouseleave",{delegateType:"mouseout",bindType:"mouseout",handle(e,t){let r;const i=t.relatedTarget,s=t.handleObj;return(!i||i!==e&&!oe.contains(e,i))&&(t.type=s.originType,r=s.handler.call(e,t),t.type="mouseout"),r}})}();var q$=globalThis&&globalThis.__rest||function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t},ko;(function(n){let e;function t(o,a,l,c,u){if(!oe.isValidTarget(o))return;let h;if(typeof l!="function"){const{handler:p,selector:b}=l,m=q$(l,["handler","selector"]);l=p,u=b,h=m}const f=xi.ensure(o);let d=f.handler;d==null&&(d=f.handler=function(p,...b){return e!==p.type?i(o,p,...b):void 0});const g=oe.ensureHandlerId(l);oe.splitType(a).forEach(p=>{const{originType:b,namespaces:m}=oe.normalizeType(p);if(!b)return;let y=b,v=nn.get(y);y=(u?v.delegateType:v.bindType)||y,v=nn.get(y);const w=Object.assign({type:y,originType:b,data:c,selector:u,guid:g,handler:l,namespace:m.join(".")},h),x=f.events;let C=x[y];C||(C=x[y]={handlers:[],delegateCount:0},(!v.setup||v.setup(o,c,m,d)===!1)&&oe.addEventListener(o,y,d)),v.add&&(oe.removeHandlerId(w.handler),v.add(o,w),oe.setHandlerId(w.handler,g)),u?(C.handlers.splice(C.delegateCount,0,w),C.delegateCount+=1):C.handlers.push(w)})}n.on=t;function r(o,a,l,c,u){const h=xi.get(o);if(!h)return;const f=h.events;f&&(oe.splitType(a).forEach(d=>{const{originType:g,namespaces:p}=oe.normalizeType(d);if(!g){Object.keys(f).forEach(x=>{r(o,x+d,l,c,!0)});return}let b=g;const m=nn.get(b);b=(c?m.delegateType:m.bindType)||b;const y=f[b]||{},v=p.length>0?new RegExp(`(^|\\.)${p.join("\\.(?:.*\\.|)")}(\\.|$)`):null,w=y.handlers.length;for(let x=y.handlers.length-1;x>=0;x-=1){const C=y.handlers[x];(u||g===C.originType)&&(!l||oe.getHandlerId(l)===C.guid)&&(v==null||C.namespace&&v.test(C.namespace))&&(c==null||c===C.selector||c==="**"&&C.selector)&&(y.handlers.splice(x,1),C.selector&&(y.delegateCount-=1),m.remove&&m.remove(o,C))}w&&y.handlers.length===0&&((!m.teardown||m.teardown(o,p,h.handler)===!1)&&oe.removeEventListener(o,b,h.handler),delete f[b])}),Object.keys(f).length===0&&xi.remove(o))}n.off=r;function i(o,a,...l){const c=jn.create(a);c.delegateTarget=o;const u=nn.get(c.type);if(u.preDispatch&&u.preDispatch(o,c)===!1)return;const h=oe.getHandlerQueue(o,c);for(let f=0,d=h.length;f<d&&!c.isPropagationStopped();f+=1){const g=h[f];c.currentTarget=g.elem;for(let p=0,b=g.handlers.length;p<b&&!c.isImmediatePropagationStopped();p+=1){const m=g.handlers[p];if(c.rnamespace==null||m.namespace&&c.rnamespace.test(m.namespace)){c.handleObj=m,c.data=m.data;const y=nn.get(m.originType).handle,v=y?y(g.elem,c,...l):m.handler.call(g.elem,c,...l);v!==void 0&&(c.result=v,v===!1&&(c.preventDefault(),c.stopPropagation()))}}}return u.postDispatch&&u.postDispatch(o,c),c.result}n.dispatch=i;function s(o,a,l,c){let u=o,h=typeof o=="string"?o:o.type,f=typeof o=="string"||u.namespace==null?[]:u.namespace.split(".");const d=l;if(d.nodeType===3||d.nodeType===8)return;h.indexOf(".")>-1&&(f=h.split("."),h=f.shift(),f.sort());const g=h.indexOf(":")<0&&`on${h}`;u=o instanceof jn?o:new jn(h,typeof o=="object"?o:null),u.namespace=f.join("."),u.rnamespace=u.namespace?new RegExp(`(^|\\.)${f.join("\\.(?:.*\\.|)")}(\\.|$)`):null,u.result=void 0,u.target||(u.target=d);const p=[u];Array.isArray(a)?p.push(...a):p.push(a);const b=nn.get(h);if(!c&&b.trigger&&b.trigger(d,u,a)===!1)return;let m;const y=[d];if(!c&&!b.noBubble&&!oe.isWindow(d)){m=b.delegateType||h;let w=d,x=d.parentNode;for(;x!=null;)y.push(x),w=x,x=x.parentNode;const C=d.ownerDocument||document;if(w===C){const S=w.defaultView||w.parentWindow||window;y.push(S)}}let v=d;for(let w=0,x=y.length;w<x&&!u.isPropagationStopped();w+=1){const C=y[w];v=C,u.type=w>1?m:b.bindType||h;const S=xi.get(C);S&&S.events[u.type]&&S.handler&&S.handler.call(C,...p);const E=g&&C[g]||null;E&&oe.isValidTarget(C)&&(u.result=E.call(C,...p),u.result===!1&&u.preventDefault())}if(u.type=h,!c&&!u.isDefaultPrevented()){const w=b.preventDefault;if((w==null||w(y.pop(),u,a)===!1)&&oe.isValidTarget(d)&&g&&typeof d[h]=="function"&&!oe.isWindow(d)){const x=d[g];x&&(d[g]=null),e=h,u.isPropagationStopped()&&v.addEventListener(h,oe.stopPropagationCallback),d[h](),u.isPropagationStopped()&&v.removeEventListener(h,oe.stopPropagationCallback),e=void 0,x&&(d[g]=x)}}return u.result}n.trigger=s})(ko||(ko={}));var Ae;(function(n){function e(s,o,a,l,c){return Io.on(s,o,a,l,c),s}n.on=e;function t(s,o,a,l,c){return Io.on(s,o,a,l,c,!0),s}n.once=t;function r(s,o,a,l){return Io.off(s,o,a,l),s}n.off=r;function i(s,o,a,l){return ko.trigger(o,a,s,l),s}n.trigger=i})(Ae||(Ae={}));var Io;(function(n){function e(r,i,s,o,a,l){if(typeof i=="object"){typeof s!="string"&&(o=o||s,s=void 0),Object.keys(i).forEach(c=>e(r,c,s,o,i[c],l));return}if(o==null&&a==null?(a=s,o=s=void 0):a==null&&(typeof s=="string"?(a=o,o=void 0):(a=o,o=s,s=void 0)),a===!1)a=oe.returnFalse;else if(!a)return;if(l){const c=a;a=function(u,...h){return n.off(r,u),c.call(this,u,...h)},oe.setHandlerId(a,oe.ensureHandlerId(c))}ko.on(r,i,a,o,s)}n.on=e;function t(r,i,s,o){const a=i;if(a&&a.preventDefault!=null&&a.handleObj!=null){const l=a.handleObj;t(a.delegateTarget,l.namespace?`${l.originType}.${l.namespace}`:l.originType,l.selector,l.handler);return}if(typeof i=="object"){const l=i;Object.keys(l).forEach(c=>t(r,c,s,l[c]));return}(s===!1||typeof s=="function")&&(o=s,s=void 0),o===!1&&(o=oe.returnFalse),ko.off(r,i,o,s)}n.off=t})(Io||(Io={}));class xw{constructor(e,t,r){this.animationFrameId=0,this.deltaX=0,this.deltaY=0,this.eventName=tn.isEventSupported("wheel")?"wheel":"mousewheel",this.target=e,this.onWheelCallback=t,this.onWheelGuard=r,this.onWheel=this.onWheel.bind(this),this.didWheel=this.didWheel.bind(this)}enable(){this.target.addEventListener(this.eventName,this.onWheel,{passive:!1})}disable(){this.target.removeEventListener(this.eventName,this.onWheel)}onWheel(e){if(this.onWheelGuard!=null&&!this.onWheelGuard(e))return;this.deltaX+=e.deltaX,this.deltaY+=e.deltaY,e.preventDefault();let t;(this.deltaX!==0||this.deltaY!==0)&&(e.stopPropagation(),t=!0),t===!0&&this.animationFrameId===0&&(this.animationFrameId=requestAnimationFrame(()=>{this.didWheel(e)}))}didWheel(e){this.animationFrameId=0,this.onWheelCallback(e,this.deltaX,this.deltaY),this.deltaX=0,this.deltaY=0}}function Lo(n){const e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView;return{top:e.top+t.pageYOffset,left:e.left+t.pageXOffset}}function V$(n){return n.getBoundingClientRect().width}function G$(n){return n.getBoundingClientRect().height}function H$(n){const e=bl(n,"position")==="fixed";let t;if(e){const r=n.getBoundingClientRect();t={left:r.left,top:r.top}}else t=Lo(n);if(!e){const r=n.ownerDocument;let i=n.offsetParent||r.documentElement;for(;(i===r.body||i===r.documentElement)&&bl(i,"position")==="static";)i=i.parentNode;if(i!==n&&o$(i)){const s=Lo(i);t.top-=s.top+wl(i,"borderTopWidth"),t.left-=s.left+wl(i,"borderLeftWidth")}}return{top:t.top-wl(n,"marginTop"),left:t.left-wl(n,"marginLeft")}}function Cw(n,e=60){let t=null;return(...r)=>{t&&clearTimeout(t),t=window.setTimeout(()=>{n.apply(this,r)},e)}}function U$(n){let e=null,t=[];const r=()=>{if(getComputedStyle(n).position==="static"){const c=n.style;c.position="relative"}const l=document.createElement("object");return l.onload=()=>{l.contentDocument.defaultView.addEventListener("resize",i),i()},l.style.display="block",l.style.position="absolute",l.style.top="0",l.style.left="0",l.style.height="100%",l.style.width="100%",l.style.overflow="hidden",l.style.pointerEvents="none",l.style.zIndex="-1",l.style.opacity="0",l.setAttribute("tabindex","-1"),l.type="text/html",n.appendChild(l),l.data="about:blank",l},i=Cw(()=>{t.forEach(l=>l(n))}),s=l=>{e||(e=r()),t.indexOf(l)===-1&&t.push(l)},o=()=>{e&&e.parentNode&&(e.contentDocument&&e.contentDocument.defaultView.removeEventListener("resize",i),e.parentNode.removeChild(e),e=null,t=[])};return{element:n,bind:s,destroy:o,unbind:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),t.length===0&&e&&o()}}}function W$(n){let e=null,t=[];const r=Cw(()=>{t.forEach(l=>{l(n)})}),i=()=>{const l=new ResizeObserver(r);return l.observe(n),r(),l},s=l=>{e||(e=i()),t.indexOf(l)===-1&&t.push(l)},o=()=>{e&&(e.disconnect(),t=[],e=null)};return{element:n,bind:s,destroy:o,unbind:l=>{const c=t.indexOf(l);c!==-1&&t.splice(c,1),t.length===0&&e&&o()}}}const X$=typeof ResizeObserver!="undefined"?W$:U$;var Al;(function(n){const e=new WeakMap;function t(i){let s=e.get(i);return s||(s=X$(i),e.set(i,s),s)}function r(i){i.destroy(),e.delete(i.element)}n.bind=(i,s)=>{const o=t(i);return o.bind(s),()=>o.unbind(s)},n.clear=i=>{const s=t(i);r(s)}})(Al||(Al={}));class Ro{constructor(e={}){this.comparator=e.comparator||Ro.defaultComparator,this.index={},this.data=e.data||[],this.heapify()}isEmpty(){return this.data.length===0}insert(e,t,r){const i={priority:e,value:t},s=this.data.length;return r&&(i.id=r,this.index[r]=s),this.data.push(i),this.bubbleUp(s),this}peek(){return this.data[0]?this.data[0].value:null}peekPriority(){return this.data[0]?this.data[0].priority:null}updatePriority(e,t){const r=this.index[e];if(typeof r=="undefined")throw new Error(`Node with id '${e}' was not found in the heap.`);const i=this.data,s=i[r].priority,o=this.comparator(t,s);o<0?(i[r].priority=t,this.bubbleUp(r)):o>0&&(i[r].priority=t,this.bubbleDown(r))}remove(){const e=this.data,t=e[0],r=e.pop();return t.id&&delete this.index[t.id],e.length>0&&(e[0]=r,r.id&&(this.index[r.id]=0),this.bubbleDown(0)),t?t.value:null}heapify(){for(let e=0;e<this.data.length;e+=1)this.bubbleUp(e)}bubbleUp(e){const t=this.data;let r,i,s=e;for(;s>0&&(i=s-1>>>1,this.comparator(t[s].priority,t[i].priority)<0);){r=t[i],t[i]=t[s];let o=t[s].id;o!=null&&(this.index[o]=i),t[s]=r,o=t[s].id,o!=null&&(this.index[o]=s),s=i}}bubbleDown(e){const t=this.data,r=t.length-1;let i=e;for(;;){const s=(i<<1)+1,o=s+1;let a=i;if(s<=r&&this.comparator(t[s].priority,t[a].priority)<0&&(a=s),o<=r&&this.comparator(t[o].priority,t[a].priority)<0&&(a=o),a!==i){const l=t[a];t[a]=t[i];let c=t[i].id;c!=null&&(this.index[c]=a),t[i]=l,c=t[i].id,c!=null&&(this.index[c]=i),i=a}else break}}}(function(n){n.defaultComparator=(e,t)=>e-t})(Ro||(Ro={}));var jh;(function(n){function e(t,r,i=(s,o)=>1){const s={},o={},a={},l=new Ro;for(s[r]=0,Object.keys(t).forEach(c=>{c!==r&&(s[c]=1/0),l.insert(s[c],c,c)});!l.isEmpty();){const c=l.remove();a[c]=!0;const u=t[c]||[];for(let h=0;h<u.length;h+=1){const f=u[h];if(!a[f]){const d=s[c]+i(c,f);d<s[f]&&(s[f]=d,o[f]=c,l.updatePriority(f,d))}}}return o}n.run=e})(jh||(jh={}));class er{constructor(e,t,r,i){if(e==null)return this.set(255,255,255,1);if(typeof e=="number")return this.set(e,t,r,i);if(typeof e=="string")return er.fromString(e)||this;if(Array.isArray(e))return this.set(e);this.set(e.r,e.g,e.b,e.a==null?1:e.a)}blend(e,t,r){this.set(e.r+(t.r-e.r)*r,e.g+(t.g-e.g)*r,e.b+(t.b-e.b)*r,e.a+(t.a-e.a)*r)}lighten(e){const t=er.lighten(this.toArray(),e);this.r=t[0],this.g=t[1],this.b=t[2],this.a=t[3]}darken(e){this.lighten(-e)}set(e,t,r,i){const s=Array.isArray(e)?e[0]:e,o=Array.isArray(e)?e[1]:t,a=Array.isArray(e)?e[2]:r,l=Array.isArray(e)?e[3]:i;return this.r=Math.round(en(s,0,255)),this.g=Math.round(en(o,0,255)),this.b=Math.round(en(a,0,255)),this.a=l==null?1:en(l,0,1),this}toHex(){return`#${["r","g","b"].map(t=>{const r=this[t].toString(16);return r.length<2?`0${r}`:r}).join("")}`}toRGBA(){return this.toArray()}toHSLA(){return er.rgba2hsla(this.r,this.g,this.b,this.a)}toCSS(e){const t=`${this.r},${this.g},${this.b},`;return e?`rgb(${t})`:`rgba(${t},${this.a})`}toGrey(){return er.makeGrey(Math.round((this.r+this.g+this.b)/3),this.a)}toArray(){return[this.r,this.g,this.b,this.a]}toString(){return this.toCSS()}}(function(n){function e(v){return new n(v)}n.fromArray=e;function t(v){return new n([...g(v),1])}n.fromHex=t;function r(v){const w=v.toLowerCase().match(/^rgba?\(([\s.,0-9]+)\)/);if(w){const x=w[1].split(/\s*,\s*/).map(C=>parseInt(C,10));return new n(x)}return null}n.fromRGBA=r;function i(v,w,x){x<0&&++x,x>1&&--x;const C=6*x;return C<1?v+(w-v)*C:2*x<1?w:3*x<2?v+(w-v)*(2/3-x)*6:v}function s(v){const w=v.toLowerCase().match(/^hsla?\(([\s.,0-9]+)\)/);if(w){const x=w[2].split(/\s*,\s*/),C=(parseFloat(x[0])%360+360)%360/360,S=parseFloat(x[1])/100,E=parseFloat(x[2])/100,T=x[3]==null?1:parseInt(x[3],10);return new n(c(C,S,E,T))}return null}n.fromHSLA=s;function o(v){if(v.startsWith("#"))return t(v);if(v.startsWith("rgb"))return r(v);const w=n.named[v];return w?t(w):s(v)}n.fromString=o;function a(v,w){return n.fromArray([v,v,v,w])}n.makeGrey=a;function l(v,w,x,C){const S=Array.isArray(v)?v[0]:v,E=Array.isArray(v)?v[1]:w,T=Array.isArray(v)?v[2]:x,O=Array.isArray(v)?v[3]:C,A=Math.max(S,E,T),k=Math.min(S,E,T),F=(A+k)/2;let Y=0,M=0;if(k!==A){const I=A-k;switch(M=F>.5?I/(2-A-k):I/(A+k),A){case S:Y=(E-T)/I+(E<T?6:0);break;case E:Y=(T-S)/I+2;break;case T:Y=(S-E)/I+4;break}Y/=6}return[Y,M,F,O==null?1:O]}n.rgba2hsla=l;function c(v,w,x,C){const S=Array.isArray(v)?v[0]:v,E=Array.isArray(v)?v[1]:w,T=Array.isArray(v)?v[2]:x,O=Array.isArray(v)?v[3]:C,A=T<=.5?T*(E+1):T+E-T*E,k=2*T-A;return[i(k,A,S+1/3)*256,i(k,A,S)*256,i(k,A,S-1/3)*256,O==null?1:O]}n.hsla2rgba=c;function u(v){return new n(Math.round(Math.random()*256),Math.round(Math.random()*256),Math.round(Math.random()*256),v?void 0:parseFloat(Math.random().toFixed(2)))}n.random=u;function h(){const v="0123456789ABCDEF";let w="#";for(let x=0;x<6;x+=1)w+=v[Math.floor(Math.random()*16)];return w}n.randomHex=h;function f(v){return u(v).toString()}n.randomRGBA=f;function d(v,w){if(typeof v=="string"){const T=v[0]==="#",[O,A,k]=g(v);return w?O*.299+A*.587+k*.114>186?"#000000":"#ffffff":`${T?"#":""}${p(255-O,255-A,255-k)}`}const x=v[0],C=v[1],S=v[2],E=v[3];return w?x*.299+C*.587+S*.114>186?[0,0,0,E]:[255,255,255,E]:[255-x,255-C,255-S,E]}n.invert=d;function g(v){const w=v.indexOf("#")===0?v:`#${v}`;let x=+`0x${w.substr(1)}`;if(!(w.length===4||w.length===7)||Number.isNaN(x))throw new Error("Invalid hex color.");const C=w.length===4?4:8,S=(1<<C)-1,E=["b","g","r"].map(()=>{const T=x&S;return x>>=C,C===4?17*T:T});return[E[2],E[1],E[0]]}function p(v,w,x){const C=S=>S.length<2?`0${S}`:S;return`${C(v.toString(16))}${C(w.toString(16))}${C(x.toString(16))}`}function b(v,w){return y(v,w)}n.lighten=b;function m(v,w){return y(v,-w)}n.darken=m;function y(v,w){if(typeof v=="string"){const S=v[0]==="#",E=parseInt(S?v.substr(1):v,16),T=en((E>>16)+w,0,255),O=en((E>>8&255)+w,0,255),A=en((E&255)+w,0,255);return`${S?"#":""}${(A|O<<8|T<<16).toString(16)}`}const x=p(v[0],v[1],v[2]),C=g(y(x,w));return[C[0],C[1],C[2],v[3]]}})(er||(er={})),function(n){n.named={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",burntsienna:"#ea7e5d",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}}(er||(er={}));class Dh{constructor(){this.clear()}clear(){this.map=new WeakMap,this.arr=[]}has(e){return this.map.has(e)}get(e){return this.map.get(e)}set(e,t){this.map.set(e,t),this.arr.push(e)}delete(e){const t=this.arr.indexOf(e);t>=0&&this.arr.splice(t,1);const r=this.map.get(e);return this.map.delete(e),r}each(e){this.arr.forEach(t=>{const r=this.map.get(t);e(r,t)})}dispose(){this.clear()}}var tr;(function(n){function e(i){const s=[],o=[];return Array.isArray(i)?s.push(...i):i.split("|").forEach(a=>{a.indexOf("&")===-1?s.push(a):o.push(...a.split("&"))}),{or:s,and:o}}n.parse=e;function t(i,s){if(i!=null&&s!=null){const o=e(i),a=e(s),l=o.or.sort(),c=a.or.sort(),u=o.and.sort(),h=a.and.sort(),f=(d,g)=>d.length===g.length&&(d.length===0||d.every((p,b)=>p===g[b]));return f(l,c)&&f(u,h)}return i==null&&s==null}n.equals=t;function r(i,s,o){if(s==null||Array.isArray(s)&&s.length===0)return o?i.altKey!==!0&&i.ctrlKey!==!0&&i.metaKey!==!0&&i.shiftKey!==!0:!0;const{or:a,and:l}=e(s),c=u=>{const h=`${u.toLowerCase()}Key`;return i[h]===!0};return a.some(u=>c(u))&&l.every(u=>c(u))}n.isMatch=r})(tr||(tr={}));var Ci;(function(n){n.linear=e=>e,n.quad=e=>e*e,n.cubic=e=>e*e*e,n.inout=e=>{if(e<=0)return 0;if(e>=1)return 1;const t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)},n.exponential=e=>Math.pow(2,10*(e-1)),n.bounce=e=>{for(let t=0,r=1;;t+=r,r/=2)if(e>=(7-4*t)/11){const i=(11-6*t-11*e)/4;return-i*i+r*r}}})(Ci||(Ci={})),function(n){n.decorators={reverse(e){return t=>1-e(1-t)},reflect(e){return t=>.5*(t<.5?e(2*t):2-e(2-2*t))},clamp(e,t=0,r=1){return i=>{const s=e(i);return s<t?t:s>r?r:s}},back(e=1.70158){return t=>t*t*((e+1)*t-e)},elastic(e=1.5){return t=>Math.pow(2,10*(t-1))*Math.cos(20*Math.PI*e/3*t)}}}(Ci||(Ci={})),function(n){function e(M){return-1*Math.cos(M*(Math.PI/2))+1}n.easeInSine=e;function t(M){return Math.sin(M*(Math.PI/2))}n.easeOutSine=t;function r(M){return-.5*(Math.cos(Math.PI*M)-1)}n.easeInOutSine=r;function i(M){return M*M}n.easeInQuad=i;function s(M){return M*(2-M)}n.easeOutQuad=s;function o(M){return M<.5?2*M*M:-1+(4-2*M)*M}n.easeInOutQuad=o;function a(M){return M*M*M}n.easeInCubic=a;function l(M){const I=M-1;return I*I*I+1}n.easeOutCubic=l;function c(M){return M<.5?4*M*M*M:(M-1)*(2*M-2)*(2*M-2)+1}n.easeInOutCubic=c;function u(M){return M*M*M*M}n.easeInQuart=u;function h(M){const I=M-1;return 1-I*I*I*I}n.easeOutQuart=h;function f(M){const I=M-1;return M<.5?8*M*M*M*M:1-8*I*I*I*I}n.easeInOutQuart=f;function d(M){return M*M*M*M*M}n.easeInQuint=d;function g(M){const I=M-1;return 1+I*I*I*I*I}n.easeOutQuint=g;function p(M){const I=M-1;return M<.5?16*M*M*M*M*M:1+16*I*I*I*I*I}n.easeInOutQuint=p;function b(M){return M===0?0:Math.pow(2,10*(M-1))}n.easeInExpo=b;function m(M){return M===1?1:-Math.pow(2,-10*M)+1}n.easeOutExpo=m;function y(M){if(M===0||M===1)return M;const I=M*2,Q=I-1;return I<1?.5*Math.pow(2,10*Q):.5*(-Math.pow(2,-10*Q)+2)}n.easeInOutExpo=y;function v(M){const I=M/1;return-1*(Math.sqrt(1-I*M)-1)}n.easeInCirc=v;function w(M){const I=M-1;return Math.sqrt(1-I*I)}n.easeOutCirc=w;function x(M){const I=M*2,Q=I-2;return I<1?-.5*(Math.sqrt(1-I*I)-1):.5*(Math.sqrt(1-Q*Q)+1)}n.easeInOutCirc=x;function C(M,I=1.70158){return M*M*((I+1)*M-I)}n.easeInBack=C;function S(M,I=1.70158){const Q=M/1-1;return Q*Q*((I+1)*Q+I)+1}n.easeOutBack=S;function E(M,I=1.70158){const Q=M*2,j=Q-2,z=I*1.525;return Q<1?.5*Q*Q*((z+1)*Q-z):.5*(j*j*((z+1)*j+z)+2)}n.easeInOutBack=E;function T(M,I=.7){if(M===0||M===1)return M;const j=M/1-1,z=1-I,U=z/(2*Math.PI)*Math.asin(1);return-(Math.pow(2,10*j)*Math.sin((j-U)*(2*Math.PI)/z))}n.easeInElastic=T;function O(M,I=.7){const Q=1-I,j=M*2;if(M===0||M===1)return M;const z=Q/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*j)*Math.sin((j-z)*(2*Math.PI)/Q)+1}n.easeOutElastic=O;function A(M,I=.65){const Q=1-I;if(M===0||M===1)return M;const j=M*2,z=j-1,U=Q/(2*Math.PI)*Math.asin(1);return j<1?-.5*(Math.pow(2,10*z)*Math.sin((z-U)*(2*Math.PI)/Q)):Math.pow(2,-10*z)*Math.sin((z-U)*(2*Math.PI)/Q)*.5+1}n.easeInOutElastic=A;function k(M){const I=M/1;if(I<1/2.75)return 7.5625*I*I;if(I<2/2.75){const Q=I-.5454545454545454;return 7.5625*Q*Q+.75}if(I<2.5/2.75){const Q=I-.8181818181818182;return 7.5625*Q*Q+.9375}{const Q=I-.9545454545454546;return 7.5625*Q*Q+.984375}}n.easeOutBounce=k;function F(M){return 1-k(1-M)}n.easeInBounce=F;function Y(M){return M<.5?F(M*2)*.5:k(M*2-1)*.5+.5}n.easeInOutBounce=Y}(Ci||(Ci={}));var Si;(function(n){n.number=(e,t)=>{const r=t-e;return i=>e+r*i},n.object=(e,t)=>{const r=Object.keys(e);return i=>{const s={};for(let o=r.length-1;o!==-1;o-=1){const a=r[o];s[a]=e[a]+(t[a]-e[a])*i}return s}},n.unit=(e,t)=>{const r=/(-?[0-9]*.[0-9]*)(px|em|cm|mm|in|pt|pc|%)/,i=r.exec(e),s=r.exec(t),o=s?s[1]:"",a=i?+i[1]:0,l=s?+s[1]:0,c=o.indexOf("."),u=c>0?o[1].length-c-1:0,h=l-a,f=i?i[2]:"";return d=>(a+h*d).toFixed(u)+f},n.color=(e,t)=>{const r=parseInt(e.slice(1),16),i=parseInt(t.slice(1),16),s=r&255,o=(i&255)-s,a=r&65280,l=(i&65280)-a,c=r&16711680,u=(i&16711680)-c;return h=>{const f=s+o*h&255,d=a+l*h&65280,g=c+u*h&16711680;return`#${(1<<24|f|d|g).toString(16).slice(1)}`}}})(Si||(Si={}));const jo=[];function Do(n,e){const t=jo.find(r=>r.name===n);if(!(t&&(t.loadTimes+=1,t.loadTimes>1))&&!tn.isApplyingHMR()){const r=document.createElement("style");r.setAttribute("type","text/css"),r.textContent=e;const i=document.querySelector("head");i&&i.insertBefore(r,i.firstChild),jo.push({name:n,loadTimes:1,styleElement:r})}}function Bo(n){const e=jo.findIndex(t=>t.name===n);if(e>-1){const t=jo[e];if(t.loadTimes-=1,t.loadTimes>0)return;let r=t.styleElement;r&&r.parentNode&&r.parentNode.removeChild(r),r=null,jo.splice(e,1)}}var xe;(function(n){function e(r){return 180*r/Math.PI%360}n.toDeg=e,n.toRad=function(r,i=!1){return(i?r:r%360)*Math.PI/180};function t(r){return r%360+(r<0?360:0)}n.normalize=t})(xe||(xe={}));var Pe;(function(n){function e(a,l=0){return Number.isInteger(a)?a:+a.toFixed(l)}n.round=e;function t(a,l){let c,u;if(l==null?(u=a==null?1:a,c=0):(u=l,c=a==null?0:a),u<c){const h=c;c=u,u=h}return Math.floor(Math.random()*(u-c+1)+c)}n.random=t;function r(a,l,c){return Number.isNaN(a)?NaN:Number.isNaN(l)||Number.isNaN(c)?0:l<c?a<l?l:a>c?c:a:a<c?c:a>l?l:a}n.clamp=r;function i(a,l){return l*Math.round(a/l)}n.snapToGrid=i;function s(a,l){return l!=null&&a!=null&&l.x>=a.x&&l.x<=a.x+a.width&&l.y>=a.y&&l.y<=a.y+a.height}n.containsPoint=s;function o(a,l){const c=a.x-l.x,u=a.y-l.y;return c*c+u*u}n.squaredLength=o})(Pe||(Pe={}));class Nr{valueOf(){return this.toJSON()}toString(){return JSON.stringify(this.toJSON())}}class P extends Nr{constructor(e,t){super(),this.x=e==null?0:e,this.y=t==null?0:t}round(e=0){return this.x=Pe.round(this.x,e),this.y=Pe.round(this.y,e),this}add(e,t){const r=P.create(e,t);return this.x+=r.x,this.y+=r.y,this}update(e,t){const r=P.create(e,t);return this.x=r.x,this.y=r.y,this}translate(e,t){const r=P.create(e,t);return this.x+=r.x,this.y+=r.y,this}rotate(e,t){const r=P.rotate(this,e,t);return this.x=r.x,this.y=r.y,this}scale(e,t,r=new P){const i=P.create(r);return this.x=i.x+e*(this.x-i.x),this.y=i.y+t*(this.y-i.y),this}closest(e){if(e.length===1)return P.create(e[0]);let t=null,r=1/0;return e.forEach(i=>{const s=this.squaredDistance(i);s<r&&(t=i,r=s)}),t?P.create(t):null}distance(e){return Math.sqrt(this.squaredDistance(e))}squaredDistance(e){const t=P.create(e),r=this.x-t.x,i=this.y-t.y;return r*r+i*i}manhattanDistance(e){const t=P.create(e);return Math.abs(t.x-this.x)+Math.abs(t.y-this.y)}magnitude(){return Math.sqrt(this.x*this.x+this.y*this.y)||.01}theta(e=new P){const t=P.create(e),r=-(t.y-this.y),i=t.x-this.x;let s=Math.atan2(r,i);return s<0&&(s=2*Math.PI+s),180*s/Math.PI}angleBetween(e,t){if(this.equals(e)||this.equals(t))return NaN;let r=this.theta(t)-this.theta(e);return r<0&&(r+=360),r}vectorAngle(e){return new P(0,0).angleBetween(this,e)}toPolar(e){return this.update(P.toPolar(this,e)),this}changeInAngle(e,t,r=new P){return this.clone().translate(-e,-t).theta(r)-this.theta(r)}adhereToRect(e){return Pe.containsPoint(e,this)||(this.x=Math.min(Math.max(this.x,e.x),e.x+e.width),this.y=Math.min(Math.max(this.y,e.y),e.y+e.height)),this}bearing(e){const t=P.create(e),r=xe.toRad(this.y),i=xe.toRad(t.y),s=this.x,o=t.x,a=xe.toRad(o-s),l=Math.sin(a)*Math.cos(i),c=Math.cos(r)*Math.sin(i)-Math.sin(r)*Math.cos(i)*Math.cos(a),u=xe.toDeg(Math.atan2(l,c)),h=["NE","E","SE","S","SW","W","NW","N"];let f=u-22.5;return f<0&&(f+=360),f=parseInt(f/45,10),h[f]}cross(e,t){if(e!=null&&t!=null){const r=P.create(e),i=P.create(t);return(i.x-this.x)*(r.y-this.y)-(i.y-this.y)*(r.x-this.x)}return NaN}dot(e){const t=P.create(e);return this.x*t.x+this.y*t.y}diff(e,t){if(typeof e=="number")return new P(this.x-e,this.y-t);const r=P.create(e);return new P(this.x-r.x,this.y-r.y)}lerp(e,t){const r=P.create(e);return new P((1-t)*this.x+t*r.x,(1-t)*this.y+t*r.y)}normalize(e=1){const t=e/this.magnitude();return this.scale(t,t)}move(e,t){const r=P.create(e),i=xe.toRad(r.theta(this));return this.translate(Math.cos(i)*t,-Math.sin(i)*t)}reflection(e){return P.create(e).move(this,this.distance(e))}snapToGrid(e,t){return this.x=Pe.snapToGrid(this.x,e),this.y=Pe.snapToGrid(this.y,t==null?e:t),this}equals(e){const t=P.create(e);return t!=null&&t.x===this.x&&t.y===this.y}clone(){return P.clone(this)}toJSON(){return P.toJSON(this)}serialize(){return`${this.x} ${this.y}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPoint=e})(P||(P={})),function(n){function e(r){return r!=null&&typeof r=="object"&&typeof r.x=="number"&&typeof r.y=="number"}n.isPointLike=e;function t(r){return r!=null&&Array.isArray(r)&&r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"}n.isPointData=t}(P||(P={})),function(n){function e(h,f){return h==null||typeof h=="number"?new n(h,f):t(h)}n.create=e;function t(h){return n.isPoint(h)?new n(h.x,h.y):Array.isArray(h)?new n(h[0],h[1]):new n(h.x,h.y)}n.clone=t;function r(h){return n.isPoint(h)?{x:h.x,y:h.y}:Array.isArray(h)?{x:h[0],y:h[1]}:{x:h.x,y:h.y}}n.toJSON=r;function i(h,f,d=new n){let g=Math.abs(h*Math.cos(f)),p=Math.abs(h*Math.sin(f));const b=t(d),m=xe.normalize(xe.toDeg(f));return m<90?p=-p:m<180?(g=-g,p=-p):m<270&&(g=-g),new n(b.x+g,b.y+p)}n.fromPolar=i;function s(h,f=new n){const d=t(h),g=t(f),p=d.x-g.x,b=d.y-g.y;return new n(Math.sqrt(p*p+b*b),xe.toRad(g.theta(d)))}n.toPolar=s;function o(h,f){return h===f?!0:h!=null&&f!=null?h.x===f.x&&h.y===f.y:!1}n.equals=o;function a(h,f){if(h==null&&f!=null||h!=null&&f==null||h!=null&&f!=null&&h.length!==f.length)return!1;if(h!=null&&f!=null){for(let d=0,g=h.length;d<g;d+=1)if(!o(h[d],f[d]))return!1}return!0}n.equalPoints=a;function l(h,f,d,g){return new n(Pe.random(h,f),Pe.random(d,g))}n.random=l;function c(h,f,d){const g=xe.toRad(xe.normalize(-f)),p=Math.sin(g),b=Math.cos(g);return u(h,b,p,d)}n.rotate=c;function u(h,f,d,g=new n){const p=t(h),b=t(g),m=p.x-b.x,y=p.y-b.y,v=m*f-y*d,w=y*f+m*d;return new n(v+b.x,w+b.y)}n.rotateEx=u}(P||(P={}));class B extends Nr{get left(){return this.x}get top(){return this.y}get right(){return this.x+this.width}get bottom(){return this.y+this.height}get origin(){return new P(this.x,this.y)}get topLeft(){return new P(this.x,this.y)}get topCenter(){return new P(this.x+this.width/2,this.y)}get topRight(){return new P(this.x+this.width,this.y)}get center(){return new P(this.x+this.width/2,this.y+this.height/2)}get bottomLeft(){return new P(this.x,this.y+this.height)}get bottomCenter(){return new P(this.x+this.width/2,this.y+this.height)}get bottomRight(){return new P(this.x+this.width,this.y+this.height)}get corner(){return new P(this.x+this.width,this.y+this.height)}get rightMiddle(){return new P(this.x+this.width,this.y+this.height/2)}get leftMiddle(){return new P(this.x,this.y+this.height/2)}get topLine(){return new q(this.topLeft,this.topRight)}get rightLine(){return new q(this.topRight,this.bottomRight)}get bottomLine(){return new q(this.bottomLeft,this.bottomRight)}get leftLine(){return new q(this.topLeft,this.bottomLeft)}constructor(e,t,r,i){super(),this.x=e==null?0:e,this.y=t==null?0:t,this.width=r==null?0:r,this.height=i==null?0:i}getOrigin(){return this.origin}getTopLeft(){return this.topLeft}getTopCenter(){return this.topCenter}getTopRight(){return this.topRight}getCenter(){return this.center}getCenterX(){return this.x+this.width/2}getCenterY(){return this.y+this.height/2}getBottomLeft(){return this.bottomLeft}getBottomCenter(){return this.bottomCenter}getBottomRight(){return this.bottomRight}getCorner(){return this.corner}getRightMiddle(){return this.rightMiddle}getLeftMiddle(){return this.leftMiddle}getTopLine(){return this.topLine}getRightLine(){return this.rightLine}getBottomLine(){return this.bottomLine}getLeftLine(){return this.leftLine}bbox(e){if(!e)return this.clone();const t=xe.toRad(e),r=Math.abs(Math.sin(t)),i=Math.abs(Math.cos(t)),s=this.width*i+this.height*r,o=this.width*r+this.height*i;return new B(this.x+(this.width-s)/2,this.y+(this.height-o)/2,s,o)}round(e=0){return this.x=Pe.round(this.x,e),this.y=Pe.round(this.y,e),this.width=Pe.round(this.width,e),this.height=Pe.round(this.height,e),this}add(e,t,r,i){const s=B.create(e,t,r,i),o=Math.min(this.x,s.x),a=Math.min(this.y,s.y),l=Math.max(this.x+this.width,s.x+s.width),c=Math.max(this.y+this.height,s.y+s.height);return this.x=o,this.y=a,this.width=l-o,this.height=c-a,this}update(e,t,r,i){const s=B.create(e,t,r,i);return this.x=s.x,this.y=s.y,this.width=s.width,this.height=s.height,this}inflate(e,t){const r=e,i=t!=null?t:e;return this.x-=r,this.y-=i,this.width+=2*r,this.height+=2*i,this}snapToGrid(e,t){const r=this.origin.snapToGrid(e,t),i=this.corner.snapToGrid(e,t);return this.x=r.x,this.y=r.y,this.width=i.x-r.x,this.height=i.y-r.y,this}translate(e,t){const r=P.create(e,t);return this.x+=r.x,this.y+=r.y,this}scale(e,t,r=new P){const i=this.origin.scale(e,t,r);return this.x=i.x,this.y=i.y,this.width*=e,this.height*=t,this}rotate(e,t=this.getCenter()){if(e!==0){const r=xe.toRad(e),i=Math.cos(r),s=Math.sin(r);let o=this.getOrigin(),a=this.getTopRight(),l=this.getBottomRight(),c=this.getBottomLeft();o=P.rotateEx(o,i,s,t),a=P.rotateEx(a,i,s,t),l=P.rotateEx(l,i,s,t),c=P.rotateEx(c,i,s,t);const u=new B(o.x,o.y,0,0);u.add(a.x,a.y,0,0),u.add(l.x,l.y,0,0),u.add(c.x,c.y,0,0),this.update(u)}return this}rotate90(){const e=(this.width-this.height)/2;this.x+=e,this.y-=e;const t=this.width;return this.width=this.height,this.height=t,this}moveAndExpand(e){const t=B.clone(e);return this.x+=t.x||0,this.y+=t.y||0,this.width+=t.width||0,this.height+=t.height||0,this}getMaxScaleToFit(e,t=this.center){const r=B.clone(e),i=t.x,s=t.y;let o=1/0,a=1/0,l=1/0,c=1/0,u=1/0,h=1/0,f=1/0,d=1/0;const g=r.topLeft;g.x<i&&(o=(this.x-i)/(g.x-i)),g.y<s&&(u=(this.y-s)/(g.y-s));const p=r.bottomRight;p.x>i&&(a=(this.x+this.width-i)/(p.x-i)),p.y>s&&(h=(this.y+this.height-s)/(p.y-s));const b=r.topRight;b.x>i&&(l=(this.x+this.width-i)/(b.x-i)),b.y<s&&(f=(this.y-s)/(b.y-s));const m=r.bottomLeft;return m.x<i&&(c=(this.x-i)/(m.x-i)),m.y>s&&(d=(this.y+this.height-s)/(m.y-s)),{sx:Math.min(o,a,l,c),sy:Math.min(u,h,f,d)}}getMaxUniformScaleToFit(e,t=this.center){const r=this.getMaxScaleToFit(e,t);return Math.min(r.sx,r.sy)}containsPoint(e,t){return Pe.containsPoint(this,P.create(e,t))}containsRect(e,t,r,i){const s=B.create(e,t,r,i),o=this.x,a=this.y,l=this.width,c=this.height,u=s.x,h=s.y,f=s.width,d=s.height;return l===0||c===0||f===0||d===0?!1:u>=o&&h>=a&&u+f<=o+l&&h+d<=a+c}intersectsWithLine(e){const t=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],r=[],i=[];return t.forEach(s=>{const o=e.intersectsWithLine(s);o!==null&&i.indexOf(o.toString())<0&&(r.push(o),i.push(o.toString()))}),r.length>0?r:null}intersectsWithLineFromCenterToPoint(e,t){const r=P.clone(e),i=this.center;let s=null;t!=null&&t!==0&&r.rotate(t,i);const o=[this.topLine,this.rightLine,this.bottomLine,this.leftLine],a=new q(i,r);for(let l=o.length-1;l>=0;l-=1){const c=o[l].intersectsWithLine(a);if(c!==null){s=c;break}}return s&&t!=null&&t!==0&&s.rotate(-t,i),s}intersectsWithRect(e,t,r,i){const s=B.create(e,t,r,i);if(!this.isIntersectWithRect(s))return null;const o=this.origin,a=this.corner,l=s.origin,c=s.corner,u=Math.max(o.x,l.x),h=Math.max(o.y,l.y);return new B(u,h,Math.min(a.x,c.x)-u,Math.min(a.y,c.y)-h)}isIntersectWithRect(e,t,r,i){const s=B.create(e,t,r,i),o=this.origin,a=this.corner,l=s.origin,c=s.corner;return!(c.x<=o.x||c.y<=o.y||l.x>=a.x||l.y>=a.y)}normalize(){let e=this.x,t=this.y,r=this.width,i=this.height;return this.width<0&&(e=this.x+this.width,r=-this.width),this.height<0&&(t=this.y+this.height,i=-this.height),this.x=e,this.y=t,this.width=r,this.height=i,this}union(e){const t=B.clone(e),r=this.origin,i=this.corner,s=t.origin,o=t.corner,a=Math.min(r.x,s.x),l=Math.min(r.y,s.y),c=Math.max(i.x,o.x),u=Math.max(i.y,o.y);return new B(a,l,c-a,u-l)}getNearestSideToPoint(e){const t=P.clone(e),r=t.x-this.x,i=this.x+this.width-t.x,s=t.y-this.y,o=this.y+this.height-t.y;let a=r,l="left";return i<a&&(a=i,l="right"),s<a&&(a=s,l="top"),o<a&&(l="bottom"),l}getNearestPointToPoint(e){const t=P.clone(e);if(this.containsPoint(t)){const r=this.getNearestSideToPoint(t);if(r==="left")return new P(this.x,t.y);if(r==="top")return new P(t.x,this.y);if(r==="right")return new P(this.x+this.width,t.y);if(r==="bottom")return new P(t.x,this.y+this.height)}return t.adhereToRect(this)}equals(e){return e!=null&&e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}clone(){return new B(this.x,this.y,this.width,this.height)}toJSON(){return{x:this.x,y:this.y,width:this.width,height:this.height}}serialize(){return`${this.x} ${this.y} ${this.width} ${this.height}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isRectangle=e})(B||(B={})),function(n){function e(t){return t!=null&&typeof t=="object"&&typeof t.x=="number"&&typeof t.y=="number"&&typeof t.width=="number"&&typeof t.height=="number"}n.isRectangleLike=e}(B||(B={})),function(n){function e(o,a,l,c){return o==null||typeof o=="number"?new n(o,a,l,c):t(o)}n.create=e;function t(o){return n.isRectangle(o)?o.clone():Array.isArray(o)?new n(o[0],o[1],o[2],o[3]):new n(o.x,o.y,o.width,o.height)}n.clone=t;function r(o){return new n(o.x-o.a,o.y-o.b,2*o.a,2*o.b)}n.fromEllipse=r;function i(o){return new n(0,0,o.width,o.height)}n.fromSize=i;function s(o,a){return new n(o.x,o.y,a.width,a.height)}n.fromPositionAndSize=s}(B||(B={}));class q extends Nr{get center(){return new P((this.start.x+this.end.x)/2,(this.start.y+this.end.y)/2)}constructor(e,t,r,i){super(),typeof e=="number"&&typeof t=="number"?(this.start=new P(e,t),this.end=new P(r,i)):(this.start=P.create(e),this.end=P.create(t))}getCenter(){return this.center}round(e=0){return this.start.round(e),this.end.round(e),this}translate(e,t){return typeof e=="number"?(this.start.translate(e,t),this.end.translate(e,t)):(this.start.translate(e),this.end.translate(e)),this}rotate(e,t){return this.start.rotate(e,t),this.end.rotate(e,t),this}scale(e,t,r){return this.start.scale(e,t,r),this.end.scale(e,t,r),this}length(){return Math.sqrt(this.squaredLength())}squaredLength(){const e=this.start.x-this.end.x,t=this.start.y-this.end.y;return e*e+t*t}setLength(e){const t=this.length();if(!t)return this;const r=e/t;return this.scale(r,r,this.start)}parallel(e){const t=this.clone();if(!t.isDifferentiable())return t;const{start:r,end:i}=t,s=r.clone().rotate(270,i),o=i.clone().rotate(90,r);return r.move(o,e),i.move(s,e),t}vector(){return new P(this.end.x-this.start.x,this.end.y-this.start.y)}angle(){const e=new P(this.start.x+1,this.start.y);return this.start.angleBetween(this.end,e)}bbox(){const e=Math.min(this.start.x,this.end.x),t=Math.min(this.start.y,this.end.y),r=Math.max(this.start.x,this.end.x),i=Math.max(this.start.y,this.end.y);return new B(e,t,r-e,i-t)}bearing(){return this.start.bearing(this.end)}closestPoint(e){return this.pointAt(this.closestPointNormalizedLength(e))}closestPointLength(e){return this.closestPointNormalizedLength(e)*this.length()}closestPointTangent(e){return this.tangentAt(this.closestPointNormalizedLength(e))}closestPointNormalizedLength(e){const t=this.vector().dot(new q(this.start,e).vector()),r=Math.min(1,Math.max(0,t/this.squaredLength()));return Number.isNaN(r)?0:r}pointAt(e){const t=this.start,r=this.end;return e<=0?t.clone():e>=1?r.clone():t.lerp(r,e)}pointAtLength(e){const t=this.start,r=this.end;let i=!0;e<0&&(i=!1,e=-e);const s=this.length();if(e>=s)return i?r.clone():t.clone();const o=(i?e:s-e)/s;return this.pointAt(o)}divideAt(e){const t=this.pointAt(e);return[new q(this.start,t),new q(t,this.end)]}divideAtLength(e){const t=this.pointAtLength(e);return[new q(this.start,t),new q(t,this.end)]}containsPoint(e){const t=this.start,r=this.end;if(t.cross(e,r)!==0)return!1;const i=this.length();return!(new q(t,e).length()>i||new q(e,r).length()>i)}intersect(e,t){const r=e.intersectsWithLine(this,t);return r?Array.isArray(r)?r:[r]:null}intersectsWithLine(e){const t=new P(this.end.x-this.start.x,this.end.y-this.start.y),r=new P(e.end.x-e.start.x,e.end.y-e.start.y),i=t.x*r.y-t.y*r.x,s=new P(e.start.x-this.start.x,e.start.y-this.start.y),o=s.x*r.y-s.y*r.x,a=s.x*t.y-s.y*t.x;if(i===0||o*i<0||a*i<0)return null;if(i>0){if(o>i||a>i)return null}else if(o<i||a<i)return null;return new P(this.start.x+o*t.x/i,this.start.y+o*t.y/i)}isDifferentiable(){return!this.start.equals(this.end)}pointOffset(e){const t=P.clone(e),r=this.start,i=this.end;return((i.x-r.x)*(t.y-r.y)-(i.y-r.y)*(t.x-r.x))/this.length()}pointSquaredDistance(e,t){const r=P.create(e,t);return this.closestPoint(r).squaredDistance(r)}pointDistance(e,t){const r=P.create(e,t);return this.closestPoint(r).distance(r)}tangentAt(e){if(!this.isDifferentiable())return null;const t=this.start,r=this.end,i=this.pointAt(e),s=new q(t,r);return s.translate(i.x-t.x,i.y-t.y),s}tangentAtLength(e){if(!this.isDifferentiable())return null;const t=this.start,r=this.end,i=this.pointAtLength(e),s=new q(t,r);return s.translate(i.x-t.x,i.y-t.y),s}relativeCcw(e,t){const r=P.create(e,t);let i=r.x-this.start.x,s=r.y-this.start.y;const o=this.end.x-this.start.x,a=this.end.y-this.start.y;let l=i*a-s*o;return l===0&&(l=i*o+s*a,l>0&&(i-=o,s-=a,l=i*o+s*a,l<0&&(l=0))),l<0?-1:l>0?1:0}equals(e){return e!=null&&this.start.x===e.start.x&&this.start.y===e.start.y&&this.end.x===e.end.x&&this.end.y===e.end.y}clone(){return new q(this.start,this.end)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.end.serialize()].join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isLine=e})(q||(q={}));class bn extends Nr{get center(){return new P(this.x,this.y)}constructor(e,t,r,i){super(),this.x=e==null?0:e,this.y=t==null?0:t,this.a=r==null?0:r,this.b=i==null?0:i}bbox(){return B.fromEllipse(this)}getCenter(){return this.center}inflate(e,t){const r=e,i=t!=null?t:e;return this.a+=2*r,this.b+=2*i,this}normalizedDistance(e,t){const r=P.create(e,t),i=r.x-this.x,s=r.y-this.y,o=this.a,a=this.b;return i*i/(o*o)+s*s/(a*a)}containsPoint(e,t){return this.normalizedDistance(e,t)<=1}intersectsWithLine(e){const t=[],r=this.a,i=this.b,s=e.start,o=e.end,a=e.vector(),l=s.diff(new P(this.x,this.y)),c=new P(a.x/(r*r),a.y/(i*i)),u=new P(l.x/(r*r),l.y/(i*i)),h=a.dot(c),f=a.dot(u),d=l.dot(u)-1,g=f*f-h*d;if(g<0)return null;if(g>0){const p=Math.sqrt(g),b=(-f-p)/h,m=(-f+p)/h;if((b<0||b>1)&&(m<0||m>1))return null;b>=0&&b<=1&&t.push(s.lerp(o,b)),m>=0&&m<=1&&t.push(s.lerp(o,m))}else{const p=-f/h;if(p>=0&&p<=1)t.push(s.lerp(o,p));else return null}return t}intersectsWithLineFromCenterToPoint(e,t=0){const r=P.clone(e);t&&r.rotate(t,this.getCenter());const i=r.x-this.x,s=r.y-this.y;let o;if(i===0)return o=this.bbox().getNearestPointToPoint(r),t?o.rotate(-t,this.getCenter()):o;const a=s/i,l=a*a,c=this.a*this.a,u=this.b*this.b;let h=Math.sqrt(1/(1/c+l/u));h=i<0?-h:h;const f=a*h;return o=new P(this.x+h,this.y+f),t?o.rotate(-t,this.getCenter()):o}tangentTheta(e){const t=P.clone(e),r=t.x,i=t.y,s=this.a,o=this.b,a=this.bbox().center,l=a.x,c=a.y,u=30,h=r>a.x+s/2,f=r<a.x-s/2;let d,g;return h||f?(g=r>a.x?i-u:i+u,d=s*s/(r-l)-s*s*(i-c)*(g-c)/(o*o*(r-l))+l):(d=i>a.y?r+u:r-u,g=o*o/(i-c)-o*o*(r-l)*(d-l)/(s*s*(i-c))+c),new P(d,g).theta(t)}scale(e,t){return this.a*=e,this.b*=t,this}rotate(e,t){const r=B.fromEllipse(this);r.rotate(e,t);const i=bn.fromRect(r);return this.a=i.a,this.b=i.b,this.x=i.x,this.y=i.y,this}translate(e,t){const r=P.create(e,t);return this.x+=r.x,this.y+=r.y,this}equals(e){return e!=null&&e.x===this.x&&e.y===this.y&&e.a===this.a&&e.b===this.b}clone(){return new bn(this.x,this.y,this.a,this.b)}toJSON(){return{x:this.x,y:this.y,a:this.a,b:this.b}}serialize(){return`${this.x} ${this.y} ${this.a} ${this.b}`}}(function(n){function e(t){return t!=null&&t instanceof n}n.isEllipse=e})(bn||(bn={})),function(n){function e(i,s,o,a){return i==null||typeof i=="number"?new n(i,s,o,a):t(i)}n.create=e;function t(i){return n.isEllipse(i)?i.clone():Array.isArray(i)?new n(i[0],i[1],i[2],i[3]):new n(i.x,i.y,i.a,i.b)}n.parse=t;function r(i){const s=i.center;return new n(s.x,s.y,i.width/2,i.height/2)}n.fromRect=r}(bn||(bn={}));const Y$=new RegExp("^[\\s\\dLMCZz,.]*$");function K$(n){return typeof n!="string"?!1:Y$.test(n)}function Bh(n,e){return(n%e+e)%e}function J$(n,e,t,r,i){const s=[],o=n[n.length-1],a=e!=null&&e>0,l=e||0;if(r&&a){n=n.slice();const h=n[0],f=new P(o.x+(h.x-o.x)/2,o.y+(h.y-o.y)/2);n.splice(0,0,f)}let c=n[0],u=1;for(t?s.push("M",c.x,c.y):s.push("L",c.x,c.y);u<(r?n.length:n.length-1);){let h=n[Bh(u,n.length)],f=c.x-h.x,d=c.y-h.y;if(a&&(f!==0||d!==0)&&(i==null||i.indexOf(u-1)<0)){let g=Math.sqrt(f*f+d*d);const p=f*Math.min(l,g/2)/g,b=d*Math.min(l,g/2)/g,m=h.x+p,y=h.y+b;s.push("L",m,y);let v=n[Bh(u+1,n.length)];for(;u<n.length-2&&Math.round(v.x-h.x)===0&&Math.round(v.y-h.y)===0;)v=n[Bh(u+2,n.length)],u+=1;f=v.x-h.x,d=v.y-h.y,g=Math.max(1,Math.sqrt(f*f+d*d));const w=f*Math.min(l,g/2)/g,x=d*Math.min(l,g/2)/g,C=h.x+w,S=h.y+x;s.push("Q",h.x,h.y,C,S),h=new P(C,S)}else s.push("L",h.x,h.y);c=h,u+=1}return r?s.push("Z"):s.push("L",o.x,o.y),s.map(h=>typeof h=="string"?h:+h.toFixed(3)).join(" ")}function Sw(n,e={}){const t=[];return n&&n.length&&n.forEach(r=>{Array.isArray(r)?t.push({x:r[0],y:r[1]}):t.push({x:r.x,y:r.y})}),J$(t,e.round,e.initialMove==null||e.initialMove,e.close,e.exclude)}function Tl(n,e,t,r,i=0,s=0,o=0,a,l){if(t===0||r===0)return[];a-=n,l-=e,t=Math.abs(t),r=Math.abs(r);const c=-a/2,u=-l/2,h=Math.cos(i*Math.PI/180),f=Math.sin(i*Math.PI/180),d=h*c+f*u,g=-1*f*c+h*u,p=d*d,b=g*g,m=t*t,y=r*r,v=p/m+b/y;let w;if(v>1)t=Math.sqrt(v)*t,r=Math.sqrt(v)*r,w=0;else{let mt=1;s===o&&(mt=-1),w=mt*Math.sqrt((m*y-m*b-y*p)/(m*b+y*p))}const x=w*t*g/r,C=-1*w*r*d/t,S=h*x-f*C+a/2,E=f*x+h*C+l/2;let T=Math.atan2((g-C)/r,(d-x)/t)-Math.atan2(0,1),O=T>=0?T:2*Math.PI+T;T=Math.atan2((-g-C)/r,(-d-x)/t)-Math.atan2((g-C)/r,(d-x)/t);let A=T>=0?T:2*Math.PI+T;o===0&&A>0?A-=2*Math.PI:o!==0&&A<0&&(A+=2*Math.PI);const k=A*2/Math.PI,F=Math.ceil(k<0?-1*k:k),Y=A/F,M=8/3*Math.sin(Y/4)*Math.sin(Y/4)/Math.sin(Y/2),I=h*t,Q=h*r,j=f*t,z=f*r;let U=Math.cos(O),ne=Math.sin(O),we=-M*(I*ne+z*U),kt=-M*(j*ne-Q*U),Fe=0,Ft=0;const qe=[];for(let mt=0;mt<F;mt+=1){O+=Y,U=Math.cos(O),ne=Math.sin(O),Fe=I*U-z*ne+S,Ft=j*U+Q*ne+E;const co=-M*(I*ne+z*U),uo=-M*(j*ne-Q*U),Un=mt*6;qe[Un]=Number(we+n),qe[Un+1]=Number(kt+e),qe[Un+2]=Number(Fe-co+n),qe[Un+3]=Number(Ft-uo+e),qe[Un+4]=Number(Fe+n),qe[Un+5]=Number(Ft+e),we=Fe+co,kt=Ft+uo}return qe.map(mt=>+mt.toFixed(2))}function Q$(n,e,t,r,i=0,s=0,o=0,a,l){const c=[],u=Tl(n,e,t,r,i,s,o,a,l);if(u!=null)for(let h=0,f=u.length;h<f;h+=6)c.push("C",u[h],u[h+1],u[h+2],u[h+3],u[h+4],u[h+5]);return c.join(" ")}class Ye extends Nr{get start(){return this.points[0]||null}get end(){return this.points[this.points.length-1]||null}constructor(e){if(super(),e!=null){if(typeof e=="string")return Ye.parse(e);this.points=e.map(t=>P.create(t))}else this.points=[]}scale(e,t,r=new P){return this.points.forEach(i=>i.scale(e,t,r)),this}rotate(e,t){return this.points.forEach(r=>r.rotate(e,t)),this}translate(e,t){const r=P.create(e,t);return this.points.forEach(i=>i.translate(r.x,r.y)),this}round(e=0){return this.points.forEach(t=>t.round(e)),this}bbox(){if(this.points.length===0)return new B;let e=1/0,t=-1/0,r=1/0,i=-1/0;const s=this.points;for(let o=0,a=s.length;o<a;o+=1){const l=s[o],c=l.x,u=l.y;c<e&&(e=c),c>t&&(t=c),u<r&&(r=u),u>i&&(i=u)}return new B(e,r,t-e,i-r)}closestPoint(e){const t=this.closestPointLength(e);return this.pointAtLength(t)}closestPointLength(e){const t=this.points,r=t.length;if(r===0||r===1)return 0;let i=0,s=0,o=1/0;for(let a=0,l=r-1;a<l;a+=1){const c=new q(t[a],t[a+1]),u=c.length(),h=c.closestPointNormalizedLength(e),d=c.pointAt(h).squaredDistance(e);d<o&&(o=d,s=i+h*u),i+=u}return s}closestPointNormalizedLength(e){const t=this.length();return t===0?0:this.closestPointLength(e)/t}closestPointTangent(e){const t=this.closestPointLength(e);return this.tangentAtLength(t)}containsPoint(e){if(this.points.length===0)return!1;const t=P.clone(e),r=t.x,i=t.y,s=this.points,o=s.length;let a=o-1,l=0;for(let c=0;c<o;c+=1){const u=s[a],h=s[c];if(t.equals(u))return!0;const f=new q(u,h);if(f.containsPoint(e))return!0;if(i<=u.y&&i>h.y||i>u.y&&i<=h.y){const d=u.x-r>h.x-r?u.x-r:h.x-r;if(d>=0){const g=new P(r+d,i),p=new q(e,g);f.intersectsWithLine(p)&&(l+=1)}}a=c}return l%2===1}intersectsWithLine(e){const t=[];for(let r=0,i=this.points.length-1;r<i;r+=1){const s=this.points[r],o=this.points[r+1],a=e.intersectsWithLine(new q(s,o));a&&t.push(a)}return t.length>0?t:null}isDifferentiable(){for(let e=0,t=this.points.length-1;e<t;e+=1){const r=this.points[e],i=this.points[e+1];if(new q(r,i).isDifferentiable())return!0}return!1}length(){let e=0;for(let t=0,r=this.points.length-1;t<r;t+=1){const i=this.points[t],s=this.points[t+1];e+=i.distance(s)}return e}pointAt(e){const t=this.points,r=t.length;if(r===0)return null;if(r===1||e<=0)return t[0].clone();if(e>=1)return t[r-1].clone();const s=this.length()*e;return this.pointAtLength(s)}pointAtLength(e){const t=this.points,r=t.length;if(r===0)return null;if(r===1)return t[0].clone();let i=!0;e<0&&(i=!1,e=-e);let s=0;for(let a=0,l=r-1;a<l;a+=1){const c=i?a:l-1-a,u=t[c],h=t[c+1],f=new q(u,h),d=u.distance(h);if(e<=s+d)return f.pointAtLength((i?1:-1)*(e-s));s+=d}return(i?t[r-1]:t[0]).clone()}tangentAt(e){const r=this.points.length;if(r===0||r===1)return null;e<0&&(e=0),e>1&&(e=1);const s=this.length()*e;return this.tangentAtLength(s)}tangentAtLength(e){const t=this.points,r=t.length;if(r===0||r===1)return null;let i=!0;e<0&&(i=!1,e=-e);let s,o=0;for(let a=0,l=r-1;a<l;a+=1){const c=i?a:l-1-a,u=t[c],h=t[c+1],f=new q(u,h),d=u.distance(h);if(f.isDifferentiable()){if(e<=o+d)return f.tangentAtLength((i?1:-1)*(e-o));s=f}o+=d}if(s){const a=i?1:0;return s.tangentAt(a)}return null}simplify(e={}){const t=this.points;if(t.length<3)return this;const r=e.threshold||0;let i=0;for(;t[i+2];){const s=i,o=i+1,a=i+2,l=t[s],c=t[o],u=t[a];new q(l,u).closestPoint(c).distance(c)<=r?t.splice(o,1):i+=1}return this}toHull(){const e=this.points,t=e.length;if(t===0)return new Ye;let r=e[0];for(let f=1;f<t;f+=1)(e[f].y<r.y||e[f].y===r.y&&e[f].x>r.x)&&(r=e[f]);const i=[];for(let f=0;f<t;f+=1){let d=r.theta(e[f]);d===0&&(d=360),i.push([e[f],f,d])}if(i.sort((f,d)=>{let g=f[2]-d[2];return g===0&&(g=d[1]-f[1]),g}),i.length>2){const f=i[i.length-1];i.unshift(f)}const s={},o=[],a=f=>`${f[0].toString()}@${f[1]}`;for(;i.length!==0;){const f=i.pop(),d=f[0];if(s[a(f)])continue;let g=!1;for(;!g;)if(o.length<2)o.push(f),g=!0;else{const p=o.pop(),b=p[0],m=o.pop(),y=m[0],v=y.cross(b,d);if(v<0)o.push(m),o.push(p),o.push(f),g=!0;else if(v===0){const x=b.angleBetween(y,d);Math.abs(x-180)<1e-10||b.equals(d)||y.equals(b)?(s[a(p)]=b,o.push(m)):Math.abs((x+1)%360-1)<1e-10&&(o.push(m),i.push(p))}else s[a(p)]=b,o.push(m)}}o.length>2&&o.pop();let l,c=-1;for(let f=0,d=o.length;f<d;f+=1){const g=o[f][1];(l===void 0||g<l)&&(l=g,c=f)}let u=[];if(c>0){const f=o.slice(c),d=o.slice(0,c);u=f.concat(d)}else u=o;const h=[];for(let f=0,d=u.length;f<d;f+=1)h.push(u[f][0]);return new Ye(h)}equals(e){return e==null||e.points.length!==this.points.length?!1:e.points.every((t,r)=>t.equals(this.points[r]))}clone(){return new Ye(this.points.map(e=>e.clone()))}toJSON(){return this.points.map(e=>e.toJSON())}serialize(){return this.points.map(e=>`${e.serialize()}`).join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPolyline=e})(Ye||(Ye={})),function(n){function e(t){const r=t.trim();if(r==="")return new n;const i=[],s=r.split(/\s*,\s*|\s+/);for(let o=0,a=s.length;o<a;o+=2)i.push({x:+s[o],y:+s[o+1]});return new n(i)}n.parse=e}(Ye||(Ye={}));class Ue extends Nr{constructor(e,t,r,i){super(),this.PRECISION=3,this.start=P.create(e),this.controlPoint1=P.create(t),this.controlPoint2=P.create(r),this.end=P.create(i)}bbox(){const e=this.start,t=this.controlPoint1,r=this.controlPoint2,i=this.end,s=e.x,o=e.y,a=t.x,l=t.y,c=r.x,u=r.y,h=i.x,f=i.y,d=[],g=[[],[]];let p,b,m,y,v,w,x,C;for(let I=0;I<2;I+=1){if(I===0?(b=6*s-12*a+6*c,p=-3*s+9*a-9*c+3*h,m=3*a-3*s):(b=6*o-12*l+6*u,p=-3*o+9*l-9*u+3*f,m=3*l-3*o),Math.abs(p)<1e-12){if(Math.abs(b)<1e-12)continue;y=-m/b,y>0&&y<1&&d.push(y);continue}x=b*b-4*m*p,C=Math.sqrt(x),!(x<0)&&(v=(-b+C)/(2*p),v>0&&v<1&&d.push(v),w=(-b-C)/(2*p),w>0&&w<1&&d.push(w))}let S,E,T,O=d.length;const A=O;for(;O;)O-=1,y=d[O],T=1-y,S=T*T*T*s+3*T*T*y*a+3*T*y*y*c+y*y*y*h,g[0][O]=S,E=T*T*T*o+3*T*T*y*l+3*T*y*y*u+y*y*y*f,g[1][O]=E;d[A]=0,d[A+1]=1,g[0][A]=s,g[1][A]=o,g[0][A+1]=h,g[1][A+1]=f,d.length=A+2,g[0].length=A+2,g[1].length=A+2;const k=Math.min.apply(null,g[0]),F=Math.min.apply(null,g[1]),Y=Math.max.apply(null,g[0]),M=Math.max.apply(null,g[1]);return new B(k,F,Y-k,M-F)}closestPoint(e,t={}){return this.pointAtT(this.closestPointT(e,t))}closestPointLength(e,t={}){const r=this.getOptions(t);return this.lengthAtT(this.closestPointT(e,r),r)}closestPointNormalizedLength(e,t={}){const r=this.getOptions(t),i=this.closestPointLength(e,r);if(!i)return 0;const s=this.length(r);return s===0?0:i/s}closestPointT(e,t={}){const r=this.getPrecision(t),i=this.getDivisions(t),s=Math.pow(10,-r);let o=null,a=0,l=0,c=0,u=0,h=0,f=null;const d=i.length;let g=d>0?1/d:0;for(i.forEach((p,b)=>{const m=p.start.distance(e),y=p.end.distance(e),v=m+y;(f==null||v<f)&&(o=p,a=b*g,l=(b+1)*g,c=m,u=y,f=v,h=p.endpointDistance())});;){const p=c?Math.abs(c-u)/c:0,b=u!=null?Math.abs(c-u)/u:0,m=p<s||b<s,y=c?c<h*s:!0,v=u?u<h*s:!0;if(m||(y||v))return c<=u?a:l;const x=o.divide(.5);g/=2;const C=x[0].start.distance(e),S=x[0].end.distance(e),E=C+S,T=x[1].start.distance(e),O=x[1].end.distance(e),A=T+O;E<=A?(o=x[0],l-=g,c=C,u=S):(o=x[1],a+=g,c=T,u=O)}}closestPointTangent(e,t={}){return this.tangentAtT(this.closestPointT(e,t))}containsPoint(e,t={}){return this.toPolyline(t).containsPoint(e)}divideAt(e,t={}){if(e<=0)return this.divideAtT(0);if(e>=1)return this.divideAtT(1);const r=this.tAt(e,t);return this.divideAtT(r)}divideAtLength(e,t={}){const r=this.tAtLength(e,t);return this.divideAtT(r)}divide(e){return this.divideAtT(e)}divideAtT(e){const t=this.start,r=this.controlPoint1,i=this.controlPoint2,s=this.end;if(e<=0)return[new Ue(t,t,t,t),new Ue(t,r,i,s)];if(e>=1)return[new Ue(t,r,i,s),new Ue(s,s,s,s)];const o=this.getSkeletonPoints(e),a=o.startControlPoint1,l=o.startControlPoint2,c=o.divider,u=o.dividerControlPoint1,h=o.dividerControlPoint2;return[new Ue(t,a,l,c),new Ue(c,u,h,s)]}endpointDistance(){return this.start.distance(this.end)}getSkeletonPoints(e){const t=this.start,r=this.controlPoint1,i=this.controlPoint2,s=this.end;if(e<=0)return{startControlPoint1:t.clone(),startControlPoint2:t.clone(),divider:t.clone(),dividerControlPoint1:r.clone(),dividerControlPoint2:i.clone()};if(e>=1)return{startControlPoint1:r.clone(),startControlPoint2:i.clone(),divider:s.clone(),dividerControlPoint1:s.clone(),dividerControlPoint2:s.clone()};const o=new q(t,r).pointAt(e),a=new q(r,i).pointAt(e),l=new q(i,s).pointAt(e),c=new q(o,a).pointAt(e),u=new q(a,l).pointAt(e),h=new q(c,u).pointAt(e);return{startControlPoint1:o,startControlPoint2:c,divider:h,dividerControlPoint1:u,dividerControlPoint2:l}}getSubdivisions(e={}){const t=this.getPrecision(e);let r=[new Ue(this.start,this.controlPoint1,this.controlPoint2,this.end)];if(t===0)return r;let i=this.endpointDistance();const s=Math.pow(10,-t);let o=0;for(;;){o+=1;const a=[];r.forEach(u=>{const h=u.divide(.5);a.push(h[0],h[1])});const l=a.reduce((u,h)=>u+h.endpointDistance(),0),c=l!==0?(l-i)/l:0;if(o>1&&c<s)return a;r=a,i=l}}length(e={}){return this.getDivisions(e).reduce((r,i)=>r+i.endpointDistance(),0)}lengthAtT(e,t={}){if(e<=0)return 0;const r=t.precision===void 0?this.PRECISION:t.precision;return this.divide(e)[0].length({precision:r})}pointAt(e,t={}){if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();const r=this.tAt(e,t);return this.pointAtT(r)}pointAtLength(e,t={}){const r=this.tAtLength(e,t);return this.pointAtT(r)}pointAtT(e){return e<=0?this.start.clone():e>=1?this.end.clone():this.getSkeletonPoints(e).divider}isDifferentiable(){const e=this.start,t=this.controlPoint1,r=this.controlPoint2,i=this.end;return!(e.equals(t)&&t.equals(r)&&r.equals(i))}tangentAt(e,t={}){if(!this.isDifferentiable())return null;e<0?e=0:e>1&&(e=1);const r=this.tAt(e,t);return this.tangentAtT(r)}tangentAtLength(e,t={}){if(!this.isDifferentiable())return null;const r=this.tAtLength(e,t);return this.tangentAtT(r)}tangentAtT(e){if(!this.isDifferentiable())return null;e<0&&(e=0),e>1&&(e=1);const t=this.getSkeletonPoints(e),r=t.startControlPoint2,i=t.dividerControlPoint1,s=t.divider,o=new q(r,i);return o.translate(s.x-r.x,s.y-r.y),o}getPrecision(e={}){return e.precision==null?this.PRECISION:e.precision}getDivisions(e={}){if(e.subdivisions!=null)return e.subdivisions;const t=this.getPrecision(e);return this.getSubdivisions({precision:t})}getOptions(e={}){const t=this.getPrecision(e),r=this.getDivisions(e);return{precision:t,subdivisions:r}}tAt(e,t={}){if(e<=0)return 0;if(e>=1)return 1;const r=this.getOptions(t),s=this.length(r)*e;return this.tAtLength(s,r)}tAtLength(e,t={}){let r=!0;e<0&&(r=!1,e=-e);const i=this.getPrecision(t),s=this.getDivisions(t),o={precision:i,subdivisions:s};let a=null,l,c,u=0,h=0,f=0;const d=s.length;let g=d>0?1/d:0;for(let m=0;m<d;m+=1){const y=r?m:d-1-m,v=s[m],w=v.endpointDistance();if(e<=f+w){a=v,l=y*g,c=(y+1)*g,u=r?e-f:w+f-e,h=r?w+f-e:e-f;break}f+=w}if(a==null)return r?1:0;const p=this.length(o),b=Math.pow(10,-i);for(;;){let m;if(m=p!==0?u/p:0,m<b)return l;if(m=p!==0?h/p:0,m<b)return c;let y,v;const w=a.divide(.5);g/=2;const x=w[0].endpointDistance(),C=w[1].endpointDistance();u<=x?(a=w[0],c-=g,y=u,v=x-y):(a=w[1],l+=g,y=u-x,v=C-y),u=y,h=v}}toPoints(e={}){const t=this.getDivisions(e),r=[t[0].start.clone()];return t.forEach(i=>r.push(i.end.clone())),r}toPolyline(e={}){return new Ye(this.toPoints(e))}scale(e,t,r){return this.start.scale(e,t,r),this.controlPoint1.scale(e,t,r),this.controlPoint2.scale(e,t,r),this.end.scale(e,t,r),this}rotate(e,t){return this.start.rotate(e,t),this.controlPoint1.rotate(e,t),this.controlPoint2.rotate(e,t),this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?(this.start.translate(e,t),this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t)):(this.start.translate(e),this.controlPoint1.translate(e),this.controlPoint2.translate(e),this.end.translate(e)),this}equals(e){return e!=null&&this.start.equals(e.start)&&this.controlPoint1.equals(e.controlPoint1)&&this.controlPoint2.equals(e.controlPoint2)&&this.end.equals(e.end)}clone(){return new Ue(this.start,this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){return[this.start.serialize(),this.controlPoint1.serialize(),this.controlPoint2.serialize(),this.end.serialize()].join(" ")}}(function(n){function e(t){return t!=null&&t instanceof n}n.isCurve=e})(Ue||(Ue={})),function(n){function e(i){const s=i.length,o=[],a=[];let l=2;o[0]=i[0]/l;for(let c=1;c<s;c+=1)a[c]=1/l,l=(c<s-1?4:3.5)-a[c],o[c]=(i[c]-o[c-1])/l;for(let c=1;c<s;c+=1)o[s-c-1]-=a[s-c]*o[s-c];return o}function t(i){const s=i.map(f=>P.clone(f)),o=[],a=[],l=s.length-1;if(l===1)return o[0]=new P((2*s[0].x+s[1].x)/3,(2*s[0].y+s[1].y)/3),a[0]=new P(2*o[0].x-s[0].x,2*o[0].y-s[0].y),[o,a];const c=[];for(let f=1;f<l-1;f+=1)c[f]=4*s[f].x+2*s[f+1].x;c[0]=s[0].x+2*s[1].x,c[l-1]=(8*s[l-1].x+s[l].x)/2;const u=e(c);for(let f=1;f<l-1;f+=1)c[f]=4*s[f].y+2*s[f+1].y;c[0]=s[0].y+2*s[1].y,c[l-1]=(8*s[l-1].y+s[l].y)/2;const h=e(c);for(let f=0;f<l;f+=1)o.push(new P(u[f],h[f])),f<l-1?a.push(new P(2*s[f+1].x-u[f+1],2*s[f+1].y-h[f+1])):a.push(new P((s[l].x+u[l-1])/2,(s[l].y+h[l-1])/2));return[o,a]}function r(i){if(i==null||Array.isArray(i)&&i.length<2)throw new Error("At least 2 points are required");const s=t(i),o=[];for(let a=0,l=s[0].length;a<l;a+=1){const c=new P(s[0][a].x,s[0][a].y),u=new P(s[1][a].x,s[1][a].y);o.push(new n(i[a],c,u,i[a+1]))}return o}n.throughPoints=r}(Ue||(Ue={}));class Ol extends Nr{constructor(){super(...arguments),this.isVisible=!0,this.isSegment=!0,this.isSubpathStart=!1}get end(){return this.endPoint}get start(){if(this.previousSegment==null)throw new Error("Missing previous segment. (This segment cannot be the first segment of a path, or segment has not yet been added to a path.)");return this.previousSegment.end}closestPointT(e,t){if(this.closestPointNormalizedLength)return this.closestPointNormalizedLength(e);throw new Error("Neither `closestPointT` nor `closestPointNormalizedLength` method is implemented.")}lengthAtT(e,t){if(e<=0)return 0;const r=this.length();return e>=1?r:r*e}divideAtT(e){if(this.divideAt)return this.divideAt(e);throw new Error("Neither `divideAtT` nor `divideAt` method is implemented.")}pointAtT(e){if(this.pointAt)return this.pointAt(e);throw new Error("Neither `pointAtT` nor `pointAt` method is implemented.")}tangentAtT(e){if(this.tangentAt)return this.tangentAt(e);throw new Error("Neither `tangentAtT` nor `tangentAt` method is implemented.")}}class Pt extends Ol{constructor(e,t){super(),q.isLine(e)?this.endPoint=e.end.clone().round(2):this.endPoint=P.create(e,t).round(2)}get type(){return"L"}get line(){return new q(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(e){return this.line.closestPoint(e)}closestPointLength(e){return this.line.closestPointLength(e)}closestPointNormalizedLength(e){return this.line.closestPointNormalizedLength(e)}closestPointTangent(e){return this.line.closestPointTangent(e)}length(){return this.line.length()}divideAt(e){const t=this.line.divideAt(e);return[new Pt(t[0]),new Pt(t[1])]}divideAtLength(e){const t=this.line.divideAtLength(e);return[new Pt(t[0]),new Pt(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.line.pointAt(e)}pointAtLength(e){return this.line.pointAtLength(e)}tangentAt(e){return this.line.tangentAt(e)}tangentAtLength(e){return this.line.tangentAtLength(e)}isDifferentiable(){return this.previousSegment==null?!1:!this.start.equals(this.end)}clone(){return new Pt(this.end)}scale(e,t,r){return this.end.scale(e,t,r),this}rotate(e,t){return this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?this.end.translate(e,t):this.end.translate(e),this}equals(e){return this.type===e.type&&this.start.equals(e.start)&&this.end.equals(e.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){const e=this.end;return`${this.type} ${e.x} ${e.y}`}}(function(n){function e(...t){const r=t.length,i=t[0];if(q.isLine(i))return new n(i);if(P.isPointLike(i))return r===1?new n(i):t.map(o=>new n(o));if(r===2)return new n(+t[0],+t[1]);const s=[];for(let o=0;o<r;o+=2){const a=+t[o],l=+t[o+1];s.push(new n(a,l))}return s}n.create=e})(Pt||(Pt={}));class fs extends Ol{get end(){if(!this.subpathStartSegment)throw new Error("Missing subpath start segment. (This segment needs a subpath start segment (e.g. MoveTo), or segment has not yet been added to a path.)");return this.subpathStartSegment.end}get type(){return"Z"}get line(){return new q(this.start,this.end)}bbox(){return this.line.bbox()}closestPoint(e){return this.line.closestPoint(e)}closestPointLength(e){return this.line.closestPointLength(e)}closestPointNormalizedLength(e){return this.line.closestPointNormalizedLength(e)}closestPointTangent(e){return this.line.closestPointTangent(e)}length(){return this.line.length()}divideAt(e){const t=this.line.divideAt(e);return[t[1].isDifferentiable()?new Pt(t[0]):this.clone(),new Pt(t[1])]}divideAtLength(e){const t=this.line.divideAtLength(e);return[t[1].isDifferentiable()?new Pt(t[0]):this.clone(),new Pt(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.line.pointAt(e)}pointAtLength(e){return this.line.pointAtLength(e)}tangentAt(e){return this.line.tangentAt(e)}tangentAtLength(e){return this.line.tangentAtLength(e)}isDifferentiable(){return!this.previousSegment||!this.subpathStartSegment?!1:!this.start.equals(this.end)}scale(){return this}rotate(){return this}translate(){return this}equals(e){return this.type===e.type&&this.start.equals(e.start)&&this.end.equals(e.end)}clone(){return new fs}toJSON(){return{type:this.type,start:this.start.toJSON(),end:this.end.toJSON()}}serialize(){return this.type}}(function(n){function e(){return new n}n.create=e})(fs||(fs={}));class ds extends Ol{constructor(e,t){super(),this.isVisible=!1,this.isSubpathStart=!0,q.isLine(e)||Ue.isCurve(e)?this.endPoint=e.end.clone().round(2):this.endPoint=P.create(e,t).round(2)}get start(){throw new Error("Illegal access. Moveto segments should not need a start property.")}get type(){return"M"}bbox(){return null}closestPoint(){return this.end.clone()}closestPointLength(){return 0}closestPointNormalizedLength(){return 0}closestPointT(){return 1}closestPointTangent(){return null}length(){return 0}lengthAtT(){return 0}divideAt(){return[this.clone(),this.clone()]}divideAtLength(){return[this.clone(),this.clone()]}getSubdivisions(){return[]}pointAt(){return this.end.clone()}pointAtLength(){return this.end.clone()}pointAtT(){return this.end.clone()}tangentAt(){return null}tangentAtLength(){return null}tangentAtT(){return null}isDifferentiable(){return!1}scale(e,t,r){return this.end.scale(e,t,r),this}rotate(e,t){return this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?this.end.translate(e,t):this.end.translate(e),this}clone(){return new ds(this.end)}equals(e){return this.type===e.type&&this.end.equals(e.end)}toJSON(){return{type:this.type,end:this.end.toJSON()}}serialize(){const e=this.end;return`${this.type} ${e.x} ${e.y}`}}(function(n){function e(...t){const r=t.length,i=t[0];if(q.isLine(i))return new n(i);if(Ue.isCurve(i))return new n(i);if(P.isPointLike(i)){if(r===1)return new n(i);const o=[];for(let a=0;a<r;a+=1)a===0?o.push(new n(t[a])):o.push(new Pt(t[a]));return o}if(r===2)return new n(+t[0],+t[1]);const s=[];for(let o=0;o<r;o+=2){const a=+t[o],l=+t[o+1];o===0?s.push(new n(a,l)):s.push(new Pt(a,l))}return s}n.create=e})(ds||(ds={}));class rn extends Ol{constructor(e,t,r,i,s,o){super(),Ue.isCurve(e)?(this.controlPoint1=e.controlPoint1.clone().round(2),this.controlPoint2=e.controlPoint2.clone().round(2),this.endPoint=e.end.clone().round(2)):typeof e=="number"?(this.controlPoint1=new P(e,t).round(2),this.controlPoint2=new P(r,i).round(2),this.endPoint=new P(s,o).round(2)):(this.controlPoint1=P.create(e).round(2),this.controlPoint2=P.create(t).round(2),this.endPoint=P.create(r).round(2))}get type(){return"C"}get curve(){return new Ue(this.start,this.controlPoint1,this.controlPoint2,this.end)}bbox(){return this.curve.bbox()}closestPoint(e){return this.curve.closestPoint(e)}closestPointLength(e){return this.curve.closestPointLength(e)}closestPointNormalizedLength(e){return this.curve.closestPointNormalizedLength(e)}closestPointTangent(e){return this.curve.closestPointTangent(e)}length(){return this.curve.length()}divideAt(e,t={}){const r=this.curve.divideAt(e,t);return[new rn(r[0]),new rn(r[1])]}divideAtLength(e,t={}){const r=this.curve.divideAtLength(e,t);return[new rn(r[0]),new rn(r[1])]}divideAtT(e){const t=this.curve.divideAtT(e);return[new rn(t[0]),new rn(t[1])]}getSubdivisions(){return[]}pointAt(e){return this.curve.pointAt(e)}pointAtLength(e){return this.curve.pointAtLength(e)}tangentAt(e){return this.curve.tangentAt(e)}tangentAtLength(e){return this.curve.tangentAtLength(e)}isDifferentiable(){if(!this.previousSegment)return!1;const e=this.start,t=this.controlPoint1,r=this.controlPoint2,i=this.end;return!(e.equals(t)&&t.equals(r)&&r.equals(i))}scale(e,t,r){return this.controlPoint1.scale(e,t,r),this.controlPoint2.scale(e,t,r),this.end.scale(e,t,r),this}rotate(e,t){return this.controlPoint1.rotate(e,t),this.controlPoint2.rotate(e,t),this.end.rotate(e,t),this}translate(e,t){return typeof e=="number"?(this.controlPoint1.translate(e,t),this.controlPoint2.translate(e,t),this.end.translate(e,t)):(this.controlPoint1.translate(e),this.controlPoint2.translate(e),this.end.translate(e)),this}equals(e){return this.start.equals(e.start)&&this.end.equals(e.end)&&this.controlPoint1.equals(e.controlPoint1)&&this.controlPoint2.equals(e.controlPoint2)}clone(){return new rn(this.controlPoint1,this.controlPoint2,this.end)}toJSON(){return{type:this.type,start:this.start.toJSON(),controlPoint1:this.controlPoint1.toJSON(),controlPoint2:this.controlPoint2.toJSON(),end:this.end.toJSON()}}serialize(){const e=this.controlPoint1,t=this.controlPoint2,r=this.end;return[this.type,e.x,e.y,t.x,t.y,r.x,r.y].join(" ")}}(function(n){function e(...t){const r=t.length,i=t[0];if(Ue.isCurve(i))return new n(i);if(P.isPointLike(i)){if(r===3)return new n(t[0],t[1],t[2]);const o=[];for(let a=0;a<r;a+=3)o.push(new n(t[a],t[a+1],t[a+2]));return o}if(r===6)return new n(t[0],t[1],t[2],t[3],t[4],t[5]);const s=[];for(let o=0;o<r;o+=6)s.push(new n(t[o],t[o+1],t[o+2],t[o+3],t[o+4],t[o+5]));return s}n.create=e})(rn||(rn={}));function Ml(n,e,t){return{x:n*Math.cos(t)-e*Math.sin(t),y:n*Math.sin(t)+e*Math.cos(t)}}function Pw(n,e,t,r,i,s){const o=.3333333333333333,a=2/3;return[o*n+a*t,o*e+a*r,o*i+a*t,o*s+a*r,i,s]}function Ew(n,e,t,r,i,s,o,a,l,c){const u=Math.PI*120/180,h=Math.PI/180*(+i||0);let f=[],d,g,p,b,m;if(c)g=c[0],p=c[1],b=c[2],m=c[3];else{d=Ml(n,e,-h),n=d.x,e=d.y,d=Ml(a,l,-h),a=d.x,l=d.y;const Y=(n-a)/2,M=(e-l)/2;let I=Y*Y/(t*t)+M*M/(r*r);I>1&&(I=Math.sqrt(I),t=I*t,r=I*r);const Q=t*t,j=r*r,z=(s===o?-1:1)*Math.sqrt(Math.abs((Q*j-Q*M*M-j*Y*Y)/(Q*M*M+j*Y*Y)));b=z*t*M/r+(n+a)/2,m=z*-r*Y/t+(e+l)/2,g=Math.asin((e-m)/r),p=Math.asin((l-m)/r),g=n<b?Math.PI-g:g,p=a<b?Math.PI-p:p,g<0&&(g=Math.PI*2+g),p<0&&(p=Math.PI*2+p),o&&g>p&&(g-=Math.PI*2),!o&&p>g&&(p-=Math.PI*2)}let y=p-g;if(Math.abs(y)>u){const Y=p,M=a,I=l;p=g+u*(o&&p>g?1:-1),a=b+t*Math.cos(p),l=m+r*Math.sin(p),f=Ew(a,l,t,r,i,0,o,M,I,[p,Y,b,m])}y=p-g;const v=Math.cos(g),w=Math.sin(g),x=Math.cos(p),C=Math.sin(p),S=Math.tan(y/4),E=4/3*(t*S),T=4/3*(r*S),O=[n,e],A=[n+E*w,e-T*v],k=[a+E*C,l-T*x],F=[a,l];if(A[0]=2*O[0]-A[0],A[1]=2*O[1]-A[1],c)return[A,k,F].concat(f);{f=[A,k,F].concat(f).join().split(",");const Y=[],M=f.length;for(let I=0;I<M;I+=1)Y[I]=I%2?Ml(+f[I-1],+f[I],h).y:Ml(+f[I],+f[I+1],h).x;return Y}}function Z$(n){if(!n)return null;const e=`
4
4
  \v\f\r   ᠎              \u2028\u2029`,t=new RegExp(`([a-z])[${e},]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[${e}]*,?[${e}]*)+)`,"ig"),r=new RegExp(`(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[${e}]*,?[${e}]*`,"ig"),i={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},s=[];return n.replace(t,(o,a,l)=>{const c=[];let u=a.toLowerCase();l.replace(r,(f,d)=>(d&&c.push(+d),f)),u==="m"&&c.length>2&&(s.push([a,...c.splice(0,2)]),u="l",a=a==="m"?"l":"L");const h=i[u];for(;c.length>=h&&(s.push([a,...c.splice(0,h)]),!!h););return o}),s}function ez(n){const e=Z$(n);if(!e||!e.length)return[["M",0,0]];let t=0,r=0,i=0,s=0;const o=[];for(let a=0,l=e.length;a<l;a+=1){const c=[];o.push(c);const u=e[a],h=u[0];if(h!==h.toUpperCase())switch(c[0]=h.toUpperCase(),c[0]){case"A":c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5],c[6]=+u[6]+t,c[7]=+u[7]+r;break;case"V":c[1]=+u[1]+r;break;case"H":c[1]=+u[1]+t;break;case"M":i=+u[1]+t,s=+u[2]+r;for(let f=1,d=u.length;f<d;f+=1)c[f]=+u[f]+(f%2?t:r);break;default:for(let f=1,d=u.length;f<d;f+=1)c[f]=+u[f]+(f%2?t:r);break}else for(let f=0,d=u.length;f<d;f+=1)c[f]=u[f];switch(c[0]){case"Z":t=+i,r=+s;break;case"H":t=c[1];break;case"V":r=c[1];break;case"M":i=c[c.length-2],s=c[c.length-1],t=c[c.length-2],r=c[c.length-1];break;default:t=c[c.length-2],r=c[c.length-1];break}}return o}function tz(n){const e=ez(n),t={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};function r(l,c,u){let h,f;if(!l)return["C",c.x,c.y,c.x,c.y,c.x,c.y];switch(l[0]in{T:1,Q:1}||(c.qx=null,c.qy=null),l[0]){case"M":c.X=l[1],c.Y=l[2];break;case"A":return parseFloat(l[1])===0||parseFloat(l[2])===0?["L",l[6],l[7]]:["C"].concat(Ew.apply(0,[c.x,c.y].concat(l.slice(1))));case"S":return u==="C"||u==="S"?(h=c.x*2-c.bx,f=c.y*2-c.by):(h=c.x,f=c.y),["C",h,f].concat(l.slice(1));case"T":return u==="Q"||u==="T"?(c.qx=c.x*2-c.qx,c.qy=c.y*2-c.qy):(c.qx=c.x,c.qy=c.y),["C"].concat(Pw(c.x,c.y,c.qx,c.qy,l[1],l[2]));case"Q":return c.qx=l[1],c.qy=l[2],["C"].concat(Pw(c.x,c.y,l[1],l[2],l[3],l[4]));case"H":return["L"].concat(l[1],c.y);case"V":return["L"].concat(c.x,l[1])}return l}function i(l,c){if(l[c].length>7){l[c].shift();const u=l[c];for(;u.length;)s[c]="A",c+=1,l.splice(c,0,["C"].concat(u.splice(0,6)));l.splice(c,1),a=e.length}}const s=[];let o="",a=e.length;for(let l=0;l<a;l+=1){let c="";e[l]&&(c=e[l][0]),c!=="C"&&(s[l]=c,l>0&&(o=s[l-1])),e[l]=r(e[l],t,o),s[l]!=="A"&&c==="C"&&(s[l]="C"),i(e,l);const u=e[l],h=u.length;t.x=u[h-2],t.y=u[h-1],t.bx=parseFloat(u[h-4])||t.x,t.by=parseFloat(u[h-3])||t.y}return(!e[0][0]||e[0][0]!=="M")&&e.unshift(["M",0,0]),e}function nz(n){return tz(n).map(e=>e.map(t=>typeof t=="string"?t:Pe.round(t,2))).join(",").split(",").join(" ")}class K extends Nr{constructor(e){if(super(),this.PRECISION=3,this.segments=[],Array.isArray(e))if(q.isLine(e[0])||Ue.isCurve(e[0])){let t=null;e.forEach((i,s)=>{s===0&&this.appendSegment(K.createSegment("M",i.start)),t!=null&&!t.end.equals(i.start)&&this.appendSegment(K.createSegment("M",i.start)),q.isLine(i)?this.appendSegment(K.createSegment("L",i.end)):Ue.isCurve(i)&&this.appendSegment(K.createSegment("C",i.controlPoint1,i.controlPoint2,i.end)),t=i})}else e.forEach(r=>{r.isSegment&&this.appendSegment(r)});else e!=null&&(q.isLine(e)?(this.appendSegment(K.createSegment("M",e.start)),this.appendSegment(K.createSegment("L",e.end))):Ue.isCurve(e)?(this.appendSegment(K.createSegment("M",e.start)),this.appendSegment(K.createSegment("C",e.controlPoint1,e.controlPoint2,e.end))):Ye.isPolyline(e)?e.points&&e.points.length&&e.points.forEach((t,r)=>{const i=r===0?K.createSegment("M",t):K.createSegment("L",t);this.appendSegment(i)}):e.isSegment&&this.appendSegment(e))}get start(){const e=this.segments,t=e.length;if(t===0)return null;for(let r=0;r<t;r+=1){const i=e[r];if(i.isVisible)return i.start}return e[t-1].end}get end(){const e=this.segments,t=e.length;if(t===0)return null;for(let r=t-1;r>=0;r-=1){const i=e[r];if(i.isVisible)return i.end}return e[t-1].end}moveTo(...e){return this.appendSegment(ds.create.call(null,...e))}lineTo(...e){return this.appendSegment(Pt.create.call(null,...e))}curveTo(...e){return this.appendSegment(rn.create.call(null,...e))}arcTo(e,t,r,i,s,o,a){const l=this.end||new P,c=typeof o=="number"?Tl(l.x,l.y,e,t,r,i,s,o,a):Tl(l.x,l.y,e,t,r,i,s,o.x,o.y);if(c!=null)for(let u=0,h=c.length;u<h;u+=6)this.curveTo(c[u],c[u+1],c[u+2],c[u+3],c[u+4],c[u+5]);return this}quadTo(e,t,r,i){const s=this.end||new P,o=["M",s.x,s.y];if(typeof e=="number")o.push("Q",e,t,r,i);else{const l=t;o.push("Q",e.x,e.y,l.x,l.y)}const a=K.parse(o.join(" "));return this.appendSegment(a.segments.slice(1)),this}close(){return this.appendSegment(fs.create())}drawPoints(e,t={}){const r=Sw(e,t),i=K.parse(r);i&&i.segments&&this.appendSegment(i.segments)}bbox(){const e=this.segments,t=e.length;if(t===0)return null;let r;for(let s=0;s<t;s+=1){const o=e[s];if(o.isVisible){const a=o.bbox();a!=null&&(r=r?r.union(a):a)}}if(r!=null)return r;const i=e[t-1];return new B(i.end.x,i.end.y,0,0)}appendSegment(e){const t=this.segments.length;let r=t!==0?this.segments[t-1]:null,i;const s=null;if(Array.isArray(e))for(let o=0,a=e.length;o<a;o+=1){const l=e[o];i=this.prepareSegment(l,r,s),this.segments.push(i),r=i}else e!=null&&e.isSegment&&(i=this.prepareSegment(e,r,s),this.segments.push(i));return this}insertSegment(e,t){const r=this.segments.length;if(e<0&&(e=r+e+1),e>r||e<0)throw new Error("Index out of range.");let i,s=null,o=null;if(r!==0&&(e>=1?(s=this.segments[e-1],o=s.nextSegment):(s=null,o=this.segments[0])),!Array.isArray(t))i=this.prepareSegment(t,s,o),this.segments.splice(e,0,i);else for(let a=0,l=t.length;a<l;a+=1){const c=t[a];i=this.prepareSegment(c,s,o),this.segments.splice(e+a,0,i),s=i}return this}removeSegment(e){const t=this.fixIndex(e),r=this.segments.splice(t,1)[0],i=r.previousSegment,s=r.nextSegment;return i&&(i.nextSegment=s),s&&(s.previousSegment=i),r.isSubpathStart&&s&&this.updateSubpathStartSegment(s),r}replaceSegment(e,t){const r=this.fixIndex(e);let i;const s=this.segments[r];let o=s.previousSegment;const a=s.nextSegment;let l=s.isSubpathStart;if(!Array.isArray(t))i=this.prepareSegment(t,o,a),this.segments.splice(r,1,i),l&&i.isSubpathStart&&(l=!1);else{this.segments.splice(e,1);for(let c=0,u=t.length;c<u;c+=1){const h=t[c];i=this.prepareSegment(h,o,a),this.segments.splice(e+c,0,i),o=i,l&&i.isSubpathStart&&(l=!1)}}l&&a&&this.updateSubpathStartSegment(a)}getSegment(e){const t=this.fixIndex(e);return this.segments[t]}fixIndex(e){const t=this.segments.length;if(t===0)throw new Error("Path has no segments.");let r=e;for(;r<0;)r=t+r;if(r>=t||r<0)throw new Error("Index out of range.");return r}segmentAt(e,t={}){const r=this.segmentIndexAt(e,t);return r?this.getSegment(r):null}segmentAtLength(e,t={}){const r=this.segmentIndexAtLength(e,t);return r?this.getSegment(r):null}segmentIndexAt(e,t={}){if(this.segments.length===0)return null;const r=Pe.clamp(e,0,1),i=this.getOptions(t),o=this.length(i)*r;return this.segmentIndexAtLength(o,i)}segmentIndexAtLength(e,t={}){const r=this.segments.length;if(r===0)return null;let i=!0;e<0&&(i=!1,e=-e);const s=this.getPrecision(t),o=this.getSubdivisions(t);let a=0,l=null;for(let c=0;c<r;c+=1){const u=i?c:r-1-c,h=this.segments[u],f=o[u],d=h.length({precision:s,subdivisions:f});if(h.isVisible){if(e<=a+d)return u;l=u}a+=d}return l}getSegmentSubdivisions(e={}){const t=this.getPrecision(e),r=[];for(let i=0,s=this.segments.length;i<s;i+=1){const a=this.segments[i].getSubdivisions({precision:t});r.push(a)}return r}updateSubpathStartSegment(e){let t=e.previousSegment,r=e;for(;r&&!r.isSubpathStart;)t!=null?r.subpathStartSegment=t.subpathStartSegment:r.subpathStartSegment=null,t=r,r=r.nextSegment}prepareSegment(e,t,r){e.previousSegment=t,e.nextSegment=r,t!=null&&(t.nextSegment=e),r!=null&&(r.previousSegment=e);let i=e;return e.isSubpathStart&&(e.subpathStartSegment=e,i=r),i!=null&&this.updateSubpathStartSegment(i),e}closestPoint(e,t={}){const r=this.closestPointT(e,t);return r?this.pointAtT(r):null}closestPointLength(e,t={}){const r=this.getOptions(t),i=this.closestPointT(e,r);return i?this.lengthAtT(i,r):0}closestPointNormalizedLength(e,t={}){const r=this.getOptions(t),i=this.closestPointLength(e,r);if(i===0)return 0;const s=this.length(r);return s===0?0:i/s}closestPointT(e,t={}){if(this.segments.length===0)return null;const r=this.getPrecision(t),i=this.getSubdivisions(t);let s,o=1/0;for(let a=0,l=this.segments.length;a<l;a+=1){const c=this.segments[a],u=i[a];if(c.isVisible){const h=c.closestPointT(e,{precision:r,subdivisions:u}),f=c.pointAtT(h),d=Pe.squaredLength(f,e);d<o&&(s={segmentIndex:a,value:h},o=d)}}return s||{segmentIndex:this.segments.length-1,value:1}}closestPointTangent(e,t={}){if(this.segments.length===0)return null;const r=this.getPrecision(t),i=this.getSubdivisions(t);let s,o=1/0;for(let a=0,l=this.segments.length;a<l;a+=1){const c=this.segments[a],u=i[a];if(c.isDifferentiable()){const h=c.closestPointT(e,{precision:r,subdivisions:u}),f=c.pointAtT(h),d=Pe.squaredLength(f,e);d<o&&(s=c.tangentAtT(h),o=d)}}return s||null}containsPoint(e,t={}){const r=this.toPolylines(t);if(!r)return!1;let i=0;for(let s=0,o=r.length;s<o;s+=1)r[s].containsPoint(e)&&(i+=1);return i%2===1}pointAt(e,t={}){if(this.segments.length===0)return null;if(e<=0)return this.start.clone();if(e>=1)return this.end.clone();const r=this.getOptions(t),s=this.length(r)*e;return this.pointAtLength(s,r)}pointAtLength(e,t={}){if(this.segments.length===0)return null;if(e===0)return this.start.clone();let r=!0;e<0&&(r=!1,e=-e);const i=this.getPrecision(t),s=this.getSubdivisions(t);let o,a=0;for(let c=0,u=this.segments.length;c<u;c+=1){const h=r?c:u-1-c,f=this.segments[h],d=s[h],g=f.length({precision:i,subdivisions:d});if(f.isVisible){if(e<=a+g)return f.pointAtLength((r?1:-1)*(e-a),{precision:i,subdivisions:d});o=f}a+=g}return o?r?o.end:o.start:this.segments[this.segments.length-1].end.clone()}pointAtT(e){const t=this.segments,r=t.length;if(r===0)return null;const i=e.segmentIndex;if(i<0)return t[0].pointAtT(0);if(i>=r)return t[r-1].pointAtT(1);const s=Pe.clamp(e.value,0,1);return t[i].pointAtT(s)}divideAt(e,t={}){if(this.segments.length===0)return null;const r=Pe.clamp(e,0,1),i=this.getOptions(t),o=this.length(i)*r;return this.divideAtLength(o,i)}divideAtLength(e,t={}){if(this.segments.length===0)return null;let r=!0;e<0&&(r=!1,e=-e);const i=this.getPrecision(t),s=this.getSubdivisions(t);let o=0,a,l,c,u,h;for(let x=0,C=this.segments.length;x<C;x+=1){const S=r?x:C-1-x,E=this.getSegment(S),T=s[S],O={precision:i,subdivisions:T},A=E.length(O);if(E.isDifferentiable()&&(c=E,u=S,e<=o+A)){l=S,a=E.divideAtLength((r?1:-1)*(e-o),O);break}o+=A}if(!c)return null;a||(l=u,h=r?1:0,a=c.divideAtT(h));const f=this.clone(),d=l;f.replaceSegment(d,a);const g=d;let p=d+1,b=d+2;a[0].isDifferentiable()||(f.removeSegment(g),p-=1,b-=1);const m=f.getSegment(p).start;f.insertSegment(p,K.createSegment("M",m)),b+=1,a[1].isDifferentiable()||(f.removeSegment(b-1),b-=1);const y=b-g-1;for(let x=b,C=f.segments.length;x<C;x+=1){const S=this.getSegment(x-y),E=f.getSegment(x);if(E.type==="Z"&&!S.subpathStartSegment.end.equals(E.subpathStartSegment.end)){const T=K.createSegment("L",S.end);f.replaceSegment(x,T)}}const v=new K(f.segments.slice(0,p)),w=new K(f.segments.slice(p));return[v,w]}intersectsWithLine(e,t={}){const r=this.toPolylines(t);if(r==null)return null;let i=null;for(let s=0,o=r.length;s<o;s+=1){const a=r[s],l=e.intersect(a);l&&(i==null&&(i=[]),Array.isArray(l)?i.push(...l):i.push(l))}return i}isDifferentiable(){for(let e=0,t=this.segments.length;e<t;e+=1)if(this.segments[e].isDifferentiable())return!0;return!1}isValid(){const e=this.segments;return e.length===0||e[0].type==="M"}length(e={}){if(this.segments.length===0)return 0;const t=this.getSubdivisions(e);let r=0;for(let i=0,s=this.segments.length;i<s;i+=1){const o=this.segments[i],a=t[i];r+=o.length({subdivisions:a})}return r}lengthAtT(e,t={}){const r=this.segments.length;if(r===0)return 0;let i=e.segmentIndex;if(i<0)return 0;let s=Pe.clamp(e.value,0,1);i>=r&&(i=r-1,s=1);const o=this.getPrecision(t),a=this.getSubdivisions(t);let l=0;for(let h=0;h<i;h+=1){const f=this.segments[h],d=a[h];l+=f.length({precision:o,subdivisions:d})}const c=this.segments[i],u=a[i];return l+=c.lengthAtT(s,{precision:o,subdivisions:u}),l}tangentAt(e,t={}){if(this.segments.length===0)return null;const r=Pe.clamp(e,0,1),i=this.getOptions(t),o=this.length(i)*r;return this.tangentAtLength(o,i)}tangentAtLength(e,t={}){if(this.segments.length===0)return null;let r=!0;e<0&&(r=!1,e=-e);const i=this.getPrecision(t),s=this.getSubdivisions(t);let o,a=0;for(let l=0,c=this.segments.length;l<c;l+=1){const u=r?l:c-1-l,h=this.segments[u],f=s[u],d=h.length({precision:i,subdivisions:f});if(h.isDifferentiable()){if(e<=a+d)return h.tangentAtLength((r?1:-1)*(e-a),{precision:i,subdivisions:f});o=h}a+=d}if(o){const l=r?1:0;return o.tangentAtT(l)}return null}tangentAtT(e){const t=this.segments.length;if(t===0)return null;const r=e.segmentIndex;if(r<0)return this.segments[0].tangentAtT(0);if(r>=t)return this.segments[t-1].tangentAtT(1);const i=Pe.clamp(e.value,0,1);return this.segments[r].tangentAtT(i)}getPrecision(e={}){return e.precision==null?this.PRECISION:e.precision}getSubdivisions(e={}){if(e.segmentSubdivisions==null){const t=this.getPrecision(e);return this.getSegmentSubdivisions({precision:t})}return e.segmentSubdivisions}getOptions(e={}){const t=this.getPrecision(e),r=this.getSubdivisions(e);return{precision:t,segmentSubdivisions:r}}toPoints(e={}){const t=this.segments,r=t.length;if(r===0)return null;const i=this.getSubdivisions(e),s=[];let o=[];for(let a=0;a<r;a+=1){const l=t[a];if(l.isVisible){const c=i[a];c.length>0?c.forEach(u=>o.push(u.start)):o.push(l.start)}else o.length>0&&(o.push(t[a-1].end),s.push(o),o=[])}return o.length>0&&(o.push(this.end),s.push(o)),s}toPolylines(e={}){const t=this.toPoints(e);return t?t.map(r=>new Ye(r)):null}scale(e,t,r){return this.segments.forEach(i=>i.scale(e,t,r)),this}rotate(e,t){return this.segments.forEach(r=>r.rotate(e,t)),this}translate(e,t){return typeof e=="number"?this.segments.forEach(r=>r.translate(e,t)):this.segments.forEach(r=>r.translate(e)),this}clone(){const e=new K;return this.segments.forEach(t=>e.appendSegment(t.clone())),e}equals(e){if(e==null)return!1;const t=this.segments,r=e.segments,i=t.length;if(r.length!==i)return!1;for(let s=0;s<i;s+=1){const o=t[s],a=r[s];if(o.type!==a.type||!o.equals(a))return!1}return!0}toJSON(){return this.segments.map(e=>e.toJSON())}serialize(){if(!this.isValid())throw new Error("Invalid path segments.");return this.segments.map(e=>e.serialize()).join(" ")}toString(){return this.serialize()}}(function(n){function e(t){return t!=null&&t instanceof n}n.isPath=e})(K||(K={})),function(n){function e(r){if(!r)return new n;const i=new n,s=/(?:[a-zA-Z] *)(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)? *,? *)|(?:-?\.\d+ *,? *))+|(?:[a-zA-Z] *)(?! |\d|-|\.)/g,o=n.normalize(r).match(s);if(o!=null)for(let a=0,l=o.length;a<l;a+=1){const c=o[a],u=/(?:[a-zA-Z])|(?:(?:-?\d+(?:\.\d+)?(?:e[-+]?\d+)?))|(?:(?:-?\.\d+))/g,h=c.match(u);if(h!=null){const f=h[0],d=h.slice(1).map(p=>+p),g=t.call(null,f,...d);i.appendSegment(g)}}return i}n.parse=e;function t(r,...i){if(r==="M")return ds.create.call(null,...i);if(r==="L")return Pt.create.call(null,...i);if(r==="C")return rn.create.call(null,...i);if(r==="z"||r==="Z")return fs.create();throw new Error(`Invalid path segment type "${r}"`)}n.createSegment=t}(K||(K={})),function(n){n.normalize=nz,n.isValid=K$,n.drawArc=Q$,n.drawPoints=Sw,n.arcToCurves=Tl}(K||(K={}));class Ke{constructor(e){this.options=Object.assign({},e),this.data=this.options.data||{},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this)}get names(){return Object.keys(this.data)}register(e,t,r=!1){if(typeof e=="object"){Object.entries(e).forEach(([o,a])=>{this.register(o,a,t)});return}this.exist(e)&&!r&&!tn.isApplyingHMR()&&this.onDuplicated(e);const i=this.options.process,s=i?J(i,this,e,t):t;return this.data[e]=s,s}unregister(e){const t=e?this.data[e]:null;return delete this.data[e],t}get(e){return e?this.data[e]:null}exist(e){return e?this.data[e]!=null:!1}onDuplicated(e){try{throw this.options.onConflict&&J(this.options.onConflict,this,e),new Error(`${cl(this.options.type)} with name '${e}' already registered.`)}catch(t){throw t}}onNotFound(e,t){throw new Error(this.getSpellingSuggestion(e,t))}getSpellingSuggestion(e,t){const r=this.getSpellingSuggestionForName(e),i=t?`${t} ${vB(this.options.type)}`:this.options.type;return`${cl(i)} with name '${e}' does not exist.${r?` Did you mean '${r}'?`:""}`}getSpellingSuggestionForName(e){return QB(e,Object.keys(this.data),t=>t)}}(function(n){function e(t){return new n(t)}n.create=e})(Ke||(Ke={}));const rz=Object.freeze(Object.defineProperty({__proto__:null,dot:{color:"#aaaaaa",thickness:1,markup:"rect",update(n,e){const t=e.thickness*e.sx,r=e.thickness*e.sy;de(n,{width:t,height:r,rx:t,ry:r,fill:e.color})}},doubleMesh:[{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(n,e){let t;const r=e.width,i=e.height,s=e.thickness;r-s>=0&&i-s>=0?t=["M",r,0,"H0 M0 0 V0",i].join(" "):t="M 0 0 0 0",de(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}},{color:"rgba(224,224,224,0.2)",thickness:3,factor:4,markup:"path",update(n,e){let t;const r=e.factor||1,i=e.width*r,s=e.height*r,o=e.thickness;i-o>=0&&s-o>=0?t=["M",i,0,"H0 M0 0 V0",s].join(" "):t="M 0 0 0 0",e.width=i,e.height=s,de(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}}],fixedDot:{color:"#aaaaaa",thickness:1,markup:"rect",update(n,e){const t=e.sx<=1?e.thickness*e.sx:e.thickness;de(n,{width:t,height:t,rx:t,ry:t,fill:e.color})}},mesh:{color:"rgba(224,224,224,1)",thickness:1,markup:"path",update(n,e){let t;const r=e.width,i=e.height,s=e.thickness;r-s>=0&&i-s>=0?t=["M",r,0,"H0 M0 0 V0",i].join(" "):t="M 0 0 0 0",de(n,{d:t,stroke:e.color,"stroke-width":e.thickness})}}},Symbol.toStringTag,{value:"Module"}));class kr{constructor(){this.patterns={},this.root=te.create(yl(),{width:"100%",height:"100%"},[Qn("defs")]).node}add(e,t){const r=this.root.childNodes[0];r&&r.appendChild(t),this.patterns[e]=t,te.create("rect",{width:"100%",height:"100%",fill:`url(#${e})`}).appendTo(this.root)}get(e){return this.patterns[e]}has(e){return this.patterns[e]!=null}}(function(n){n.presets=rz,n.registry=Ke.create({type:"grid"}),n.registry.register(n.presets,!0)})(kr||(kr={}));const Aw=function(n){const e=document.createElement("canvas"),t=n.width,r=n.height;e.width=t*2,e.height=r;const i=e.getContext("2d");return i.drawImage(n,0,0,t,r),i.translate(2*t,0),i.scale(-1,1),i.drawImage(n,0,0,t,r),e},Tw=function(n){const e=document.createElement("canvas"),t=n.width,r=n.height;e.width=t,e.height=r*2;const i=e.getContext("2d");return i.drawImage(n,0,0,t,r),i.translate(0,2*r),i.scale(1,-1),i.drawImage(n,0,0,t,r),e},Ow=function(n){const e=document.createElement("canvas"),t=n.width,r=n.height;e.width=2*t,e.height=2*r;const i=e.getContext("2d");return i.drawImage(n,0,0,t,r),i.setTransform(-1,0,0,-1,e.width,e.height),i.drawImage(n,0,0,t,r),i.setTransform(-1,0,0,1,e.width,0),i.drawImage(n,0,0,t,r),i.setTransform(1,0,0,-1,0,e.height),i.drawImage(n,0,0,t,r),e},iz=Object.freeze(Object.defineProperty({__proto__:null,flipX:Aw,flipXY:Ow,flipY:Tw,watermark:function(n,e){const t=n.width,r=n.height,i=document.createElement("canvas");i.width=t*3,i.height=r*3;const s=i.getContext("2d"),o=e.angle!=null?-e.angle:-20,a=xe.toRad(o),l=i.width/4,c=i.height/4;for(let u=0;u<4;u+=1)for(let h=0;h<4;h+=1)(u+h)%2>0&&(s.setTransform(1,0,0,1,(2*u-1)*l,(2*h-1)*c),s.rotate(a),s.drawImage(n,-t/2,-r/2,t,r));return i}},Symbol.toStringTag,{value:"Module"}));var $o;(function(n){n.presets=Object.assign({},iz),n.presets["flip-x"]=Aw,n.presets["flip-y"]=Tw,n.presets["flip-xy"]=Ow,n.registry=Ke.create({type:"background pattern"}),n.registry.register(n.presets,!0)})($o||($o={}));function $h(n,e){return n!=null?n:e}function ft(n,e){return n!=null&&Number.isFinite(n)?n:e}function sz(n={}){const e=$h(n.color,"blue"),t=ft(n.width,1),r=ft(n.margin,2),i=ft(n.opacity,1),s=r,o=r+t;return`
@@ -1,5 +1,5 @@
1
1
  module.exports = {
2
- "@nocobase/client": "0.14.0-alpha.6",
2
+ "@nocobase/client": "0.14.0-alpha.7",
3
3
  "react": "18.2.0",
4
4
  "@ant-design/icons": "5.1.4",
5
5
  "@formily/shared": "2.2.27",
@@ -9,9 +9,9 @@ module.exports = {
9
9
  "lodash": "4.17.21",
10
10
  "react-router-dom": "6.14.1",
11
11
  "@formily/reactive": "2.2.27",
12
- "@nocobase/utils": "0.14.0-alpha.6",
12
+ "@nocobase/utils": "0.14.0-alpha.7",
13
13
  "react-i18next": "11.18.6",
14
- "@nocobase/server": "0.14.0-alpha.6",
14
+ "@nocobase/server": "0.14.0-alpha.7",
15
15
  "ahooks": "3.7.8",
16
- "@nocobase/database": "0.14.0-alpha.6"
16
+ "@nocobase/database": "0.14.0-alpha.7"
17
17
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "可视化的数据表管理",
5
5
  "description": "An ER diagram-like tool",
6
6
  "description.zh-CN": "类似 ER 图的工具",
7
- "version": "0.14.0-alpha.6",
7
+ "version": "0.14.0-alpha.7",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "devDependencies": {
@@ -33,5 +33,5 @@
33
33
  "@nocobase/test": "0.x",
34
34
  "@nocobase/utils": "0.x"
35
35
  },
36
- "gitHead": "7f2858222231c207030b57704a0bb6ebc98e4e45"
36
+ "gitHead": "dc958417d27ed0753439bcef192be91a03dfc30f"
37
37
  }