likec4 1.55.1 → 1.57.0
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/__app__/chunks/AIChat2.mjs +2 -0
- package/__app__/chunks/DiagramActorProvider.mjs +10 -0
- package/__app__/chunks/EmbedPage.mjs +1 -0
- package/__app__/chunks/ExportPage.mjs +2 -0
- package/__app__/chunks/LikeC4Diagram.mjs +19 -0
- package/__app__/chunks/LikeC4Styles.mjs +48 -0
- package/__app__/chunks/Markdown.mjs +1 -0
- package/__app__/chunks/NavigationPanel.mjs +1 -0
- package/__app__/chunks/ViewReact.mjs +1 -0
- package/__app__/chunks/adhoc-editor.mjs +1 -0
- package/__app__/chunks/aichat.mjs +1 -0
- package/__app__/chunks/box.mjs +1 -0
- package/__app__/chunks/create-style-context.mjs +1 -0
- package/__app__/chunks/css.mjs +1 -0
- package/__app__/chunks/factory.mjs +1 -0
- package/__app__/chunks/hooks.mjs +1 -0
- package/__app__/chunks/hstack.mjs +1 -0
- package/__app__/chunks/libs/@dagrejs/dagre.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/core.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/dom.mjs +1 -0
- package/__app__/chunks/libs/@floating-ui/react.mjs +1 -0
- package/__app__/chunks/libs/@mantine/core.mjs +41 -0
- package/__app__/chunks/libs/@mantine/hooks.mjs +1 -0
- package/__app__/chunks/libs/@nanostores/react.mjs +1 -0
- package/__app__/chunks/libs/@react-hookz/web.mjs +1 -0
- package/__app__/chunks/libs/@tabler/icons-react.mjs +358 -0
- package/__app__/chunks/libs/@tanstack/ai-client.mjs +2 -0
- package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/ai-react.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/ai.mjs +2 -0
- package/__app__/chunks/libs/@tanstack/history.mjs +1 -0
- package/__app__/chunks/libs/@tanstack/react-router.mjs +3 -0
- package/__app__/chunks/libs/@tanstack/router-core.mjs +1 -0
- package/__app__/chunks/libs/@xstate/react.mjs +1 -0
- package/__app__/chunks/libs/@xstate/store.mjs +1 -0
- package/__app__/chunks/libs/@xyflow/react.mjs +7 -0
- package/__app__/chunks/libs/@zag-js/anatomy.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/collection.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/core.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/react.mjs +1 -0
- package/__app__/chunks/libs/@zag-js/tree-view.mjs +1 -0
- package/__app__/chunks/libs/bezier-js.mjs +1 -0
- package/__app__/chunks/libs/copy-anything.mjs +1 -0
- package/__app__/chunks/libs/d3-path.mjs +1 -0
- package/__app__/chunks/libs/d3-shape.mjs +1 -0
- package/__app__/chunks/libs/fast-equals.mjs +1 -0
- package/__app__/chunks/libs/framer-motion.mjs +9 -0
- package/__app__/chunks/libs/html-to-image.mjs +2 -0
- package/__app__/chunks/libs/motion-dom.mjs +1 -0
- package/__app__/chunks/libs/nanostores.mjs +1 -0
- package/__app__/chunks/libs/react-error-boundary.mjs +1 -0
- package/__app__/chunks/libs/react-resizable-panels.mjs +1 -0
- package/__app__/chunks/libs/remeda.mjs +1 -0
- package/__app__/chunks/libs/superjson.mjs +1 -0
- package/__app__/chunks/libs/zod.mjs +64 -0
- package/__app__/chunks/rolldown-runtime.mjs +1 -0
- package/__app__/chunks/styles.css.mjs +1 -0
- package/__app__/chunks/txt.mjs +1 -0
- package/__app__/chunks/useLikeC4Project.mjs +1 -0
- package/__app__/codegen/react.mjs +11 -0
- package/__app__/codegen/webcomponent.mjs +942 -0
- package/__app__/src/aichat/index.mjs +1 -0
- package/__app__/src/fonts.css +1 -1
- package/__app__/src/main.mjs +45 -0
- package/__app__/src/pages/AdHocViewEditor.mjs +1 -0
- package/__app__/src/pages/EmbedPage.mjs +1 -0
- package/__app__/src/pages/ExportPage.mjs +1 -0
- package/__app__/src/pages/ProjectsOverview.mjs +1 -0
- package/__app__/src/pages/ViewAsD2.mjs +1 -0
- package/__app__/src/pages/ViewAsDot.mjs +1 -0
- package/__app__/src/pages/ViewAsMmd.mjs +1 -0
- package/__app__/src/pages/ViewAsPuml.mjs +1 -0
- package/__app__/src/pages/ViewEditor.mjs +1 -0
- package/__app__/src/pages/ViewReact.mjs +1 -0
- package/__app__/src/style.css +1 -1
- package/config/schema.json +14 -41
- package/dist/chunks/enableServer.mjs +1 -0
- package/dist/chunks/filenames.mjs +17 -0
- package/dist/{_chunks → chunks}/index.d.mts +2 -1
- package/dist/{_chunks → chunks}/index2.d.mts +639 -388
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -0
- package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -0
- package/dist/chunks/libs/@chevrotain/utils.mjs +1 -0
- package/dist/chunks/libs/@hono/mcp.mjs +70 -0
- package/dist/chunks/libs/@hono/node-server.mjs +1 -0
- package/dist/{_chunks → chunks}/libs/@logtape/logtape.d.mts +2 -0
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -0
- package/dist/chunks/libs/@lume/kiwi.mjs +1 -0
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +12 -0
- package/dist/chunks/libs/@ts-graphviz/ast.mjs +3 -0
- package/dist/chunks/libs/@ts-graphviz/common.d.mts +9 -0
- package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -0
- package/dist/chunks/libs/ajv.mjs +1 -0
- package/dist/chunks/libs/ansi-align.mjs +2 -0
- package/dist/chunks/libs/ansi-regex.mjs +1 -0
- package/dist/chunks/libs/ansi-styles.mjs +1 -0
- package/dist/chunks/libs/atomically.mjs +1 -0
- package/dist/chunks/libs/birpc.mjs +1 -0
- package/dist/chunks/libs/boxen.mjs +22 -0
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -0
- package/dist/chunks/libs/chevrotain.mjs +58 -0
- package/dist/chunks/libs/conf.mjs +1 -0
- package/dist/chunks/libs/defu.mjs +1 -0
- package/dist/chunks/libs/destr.mjs +1 -0
- package/dist/chunks/libs/eventemitter3.mjs +1 -0
- package/dist/chunks/libs/find-up-simple.mjs +1 -0
- package/dist/chunks/libs/get-port.mjs +1 -0
- package/dist/chunks/libs/hono.mjs +1 -0
- package/dist/chunks/libs/is-docker.mjs +1 -0
- package/dist/chunks/libs/is-error-instance.mjs +1 -0
- package/dist/chunks/libs/is-inside-container.mjs +1 -0
- package/dist/chunks/libs/is-plain-obj.mjs +1 -0
- package/dist/chunks/libs/isexe.mjs +1 -0
- package/dist/chunks/libs/json5.mjs +14 -0
- package/dist/chunks/libs/khroma.mjs +1 -0
- package/dist/chunks/libs/ky.mjs +3 -0
- package/dist/{_chunks → chunks}/libs/langium.d.mts +9 -9
- package/dist/chunks/libs/langium.mjs +32 -0
- package/dist/chunks/libs/merge-error-cause.mjs +2 -0
- package/dist/chunks/libs/p-debounce.mjs +1 -0
- package/dist/chunks/libs/p-limit.mjs +1 -0
- package/dist/chunks/libs/p-queue.mjs +1 -0
- package/dist/chunks/libs/p-timeout.mjs +1 -0
- package/dist/chunks/libs/package-manager-detector.mjs +1 -0
- package/dist/chunks/libs/package-up.mjs +1 -0
- package/dist/chunks/libs/pako.mjs +3 -0
- package/dist/chunks/libs/parse-ms.mjs +1 -0
- package/dist/chunks/libs/pathe.mjs +1 -0
- package/dist/chunks/libs/picomatch.mjs +1 -0
- package/dist/chunks/libs/pretty-ms.mjs +1 -0
- package/dist/chunks/libs/remeda.mjs +1 -0
- package/dist/chunks/libs/safe-stringify.mjs +1 -0
- package/dist/chunks/libs/strip-indent.mjs +1 -0
- package/dist/chunks/libs/tinyrainbow.mjs +1 -0
- package/dist/chunks/libs/ts-graphviz.mjs +1 -0
- package/dist/chunks/libs/ufo.mjs +1 -0
- package/dist/chunks/libs/unctx.mjs +1 -0
- package/dist/chunks/libs/unstorage.mjs +1 -0
- package/dist/chunks/libs/vscode-languageserver.mjs +1 -0
- package/dist/chunks/libs/which.mjs +1 -0
- package/dist/chunks/libs/word-wrap.mjs +12 -0
- package/dist/{_chunks → chunks}/libs/zod.d.mts +62 -25
- package/dist/chunks/node.mjs +93 -0
- package/dist/chunks/plugin.mjs +593 -0
- package/dist/chunks/rolldown-runtime.mjs +1 -0
- package/dist/chunks/sequence-view.mjs +1 -0
- package/dist/cli/index.mjs +188 -59
- package/dist/config/index.d.mts +1 -2
- package/dist/config/index.mjs +1 -1
- package/dist/index.d.mts +2 -135
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +3 -2
- package/dist/model/index.mjs +1 -1
- package/dist/vite-plugin/index.d.mts +90 -9
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +1 -0
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +1 -0
- package/dist/{_chunks/libs/@nanostores/react.d.mts → vite-plugin/internal/index.d.mts} +103 -45
- package/dist/vite-plugin/internal/index.mjs +1 -0
- package/package.json +74 -80
- package/react/index.d.mts +84 -78
- package/react/index.mjs +51954 -53701
- package/vite-plugin/internal/package.json +2 -2
- package/vite-plugin-modules.d.ts +18 -0
- package/__app__/react/likec4.tsx +0 -25
- package/__app__/src/ProjectsOverview.js +0 -16
- package/__app__/src/const.js +0 -19
- package/__app__/src/likec4.js +0 -21254
- package/__app__/src/main.js +0 -7
- package/__app__/src/routes/index.js +0 -324
- package/__app__/src/routes/projects.js +0 -193
- package/__app__/src/routes/single.js +0 -1983
- package/__app__/src/vendors.js +0 -52683
- package/__app__/src/webcomponent.js +0 -68
- package/dist/THIRD-PARTY-LICENSES.md +0 -1609
- package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +0 -30
- package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +0 -9
- package/dist/_chunks/libs/@chevrotain/types.d.mts +0 -1
- package/dist/_chunks/libs/@chevrotain/utils.mjs +0 -1
- package/dist/_chunks/libs/@hono/mcp.mjs +0 -45
- package/dist/_chunks/libs/@hono/node-server.mjs +0 -1
- package/dist/_chunks/libs/@logtape/logtape.mjs +0 -4
- package/dist/_chunks/libs/@lume/kiwi.mjs +0 -1
- package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
- package/dist/_chunks/libs/@nanostores/react.mjs +0 -1
- package/dist/_chunks/libs/ajv.mjs +0 -1
- package/dist/_chunks/libs/ansi-align.mjs +0 -2
- package/dist/_chunks/libs/ansi-regex.mjs +0 -1
- package/dist/_chunks/libs/ansi-styles.mjs +0 -1
- package/dist/_chunks/libs/atomically.mjs +0 -1
- package/dist/_chunks/libs/birpc.mjs +0 -1
- package/dist/_chunks/libs/boxen.mjs +0 -22
- package/dist/_chunks/libs/chevrotain-allstar.mjs +0 -2
- package/dist/_chunks/libs/chevrotain.mjs +0 -58
- package/dist/_chunks/libs/conf.mjs +0 -1
- package/dist/_chunks/libs/defu.mjs +0 -1
- package/dist/_chunks/libs/destr.mjs +0 -1
- package/dist/_chunks/libs/esm-env.mjs +0 -1
- package/dist/_chunks/libs/eventemitter3.mjs +0 -1
- package/dist/_chunks/libs/fast-equals.mjs +0 -1
- package/dist/_chunks/libs/find-up-simple.mjs +0 -1
- package/dist/_chunks/libs/get-port.mjs +0 -1
- package/dist/_chunks/libs/is-docker.mjs +0 -1
- package/dist/_chunks/libs/is-error-instance.mjs +0 -1
- package/dist/_chunks/libs/is-inside-container.mjs +0 -1
- package/dist/_chunks/libs/is-plain-obj.mjs +0 -1
- package/dist/_chunks/libs/isexe.mjs +0 -1
- package/dist/_chunks/libs/json5.mjs +0 -14
- package/dist/_chunks/libs/khroma.mjs +0 -1
- package/dist/_chunks/libs/ky.mjs +0 -3
- package/dist/_chunks/libs/langium.mjs +0 -33
- package/dist/_chunks/libs/merge-error-cause.mjs +0 -2
- package/dist/_chunks/libs/p-limit.mjs +0 -1
- package/dist/_chunks/libs/p-queue.mjs +0 -1
- package/dist/_chunks/libs/p-timeout.mjs +0 -1
- package/dist/_chunks/libs/package-manager-detector.mjs +0 -1
- package/dist/_chunks/libs/package-up.mjs +0 -1
- package/dist/_chunks/libs/pako.mjs +0 -1
- package/dist/_chunks/libs/parse-ms.mjs +0 -1
- package/dist/_chunks/libs/pathe.mjs +0 -1
- package/dist/_chunks/libs/picomatch.mjs +0 -1
- package/dist/_chunks/libs/pretty-ms.mjs +0 -1
- package/dist/_chunks/libs/remeda.mjs +0 -2
- package/dist/_chunks/libs/safe-stringify.mjs +0 -1
- package/dist/_chunks/libs/strip-indent.mjs +0 -1
- package/dist/_chunks/libs/tinyrainbow.mjs +0 -1
- package/dist/_chunks/libs/ts-graphviz.d.mts +0 -10
- package/dist/_chunks/libs/ts-graphviz.mjs +0 -4
- package/dist/_chunks/libs/ufo.mjs +0 -1
- package/dist/_chunks/libs/unstorage.mjs +0 -1
- package/dist/_chunks/libs/vscode-languageserver.mjs +0 -1
- package/dist/_chunks/libs/which.mjs +0 -1
- package/dist/_chunks/libs/word-wrap.mjs +0 -12
- package/dist/_chunks/node.mjs +0 -76
- package/dist/_chunks/rolldown-runtime.mjs +0 -1
- package/dist/_chunks/sequence.mjs +0 -1
- package/dist/_chunks/src.mjs +0 -17
- package/dist/_chunks/src2.mjs +0 -499
- package/dist/vite-plugin/internal.d.mts +0 -44
- package/dist/vite-plugin/internal.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e,r as t}from"./libs/@mantine/core.mjs";import{t as n}from"./txt.mjs";import{r,t as i}from"./libs/nanostores.mjs";import{t as a}from"./libs/@nanostores/react.mjs";import{Suspense as o,lazy as s}from"react";import{c}from"react-compiler-runtime";import{jsx as l}from"react/jsx-runtime";const u=r(``),d=r(`closed`),f=i([u,d],(e,t)=>({log:e,status:t}));function p(){return a(f)}function m(){d.set(`closed`),u.set(``)}import.meta.hot?.on(`likec4:apply-semantic-layout`,e=>{`type`in e?e.type===`started`?(d.set(`processing`),u.set(``)):e.type===`completed`&&d.set(`completed`):u.set(u.get()+e.log)});function h(){let r=c(6),{log:i,status:a}=p();if(a===`closed`)return null;let o=a===`completed`,s;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=l(t,{order:4,children:`Semantic Layout`}),r[0]=s):s=r[0];let u=i||`Waiting for response...`,d;r[1]===u?d=r[2]:(d=l(n,{whiteSpace:`pre-wrap`,children:u}),r[1]=u,r[2]=d);let f;return r[3]!==o||r[4]!==d?(f=l(e,{size:`xl`,opened:!0,onClose:m,closeOnEscape:o,withCloseButton:o,closeOnClickOutside:o,title:s,children:d}),r[3]=o,r[4]=d,r[5]=f):f=r[5],f}const g=s(()=>import(`./AIChat2.mjs`));function _(){let e=c(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=l(o,{children:l(g,{})}),e[0]=t):t=e[0],t}export{h as n,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as e,p as t,s as n,t as r}from"./css.mjs";import{t as i}from"./factory.mjs";import{createElement as a,forwardRef as o}from"react";const s={transform(e){return e}},c=(e={})=>{let r=n(s,e);return s.transform(r,t)},l=e=>r(c(e));l.raw=c;const u=o(function(t,n){let[r,o]=e(t,[]),s={ref:n,...c(r),...o};return a(i.div,s)});export{u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,s as t,t as n}from"./factory.mjs";import{X as r}from"./LikeC4Styles.mjs";import{createContext as i,createElement as a,forwardRef as o,useContext as s}from"react";function c(e){let t=i(void 0);return[t,(n,r)=>{let i=s(t);if(i===void 0){let t=n?`Component "${n}"`:`A component`,i=r?` (slot: "${r}")`:``;throw Error(`${t}${i} cannot access ${e} because it's missing its Provider.`)}return i}]}function l(i){let s=`__recipe__`in i,l=s&&i.__name__?i.__name__:void 0,[u,d]=c(l?`createStyleContext("${l}")`:`createStyleContext`),f=s?i:r(i.config),p=(e,n)=>{let{unstyled:r,...i}=e;return r?i:s?{...i,className:t(n,i.className)}:{...n,...i}};return{withRootProvider:(t,n)=>{let r=e=>{let[r,i]=f.splitVariantProps(e),o=s?f(r):f.raw(r);o._classNameMap=f.classNameMap;let c=n?.defaultProps?{...n.defaultProps,...i}:i;return a(u.Provider,{value:o,children:a(t,c)})};return r.displayName=`withRootProvider(${e(t)})`,r},withProvider:(r,i,c)=>{let l=n(r,{},c),d=o((e,n)=>{let[r,o]=f.splitVariantProps(e),d=s?f(r):f.raw(r);d._classNameMap=f.classNameMap;let m=p({...o,className:o.className??c?.defaultProps?.className},d[i]);return a(u.Provider,{value:d,children:a(l,{...m,className:t(m.className,d._classNameMap[i]),ref:n})})});return d.displayName=`withProvider(${e(r)})`,d},withContext:(r,i,s)=>{let c=n(r,{},s),l=e(r),u=o((e,n)=>{let r=d(l,i),o=p({...e,className:e.className??s?.defaultProps?.className},r[i]);return a(c,{...o,className:t(o.className,r._classNameMap[i]),ref:n})});return u.displayName=`withContext(${l})`,u}}}export{l as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var t=e=>typeof e==`object`&&!!e;function n(e){return Object.fromEntries(Object.entries(e??{}).filter(([e,t])=>t!==void 0))}var r=e=>e===`base`;function i(e){return e.slice().filter(e=>!r(e))}function a(e){return String.fromCharCode(e+(e>25?39:97))}function o(e){let t=``,n;for(n=Math.abs(e);n>52;n=n/52|0)t=a(n%52)+t;return a(n%52)+t}function s(e,t){let n=t.length;for(;n;)e=e*33^t.charCodeAt(--n);return e}function c(e){return o(s(5381,e)>>>0)}var l=/\s*!(important)?/i;function u(e){return typeof e==`string`?l.test(e):!1}function d(e){return typeof e==`string`?e.replace(l,``).trim():e}function f(e){return typeof e==`string`?e.replaceAll(` `,`_`):e}var p=e=>{let t=new Map;return(...n)=>{let r=JSON.stringify(n);if(t.has(r))return t.get(r);let i=e(...n);return t.set(r,i),i}},ee=new Set([`__proto__`,`constructor`,`prototype`]);function m(...t){return t.reduce((t,n)=>(n&&Object.keys(n).forEach(r=>{if(ee.has(r))return;let i=t[r],a=n[r];e(i)&&e(a)?t[r]=m(i,a):t[r]=a}),t),{})}var h=e=>e!=null;function g(e,n,r={}){let{stop:i,getKey:a}=r;function o(e,r=[]){if(t(e)){let t={};for(let[s,c]of Object.entries(e)){let l=a?.(s,c)??s,u=[...r,l];if(i?.(e,u))return n(e,r);let d=o(c,u);h(d)&&(t[l]=d)}return t}return n(e,r)}return o(e)}function _(t,n){return Array.isArray(t)?t.map(e=>n(e)):e(t)?g(t,e=>n(e)):n(t)}function v(e,t){return e.reduce((e,n,r)=>{let i=t[r];return n!=null&&(e[i]=n),e},{})}function y(e,t,n=!0){let{utility:r,conditions:i}=t,{hasShorthand:a,resolveShorthand:o}=r;return g(e,e=>Array.isArray(e)?v(e,i.breakpoints.keys):e,{stop:e=>Array.isArray(e),getKey:n?e=>a?o(e):e:void 0})}var b={shift:e=>e,finalize:e=>e,breakpoints:{keys:[]}},x=e=>typeof e==`string`?e.replaceAll(/[\n\s]+/g,` `):e;function S(e){let{utility:t,hash:n,conditions:r=b}=e,a=e=>[t.prefix,e].filter(Boolean).join(`-`),o=(e,i)=>{let o;if(n){let n=[...r.finalize(e),i];o=a(t.toHash(n,c))}else o=[...r.finalize(e),a(i)].join(`:`);return o};return p(({base:n,...a}={})=>{let s=y(Object.assign(a,n),e),c=new Set;return g(s,(e,n)=>{if(e==null)return;let a=u(e),[s,...l]=r.shift(n),f=o(i(l),t.transform(s,d(x(e))).className);a&&(f=`${f}!`),c.add(f)}),Array.from(c).join(` `)})}function C(...t){return t.flat().filter(t=>e(t)&&Object.keys(n(t)).length>0)}function w(e){function t(t){let n=C(...t);return n.length===1?n:n.map(t=>y(t,e))}function n(...e){return m(...t(e))}function r(...e){return Object.assign({},...t(e))}return{mergeCss:p(n),assignCss:r}}var T=/([A-Z])/g,E=/^ms-/,D=p(e=>e.startsWith(`--`)?e:e.replace(T,`-$1`).replace(E,`-ms-`).toLowerCase()),O=RegExp(`^(${[`min`,`max`,`clamp`,`calc`].join(`|`)})\\(.*\\)`),k=e=>typeof e==`string`&&O.test(e),A=`(?:${`cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%`.split(`,`).join(`|`)})`,te=RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${A}$`),j={map:_,isCssFunction:k,isCssVar:e=>typeof e==`string`&&/^var\(--.+\)$/.test(e),isCssUnit:e=>typeof e==`string`&&te.test(e)},M=(e,t)=>{if(!e?.defaultValues)return t;let r=typeof e.defaultValues==`function`?e.defaultValues(t):e.defaultValues;return Object.assign({},r,n(t))},N=(e={})=>{let t=t=>({className:[e.className,t].filter(Boolean).join(`__`),base:e.base?.[t]??{},variants:{},defaultVariants:e.defaultVariants??{},compoundVariants:e.compoundVariants?P(e.compoundVariants,t):[]}),n=(e.slots??[]).map(e=>[e,t(e)]);for(let[t,r]of Object.entries(e.variants??{}))for(let[e,i]of Object.entries(r))n.forEach(([n,r])=>{r.variants[t]??={},r.variants[t][e]=i[n]??{}});return Object.fromEntries(n)},P=(e,t)=>e.filter(e=>e.css[t]).map(e=>({...e,css:e.css[t]}));function F(e,...t){let n=Object.getOwnPropertyDescriptors(e),r=Object.keys(n),i=e=>{let t={};for(let r=0;r<e.length;r++){let i=e[r];n[i]&&(Object.defineProperty(t,i,n[i]),delete n[i])}return t};return t.map(e=>i(Array.isArray(e)?e:r.filter(e))).concat(i(r))}var I=(...e)=>{let t=e.reduce((e,t)=>(t&&t.forEach(t=>e.add(t)),e),new Set([]));return Array.from(t)},L=[`htmlSize`,`htmlTranslate`,`htmlWidth`,`htmlHeight`];function R(e){return L.includes(e)?e.replace(`html`,``).toLowerCase():e}function z(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[R(e),t]))}z.keys=L;const B=new Set(`_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_shapeBucket,_shapeDocument,_shapeComponent,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelectable,_whenSelected,_whenDimmed,_whenFocused,_p3,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,base`.split(`,`)),V=/^@|&|&$/;function H(e){return B.has(e)||V.test(e)}const U=/^_/,W=/&|@/;function G(e){return e.map(e=>B.has(e)?e.replace(U,``):W.test(e)?`[${f(e.trim())}]`:e)}function K(e){return e.sort((e,t)=>{let n=H(e),r=H(t);return n&&!r?1:!n&&r?-1:0})}const q=new Map,J=new Map;`aspectRatio:asp,boxDecorationBreak:bx-db,zIndex:z,boxSizing:bx-s,objectPosition:obj-p,objectFit:obj-f,overscrollBehavior:ovs-b,overscrollBehaviorX:ovs-bx,overscrollBehaviorY:ovs-by,position:pos/1,top:top,left:left,inset:inset,insetInline:inset-x/insetX,insetBlock:inset-y/insetY,insetBlockEnd:inset-be,insetBlockStart:inset-bs,insetInlineEnd:inset-e/insetEnd/end,insetInlineStart:inset-s/insetStart/start,right:right,bottom:bottom,float:float,visibility:vis,display:d,hideFrom:hide,hideBelow:show,flexBasis:flex-b,flex:flex,flexDirection:flex-d/flexDir,flexGrow:flex-g,flexShrink:flex-sh,gridTemplateColumns:grid-tc,gridTemplateRows:grid-tr,gridColumn:grid-c,gridRow:grid-r,gridColumnStart:grid-cs,gridColumnEnd:grid-ce,gridAutoFlow:grid-af,gridAutoColumns:grid-ac,gridAutoRows:grid-ar,gap:gap,gridGap:grid-g,gridRowGap:grid-rg,gridColumnGap:grid-cg,rowGap:rg,columnGap:cg,justifyContent:jc,alignContent:ac,alignItems:ai,alignSelf:as,padding:p/1,paddingLeft:pl/1,paddingRight:pr/1,paddingTop:pt/1,paddingBottom:pb/1,paddingBlock:py/1/paddingY,paddingBlockEnd:pbe,paddingBlockStart:pbs,paddingInline:px/paddingX/1,paddingInlineEnd:pe/1/paddingEnd,paddingInlineStart:ps/1/paddingStart,marginLeft:ml/1,marginRight:mr/1,marginTop:mt/1,marginBottom:mb/1,margin:m/1,marginBlock:my/1/marginY,marginBlockEnd:mbe,marginBlockStart:mbs,marginInline:mx/1/marginX,marginInlineEnd:me/1/marginEnd,marginInlineStart:ms/1/marginStart,spaceX:sx,spaceY:sy,outlineWidth:ring-w/ringWidth,outlineColor:ring-c/ringColor,outline:ring/1,outlineOffset:ring-o/ringOffset,focusRing:focus-ring,focusVisibleRing:focus-v-ring,focusRingColor:focus-ring-c,focusRingOffset:focus-ring-o,focusRingWidth:focus-ring-w,focusRingStyle:focus-ring-s,divideX:dvd-x,divideY:dvd-y,divideColor:dvd-c,divideStyle:dvd-s,width:w/1,inlineSize:w-is,minWidth:min-w/minW,minInlineSize:min-w-is,maxWidth:max-w/maxW,maxInlineSize:max-w-is,height:h/1,blockSize:h-bs,minHeight:min-h/minH,minBlockSize:min-h-bs,maxHeight:max-h/maxH,maxBlockSize:max-b,boxSize:size,color:c,fontFamily:ff,fontSize:fs,fontSizeAdjust:fs-a,fontPalette:fp,fontKerning:fk,fontFeatureSettings:ff-s,fontWeight:fw,fontSmoothing:fsmt,fontVariant:fv,fontVariantAlternates:fv-alt,fontVariantCaps:fv-caps,fontVariationSettings:fv-s,fontVariantNumeric:fv-num,letterSpacing:ls,lineHeight:lh,textAlign:ta,textDecoration:td,textDecorationColor:td-c,textEmphasisColor:te-c,textDecorationStyle:td-s,textDecorationThickness:td-t,textUnderlineOffset:tu-o,textTransform:tt,textIndent:ti,textShadow:tsh,textShadowColor:tsh-c/textShadowColor,WebkitTextFillColor:wktf-c,textOverflow:tov,verticalAlign:va,wordBreak:wb,textWrap:tw,truncate:trunc,lineClamp:lc,listStyleType:li-t,listStylePosition:li-pos,listStyleImage:li-img,listStyle:li-s,backgroundPosition:bg-p/bgPosition,backgroundPositionX:bg-p-x/bgPositionX,backgroundPositionY:bg-p-y/bgPositionY,backgroundAttachment:bg-a/bgAttachment,backgroundClip:bg-cp/bgClip,background:bg/1,backgroundColor:bg-c/bgColor,backgroundOrigin:bg-o/bgOrigin,backgroundImage:bg-i/bgImage,backgroundRepeat:bg-r/bgRepeat,backgroundBlendMode:bg-bm/bgBlendMode,backgroundSize:bg-s/bgSize,backgroundGradient:bg-grad/bgGradient,backgroundLinear:bg-linear/bgLinear,backgroundRadial:bg-radial/bgRadial,backgroundConic:bg-conic/bgConic,textGradient:txt-grad,gradientFromPosition:grad-from-pos,gradientToPosition:grad-to-pos,gradientFrom:grad-from,gradientTo:grad-to,gradientVia:grad-via,gradientViaPosition:grad-via-pos,borderRadius:bdr/rounded,borderTopLeftRadius:bdr-tl/roundedTopLeft,borderTopRightRadius:bdr-tr/roundedTopRight,borderBottomRightRadius:bdr-br/roundedBottomRight,borderBottomLeftRadius:bdr-bl/roundedBottomLeft,borderTopRadius:bdr-t/roundedTop,borderRightRadius:bdr-r/roundedRight,borderBottomRadius:bdr-b/roundedBottom,borderLeftRadius:bdr-l/roundedLeft,borderStartStartRadius:bdr-ss/roundedStartStart,borderStartEndRadius:bdr-se/roundedStartEnd,borderStartRadius:bdr-s/roundedStart,borderEndStartRadius:bdr-es/roundedEndStart,borderEndEndRadius:bdr-ee/roundedEndEnd,borderEndRadius:bdr-e/roundedEnd,border:bd,borderWidth:bd-w,borderTopWidth:bd-t-w,borderLeftWidth:bd-l-w,borderRightWidth:bd-r-w,borderBottomWidth:bd-b-w,borderBlockStartWidth:bd-bs-w,borderBlockEndWidth:bd-be-w,borderColor:bd-c,borderInline:bd-x/borderX,borderInlineWidth:bd-x-w/borderXWidth,borderInlineColor:bd-x-c/borderXColor,borderBlock:bd-y/borderY,borderBlockWidth:bd-y-w/borderYWidth,borderBlockColor:bd-y-c/borderYColor,borderLeft:bd-l,borderLeftColor:bd-l-c,borderInlineStart:bd-s/borderStart,borderInlineStartWidth:bd-s-w/borderStartWidth,borderInlineStartColor:bd-s-c/borderStartColor,borderRight:bd-r,borderRightColor:bd-r-c,borderInlineEnd:bd-e/borderEnd,borderInlineEndWidth:bd-e-w/borderEndWidth,borderInlineEndColor:bd-e-c/borderEndColor,borderTop:bd-t,borderTopColor:bd-t-c,borderBottom:bd-b,borderBottomColor:bd-b-c,borderBlockEnd:bd-be,borderBlockEndColor:bd-be-c,borderBlockStart:bd-bs,borderBlockStartColor:bd-bs-c,opacity:op,boxShadow:bx-sh/shadow,boxShadowColor:bx-sh-c/shadowColor,mixBlendMode:mix-bm,filter:filter,brightness:brightness,contrast:contrast,grayscale:grayscale,hueRotate:hue-rotate,invert:invert,saturate:saturate,sepia:sepia,dropShadow:drop-shadow,blur:blur,backdropFilter:bkdp,backdropBlur:bkdp-blur,backdropBrightness:bkdp-brightness,backdropContrast:bkdp-contrast,backdropGrayscale:bkdp-grayscale,backdropHueRotate:bkdp-hue-rotate,backdropInvert:bkdp-invert,backdropOpacity:bkdp-opacity,backdropSaturate:bkdp-saturate,backdropSepia:bkdp-sepia,borderCollapse:bd-cl,borderSpacing:bd-sp,borderSpacingX:bd-sx,borderSpacingY:bd-sy,tableLayout:tbl,transitionTimingFunction:trs-tmf,transitionDelay:trs-dly,transitionDuration:trs-dur,transitionProperty:trs-prop,transition:transition,animation:anim,animationName:anim-n,animationTimingFunction:anim-tmf,animationDuration:anim-dur,animationDelay:anim-dly,animationPlayState:anim-ps,animationComposition:anim-comp,animationFillMode:anim-fm,animationDirection:anim-dir,animationIterationCount:anim-ic,animationRange:anim-r,animationState:anim-s,animationRangeStart:anim-rs,animationRangeEnd:anim-re,animationTimeline:anim-tl,transformOrigin:trf-o,transformBox:trf-b,transformStyle:trf-s,transform:trf,rotate:rotate,rotateX:rotate-x,rotateY:rotate-y,rotateZ:rotate-z,scale:scale,scaleX:scale-x,scaleY:scale-y,translate:translate,translateX:translate-x/x,translateY:translate-y/y,translateZ:translate-z/z,accentColor:ac-c,caretColor:ca-c,scrollBehavior:scr-bhv,scrollbar:scr-bar,scrollbarColor:scr-bar-c,scrollbarGutter:scr-bar-g,scrollbarWidth:scr-bar-w,scrollMargin:scr-m,scrollMarginLeft:scr-ml,scrollMarginRight:scr-mr,scrollMarginTop:scr-mt,scrollMarginBottom:scr-mb,scrollMarginBlock:scr-my/scrollMarginY,scrollMarginBlockEnd:scr-mbe,scrollMarginBlockStart:scr-mbt,scrollMarginInline:scr-mx/scrollMarginX,scrollMarginInlineEnd:scr-me,scrollMarginInlineStart:scr-ms,scrollPadding:scr-p,scrollPaddingBlock:scr-py/scrollPaddingY,scrollPaddingBlockStart:scr-pbs,scrollPaddingBlockEnd:scr-pbe,scrollPaddingInline:scr-px/scrollPaddingX,scrollPaddingInlineEnd:scr-pe,scrollPaddingInlineStart:scr-ps,scrollPaddingLeft:scr-pl,scrollPaddingRight:scr-pr,scrollPaddingTop:scr-pt,scrollPaddingBottom:scr-pb,scrollSnapAlign:scr-sa,scrollSnapStop:scrs-s,scrollSnapType:scrs-t,scrollSnapStrictness:scrs-strt,scrollSnapMargin:scrs-m,scrollSnapMarginTop:scrs-mt,scrollSnapMarginBottom:scrs-mb,scrollSnapMarginLeft:scrs-ml,scrollSnapMarginRight:scrs-mr,scrollSnapCoordinate:scrs-c,scrollSnapDestination:scrs-d,scrollSnapPointsX:scrs-px,scrollSnapPointsY:scrs-py,scrollSnapTypeX:scrs-tx,scrollSnapTypeY:scrs-ty,scrollTimeline:scrtl,scrollTimelineAxis:scrtl-a,scrollTimelineName:scrtl-n,touchAction:tch-a,userSelect:us,overflow:ov,overflowWrap:ov-wrap,overflowX:ov-x,overflowY:ov-y,overflowAnchor:ov-a,overflowBlock:ov-b,overflowInline:ov-i,overflowClipBox:ovcp-bx,overflowClipMargin:ovcp-m,overscrollBehaviorBlock:ovs-bb,overscrollBehaviorInline:ovs-bi,fill:fill,stroke:stk,strokeWidth:stk-w,strokeDasharray:stk-dsh,strokeDashoffset:stk-do,strokeLinecap:stk-lc,strokeLinejoin:stk-lj,strokeMiterlimit:stk-ml,strokeOpacity:stk-op,srOnly:sr,debug:debug,appearance:ap,backfaceVisibility:bfv,clipPath:cp-path,hyphens:hy,mask:msk,maskImage:msk-i,maskSize:msk-s,textSizeAdjust:txt-adj,container:cq,containerName:cq-n,containerType:cq-t,cursor:cursor,textStyle:textStyle,layerStyle:layerStyle,animationStyle:animationStyle`.split(`,`).forEach(e=>{let[t,n]=e.split(`:`),[r,...i]=n.split(`/`);q.set(t,r),i.length&&i.forEach(e=>{J.set(e===`1`?r:e,t)})});const Y=e=>J.get(e)||e,X={conditions:{shift:K,finalize:G,breakpoints:{keys:[`base`,`xs`,`sm`,`md`,`lg`,`xl`]}},utility:{transform:(e,t)=>{let n=Y(e);return{className:`${q.get(n)||D(n)}_${f(t)}`}},hasShorthand:!0,toHash:(e,t)=>t(e.join(`:`)),resolveShorthand:Y}},Z=S(X),Q=(...e)=>Z($(...e));Q.raw=(...e)=>$(...e);const{mergeCss:$,assignCss:ne}=w(X);export{n as a,P as c,m as d,z as f,f as g,I as h,K as i,N as l,F as m,$ as n,S as o,j as p,G as r,M as s,Q as t,p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,d as t,f as n,h as r,m as i,n as a,t as o,u as s}from"./css.mjs";import{createElement as c,forwardRef as l,useMemo as u}from"react";function d(){let e=``,t=0,n;for(;t<arguments.length;)(n=arguments[t++])&&typeof n==`string`&&(e&&(e+=` `),e+=n);return e}const f=e=>({base:{},variants:{},defaultVariants:{},compoundVariants:[],...e});function p(n){let{base:c,variants:l,defaultVariants:u,compoundVariants:d}=f(n),h=t=>({...u,...e(t)});function g(e={}){let t=h(e),n={...c};for(let[e,r]of Object.entries(t))l[e]?.[r]&&(n=a(n,l[e][r]));let r=m(d,t);return a(n,r)}function _(e){let n=f(e.config),i=r(e.variantKeys,Object.keys(l));return p({base:a(c,n.base),variants:Object.fromEntries(i.map(e=>[e,a(l[e],n.variants[e])])),defaultVariants:t(u,n.defaultVariants),compoundVariants:[...d,...n.compoundVariants]})}function v(e){return o(g(e))}let y=Object.keys(l);function b(e){return i(e,y)}let x=Object.fromEntries(Object.entries(l).map(([e,t])=>[e,Object.keys(t)]));return Object.assign(s(v),{__cva__:!0,variantMap:x,variantKeys:y,raw:g,config:n,merge:_,splitVariantProps:b,getVariantProps:h})}function m(e,t){let n={};return e.forEach(e=>{Object.entries(e).every(([e,n])=>e===`css`?!0:(Array.isArray(n)?n:[n]).some(n=>t[e]===n))&&(n=a(n,e.css))}),n}function h(e,t,n,r){if(t.length>0&&typeof n?.[r]==`object`)throw Error(`[recipe:${e}:${r}] Conditions are not supported when using compound variants.`)}var g=`css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,WebkitTextFillColor,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,_shapeSizeXs,_shapeSizeSm,_shapeSizeMd,_shapeSizeLg,_shapeSizeXl,_shapeRectangle,_shapePerson,_shapeBrowser,_shapeMobile,_shapeCylinder,_shapeStorage,_shapeQueue,_shapeBucket,_shapeDocument,_shapeComponent,_notDisabled,_reduceGraphics,_reduceGraphicsOnPan,_noReduceGraphics,_whenPanning,_smallZoom,_compoundTransparent,_edgeActive,_whenHovered,_whenSelectable,_whenSelected,_whenDimmed,_whenFocused,_p3,xs,xsOnly,xsDown,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,xsToSm,xsToMd,xsToLg,xsToXl,smToMd,smToLg,smToXl,mdToLg,mdToXl,lgToXl,@/xs,@/sm,@/md,@/lg,@likec4-root/xs,@likec4-root/sm,@likec4-root/md,@likec4-root/lg,@likec4-dialog/xs,@likec4-dialog/sm,@likec4-dialog/md,@likec4-dialog/lg,textStyle,layerStyle,animationStyle`.split(`,`),_=`WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,cornerShape,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical`.split(`,`).concat(g),v=new Map(_.map(e=>[e,!0])),y=/&|@/,b=s(e=>v.has(e)||e.startsWith(`--`)||y.test(e));const x=(e,t)=>!t.includes(e)&&!b(e),S=(e,t)=>e.__shouldForwardProps__&&t?n=>e.__shouldForwardProps__(n)&&t(n):t,C=(e,t)=>{if(e&&!t)return e;if(!e&&t)return t;if(e.__cva__&&t.__cva__||e.__recipe__&&t.__recipe__)return e.merge(t);let n=TypeError(`Cannot merge cva with recipe. Please use either cva or recipe.`);throw TypeError.captureStackTrace?.(n),n},w=e=>typeof e==`string`?e:e?.displayName||e?.name||`Component`;function T(e,t={},r={}){let a=t.__cva__||t.__recipe__?t:p(t),s=r.shouldForwardProp||x,f=e=>r.forwardProps?.includes(e)?!0:s(e,a.variantKeys),m=Object.assign(r.dataAttr&&t.__name__?{"data-recipe":t.__name__}:{},r.defaultProps),h=C(e.__cva__,a),g=S(e,f),_=e.__base__||e,v=l(function(e,r){let{as:a=_,unstyled:s,children:l,...f}=e,p=u(()=>Object.assign({},m,f),[f]),[v,y,x,S,C]=u(()=>i(p,n.keys,g,h.variantKeys,b),[p]);function w(){let{css:e,...t}=S,n=h.__getCompoundVariantCss__?.(x);return d(h(x,!1),o(n,t,e),p.className)}function T(){let{css:e,...t}=S;return d(o(h.raw(x),t,e),p.className)}let E=()=>{if(s){let{css:e,...t}=S;return d(o(t,e),p.className)}return t.__recipe__?w():T()};return c(a,{ref:r,...y,...C,...n(v),className:E()},l??p.children)});return v.displayName=`styled.${w(_)}`,v.__cva__=h,v.__base__=_,v.__shouldForwardProps__=f,v}function E(){let e=new Map;return new Proxy(T,{apply(e,t,n){return T(...n)},get(t,n){return e.has(n)||e.set(n,T(n)),e.get(n)}})}const D=E();export{p as a,h as i,w as n,m as o,b as r,d as s,D as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{d as e,i as t}from"./libs/@tanstack/react-router.mjs";import{a as n}from"./Markdown.mjs";import{c as r}from"./libs/@react-hookz/web.mjs";import{n as i,t as a}from"./libs/fast-equals.mjs";import{createContext as o,useContext as s,useEffect as c,useState as l}from"react";import{c as u}from"react-compiler-runtime";import{useLikeC4Projects as d}from"likec4:projects";const f=o(null),p=f.Provider,m=()=>{let e=s(f);if(e===null)throw Error(`LikeC4ModelAtom is not provided`);return e};function h(e){let t=u(3),n=e===void 0?!0:e,i,a;t[0]===n?(i=t[1],a=t[2]):(i=()=>{let e=document.body.parentElement;if(!(!e||n!==!0))return e.classList.add(`transparent-bg`),()=>{e.classList.remove(`transparent-bg`)}},a=[n],t[0]=n,t[1]=i,t[2]=a),r(i,a)}function g(){let e=u(4),t=m(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[],e[0]=n):n=e[0];let[r,o]=l(n),s,d;return e[1]===t?(s=e[2],d=e[3]):(s=()=>t.subscribe(e=>{o(t=>{let n=[...e.views()].map(e=>{let n=e.$layouted,r=t.find(t=>t.id===e.id);return r&&a(n,r)?r:n});return i(t,n)?t:n})}),d=[t],e[1]=t,e[2]=s,e[3]=d),c(s,d),r}function _(){let t=u(1),n;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n={select:v,strict:!1},t[0]=n):n=t[0],e(n)??`index`}function v(e){return e.viewId}function y(){let e=u(13),t=_(),r=m(),[i,o]=l(`manual`),s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>{o(`manual`)},e[0]=s):s=e[0];let d;e[1]===t?d=e[2]:(d=[t],e[1]=t,e[2]=d),n(s,d);let f;e[3]!==r||e[4]!==t?(f=()=>r.get().findView(t)?.$layouted??null,e[3]=r,e[4]=t,e[5]=f):f=e[5];let[p,h]=l(f),g,v;e[6]!==r||e[7]!==i||e[8]!==t?(g=()=>r.subscribe(e=>{h(n=>{let r=e.findView(t);if(!r)return null;let o=i===`auto`?r.$view:r.$layouted;return a(n,o)?n:o})}),v=[r,t,i],e[6]=r,e[7]=i,e[8]=t,e[9]=g,e[10]=v):(g=e[9],v=e[10]),c(g,v);let y;return e[11]===p?y=e[12]:(y=[p,o],e[11]=p,e[12]=y),y}function b(){let e=u(4),n=d(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={select:x},e[0]=r):r=e[0];let i=t(r),a;return e[1]!==i||e[2]!==n?(a=i&&n.find(e=>e.id===i)||n[0],e[1]=i,e[2]=n,e[3]=a):a=e[3],a}function x(e){return e.find(e=>e.routeId===`/project/$projectId`)?.params?.projectId??e.at(-1)?.context.projectId??void 0}export{h as a,g as i,y as n,p as o,_ as r,m as s,b as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as e,p as t,s as n,t as r}from"./css.mjs";import{t as i}from"./factory.mjs";import{createContext as a,createElement as o,forwardRef as s,useContext as c}from"react";var l=a(null);l.displayName=`DiagramActorSafeContext`;var u=a(null);u.displayName=`DiagramApiSafeContext`;var d=l.Provider,f=u.Provider;function p(){let e=c(l);if(e===null)throw Error(`DiagramActorRef is not provided`);return e}function m(){let e=c(u);if(e===null)throw Error(`DiagramApi is not provided`);return e}const h={transform(e){let{justify:t,gap:n,...r}=e;return{display:`flex`,alignItems:`center`,justifyContent:t,gap:n,flexDirection:`column`,...r}},defaultValues:{alignItems:`stretch`,gap:`sm`}},g=(e={})=>{let r=n(h,e);return h.transform(r,t)},_=e=>r(g(e));_.raw=g;const v=s(function(t,n){let[r,a]=e(t,[`justify`,`gap`]),s={ref:n,...g(r),...a};return o(i.div,s)}),y={transform(e){let{justify:t,gap:n,...r}=e;return{display:`flex`,alignItems:`center`,justifyContent:t,gap:n,flexDirection:`row`,...r}},defaultValues:{gap:`sm`}},b=(e={})=>{let r=n(y,e);return y.transform(r,t)},x=e=>r(b(e));x.raw=b;const S=s(function(t,n){let[r,a]=e(t,[`justify`,`gap`]),s={ref:n,...b(r),...a};return o(i.div,s)});export{d as a,p as c,_ as i,x as n,f as o,v as r,m as s,S as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"../../rolldown-runtime.mjs";var t=e(((e,t)=>{var n=`\0`,r=`\0`,i=``,a=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=Object.hasOwn(e,`directed`)?e.directed:!0,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[r]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){var e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){var n=arguments,r=this;return e.forEach(function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=r,this._children[e]={},this._children[r][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=r;else{t+=``;for(var n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==r)return t}}children(e=r){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if(e===r)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let r=new Set(t);for(var n of this.successors(e))r.add(n);return Array.from(r.values())}}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Object.entries(this._nodes).forEach(function([n,r]){e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return e.reduce(function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);var s=c(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,s))return i&&(this._edgeLabels[s]=r),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?r:this._defaultEdgeLabelFn(e,t,n);var u=l(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[s]=u,o(this._preds[t],e),o(this._sucs[e],t),this._in[t][s]=u,this._out[e][s]=u,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?u(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){var r=arguments.length===1?u(this._isDirected,arguments[0]):c(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?u(this._isDirected,arguments[0]):c(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.v===t):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Object.values(n);return t?r.filter(e=>e.w===t):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function o(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function c(e,t,r,a){var o=``+t,s=``+r;if(!e&&o>s){var c=o;o=s,s=c}return o+i+s+i+(a===void 0?n:a)}function l(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function u(e,t){return c(e,t.v,t.w,t.name)}t.exports=a})),n=e(((e,t)=>{t.exports=`2.2.4`})),r=e(((e,r)=>{r.exports={Graph:t(),version:n()}})),i=e(((e,n)=>{var r=t();n.exports={write:i,read:s};function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:o(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function a(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function o(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function s(e){var t=new r(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),a=e(((e,t)=>{t.exports=n;function n(e){var t={},n=[],r;function i(n){Object.hasOwn(t,n)||(t[n]=!0,r.push(n),e.successors(n).forEach(i),e.predecessors(n).forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}})),o=e(((e,t)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){var n=this._keyIndices;if(e=String(e),!Object.hasOwn(n,e)){var r=this._arr,i=r.length;return n[e]=i,r.push({key:e,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)}_heapify(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}}})),s=e(((e,t)=>{var n=o();t.exports=i;var r=()=>1;function i(e,t,n,i){return a(e,String(t),n||r,i||function(t){return e.outEdges(t)})}function a(e,t,r,i){var a={},o=new n,s,c,l=function(e){var t=e.v===s?e.w:e.v,n=a[t],i=r(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<n.distance&&(n.distance=l,n.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),c=e(((e,t)=>{var n=s();t.exports=r;function r(e,t,r){return e.nodes().reduce(function(i,a){return i[a]=n(e,a,t,r),i},{})}})),l=e(((e,t)=>{t.exports=n;function n(e){var t=0,n=[],r={},i=[];function a(o){var s=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),e.successors(o).forEach(function(e){Object.hasOwn(r,e)?r[e].onStack&&(s.lowlink=Math.min(s.lowlink,r[e].index)):(a(e),s.lowlink=Math.min(s.lowlink,r[e].lowlink))}),s.lowlink===s.index){var c=[],l;do l=n.pop(),r[l].onStack=!1,c.push(l);while(o!==l);i.push(c)}}return e.nodes().forEach(function(e){Object.hasOwn(r,e)||a(e)}),i}})),u=e(((e,t)=>{var n=l();t.exports=r;function r(e){return n(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),d=e(((e,t)=>{t.exports=r;var n=()=>1;function r(e,t,r){return i(e,t||n,r||function(t){return e.outEdges(t)})}function i(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),f=e(((e,t)=>{function n(e){var t={},n={},i=[];function a(o){if(Object.hasOwn(n,o))throw new r;Object.hasOwn(t,o)||(n[o]=!0,t[o]=!0,e.predecessors(o).forEach(a),delete n[o],i.push(o))}if(e.sinks().forEach(a),Object.keys(t).length!==e.nodeCount())throw new r;return i}var r=class extends Error{constructor(){super(...arguments)}};t.exports=n,n.CycleException=r})),p=e(((e,t)=>{var n=f();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),m=e(((e,t)=>{t.exports=n;function n(e,t,n){Array.isArray(t)||(t=[t]);var a=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),o=n===`post`?r:i,s=[],c={};return t.forEach(t=>{if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);o(t,a,c,s)}),s}function r(e,t,n,r){for(var i=[[e,!1]];i.length>0;){var o=i.pop();o[1]?r.push(o[0]):Object.hasOwn(n,o[0])||(n[o[0]]=!0,i.push([o[0],!0]),a(t(o[0]),e=>i.push([e,!1])))}}function i(e,t,n,r){for(var i=[e];i.length>0;){var o=i.pop();Object.hasOwn(n,o)||(n[o]=!0,r.push(o),a(t(o),e=>i.push(e)))}}function a(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}})),h=e(((e,t)=>{var n=m();t.exports=r;function r(e,t){return n(e,t,`post`)}})),g=e(((e,t)=>{var n=m();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),_=e(((e,n)=>{var r=t(),i=o();n.exports=a;function a(e,t){var n=new r,a={},o=new i,s;function c(e){var n=e.v===s?e.w:e.v,r=o.priority(n);if(r!==void 0){var i=t(e);i<r&&(a[n]=s,o.decrease(n,i))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(e){o.add(e,1/0),n.setNode(e)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(s=o.removeMin(),Object.hasOwn(a,s))n.setEdge(s,a[s]);else if(l)throw Error(`Input graph is not connected: `+e);else l=!0;e.nodeEdges(s).forEach(c)}return n}})),v=e(((e,t)=>{t.exports={components:a(),dijkstra:s(),dijkstraAll:c(),findCycles:u(),floydWarshall:d(),isAcyclic:p(),postorder:h(),preorder:g(),prim:_(),tarjan:l(),topsort:f()}})),y=e(((e,t)=>{var n=r();t.exports={Graph:n.Graph,json:i(),alg:v(),version:n.version}})),b=e(((e,t)=>{var n=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return r(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`}};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}t.exports=n})),x=e(((e,t)=>{let n=y().Graph,r=b();t.exports=a;let i=()=>1;function a(e,t){if(e.nodeCount()<=1)return[];let n=c(e,t||i);return o(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))}function o(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)s(e,t,n,o);for(;o=i.dequeue();)s(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(s(e,t,n,o,!0));break}}}return r}function s(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,l(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,l(t,n,o)}),e.removeNode(r.v),a}function c(e,t){let i=new n,a=0,o=0;e.nodes().forEach(e=>{i.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let n=i.edge(e.v,e.w)||0,r=t(e),s=n+r;i.setEdge(e.v,e.w,s),o=Math.max(o,i.node(e.v).out+=r),a=Math.max(a,i.node(e.w).in+=r)});let s=u(o+a+3).map(()=>new r),c=a+1;return i.nodes().forEach(e=>{l(s,c,i.node(e))}),{graph:i,buckets:s,zeroIdx:c}}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function u(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}})),S=e(((e,t)=>{let n=y().Graph;t.exports={addBorderNode:f,addDummyNode:r,applyWithChunking:h,asNonCompoundGraph:a,buildLayerMatrix:l,intersectRect:c,mapValues:T,maxRank:g,normalizeRanks:u,notime:b,partition:_,pick:w,predecessorWeights:s,range:C,removeEmptyRanks:d,simplify:i,successorWeights:o,time:v,uniqueId:S,zipObject:E};function r(e,t,n,r){for(var i=r;e.hasNode(i);)i=S(r);return n.dummy=t,e.setNode(i,n),i}function i(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function a(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function o(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return E(e.nodes(),t)}function s(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return E(e.nodes(),t)}function c(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function l(e){let t=C(g(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function u(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=h(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function d(e){let t=e.nodes().map(t=>e.node(t).rank),n=h(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function f(e,t,n,i){let a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(e,`border`,a,t)}function p(e,t=m){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}let m=65535;function h(e,t){if(t.length>m){let n=p(t);return e.apply(null,n.map(t=>e.apply(null,t)))}else return e.apply(null,t)}function g(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return h(Math.max,t)}function _(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function v(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function b(e,t){return t()}let x=0;function S(e){return e+(``+ ++x)}function C(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function w(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function T(e,t){let n=t;return typeof t==`string`&&(n=e=>e[t]),Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function E(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}})),C=e(((e,t)=>{let n=x(),r=S().uniqueId;t.exports={run:i,undo:o};function i(e){(e.graph().acyclicer===`greedy`?n(e,t(e)):a(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r(`rev`))});function t(e){return t=>e.edge(t).weight}}function a(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function o(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),w=e(((e,t)=>{let n=S();t.exports={run:r,undo:a};function r(e){e.graph().dummyChains=[],e.edges().forEach(t=>i(e,t))}function i(e,t){let r=t.v,i=e.node(r).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o===i+1)return;e.removeEdge(t);let u,d,f;for(f=0,++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=n.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(r,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,a,{weight:c.weight},s)}function a(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),T=e(((e,t)=>{let{applyWithChunking:n}=S();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(Object.hasOwn(t,i))return a.rank;t[i]=!0;let o=e.outEdges(i).map(t=>t==null?1/0:r(t.w)-e.edge(t).minlen);var s=n(Math.min,o);return s===1/0&&(s=0),a.rank=s}e.sources().forEach(r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),E=e(((e,t)=>{var n=y().Graph,r=T().slack;t.exports=i;function i(e){var t=new n({directed:!1}),i=e.nodes()[0],c=e.nodeCount();t.setNode(i,{});for(var l,u;a(t,e)<c;)l=o(t,e),u=t.hasNode(l.v)?r(e,l):-r(e,l),s(t,e,u);return t}function a(e,t){function n(i){t.nodeEdges(i).forEach(a=>{var o=a.v,s=i===o?a.w:o;!e.hasNode(s)&&!r(t,a)&&(e.setNode(s,{}),e.setEdge(i,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function o(e,t){return t.edges().reduce((n,i)=>{let a=1/0;return e.hasNode(i.v)!==e.hasNode(i.w)&&(a=r(t,i)),a<n[0]?[a,i]:n},[1/0,null])[1]}function s(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}})),D=e(((e,t)=>{var n=E(),r=T().slack,i=T().longestPath,a=y().alg.preorder,o=y().alg.postorder,s=S().simplify;t.exports=c,c.initLowLimValues=f,c.initCutValues=l,c.calcCutValue=d,c.leaveEdge=m,c.enterEdge=h,c.exchangeEdges=g;function c(e){e=s(e),i(e);var t=n(e);f(t),l(t,e);for(var r,a;r=m(t);)a=h(t,e,r),g(t,e,r,a)}function l(e,t){var n=o(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>u(e,t,n))}function u(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}function d(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,t.nodeEdges(n).forEach(a=>{var s=a.v===n,c=s?a.w:a.v;if(c!==r){var l=s===i,u=t.edge(a).weight;if(o+=l?u:-u,v(e,n,c)){var d=e.edge(n,c).cutvalue;o+=l?-d:d}}}),o}function f(e,t){arguments.length<2&&(t=e.nodes()[0]),p(e,{},1,t)}function p(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,e.neighbors(r).forEach(i=>{Object.hasOwn(t,i)||(n=p(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function m(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function h(e,t,n){var i=n.v,a=n.w;t.hasEdge(i,a)||(i=n.w,a=n.v);var o=e.node(i),s=e.node(a),c=o,l=!1;return o.lim>s.lim&&(c=s,l=!0),t.edges().filter(t=>l===b(e,e.node(t.v),c)&&l!==b(e,e.node(t.w),c)).reduce((e,n)=>r(t,n)<r(t,e)?n:e)}function g(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),f(e),l(e,t),_(e,t)}function _(e,t){var n=a(e,e.nodes().find(e=>!t.node(e).parent));n=n.slice(1),n.forEach(n=>{var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function v(e,t,n){return e.hasEdge(t,n)}function b(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),O=e(((e,t)=>{var n=T().longestPath,r=E(),i=D();t.exports=a;function a(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;case`none`:break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),k=e(((e,t)=>{t.exports=n;function n(e){let t=i(e);e.graph().dummyChains.forEach(n=>{let i=e.node(n),a=i.edgeObj,o=r(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;for(;n!==a.w;){if(i=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<i.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=i.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function r(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function i(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}})),A=e(((e,t)=>{let n=S();t.exports={run:r,cleanup:s};function r(e){let t=n.addDummyNode(e,`root`,{},`_root`),r=a(e),s=Object.values(r),c=n.applyWithChunking(Math.max,s)-1,l=2*c+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=l);let u=o(e)+1;e.children().forEach(n=>i(e,t,l,u,c,r,n)),e.graph().nodeRankFactor=l}function i(e,t,r,a,o,s,c){let l=e.children(c);if(!l.length){c!==t&&e.setEdge(t,c,{weight:0,minlen:r});return}let u=n.addBorderNode(e,`_bt`),d=n.addBorderNode(e,`_bb`),f=e.node(c);e.setParent(u,c),f.borderTop=u,e.setParent(d,c),f.borderBottom=d,l.forEach(n=>{i(e,t,r,a,o,s,n);let l=e.node(n),f=l.borderTop?l.borderTop:n,p=l.borderBottom?l.borderBottom:n,m=l.borderTop?a:2*a,h=f===p?o-s[c]+1:1;e.setEdge(u,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,d,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,u,{weight:0,minlen:o+s[c]})}function a(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function o(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function s(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}})),j=e(((e,t)=>{let n=S();t.exports=r;function r(e){function t(n){let r=e.children(n),a=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(a,`minRank`)){a.borderLeft=[],a.borderRight=[];for(let t=a.minRank,r=a.maxRank+1;t<r;++t)i(e,`borderLeft`,`_bl`,n,a,t),i(e,`borderRight`,`_br`,n,a,t)}}e.children().forEach(t)}function i(e,t,r,i,a,o){let s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=n.addDummyNode(e,`border`,s,r);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),M=e(((e,t)=>{t.exports={adjust:n,undo:r};function n(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&i(e)}function r(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&o(e),(t===`lr`||t===`rl`)&&(c(e),i(e))}function i(e){e.nodes().forEach(t=>a(e.node(t))),e.edges().forEach(t=>a(e.edge(t)))}function a(e){let t=e.width;e.width=e.height,e.height=t}function o(e){e.nodes().forEach(t=>s(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(s),Object.hasOwn(n,`y`)&&s(n)})}function s(e){e.y=-e.y}function c(e){e.nodes().forEach(t=>l(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(l),Object.hasOwn(n,`x`)&&l(n)})}function l(e){let t=e.x;e.x=e.y,e.y=t}})),N=e(((e,t)=>{let n=S();t.exports=r;function r(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=n.applyWithChunking(Math.max,i),o=n.range(a+1).map(()=>[]);function s(n){t[n]||(t[n]=!0,o[e.node(n).rank].push(n),e.successors(n).forEach(s))}return r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(s),o}})),P=e(((e,t)=>{let n=S().zipObject;t.exports=r;function r(e,t){let n=0;for(let r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){let i=n(r,r.map((e,t)=>t)),a=t.flatMap(t=>e.outEdges(t).map(t=>({pos:i[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),o=1;for(;o<r.length;)o<<=1;let s=2*o-1;--o;let c=Array(s).fill(0),l=0;return a.forEach(e=>{let t=e.pos+o;c[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n}),l}})),F=e(((e,t)=>{t.exports=n;function n(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(n.length){let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}})),I=e(((e,t)=>{let n=S();t.exports=r;function r(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(n[e.w]))}),i(Object.values(n).filter(e=>!e.indegree))}function i(e){let t=[];function r(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let n=e.pop();t.push(n),n.in.reverse().forEach(r(n)),n.out.forEach(i(n))}return t.filter(e=>!e.merged).map(e=>n.pick(e,[`vs`,`i`,`barycenter`,`weight`]))}function a(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),L=e(((e,t)=>{let n=S();t.exports=r;function r(e,t){let r=n.partition(e,e=>Object.hasOwn(e,`barycenter`)),o=r.lhs,s=r.rhs.sort((e,t)=>t.i-e.i),c=[],l=0,u=0,d=0;o.sort(a(!!t)),d=i(c,s,d),o.forEach(e=>{d+=e.vs.length,c.push(e.vs),l+=e.barycenter*e.weight,u+=e.weight,d=i(c,s,d)});let f={vs:c.flat(!0)};return u&&(f.barycenter=l/u,f.weight=u),f}function i(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function a(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}})),R=e(((e,t)=>{let n=F(),r=I(),i=L();t.exports=a;function a(e,t,c,l){let u=e.children(t),d=e.node(t),f=d?d.borderLeft:void 0,p=d?d.borderRight:void 0,m={};f&&(u=u.filter(e=>e!==f&&e!==p));let h=n(e,u);h.forEach(t=>{if(e.children(t.v).length){let n=a(e,t.v,c,l);m[t.v]=n,Object.hasOwn(n,`barycenter`)&&s(t,n)}});let g=r(h,c);o(g,m);let _=i(g,l);if(f&&(_.vs=[f,_.vs,p].flat(!0),e.predecessors(f).length)){let t=e.node(e.predecessors(f)[0]),n=e.node(e.predecessors(p)[0]);Object.hasOwn(_,`barycenter`)||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+t.order+n.order)/(_.weight+2),_.weight+=2}return _}function o(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function s(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),z=e(((e,t)=>{let n=y().Graph,r=S();t.exports=i;function i(e,t,r,i){i||=e.nodes();let o=a(e),s=new n({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(t=>e.node(t));return i.forEach(n=>{let i=e.node(n),a=e.parent(n);(i.rank===t||i.minRank<=t&&t<=i.maxRank)&&(s.setNode(n),s.setParent(n,a||o),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,i=s.edge(r,n),a=i===void 0?0:i.weight;s.setEdge(r,n,{weight:e.edge(t).weight+a})}),Object.hasOwn(i,`minRank`)&&s.setNode(n,{borderLeft:i.borderLeft[t],borderRight:i.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=r.uniqueId(`_root`)););return t}})),B=e(((e,t)=>{t.exports=n;function n(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}})),V=e(((e,t)=>{let n=N(),r=P(),i=R(),a=z(),o=B(),s=y().Graph,c=S();t.exports=l;function l(e,t){if(t&&typeof t.customOrder==`function`){t.customOrder(e,l);return}let i=c.maxRank(e),a=u(e,c.range(1,i+1),`inEdges`),o=u(e,c.range(i-1,-1,-1),`outEdges`),s=n(e);if(f(e,s),t&&t.disableOptimalOrderHeuristic)return;let p=1/0,m;for(let t=0,n=0;n<4;++t,++n){d(t%2?a:o,t%4>=2),s=c.buildLayerMatrix(e);let i=r(e,s);i<p&&(n=0,m=Object.assign({},s),p=i)}f(e,m)}function u(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return a(e,t,n,r.get(t)||[])})}function d(e,t){let n=new s;e.forEach(function(e){let r=e.graph().root,a=i(e,r,n,t);a.vs.forEach((t,n)=>e.node(t).order=n),o(e,n,a.vs)})}function f(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}})),H=e(((e,t)=>{let n=y().Graph,r=S();t.exports={positionX:h,findType1Conflicts:i,findType2Conflicts:a,addConflict:s,hasConflict:c,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m};function i(e,t){let n={};function r(t,r){let i=0,a=0,c=t.length,l=r[r.length-1];return r.forEach((t,u)=>{let d=o(e,t),f=d?e.node(d).order:c;(d||t===l)&&(r.slice(a,u+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||f<o)&&!(a.dummy&&e.node(t).dummy)&&s(n,r,t)})}),a=u+1,i=f)}),r}return t.length&&t.reduce(r),n}function a(e,t){let n={};function i(t,i,a,o,c){let l;r.range(i,a).forEach(r=>{l=t[r],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<o||r.order>c)&&s(n,t,l)})})}function a(t,n){let r=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,i(n,o,c,r,a),o=c,r=a)}i(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(a),n}function o(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function s(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function c(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function l(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let l=Math.floor(r),u=Math.ceil(r);l<=u;++l){let r=s[l];a[e]===e&&t<o[r]&&!c(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function u(e,t,n,r,i){let a={},o=d(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes(),r=n.pop(),i={};for(;r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>a[e]=a[n[e]]),a}function d(e,t,r,i){let a=new n,o=e.graph(),s=g(o.nodesep,o.edgesep,i);return t.forEach(t=>{let n;t.forEach(t=>{let i=r[t];if(a.setNode(i),n){var o=r[n],c=a.edge(o,i);a.setEdge(o,i,Math.max(s(e,t,n),c||0))}n=t})}),a}function f(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=_(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function p(e,t){let n=Object.values(t),i=r.applyWithChunking(Math.min,n),a=r.applyWithChunking(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(o=>{let s=n+o,c=e[s];if(c===t)return;let l=Object.values(c),u=i-r.applyWithChunking(Math.min,l);o!==`l`&&(u=a-r.applyWithChunking(Math.max,l)),u&&(e[s]=r.mapValues(c,e=>e+u))})})}function m(e,t){return r.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let t=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}function h(e){let t=r.buildLayerMatrix(e),n=Object.assign(i(e,t),a(e,t)),o={},s;return[`u`,`d`].forEach(i=>{s=i===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{t===`r`&&(s=s.map(e=>Object.values(e).reverse()));let a=(i===`u`?e.predecessors:e.successors).bind(e),c=l(e,s,n,a),d=u(e,s,c.root,c.align,t===`r`);t===`r`&&(d=r.mapValues(d,e=>-e)),o[i+t]=d})}),p(o,f(e,o)),m(o,e.graph().align)}function g(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),l=0,c}}function _(e,t){return e.node(t).width}})),U=e(((e,t)=>{let n=S(),r=H().positionX;t.exports=i;function i(e){e=n.asNonCompoundGraph(e),a(e),Object.entries(r(e)).forEach(([t,n])=>e.node(t).x=n)}function a(e){let t=n.buildLayerMatrix(e),r=e.graph().ranksep,i=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>e.node(t).y=i+n/2),i+=n+r})}})),W=e(((e,t)=>{let n=C(),r=w(),i=O(),a=S().normalizeRanks,o=k(),s=S().removeEmptyRanks,c=A(),l=j(),u=M(),d=V(),f=U(),p=S(),m=y().Graph;t.exports=h;function h(e,t){let n=t&&t.debugTiming?p.time:p.notime;n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>F(e));n(` runLayout`,()=>g(r,n,t)),n(` updateInputGraph`,()=>_(e,r))})}function g(e,t,m){t(` makeSpaceForEdgeLabels`,()=>I(e)),t(` removeSelfEdges`,()=>q(e)),t(` acyclic`,()=>n.run(e)),t(` nestingGraph.run`,()=>c.run(e)),t(` rank`,()=>i(p.asNonCompoundGraph(e))),t(` injectEdgeLabelProxies`,()=>L(e)),t(` removeEmptyRanks`,()=>s(e)),t(` nestingGraph.cleanup`,()=>c.cleanup(e)),t(` normalizeRanks`,()=>a(e)),t(` assignRankMinMax`,()=>R(e)),t(` removeEdgeLabelProxies`,()=>z(e)),t(` normalize.run`,()=>r.run(e)),t(` parentDummyChains`,()=>o(e)),t(` addBorderSegments`,()=>l(e)),t(` order`,()=>d(e,m)),t(` insertSelfEdges`,()=>J(e)),t(` adjustCoordinateSystem`,()=>u.adjust(e)),t(` position`,()=>f(e)),t(` positionSelfEdges`,()=>Y(e)),t(` removeBorderNodes`,()=>K(e)),t(` normalize.undo`,()=>r.undo(e)),t(` fixupEdgeLabelCoords`,()=>W(e)),t(` undoCoordinateSystem`,()=>u.undo(e)),t(` translateGraph`,()=>B(e)),t(` assignNodeIntersects`,()=>H(e)),t(` reversePoints`,()=>G(e)),t(` acyclic.undo`,()=>n.undo(e))}function _(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}let v=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],b={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},x=[`acyclicer`,`ranker`,`rankdir`,`align`],T=[`width`,`height`,`rank`],E={width:0,height:0},D=[`minlen`,`weight`,`width`,`height`,`labeloffset`],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},P=[`labelpos`];function F(e){let t=new m({multigraph:!0,compound:!0}),n=Z(e.graph());return t.setGraph(Object.assign({},b,X(n,v),p.pick(n,x))),e.nodes().forEach(n=>{let r=X(Z(e.node(n)),T);Object.keys(E).forEach(e=>{r[e]===void 0&&(r[e]=E[e])}),t.setNode(n,r),t.setParent(n,e.parent(n))}),e.edges().forEach(n=>{let r=Z(e.edge(n));t.setEdge(n,Object.assign({},N,X(r,D),p.pick(r,P)))}),t}function I(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function L(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v),r={rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t};p.addDummyNode(e,`edge-proxy`,r,`_ep`)}})}function R(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function z(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function B(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function H(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(p.intersectRect(r,a)),n.points.push(p.intersectRect(i,o))})}function W(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function G(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function K(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function q(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function J(e){p.buildLayerMatrix(e).forEach(t=>{var n=0;t.forEach((t,r)=>{var i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{p.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function Y(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function X(e,t){return p.mapValues(p.pick(e,t),Number)}function Z(e){var t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}})),G=e(((e,t)=>{let n=S(),r=y().Graph;t.exports={debugOrdering:i};function i(e){let t=n.buildLayerMatrix(e),i=new r({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{i.setNode(t,{label:t}),i.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>i.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let n=`layer`+t;i.setNode(n,{rank:`same`}),e.reduce((e,t)=>(i.setEdge(e,t,{style:`invis`}),t))}),i}})),K=e(((e,t)=>{t.exports=`1.1.8`})),q=e(((e,t)=>{t.exports={graphlib:y(),layout:W(),debug:G(),util:{time:S().time,notime:S().notime},version:K()}}));export{q as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[`top`,`right`,`bottom`,`left`],t=[`start`,`end`],n=e.reduce((e,n)=>e.concat(n,n+`-`+t[0],n+`-`+t[1]),[]),r=Math.min,i=Math.max,a=Math.round,o=Math.floor,s=e=>({x:e,y:e}),c={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function l(e,t,n){return i(e,r(t,n))}function u(e,t){return typeof e==`function`?e(t):e}function d(e){return e.split(`-`)[0]}function f(e){return e.split(`-`)[1]}function p(e){return e===`x`?`y`:`x`}function m(e){return e===`y`?`height`:`width`}function h(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function g(e){return p(h(e))}function _(e,t,n){n===void 0&&(n=!1);let r=f(e),i=g(e),a=m(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=E(o)),[o,E(o)]}function v(e){let t=E(e);return[y(e),t,y(t)]}function y(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}const b=[`left`,`right`],x=[`right`,`left`],S=[`top`,`bottom`],C=[`bottom`,`top`];function w(e,t,n){switch(e){case`top`:case`bottom`:return n?t?x:b:t?b:x;case`left`:case`right`:return t?S:C;default:return[]}}function T(e,t,n,r){let i=f(e),a=w(d(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(y)))),a}function E(e){let t=d(e);return c[t]+e.slice(t.length)}function D(e){return{top:0,right:0,bottom:0,left:0,...e}}function O(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:D(e)}function k(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function A(e,t,n){let{reference:r,floating:i}=e,a=h(t),o=g(t),s=m(o),c=d(t),l=a===`y`,u=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,_=r[s]/2-i[s]/2,v;switch(c){case`top`:v={x:u,y:r.y-i.height};break;case`bottom`:v={x:u,y:r.y+r.height};break;case`right`:v={x:r.x+r.width,y:p};break;case`left`:v={x:r.x-i.width,y:p};break;default:v={x:r.x,y:r.y}}switch(f(t)){case`start`:v[o]-=_*(n&&l?-1:1);break;case`end`:v[o]+=_*(n&&l?-1:1);break}return v}async function j(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:d=`floating`,altBoundary:f=!1,padding:p=0}=u(t,e),m=O(p),h=o[f?d===`floating`?`reference`:`floating`:d],g=k(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(h))??!0?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),_=d===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),y=await(i.isElement==null?void 0:i.isElement(v))&&await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1},b=k(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:_,offsetParent:v,strategy:s}):_);return{top:(g.top-b.top+m.top)/y.y,bottom:(b.bottom-g.bottom+m.bottom)/y.y,left:(g.left-b.left+m.left)/y.x,right:(b.right-g.right+m.right)/y.x}}const M=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:j},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=A(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<50&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=A(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},N=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:i,placement:a,rects:o,platform:s,elements:c,middlewareData:d}=t,{element:p,padding:h=0}=u(e,t)||{};if(p==null)return{};let _=O(h),v={x:n,y:i},y=g(a),b=m(y),x=await s.getDimensions(p),S=y===`y`,C=S?`top`:`left`,w=S?`bottom`:`right`,T=S?`clientHeight`:`clientWidth`,E=o.reference[b]+o.reference[y]-v[y]-o.floating[b],D=v[y]-o.reference[y],k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(p)),A=k?k[T]:0;(!A||!await(s.isElement==null?void 0:s.isElement(k)))&&(A=c.floating[T]||o.floating[b]);let j=E/2-D/2,M=A/2-x[b]/2-1,N=r(_[C],M),P=r(_[w],M),F=N,I=A-x[b]-P,L=A/2-x[b]/2+j,R=l(F,L,I),z=!d.arrow&&f(a)!=null&&L!==R&&o.reference[b]/2-(L<F?N:P)-x[b]/2<0,B=z?L<F?L-F:L-I:0;return{[y]:v[y]+B,data:{[y]:R,centerOffset:L-R-B,...z&&{alignmentOffset:B}},reset:z}}});function P(e,t,n){return(e?[...n.filter(t=>f(t)===e),...n.filter(t=>f(t)!==e)]:n.filter(e=>d(e)===e)).filter(n=>e?f(n)===e||(t?y(n)!==n:!1):!0)}const F=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:r,middlewareData:i,placement:a,platform:o,elements:s}=t,{crossAxis:c=!1,alignment:l,allowedPlacements:p=n,autoAlignment:m=!0,...h}=u(e,t),g=l!==void 0||p===n?P(l||null,m,p):p,v=await o.detectOverflow(t,h),y=i.autoPlacement?.index||0,b=g[y];if(b==null)return{};let x=_(b,r,await(o.isRTL==null?void 0:o.isRTL(s.floating)));if(a!==b)return{reset:{placement:g[0]}};let S=[v[d(b)],v[x[0]],v[x[1]]],C=[...i.autoPlacement?.overflows||[],{placement:b,overflows:S}],w=g[y+1];if(w)return{data:{index:y+1,overflows:C},reset:{placement:w}};let T=C.map(e=>{let t=f(e.placement);return[e.placement,t&&c?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),E=T.filter(e=>e[2].slice(0,f(e[0])?2:3).every(e=>e<=0))[0]?.[0]||T[0][0];return E===a?{}:{data:{index:y+1,overflows:C},reset:{placement:E}}}}},I=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m=`bestFit`,fallbackAxisSideDirection:g=`none`,flipAlignment:y=!0,...b}=u(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let x=d(r),S=h(o),C=d(o)===o,w=await(s.isRTL==null?void 0:s.isRTL(c.floating)),D=p||(C||!y?[E(o)]:v(o)),O=g!==`none`;!p&&O&&D.push(...T(o,y,g,w));let k=[o,...D],A=await s.detectOverflow(t,b),j=[],M=i.flip?.overflows||[];if(l&&j.push(A[x]),f){let e=_(r,a,w);j.push(A[e[0]],A[e[1]])}if(M=[...M,{placement:r,overflows:j}],!j.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=k[e];if(t&&(!(f===`alignment`&&S!==h(t))||M.every(e=>h(e.placement)===S?e.overflows[0]>0:!0)))return{data:{index:e,overflows:M},reset:{placement:t}};let n=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(m){case`bestFit`:{let e=M.filter(e=>{if(O){let t=h(e.placement);return t===S||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function L(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function R(t){return e.some(e=>t[e]>=0)}const z=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=u(e,t);switch(i){case`referenceHidden`:{let e=L(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:R(e)}}}case`escaped`:{let e=L(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:R(e)}}}default:return{}}}}};function B(e){let t=r(...e.map(e=>e.left)),n=r(...e.map(e=>e.top)),a=i(...e.map(e=>e.right)),o=i(...e.map(e=>e.bottom));return{x:t,y:n,width:a-t,height:o-n}}function V(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>k(B(e)))}const H=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:a,rects:o,platform:s,strategy:c}=t,{padding:l=2,x:f,y:p}=u(e,t),m=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(a.reference))||[]),g=V(m),_=k(B(m)),v=O(l);function y(){if(g.length===2&&g[0].left>g[1].right&&f!=null&&p!=null)return g.find(e=>f>e.left-v.left&&f<e.right+v.right&&p>e.top-v.top&&p<e.bottom+v.bottom)||_;if(g.length>=2){if(h(n)===`y`){let e=g[0],t=g[g.length-1],r=d(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left,s=r?e.right:t.right;return{top:i,bottom:a,left:o,right:s,width:s-o,height:a-i,x:o,y:i}}let e=d(n)===`left`,t=i(...g.map(e=>e.right)),a=r(...g.map(e=>e.left)),o=g.filter(n=>e?n.left===a:n.right===t),s=o[0].top,c=o[o.length-1].bottom,l=a,u=t;return{top:s,bottom:c,left:l,right:u,width:u-l,height:c-s,x:l,y:s}}return _}let b=await s.getElementRects({reference:{getBoundingClientRect:y},floating:a.floating,strategy:c});return o.reference.x!==b.reference.x||o.reference.y!==b.reference.y||o.reference.width!==b.reference.width||o.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},U=new Set([`left`,`top`]);async function W(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=d(n),s=f(n),c=h(n)===`y`,l=U.has(o)?-1:1,p=a&&c?-1:1,m=u(t,e),{mainAxis:g,crossAxis:_,alignmentAxis:v}=typeof m==`number`?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof v==`number`&&(_=s===`end`?v*-1:v),c?{x:_*p,y:g*l}:{x:g*l,y:_*p}}const G=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await W(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},K=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=u(e,t),m={x:n,y:r},g=await a.detectOverflow(t,f),_=h(d(i)),v=p(_),y=m[v],b=m[_];if(o){let e=v===`y`?`top`:`left`,t=v===`y`?`bottom`:`right`,n=y+g[e],r=y-g[t];y=l(n,y,r)}if(s){let e=_===`y`?`top`:`left`,t=_===`y`?`bottom`:`right`,n=b+g[e],r=b-g[t];b=l(n,b,r)}let x=c.fn({...t,[v]:y,[_]:b});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[v]:o,[_]:s}}}}}},q=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=u(e,t),f={x:n,y:r},m=h(i),g=p(m),_=f[g],v=f[m],y=u(s,t),b=typeof y==`number`?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){let e=g===`y`?`height`:`width`,t=a.reference[g]-a.floating[e]+b.mainAxis,n=a.reference[g]+a.reference[e]-b.mainAxis;_<t?_=t:_>n&&(_=n)}if(l){let e=g===`y`?`width`:`height`,t=U.has(d(i)),n=a.reference[m]-a.floating[e]+(t&&o.offset?.[m]||0)+(t?0:b.crossAxis),r=a.reference[m]+a.reference[e]+(t?0:o.offset?.[m]||0)-(t?b.crossAxis:0);v<n?v=n:v>r&&(v=r)}return{[g]:_,[m]:v}}}},J=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,a;let{placement:o,rects:s,platform:c,elements:l}=t,{apply:p=()=>{},...m}=u(e,t),g=await c.detectOverflow(t,m),_=d(o),v=f(o),y=h(o)===`y`,{width:b,height:x}=s.floating,S,C;_===`top`||_===`bottom`?(S=_,C=v===(await(c.isRTL==null?void 0:c.isRTL(l.floating))?`start`:`end`)?`left`:`right`):(C=_,S=v===`end`?`top`:`bottom`);let w=x-g.top-g.bottom,T=b-g.left-g.right,E=r(x-g[S],w),D=r(b-g[C],T),O=!t.middlewareData.shift,k=E,A=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=T),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(k=w),O&&!v){let e=i(g.left,0),t=i(g.right,0),n=i(g.top,0),r=i(g.bottom,0);y?A=b-2*(e!==0||t!==0?e+t:i(g.left,g.right)):k=x-2*(n!==0||r!==0?n+r:i(g.top,g.bottom))}await p({...t,availableWidth:A,availableHeight:k});let j=await c.getDimensions(l.floating);return b!==j.width||x!==j.height?{reset:{rects:!0}}:{}}}};export{z as a,G as c,s as d,o as f,a as g,k as h,I as i,K as l,r as m,F as n,H as o,i as p,M as r,q as s,N as t,J as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,c as t,d as n,f as r,g as i,h as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./core.mjs";function g(){return typeof window<`u`}function _(e){return b(e)?(e.nodeName||``).toLowerCase():`#document`}function v(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function y(e){return((b(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function b(e){return g()?e instanceof Node||e instanceof v(e).Node:!1}function x(e){return g()?e instanceof Element||e instanceof v(e).Element:!1}function S(e){return g()?e instanceof HTMLElement||e instanceof v(e).HTMLElement:!1}function C(e){return!g()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof v(e).ShadowRoot}function w(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=j(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ee(e){return/^(table|td|th)$/.test(_(e))}function T(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}const te=/transform|translate|scale|rotate|perspective|filter/,ne=/paint|layout|strict|content/,E=e=>!!e&&e!==`none`;let D;function O(e){let t=x(e)?j(e):e;return E(t.transform)||E(t.translate)||E(t.scale)||E(t.rotate)||E(t.perspective)||!k()&&(E(t.backdropFilter)||E(t.filter))||te.test(t.willChange||``)||ne.test(t.contain||``)}function re(e){let t=N(e);for(;S(t)&&!A(t);){if(O(t))return t;if(T(t))return null;t=N(t)}return null}function k(){return D??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),D}function A(e){return/^(html|body|#document)$/.test(_(e))}function j(e){return v(e).getComputedStyle(e)}function M(e){return x(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function N(e){if(_(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||C(e)&&e.host||y(e);return C(t)?t.host:t}function P(e){let t=N(e);return A(t)?e.ownerDocument?e.ownerDocument.body:e.body:S(t)&&w(t)?t:P(t)}function F(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=P(e),i=r===e.ownerDocument?.body,a=v(r);if(i){let e=I(a);return t.concat(a,a.visualViewport||[],w(r)?r:[],e&&n?F(e):[])}else return t.concat(r,F(r,[],n))}function I(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function L(e){let t=j(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=S(e),o=a?e.offsetWidth:n,s=a?e.offsetHeight:r,c=i(n)!==o||i(r)!==s;return c&&(n=o,r=s),{width:n,height:r,$:c}}function R(e){return x(e)?e:e.contextElement}function z(e){let t=R(e);if(!S(t))return n(1);let r=t.getBoundingClientRect(),{width:a,height:o,$:s}=L(t),c=(s?i(r.width):r.width)/a,l=(s?i(r.height):r.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!l||!Number.isFinite(l))&&(l=1),{x:c,y:l}}const ie=n(0);function B(e){let t=v(e);return!k()||!t.visualViewport?ie:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ae(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==v(e)?!1:t}function V(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),s=R(e),c=n(1);t&&(i?x(i)&&(c=z(i)):c=z(e));let l=ae(s,r,i)?B(s):n(0),u=(o.left+l.x)/c.x,d=(o.top+l.y)/c.y,f=o.width/c.x,p=o.height/c.y;if(s){let e=v(s),t=i&&x(i)?v(i):i,n=e,r=I(n);for(;r&&i&&t!==n;){let e=z(r),t=r.getBoundingClientRect(),i=j(r),a=t.left+(r.clientLeft+parseFloat(i.paddingLeft))*e.x,o=t.top+(r.clientTop+parseFloat(i.paddingTop))*e.y;u*=e.x,d*=e.y,f*=e.x,p*=e.y,u+=a,d+=o,n=v(r),r=I(n)}}return a({width:f,height:p,x:u,y:d})}function H(e,t){let n=M(e).scrollLeft;return t?t.left+n:V(y(e)).left+n}function U(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-H(e,n),y:n.top+t.scrollTop}}function oe(e){let{elements:t,rect:r,offsetParent:i,strategy:a}=e,o=a===`fixed`,s=y(i),c=t?T(t.floating):!1;if(i===s||c&&o)return r;let l={scrollLeft:0,scrollTop:0},u=n(1),d=n(0),f=S(i);if((f||!f&&!o)&&((_(i)!==`body`||w(s))&&(l=M(i)),f)){let e=V(i);u=z(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}let p=s&&!f&&!o?U(s,l):n(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:r.y*u.y-l.scrollTop*u.y+d.y+p.y}}function W(e){return Array.from(e.getClientRects())}function G(e){let t=y(e),n=M(e),r=e.ownerDocument.body,i=d(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=d(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+H(e),s=-n.scrollTop;return j(r).direction===`rtl`&&(o+=d(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function K(e,t){let n=v(e),r=y(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=k();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=H(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(a-=o)}else l<=25&&(a+=l);return{width:a,height:o,x:s,y:c}}function se(e,t){let r=V(e,!0,t===`fixed`),i=r.top+e.clientTop,a=r.left+e.clientLeft,o=S(e)?z(e):n(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:i*o.y}}function q(e,t,n){let r;if(t===`viewport`)r=K(e,n);else if(t===`document`)r=G(y(e));else if(x(t))r=se(t,n);else{let n=B(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return a(r)}function J(e,t){let n=N(e);return n===t||!x(n)||A(n)?!1:j(n).position===`fixed`||J(n,t)}function ce(e,t){let n=t.get(e);if(n)return n;let r=F(e,[],!1).filter(e=>x(e)&&_(e)!==`body`),i=null,a=j(e).position===`fixed`,o=a?N(e):e;for(;x(o)&&!A(o);){let t=j(o),n=O(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||w(o)&&!n&&J(e,o))?r=r.filter(e=>e!==o):i=t,o=N(o)}return t.set(e,r),r}function le(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?T(t)?[]:ce(t,this._c):[].concat(n),r],o=q(t,a[0],i),s=o.top,l=o.right,u=o.bottom,f=o.left;for(let e=1;e<a.length;e++){let n=q(t,a[e],i);s=d(n.top,s),l=c(n.right,l),u=c(n.bottom,u),f=d(n.left,f)}return{width:l-f,height:u-s,x:f,y:s}}function ue(e){let{width:t,height:n}=L(e);return{width:t,height:n}}function de(e,t,r){let i=S(t),a=y(t),o=r===`fixed`,s=V(e,!0,o,t),c={scrollLeft:0,scrollTop:0},l=n(0);function u(){l.x=H(a)}if(i||!i&&!o)if((_(t)!==`body`||w(a))&&(c=M(t)),i){let e=V(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&u();o&&!i&&a&&u();let d=a&&!i&&!o?U(a,c):n(0);return{x:s.left+c.scrollLeft-l.x-d.x,y:s.top+c.scrollTop-l.y-d.y,width:s.width,height:s.height}}function Y(e){return j(e).position===`static`}function X(e,t){if(!S(e)||j(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return y(e)===n&&(n=n.ownerDocument.body),n}function Z(e,t){let n=v(e);if(T(e))return n;if(!S(e)){let t=N(e);for(;t&&!A(t);){if(x(t)&&!Y(t))return t;t=N(t)}return n}let r=X(e,t);for(;r&&ee(r)&&Y(r);)r=X(r,t);return r&&A(r)&&Y(r)&&!O(r)?n:r||re(e)||n}const fe=async function(e){let t=this.getOffsetParent||Z,n=this.getDimensions,r=await n(e.floating);return{reference:de(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pe(e){return j(e).direction===`rtl`}const me={convertOffsetParentRelativeRectToViewportRelativeRect:oe,getDocumentElement:y,getClippingRect:le,getOffsetParent:Z,getElementRects:fe,getClientRects:W,getDimensions:ue,getScale:z,isElement:x,isRTL:pe};function Q(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function he(e,t){let n=null,i,a=y(e);function o(){var e;clearTimeout(i),(e=n)==null||e.disconnect(),n=null}function s(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),o();let f=e.getBoundingClientRect(),{left:p,top:m,width:h,height:g}=f;if(l||t(),!h||!g)return;let _=r(m),v=r(a.clientWidth-(p+h)),y=r(a.clientHeight-(m+g)),b=r(p),x={rootMargin:-_+`px `+-v+`px `+-y+`px `+-b+`px`,threshold:d(0,c(1,u))||1},S=!0;function C(t){let n=t[0].intersectionRatio;if(n!==u){if(!S)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}n===1&&!Q(f,e.getBoundingClientRect())&&s(),S=!1}try{n=new IntersectionObserver(C,{...x,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),o}function ge(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=R(e),u=i||a?[...l?F(l):[],...t?F(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?he(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?V(e):null;c&&g();function g(){let t=V(e);h&&!Q(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}const _e=t,$=l,ve=s,ye=o,be=h,xe=e,Se=m,Ce=u,we=p,Te=(e,t,n)=>{let r=new Map,i={platform:me,...n},a={...i.platform,_c:r};return f(e,t,{...i,platform:a})};export{S as _,ye as a,k as b,we as c,be as d,j as f,x as g,v as h,Te as i,_e as l,N as m,$ as n,xe as o,F as p,ge as r,Ce as s,Se as t,ve as u,A as v,C as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,a as t,b as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,o as d,p as f,s as p,t as m,u as h,v as g,y as _}from"./dom.mjs";import*as v from"react";import{useLayoutEffect as y}from"react";import{jsx as b}from"react/jsx-runtime";import*as x from"react-dom";function S(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function C(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function w(){return/apple/i.test(navigator.vendor)}function T(){return S().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function E(){return C().includes(`jsdom/`)}function D(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function O(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&_(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function k(e){return`composedPath`in e?e.composedPath()[0]:e.target}function A(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function j(e){return e.matches(`html,body`)}function M(e){return e?.ownerDocument||document}function N(t){return e(t)&&t.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function P(e){if(!e||E())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function F(e){return e?e.hasAttribute(`data-floating-ui-focusable`)?e:e.querySelector(`[data-floating-ui-focusable]`)||e:null}function I(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...I(e,t.id,n)])}function ee(e){return`nativeEvent`in e}function L(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var R=typeof document<`u`?y:function(){};const z={...v};function B(e){let t=v.useRef(e);return R(()=>{t.current=e}),t}const V=z.useInsertionEffect||(e=>e());function H(e){let t=v.useRef(()=>{});return V(()=>{t.current=e}),v.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var U=typeof document<`u`?y:function(){};function W(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!W(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!W(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function te(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ne(e,t){let n=te(e);return Math.round(t*n)/n}function G(e){let t=v.useRef(e);return U(()=>{t.current=e}),t}function re(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=v.useState(r);W(p,r)||m(r);let[h,g]=v.useState(null),[_,y]=v.useState(null),b=v.useCallback(e=>{e!==T.current&&(T.current=e,g(e))},[]),S=v.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),C=a||h,w=o||_,T=v.useRef(null),E=v.useRef(null),D=v.useRef(d),O=l!=null,k=G(l),A=G(i),j=G(u),M=v.useCallback(()=>{if(!T.current||!E.current)return;let e={placement:t,strategy:n,middleware:p};A.current&&(e.platform=A.current),c(T.current,E.current,e).then(e=>{let t={...e,isPositioned:j.current!==!1};N.current&&!W(D.current,t)&&(D.current=t,x.flushSync(()=>{f(t)}))})},[p,t,n,A,j]);U(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let N=v.useRef(!1);U(()=>(N.current=!0,()=>{N.current=!1}),[]),U(()=>{if(C&&(T.current=C),w&&(E.current=w),C&&w){if(k.current)return k.current(C,w,M);M()}},[C,w,M,k,O]);let P=v.useMemo(()=>({reference:T,floating:E,setReference:b,setFloating:S}),[b,S]),F=v.useMemo(()=>({reference:C,floating:w}),[C,w]),I=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!F.floating)return e;let t=ne(F.floating,d.x),r=ne(F.floating,d.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...te(F.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,F.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:M,refs:P,elements:F,floatingStyles:I}),[d,M,P,F,I])}const ie=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:m({element:r.current,padding:i}).fn(n):r?m({element:r,padding:i}).fn(n):{}}}},ae=(e,t)=>{let n=l(e);return{name:n.name,fn:n.fn,options:[e,t]}},oe=(e,t)=>{let n=h(e);return{name:n.name,fn:n.fn,options:[e,t]}},se=(e,t)=>({fn:r(e).fn,options:[e,t]}),ce=(e,n)=>{let r=t(e);return{name:r.name,fn:r.fn,options:[e,n]}},le=(e,t)=>{let n=i(e);return{name:n.name,fn:n.fn,options:[e,t]}},ue=(e,t)=>{let n=d(e);return{name:n.name,fn:n.fn,options:[e,t]}},de=(e,t)=>{let n=p(e);return{name:n.name,fn:n.fn,options:[e,t]}},fe=(e,t)=>{let n=ie(e);return{name:n.name,fn:n.fn,options:[e,t]}};function pe(e){let t=v.useRef(void 0),n=v.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return v.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}const me=`active`,he=`selected`,ge=[`ArrowLeft`,`ArrowRight`],_e=[`ArrowUp`,`ArrowDown`];[...ge,..._e];const ve={...v};let ye=!1,be=0;const xe=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ be++;function Se(){let[e,t]=v.useState(()=>ye?xe():void 0);return R(()=>{e??t(xe())},[]),v.useEffect(()=>{ye=!0},[]),e}const Ce=ve.useId||Se;function we(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Te=v.createContext(null),Ee=v.createContext(null),K=()=>v.useContext(Te)?.id||null,q=()=>v.useContext(Ee);function J(e){return`data-floating-ui-`+e}function Y(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const De=J(`safe-polygon`);function X(e,t,n){if(n&&!L(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Z(e){return typeof e==`function`?e():e}function Oe(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:s}=e,{enabled:c=!0,delay:l=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=t,m=q(),h=K(),g=B(u),_=B(l),y=B(n),b=B(f),x=v.useRef(),S=v.useRef(-1),C=v.useRef(),w=v.useRef(-1),T=v.useRef(!0),E=v.useRef(!1),D=v.useRef(()=>{}),k=v.useRef(!1),A=H(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});v.useEffect(()=>{if(!c)return;function e(e){let{open:t}=e;t||(Y(S),Y(w),T.current=!0,k.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[c,a]),v.useEffect(()=>{if(!c||!g.current||!n)return;function e(e){A()&&r(!1,e,`hover`)}let t=M(s.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[s.floating,n,r,c,g,A]);let j=v.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=X(_.current,`close`,x.current);i&&!C.current?(Y(S),S.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Y(S),r(!1,e,n))},[_,r]),N=H(()=>{D.current(),C.current=void 0}),P=H(()=>{if(E.current){let e=M(s.floating).body;e.style.pointerEvents=``,e.removeAttribute(De),E.current=!1}}),F=H(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);v.useEffect(()=>{if(!c)return;function e(e){if(Y(S),T.current=!1,d&&!L(x.current)||Z(b.current)>0&&!X(_.current,`open`))return;let t=X(_.current,`open`,x.current);t?S.current=window.setTimeout(()=>{y.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(F()){P();return}D.current();let t=M(s.floating);if(Y(w),k.current=!1,g.current&&i.current.floatingContext){n||Y(S),C.current=g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){P(),N(),F()||j(e,!0,`safe-polygon`)}});let r=C.current;t.addEventListener(`mousemove`,r),D.current=()=>{t.removeEventListener(`mousemove`,r)};return}(x.current!==`touch`||!O(s.floating,e.relatedTarget))&&j(e)}function a(e){F()||i.current.floatingContext&&(g.current==null||g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){P(),N(),F()||j(e)}})(e))}function l(){Y(S)}function u(e){F()||j(e,!1)}if(o(s.domReference)){let r=s.domReference,i=s.floating;return n&&r.addEventListener(`mouseleave`,a),p&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,l),i.addEventListener(`mouseleave`,u)),()=>{n&&r.removeEventListener(`mouseleave`,a),p&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,l),i.removeEventListener(`mouseleave`,u))}}},[s,c,e,d,p,j,N,P,r,n,y,m,_,g,i,F,b]),R(()=>{var e;if(c&&n&&(e=g.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&A()){E.current=!0;let e=s.floating;if(o(s.domReference)&&e){var t;let n=M(s.floating).body;n.setAttribute(De,``);let r=s.domReference,i=m==null||(t=m.nodesRef.current.find(e=>e.id===h))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[c,n,h,s,m,g,A]),R(()=>{n||(x.current=void 0,k.current=!1,N(),P())},[n,N,P]),v.useEffect(()=>()=>{N(),Y(S),Y(w),P()},[c,s.domReference,N,P]);let I=v.useMemo(()=>{function e(e){x.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!T.current&&!y.current&&r(!0,t,`hover`)}d&&!L(x.current)||n||Z(b.current)===0||k.current&&e.movementX**2+e.movementY**2<2||(Y(w),x.current===`touch`?i():(k.current=!0,w.current=window.setTimeout(i,Z(b.current))))}}},[d,r,n,y,b]);return v.useMemo(()=>c?{reference:I}:{},[c,I])}const Q=()=>{},ke=v.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:Q,setState:Q,isInstantPhase:!1}),Ae=()=>v.useContext(ke);function je(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=v.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=v.useRef(null),s=v.useCallback(e=>{a({currentId:e})},[]);return R(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),b(ke.Provider,{value:v.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function Me(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=Ae(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return R(()=>{o&&l&&(f({delay:{open:1,close:X(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),R(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),R(()=>{o&&(u===Q||!n||u(s))},[o,n,u,s]),c}function $(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&_(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ne(e){return`composedPath`in e?e.composedPath()[0]:e.target}const Pe={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Fe={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Ie=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Le(t,r){r===void 0&&(r={});let{open:i,onOpenChange:s,elements:c,dataRef:l}=t,{enabled:d=!0,escapeKey:p=!0,outsidePress:m=!0,outsidePressEvent:h=`pointerdown`,referencePress:_=!1,referencePressEvent:y=`pointerdown`,ancestorScroll:b=!1,bubbles:x,capture:S}=r,C=q(),w=H(typeof m==`function`?m:()=>!1),T=typeof m==`function`?w:m,E=v.useRef(!1),{escapeKey:D,outsidePress:N}=Ie(x),{escapeKey:P,outsidePress:F}=Ie(S),L=v.useRef(!1),R=H(e=>{if(!i||!d||!p||e.key!==`Escape`||L.current)return;let t=l.current.floatingContext?.nodeId,n=C?I(C.nodesRef.current,t):[];if(!D&&(e.stopPropagation(),n.length>0)){let e=!0;if(n.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}s(!1,ee(e)?e.nativeEvent:e,`escape-key`)}),z=H(e=>{var t;let n=()=>{var t;R(e),(t=k(e))==null||t.removeEventListener(`keydown`,n)};(t=k(e))==null||t.addEventListener(`keydown`,n)}),B=H(t=>{let n=l.current.insideReactTree;l.current.insideReactTree=!1;let r=E.current;if(E.current=!1,h===`click`&&r||n||typeof T==`function`&&!T(t))return;let i=k(t),d=`[`+J(`inert`)+`]`,f=M(c.floating).querySelectorAll(d),p=o(i)?i:null;for(;p&&!g(p);){let e=u(p);if(g(e)||!o(e))break;p=e}if(f.length&&o(i)&&!j(i)&&!O(i,c.floating)&&Array.from(f).every(e=>!O(p,e)))return;if(e(i)&&W){let e=g(i),n=a(i),r=/auto|scroll/,o=e||r.test(n.overflowX),s=e||r.test(n.overflowY),c=o&&i.clientWidth>0&&i.scrollWidth>i.clientWidth,l=s&&i.clientHeight>0&&i.scrollHeight>i.clientHeight,u=n.direction===`rtl`,d=l&&(u?t.offsetX<=i.offsetWidth-i.clientWidth:t.offsetX>i.clientWidth),f=c&&t.offsetY>i.clientHeight;if(d||f)return}let m=l.current.floatingContext?.nodeId,_=C&&I(C.nodesRef.current,m).some(e=>A(t,e.context?.elements.floating));if(A(t,c.floating)||A(t,c.domReference)||_)return;let v=C?I(C.nodesRef.current,m):[];if(v.length>0){let e=!0;if(v.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}s(!1,t,`outside-press`)}),V=H(e=>{var t;let n=()=>{var t;B(e),(t=k(e))==null||t.removeEventListener(h,n)};(t=k(e))==null||t.addEventListener(h,n)});v.useEffect(()=>{if(!i||!d)return;l.current.__escapeKeyBubbles=D,l.current.__outsidePressBubbles=N;let e=-1;function t(e){s(!1,e,`ancestor-scroll`)}function r(){window.clearTimeout(e),L.current=!0}function a(){e=window.setTimeout(()=>{L.current=!1},n()?5:0)}let u=M(c.floating);p&&(u.addEventListener(`keydown`,P?z:R,P),u.addEventListener(`compositionstart`,r),u.addEventListener(`compositionend`,a)),T&&u.addEventListener(h,F?V:B,F);let m=[];return b&&(o(c.domReference)&&(m=f(c.domReference)),o(c.floating)&&(m=m.concat(f(c.floating))),!o(c.reference)&&c.reference&&c.reference.contextElement&&(m=m.concat(f(c.reference.contextElement)))),m=m.filter(e=>e!==u.defaultView?.visualViewport),m.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{p&&(u.removeEventListener(`keydown`,P?z:R,P),u.removeEventListener(`compositionstart`,r),u.removeEventListener(`compositionend`,a)),T&&u.removeEventListener(h,F?V:B,F),m.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[l,c,p,T,h,i,s,b,d,D,N,R,P,z,B,F,V]),v.useEffect(()=>{l.current.insideReactTree=!1},[l,T,h]);let U=v.useMemo(()=>({onKeyDown:R,..._&&{[Pe[y]]:e=>{s(!1,e.nativeEvent,`reference-press`)},...y!==`click`&&{onClick(e){s(!1,e.nativeEvent,`reference-press`)}}}}),[R,s,_,y]),W=v.useMemo(()=>{function e(e){e.button===0&&(E.current=!0)}return{onKeyDown:R,onMouseDown:e,onMouseUp:e,[Fe[h]]:()=>{l.current.insideReactTree=!0}}},[R,h,l]);return v.useMemo(()=>d?{reference:U,floating:W}:{},[d,U,W])}function Re(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Ce(),a=v.useRef({}),[o]=v.useState(()=>we()),s=K()!=null,[c,l]=v.useState(r.reference),u=H((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=v.useMemo(()=>({setPositionReference:l}),[]),f=v.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return v.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function ze(e){e===void 0&&(e={});let{nodeId:t}=e,n=Re({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,s]=v.useState(null),[c,l]=v.useState(null),u=i?.domReference||a,d=v.useRef(null),f=q();R(()=>{u&&(d.current=u)},[u]);let p=re({...e,elements:{...i,...c&&{reference:c}}}),m=v.useCallback(e=>{let t=o(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),p.refs.setReference(t)},[p.refs]),h=v.useCallback(e=>{(o(e)||e===null)&&(d.current=e,s(e)),(o(p.refs.reference.current)||p.refs.reference.current===null||e!==null&&!o(e))&&p.refs.setReference(e)},[p.refs]),g=v.useMemo(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:d}),[p.refs,h,m]),_=v.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),y=v.useMemo(()=>({...p,...r,refs:g,elements:_,nodeId:t}),[p,g,_,t,r]);return R(()=>{r.dataRef.current.floatingContext=y;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),v.useMemo(()=>({...p,context:y,refs:g,elements:_}),[p,g,_,y])}function Be(){return T()&&w()}function Ve(t,n){n===void 0&&(n={});let{open:r,onOpenChange:i,events:a,dataRef:c,elements:l}=t,{enabled:u=!0,visibleOnly:d=!0}=n,f=v.useRef(!1),p=v.useRef(-1),m=v.useRef(!0);v.useEffect(()=>{if(!u)return;let t=s(l.domReference);function n(){!r&&e(l.domReference)&&l.domReference===D(M(l.domReference))&&(f.current=!0)}function i(){m.current=!0}function a(){m.current=!1}return t.addEventListener(`blur`,n),Be()&&(t.addEventListener(`keydown`,i,!0),t.addEventListener(`pointerdown`,a,!0)),()=>{t.removeEventListener(`blur`,n),Be()&&(t.removeEventListener(`keydown`,i,!0),t.removeEventListener(`pointerdown`,a,!0))}},[l.domReference,r,u]),v.useEffect(()=>{if(!u)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(f.current=!0)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[a,u]),v.useEffect(()=>()=>{Y(p)},[]);let h=v.useMemo(()=>({onMouseLeave(){f.current=!1},onFocus(e){if(f.current)return;let t=k(e.nativeEvent);if(d&&o(t)){if(Be()&&!e.relatedTarget){if(!m.current&&!N(t))return}else if(!P(t))return}i(!0,e.nativeEvent,`focus`)},onBlur(e){f.current=!1;let t=e.relatedTarget,n=e.nativeEvent,r=o(t)&&t.hasAttribute(J(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;p.current=window.setTimeout(()=>{let e=D(l.domReference?l.domReference.ownerDocument:document);!t&&e===l.domReference||O(c.current.floatingContext?.refs.floating.current,e)||O(l.domReference,e)||r||i(!1,n,`focus`)})}}),[c,l.domReference,i,d]);return v.useMemo(()=>u?{reference:h}:{},[u,h])}function He(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[me]:t,[he]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,"data-floating-ui-focusable":``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[me,he].includes(n)))if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}),e),{})}}function Ue(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=v.useCallback(t=>He(t,e,`reference`),t),a=v.useCallback(t=>He(t,e,`floating`),n),o=v.useCallback(t=>He(t,e,`item`),r);return v.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}const We=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Ge(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=Ce(),c=r.domReference?.id||s,l=v.useMemo(()=>F(r.floating)?.id||i,[r.floating,i]),u=We.get(o)??o,d=K()!=null,f=v.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=v.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=v.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return v.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function Ke(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Ke(e,t.id,n)])}function qe(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function Je(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Ye(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,s=null,c=null,l=typeof performance<`u`?performance.now():0;function u(e,t){let n=performance.now(),r=n-l;if(s===null||c===null||r===0)return s=e,c=t,l=n,null;let i=e-s,a=t-c,o=Math.sqrt(i*i+a*a)/r;return s=e,c=t,l=n,o}let d=e=>{let{x:n,y:s,placement:c,elements:l,onClose:d,nodeId:f,tree:p}=e;return function(e){function m(){Y(i),d()}if(Y(i),!l.domReference||!l.floating||c==null||n==null||s==null)return;let{clientX:h,clientY:g}=e,_=[h,g],v=Ne(e),y=e.type===`mouseleave`,b=$(l.floating,v),x=$(l.domReference,v),S=l.domReference.getBoundingClientRect(),C=l.floating.getBoundingClientRect(),w=c.split(`-`)[0],T=n>C.right-C.width/2,E=s>C.bottom-C.height/2,D=Je(_,S),O=C.width>S.width,k=C.height>S.height,A=(O?S:C).left,j=(O?S:C).right,M=(k?S:C).top,N=(k?S:C).bottom;if(b&&(a=!0,!y))return;if(x&&(a=!1),x&&!y){a=!0;return}if(y&&o(e.relatedTarget)&&$(l.floating,e.relatedTarget)||p&&Ke(p.nodesRef.current,f).length)return;if(w===`top`&&s>=S.bottom-1||w===`bottom`&&s<=S.top+1||w===`left`&&n>=S.right-1||w===`right`&&n<=S.left+1)return m();let P=[];switch(w){case`top`:P=[[A,S.top+1],[A,C.bottom-1],[j,C.bottom-1],[j,S.top+1]];break;case`bottom`:P=[[A,C.top+1],[A,S.bottom-1],[j,S.bottom-1],[j,C.top+1]];break;case`left`:P=[[C.right-1,N],[C.right-1,M],[S.left+1,M],[S.left+1,N]];break;case`right`:P=[[S.right-1,N],[S.right-1,M],[C.left+1,M],[C.left+1,N]];break}function F(e){let[n,r]=e;switch(w){case`top`:return[[O?n+t/2:T?n+t*4:n-t*4,r+t+1],[O?n-t/2:T?n+t*4:n-t*4,r+t+1],[C.left,T||O?C.bottom-t:C.top],[C.right,T?O?C.bottom-t:C.top:C.bottom-t]];case`bottom`:return[[O?n+t/2:T?n+t*4:n-t*4,r-t],[O?n-t/2:T?n+t*4:n-t*4,r-t],[C.left,T||O?C.top+t:C.bottom],[C.right,T?O?C.top+t:C.bottom:C.top+t]];case`left`:{let e=[n+t+1,k?r+t/2:E?r+t*4:r-t*4],i=[n+t+1,k?r-t/2:E?r+t*4:r-t*4];return[[E||k?C.right-t:C.left,C.top],[E?k?C.right-t:C.left:C.right-t,C.bottom],e,i]}case`right`:return[[n-t,k?r+t/2:E?r+t*4:r-t*4],[n-t,k?r-t/2:E?r+t*4:r-t*4],[E||k?C.left+t:C.right,C.top],[E?k?C.left+t:C.right:C.left+t,C.bottom]]}}if(!qe([h,g],P)){if(a&&!D)return m();if(!y&&r){let t=u(e.clientX,e.clientY);if(t!==null&&t<.1)return m()}qe([h,g],F([n,s]))?!a&&r&&(i.current=window.setTimeout(m,40)):m()}}};return d.__options={blockPointerEvents:n},d}export{oe as _,ze as a,Ue as c,fe as d,ce as f,ae as g,se as h,Le as i,pe as l,de as m,Ye as n,Ve as o,ue as p,Me as r,Oe as s,je as t,Ge as u,le as v};
|