@mindflight/mindbrain-personal-studio 0.6.1
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.
- package/.env.example +50 -0
- package/README.md +134 -0
- package/bin/mindbrain-studio.mjs +20 -0
- package/build/client/_app/immutable/assets/2.BXRKVU9n.css +1 -0
- package/build/client/_app/immutable/assets/2.BXRKVU9n.css.br +0 -0
- package/build/client/_app/immutable/assets/2.BXRKVU9n.css.gz +0 -0
- package/build/client/_app/immutable/chunks/-OSExkSk.js +2 -0
- package/build/client/_app/immutable/chunks/-OSExkSk.js.br +0 -0
- package/build/client/_app/immutable/chunks/-OSExkSk.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BIHI7g3E.js +1 -0
- package/build/client/_app/immutable/chunks/BIHI7g3E.js.br +2 -0
- package/build/client/_app/immutable/chunks/BIHI7g3E.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BJB7pSge.js +1 -0
- package/build/client/_app/immutable/chunks/BJB7pSge.js.br +0 -0
- package/build/client/_app/immutable/chunks/BJB7pSge.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BNUkRZqg.js +1 -0
- package/build/client/_app/immutable/chunks/BNUkRZqg.js.br +0 -0
- package/build/client/_app/immutable/chunks/BNUkRZqg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BP2JbIUZ.js +1 -0
- package/build/client/_app/immutable/chunks/BP2JbIUZ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BP2JbIUZ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BVrgUHq-.js +1 -0
- package/build/client/_app/immutable/chunks/BVrgUHq-.js.br +0 -0
- package/build/client/_app/immutable/chunks/BVrgUHq-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BmeSanva.js +1 -0
- package/build/client/_app/immutable/chunks/BmeSanva.js.br +0 -0
- package/build/client/_app/immutable/chunks/BmeSanva.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BnkCgNCx.js +1 -0
- package/build/client/_app/immutable/chunks/BnkCgNCx.js.br +0 -0
- package/build/client/_app/immutable/chunks/BnkCgNCx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C5KYKPa8.js +311 -0
- package/build/client/_app/immutable/chunks/C5KYKPa8.js.br +0 -0
- package/build/client/_app/immutable/chunks/C5KYKPa8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CBDzfqXr.js +1 -0
- package/build/client/_app/immutable/chunks/CBDzfqXr.js.br +0 -0
- package/build/client/_app/immutable/chunks/CBDzfqXr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cp9dXlPT.js +1 -0
- package/build/client/_app/immutable/chunks/Cp9dXlPT.js.br +0 -0
- package/build/client/_app/immutable/chunks/Cp9dXlPT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D0daF8Eh.js +2 -0
- package/build/client/_app/immutable/chunks/D0daF8Eh.js.br +0 -0
- package/build/client/_app/immutable/chunks/D0daF8Eh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D4SoBmS0.js +1 -0
- package/build/client/_app/immutable/chunks/D4SoBmS0.js.br +0 -0
- package/build/client/_app/immutable/chunks/D4SoBmS0.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DpVrWha3.js +1 -0
- package/build/client/_app/immutable/chunks/DpVrWha3.js.br +0 -0
- package/build/client/_app/immutable/chunks/DpVrWha3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DyXQogav.js +1 -0
- package/build/client/_app/immutable/chunks/DyXQogav.js.br +0 -0
- package/build/client/_app/immutable/chunks/DyXQogav.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Gs0cNFYG.js +1 -0
- package/build/client/_app/immutable/chunks/Gs0cNFYG.js.br +0 -0
- package/build/client/_app/immutable/chunks/Gs0cNFYG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/NXeHtWpC.js +1 -0
- package/build/client/_app/immutable/chunks/NXeHtWpC.js.br +0 -0
- package/build/client/_app/immutable/chunks/NXeHtWpC.js.gz +0 -0
- package/build/client/_app/immutable/chunks/i0D5dc1Y.js +1 -0
- package/build/client/_app/immutable/chunks/i0D5dc1Y.js.br +0 -0
- package/build/client/_app/immutable/chunks/i0D5dc1Y.js.gz +0 -0
- package/build/client/_app/immutable/chunks/nnWk1BBo.js +1 -0
- package/build/client/_app/immutable/chunks/nnWk1BBo.js.br +0 -0
- package/build/client/_app/immutable/chunks/nnWk1BBo.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CVz6aYsT.js +2 -0
- package/build/client/_app/immutable/entry/app.CVz6aYsT.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CVz6aYsT.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.Bt5tVOz8.js +1 -0
- package/build/client/_app/immutable/entry/start.Bt5tVOz8.js.br +2 -0
- package/build/client/_app/immutable/entry/start.Bt5tVOz8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.C2sXq0eH.js +1 -0
- package/build/client/_app/immutable/nodes/0.C2sXq0eH.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.C2sXq0eH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BBtxY46Q.js +1 -0
- package/build/client/_app/immutable/nodes/1.BBtxY46Q.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BBtxY46Q.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.D0pSa9ko.js +9 -0
- package/build/client/_app/immutable/nodes/2.D0pSa9ko.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.D0pSa9ko.js.gz +0 -0
- package/build/client/_app/version.json +1 -0
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/client/robots.txt +3 -0
- package/build/client/robots.txt.br +0 -0
- package/build/client/robots.txt.gz +0 -0
- package/build/env.js +70 -0
- package/build/env.js.map +1 -0
- package/build/handler.js +26 -0
- package/build/handler.js.map +1 -0
- package/build/index.js +149 -0
- package/build/index.js.map +1 -0
- package/build/server/chunks/chunks/edgeLinkModes.js-CfRqrZtd.js +50 -0
- package/build/server/chunks/chunks/edgeLinkModes.js-CfRqrZtd.js.map +1 -0
- package/build/server/chunks/chunks/environment.js-Bf8x1V_n.js +16 -0
- package/build/server/chunks/chunks/environment.js-Bf8x1V_n.js.map +1 -0
- package/build/server/chunks/chunks/exports.js-DFR3riS9.js +217 -0
- package/build/server/chunks/chunks/exports.js-DFR3riS9.js.map +1 -0
- package/build/server/chunks/chunks/false.js-CRHihH2U.js +4 -0
- package/build/server/chunks/chunks/false.js-CRHihH2U.js.map +1 -0
- package/build/server/chunks/chunks/graphRepository.js-D2DARfVY.js +280 -0
- package/build/server/chunks/chunks/graphRepository.js-D2DARfVY.js.map +1 -0
- package/build/server/chunks/chunks/internal.js-D8EA_he2.js +119 -0
- package/build/server/chunks/chunks/internal.js-D8EA_he2.js.map +1 -0
- package/build/server/chunks/chunks/mindbrainClient.js-BFAJqRSL.js +108 -0
- package/build/server/chunks/chunks/mindbrainClient.js-BFAJqRSL.js.map +1 -0
- package/build/server/chunks/chunks/ontologyInspect.js-Dm3l7KgF.js +13 -0
- package/build/server/chunks/chunks/ontologyInspect.js-Dm3l7KgF.js.map +1 -0
- package/build/server/chunks/chunks/render-context.js-CTu5Wkzp.js +475 -0
- package/build/server/chunks/chunks/render-context.js-CTu5Wkzp.js.map +1 -0
- package/build/server/chunks/chunks/renderer.js-DsOhU1UZ.js +1243 -0
- package/build/server/chunks/chunks/renderer.js-DsOhU1UZ.js.map +1 -0
- package/build/server/chunks/chunks/root.js-DCnlE3XY.js +2815 -0
- package/build/server/chunks/chunks/root.js-DCnlE3XY.js.map +1 -0
- package/build/server/chunks/chunks/shared-server.js-DaWdgxVh.js +11 -0
- package/build/server/chunks/chunks/shared-server.js-DaWdgxVh.js.map +1 -0
- package/build/server/chunks/chunks/shared.js-DuDDTJVi.js +1338 -0
- package/build/server/chunks/chunks/shared.js-DuDDTJVi.js.map +1 -0
- package/build/server/chunks/chunks/utils.js-DGYJFmnf.js +39 -0
- package/build/server/chunks/chunks/utils.js-DGYJFmnf.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/brain/_...path_/_server.ts.js-MgPpKBks.js +82 -0
- package/build/server/chunks/entries/endpoints/api/brain/_...path_/_server.ts.js-MgPpKBks.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/brain/health/_server.ts.js-DnJQNmWV.js +19 -0
- package/build/server/chunks/entries/endpoints/api/brain/health/_server.ts.js-DnJQNmWV.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/graph/_server.ts.js-Bxo7qHVz.js +37 -0
- package/build/server/chunks/entries/endpoints/api/graph/_server.ts.js-Bxo7qHVz.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/graph/count/_server.ts.js-BajaLnqp.js +37 -0
- package/build/server/chunks/entries/endpoints/api/graph/count/_server.ts.js-BajaLnqp.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/graph/ontologies/_server.ts.js-BFq2mbbX.js +146 -0
- package/build/server/chunks/entries/endpoints/api/graph/ontologies/_server.ts.js-BFq2mbbX.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/graph/schema-registry/_server.ts.js-Dyfsc-VA.js +154 -0
- package/build/server/chunks/entries/endpoints/api/graph/schema-registry/_server.ts.js-Dyfsc-VA.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/projections/catalog/_server.ts.js-Ds1RymA0.js +351 -0
- package/build/server/chunks/entries/endpoints/api/projections/catalog/_server.ts.js-Ds1RymA0.js.map +1 -0
- package/build/server/chunks/entries/fallbacks/error.svelte.js-B7V4yZjo.js +51 -0
- package/build/server/chunks/entries/fallbacks/error.svelte.js-B7V4yZjo.js.map +1 -0
- package/build/server/chunks/entries/pages/_layout.svelte.js-CoC9BAeH.js +15 -0
- package/build/server/chunks/entries/pages/_layout.svelte.js-CoC9BAeH.js.map +1 -0
- package/build/server/chunks/entries/pages/_page.svelte.js-DMEbD3K6.js +891 -0
- package/build/server/chunks/entries/pages/_page.svelte.js-DMEbD3K6.js.map +1 -0
- package/build/server/chunks/handler-BjXBCd1c.js +1698 -0
- package/build/server/chunks/handler-BjXBCd1c.js.map +1 -0
- package/build/server/chunks/index.js-BJYcV8V7.js +4183 -0
- package/build/server/chunks/index.js-BJYcV8V7.js.map +1 -0
- package/build/server/chunks/manifest.js-Ddaot0P4.js +91 -0
- package/build/server/chunks/manifest.js-Ddaot0P4.js.map +1 -0
- package/build/server/chunks/nodes/0.js-87v83UX9.js +9 -0
- package/build/server/chunks/nodes/0.js-87v83UX9.js.map +1 -0
- package/build/server/chunks/nodes/1.js-BRigw_9J.js +9 -0
- package/build/server/chunks/nodes/1.js-BRigw_9J.js.map +1 -0
- package/build/server/chunks/nodes/2.js-D9-B_qyX.js +9 -0
- package/build/server/chunks/nodes/2.js-D9-B_qyX.js.map +1 -0
- package/build/shims.js +33 -0
- package/build/shims.js.map +1 -0
- package/fixtures/minimal-graph.sqlite +0 -0
- package/package.json +81 -0
- package/scripts/backend-sqlite.mjs +190 -0
- package/scripts/build-serenity-v6-concept-review-pack.mjs +493 -0
- package/scripts/build-serenity-v6-review-pack.mjs +479 -0
- package/scripts/create-serenity-production-v6.mjs +627 -0
- package/scripts/dev-sqlite.mjs +86 -0
- package/scripts/export-serenity-v6-backup.mjs +178 -0
- package/scripts/import-serenity-v6-user-decisions.mjs +543 -0
- package/scripts/lib/sqlite-runtime.mjs +197 -0
- package/scripts/materialize-serenity-v6-snapshots.mjs +675 -0
- package/scripts/publish-npm.mjs +134 -0
- package/scripts/seed-immeuble-projections.mjs +169 -0
- package/scripts/studio-sqlite.mjs +74 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b4 as _e,aZ as mt,aK as A,a1 as U,a3 as T,aJ as ne,b6 as wt}from"./BnkCgNCx.js";import{o as Ve}from"./BNUkRZqg.js";const D=[];function Re(e,t=_e){let n=null;const r=new Set;function a(o){if(mt(e,o)&&(e=o,n)){const l=!D.length;for(const c of r)c[1](),D.push(c,e);if(l){for(let c=0;c<D.length;c+=2)D[c][0](D[c+1]);D.length=0}}}function i(o){a(o(e))}function s(o,l=_e){const c=[o,l];return r.add(c),r.size===1&&(n=t(a,i)||_e),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:a,update:i,subscribe:s}}class xe{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Le{constructor(t,n){this.status=t,this.location=n}}class Ae extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function vt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function yt(e){return e.split("%25").map(decodeURI).join("%25")}function bt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function me({href:e}){return e.split("#")[0]}function kt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function Et(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const St=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||"GET")!=="GET"&&W.delete(Ue(e)),St(e,t));const W=new Map;function Rt(e,t){const n=Ue(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:a,...i}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&W.set(n,{body:a,init:i,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=Et(a)),Promise.resolve(new Response(a,i))}return window.fetch(e,t)}function xt(e,t,n){if(W.size>0){const r=Ue(e,n),a=W.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n?.cache))return new Response(a.body,a.init);W.delete(r)}}return window.fetch(t,n)}function Ue(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${kt(...a)}"]`}return r}const Lt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function At(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Tt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const i=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(i)return t.push({name:i[1],matcher:i[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return we(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return we(String.fromCharCode(...l.slice(2).split("-").map(_=>parseInt(_,16))));const f=Lt.exec(l),[,p,w,h,u]=f;return t.push({name:h,matcher:u,optional:!!p,rest:!!w,chained:w?c===1&&s[0]==="":!1}),w?"([^]*?)":p?"([^/]*)?":"([^/]+?)"}return we(l)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function Tt(e){return e.slice(1).split("/").filter(Ut)}function It(e,t,n){const r={},a=e.slice(1),i=a.filter(o=>o!==void 0);let s=0;for(let o=0;o<t.length;o+=1){const l=t[o];let c=a[o-s];if(l.chained&&l.rest&&s&&(c=a.slice(o-s,o+1).filter(f=>f).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const f=t[o+1],p=a[o+1];f&&!f.rest&&f.optional&&p&&l.chained&&(s=0),!f&&!p&&Object.keys(r).length===i.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function we(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ot({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[l,c,f]])=>{const{pattern:p,params:w}=At(o),h={id:o,exec:u=>{const _=p.exec(u);if(_)return It(_,w,r)},errors:[1,...f||[]].map(u=>e[u]),layouts:[0,...c||[]].map(s),leaf:i(l)};return h.errors.length=h.layouts.length=Math.max(h.errors.length,h.layouts.length),h});function i(o){const l=o<0;return l&&(o=~o),[l,e[o]]}function s(o){return o===void 0?o:[a.has(o),e[o]]}}function Ye(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Ke(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const L=globalThis.__sveltekit_1i9q8jd?.base??"",jt=globalThis.__sveltekit_1i9q8jd?.assets??L??"",Pt="1782718824257",He="sveltekit:snapshot",Xe="sveltekit:scroll",Ze="sveltekit:states",$t="sveltekit:pageurl",K="sveltekit:history",Y="sveltekit:navigation",C={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Te=location.origin;function Qe(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function N(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Be={...C,"":C.hover};function et(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function tt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=et(e)}}function be(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,i=!r||!!a||de(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),s=r?.origin===Te&&e.hasAttribute("download");return{url:r,external:i,target:a,download:s}}function re(e){let t=null,n=null,r=null,a=null,i=null,s=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),i===null&&(i=V(o,"reload")),s===null&&(s=V(o,"replacestate")),o=et(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Be[r??"off"],preload_data:Be[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(i),replace_state:l(s)}}function Me(e){const t=Re(e);let n=!0;function r(){n=!0,t.update(s=>s)}function a(s){n=!1,t.set(s)}function i(s){let o;return t.subscribe(l=>{(o===void 0||n&&l!==o)&&s(o=l)})}return{notify:r,set:a,subscribe:i}}const nt={v:()=>{}};function Ct(){const{set:e,subscribe:t}=Re(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${jt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==Pt;return s&&(e(!0),nt.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:t,check:r}}function de(e,t,n){return e.origin!==Te||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const rt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...rt];const qt=new Set([...rt]);[...qt];function Nt(e){return e.filter(t=>t!=null)}function Ie(e){return e instanceof xe||e instanceof Ae?e.status:500}function Dt(e){return e instanceof Ae?e.text:"Internal Error"}let E,H,ve;const Vt=Ve.toString().includes("$$")||/function \w+\(\) \{\}/.test(Ve.toString()),ze="a:";Vt?(E={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ze)},H={current:null},ve={current:!1}):(E=new class{#e=A({});get data(){return U(this.#e)}set data(t){T(this.#e,t)}#t=A(null);get form(){return U(this.#t)}set form(t){T(this.#t,t)}#n=A(null);get error(){return U(this.#n)}set error(t){T(this.#n,t)}#r=A({});get params(){return U(this.#r)}set params(t){T(this.#r,t)}#a=A({id:null});get route(){return U(this.#a)}set route(t){T(this.#a,t)}#o=A({});get state(){return U(this.#o)}set state(t){T(this.#o,t)}#s=A(-1);get status(){return U(this.#s)}set status(t){T(this.#s,t)}#i=A(new URL(ze));get url(){return U(this.#i)}set url(t){T(this.#i,t)}},H=new class{#e=A(null);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},ve=new class{#e=A(!1);get current(){return U(this.#e)}set current(t){T(this.#e,t)}},nt.v=()=>ve.current=!0);function Kt(e){Object.assign(E,e)}const Bt=new Set(["icon","shortcut icon","apple-touch-icon"]);let F=null;const $=Ye(Xe)??{},X=Ye(He)??{},P={url:Me({}),page:Me({}),navigating:Re(null),updated:Ct()};function Oe(e){$[e]=N()}function Mt(e,t){let n=e+1;for(;$[n];)delete $[n],n+=1;for(n=t+1;X[n];)delete X[n],n+=1}function Z(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function at(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Fe(){}let je,ke,ae,I,Ee,y;const oe=[],se=[];let R=null;function ie(){R?.fork?.then(e=>e?.discard()),R=null}const te=new Map,ot=new Set,zt=new Set,J=new Set;let m={branch:[],error:null,url:null},st=!1,le=!1,Ge=!0,Q=!1,G=!1,it=!1,Pe=!1,lt,v,x,q;const ce=new Set,We=new Map;async function gn(e,t,n){globalThis.__sveltekit_1i9q8jd&&(globalThis.__sveltekit_1i9q8jd.query,globalThis.__sveltekit_1i9q8jd.prerender),document.URL!==location.href&&(location.href=location.href),y=e,await e.hooks.init?.(),je=Ot(e),I=document.documentElement,Ee=t,ke=e.nodes[0],ae=e.nodes[1],ke(),ae(),v=history.state?.[K],x=history.state?.[Y],v||(v=x=Date.now(),history.replaceState({...history.state,[K]:v,[Y]:x},""));const r=$[v];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await an(Ee,n)):(await B({type:"enter",url:Qe(y.hash?ln(new URL(location.href)):location.href),replace_state:!0}),a()),rn()}function Ft(){oe.length=0,Pe=!1}function ct(e){se.some(t=>t?.snapshot)&&(X[e]=se.map(t=>t?.snapshot?.capture()))}function ut(e){X[e]?.forEach((t,n)=>{se[n]?.snapshot?.restore(t)})}function Je(){Oe(v),Ke(Xe,$),ct(x),Ke(He,X)}async function Gt(e,t,n,r){let a;t.invalidateAll&&ie(),await B({type:"goto",url:Qe(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Pe=!0,a=[],We.forEach((i,s)=>{for(const o of i.keys())a.push(s+"/"+o)})),t.invalidate&&t.invalidate.forEach(nn)}}),t.invalidateAll&&ne().then(ne).then(()=>{We.forEach((i,s)=>{i.forEach(({resource:o},l)=>{a?.includes(s+"/"+l)&&o.refresh?.()})})})}async function Wt(e){if(e.id!==R?.id){ie();const t={};ce.add(t),R={id:e.id,token:t,promise:dt({...e,preload:t}).then(n=>(ce.delete(t),n.type==="loaded"&&n.state.error&&ie(),n)),fork:null}}return R.promise}async function ye(e){const t=(await he(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(n=>n[1]()))}async function ft(e,t,n){const r={params:m.params,route:{id:m.route?.id??null},url:new URL(location.href)};m={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(E,e.props.page),lt=new y.root({target:t,props:{...e.props,stores:P,components:se},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),ut(x),n){const i={from:null,to:{...r,scroll:$[v]??N()},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(s=>s(i))}le=!0}async function ue({url:e,params:t,branch:n,errors:r,status:a,error:i,route:s,form:o}){let l="never";if(L&&(e.pathname===L||e.pathname===L+"/"))l="always";else for(const u of n)u?.slash!==void 0&&(l=u.slash);e.pathname=vt(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:i,route:s},props:{constructors:Nt(n).map(u=>u.node.component),page:De(E)}};o!==void 0&&(c.props.form=o);let f={},p=!E,w=0;for(let u=0;u<Math.max(n.length,m.branch.length);u+=1){const _=n[u],g=m.branch[u];_?.data!==g?.data&&(p=!0),_&&(f={...f,..._.data},p&&(c.props[`data_${w}`]=f),w+=1)}return(!m.url||e.href!==m.url.href||m.error!==i||o!==void 0&&o!==E.form||p)&&(c.props.page={error:i,params:t,route:{id:s?.id??null},state:{},status:a,url:new URL(e),form:o??null,data:p?f:E.data}),c}async function $e({loader:e,parent:t,url:n,params:r,route:a,server_data_node:i}){let s=null;const o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:i,universal:l.universal?.load?{type:"data",data:s,uses:o}:null,data:s??i?.data??null,slash:l.universal?.trailingSlash??i?.slash}}function Jt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const i=le?xt(r,a.href,t):Rt(r,t);return{resolved:a,promise:i}}function Yt(e,t,n,r,a,i){if(Pe)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(i[s]!==m.params[s])return!0;for(const s of a.dependencies)if(oe.some(o=>o(new URL(s))))return!0;return!1}function Ce(e,t){return e?.type==="data"?e:e?.type==="skip"?t??null:null}function Ht(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),i=t.searchParams.getAll(r);a.every(s=>i.includes(s))&&i.every(s=>a.includes(s))&&n.delete(r)}return n}function Xt({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:De(E),constructors:[]}}}async function dt({id:e,invalidating:t,url:n,params:r,route:a,preload:i}){if(R?.id===e)return ce.delete(R.token),R.promise;const{errors:s,layouts:o,leaf:l}=a,c=[...o,l];s.forEach(g=>g?.().catch(()=>{})),c.forEach(g=>g?.[1]().catch(()=>{}));const f=m.url?e!==fe(m.url):!1,p=m.route?a.id!==m.route.id:!1,w=Ht(m.url,n);let h=!1;const u=c.map(async(g,d)=>{if(!g)return;const b=m.branch[d];return g[1]===b?.loader&&!Yt(h,p,f,w,b.universal?.uses,r)?b:(h=!0,$e({loader:g[1],url:n,params:r,route:a,parent:async()=>{const O={};for(let j=0;j<d;j+=1)Object.assign(O,(await u[j])?.data);return O},server_data_node:Ce(g[0]?{type:"skip"}:null,g[0]?b?.server:void 0)}))});for(const g of u)g.catch(()=>{});const _=[];for(let g=0;g<c.length;g+=1)if(c[g])try{_.push(await u[g])}catch(d){if(d instanceof Le)return{type:"redirect",location:d.location};if(ce.has(i))return Xt({error:await ee(d,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=Ie(d),S;if(d instanceof xe)S=d.body;else{if(await P.updated.check())return await at(),await Z(n);S=await ee(d,{params:r,url:n,route:{id:a.id}})}const O=await Zt(g,_,s);return O?ue({url:n,params:r,branch:_.slice(0,O.idx).concat(O.node),errors:s,status:b,error:S,route:a}):await pt(n,{id:a.id},S,b)}else _.push(void 0);return ue({url:n,params:r,branch:_,errors:s,status:200,error:null,route:a,form:t?void 0:null})}async function Zt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function qe({status:e,error:t,url:n,route:r}){const a={};let i=null;try{const s=await $e({loader:ke,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Ce(i)}),o={node:await ae(),loader:ae,universal:null,server:null,data:null};return ue({url:n,params:a,branch:[s,o],status:e,error:t,errors:[],route:null})}catch(s){if(s instanceof Le)return Gt(new URL(s.location,location.href),{},0);throw s}}async function Qt(e){const t=e.href;if(te.has(t))return te.get(t);let n;try{const r=(async()=>{let a=await y.hooks.reroute({url:new URL(e),fetch:async(i,s)=>Jt(i,s,e).promise})??e;if(typeof a=="string"){const i=new URL(e);y.hash?i.hash=a:i.pathname=a,a=i}return a})();te.set(t,r),n=await r}catch{te.delete(t);return}return n}async function he(e,t){if(e&&!de(e,L,y.hash)){const n=await Qt(e);if(!n)return;const r=en(n);for(const a of je){const i=a.exec(r);if(i)return{id:fe(e),invalidating:t,route:a,params:bt(i),url:e}}}}function en(e){return yt(y.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function fe(e){return(y.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:n,delta:r,event:a,scroll:i}){let s=!1;const o=Ne(m,n,e,t,i??null);r!==void 0&&(o.navigation.delta=r),a!==void 0&&(o.navigation.event=a);const l={...o.navigation,cancel:()=>{s=!0,o.reject(new Error("navigation cancelled"))}};return Q||ot.forEach(c=>c(l)),s?null:o}async function B({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s={},redirect_count:o=0,nav_token:l={},accept:c=Fe,block:f=Fe,event:p}){const w=q;q=l;const h=await he(t,!1),u=e==="enter"?Ne(m,h,t,e):ht({url:t,type:e,delta:n?.delta,intent:h,scroll:n?.scroll,event:p});if(!u){f(),q===l&&(q=w);return}const _=v,g=x;c(),Q=!0,le&&u.navigation.type!=="enter"&&P.navigating.set(H.current=u.navigation);let d=h&&await dt(h);if(!d){if(de(t,L,y.hash))return await Z(t,i);d=await pt(t,{id:null},await ee(new Ae(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,i)}if(t=h?.url||t,q!==l)return u.reject(new Error("navigation aborted")),!1;if(d.type==="redirect"){if(o<20){await B({type:e,url:new URL(d.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:i,state:s,redirect_count:o+1,nav_token:l}),u.fulfil(void 0);return}d=await qe({status:500,error:await ee(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else d.props.page.status>=400&&await P.updated.check()&&(await at(),await Z(t,i));if(Ft(),Oe(_),ct(g),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),s=n?n.state:s,!n){const k=i?0:1,M={[K]:v+=k,[Y]:x+=k,[Ze]:s};(i?history.replaceState:history.pushState).call(history,M,"",t),i||Mt(v,x)}const b=h&&R?.id===h.id?R.fork:null;R?.fork&&!b&&ie(),R=null,d.props.page.state=s;let S;if(le){const k=(await Promise.all(Array.from(zt,z=>z(u.navigation)))).filter(z=>typeof z=="function");if(k.length>0){let z=function(){k.forEach(ge=>{J.delete(ge)})};k.push(z),k.forEach(ge=>{J.add(ge)})}const M=u.navigation.to;m={...d.state,nav:{params:M.params,route:M.route,url:M.url}},d.props.page&&(d.props.page.url=t);const pe=b&&await b;pe?S=pe.commit():(F=null,lt.$set(d.props),F&&Object.assign(d.props.page,F),Kt(d.props.page),S=wt?.()),it=!0}else await ft(d,Ee,!1);const{activeElement:O}=document;await S,await ne(),await ne();let j=null;if(Ge){const k=n?n.scroll:a?N():null;k?scrollTo(k.x,k.y):(j=t.hash&&document.getElementById(gt(t)))?j.scrollIntoView():scrollTo(0,0)}const _t=document.activeElement!==O&&document.activeElement!==document.body;!r&&!_t&&sn(t,!j),Ge=!0,d.props.page&&(F&&Object.assign(d.props.page,F),Object.assign(E,d.props.page)),Q=!1,e==="popstate"&&ut(x),u.fulfil(void 0),u.navigation.to&&(u.navigation.to.scroll=N()),J.forEach(k=>k(u.navigation)),P.navigating.set(H.current=null)}async function pt(e,t,n,r,a){return e.origin===Te&&e.pathname===location.pathname&&!st?await qe({status:r,error:n,url:e,route:t}):await Z(e,a)}function tn(){let e,t={element:void 0,href:void 0},n;I.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(e),e=setTimeout(()=>{i(l,C.hover)},20)});function r(o){o.defaultPrevented||i(o.composedPath()[0],C.tap)}I.addEventListener("mousedown",r),I.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(ye(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function i(o,l){const c=tt(o,I),f=c===t.element&&c?.href===t.href&&l>=n;if(!c||f)return;const{url:p,external:w,download:h}=be(c,L,y.hash);if(w||h)return;const u=re(c),_=p&&fe(m.url)===fe(p);if(!(u.reload||_))if(l<=u.preload_data){t={element:c,href:c.href},n=C.tap;const g=await he(p,!1);if(!g)return;Wt(g)}else l<=u.preload_code&&(t={element:c,href:c.href},n=l,ye(p))}function s(){a.disconnect();for(const o of I.querySelectorAll("a")){const{url:l,external:c,download:f}=be(o,L,y.hash);if(c||f)continue;const p=re(o);p.reload||(p.preload_code===C.viewport&&a.observe(o),p.preload_code===C.eager&&ye(l))}}J.add(s),s()}function ee(e,t){if(e instanceof xe)return e.body;const n=Ie(e),r=Dt(e);return y.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function nn(e){if(typeof e=="function")oe.push(e);else{const{href:t}=new URL(e,location.href);oe.push(n=>n.href===t)}}function rn(){history.scrollRestoration="manual",addEventListener("beforeunload",t=>{let n=!1;if(Je(),!Q){const r=Ne(m,void 0,null,"leave"),a={...r.navigation,cancel:()=>{n=!0,r.reject(new Error("navigation cancelled"))}};ot.forEach(i=>i(a))}n?(t.preventDefault(),t.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Je()}),navigator.connection?.saveData||tn(),I.addEventListener("click",async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;const n=tt(t.composedPath()[0],I);if(!n)return;const{url:r,external:a,target:i,download:s}=be(n,L,y.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const o=re(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||s)return;const[c,f]=(y.hash?r.hash.replace(/^#/,""):r.href).split("#"),p=c===me(location);if(a||o.reload&&(!p||!f)){ht({url:r,type:"link",event:t})?Q=!0:t.preventDefault();return}if(f!==void 0&&p){const[,w]=m.url.href.split("#");if(w===f){if(t.preventDefault(),f===""||f==="top"&&n.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const h=n.ownerDocument.getElementById(decodeURIComponent(f));h&&(h.scrollIntoView(),h.focus())}return}if(G=!0,Oe(v),e(r),!o.replace_state)return;G=!1}t.preventDefault(),await new Promise(w=>{requestAnimationFrame(()=>{setTimeout(w,0)}),setTimeout(w,100)}),await B({type:"link",url:r,keepfocus:o.keepfocus,noscroll:o.noscroll,replace_state:o.replace_state??r.href===location.href,event:t})}),I.addEventListener("submit",t=>{if(t.defaultPrevented)return;const n=HTMLFormElement.prototype.cloneNode.call(t.target),r=t.submitter;if((r?.formTarget||n.target)==="_blank"||(r?.formMethod||n.method)!=="get")return;const s=new URL(r?.hasAttribute("formaction")&&r?.formAction||n.action);if(de(s,L,!1))return;const o=t.target,l=re(o);if(l.reload)return;t.preventDefault(),t.stopPropagation();const c=new FormData(o,r);s.search=new URLSearchParams(c).toString(),B({type:"form",url:s,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??s.href===location.href,event:t})}),addEventListener("popstate",async t=>{if(!Se){if(t.state?.[K]){const n=t.state[K];if(q={},n===v)return;const r=$[n],a=t.state[Ze]??{},i=new URL(t.state[$t]??location.href),s=t.state[Y],o=m.url?me(location)===me(m.url):!1;if(s===x&&(it||o)){a!==E.state&&(E.state=a),e(i),$[v]=N(),r&&scrollTo(r.x,r.y),v=n;return}const c=n-v;await B({type:"popstate",url:i,popped:{state:a,scroll:r,delta:c},accept:()=>{v=n,x=s},block:()=>{history.go(-c)},nav_token:q,event:t})}else if(!G){const n=new URL(location.href);e(n),y.hash&&location.reload()}}}),addEventListener("hashchange",()=>{G&&(G=!1,history.replaceState({...history.state,[K]:++v,[Y]:x},"",location.href))});for(const t of document.querySelectorAll("link"))Bt.has(t.rel)&&(t.href=t.href);addEventListener("pageshow",t=>{t.persisted&&P.navigating.set(H.current=null)});function e(t){m.url=E.url=t,P.page.set(De(E)),P.page.notify()}}async function an(e,{status:t=200,error:n,node_ids:r,params:a,route:i,server_route:s,data:o,form:l}){st=!0;const c=new URL(location.href);let f;({params:a={},route:i={id:null}}=await he(c,!1)||{}),f=je.find(({id:h})=>h===i.id);let p,w=!0;try{const h=r.map(async(_,g)=>{const d=o[g];return d?.uses&&(d.uses=on(d.uses)),$e({loader:y.nodes[_],url:c,params:a,route:i,parent:async()=>{const b={};for(let S=0;S<g;S+=1)Object.assign(b,(await h[S]).data);return b},server_data_node:Ce(d)})}),u=await Promise.all(h);if(f){const _=f.layouts;for(let g=0;g<_.length;g++)_[g]||u.splice(g,0,void 0)}p=await ue({url:c,params:a,branch:u,status:t,error:n,errors:f?.errors,form:l,route:f??null})}catch(h){if(h instanceof Le){await Z(new URL(h.location,location.href));return}p=await qe({status:Ie(h),error:await ee(h,{url:c,params:a,route:i}),url:c,route:i}),e.textContent="",w=!1}p.props.page&&(p.props.page.state={}),await ft(p,e,w)}function on(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}let Se=!1;function sn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=gt(e);if(r&&document.getElementById(r)){const{x:i,y:s}=N();setTimeout(()=>{const o=history.state;Se=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(o,"",e),t&&scrollTo(i,s),Se=!1})}else{const i=document.body,s=i.getAttribute("tabindex");i.tabIndex=-1,i.focus({preventScroll:!0,focusVisible:!1}),s!==null?i.setAttribute("tabindex",s):i.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const i=[];for(let s=0;s<a.rangeCount;s+=1)i.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===i.length){for(let s=0;s<a.rangeCount;s+=1){const o=i[s],l=a.getRangeAt(s);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Ne(e,t,n,r,a=null){let i,s;const o=new Promise((c,f)=>{i=c,s=f});return o.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:N()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:a},willUnload:!t,type:r,complete:o},fulfil:i,reject:s}}function De(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function ln(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function gt(e){let t;if(y.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{gn as a,fn as l,E as p,P as s};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Vt=Array.isArray,Ut=Array.prototype.indexOf,ae=Array.prototype.includes,Ln=Array.from,jn=Object.defineProperty,de=Object.getOwnPropertyDescriptor,Bt=Object.getOwnPropertyDescriptors,Gt=Object.prototype,zt=Array.prototype,lt=Object.getPrototypeOf,We=Object.isExtensible;const Kt=()=>{};function Xt(e){for(var t=0;t<e.length;t++)e[t]()}function ft(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function Yn(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const E=2,le=4,we=8,ot=1<<24,H=16,M=32,Q=64,Zt=128,k=512,g=1024,b=2048,F=4096,C=8192,P=16384,se=32768,Je=1<<25,Te=65536,Ce=1<<17,$t=1<<18,ye=1<<19,ut=1<<20,Hn=1<<25,ee=65536,Pe=1<<21,ke=1<<22,U=1<<23,W=Symbol("$state"),qn=Symbol("legacy props"),Vn=Symbol(""),Y=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Bn=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Gn=1,Ne=3,ct=8;function Wt(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Jt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function zn(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Qt(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function en(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function tn(e){throw new Error("https://svelte.dev/e/effect_orphan")}function nn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Kn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Xn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function rn(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function sn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function an(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Zn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const $n=1,Wn=2,Jn=4,Qn=8,er=16,tr=1,nr=4,rr=8,sr=16,ir=1,ar=2,ln="[",fn="[!",lr="[?",on="]",He={},m=Symbol(),un="http://www.w3.org/1999/xhtml",fr="http://www.w3.org/2000/svg";function qe(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function or(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function ur(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let te=!1;function cr(e){te=e}let A;function fe(e){if(e===null)throw qe(),He;return A=e}function _r(){return fe(K(A))}function vr(e){if(te){if(K(A)!==null)throw qe(),He;A=e}}function dr(e=1){if(te){for(var t=e,n=A;t--;)n=K(n);A=n}}function hr(e=!0){for(var t=0,n=A;;){if(n.nodeType===ct){var r=n.data;if(r===on){if(t===0)return n;t-=1}else(r===ln||r===fn||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var s=K(n);e&&n.remove(),n=s}}function pr(e){if(!e||e.nodeType!==ct)throw qe(),He;return e.data}function _t(e){return e===this.v}function cn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function vt(e){return!cn(e,this.v)}let S=null;function Ae(e){S=e}function wr(e){return ht().get(e)}function yr(e,t){return ht().set(e,t),t}function gr(e,t=!1,n){S={p:S,i:!1,c:null,e:null,s:e,x:null,r:d,l:null}}function Er(e){var t=S,n=t.e;if(n!==null){t.e=null;for(var r of n)Ot(r)}return e!==void 0&&(t.x=e),t.i=!0,S=t.p,e??{}}function dt(){return!0}function ht(e){return S===null&&Wt(),S.c??=new Map(_n(S)||void 0)}function _n(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let Z=[];function pt(){var e=Z;Z=[],Xt(e)}function Qe(e){if(Z.length===0&&!he){var t=Z;queueMicrotask(()=>{t===Z&&pt()})}Z.push(e)}function vn(){for(;Z.length>0;)pt()}function dn(e){var t=d;if(t===null)return v.f|=U,e;if((t.f&se)===0&&(t.f&le)===0)throw e;xe(e,t)}function xe(e,t){for(;t!==null;){if((t.f&Zt)!==0){if((t.f&se)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const hn=-7169;function y(e,t){e.f=e.f&hn|t}function Ve(e){(e.f&k)!==0||e.deps===null?y(e,g):y(e,F)}function wt(e){if(e!==null)for(const t of e)(t.f&E)===0||(t.f&ee)===0||(t.f^=ee,wt(t.deps))}function pn(e,t,n){(e.f&b)!==0?t.add(e):(e.f&F)!==0&&n.add(e),wt(e.deps),y(e,g)}const q=new Set;let w=null,D=null,Me=null,he=!1,De=!1,ie=null,me=null;var et=0;let wn=1;class G{id=wn++;current=new Map;previous=new Map;#l=new Set;#f=new Set;#r=new Map;#t=new Map;#_=null;#e=[];#v=[];#i=new Set;#s=new Set;#n=new Map;is_fork=!1;#o=!1;#a=new Set;#u(){return this.is_fork||this.#t.size>0}#p(){for(const r of this.#a)for(const s of r.#t.keys()){for(var t=!1,n=s;n.parent!==null;){if(this.#n.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#n.has(t)||this.#n.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#n.get(t);if(n){this.#n.delete(t);for(var r of n.d)y(r,b),this.schedule(r);for(r of n.m)y(r,F),this.schedule(r)}}#c(){if(et++>1e3&&(q.delete(this),gn()),!this.#u()){for(const a of this.#i)this.#s.delete(a),y(a,b),this.schedule(a);for(const a of this.#s)y(a,F),this.schedule(a)}const t=this.#e;this.#e=[],this.apply();var n=ie=[],r=[],s=me=[];for(const a of t)try{this.#d(a,n,r)}catch(l){throw Et(a),l}if(w=null,s.length>0){var i=G.ensure();for(const a of s)i.schedule(a)}if(ie=null,me=null,this.#u()||this.#p()){this.#h(r),this.#h(n);for(const[a,l]of this.#n)gt(a,l)}else{this.#r.size===0&&q.delete(this),this.#i.clear(),this.#s.clear();for(const a of this.#l)a(this);this.#l.clear(),tt(r),tt(n),this.#_?.resolve()}var o=w;if(this.#e.length>0){const a=o??=this;a.#e.push(...this.#e.filter(l=>!a.#e.includes(l)))}o!==null&&(q.add(o),o.#c()),q.has(this)||this.#w()}#d(t,n,r){t.f^=g;for(var s=t.first;s!==null;){var i=s.f,o=(i&(M|Q))!==0,a=o&&(i&g)!==0,l=a||(i&C)!==0||this.#n.has(s);if(!l&&s.fn!==null){o?s.f^=g:(i&le)!==0?n.push(s):ge(s)&&((i&H)!==0&&this.#s.add(s),ue(s));var u=s.first;if(u!==null){s=u;continue}}for(;s!==null;){var f=s.next;if(f!==null){s=f;break}s=s.parent}}}#h(t){for(var n=0;n<t.length;n+=1)pn(t[n],this.#i,this.#s)}capture(t,n,r=!1){n!==m&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&U)===0&&(this.current.set(t,[t.v,r]),D?.set(t,t.v))}activate(){w=this}deactivate(){w=null,D=null}flush(){try{De=!0,w=this,this.#c()}finally{et=0,Me=null,ie=null,me=null,De=!1,w=null,D=null,B.clear()}}discard(){for(const t of this.#f)t(this);this.#f.clear(),q.delete(this)}register_created_effect(t){this.#v.push(t)}#w(){for(const f of q){var t=f.id<this.id,n=[];for(const[c,[_,p]]of this.current){if(f.current.has(c)){var r=f.current.get(c)[0];if(t&&_!==r)f.current.set(c,[_,p]);else continue}n.push(c)}var s=[...f.current.keys()].filter(c=>!this.current.has(c));if(s.length===0)t&&f.discard();else if(n.length>0){f.activate();var i=new Set,o=new Map;for(var a of n)yt(a,s,i,o);o=new Map;var l=[...f.current.keys()].filter(c=>this.current.has(c)?this.current.get(c)[0]!==c:!0);for(const c of this.#v)(c.f&(P|C|Ce))===0&&Ue(c,l,o)&&((c.f&(ke|H))!==0?(y(c,b),f.schedule(c)):f.#i.add(c));if(f.#e.length>0){f.apply();for(var u of f.#e)f.#d(u,[],[]);f.#e=[]}f.deactivate()}}for(const f of q)f.#a.has(this)&&(f.#a.delete(this),f.#a.size===0&&!f.#u()&&(f.activate(),f.#c()))}increment(t,n){let r=this.#r.get(n)??0;if(this.#r.set(n,r+1),t){let s=this.#t.get(n)??0;this.#t.set(n,s+1)}}decrement(t,n,r){let s=this.#r.get(n)??0;if(s===1?this.#r.delete(n):this.#r.set(n,s-1),t){let i=this.#t.get(n)??0;i===1?this.#t.delete(n):this.#t.set(n,i-1)}this.#o||r||(this.#o=!0,Qe(()=>{this.#o=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#i.add(r);for(const r of n)this.#s.add(r);t.clear(),n.clear()}oncommit(t){this.#l.add(t)}ondiscard(t){this.#f.add(t)}settled(){return(this.#_??=ft()).promise}static ensure(){if(w===null){const t=w=new G;De||(q.add(w),he||Qe(()=>{w===t&&t.flush()}))}return w}apply(){{D=null;return}}schedule(t){if(Me=t,t.b?.is_pending&&(t.f&(le|we|ot))!==0&&(t.f&se)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(ie!==null&&n===d&&(v===null||(v.f&E)===0))return;if((r&(Q|M))!==0){if((r&g)===0)return;n.f^=g}}this.#e.push(n)}}function yn(e){var t=he;he=!0;try{for(var n;;){if(vn(),w===null)return n;w.flush()}}finally{he=t}}function gn(){try{nn()}catch(e){xe(e,Me)}}let j=null;function tt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(P|C))===0&&ge(r)&&(j=new Set,ue(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&It(r),j?.size>0)){B.clear();for(const s of j){if((s.f&(P|C))!==0)continue;const i=[s];let o=s.parent;for(;o!==null;)j.has(o)&&(j.delete(o),i.push(o)),o=o.parent;for(let a=i.length-1;a>=0;a--){const l=i[a];(l.f&(P|C))===0&&ue(l)}}j.clear()}}j=null}}function yt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const i=s.f;(i&E)!==0?yt(s,t,n,r):(i&(ke|H))!==0&&(i&b)===0&&Ue(s,t,r)&&(y(s,b),Be(s))}}function Ue(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(ae.call(t,s))return!0;if((s.f&E)!==0&&Ue(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function Be(e){w.schedule(e)}function gt(e,t){if(!((e.f&M)!==0&&(e.f&g)!==0)){(e.f&b)!==0?t.d.push(e):(e.f&F)!==0&&t.m.push(e),y(e,g);for(var n=e.first;n!==null;)gt(n,t),n=n.next}}function Et(e){y(e,g);for(var t=e.first;t!==null;)Et(t),t=t.next}function En(e,t,n,r){const s=Ge;var i=e.filter(_=>!_.settled);if(n.length===0&&i.length===0){r(t.map(s));return}var o=d,a=mn(),l=i.length===1?i[0].promise:i.length>1?Promise.all(i.map(_=>_.promise)):null;function u(_){a();try{r(_)}catch(p){(o.f&P)===0&&xe(p,o)}Se()}if(n.length===0){l.then(()=>u(t.map(s)));return}var f=mt();function c(){Promise.all(n.map(_=>bn(_))).then(_=>u([...t.map(s),..._])).catch(_=>xe(_,o)).finally(()=>f())}l?l.then(()=>{a(),c(),Se()}):c()}function mn(){var e=d,t=v,n=S,r=w;return function(i=!0){oe(e),z(t),Ae(n),i&&(e.f&P)===0&&(r?.activate(),r?.apply())}}function Se(e=!0){oe(null),z(null),Ae(null),e&&w?.deactivate()}function mt(){var e=d,t=e.b,n=w,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(s=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,s)}}function Ge(e){var t=E|b,n=v!==null&&(v.f&E)!==0?v:null;return d!==null&&(d.f|=ye),{ctx:S,deps:null,effects:null,equals:_t,f:t,fn:e,reactions:null,rv:0,v:m,wv:0,parent:n??d,ac:null}}function bn(e,t,n){let r=d;r===null&&Jt();var s=void 0,i=Ke(m),o=!v,a=new Map;return Dn(()=>{var l=d,u=ft();s=u.promise;try{Promise.resolve(e()).then(u.resolve,u.reject).finally(Se)}catch(p){u.reject(p),Se()}var f=w;if(o){if((l.f&se)!==0)var c=mt();if(r.b.is_rendered())a.get(f)?.reject(Y),a.delete(f);else{for(const p of a.values())p.reject(Y);a.clear()}a.set(f,u)}const _=(p,h=void 0)=>{if(c){var O=h===Y;c(O)}if(!(h===Y||(l.f&P)!==0)){if(f.activate(),h)i.f|=U,Le(i,h);else{(i.f&U)!==0&&(i.f^=U),Le(i,p);for(const[ce,Ee]of a){if(a.delete(ce),ce===f)break;Ee.reject(Y)}}f.deactivate()}};u.promise.then(_,p=>_(null,p||"unknown"))}),On(()=>{for(const l of a.values())l.reject(Y)}),new Promise(l=>{function u(f){function c(){f===s?l(i):u(s)}f.then(c,c)}u(s)})}function mr(e){const t=Ge(e);return Mt(t),t}function br(e){const t=Ge(e);return t.equals=vt,t}function Tn(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)ne(t[n])}}function An(e){for(var t=e.parent;t!==null;){if((t.f&E)===0)return(t.f&P)===0?t:null;t=t.parent}return null}function ze(e){var t,n=d;oe(An(e));try{e.f&=~ee,Tn(e),t=Yt(e)}finally{oe(n)}return t}function bt(e){var t=e.v,n=ze(e);if(!e.equals(n)&&(e.wv=Lt(),(!w?.is_fork||e.deps===null)&&(e.v=n,w?.capture(e,t,!0),e.deps===null))){y(e,g);return}re||(D!==null?(Nt()||w?.is_fork)&&D.set(e,n):Ve(e))}function xn(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Y),t.teardown=Kt,t.ac=null,pe(t,0),$e(t))}function Tt(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&ue(t)}let Fe=new Set;const B=new Map;let At=!1;function Ke(e,t){var n={f:0,v:e,reactions:null,equals:_t,rv:0,wv:0};return n}function V(e,t){const n=Ke(e);return Mt(n),n}function Tr(e,t=!1,n=!0){const r=Ke(e);return t||(r.equals=vt),r}function X(e,t,n=!1){v!==null&&(!I||(v.f&Ce)!==0)&&dt()&&(v.f&(E|H|ke|Ce))!==0&&(N===null||!ae.call(N,e))&&an();let r=n?_e(t):t;return Le(e,r,me)}function Le(e,t,n=null){if(!e.equals(t)){var r=e.v;re?B.set(e,t):B.set(e,r),e.v=t;var s=G.ensure();if(s.capture(e,r),(e.f&E)!==0){const i=e;(e.f&b)!==0&&ze(i),D===null&&Ve(i)}e.wv=Lt(),xt(e,b,n),d!==null&&(d.f&g)!==0&&(d.f&(M|Q))===0&&(R===null?Mn([e]):R.push(e)),!s.is_fork&&Fe.size>0&&!At&&Sn()}return t}function Sn(){At=!1;for(const e of Fe)(e.f&g)!==0&&y(e,F),ge(e)&&ue(e);Fe.clear()}function Ie(e){X(e,e.v+1)}function xt(e,t,n){var r=e.reactions;if(r!==null)for(var s=r.length,i=0;i<s;i++){var o=r[i],a=o.f,l=(a&b)===0;if(l&&y(o,t),(a&E)!==0){var u=o;D?.delete(u),(a&ee)===0&&(a&k&&(o.f|=ee),xt(u,F,n))}else if(l){var f=o;(a&H)!==0&&j!==null&&j.add(f),n!==null?n.push(f):Be(f)}}}function _e(e){if(typeof e!="object"||e===null||W in e)return e;const t=lt(e);if(t!==Gt&&t!==zt)return e;var n=new Map,r=Vt(e),s=V(0),i=J,o=a=>{if(J===i)return a();var l=v,u=J;z(null),at(i);var f=a();return z(l),at(u),f};return r&&n.set("length",V(e.length)),new Proxy(e,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&rn();var f=n.get(l);return f===void 0?o(()=>{var c=V(u.value);return n.set(l,c),c}):X(f,u.value,!0),!0},deleteProperty(a,l){var u=n.get(l);if(u===void 0){if(l in a){const f=o(()=>V(m));n.set(l,f),Ie(s)}}else X(u,m),Ie(s);return!0},get(a,l,u){if(l===W)return e;var f=n.get(l),c=l in a;if(f===void 0&&(!c||de(a,l)?.writable)&&(f=o(()=>{var p=_e(c?a[l]:m),h=V(p);return h}),n.set(l,f)),f!==void 0){var _=ve(f);return _===m?void 0:_}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var f=n.get(l);f&&(u.value=ve(f))}else if(u===void 0){var c=n.get(l),_=c?.v;if(c!==void 0&&_!==m)return{enumerable:!0,configurable:!0,value:_,writable:!0}}return u},has(a,l){if(l===W)return!0;var u=n.get(l),f=u!==void 0&&u.v!==m||Reflect.has(a,l);if(u!==void 0||d!==null&&(!f||de(a,l)?.writable)){u===void 0&&(u=o(()=>{var _=f?_e(a[l]):m,p=V(_);return p}),n.set(l,u));var c=ve(u);if(c===m)return!1}return f},set(a,l,u,f){var c=n.get(l),_=l in a;if(r&&l==="length")for(var p=u;p<c.v;p+=1){var h=n.get(p+"");h!==void 0?X(h,m):p in a&&(h=o(()=>V(m)),n.set(p+"",h))}if(c===void 0)(!_||de(a,l)?.writable)&&(c=o(()=>V(void 0)),X(c,_e(u)),n.set(l,c));else{_=c.v!==m;var O=o(()=>_e(u));X(c,O)}var ce=Reflect.getOwnPropertyDescriptor(a,l);if(ce?.set&&ce.set.call(f,u),!_){if(r&&typeof l=="string"){var Ee=n.get("length"),Oe=Number(l);Number.isInteger(Oe)&&Oe>=Ee.v&&X(Ee,Oe+1)}Ie(s)}return!0},ownKeys(a){ve(s);var l=Reflect.ownKeys(a).filter(c=>{var _=n.get(c);return _===void 0||_.v!==m});for(var[u,f]of n)f.v!==m&&!(u in a)&&l.push(u);return l},setPrototypeOf(){sn()}})}function nt(e){try{if(e!==null&&typeof e=="object"&&W in e)return e[W]}catch{}return e}function Ar(e,t){return Object.is(nt(e),nt(t))}var rt,Rn,St,Rt;function xr(){if(rt===void 0){rt=window,Rn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;St=de(t,"firstChild").get,Rt=de(t,"nextSibling").get,We(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),We(n)&&(n.__t=void 0)}}function Re(e=""){return document.createTextNode(e)}function je(e){return St.call(e)}function K(e){return Rt.call(e)}function Sr(e,t){if(!te)return je(e);var n=je(A);if(n===null)n=A.appendChild(Re());else if(t&&n.nodeType!==Ne){var r=Re();return n?.before(r),fe(r),r}return t&&Xe(n),fe(n),n}function Rr(e,t=!1){if(!te){var n=je(e);return n instanceof Comment&&n.data===""?K(n):n}if(t){if(A?.nodeType!==Ne){var r=Re();return A?.before(r),fe(r),r}Xe(A)}return A}function kr(e,t=1,n=!1){let r=te?A:e;for(var s;t--;)s=r,r=K(r);if(!te)return r;if(n){if(r?.nodeType!==Ne){var i=Re();return r===null?s?.after(i):r.before(i),fe(i),i}Xe(r)}return fe(r),r}function Nr(e){e.textContent=""}function Or(){return!1}function Dr(e,t,n){return document.createElementNS(t??un,e,void 0)}function Xe(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ne;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}let st=!1;function kn(){st||(st=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Ze(e){var t=v,n=d;z(null),oe(null);try{return e()}finally{z(t),oe(n)}}function Ir(e,t,n,r=n){e.addEventListener(t,()=>Ze(n));const s=e.__on_r;s?e.__on_r=()=>{s(),r(!0)}:e.__on_r=()=>r(!0),kn()}function kt(e){d===null&&(v===null&&tn(),en()),re&&Qt()}function Nn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function L(e,t){var n=d;n!==null&&(n.f&C)!==0&&(e|=C);var r={ctx:S,deps:null,nodes:null,f:e|b|k,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};w?.register_created_effect(r);var s=r;if((e&le)!==0)ie!==null?ie.push(r):G.ensure().schedule(r);else if(t!==null){try{ue(r)}catch(o){throw ne(r),o}s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&ye)===0&&(s=s.first,(e&H)!==0&&(e&Te)!==0&&s!==null&&(s.f|=Te))}if(s!==null&&(s.parent=n,n!==null&&Nn(s,n),v!==null&&(v.f&E)!==0&&(e&Q)===0)){var i=v;(i.effects??=[]).push(s)}return r}function Nt(){return v!==null&&!I}function On(e){const t=L(we,null);return y(t,g),t.teardown=e,t}function Cr(e){kt();var t=d.f,n=!v&&(t&M)!==0&&(t&se)===0;if(n){var r=S;(r.e??=[]).push(e)}else return Ot(e)}function Ot(e){return L(le|ut,e)}function Pr(e){return kt(),L(we|ut,e)}function Mr(e){G.ensure();const t=L(Q|ye,e);return(n={})=>new Promise(r=>{n.outro?Pn(t,()=>{ne(t),r(void 0)}):(ne(t),r(void 0))})}function Fr(e){return L(le,e)}function Dn(e){return L(ke|ye,e)}function Lr(e,t=0){return L(we|t,e)}function jr(e,t=[],n=[],r=[]){En(r,t,n,s=>{L(we,()=>e(...s.map(ve)))})}function Yr(e,t=0){var n=L(H|t,e);return n}function Hr(e){return L(M|ye,e)}function Dt(e){var t=e.teardown;if(t!==null){const n=re,r=v;it(!0),z(null);try{t.call(null)}finally{it(n),z(r)}}}function $e(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&&Ze(()=>{s.abort(Y)});var r=n.next;(n.f&Q)!==0?n.parent=null:ne(n,t),n=r}}function In(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&M)===0&&ne(t),t=n}}function ne(e,t=!0){var n=!1;(t||(e.f&$t)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Cn(e.nodes.start,e.nodes.end),n=!0),y(e,Je),$e(e,t&&!n),pe(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const i of r)i.stop();Dt(e),e.f^=Je,e.f|=P;var s=e.parent;s!==null&&s.first!==null&&It(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Cn(e,t){for(;e!==null;){var n=e===t?null:K(e);e.remove(),e=n}}function It(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Pn(e,t,n=!0){var r=[];Ct(e,r,!0);var s=()=>{n&&ne(e),t&&t()},i=r.length;if(i>0){var o=()=>--i||s();for(var a of r)a.out(o)}else s()}function Ct(e,t,n){if((e.f&C)===0){e.f^=C;var r=e.nodes&&e.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&t.push(a);for(var s=e.first;s!==null;){var i=s.next,o=(s.f&Te)!==0||(s.f&M)!==0&&(e.f&H)!==0;Ct(s,t,o?n:!1),s=i}}}function qr(e){Pt(e,!0)}function Pt(e,t){if((e.f&C)!==0){e.f^=C,(e.f&g)===0&&(y(e,b),G.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&Te)!==0||(n.f&M)!==0;Pt(n,s?t:!1),n=r}var i=e.nodes&&e.nodes.t;if(i!==null)for(const o of i)(o.is_global||t)&&o.in()}}function Vr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:K(n);t.append(n),n=s}}let be=!1,re=!1;function it(e){re=e}let v=null,I=!1;function z(e){v=e}let d=null;function oe(e){d=e}let N=null;function Mt(e){v!==null&&(N===null?N=[e]:N.push(e))}let T=null,x=0,R=null;function Mn(e){R=e}let Ft=1,$=0,J=$;function at(e){J=e}function Lt(){return++Ft}function ge(e){var t=e.f;if((t&b)!==0)return!0;if(t&E&&(e.f&=~ee),(t&F)!==0){for(var n=e.deps,r=n.length,s=0;s<r;s++){var i=n[s];if(ge(i)&&bt(i),i.wv>e.wv)return!0}(t&k)!==0&&D===null&&y(e,g)}return!1}function jt(e,t,n=!0){var r=e.reactions;if(r!==null&&!(N!==null&&ae.call(N,e)))for(var s=0;s<r.length;s++){var i=r[s];(i.f&E)!==0?jt(i,t,!1):t===i&&(n?y(i,b):(i.f&g)!==0&&y(i,F),Be(i))}}function Yt(e){var t=T,n=x,r=R,s=v,i=N,o=S,a=I,l=J,u=e.f;T=null,x=0,R=null,v=(u&(M|Q))===0?e:null,N=null,Ae(e.ctx),I=!1,J=++$,e.ac!==null&&(Ze(()=>{e.ac.abort(Y)}),e.ac=null);try{e.f|=Pe;var f=e.fn,c=f();e.f|=se;var _=e.deps,p=w?.is_fork;if(T!==null){var h;if(p||pe(e,x),_!==null&&x>0)for(_.length=x+T.length,h=0;h<T.length;h++)_[x+h]=T[h];else e.deps=_=T;if(Nt()&&(e.f&k)!==0)for(h=x;h<_.length;h++)(_[h].reactions??=[]).push(e)}else!p&&_!==null&&x<_.length&&(pe(e,x),_.length=x);if(dt()&&R!==null&&!I&&_!==null&&(e.f&(E|F|b))===0)for(h=0;h<R.length;h++)jt(R[h],e);if(s!==null&&s!==e){if($++,s.deps!==null)for(let O=0;O<n;O+=1)s.deps[O].rv=$;if(t!==null)for(const O of t)O.rv=$;R!==null&&(r===null?r=R:r.push(...R))}return(e.f&U)!==0&&(e.f^=U),c}catch(O){return dn(O)}finally{e.f^=Pe,T=t,x=n,R=r,v=s,N=i,Ae(o),I=a,J=l}}function Fn(e,t){let n=t.reactions;if(n!==null){var r=Ut.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}if(n===null&&(t.f&E)!==0&&(T===null||!ae.call(T,t))){var i=t;(i.f&k)!==0&&(i.f^=k,i.f&=~ee),Ve(i),xn(i),pe(i,0)}}function pe(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Fn(e,n[r])}function ue(e){var t=e.f;if((t&P)===0){y(e,g);var n=d,r=be;d=e,be=!0;try{(t&(H|ot))!==0?In(e):$e(e),Dt(e);var s=Yt(e);e.teardown=typeof s=="function"?s:null,e.wv=Ft;var i}finally{be=r,d=n}}}async function Ur(){await Promise.resolve(),yn()}function Br(){return G.ensure().settled()}function ve(e){var t=e.f,n=(t&E)!==0;if(v!==null&&!I){var r=d!==null&&(d.f&P)!==0;if(!r&&(N===null||!ae.call(N,e))){var s=v.deps;if((v.f&Pe)!==0)e.rv<$&&(e.rv=$,T===null&&s!==null&&s[x]===e?x++:T===null?T=[e]:T.push(e));else{(v.deps??=[]).push(e);var i=e.reactions;i===null?e.reactions=[v]:ae.call(i,v)||i.push(v)}}}if(re&&B.has(e))return B.get(e);if(n){var o=e;if(re){var a=o.v;return((o.f&g)===0&&o.reactions!==null||qt(o))&&(a=ze(o)),B.set(o,a),a}var l=(o.f&k)===0&&!I&&v!==null&&(be||(v.f&k)!==0),u=(o.f&se)===0;ge(o)&&(l&&(o.f|=k),bt(o)),l&&!u&&(Tt(o),Ht(o))}if(D?.has(e))return D.get(e);if((e.f&U)!==0)throw e.v;return e.v}function Ht(e){if(e.f|=k,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&E)!==0&&(t.f&k)===0&&(Tt(t),Ht(t))}function qt(e){if(e.v===m)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(B.has(t)||(t.f&E)!==0&&qt(t))return!0;return!1}function Gr(e){var t=I;try{return I=!0,e()}finally{I=t}}function zr(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(W in e)Ye(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&W in n&&Ye(n)}}}function Ye(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{Ye(e[r],t)}catch{}const n=lt(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=Bt(n);for(let s in r){const i=r[s].get;if(i)try{i.call(e)}catch{}}}}}export{Xn as $,gr as A,Er as B,ct as C,Sr as D,Te as E,vr as F,kr as G,$t as H,Bn as I,Dr as J,d as K,Vn as L,Rn as M,un as N,ar as O,_r as P,Ne as Q,se as R,Xe as S,ir as T,pr as U,hr as V,Fr as W,Lr as X,Je as Y,W as Z,de as _,w as a,Ar as a$,nr as a0,ve as a1,_e as a2,X as a3,re as a4,P as a5,rr as a6,tr as a7,Ge as a8,br as a9,Kn as aA,Nr as aB,Mr as aC,Ln as aD,on as aE,qe as aF,yn as aG,Tr as aH,Pr as aI,Ur as aJ,V as aK,mr as aL,Hn as aM,zn as aN,$n as aO,er as aP,Wn as aQ,C as aR,M as aS,Vt as aT,Jn as aU,Qn as aV,Gn as aW,fr as aX,zr as aY,cn as aZ,or as a_,sr as aa,qn as ab,Nt as ac,Ke as ad,Ie as ae,Zt as af,fn as ag,lr as ah,pn as ai,oe as aj,z as ak,Ae as al,G as am,dn as an,v as ao,Le as ap,dr as aq,xe as ar,Zn as as,ur as at,jn as au,On as av,Ze as aw,xr as ax,ln as ay,He as az,Hr as b,Ir as b0,Yn as b1,wr as b2,yr as b3,Kt as b4,rt as b5,Br as b6,Re as c,ne as d,A as e,S as f,Gr as g,te as h,Yr as i,lt as j,Bt as k,Wt as l,Vr as m,kn as n,ye as o,Pn as p,Qe as q,qr as r,Or as s,K as t,Cr as u,cr as v,fe as w,je as x,Rr as y,jr as z};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
function Te(e,r){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var t=n.call(e,r);if(typeof t!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function re(e){var r=Te(e,"string");return typeof r=="symbol"?r:r+""}function F(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function Y(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,re(t.key),t)}}function S(e,r,n){return r&&Y(e.prototype,r),n&&Y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},k(e)}function ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ne=function(){return!!e})()}function Ee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ge(e,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ee(e)}function O(e,r,n){return r=k(r),ge(e,ne()?Reflect.construct(r,n||[],k(e).constructor):r.apply(e,n))}function H(e,r){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,t){return n.__proto__=t,n},H(e,r)}function D(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&H(e,r)}function Re(e){if(Array.isArray(e))return e}function be(e,r){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var t,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,r===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(t=o.call(n)).done)&&(s.push(t.value),s.length!==r);l=!0);}catch(c){u=!0,i=c}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}function $(e,r){(r==null||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}function Ae(e,r){if(e){if(typeof e=="string")return $(e,r);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,r):void 0}}function ye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(e,r){return Re(e)||be(e,r)||Ae(e,r)||ye()}var G={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},ie=new Int8Array(4),U=new Int32Array(ie.buffer,0,1),Fe=new Float32Array(ie.buffer,0,1),Se=/^\s*rgba?\s*\(/,Ce=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function we(e){var r=0,n=0,t=0,i=1;if(e[0]==="#")e.length===4?(r=parseInt(e.charAt(1)+e.charAt(1),16),n=parseInt(e.charAt(2)+e.charAt(2),16),t=parseInt(e.charAt(3)+e.charAt(3),16)):(r=parseInt(e.charAt(1)+e.charAt(2),16),n=parseInt(e.charAt(3)+e.charAt(4),16),t=parseInt(e.charAt(5)+e.charAt(6),16)),e.length===9&&(i=parseInt(e.charAt(7)+e.charAt(8),16)/255);else if(Se.test(e)){var o=e.match(Ce);o&&(r=+o[1],n=+o[2],t=+o[3],o[4]&&(i=+o[4]))}return{r,g:n,b:t,a:i}}var w={};for(var P in G)w[P]=I(G[P]),w[G[P]]=w[P];function te(e,r,n,t,i){return U[0]=t<<24|n<<16|r<<8|e,U[0]=U[0]&4278190079,Fe[0]}function I(e){if(e=e.toLowerCase(),typeof w[e]<"u")return w[e];var r=we(e),n=r.r,t=r.g,i=r.b,o=r.a;o=o*255|0;var a=te(n,t,i,o);return w[e]=a,a}var z={};function oe(e){if(typeof z[e]<"u")return z[e];var r=(e&16711680)>>>16,n=(e&65280)>>>8,t=e&255,i=255,o=te(r,n,t,i);return z[e]=o,o}function tr(e,r,n,t){return n+(r<<8)+(e<<16)}function or(e,r,n,t,i,o){var a=Math.floor(n/o*i),s=Math.floor(e.drawingBufferHeight/o-t/o*i),l=new Uint8Array(4);e.bindFramebuffer(e.FRAMEBUFFER,r),e.readPixels(a,s,1,1,e.RGBA,e.UNSIGNED_BYTE,l);var u=pe(l,4),c=u[0],h=u[1],_=u[2],m=u[3];return[c,h,_,m]}function R(e,r,n){return(r=re(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function X(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,t)}return n}function N(e){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?X(Object(n),!0).forEach(function(t){R(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ke(e,r){for(;!{}.hasOwnProperty.call(e,r)&&(e=k(e))!==null;);return e}function V(){return V=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,r,n){var t=ke(e,r);if(t){var i=Object.getOwnPropertyDescriptor(t,r);return i.get?i.get.call(arguments.length<3?e:n):i.value}},V.apply(null,arguments)}function ae(e,r,n,t){var i=V(k(e.prototype),r,n);return typeof i=="function"?function(o){return i.apply(n,o)}:i}function Ne(e){return e.normalized?1:e.size}function x(e){var r=0;return e.forEach(function(n){return r+=Ne(n)}),r}function se(e,r,n){var t=e==="VERTEX"?r.VERTEX_SHADER:r.FRAGMENT_SHADER,i=r.createShader(t);if(i===null)throw new Error("loadShader: error while creating the shader");r.shaderSource(i,n),r.compileShader(i);var o=r.getShaderParameter(i,r.COMPILE_STATUS);if(!o){var a=r.getShaderInfoLog(i);throw r.deleteShader(i),new Error(`loadShader: error while compiling the shader:
|
|
3
|
+
`.concat(a,`
|
|
4
|
+
`).concat(n))}return i}function Oe(e,r){return se("VERTEX",e,r)}function De(e,r){return se("FRAGMENT",e,r)}function Le(e,r){var n=e.createProgram();if(n===null)throw new Error("loadProgram: error while creating the program.");var t,i;for(t=0,i=r.length;t<i;t++)e.attachShader(n,r[t]);e.linkProgram(n);var o=e.getProgramParameter(n,e.LINK_STATUS);if(!o)throw e.deleteProgram(n),new Error("loadProgram: error while linking the program.");return n}function q(e){var r=e.gl,n=e.buffer,t=e.program,i=e.vertexShader,o=e.fragmentShader;r.deleteShader(i),r.deleteShader(o),r.deleteProgram(t),r.deleteBuffer(n)}var K=`#define PICKING_MODE
|
|
5
|
+
`,Ie=R(R(R(R(R(R(R(R({},WebGL2RenderingContext.BOOL,1),WebGL2RenderingContext.BYTE,1),WebGL2RenderingContext.UNSIGNED_BYTE,1),WebGL2RenderingContext.SHORT,2),WebGL2RenderingContext.UNSIGNED_SHORT,2),WebGL2RenderingContext.INT,4),WebGL2RenderingContext.UNSIGNED_INT,4),WebGL2RenderingContext.FLOAT,4),le=(function(){function e(r,n,t){F(this,e),R(this,"array",new Float32Array),R(this,"constantArray",new Float32Array),R(this,"capacity",0),R(this,"verticesCount",0);var i=this.getDefinition();if(this.VERTICES=i.VERTICES,this.VERTEX_SHADER_SOURCE=i.VERTEX_SHADER_SOURCE,this.FRAGMENT_SHADER_SOURCE=i.FRAGMENT_SHADER_SOURCE,this.UNIFORMS=i.UNIFORMS,this.ATTRIBUTES=i.ATTRIBUTES,this.METHOD=i.METHOD,this.CONSTANT_ATTRIBUTES="CONSTANT_ATTRIBUTES"in i?i.CONSTANT_ATTRIBUTES:[],this.CONSTANT_DATA="CONSTANT_DATA"in i?i.CONSTANT_DATA:[],this.isInstanced="CONSTANT_ATTRIBUTES"in i,this.ATTRIBUTES_ITEMS_COUNT=x(this.ATTRIBUTES),this.STRIDE=this.VERTICES*this.ATTRIBUTES_ITEMS_COUNT,this.renderer=t,this.normalProgram=this.getProgramInfo("normal",r,i.VERTEX_SHADER_SOURCE,i.FRAGMENT_SHADER_SOURCE,null),this.pickProgram=n?this.getProgramInfo("pick",r,K+i.VERTEX_SHADER_SOURCE,K+i.FRAGMENT_SHADER_SOURCE,n):null,this.isInstanced){var o=x(this.CONSTANT_ATTRIBUTES);if(this.CONSTANT_DATA.length!==this.VERTICES)throw new Error("Program: error while getting constant data (expected ".concat(this.VERTICES," items, received ").concat(this.CONSTANT_DATA.length," instead)"));this.constantArray=new Float32Array(this.CONSTANT_DATA.length*o);for(var a=0;a<this.CONSTANT_DATA.length;a++){var s=this.CONSTANT_DATA[a];if(s.length!==o)throw new Error("Program: error while getting constant data (one vector has ".concat(s.length," items instead of ").concat(o,")"));for(var l=0;l<s.length;l++)this.constantArray[a*o+l]=s[l]}this.STRIDE=this.ATTRIBUTES_ITEMS_COUNT}}return S(e,[{key:"kill",value:function(){q(this.normalProgram),this.pickProgram&&(q(this.pickProgram),this.pickProgram=null)}},{key:"getProgramInfo",value:function(n,t,i,o,a){var s=this.getDefinition(),l=t.createBuffer();if(l===null)throw new Error("Program: error while creating the WebGL buffer.");var u=Oe(t,i),c=De(t,o),h=Le(t,[u,c]),_={};s.UNIFORMS.forEach(function(d){var E=t.getUniformLocation(h,d);E&&(_[d]=E)});var m={};s.ATTRIBUTES.forEach(function(d){m[d.name]=t.getAttribLocation(h,d.name)});var v;if("CONSTANT_ATTRIBUTES"in s&&(s.CONSTANT_ATTRIBUTES.forEach(function(d){m[d.name]=t.getAttribLocation(h,d.name)}),v=t.createBuffer(),v===null))throw new Error("Program: error while creating the WebGL constant buffer.");return{name:n,program:h,gl:t,frameBuffer:a,buffer:l,constantBuffer:v||{},uniformLocations:_,attributeLocations:m,isPicking:n==="pick",vertexShader:u,fragmentShader:c}}},{key:"bindProgram",value:function(n){var t=this,i=0,o=n.gl,a=n.buffer;this.isInstanced?(o.bindBuffer(o.ARRAY_BUFFER,n.constantBuffer),i=0,this.CONSTANT_ATTRIBUTES.forEach(function(s){return i+=t.bindAttribute(s,n,i,!1)}),o.bufferData(o.ARRAY_BUFFER,this.constantArray,o.STATIC_DRAW),o.bindBuffer(o.ARRAY_BUFFER,n.buffer),i=0,this.ATTRIBUTES.forEach(function(s){return i+=t.bindAttribute(s,n,i,!0)}),o.bufferData(o.ARRAY_BUFFER,this.array,o.DYNAMIC_DRAW)):(o.bindBuffer(o.ARRAY_BUFFER,a),i=0,this.ATTRIBUTES.forEach(function(s){return i+=t.bindAttribute(s,n,i)}),o.bufferData(o.ARRAY_BUFFER,this.array,o.DYNAMIC_DRAW)),o.bindBuffer(o.ARRAY_BUFFER,null)}},{key:"unbindProgram",value:function(n){var t=this;this.isInstanced?(this.CONSTANT_ATTRIBUTES.forEach(function(i){return t.unbindAttribute(i,n,!1)}),this.ATTRIBUTES.forEach(function(i){return t.unbindAttribute(i,n,!0)})):this.ATTRIBUTES.forEach(function(i){return t.unbindAttribute(i,n)})}},{key:"bindAttribute",value:function(n,t,i,o){var a=Ie[n.type];if(typeof a!="number")throw new Error('Program.bind: yet unsupported attribute type "'.concat(n.type,'"'));var s=t.attributeLocations[n.name],l=t.gl;if(s!==-1){l.enableVertexAttribArray(s);var u=this.isInstanced?(o?this.ATTRIBUTES_ITEMS_COUNT:x(this.CONSTANT_ATTRIBUTES))*Float32Array.BYTES_PER_ELEMENT:this.ATTRIBUTES_ITEMS_COUNT*Float32Array.BYTES_PER_ELEMENT;if(l.vertexAttribPointer(s,n.size,n.type,n.normalized||!1,u,i),this.isInstanced&&o)if(l instanceof WebGL2RenderingContext)l.vertexAttribDivisor(s,1);else{var c=l.getExtension("ANGLE_instanced_arrays");c&&c.vertexAttribDivisorANGLE(s,1)}}return n.size*a}},{key:"unbindAttribute",value:function(n,t,i){var o=t.attributeLocations[n.name],a=t.gl;if(o!==-1&&(a.disableVertexAttribArray(o),this.isInstanced&&i))if(a instanceof WebGL2RenderingContext)a.vertexAttribDivisor(o,0);else{var s=a.getExtension("ANGLE_instanced_arrays");s&&s.vertexAttribDivisorANGLE(o,0)}}},{key:"reallocate",value:function(n){n!==this.capacity&&(this.capacity=n,this.verticesCount=this.VERTICES*n,this.array=new Float32Array(this.isInstanced?this.capacity*this.ATTRIBUTES_ITEMS_COUNT:this.verticesCount*this.ATTRIBUTES_ITEMS_COUNT))}},{key:"hasNothingToRender",value:function(){return this.verticesCount===0}},{key:"renderProgram",value:function(n,t){var i=t.gl,o=t.program;i.enable(i.BLEND),i.useProgram(o),this.setUniforms(n,t),this.drawWebGL(this.METHOD,t)}},{key:"render",value:function(n){this.hasNothingToRender()||(this.pickProgram&&(this.pickProgram.gl.viewport(0,0,n.width*n.pixelRatio/n.downSizingRatio,n.height*n.pixelRatio/n.downSizingRatio),this.bindProgram(this.pickProgram),this.renderProgram(N(N({},n),{},{pixelRatio:n.pixelRatio/n.downSizingRatio}),this.pickProgram),this.unbindProgram(this.pickProgram)),this.normalProgram.gl.viewport(0,0,n.width*n.pixelRatio,n.height*n.pixelRatio),this.bindProgram(this.normalProgram),this.renderProgram(n,this.normalProgram),this.unbindProgram(this.normalProgram))}},{key:"drawWebGL",value:function(n,t){var i=t.gl,o=t.frameBuffer;if(i.bindFramebuffer(i.FRAMEBUFFER,o),!this.isInstanced)i.drawArrays(n,0,this.verticesCount);else if(i instanceof WebGL2RenderingContext)i.drawArraysInstanced(n,0,this.VERTICES,this.capacity);else{var a=i.getExtension("ANGLE_instanced_arrays");a&&a.drawArraysInstancedANGLE(n,0,this.VERTICES,this.capacity)}}}])})(),Pe=(function(e){function r(){return F(this,r),O(this,r,arguments)}return D(r,e),S(r,[{key:"kill",value:function(){ae(r,"kill",this)([])}},{key:"process",value:function(t,i,o){var a=i*this.STRIDE;if(o.hidden){for(var s=a+this.STRIDE;a<s;a++)this.array[a]=0;return}return this.processVisibleItem(oe(t),a,o)}}])})(le),W=(function(e){function r(){var n;F(this,r);for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];return n=O(this,r,[].concat(i)),R(n,"drawLabel",void 0),n}return D(r,e),S(r,[{key:"kill",value:function(){ae(r,"kill",this)([])}},{key:"process",value:function(t,i,o,a,s){var l=i*this.STRIDE;if(s.hidden||o.hidden||a.hidden){for(var u=l+this.STRIDE;l<u;l++)this.array[l]=0;return}return this.processVisibleItem(oe(t),l,o,a,s)}}])})(le);function Be(e,r){return(function(){function n(t,i,o){F(this,n),R(this,"drawLabel",r),this.programs=e.map(function(a){return new a(t,i,o)})}return S(n,[{key:"reallocate",value:function(i){this.programs.forEach(function(o){return o.reallocate(i)})}},{key:"process",value:function(i,o,a,s,l){this.programs.forEach(function(u){return u.process(i,o,a,s,l)})}},{key:"render",value:function(i){this.programs.forEach(function(o){return o.render(i)})}},{key:"kill",value:function(){this.programs.forEach(function(i){return i.kill()})}}])})()}function ar(e,r,n,t,i){var o=i.edgeLabelSize,a=i.edgeLabelFont,s=i.edgeLabelWeight,l=i.edgeLabelColor.attribute?r[i.edgeLabelColor.attribute]||i.edgeLabelColor.color||"#000":i.edgeLabelColor.color,u=r.label;if(u){e.fillStyle=l,e.font="".concat(s," ").concat(o,"px ").concat(a);var c=n.size,h=t.size,_=n.x,m=n.y,v=t.x,d=t.y,E=(_+v)/2,y=(m+d)/2,g=v-_,f=d-m,T=Math.sqrt(g*g+f*f);if(!(T<c+h)){_+=g*c/T,m+=f*c/T,v-=g*h/T,d-=f*h/T,E=(_+v)/2,y=(m+d)/2,g=v-_,f=d-m,T=Math.sqrt(g*g+f*f);var p=e.measureText(u).width;if(p>T){var b="…";for(u=u+b,p=e.measureText(u).width;p>T&&u.length>1;)u=u.slice(0,-2)+b,p=e.measureText(u).width;if(u.length<4)return}var A;g>0?f>0?A=Math.acos(g/T):A=Math.asin(f/T):f>0?A=Math.acos(g/T)+Math.PI:A=Math.asin(g/T)+Math.PI/2,e.save(),e.translate(E,y),e.rotate(A),e.fillText(u,-p/2,r.size/2+o),e.restore()}}}function Ge(e,r,n){if(r.label){var t=n.labelSize,i=n.labelFont,o=n.labelWeight,a=n.labelColor.attribute?r[n.labelColor.attribute]||n.labelColor.color||"#000":n.labelColor.color;e.fillStyle=a,e.font="".concat(o," ").concat(t,"px ").concat(i),e.fillText(r.label,r.x+r.size+3,r.y+t/3)}}function sr(e,r,n){var t=n.labelSize,i=n.labelFont,o=n.labelWeight;e.font="".concat(o," ").concat(t,"px ").concat(i),e.fillStyle="#FFF",e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=8,e.shadowColor="#000";var a=2;if(typeof r.label=="string"){var s=e.measureText(r.label).width,l=Math.round(s+5),u=Math.round(t+2*a),c=Math.max(r.size,t/2)+a,h=Math.asin(u/2/c),_=Math.sqrt(Math.abs(Math.pow(c,2)-Math.pow(u/2,2)));e.beginPath(),e.moveTo(r.x+_,r.y+u/2),e.lineTo(r.x+c+l,r.y+u/2),e.lineTo(r.x+c+l,r.y-u/2),e.lineTo(r.x+_,r.y-u/2),e.arc(r.x,r.y,c,h,-h),e.closePath(),e.fill()}else e.beginPath(),e.arc(r.x,r.y,r.size+a,0,Math.PI*2),e.closePath(),e.fill();e.shadowOffsetX=0,e.shadowOffsetY=0,e.shadowBlur=0,Ge(e,r,n)}var Ue=`
|
|
6
|
+
precision highp float;
|
|
7
|
+
|
|
8
|
+
varying vec4 v_color;
|
|
9
|
+
varying vec2 v_diffVector;
|
|
10
|
+
varying float v_radius;
|
|
11
|
+
|
|
12
|
+
uniform float u_correctionRatio;
|
|
13
|
+
|
|
14
|
+
const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
|
|
15
|
+
|
|
16
|
+
void main(void) {
|
|
17
|
+
float border = u_correctionRatio * 2.0;
|
|
18
|
+
float dist = length(v_diffVector) - v_radius + border;
|
|
19
|
+
|
|
20
|
+
// No antialiasing for picking mode:
|
|
21
|
+
#ifdef PICKING_MODE
|
|
22
|
+
if (dist > border)
|
|
23
|
+
gl_FragColor = transparent;
|
|
24
|
+
else
|
|
25
|
+
gl_FragColor = v_color;
|
|
26
|
+
|
|
27
|
+
#else
|
|
28
|
+
float t = 0.0;
|
|
29
|
+
if (dist > border)
|
|
30
|
+
t = 1.0;
|
|
31
|
+
else if (dist > 0.0)
|
|
32
|
+
t = dist / border;
|
|
33
|
+
|
|
34
|
+
gl_FragColor = mix(v_color, transparent, t);
|
|
35
|
+
#endif
|
|
36
|
+
}
|
|
37
|
+
`,ze=Ue,xe=`
|
|
38
|
+
attribute vec4 a_id;
|
|
39
|
+
attribute vec4 a_color;
|
|
40
|
+
attribute vec2 a_position;
|
|
41
|
+
attribute float a_size;
|
|
42
|
+
attribute float a_angle;
|
|
43
|
+
|
|
44
|
+
uniform mat3 u_matrix;
|
|
45
|
+
uniform float u_sizeRatio;
|
|
46
|
+
uniform float u_correctionRatio;
|
|
47
|
+
|
|
48
|
+
varying vec4 v_color;
|
|
49
|
+
varying vec2 v_diffVector;
|
|
50
|
+
varying float v_radius;
|
|
51
|
+
varying float v_border;
|
|
52
|
+
|
|
53
|
+
const float bias = 255.0 / 254.0;
|
|
54
|
+
|
|
55
|
+
void main() {
|
|
56
|
+
float size = a_size * u_correctionRatio / u_sizeRatio * 4.0;
|
|
57
|
+
vec2 diffVector = size * vec2(cos(a_angle), sin(a_angle));
|
|
58
|
+
vec2 position = a_position + diffVector;
|
|
59
|
+
gl_Position = vec4(
|
|
60
|
+
(u_matrix * vec3(position, 1)).xy,
|
|
61
|
+
0,
|
|
62
|
+
1
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
v_diffVector = diffVector;
|
|
66
|
+
v_radius = size / 2.0;
|
|
67
|
+
|
|
68
|
+
#ifdef PICKING_MODE
|
|
69
|
+
// For picking mode, we use the ID as the color:
|
|
70
|
+
v_color = a_id;
|
|
71
|
+
#else
|
|
72
|
+
// For normal mode, we use the color:
|
|
73
|
+
v_color = a_color;
|
|
74
|
+
#endif
|
|
75
|
+
|
|
76
|
+
v_color.a *= bias;
|
|
77
|
+
}
|
|
78
|
+
`,Me=xe,ue=WebGLRenderingContext,Z=ue.UNSIGNED_BYTE,M=ue.FLOAT,He=["u_sizeRatio","u_correctionRatio","u_matrix"],j=(function(e){function r(){return F(this,r),O(this,r,arguments)}return D(r,e),S(r,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:Me,FRAGMENT_SHADER_SOURCE:ze,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:He,ATTRIBUTES:[{name:"a_position",size:2,type:M},{name:"a_size",size:1,type:M},{name:"a_color",size:4,type:Z,normalized:!0},{name:"a_id",size:4,type:Z,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_angle",size:1,type:M}],CONSTANT_DATA:[[r.ANGLE_1],[r.ANGLE_2],[r.ANGLE_3]]}}},{key:"processVisibleItem",value:function(t,i,o){var a=this.array,s=I(o.color);a[i++]=o.x,a[i++]=o.y,a[i++]=o.size,a[i++]=s,a[i++]=t}},{key:"setUniforms",value:function(t,i){var o=i.gl,a=i.uniformLocations,s=a.u_sizeRatio,l=a.u_correctionRatio,u=a.u_matrix;o.uniform1f(l,t.correctionRatio),o.uniform1f(s,t.sizeRatio),o.uniformMatrix3fv(u,!1,t.matrix)}}])})(Pe);R(j,"ANGLE_1",0);R(j,"ANGLE_2",2*Math.PI/3);R(j,"ANGLE_3",4*Math.PI/3);var Ve=`
|
|
79
|
+
precision mediump float;
|
|
80
|
+
|
|
81
|
+
varying vec4 v_color;
|
|
82
|
+
|
|
83
|
+
void main(void) {
|
|
84
|
+
gl_FragColor = v_color;
|
|
85
|
+
}
|
|
86
|
+
`,We=Ve,je=`
|
|
87
|
+
attribute vec2 a_position;
|
|
88
|
+
attribute vec2 a_normal;
|
|
89
|
+
attribute float a_radius;
|
|
90
|
+
attribute vec3 a_barycentric;
|
|
91
|
+
|
|
92
|
+
#ifdef PICKING_MODE
|
|
93
|
+
attribute vec4 a_id;
|
|
94
|
+
#else
|
|
95
|
+
attribute vec4 a_color;
|
|
96
|
+
#endif
|
|
97
|
+
|
|
98
|
+
uniform mat3 u_matrix;
|
|
99
|
+
uniform float u_sizeRatio;
|
|
100
|
+
uniform float u_correctionRatio;
|
|
101
|
+
uniform float u_minEdgeThickness;
|
|
102
|
+
uniform float u_lengthToThicknessRatio;
|
|
103
|
+
uniform float u_widenessToThicknessRatio;
|
|
104
|
+
|
|
105
|
+
varying vec4 v_color;
|
|
106
|
+
|
|
107
|
+
const float bias = 255.0 / 254.0;
|
|
108
|
+
|
|
109
|
+
void main() {
|
|
110
|
+
float minThickness = u_minEdgeThickness;
|
|
111
|
+
|
|
112
|
+
float normalLength = length(a_normal);
|
|
113
|
+
vec2 unitNormal = a_normal / normalLength;
|
|
114
|
+
|
|
115
|
+
// These first computations are taken from edge.vert.glsl and
|
|
116
|
+
// edge.clamped.vert.glsl. Please read it to get better comments on what's
|
|
117
|
+
// happening:
|
|
118
|
+
float pixelsThickness = max(normalLength / u_sizeRatio, minThickness);
|
|
119
|
+
float webGLThickness = pixelsThickness * u_correctionRatio;
|
|
120
|
+
float webGLNodeRadius = a_radius * 2.0 * u_correctionRatio / u_sizeRatio;
|
|
121
|
+
float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
|
|
122
|
+
float webGLArrowHeadThickness = webGLThickness * u_widenessToThicknessRatio;
|
|
123
|
+
|
|
124
|
+
float da = a_barycentric.x;
|
|
125
|
+
float db = a_barycentric.y;
|
|
126
|
+
float dc = a_barycentric.z;
|
|
127
|
+
|
|
128
|
+
vec2 delta = vec2(
|
|
129
|
+
da * (webGLNodeRadius * unitNormal.y)
|
|
130
|
+
+ db * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y + webGLArrowHeadThickness * unitNormal.x)
|
|
131
|
+
+ dc * ((webGLNodeRadius + webGLArrowHeadLength) * unitNormal.y - webGLArrowHeadThickness * unitNormal.x),
|
|
132
|
+
|
|
133
|
+
da * (-webGLNodeRadius * unitNormal.x)
|
|
134
|
+
+ db * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x + webGLArrowHeadThickness * unitNormal.y)
|
|
135
|
+
+ dc * (-(webGLNodeRadius + webGLArrowHeadLength) * unitNormal.x - webGLArrowHeadThickness * unitNormal.y)
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
vec2 position = (u_matrix * vec3(a_position + delta, 1)).xy;
|
|
139
|
+
|
|
140
|
+
gl_Position = vec4(position, 0, 1);
|
|
141
|
+
|
|
142
|
+
#ifdef PICKING_MODE
|
|
143
|
+
// For picking mode, we use the ID as the color:
|
|
144
|
+
v_color = a_id;
|
|
145
|
+
#else
|
|
146
|
+
// For normal mode, we use the color:
|
|
147
|
+
v_color = a_color;
|
|
148
|
+
#endif
|
|
149
|
+
|
|
150
|
+
v_color.a *= bias;
|
|
151
|
+
}
|
|
152
|
+
`,Ye=je,ce=WebGLRenderingContext,J=ce.UNSIGNED_BYTE,B=ce.FLOAT,$e=["u_matrix","u_sizeRatio","u_correctionRatio","u_minEdgeThickness","u_lengthToThicknessRatio","u_widenessToThicknessRatio"],fe={extremity:"target",lengthToThicknessRatio:2.5,widenessToThicknessRatio:2};function he(e){var r=N(N({},fe),{});return(function(n){function t(){return F(this,t),O(this,t,arguments)}return D(t,n),S(t,[{key:"getDefinition",value:function(){return{VERTICES:3,VERTEX_SHADER_SOURCE:Ye,FRAGMENT_SHADER_SOURCE:We,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:$e,ATTRIBUTES:[{name:"a_position",size:2,type:B},{name:"a_normal",size:2,type:B},{name:"a_radius",size:1,type:B},{name:"a_color",size:4,type:J,normalized:!0},{name:"a_id",size:4,type:J,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_barycentric",size:3,type:B}],CONSTANT_DATA:[[1,0,0],[0,1,0],[0,0,1]]}}},{key:"processVisibleItem",value:function(o,a,s,l,u){if(r.extremity==="source"){var c=[l,s];s=c[0],l=c[1]}var h=u.size||1,_=l.size||1,m=s.x,v=s.y,d=l.x,E=l.y,y=I(u.color),g=d-m,f=E-v,T=g*g+f*f,p=0,b=0;T&&(T=1/Math.sqrt(T),p=-f*T*h,b=g*T*h);var A=this.array;A[a++]=d,A[a++]=E,A[a++]=-p,A[a++]=-b,A[a++]=_,A[a++]=y,A[a++]=o}},{key:"setUniforms",value:function(o,a){var s=a.gl,l=a.uniformLocations,u=l.u_matrix,c=l.u_sizeRatio,h=l.u_correctionRatio,_=l.u_minEdgeThickness,m=l.u_lengthToThicknessRatio,v=l.u_widenessToThicknessRatio;s.uniformMatrix3fv(u,!1,o.matrix),s.uniform1f(c,o.sizeRatio),s.uniform1f(h,o.correctionRatio),s.uniform1f(_,o.minEdgeThickness),s.uniform1f(m,r.lengthToThicknessRatio),s.uniform1f(v,r.widenessToThicknessRatio)}}])})(W)}he();var Xe=`
|
|
153
|
+
precision mediump float;
|
|
154
|
+
|
|
155
|
+
varying vec4 v_color;
|
|
156
|
+
varying vec2 v_normal;
|
|
157
|
+
varying float v_thickness;
|
|
158
|
+
varying float v_feather;
|
|
159
|
+
|
|
160
|
+
const vec4 transparent = vec4(0.0, 0.0, 0.0, 0.0);
|
|
161
|
+
|
|
162
|
+
void main(void) {
|
|
163
|
+
// We only handle antialiasing for normal mode:
|
|
164
|
+
#ifdef PICKING_MODE
|
|
165
|
+
gl_FragColor = v_color;
|
|
166
|
+
#else
|
|
167
|
+
float dist = length(v_normal) * v_thickness;
|
|
168
|
+
|
|
169
|
+
float t = smoothstep(
|
|
170
|
+
v_thickness - v_feather,
|
|
171
|
+
v_thickness,
|
|
172
|
+
dist
|
|
173
|
+
);
|
|
174
|
+
|
|
175
|
+
gl_FragColor = mix(v_color, transparent, t);
|
|
176
|
+
#endif
|
|
177
|
+
}
|
|
178
|
+
`,_e=Xe,qe=`
|
|
179
|
+
attribute vec4 a_id;
|
|
180
|
+
attribute vec4 a_color;
|
|
181
|
+
attribute vec2 a_normal;
|
|
182
|
+
attribute float a_normalCoef;
|
|
183
|
+
attribute vec2 a_positionStart;
|
|
184
|
+
attribute vec2 a_positionEnd;
|
|
185
|
+
attribute float a_positionCoef;
|
|
186
|
+
attribute float a_radius;
|
|
187
|
+
attribute float a_radiusCoef;
|
|
188
|
+
|
|
189
|
+
uniform mat3 u_matrix;
|
|
190
|
+
uniform float u_zoomRatio;
|
|
191
|
+
uniform float u_sizeRatio;
|
|
192
|
+
uniform float u_pixelRatio;
|
|
193
|
+
uniform float u_correctionRatio;
|
|
194
|
+
uniform float u_minEdgeThickness;
|
|
195
|
+
uniform float u_lengthToThicknessRatio;
|
|
196
|
+
uniform float u_feather;
|
|
197
|
+
|
|
198
|
+
varying vec4 v_color;
|
|
199
|
+
varying vec2 v_normal;
|
|
200
|
+
varying float v_thickness;
|
|
201
|
+
varying float v_feather;
|
|
202
|
+
|
|
203
|
+
const float bias = 255.0 / 254.0;
|
|
204
|
+
|
|
205
|
+
void main() {
|
|
206
|
+
float minThickness = u_minEdgeThickness;
|
|
207
|
+
|
|
208
|
+
float radius = a_radius * a_radiusCoef;
|
|
209
|
+
vec2 normal = a_normal * a_normalCoef;
|
|
210
|
+
vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
|
|
211
|
+
|
|
212
|
+
float normalLength = length(normal);
|
|
213
|
+
vec2 unitNormal = normal / normalLength;
|
|
214
|
+
|
|
215
|
+
// These first computations are taken from edge.vert.glsl. Please read it to
|
|
216
|
+
// get better comments on what's happening:
|
|
217
|
+
float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
|
|
218
|
+
float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
|
|
219
|
+
|
|
220
|
+
// Here, we move the point to leave space for the arrow head:
|
|
221
|
+
float direction = sign(radius);
|
|
222
|
+
float webGLNodeRadius = direction * radius * 2.0 * u_correctionRatio / u_sizeRatio;
|
|
223
|
+
float webGLArrowHeadLength = webGLThickness * u_lengthToThicknessRatio * 2.0;
|
|
224
|
+
|
|
225
|
+
vec2 compensationVector = vec2(-direction * unitNormal.y, direction * unitNormal.x) * (webGLNodeRadius + webGLArrowHeadLength);
|
|
226
|
+
|
|
227
|
+
// Here is the proper position of the vertex
|
|
228
|
+
gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness + compensationVector, 1)).xy, 0, 1);
|
|
229
|
+
|
|
230
|
+
v_thickness = webGLThickness / u_zoomRatio;
|
|
231
|
+
|
|
232
|
+
v_normal = unitNormal;
|
|
233
|
+
|
|
234
|
+
v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
|
|
235
|
+
|
|
236
|
+
#ifdef PICKING_MODE
|
|
237
|
+
// For picking mode, we use the ID as the color:
|
|
238
|
+
v_color = a_id;
|
|
239
|
+
#else
|
|
240
|
+
// For normal mode, we use the color:
|
|
241
|
+
v_color = a_color;
|
|
242
|
+
#endif
|
|
243
|
+
|
|
244
|
+
v_color.a *= bias;
|
|
245
|
+
}
|
|
246
|
+
`,Ke=qe,de=WebGLRenderingContext,Q=de.UNSIGNED_BYTE,C=de.FLOAT,Ze=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness","u_lengthToThicknessRatio"],Je={lengthToThicknessRatio:fe.lengthToThicknessRatio};function me(e){var r=N(N({},Je),{});return(function(n){function t(){return F(this,t),O(this,t,arguments)}return D(t,n),S(t,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:Ke,FRAGMENT_SHADER_SOURCE:_e,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:Ze,ATTRIBUTES:[{name:"a_positionStart",size:2,type:C},{name:"a_positionEnd",size:2,type:C},{name:"a_normal",size:2,type:C},{name:"a_color",size:4,type:Q,normalized:!0},{name:"a_id",size:4,type:Q,normalized:!0},{name:"a_radius",size:1,type:C}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:C},{name:"a_normalCoef",size:1,type:C},{name:"a_radiusCoef",size:1,type:C}],CONSTANT_DATA:[[0,1,0],[0,-1,0],[1,1,1],[1,1,1],[0,-1,0],[1,-1,-1]]}}},{key:"processVisibleItem",value:function(o,a,s,l,u){var c=u.size||1,h=s.x,_=s.y,m=l.x,v=l.y,d=I(u.color),E=m-h,y=v-_,g=l.size||1,f=E*E+y*y,T=0,p=0;f&&(f=1/Math.sqrt(f),T=-y*f*c,p=E*f*c);var b=this.array;b[a++]=h,b[a++]=_,b[a++]=m,b[a++]=v,b[a++]=T,b[a++]=p,b[a++]=d,b[a++]=o,b[a++]=g}},{key:"setUniforms",value:function(o,a){var s=a.gl,l=a.uniformLocations,u=l.u_matrix,c=l.u_zoomRatio,h=l.u_feather,_=l.u_pixelRatio,m=l.u_correctionRatio,v=l.u_sizeRatio,d=l.u_minEdgeThickness,E=l.u_lengthToThicknessRatio;s.uniformMatrix3fv(u,!1,o.matrix),s.uniform1f(c,o.zoomRatio),s.uniform1f(v,o.sizeRatio),s.uniform1f(m,o.correctionRatio),s.uniform1f(_,o.pixelRatio),s.uniform1f(h,o.antiAliasingFeather),s.uniform1f(d,o.minEdgeThickness),s.uniform1f(E,r.lengthToThicknessRatio)}}])})(W)}me();function Qe(e){return Be([me(),he()])}var er=Qe(),lr=er,rr=`
|
|
247
|
+
attribute vec4 a_id;
|
|
248
|
+
attribute vec4 a_color;
|
|
249
|
+
attribute vec2 a_normal;
|
|
250
|
+
attribute float a_normalCoef;
|
|
251
|
+
attribute vec2 a_positionStart;
|
|
252
|
+
attribute vec2 a_positionEnd;
|
|
253
|
+
attribute float a_positionCoef;
|
|
254
|
+
|
|
255
|
+
uniform mat3 u_matrix;
|
|
256
|
+
uniform float u_sizeRatio;
|
|
257
|
+
uniform float u_zoomRatio;
|
|
258
|
+
uniform float u_pixelRatio;
|
|
259
|
+
uniform float u_correctionRatio;
|
|
260
|
+
uniform float u_minEdgeThickness;
|
|
261
|
+
uniform float u_feather;
|
|
262
|
+
|
|
263
|
+
varying vec4 v_color;
|
|
264
|
+
varying vec2 v_normal;
|
|
265
|
+
varying float v_thickness;
|
|
266
|
+
varying float v_feather;
|
|
267
|
+
|
|
268
|
+
const float bias = 255.0 / 254.0;
|
|
269
|
+
|
|
270
|
+
void main() {
|
|
271
|
+
float minThickness = u_minEdgeThickness;
|
|
272
|
+
|
|
273
|
+
vec2 normal = a_normal * a_normalCoef;
|
|
274
|
+
vec2 position = a_positionStart * (1.0 - a_positionCoef) + a_positionEnd * a_positionCoef;
|
|
275
|
+
|
|
276
|
+
float normalLength = length(normal);
|
|
277
|
+
vec2 unitNormal = normal / normalLength;
|
|
278
|
+
|
|
279
|
+
// We require edges to be at least "minThickness" pixels thick *on screen*
|
|
280
|
+
// (so we need to compensate the size ratio):
|
|
281
|
+
float pixelsThickness = max(normalLength, minThickness * u_sizeRatio);
|
|
282
|
+
|
|
283
|
+
// Then, we need to retrieve the normalized thickness of the edge in the WebGL
|
|
284
|
+
// referential (in a ([0, 1], [0, 1]) space), using our "magic" correction
|
|
285
|
+
// ratio:
|
|
286
|
+
float webGLThickness = pixelsThickness * u_correctionRatio / u_sizeRatio;
|
|
287
|
+
|
|
288
|
+
// Here is the proper position of the vertex
|
|
289
|
+
gl_Position = vec4((u_matrix * vec3(position + unitNormal * webGLThickness, 1)).xy, 0, 1);
|
|
290
|
+
|
|
291
|
+
// For the fragment shader though, we need a thickness that takes the "magic"
|
|
292
|
+
// correction ratio into account (as in webGLThickness), but so that the
|
|
293
|
+
// antialiasing effect does not depend on the zoom level. So here's yet
|
|
294
|
+
// another thickness version:
|
|
295
|
+
v_thickness = webGLThickness / u_zoomRatio;
|
|
296
|
+
|
|
297
|
+
v_normal = unitNormal;
|
|
298
|
+
|
|
299
|
+
v_feather = u_feather * u_correctionRatio / u_zoomRatio / u_pixelRatio * 2.0;
|
|
300
|
+
|
|
301
|
+
#ifdef PICKING_MODE
|
|
302
|
+
// For picking mode, we use the ID as the color:
|
|
303
|
+
v_color = a_id;
|
|
304
|
+
#else
|
|
305
|
+
// For normal mode, we use the color:
|
|
306
|
+
v_color = a_color;
|
|
307
|
+
#endif
|
|
308
|
+
|
|
309
|
+
v_color.a *= bias;
|
|
310
|
+
}
|
|
311
|
+
`,nr=rr,ve=WebGLRenderingContext,ee=ve.UNSIGNED_BYTE,L=ve.FLOAT,ir=["u_matrix","u_zoomRatio","u_sizeRatio","u_correctionRatio","u_pixelRatio","u_feather","u_minEdgeThickness"],ur=(function(e){function r(){return F(this,r),O(this,r,arguments)}return D(r,e),S(r,[{key:"getDefinition",value:function(){return{VERTICES:6,VERTEX_SHADER_SOURCE:nr,FRAGMENT_SHADER_SOURCE:_e,METHOD:WebGLRenderingContext.TRIANGLES,UNIFORMS:ir,ATTRIBUTES:[{name:"a_positionStart",size:2,type:L},{name:"a_positionEnd",size:2,type:L},{name:"a_normal",size:2,type:L},{name:"a_color",size:4,type:ee,normalized:!0},{name:"a_id",size:4,type:ee,normalized:!0}],CONSTANT_ATTRIBUTES:[{name:"a_positionCoef",size:1,type:L},{name:"a_normalCoef",size:1,type:L}],CONSTANT_DATA:[[0,1],[0,-1],[1,1],[1,1],[0,-1],[1,-1]]}}},{key:"processVisibleItem",value:function(t,i,o,a,s){var l=s.size||1,u=o.x,c=o.y,h=a.x,_=a.y,m=I(s.color),v=h-u,d=_-c,E=v*v+d*d,y=0,g=0;E&&(E=1/Math.sqrt(E),y=-d*E*l,g=v*E*l);var f=this.array;f[i++]=u,f[i++]=c,f[i++]=h,f[i++]=_,f[i++]=y,f[i++]=g,f[i++]=m,f[i++]=t}},{key:"setUniforms",value:function(t,i){var o=i.gl,a=i.uniformLocations,s=a.u_matrix,l=a.u_zoomRatio,u=a.u_feather,c=a.u_pixelRatio,h=a.u_correctionRatio,_=a.u_sizeRatio,m=a.u_minEdgeThickness;o.uniformMatrix3fv(s,!1,t.matrix),o.uniform1f(l,t.zoomRatio),o.uniform1f(_,t.sizeRatio),o.uniform1f(h,t.correctionRatio),o.uniform1f(c,t.pixelRatio),o.uniform1f(u,t.antiAliasingFeather),o.uniform1f(m,t.minEdgeThickness)}}])})(W);export{ur as E,j as N,D as _,S as a,F as b,O as c,Ge as d,pe as e,sr as f,ar as g,lr as h,N as i,R as j,re as k,or as l,tr as m,Ae as n,$ as o};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as O}from"./C5KYKPa8.js";const B="#1e293b",a="#64748b",D="#f8fafc",P=(s,l,r)=>{const o=r.labelSize,y=r.labelFont,d=r.labelWeight;s.font=`${d} ${o}px ${y}`,s.fillStyle=B,s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowBlur=12,s.shadowColor="rgba(0,0,0,0.55)";const f=2;if(typeof l.label=="string"){const u=s.measureText(l.label).width,e=Math.round(u+5),h=Math.round(o+2*f),i=Math.max(l.size,o/2)+f,b=Math.asin(h/2/i),w=Math.sqrt(Math.abs(i**2-(h/2)**2));s.beginPath(),s.moveTo(l.x+w,l.y+h/2),s.lineTo(l.x+i+e,l.y+h/2),s.lineTo(l.x+i+e,l.y-h/2),s.lineTo(l.x+w,l.y-h/2),s.arc(l.x,l.y,i,b,-b),s.closePath(),s.fill(),s.shadowBlur=0,s.strokeStyle=a,s.lineWidth=1,s.stroke()}else s.beginPath(),s.arc(l.x,l.y,l.size+f,0,Math.PI*2),s.closePath(),s.fill(),s.shadowBlur=0,s.strokeStyle=a,s.lineWidth=1,s.stroke();s.shadowOffsetX=0,s.shadowOffsetY=0,s.shadowBlur=0,O(s,{...l,labelColor:D},r)};export{P as drawDarkDiscNodeHover};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as bn,g as On}from"./i0D5dc1Y.js";import{r as Rn,a as In,b as Sn}from"./BP2JbIUZ.js";function Gn(y,E){for(var h=0;h<E.length;h++){const r=E[h];if(typeof r!="string"&&!Array.isArray(r)){for(const I in r)if(I!=="default"&&!(I in y)){const S=Object.getOwnPropertyDescriptor(r,I);S&&Object.defineProperty(y,I,S.get?S:{enumerable:!0,get:()=>r[I]})}}}return Object.freeze(Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}))}var gn,En;function Tn(){if(En)return gn;En=1;var y=0,E=1,h=2,r=3,I=4,S=5,g=6,$=7,F=8,H=9,P=0,o=1,un=2,O=0,T=1,R=2,p=3,i=4,w=5,L=6,j=7,z=8,cn=3,q=10,_n=3,G=9,ln=10;return gn=function(_,n,M){var tn,s,f,D,b,B,J,A,t,rn,W=n.length,an=M.length,Y=_.adjustSizes,wn=_.barnesHutTheta*_.barnesHutTheta,d,a,v,c,k,l,u,e=[];for(f=0;f<W;f+=q)n[f+I]=n[f+h],n[f+S]=n[f+r],n[f+h]=0,n[f+r]=0;if(_.outboundAttractionDistribution){for(d=0,f=0;f<W;f+=q)d+=n[f+g];d/=W/q}if(_.barnesHutOptimize){var U=1/0,K=-1/0,V=1/0,Q=-1/0,C,X,hn;for(f=0;f<W;f+=q)U=Math.min(U,n[f+y]),K=Math.max(K,n[f+y]),V=Math.min(V,n[f+E]),Q=Math.max(Q,n[f+E]);var N=K-U,x=Q-V;for(N>x?(V-=(N-x)/2,Q=V+N):(U-=(x-N)/2,K=U+x),e[0+O]=-1,e[0+T]=(U+K)/2,e[0+R]=(V+Q)/2,e[0+p]=Math.max(K-U,Q-V),e[0+i]=-1,e[0+w]=-1,e[0+L]=0,e[0+j]=0,e[0+z]=0,tn=1,f=0;f<W;f+=q)for(s=0,hn=cn;;)if(e[s+w]>=0){n[f+y]<e[s+T]?n[f+E]<e[s+R]?C=e[s+w]:C=e[s+w]+G:n[f+E]<e[s+R]?C=e[s+w]+G*2:C=e[s+w]+G*3,e[s+j]=(e[s+j]*e[s+L]+n[f+y]*n[f+g])/(e[s+L]+n[f+g]),e[s+z]=(e[s+z]*e[s+L]+n[f+E]*n[f+g])/(e[s+L]+n[f+g]),e[s+L]+=n[f+g],s=C;continue}else if(e[s+O]<0){e[s+O]=f;break}else{if(e[s+w]=tn*G,A=e[s+p]/2,t=e[s+w],e[t+O]=-1,e[t+T]=e[s+T]-A,e[t+R]=e[s+R]-A,e[t+p]=A,e[t+i]=t+G,e[t+w]=-1,e[t+L]=0,e[t+j]=0,e[t+z]=0,t+=G,e[t+O]=-1,e[t+T]=e[s+T]-A,e[t+R]=e[s+R]+A,e[t+p]=A,e[t+i]=t+G,e[t+w]=-1,e[t+L]=0,e[t+j]=0,e[t+z]=0,t+=G,e[t+O]=-1,e[t+T]=e[s+T]+A,e[t+R]=e[s+R]-A,e[t+p]=A,e[t+i]=t+G,e[t+w]=-1,e[t+L]=0,e[t+j]=0,e[t+z]=0,t+=G,e[t+O]=-1,e[t+T]=e[s+T]+A,e[t+R]=e[s+R]+A,e[t+p]=A,e[t+i]=e[s+i],e[t+w]=-1,e[t+L]=0,e[t+j]=0,e[t+z]=0,tn+=4,n[e[s+O]+y]<e[s+T]?n[e[s+O]+E]<e[s+R]?C=e[s+w]:C=e[s+w]+G:n[e[s+O]+E]<e[s+R]?C=e[s+w]+G*2:C=e[s+w]+G*3,e[s+L]=n[e[s+O]+g],e[s+j]=n[e[s+O]+y],e[s+z]=n[e[s+O]+E],e[C+O]=e[s+O],e[s+O]=-1,n[f+y]<e[s+T]?n[f+E]<e[s+R]?X=e[s+w]:X=e[s+w]+G:n[f+E]<e[s+R]?X=e[s+w]+G*2:X=e[s+w]+G*3,C===X)if(hn--){s=C;continue}else{hn=cn;break}e[X+O]=f;break}}if(_.barnesHutOptimize)for(a=_.scalingRatio,f=0;f<W;f+=q)for(s=0;;)if(e[s+w]>=0)if(l=Math.pow(n[f+y]-e[s+j],2)+Math.pow(n[f+E]-e[s+z],2),rn=e[s+p],4*rn*rn/l<wn){if(v=n[f+y]-e[s+j],c=n[f+E]-e[s+z],Y===!0?l>0?(u=a*n[f+g]*e[s+L]/l,n[f+h]+=v*u,n[f+r]+=c*u):l<0&&(u=-a*n[f+g]*e[s+L]/Math.sqrt(l),n[f+h]+=v*u,n[f+r]+=c*u):l>0&&(u=a*n[f+g]*e[s+L]/l,n[f+h]+=v*u,n[f+r]+=c*u),s=e[s+i],s<0)break;continue}else{s=e[s+w];continue}else{if(B=e[s+O],B>=0&&B!==f&&(v=n[f+y]-n[B+y],c=n[f+E]-n[B+E],l=v*v+c*c,Y===!0?l>0?(u=a*n[f+g]*n[B+g]/l,n[f+h]+=v*u,n[f+r]+=c*u):l<0&&(u=-a*n[f+g]*n[B+g]/Math.sqrt(l),n[f+h]+=v*u,n[f+r]+=c*u):l>0&&(u=a*n[f+g]*n[B+g]/l,n[f+h]+=v*u,n[f+r]+=c*u)),s=e[s+i],s<0)break;continue}else for(a=_.scalingRatio,D=0;D<W;D+=q)for(b=0;b<D;b+=q)v=n[D+y]-n[b+y],c=n[D+E]-n[b+E],Y===!0?(l=Math.sqrt(v*v+c*c)-n[D+F]-n[b+F],l>0?(u=a*n[D+g]*n[b+g]/l/l,n[D+h]+=v*u,n[D+r]+=c*u,n[b+h]-=v*u,n[b+r]-=c*u):l<0&&(u=100*a*n[D+g]*n[b+g],n[D+h]+=v*u,n[D+r]+=c*u,n[b+h]-=v*u,n[b+r]-=c*u)):(l=Math.sqrt(v*v+c*c),l>0&&(u=a*n[D+g]*n[b+g]/l/l,n[D+h]+=v*u,n[D+r]+=c*u,n[b+h]-=v*u,n[b+r]-=c*u));for(t=_.gravity/_.scalingRatio,a=_.scalingRatio,f=0;f<W;f+=q)u=0,v=n[f+y],c=n[f+E],l=Math.sqrt(Math.pow(v,2)+Math.pow(c,2)),_.strongGravityMode?l>0&&(u=a*n[f+g]*t):l>0&&(u=a*n[f+g]*t/l),n[f+h]-=v*u,n[f+r]-=c*u;for(a=1*(_.outboundAttractionDistribution?d:1),J=0;J<an;J+=_n)D=M[J+P],b=M[J+o],A=M[J+un],k=Math.pow(A,_.edgeWeightInfluence),v=n[D+y]-n[b+y],c=n[D+E]-n[b+E],Y===!0?(l=Math.sqrt(v*v+c*c)-n[D+F]-n[b+F],_.linLogMode?_.outboundAttractionDistribution?l>0&&(u=-a*k*Math.log(1+l)/l/n[D+g]):l>0&&(u=-a*k*Math.log(1+l)/l):_.outboundAttractionDistribution?l>0&&(u=-a*k/n[D+g]):l>0&&(u=-a*k)):(l=Math.sqrt(Math.pow(v,2)+Math.pow(c,2)),_.linLogMode?_.outboundAttractionDistribution?l>0&&(u=-a*k*Math.log(1+l)/l/n[D+g]):l>0&&(u=-a*k*Math.log(1+l)/l):_.outboundAttractionDistribution?(l=1,u=-a*k/n[D+g]):(l=1,u=-a*k)),l>0&&(n[D+h]+=v*u,n[D+r]+=c*u,n[b+h]-=v*u,n[b+r]-=c*u);var nn,m,fn,Z,en,sn;if(Y===!0)for(f=0;f<W;f+=q)n[f+H]!==1&&(nn=Math.sqrt(Math.pow(n[f+h],2)+Math.pow(n[f+r],2)),nn>ln&&(n[f+h]=n[f+h]*ln/nn,n[f+r]=n[f+r]*ln/nn),m=n[f+g]*Math.sqrt((n[f+I]-n[f+h])*(n[f+I]-n[f+h])+(n[f+S]-n[f+r])*(n[f+S]-n[f+r])),fn=Math.sqrt((n[f+I]+n[f+h])*(n[f+I]+n[f+h])+(n[f+S]+n[f+r])*(n[f+S]+n[f+r]))/2,Z=.1*Math.log(1+fn)/(1+Math.sqrt(m)),en=n[f+y]+n[f+h]*(Z/_.slowDown),n[f+y]=en,sn=n[f+E]+n[f+r]*(Z/_.slowDown),n[f+E]=sn);else for(f=0;f<W;f+=q)n[f+H]!==1&&(m=n[f+g]*Math.sqrt((n[f+I]-n[f+h])*(n[f+I]-n[f+h])+(n[f+S]-n[f+r])*(n[f+S]-n[f+r])),fn=Math.sqrt((n[f+I]+n[f+h])*(n[f+I]+n[f+h])+(n[f+S]+n[f+r])*(n[f+S]+n[f+r]))/2,Z=n[f+$]*Math.log(1+fn)/(1+Math.sqrt(m)),n[f+$]=Math.min(1,Math.sqrt(Z*(Math.pow(n[f+h],2)+Math.pow(n[f+r],2))/(1+Math.sqrt(m)))),en=n[f+y]+n[f+h]*(Z/_.slowDown),n[f+y]=en,sn=n[f+E]+n[f+r]*(Z/_.slowDown),n[f+E]=sn);return{}},gn}var vn,yn;function An(){if(yn)return vn;yn=1;var y=bn(),E=Rn().createEdgeWeightGetter,h=Tn(),r=In(),I=Sn();function S(F,H,P){if(!y(H))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");typeof P=="number"&&(P={iterations:P});var o=P.iterations;if(typeof o!="number")throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(o<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var un=E("getEdgeWeight"in P?P.getEdgeWeight:"weight").fromEntry,O=typeof P.outputReducer=="function"?P.outputReducer:null,T=r.assign({},I,P.settings),R=r.validateSettings(T);if(R)throw new Error("graphology-layout-forceatlas2: "+R.message);var p=r.graphToByteArrays(H,un),i;for(i=0;i<o;i++)h(T,p.nodes,p.edges);if(F){r.assignLayoutChanges(H,p.nodes,O);return}return r.collectLayoutChanges(H,p.nodes)}function g(F){var H=typeof F=="number"?F:F.order;return{barnesHutOptimize:H>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(H)}}var $=S.bind(null,!1);return $.assign=S.bind(null,!0),$.inferSettings=g,vn=$,vn}var Dn=An();const Ln=On(Dn),qn=Gn({__proto__:null,default:Ln},[Dn]);export{qn as i};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{ac as Z,a1 as j,X as ee,ad as z,g as te,q as T,ae as P,e as g,h as v,K as b,af as V,i as re,P as se,ag as ie,ah as W,b as p,c as X,p as F,a as Y,m as ne,ai as ae,aj as N,ak as D,al as q,am as fe,an as oe,ao as J,f as K,ap as he,d as k,w as x,aq as le,V as de,ar as S,E as ce,o as ue,as as _e,at as pe,au as ge,av as ve,aw as ye,ax as L,x as me,C as U,ay as be,t as Ee,az as M,v as R,aA as we,aB as Te,aC as Se,aD as Re,A as Ae,aE as Ne,aF as De,B as xe}from"./BnkCgNCx.js";import{b as Oe}from"./NXeHtWpC.js";function Fe(t){let e=0,r=z(0),i;return()=>{Z()&&(j(r),ee(()=>(e===0&&(i=te(()=>t(()=>P(r)))),e+=1,()=>{T(()=>{e-=1,e===0&&(i?.(),i=void 0,P(r))})})))}}var ke=ce|ue;function Le(t,e,r,i){new Me(t,e,r,i)}class Me{parent;is_pending=!1;transform_error;#t;#_=v?g:null;#i;#h;#e;#n=null;#r=null;#s=null;#a=null;#l=0;#o=0;#d=!1;#p=new Set;#g=new Set;#f=null;#m=Fe(()=>(this.#f=z(this.#l),()=>{this.#f=null}));constructor(e,r,i,n){this.#t=e,this.#i=r,this.#h=s=>{var a=b;a.b=this,a.f|=V,i(s)},this.parent=b.b,this.transform_error=n??this.parent?.transform_error??(s=>s),this.#e=re(()=>{if(v){const s=this.#_;se();const a=s.data===ie;if(s.data.startsWith(W)){const f=JSON.parse(s.data.slice(W.length));this.#E(f)}else a?this.#w():this.#b()}else this.#v()},ke),v&&(this.#t=g)}#b(){try{this.#n=p(()=>this.#h(this.#t))}catch(e){this.error(e)}}#E(e){const r=this.#i.failed;r&&(this.#s=p(()=>{r(this.#t,()=>e,()=>()=>{})}))}#w(){const e=this.#i.pending;e&&(this.is_pending=!0,this.#r=p(()=>e(this.#t)),T(()=>{var r=this.#a=document.createDocumentFragment(),i=X();r.append(i),this.#n=this.#u(()=>p(()=>this.#h(i))),this.#o===0&&(this.#t.before(r),this.#a=null,F(this.#r,()=>{this.#r=null}),this.#c(Y))}))}#v(){try{if(this.is_pending=this.has_pending_snippet(),this.#o=0,this.#l=0,this.#n=p(()=>{this.#h(this.#t)}),this.#o>0){var e=this.#a=document.createDocumentFragment();ne(this.#n,e);const r=this.#i.pending;this.#r=p(()=>r(this.#t))}else this.#c(Y)}catch(r){this.error(r)}}#c(e){this.is_pending=!1,e.transfer_effects(this.#p,this.#g)}defer_effect(e){ae(e,this.#p,this.#g)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#i.pending}#u(e){var r=b,i=J,n=K;N(this.#e),D(this.#e),q(this.#e.ctx);try{return fe.ensure(),e()}catch(s){return oe(s),null}finally{N(r),D(i),q(n)}}#y(e,r){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e,r);return}this.#o+=e,this.#o===0&&(this.#c(r),this.#r&&F(this.#r,()=>{this.#r=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(e,r){this.#y(e,r),this.#l+=e,!(!this.#f||this.#d)&&(this.#d=!0,T(()=>{this.#d=!1,this.#f&&he(this.#f,this.#l)}))}get_effect_pending(){return this.#m(),j(this.#f)}error(e){var r=this.#i.onerror;let i=this.#i.failed;if(!r&&!i)throw e;this.#n&&(k(this.#n),this.#n=null),this.#r&&(k(this.#r),this.#r=null),this.#s&&(k(this.#s),this.#s=null),v&&(x(this.#_),le(),x(de()));var n=!1,s=!1;const a=()=>{if(n){pe();return}n=!0,s&&_e(),this.#s!==null&&F(this.#s,()=>{this.#s=null}),this.#u(()=>{this.#v()})},c=f=>{try{s=!0,r?.(f,a),s=!1}catch(o){S(o,this.#e&&this.#e.parent)}i&&(this.#s=this.#u(()=>{try{return p(()=>{var o=b;o.b=this,o.f|=V,i(this.#t,()=>f,()=>a)})}catch(o){return S(o,this.#e.parent),null}}))};T(()=>{var f;try{f=this.transform_error(e)}catch(o){S(o,this.#e&&this.#e.parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(c,o=>S(o,this.#e&&this.#e.parent)):c(f)})}}const Ce=["touchstart","touchmove"];function Be(t){return Ce.includes(t)}const Ie=["textarea","script","style","title"];function Ye(t){return Ie.includes(t)}const w=Symbol("events"),G=new Set,C=new Set;function He(t,e,r,i={}){function n(s){if(i.capture||B.call(e,s),!s.cancelBubble)return ye(()=>r?.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?T(()=>{e.addEventListener(t,n,i)}):e.addEventListener(t,n,i),n}function qe(t,e,r,i,n){var s={capture:i,passive:n},a=He(t,e,r,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ve(()=>{e.removeEventListener(t,a,s)})}function $e(t,e,r){(e[w]??={})[t]=r}function je(t){for(var e=0;e<t.length;e++)G.add(t[e]);for(var r of C)r(t)}let $=null;function B(t){var e=this,r=e.ownerDocument,i=t.type,n=t.composedPath?.()||[],s=n[0]||t.target;$=t;var a=0,c=$===t&&t[w];if(c){var f=n.indexOf(c);if(f!==-1&&(e===document||e===window)){t[w]=e;return}var o=n.indexOf(e);if(o===-1)return;f<=o&&(a=f)}if(s=n[a]||t.target,s!==e){ge(t,"currentTarget",{configurable:!0,get(){return s||r}});var y=J,E=b;D(null),N(null);try{for(var _,l=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var d=s[w]?.[i];d!=null&&(!s.disabled||t.target===s)&&d.call(s,t)}catch(u){_?l.push(u):_=u}if(t.cancelBubble||h===e||h===null)break;s=h}if(_){for(let u of l)queueMicrotask(()=>{throw u});throw _}}finally{t[w]=e,delete t.currentTarget,D(y),N(E)}}}function ze(t,e){var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t.__t??=t.nodeValue)&&(t.__t=r,t.nodeValue=`${r}`)}function Pe(t,e){return Q(t,e)}function Xe(t,e){L(),e.intro=e.intro??!1;const r=e.target,i=v,n=g;try{for(var s=me(r);s&&(s.nodeType!==U||s.data!==be);)s=Ee(s);if(!s)throw M;R(!0),x(s);const a=Q(t,{...e,anchor:s});return R(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
+
`).some(c=>c.startsWith("https://svelte.dev/e/")))throw a;return a!==M&&console.warn("Failed to hydrate: ",a),e.recover===!1&&we(),L(),Te(r),R(!1),Pe(t,e)}finally{R(i),x(n)}}const A=new Map;function Q(t,{target:e,anchor:r,props:i={},events:n,context:s,intro:a=!0,transformError:c}){L();var f=void 0,o=Se(()=>{var y=r??e.appendChild(X());Le(y,{pending:()=>{}},l=>{Ae({});var h=K;if(s&&(h.c=s),n&&(i.$$events=n),v&&Oe(l,null),f=t(l,i)||{},v&&(b.nodes.end=g,g===null||g.nodeType!==U||g.data!==Ne))throw De(),M;xe()},c);var E=new Set,_=l=>{for(var h=0;h<l.length;h++){var d=l[h];if(!E.has(d)){E.add(d);var u=Be(d);for(const O of[e,document]){var m=A.get(O);m===void 0&&(m=new Map,A.set(O,m));var H=m.get(d);H===void 0?(O.addEventListener(d,B,{passive:u}),m.set(d,1)):m.set(d,H+1)}}}};return _(Re(G)),C.add(_),()=>{for(var l of E)for(const u of[e,document]){var h=A.get(u),d=h.get(l);--d==0?(u.removeEventListener(l,B),h.delete(l),h.size===0&&A.delete(u)):h.set(l,d)}C.delete(_),y!==r&&y.parentNode?.removeChild(y)}});return I.set(f,o),f}let I=new WeakMap;function Je(t,e){const r=I.get(t);return r?(I.delete(t),r(e)):Promise.resolve()}export{$e as a,je as d,qe as e,Xe as h,Ye as i,Pe as m,ze as s,Je as u};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as l,d as o,p as u,c as n,b as d,a as m,h as p,e as _,m as v,s as b}from"./BnkCgNCx.js";class w{anchor;#t=new Map;#s=new Map;#e=new Map;#i=new Set;#a=!0;constructor(t,s=!0){this.anchor=t,this.#a=s}#f=t=>{if(this.#t.has(t)){var s=this.#t.get(t),e=this.#s.get(s);if(e)l(e),this.#i.delete(s);else{var a=this.#e.get(s);a&&(this.#s.set(s,a.effect),this.#e.delete(s),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),e=a.effect)}for(const[i,f]of this.#t){if(this.#t.delete(i),i===t)break;const r=this.#e.get(f);r&&(o(r.effect),this.#e.delete(f))}for(const[i,f]of this.#s){if(i===s||this.#i.has(i))continue;const r=()=>{if(Array.from(this.#t.values()).includes(i)){var c=document.createDocumentFragment();v(f,c),c.append(n()),this.#e.set(i,{effect:f,fragment:c})}else o(f);this.#i.delete(i),this.#s.delete(i)};this.#a||!e?(this.#i.add(i),u(f,r,!1)):r()}}};#r=t=>{this.#t.delete(t);const s=Array.from(this.#t.values());for(const[e,a]of this.#e)s.includes(e)||(o(a.effect),this.#e.delete(e))};ensure(t,s){var e=m,a=b();if(s&&!this.#s.has(t)&&!this.#e.has(t))if(a){var i=document.createDocumentFragment(),f=n();i.append(f),this.#e.set(t,{effect:d(()=>s(f)),fragment:i})}else this.#s.set(t,d(()=>s(this.anchor)));if(this.#t.set(e,t),a){for(const[r,h]of this.#s)r===t?e.unskip_effect(h):e.skip_effect(h);for(const[r,h]of this.#e)r===t?e.unskip_effect(h.effect):e.skip_effect(h.effect);e.oncommit(this.#f),e.ondiscard(this.#r)}else p&&(this.anchor=_),this.#f(e)}}export{w as B};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as d,E as u,h as _,N as h,I as v,L as l,j as p,k as A,q as g,n as k}from"./BnkCgNCx.js";import{B as N}from"./D4SoBmS0.js";function I(r,s,...e){var t=new N(r);d(()=>{const a=s()??null;t.ensure(a,a&&(o=>a(o,...e)))},u)}const T=Symbol("is custom element"),E=Symbol("is html"),m=v?"link":"LINK";function y(r){if(_){var s=!1,e=()=>{if(!s){if(s=!0,r.hasAttribute("value")){var t=r.value;n(r,"value",null),r.value=t}if(r.hasAttribute("checked")){var a=r.checked;n(r,"checked",null),r.checked=a}}};r.__on_r=e,g(e),k()}}function b(r,s){var e=f(r);e.checked!==(e.checked=s??void 0)&&(r.checked=s)}function n(r,s,e,t){var a=f(r);_&&(a[s]=r.getAttribute(s),s==="src"||s==="srcset"||s==="href"&&r.nodeName===m)||a[s]!==(a[s]=e)&&(s==="loading"&&(r[l]=e),e==null?r.removeAttribute(s):typeof e!="string"&&L(r).includes(s)?r[s]=e:r.setAttribute(s,e))}function f(r){return r.__attributes??={[T]:r.nodeName.includes("-"),[E]:r.namespaceURI===h}}var i=new Map;function L(r){var s=r.getAttribute("is")||r.nodeName,e=i.get(s);if(e)return e;i.set(s,e=[]);for(var t,a=r,o=Element.prototype;o!==a;){t=A(a);for(var c in t)t[c].set&&e.push(c);a=p(a)}return e}export{n as a,b,y as r,I as s};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as X,g as gr}from"./i0D5dc1Y.js";function wr(w,p){for(var u=0;u<p.length;u++){const h=p[u];if(typeof h!="string"&&!Array.isArray(h)){for(const o in h)if(o!=="default"&&!(o in w)){const c=Object.getOwnPropertyDescriptor(h,o);c&&Object.defineProperty(w,o,c.get?c:{enumerable:!0,get:()=>h[o]})}}}return Object.freeze(Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}))}var U={},er,sr;function Y(){if(sr)return er;sr=1;function w(u){return!u||typeof u!="object"||typeof u=="function"||Array.isArray(u)||u instanceof Set||u instanceof Map||u instanceof RegExp||u instanceof Date}function p(u,h){u=u||{};var o={};for(var c in h){var y=u[c],s=h[c];if(!w(s)){o[c]=p(y,s);continue}y===void 0?o[c]=s:o[c]=y}return o}return er=p,er}var nr,fr;function mr(){if(fr)return nr;fr=1;function w(u){return function(h,o){return h+Math.floor(u()*(o-h+1))}}var p=w(Math.random);return p.createRandom=w,nr=p,nr}var ar,cr;function Cr(){if(cr)return ar;cr=1;var w=mr().createRandom;function p(h){var o=w(h);return function(c){for(var y=c.length,s=y-1,d=-1;++d<y;){var A=o(d,s),g=c[A];c[A]=c[d],c[d]=g}}}var u=p(Math.random);return u.createShuffleInPlace=p,ar=u,ar}var tr,dr;function Er(){if(dr)return tr;dr=1;var w=Y(),p=X(),u=Cr(),h={attributes:{x:"x",y:"y"},center:0,hierarchyAttributes:[],rng:Math.random,scale:1};function o(r,a,e,n,t){this.wrappedCircle=t||null,this.children={},this.countChildren=0,this.id=r||null,this.next=null,this.previous=null,this.x=a||null,this.y=e||null,t?this.r=1010101:this.r=n||999}o.prototype.hasChildren=function(){return this.countChildren>0},o.prototype.addChild=function(r,a){this.children[r]=a,++this.countChildren},o.prototype.getChild=function(r){if(!this.children.hasOwnProperty(r)){var a=new o;this.children[r]=a,++this.countChildren}return this.children[r]},o.prototype.applyPositionToChildren=function(){if(this.hasChildren()){var r=this;for(var a in r.children){var e=r.children[a];e.x+=r.x,e.y+=r.y,e.applyPositionToChildren()}}};function c(r,a,e){for(var n in a.children){var t=a.children[n];t.hasChildren()?c(r,t,e):e[t.id]={x:t.x,y:t.y}}}function y(r,a){var e=r.r-a.r,n=a.x-r.x,t=a.y-r.y;return e<0||e*e<n*n+t*t}function s(r,a){var e=r.r-a.r+1e-6,n=a.x-r.x,t=a.y-r.y;return e>0&&e*e>n*n+t*t}function d(r,a){for(var e=0;e<a.length;++e)if(!s(r,a[e]))return!1;return!0}function A(r){return new o(null,r.x,r.y,r.r)}function g(r,a){var e=r.x,n=r.y,t=r.r,i=a.x,v=a.y,x=a.r,l=i-e,f=v-n,m=x-t,P=Math.sqrt(l*l+f*f);return new o(null,(e+i+l/P*m)/2,(n+v+f/P*m)/2,(P+t+x)/2)}function b(r,a,e){var n=r.x,t=r.y,i=r.r,v=a.x,x=a.y,l=a.r,f=e.x,m=e.y,P=e.r,N=n-v,k=n-f,O=t-x,_=t-m,$=l-i,j=P-i,H=n*n+t*t-i*i,Z=H-v*v-x*x+l*l,T=H-f*f-m*m+P*P,G=k*O-N*_,F=(O*T-_*Z)/(G*2)-n,V=(_*$-O*j)/G,J=(k*Z-N*T)/(G*2)-t,K=(N*j-k*$)/G,B=V*V+K*K-1,Q=2*(i+F*V+J*K),lr=F*F+J*J-i*i,rr=-(B?(Q+Math.sqrt(Q*Q-4*B*lr))/(2*B):lr/Q);return new o(null,n+F+V*rr,t+J+K*rr,rr)}function R(r){switch(r.length){case 1:return A(r[0]);case 2:return g(r[0],r[1]);case 3:return b(r[0],r[1],r[2]);default:throw new Error("graphology-layout/circlepack: Invalid basis length "+r.length)}}function I(r,a){var e,n;if(d(a,r))return[a];for(e=0;e<r.length;++e)if(y(a,r[e])&&d(g(r[e],a),r))return[r[e],a];for(e=0;e<r.length-1;++e)for(n=e+1;n<r.length;++n)if(y(g(r[e],r[n]),a)&&y(g(r[e],a),r[n])&&y(g(r[n],a),r[e])&&d(b(r[e],r[n],a),r))return[r[e],r[n],a];throw new Error("graphology-layout/circlepack: extendBasis failure !")}function q(r){var a=r.wrappedCircle,e=r.next.wrappedCircle,n=a.r+e.r,t=(a.x*e.r+e.x*a.r)/n,i=(a.y*e.r+e.y*a.r)/n;return t*t+i*i}function S(r,a){var e=0,n=r.slice(),t=r.length,i=[],v,x;for(a(n);e<t;)v=n[e],x&&s(x,v)?++e:(i=I(i,v),x=R(i),e=0);return x}function E(r,a,e){var n=r.x-a.x,t,i,v=r.y-a.y,x,l,f=n*n+v*v;f?(i=a.r+e.r,i*=i,l=r.r+e.r,l*=l,i>l?(t=(f+l-i)/(2*f),x=Math.sqrt(Math.max(0,l/f-t*t)),e.x=r.x-t*n-x*v,e.y=r.y-t*v+x*n):(t=(f+i-l)/(2*f),x=Math.sqrt(Math.max(0,i/f-t*t)),e.x=a.x+t*n-x*v,e.y=a.y+t*v+x*n)):(e.x=a.x+e.r,e.y=a.y)}function C(r,a){var e=r.r+a.r-1e-6,n=a.x-r.x,t=a.y-r.y;return e>0&&e*e>n*n+t*t}function M(r,a){var e=r.length;if(e===0)return 0;var n,t,i,v,x,l,f,m,P,N;if(n=r[0],n.x=0,n.y=0,e<=1)return n.r;if(t=r[1],n.x=-t.r,t.x=n.r,t.y=0,e<=2)return n.r+t.r;i=r[2],E(t,n,i),n=new o(null,null,null,null,n),t=new o(null,null,null,null,t),i=new o(null,null,null,null,i),n.next=i.previous=t,t.next=n.previous=i,i.next=t.previous=n;r:for(l=3;l<e;++l){i=r[l],E(n.wrappedCircle,t.wrappedCircle,i),i=new o(null,null,null,null,i),f=t.next,m=n.previous,P=t.wrappedCircle.r,N=n.wrappedCircle.r;do if(P<=N){if(C(f.wrappedCircle,i.wrappedCircle)){t=f,n.next=t,t.previous=n,--l;continue r}P+=f.wrappedCircle.r,f=f.next}else{if(C(m.wrappedCircle,i.wrappedCircle)){n=m,n.next=t,t.previous=n,--l;continue r}N+=m.wrappedCircle.r,m=m.previous}while(f!==m.next);for(i.previous=n,i.next=t,n.next=t.previous=t=i,v=q(n);(i=i.next)!==t;)(x=q(i))<v&&(n=i,v=x);t=n.next}n=[t.wrappedCircle],i=t;for(var k=1e4;(i=i.next)!==t&&--k!==0;)n.push(i.wrappedCircle);for(i=S(n,a),l=0;l<e;++l)n=r[l],n.x-=i.x,n.y-=i.y;return i.r}function L(r,a){var e=0;if(r.hasChildren()){for(var n in r.children){var t=r.children[n];t.hasChildren()&&(t.r=L(t,a))}e=M(Object.values(r.children),a)}return e}function D(r,a){L(r,a);for(var e in r.children){var n=r.children[e];n.applyPositionToChildren()}}function z(r,a,e){if(!p(a))throw new Error("graphology-layout/circlepack: the given graph is not a valid graphology instance.");e=w(e,h);var n={},t={},i=a.nodes(),v=e.center,x=e.hierarchyAttributes,l=u.createShuffleInPlace(e.rng),f=e.scale,m=new o;a.forEachNode(function($,j){var H=j.size?j.size:1,Z=new o($,null,null,H),T=m;x.forEach(function(G){var F=j[G];T=T.getChild(F)}),T.addChild($,Z)}),D(m,l),c(a,m,n);var P=i.length,N,k,O;for(O=0;O<P;O++){var _=i[O];N=v+f*n[_].x,k=v+f*n[_].y,t[_]={x:N,y:k},r&&(a.setNodeAttribute(_,e.attributes.x,N),a.setNodeAttribute(_,e.attributes.y,k))}return t}var W=z.bind(null,!1);return W.assign=z.bind(null,!0),tr=W,tr}var ir,vr;function Ar(){if(vr)return ir;vr=1;var w=Y(),p=X(),u={dimensions:["x","y"],center:.5,scale:1};function h(c,y,s){if(!p(y))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");s=w(s,u);var d=s.dimensions;if(!Array.isArray(d)||d.length!==2)throw new Error("graphology-layout/random: given dimensions are invalid.");var A=s.center,g=s.scale,b=Math.PI*2,R=(A-.5)*g,I=y.order,q=d[0],S=d[1];function E(L,D){return D[q]=g*Math.cos(L*b/I)+R,D[S]=g*Math.sin(L*b/I)+R,D}var C=0;if(!c){var M={};return y.forEachNode(function(L){M[L]=E(C++,{})}),M}y.updateEachNodeAttributes(function(L,D){return E(C++,D),D},{attributes:d})}var o=h.bind(null,!1);return o.assign=h.bind(null,!0),ir=o,ir}var or,hr;function br(){if(hr)return or;hr=1;var w=Y(),p=X(),u={dimensions:["x","y"],center:.5,rng:Math.random,scale:1};function h(c,y,s){if(!p(y))throw new Error("graphology-layout/random: the given graph is not a valid graphology instance.");s=w(s,u);var d=s.dimensions;if(!Array.isArray(d)||d.length<1)throw new Error("graphology-layout/random: given dimensions are invalid.");var A=d.length,g=s.center,b=s.rng,R=s.scale,I=(g-.5)*R;function q(E){for(var C=0;C<A;C++)E[d[C]]=b()*R+I;return E}if(!c){var S={};return y.forEachNode(function(E){S[E]=q({})}),S}y.updateEachNodeAttributes(function(E,C){return q(C),C},{attributes:d})}var o=h.bind(null,!1);return o.assign=h.bind(null,!0),or=o,or}var ur,yr;function Rr(){if(yr)return ur;yr=1;var w=Y(),p=X(),u=Math.PI/180,h={dimensions:["x","y"],centeredOnZero:!1,degrees:!1};function o(y,s,d,A){if(!p(s))throw new Error("graphology-layout/rotation: the given graph is not a valid graphology instance.");A=w(A,h),A.degrees&&(d*=u);var g=A.dimensions;if(!Array.isArray(g)||g.length!==2)throw new Error("graphology-layout/random: given dimensions are invalid.");if(s.order===0)return y?void 0:{};var b=g[0],R=g[1],I=0,q=0;if(!A.centeredOnZero){var S=1/0,E=-1/0,C=1/0,M=-1/0;s.forEachNode(function(r,a){var e=a[b],n=a[R];e<S&&(S=e),e>E&&(E=e),n<C&&(C=n),n>M&&(M=n)}),I=(S+E)/2,q=(C+M)/2}var L=Math.cos(d),D=Math.sin(d);function z(r){var a=r[b],e=r[R];return r[b]=I+(a-I)*L-(e-q)*D,r[R]=q+(a-I)*D+(e-q)*L,r}if(!y){var W={};return s.forEachNode(function(r,a){var e={};e[b]=a[b],e[R]=a[R],W[r]=z(e)}),W}s.updateEachNodeAttributes(function(r,a){return z(a),a},{attributes:g})}var c=o.bind(null,!1);return c.assign=o.bind(null,!0),ur=c,ur}var xr;function Pr(){return xr||(xr=1,U.circlepack=Er(),U.circular=Ar(),U.random=br(),U.rotation=Rr()),U}var pr=Pr();const qr=gr(pr),Lr=wr({__proto__:null,default:qr},[pr]);export{Lr as i};
|
|
Binary file
|
|
Binary file
|