diff --git a/lightrag/api/webui/assets/index-BNaZrUgP.js b/lightrag/api/webui/assets/index-DG6MIDBJ.js similarity index 96% rename from lightrag/api/webui/assets/index-BNaZrUgP.js rename to lightrag/api/webui/assets/index-DG6MIDBJ.js index 82abc18c..b43cb916 100644 --- a/lightrag/api/webui/assets/index-BNaZrUgP.js +++ b/lightrag/api/webui/assets/index-DG6MIDBJ.js @@ -14,7 +14,7 @@ var p$=Object.defineProperty;var g$=(e,t,n)=>t in e?p$(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var vR;function v$(){return vR||(vR=1,function(e){function t(G,j){var P=G.length;G.push(j);e:for(;0
>>1,D=G[Y];if(0>>1;Y >>1,D=G[Y];if(0>>1;Y this.runFrame())},o.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},o.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},o.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},cm=o,cm}var Vee=qee();const Wee=un(Vee);function Yee(e={maxIterations:100}){return Gs($ee,e)}function Kee(e={}){return V0(Wee,e)}var dm,DN;function Xee(){if(DN)return dm;DN=1;var e=0,t=1,n=2,r=3,a=4,o=5,s=6,u=7,c=8,d=9,p=0,g=1,m=2,b=0,v=1,S=2,k=3,R=4,x=5,_=6,C=7,O=8,A=3,N=10,F=3,I=9,L=10;return dm=function($,U,W){var Z,G,j,P,Y,D,V,B,M,K,J=U.length,le=W.length,oe=$.adjustSizes,Q=$.barnesHutTheta*$.barnesHutTheta,ge,re,Ee,we,De,Re,Se,ee=[];for(j=0;j this.runFrame())},o.prototype.stop=function(){return this.running=!1,this.frameID!==null&&(window.cancelAnimationFrame(this.frameID),this.frameID=null),this},o.prototype.start=function(){if(this.killed)throw new Error("graphology-layout-force/worker.start: layout was killed.");this.running||(this.running=!0,this.runFrame())},o.prototype.kill=function(){this.stop(),delete this.nodeStates,this.killed=!0},cm=o,cm}var Vee=qee();const Wee=un(Vee);function Yee(e={maxIterations:100}){return Gs($ee,e)}function Kee(e={}){return V0(Wee,e)}var dm,DN;function Xee(){if(DN)return dm;DN=1;var e=0,t=1,n=2,r=3,a=4,o=5,s=6,u=7,c=8,d=9,p=0,g=1,m=2,b=0,v=1,S=2,k=3,R=4,x=5,_=6,N=7,O=8,A=3,C=10,F=3,I=9,L=10;return dm=function($,U,W){var Z,G,j,P,Y,D,V,B,M,K,J=U.length,le=W.length,oe=$.adjustSizes,Q=$.barnesHutTheta*$.barnesHutTheta,ge,re,Ee,we,De,Re,Se,ee=[];for(j=0;j1&&arguments[1]!==void 0?arguments[1]:{},r,a,o,s,u;return tt(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(c,n),p=d.key;a=p;let g=d.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!tt(n.count),b=m&&!n.ordinal&&n.count===0,v=n.context!==void 0&&(tt(n.context)||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);g.forEach(k=>{var R,x;this.isValidLookup(r)||(u=k,!DR[`${S[0]}-${k}`]&&((R=this.utils)!=null&&R.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(u))&&(DR[`${S[0]}-${k}`]=!0,this.logger.warn(`key "${a}" for languages "${S.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(_=>{var A;if(this.isValidLookup(r))return;s=_;const C=[p];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(C,p,_,k,n);else{let N;m&&(N=this.pluralResolver.getSuffix(_,n.count,n));const F=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(C.push(p+N),n.ordinal&&N.indexOf(I)===0&&C.push(p+N.replace(I,this.options.pluralSeparator)),b&&C.push(p+F)),v){const L=`${p}${this.options.contextSeparator}${n.context}`;C.push(L),m&&(C.push(L+N),n.ordinal&&N.indexOf(I)===0&&C.push(L+N.replace(I,this.options.pluralSeparator)),b&&C.push(L+F))}}let O;for(;O=C.pop();)this.isValidLookup(r)||(o=O,r=this.getResource(_,k,O,n))}))})}),{res:r,usedKey:a,exactUsedKey:o,usedLng:s,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var o;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,a):this.resourceStore.getResource(t,n,r,a)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!tt(t.replace);let a=r?t.replace:t;if(r&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const o of n)delete a[o]}return a}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class LR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Jr.create("languageUtils")}getScriptPartFromCode(t){if(t=qd(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=qd(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(tt(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),tt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),a=[],o=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return tt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):tt(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{a.indexOf(s)<0&&o(this.formatLanguageCode(s))}),a}}const MR={zero:0,one:1,two:2,few:3,many:4,other:5},FR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class z${constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Jr.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=qd(t==="dev"?"en":t),a=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:a});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),FR;if(!t.match(/-|_/))return FR;const c=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(c,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(a=>`${n}${a}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((a,o)=>MR[a]-MR[o]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(t,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const PR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=N$(e,t,n);return!o&&a&&tt(n)&&(o=Ix(e,n,r),o===void 0&&(o=Ix(t,n,r))),o},Rh=e=>e.replace(/\$/g,"$$$$");class B${constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Jr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:a,prefix:o,prefixEscaped:s,suffix:u,suffixEscaped:c,formatSeparator:d,unescapeSuffix:p,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:b,nestingSuffix:v,nestingSuffixEscaped:S,nestingOptionsSeparator:k,maxReplaces:R,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:D$,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=o?es(o):s||"{{",this.suffix=u?es(u):c||"}}",this.formatSeparator=d||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?es(m):b||es("$t("),this.nestingSuffix=v?es(v):S||es(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=R||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,a){var b;let o,s,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=v=>{if(v.indexOf(this.formatSeparator)<0){const x=PR(n,c,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...a,...n,interpolationkey:v}):x}const S=v.split(this.formatSeparator),k=S.shift().trim(),R=S.join(this.formatSeparator).trim();return this.format(PR(n,c,k,this.options.keySeparator,this.options.ignoreJSONStructure),R,r,{...a,...n,interpolationkey:k})};this.resetRegExp();const p=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,g=((b=a==null?void 0:a.interpolation)==null?void 0:b.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>Rh(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?Rh(this.escape(v)):Rh(v)}].forEach(v=>{for(u=0;o=v.regex.exec(t);){const S=o[1].trim();if(s=d(S),s===void 0)if(typeof p=="function"){const R=p(t,o,a);s=tt(R)?R:""}else if(a&&Object.prototype.hasOwnProperty.call(a,S))s="";else if(g){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${t}`),s="";else!tt(s)&&!this.useRawValueToEscape&&(s=_R(s));const k=v.safeValue(s);if(t=t.replace(o[0],k),g?(v.regex.lastIndex+=s.length,v.regex.lastIndex-=o[0].length):v.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,s;const u=(c,d)=>{const p=this.nestingOptionsSeparator;if(c.indexOf(p)<0)return c;const g=c.split(new RegExp(`${p}[ ]*{`));let m=`{${g[1]}`;c=g[0],m=this.interpolate(m,s);const b=m.match(/'/g),v=m.match(/"/g);(((b==null?void 0:b.length)??0)%2===0&&!v||v.length%2!==0)&&(m=m.replace(/'/g,'"'));try{s=JSON.parse(m),d&&(s={...d,...s})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,S),`${c}${p}${m}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,c};for(;a=this.nestingRegexp.exec(t);){let c=[];s={...r},s=s.replace&&!tt(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const p=a[1].split(this.formatSeparator).map(g=>g.trim());a[1]=p.shift(),c=p,d=!0}if(o=n(u.call(this,a[1].trim(),s),s),o&&a[0]===t&&!tt(o))return o;tt(o)||(o=_R(o)),o||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),o=""),d&&(o=c.reduce((p,g)=>this.format(p,g,r.lng,{...r,interpolationkey:a[1].trim()}),o.trim())),t=t.replace(a[0],o),this.regexp.lastIndex=0}return t}}const U$=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].substring(0,r[1].length-1);t==="currency"&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):t==="relativetime"&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(s){const[u,...c]=s.split(":"),d=c.join(":").trim().replace(/^'+|'+$/g,""),p=u.trim();n[p]||(n[p]=d),d==="false"&&(n[p]=!1),d==="true"&&(n[p]=!0),isNaN(d)||(n[p]=parseInt(d,10))}})}return{formatName:t,formatOptions:n}},ts=e=>{const t={};return(n,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});const s=r+JSON.stringify(o);let u=t[s];return u||(u=e(qd(r),a),t[s]=u),u(n)}};class j${constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Jr.create("formatter"),this.options=t,this.formats={number:ts((n,r)=>{const a=new Intl.NumberFormat(n,{...r});return o=>a.format(o)}),currency:ts((n,r)=>{const a=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>a.format(o)}),datetime:ts((n,r)=>{const a=new Intl.DateTimeFormat(n,{...r});return o=>a.format(o)}),relativetime:ts((n,r)=>{const a=new Intl.RelativeTimeFormat(n,{...r});return o=>a.format(o,r.range||"day")}),list:ts((n,r)=>{const a=new Intl.ListFormat(n,{...r});return o=>a.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ts(n)}format(t,n,r){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(u=>u.indexOf(")")>-1)){const u=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,u)].join(this.formatSeparator)}return o.reduce((u,c)=>{var g;const{formatName:d,formatOptions:p}=U$(c);if(this.formats[d]){let m=u;try{const b=((g=a==null?void 0:a.formatParams)==null?void 0:g[a.interpolationkey])||{},v=b.locale||b.lng||a.locale||a.lng||r;m=this.formats[d](u,v,{...p,...a,...b})}catch(b){this.logger.warn(b)}return m}else this.logger.warn(`there was no format function for ${d}`);return u},t)}}const G$=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class H$ extends Tf{constructor(t,n,r){var o,s;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=Jr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,a.backend,a)}queueLoad(t,n,r,a){const o={},s={},u={},c={};return t.forEach(d=>{let p=!0;n.forEach(g=>{const m=`${d}|${g}`;!r.reload&&this.store.hasResourceBundle(d,g)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?s[m]===void 0&&(s[m]=!0):(this.state[m]=1,p=!1,s[m]===void 0&&(s[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),p||(u[d]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const a=t.split("|"),o=a[0],s=a[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const u={};this.queue.forEach(c=>{C$(c.loaded,[o],s),G$(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(d=>{u[d]||(u[d]={});const p=c.loaded[d];p.length&&p.forEach(g=>{u[d][g]===void 0&&(u[d][g]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:a,wait:o,callback:s});return}this.readingCalls++;const u=(d,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(d&&p&&a1&&arguments[1]!==void 0?arguments[1]:{},r,a,o,s,u;return tt(t)&&(t=[t]),t.forEach(c=>{if(this.isValidLookup(r))return;const d=this.extractFromKey(c,n),p=d.key;a=p;let g=d.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const m=n.count!==void 0&&!tt(n.count),b=m&&!n.ordinal&&n.count===0,v=n.context!==void 0&&(tt(n.context)||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);g.forEach(k=>{var R,x;this.isValidLookup(r)||(u=k,!DR[`${S[0]}-${k}`]&&((R=this.utils)!=null&&R.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(u))&&(DR[`${S[0]}-${k}`]=!0,this.logger.warn(`key "${a}" for languages "${S.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),S.forEach(_=>{var A;if(this.isValidLookup(r))return;s=_;const N=[p];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(N,p,_,k,n);else{let C;m&&(C=this.pluralResolver.getSuffix(_,n.count,n));const F=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(N.push(p+C),n.ordinal&&C.indexOf(I)===0&&N.push(p+C.replace(I,this.options.pluralSeparator)),b&&N.push(p+F)),v){const L=`${p}${this.options.contextSeparator}${n.context}`;N.push(L),m&&(N.push(L+C),n.ordinal&&C.indexOf(I)===0&&N.push(L+C.replace(I,this.options.pluralSeparator)),b&&N.push(L+F))}}let O;for(;O=N.pop();)this.isValidLookup(r)||(o=O,r=this.getResource(_,k,O,n))}))})}),{res:r,usedKey:a,exactUsedKey:o,usedLng:s,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var o;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(t,n,r,a):this.resourceStore.getResource(t,n,r,a)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!tt(t.replace);let a=r?t.replace:t;if(r&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!r){a={...a};for(const o of n)delete a[o]}return a}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class LR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Jr.create("languageUtils")}getScriptPartFromCode(t){if(t=qd(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=qd(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(tt(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const a=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const a=this.getLanguagePartFromCode(r);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(o=>{if(o===a)return o;if(!(o.indexOf("-")<0&&a.indexOf("-")<0)&&(o.indexOf("-")>0&&a.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===a||o.indexOf(a)===0&&a.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),tt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),a=[],o=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return tt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):tt(t)&&o(this.formatLanguageCode(t)),r.forEach(s=>{a.indexOf(s)<0&&o(this.formatLanguageCode(s))}),a}}const MR={zero:0,one:1,two:2,few:3,many:4,other:5},FR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class z${constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Jr.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=qd(t==="dev"?"en":t),a=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:a});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let s;try{s=new Intl.PluralRules(r,{type:a})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),FR;if(!t.match(/-|_/))return FR;const c=this.languageUtils.getLanguagePartFromCode(t);s=this.getRule(c,n)}return this.pluralRulesCache[o]=s,s}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(a=>`${n}${a}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((a,o)=>MR[a]-MR[o]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(t,r);return a?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const PR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=N$(e,t,n);return!o&&a&&tt(n)&&(o=Ix(e,n,r),o===void 0&&(o=Ix(t,n,r))),o},Rh=e=>e.replace(/\$/g,"$$$$");class B${constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Jr.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:a,prefix:o,prefixEscaped:s,suffix:u,suffixEscaped:c,formatSeparator:d,unescapeSuffix:p,unescapePrefix:g,nestingPrefix:m,nestingPrefixEscaped:b,nestingSuffix:v,nestingSuffixEscaped:S,nestingOptionsSeparator:k,maxReplaces:R,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:D$,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=o?es(o):s||"{{",this.suffix=u?es(u):c||"}}",this.formatSeparator=d||",",this.unescapePrefix=p?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":p||"",this.nestingPrefix=m?es(m):b||es("$t("),this.nestingSuffix=v?es(v):S||es(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=R||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,a){var b;let o,s,u;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=v=>{if(v.indexOf(this.formatSeparator)<0){const x=PR(n,c,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...a,...n,interpolationkey:v}):x}const S=v.split(this.formatSeparator),k=S.shift().trim(),R=S.join(this.formatSeparator).trim();return this.format(PR(n,c,k,this.options.keySeparator,this.options.ignoreJSONStructure),R,r,{...a,...n,interpolationkey:k})};this.resetRegExp();const p=(a==null?void 0:a.missingInterpolationHandler)||this.options.missingInterpolationHandler,g=((b=a==null?void 0:a.interpolation)==null?void 0:b.skipOnVariables)!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>Rh(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?Rh(this.escape(v)):Rh(v)}].forEach(v=>{for(u=0;o=v.regex.exec(t);){const S=o[1].trim();if(s=d(S),s===void 0)if(typeof p=="function"){const R=p(t,o,a);s=tt(R)?R:""}else if(a&&Object.prototype.hasOwnProperty.call(a,S))s="";else if(g){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${t}`),s="";else!tt(s)&&!this.useRawValueToEscape&&(s=_R(s));const k=v.safeValue(s);if(t=t.replace(o[0],k),g?(v.regex.lastIndex+=s.length,v.regex.lastIndex-=o[0].length):v.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,s;const u=(c,d)=>{const p=this.nestingOptionsSeparator;if(c.indexOf(p)<0)return c;const g=c.split(new RegExp(`${p}[ ]*{`));let m=`{${g[1]}`;c=g[0],m=this.interpolate(m,s);const b=m.match(/'/g),v=m.match(/"/g);(((b==null?void 0:b.length)??0)%2===0&&!v||v.length%2!==0)&&(m=m.replace(/'/g,'"'));try{s=JSON.parse(m),d&&(s={...d,...s})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,S),`${c}${p}${m}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,c};for(;a=this.nestingRegexp.exec(t);){let c=[];s={...r},s=s.replace&&!tt(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const p=a[1].split(this.formatSeparator).map(g=>g.trim());a[1]=p.shift(),c=p,d=!0}if(o=n(u.call(this,a[1].trim(),s),s),o&&a[0]===t&&!tt(o))return o;tt(o)||(o=_R(o)),o||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),o=""),d&&(o=c.reduce((p,g)=>this.format(p,g,r.lng,{...r,interpolationkey:a[1].trim()}),o.trim())),t=t.replace(a[0],o),this.regexp.lastIndex=0}return t}}const U$=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const a=r[1].substring(0,r[1].length-1);t==="currency"&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):t==="relativetime"&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(s=>{if(s){const[u,...c]=s.split(":"),d=c.join(":").trim().replace(/^'+|'+$/g,""),p=u.trim();n[p]||(n[p]=d),d==="false"&&(n[p]=!1),d==="true"&&(n[p]=!0),isNaN(d)||(n[p]=parseInt(d,10))}})}return{formatName:t,formatOptions:n}},ts=e=>{const t={};return(n,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});const s=r+JSON.stringify(o);let u=t[s];return u||(u=e(qd(r),a),t[s]=u),u(n)}};class j${constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Jr.create("formatter"),this.options=t,this.formats={number:ts((n,r)=>{const a=new Intl.NumberFormat(n,{...r});return o=>a.format(o)}),currency:ts((n,r)=>{const a=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>a.format(o)}),datetime:ts((n,r)=>{const a=new Intl.DateTimeFormat(n,{...r});return o=>a.format(o)}),relativetime:ts((n,r)=>{const a=new Intl.RelativeTimeFormat(n,{...r});return o=>a.format(o,r.range||"day")}),list:ts((n,r)=>{const a=new Intl.ListFormat(n,{...r});return o=>a.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ts(n)}format(t,n,r){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(u=>u.indexOf(")")>-1)){const u=o.findIndex(c=>c.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,u)].join(this.formatSeparator)}return o.reduce((u,c)=>{var g;const{formatName:d,formatOptions:p}=U$(c);if(this.formats[d]){let m=u;try{const b=((g=a==null?void 0:a.formatParams)==null?void 0:g[a.interpolationkey])||{},v=b.locale||b.lng||a.locale||a.lng||r;m=this.formats[d](u,v,{...p,...a,...b})}catch(b){this.logger.warn(b)}return m}else this.logger.warn(`there was no format function for ${d}`);return u},t)}}const G$=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class H$ extends Tf{constructor(t,n,r){var o,s;let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=a,this.logger=Jr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],(s=(o=this.backend)==null?void 0:o.init)==null||s.call(o,r,a.backend,a)}queueLoad(t,n,r,a){const o={},s={},u={},c={};return t.forEach(d=>{let p=!0;n.forEach(g=>{const m=`${d}|${g}`;!r.reload&&this.store.hasResourceBundle(d,g)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?s[m]===void 0&&(s[m]=!0):(this.state[m]=1,p=!1,s[m]===void 0&&(s[m]=!0),o[m]===void 0&&(o[m]=!0),c[g]===void 0&&(c[g]=!0)))}),p||(u[d]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(c)}}loaded(t,n,r){const a=t.split("|"),o=a[0],s=a[1];n&&this.emit("failedLoading",o,s,n),!n&&r&&this.store.addResourceBundle(o,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const u={};this.queue.forEach(c=>{C$(c.loaded,[o],s),G$(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(d=>{u[d]||(u[d]={});const p=c.loaded[d];p.length&&p.forEach(g=>{u[d][g]===void 0&&(u[d][g]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(c=>!c.done)}read(t,n,r){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:a,wait:o,callback:s});return}this.readingCalls++;const u=(d,p)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(d&&p&&as?1:0})}function rN(e){var t=As(e.x,2),n=t[0],r=t[1],a=As(e.y,2),o=a[0],s=a[1],u=Math.max(r-n,s-o),c=(r+n)/2,d=(s+o)/2;(u===0||Math.abs(u)===1/0||isNaN(u))&&(u=1),isNaN(c)&&(c=0),isNaN(d)&&(d=0);var p=function(m){return{x:.5+(m.x-c)/u,y:.5+(m.y-d)/u}};return p.applyTo=function(g){g.x=.5+(g.x-c)/u,g.y=.5+(g.y-d)/u},p.inverse=function(g){return{x:c+u*(g.x-.5),y:d+u*(g.y-.5)}},p.ratio=u,p}function gk(e){"@babel/helpers - typeof";return gk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gk(e)}function aN(e,t){var n=t.size;if(n!==0){var r=e.length;e.length+=n;var a=0;t.forEach(function(o){e[r+a]=o,a++})}}function Zh(e){e=e||{};for(var t=0,n=arguments.length<=1?0:arguments.length-1;ts?1:0})}function rN(e){var t=As(e.x,2),n=t[0],r=t[1],a=As(e.y,2),o=a[0],s=a[1],u=Math.max(r-n,s-o),c=(r+n)/2,d=(s+o)/2;(u===0||Math.abs(u)===1/0||isNaN(u))&&(u=1),isNaN(c)&&(c=0),isNaN(d)&&(d=0);var p=function(m){return{x:.5+(m.x-c)/u,y:.5+(m.y-d)/u}};return p.applyTo=function(g){g.x=.5+(g.x-c)/u,g.y=.5+(g.y-d)/u},p.inverse=function(g){return{x:c+u*(g.x-.5),y:d+u*(g.y-.5)}},p.ratio=u,p}function gk(e){"@babel/helpers - typeof";return gk=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gk(e)}function aN(e,t){var n=t.size;if(n!==0){var r=e.length;e.length+=n;var a=0;t.forEach(function(o){e[r+a]=o,a++})}}function Zh(e){e=e||{};for(var t=0,n=arguments.length<=1?0:arguments.length-1;t0},a.prototype.addChild=function(N,F){this.children[N]=F,++this.countChildren},a.prototype.getChild=function(N){if(!this.children.hasOwnProperty(N)){var F=new a;this.children[N]=F,++this.countChildren}return this.children[N]},a.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var N=this;for(var F in N.children){var I=N.children[F];I.x+=N.x,I.y+=N.y,I.applyPositionToChildren()}}};function o(N,F,I){for(var L in F.children){var H=F.children[L];H.hasChildren()?o(N,H,I):I[H.id]={x:H.x,y:H.y}}}function s(N,F){var I=N.r-F.r,L=F.x-N.x,H=F.y-N.y;return I<0||I*I0?(Se=re*U[j+s]*ee[G+_]/Re,U[j+n]+=Ee*Se,U[j+r]+=we*Se):Re<0&&(Se=-re*U[j+s]*ee[G+_]/Math.sqrt(Re),U[j+n]+=Ee*Se,U[j+r]+=we*Se):Re>0&&(Se=re*U[j+s]*ee[G+_]/Re,U[j+n]+=Ee*Se,U[j+r]+=we*Se),G=ee[G+R],G<0)break;continue}else{G=ee[G+x];continue}else{if(D=ee[G+b],D>=0&&D!==j&&(Ee=U[j+e]-U[D+e],we=U[j+t]-U[D+t],Re=Ee*Ee+we*we,oe===!0?Re>0?(Se=re*U[j+s]*U[D+s]/Re,U[j+n]+=Ee*Se,U[j+r]+=we*Se):Re<0&&(Se=-re*U[j+s]*U[D+s]/Math.sqrt(Re),U[j+n]+=Ee*Se,U[j+r]+=we*Se):Re>0&&(Se=re*U[j+s]*U[D+s]/Re,U[j+n]+=Ee*Se,U[j+r]+=we*Se)),G=ee[G+R],G<0)break;continue}else for(re=$.scalingRatio,P=0;P
0},a.prototype.addChild=function(C,F){this.children[C]=F,++this.countChildren},a.prototype.getChild=function(C){if(!this.children.hasOwnProperty(C)){var F=new a;this.children[C]=F,++this.countChildren}return this.children[C]},a.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var C=this;for(var F in C.children){var I=C.children[F];I.x+=C.x,I.y+=C.y,I.applyPositionToChildren()}}};function o(C,F,I){for(var L in F.children){var H=F.children[L];H.hasChildren()?o(C,H,I):I[H.id]={x:H.x,y:H.y}}}function s(C,F){var I=C.r-F.r,L=F.x-C.x,H=F.y-C.y;return I<0||I*I0?(Se=re*U[j+s]*ee[G+_]/Re,U[j+n]+=Ee*Se,U[j+r]+=we*Se):Re<0&&(Se=-re*U[j+s]*ee[G+_]/Math.sqrt(Re),U[j+n]+=Ee*Se,U[j+r]+=we*Se):Re>0&&(Se=re*U[j+s]*ee[G+_]/Re,U[j+n]+=Ee*Se,U[j+r]+=we*Se),G=ee[G+R],G<0)break;continue}else{G=ee[G+x];continue}else{if(D=ee[G+b],D>=0&&D!==j&&(Ee=U[j+e]-U[D+e],we=U[j+t]-U[D+t],Re=Ee*Ee+we*we,oe===!0?Re>0?(Se=re*U[j+s]*U[D+s]/Re,U[j+n]+=Ee*Se,U[j+r]+=we*Se):Re<0&&(Se=-re*U[j+s]*U[D+s]/Math.sqrt(Re),U[j+n]+=Ee*Se,U[j+r]+=we*Se):Re>0&&(Se=re*U[j+s]*U[D+s]/Re,U[j+n]+=Ee*Se,U[j+r]+=we*Se)),G=ee[G+R],G<0)break;continue}else for(re=$.scalingRatio,P=0;P