@arach/arc-iso 0.4.4

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.
@@ -0,0 +1,51 @@
1
+ (function(X,ie){typeof exports=="object"&&typeof module<"u"?ie(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],ie):(X=typeof globalThis<"u"?globalThis:X||self,ie(X.ArcIso={},X.React))})(this,(function(X,ie){"use strict";const Ve=30*(Math.PI/180),un=Math.cos(Ve),pn=Math.sin(Ve);function b(e,r,n=0){return{screenX:(e-r)*un,screenY:-(e+r)*pn-n}}function ue(e,r,n,o=0,i=0,l=0){const t={frontBottom:b(e,0,0),rightBottom:b(e,r,0),backBottom:b(0,r,0),leftBottom:b(0,0,0),frontTop:b(e,0,n),rightTop:b(e,r,n),backTop:b(0,r,n),leftTop:b(0,0,n)},a=$=>({x:$.screenX+o,y:$.screenY+i}),c=Object.fromEntries(Object.entries(t).map(([$,F])=>[$,a(F)])),s=($,F,j,T)=>{if(T<=0){const k=b(0,0,j),_=b($,0,j),S=b($,F,j),P=b(0,F,j);return`M ${k.screenX+o},${k.screenY+i} L ${_.screenX+o},${_.screenY+i} L ${S.screenX+o},${S.screenY+i} L ${P.screenX+o},${P.screenY+i} Z`}const U=Math.min($,F)/2,M=Math.min(T,U),O=8,R=[],Z=(k,_,S,P)=>{for(let B=0;B<=O;B++){const Q=S+(P-S)*(B/O),fe=k+M*Math.cos(Q),p=_+M*Math.sin(Q),C=b(fe,p,j);R.push(`${C.screenX+o},${C.screenY+i}`)}};return Z(M,M,Math.PI,Math.PI*1.5),Z($-M,M,Math.PI*1.5,Math.PI*2),Z($-M,F-M,0,Math.PI*.5),Z(M,F-M,Math.PI*.5,Math.PI),`M ${R[0]} L ${R.slice(1).join(" L ")} Z`},h=$=>`M ${$.map(F=>`${F.x},${F.y}`).join(" L ")} Z`,d=($,F,j,T,U,M)=>{const R=[];for(let S=0;S<6;S++){const P=U+(M-U)*(S/6),B=U+(M-U)*((S+1)/6),Q=(P+B)/2,fe=Math.cos(Q),p=Math.sin(Q),I=fe*-.577+p*-.577+0*.577,se=.3+Math.max(0,I+.4)*.5,J=b($+j*Math.cos(P),F+j*Math.sin(P),0),L=b($+j*Math.cos(B),F+j*Math.sin(B),0),E=b($+j*Math.cos(P),F+j*Math.sin(P),T),K=b($+j*Math.cos(B),F+j*Math.sin(B),T),ye=`M ${J.screenX+o},${J.screenY+i} L ${L.screenX+o},${L.screenY+i} L ${K.screenX+o},${K.screenY+i} L ${E.screenX+o},${E.screenY+i} Z`;R.push({path:ye,intensity:se})}return R},u=Math.min(l,Math.min(e,r)/2),f=s(e,r,n,u);let m,x,v,A,w,z;if(u>0){const $=[{x:b(0,u,0).screenX+o,y:b(0,u,0).screenY+i},{x:b(0,r-u,0).screenX+o,y:b(0,r-u,0).screenY+i},{x:b(0,r-u,n).screenX+o,y:b(0,r-u,n).screenY+i},{x:b(0,u,n).screenX+o,y:b(0,u,n).screenY+i}];m=h($);const F=[{x:b(u,0,0).screenX+o,y:b(u,0,0).screenY+i},{x:b(e-u,0,0).screenX+o,y:b(e-u,0,0).screenY+i},{x:b(e-u,0,n).screenX+o,y:b(e-u,0,n).screenY+i},{x:b(u,0,n).screenX+o,y:b(u,0,n).screenY+i}];x=h(F),v=d(u,u,u,n,Math.PI,Math.PI*1.5),A=d(e-u,u,u,n,Math.PI*1.5,Math.PI*2),w=d(u,r-u,u,n,Math.PI*.5,Math.PI),z=d(e-u,r-u,u,n,0,Math.PI*.5)}else{const $=[c.leftBottom,c.backBottom,c.backTop,c.leftTop],F=[c.leftBottom,c.frontBottom,c.frontTop,c.leftTop];m=h($),x=h(F),v=[],A=[],w=[],z=[]}const ce=`M ${c.leftBottom.x},${c.leftBottom.y} L ${c.frontBottom.x},${c.frontBottom.y} L ${c.rightBottom.x},${c.rightBottom.y} L ${c.backBottom.x},${c.backBottom.y} Z`;return{top:f,left:m,right:x,cornerFrontLeft:v,cornerFrontRight:A,cornerBackLeft:w,cornerBackRight:z,outline:ce}}function dn(e,r=60,n=50){return{top:`hsl(${e}, ${r}%, ${Math.min(n+15,95)}%)`,right:`hsl(${e}, ${r}%, ${n}%)`,left:`hsl(${e}, ${r}%, ${Math.max(n-15,15)}%)`}}const Ze={violet:{hue:270,saturation:60,lightness:55},blue:{hue:220,saturation:70,lightness:50},cyan:{hue:190,saturation:80,lightness:45},emerald:{hue:155,saturation:65,lightness:45},amber:{hue:40,saturation:90,lightness:50},rose:{hue:350,saturation:70,lightness:55},slate:{hue:220,saturation:15,lightness:50},zinc:{hue:240,saturation:5,lightness:50}};function hn(e){const r=Ze[e]||Ze.slate;return dn(r.hue,r.saturation,r.lightness)}var Se={exports:{}},ve={};var Qe;function mn(){if(Qe)return ve;Qe=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(o,i,l){var t=null;if(l!==void 0&&(t=""+l),i.key!==void 0&&(t=""+i.key),"key"in i){l={};for(var a in i)a!=="key"&&(l[a]=i[a])}else l=i;return i=l.ref,{$$typeof:e,type:o,key:t,ref:i!==void 0?i:null,props:l}}return ve.Fragment=r,ve.jsx=n,ve.jsxs=n,ve}var be={};var Je;function xn(){return Je||(Je=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(p==null)return null;if(typeof p=="function")return p.$$typeof===O?null:p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case v:return"Fragment";case w:return"Profiler";case A:return"StrictMode";case F:return"Suspense";case j:return"SuspenseList";case M:return"Activity"}if(typeof p=="object")switch(typeof p.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),p.$$typeof){case x:return"Portal";case ce:return p.displayName||"Context";case z:return(p._context.displayName||"Context")+".Consumer";case $:var C=p.render;return p=p.displayName,p||(p=C.displayName||C.name||"",p=p!==""?"ForwardRef("+p+")":"ForwardRef"),p;case T:return C=p.displayName||null,C!==null?C:e(p.type)||"Memo";case U:C=p._payload,p=p._init;try{return e(p(C))}catch{}}return null}function r(p){return""+p}function n(p){try{r(p);var C=!1}catch{C=!0}if(C){C=console;var I=C.error,N=typeof Symbol=="function"&&Symbol.toStringTag&&p[Symbol.toStringTag]||p.constructor.name||"Object";return I.call(C,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",N),r(p)}}function o(p){if(p===v)return"<>";if(typeof p=="object"&&p!==null&&p.$$typeof===U)return"<...>";try{var C=e(p);return C?"<"+C+">":"<...>"}catch{return"<...>"}}function i(){var p=R.A;return p===null?null:p.getOwner()}function l(){return Error("react-stack-top-frame")}function t(p){if(Z.call(p,"key")){var C=Object.getOwnPropertyDescriptor(p,"key").get;if(C&&C.isReactWarning)return!1}return p.key!==void 0}function a(p,C){function I(){S||(S=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",C))}I.isReactWarning=!0,Object.defineProperty(p,"key",{get:I,configurable:!0})}function c(){var p=e(this.type);return P[p]||(P[p]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),p=this.props.ref,p!==void 0?p:null}function s(p,C,I,N,se,J){var L=I.ref;return p={$$typeof:m,type:p,key:C,props:I,_owner:N},(L!==void 0?L:null)!==null?Object.defineProperty(p,"ref",{enumerable:!1,get:c}):Object.defineProperty(p,"ref",{enumerable:!1,value:null}),p._store={},Object.defineProperty(p._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(p,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(p,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.defineProperty(p,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.freeze&&(Object.freeze(p.props),Object.freeze(p)),p}function h(p,C,I,N,se,J){var L=C.children;if(L!==void 0)if(N)if(k(L)){for(N=0;N<L.length;N++)d(L[N]);Object.freeze&&Object.freeze(L)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(L);if(Z.call(C,"key")){L=e(p);var E=Object.keys(C).filter(function(ye){return ye!=="key"});N=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",fe[L+N]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
+ let props = %s;
3
+ <%s {...props} />
4
+ React keys must be passed directly to JSX without using spread:
5
+ let props = %s;
6
+ <%s key={someKey} {...props} />`,N,L,E,L),fe[L+N]=!0)}if(L=null,I!==void 0&&(n(I),L=""+I),t(C)&&(n(C.key),L=""+C.key),"key"in C){I={};for(var K in C)K!=="key"&&(I[K]=C[K])}else I=C;return L&&a(I,typeof p=="function"?p.displayName||p.name||"Unknown":p),s(p,L,I,i(),se,J)}function d(p){u(p)?p._store&&(p._store.validated=1):typeof p=="object"&&p!==null&&p.$$typeof===U&&(p._payload.status==="fulfilled"?u(p._payload.value)&&p._payload.value._store&&(p._payload.value._store.validated=1):p._store&&(p._store.validated=1))}function u(p){return typeof p=="object"&&p!==null&&p.$$typeof===m}var f=ie,m=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),ce=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),O=Symbol.for("react.client.reference"),R=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=Object.prototype.hasOwnProperty,k=Array.isArray,_=console.createTask?console.createTask:function(){return null};f={react_stack_bottom_frame:function(p){return p()}};var S,P={},B=f.react_stack_bottom_frame.bind(f,l)(),Q=_(o(l)),fe={};be.Fragment=v,be.jsx=function(p,C,I){var N=1e4>R.recentlyCreatedOwnerStacks++;return h(p,C,I,!1,N?Error("react-stack-top-frame"):B,N?_(o(p)):Q)},be.jsxs=function(p,C,I){var N=1e4>R.recentlyCreatedOwnerStacks++;return h(p,C,I,!0,N?Error("react-stack-top-frame"):B,N?_(o(p)):Q)}})()),be}var er;function gn(){return er||(er=1,process.env.NODE_ENV==="production"?Se.exports=mn():Se.exports=xn()),Se.exports}var y=gn();const rr='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',yn={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},vn={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function Te(e,r,n){const o=s=>{const h=s.replace("#","");return{r:parseInt(h.substring(0,2),16),g:parseInt(h.substring(2,4),16),b:parseInt(h.substring(4,6),16)}},i=o(e),l=o(r),t=Math.round(i.r+(l.r-i.r)*n),a=Math.round(i.g+(l.g-i.g)*n),c=Math.round(i.b+(l.b-i.b)*n);return`rgb(${t},${a},${c})`}function bn({x:e,y:r,z:n,children:o,fontSize:i=8,color:l="#1e293b",shadow:t}){const a=b(e,r,n);return y.jsx("g",{transform:`translate(${a.screenX}, ${a.screenY})`,filter:t,children:y.jsx("g",{transform:"matrix(0.866, -0.5, 0.866, 0.5, 0, 0)",children:y.jsx("text",{x:0,y:0,textAnchor:"middle",fill:l,fontSize:i,fontWeight:600,fontFamily:rr,style:{textTransform:"uppercase",letterSpacing:"0.06em"},children:o})})})}function An({width:e,depth:r,elevation:n,color:o,opacity:i,borderColor:l,theme:t,isGround:a}){const s=ue(e,r,a?8:2,0,0),h=b(0,0,n);return y.jsxs("g",{transform:`translate(${h.screenX}, ${h.screenY})`,children:[a&&y.jsx("g",{transform:"translate(4, 4)",opacity:.2,children:y.jsx("path",{d:s.top,fill:"#000"})}),y.jsx("path",{d:s.top,fill:o,opacity:i}),a&&y.jsxs(y.Fragment,{children:[y.jsx("path",{d:s.left,fill:t==="dark"?"#0f172a":"#cbd5e1",opacity:.8}),y.jsx("path",{d:s.right,fill:t==="dark"?"#1e293b":"#94a3b8",opacity:.8})]}),y.jsx("path",{d:s.top,fill:"none",stroke:l||(t==="dark"?"#475569":"#94a3b8"),strokeWidth:a?1.5:.75,opacity:a?1:.6})]})}function Cn({config:e,options:r={},className:n,style:o,onNodeClick:i,onLayerClick:l}){const{interactive:t=!0,animate:a=!0,showLabels:c=!0,expandOnHover:s=!0}=r,{theme:h,canvas:d,origin:u,tiers:f,floorSize:m,nodes:x,cornerRadius:v=0}=e,A=h==="dark"?yn:vn,w=h==="dark"?"#0f172a":"#fafafa",z=h==="dark"?"#e2e8f0":"#1e293b",ce=h==="dark"?"#64748b":"#94a3b8",[$,F]=ie.useState(new Set);ie.useEffect(()=>{a?(F(new Set),f.forEach((k,_)=>{setTimeout(()=>{F(S=>new Set([...S,_]))},_*150+100)})):F(new Set(f.map((k,_)=>_)))},[e.id,a,f.length]);const[j,T]=ie.useState(null),[U,M]=ie.useState(null),[O,R]=ie.useState(null),Z=[...x].sort((k,_)=>{const S=f[k.tier]?.elevation||0,P=f[_.tier]?.elevation||0;if(S!==P)return S-P;const B=k.x+k.width+(k.y+k.depth);return _.x+_.width+(_.y+_.depth)-B});return y.jsx("div",{className:n,style:{display:"inline-block",...o},children:y.jsxs("svg",{width:d.width,height:d.height,style:{backgroundColor:w},onClick:()=>{t&&(R(null),M(null))},children:[y.jsxs("defs",{children:[y.jsx("pattern",{id:`grid-${e.id}`,width:"24",height:"24",patternUnits:"userSpaceOnUse",children:y.jsx("circle",{cx:"12",cy:"12",r:"0.5",fill:h==="dark"?"#1e293b":"#e2e8f0"})}),y.jsx("filter",{id:`glow-${e.id}`,x:"-20%",y:"-20%",width:"140%",height:"140%",children:y.jsx("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodColor:h==="dark"?"#60a5fa":"#3b82f6",floodOpacity:"0.3"})}),y.jsxs("radialGradient",{id:`bg-${e.id}`,cx:"48%",cy:"34%",r:"82%",children:[y.jsx("stop",{offset:"0%",stopColor:h==="dark"?"#16203a":"#ffffff"}),y.jsx("stop",{offset:"55%",stopColor:h==="dark"?"#0e1526":"#f2f5f9"}),y.jsx("stop",{offset:"100%",stopColor:h==="dark"?"#080d18":"#e7ecf2"})]}),y.jsx("filter",{id:`contact-${e.id}`,x:"-60%",y:"-60%",width:"220%",height:"220%",children:y.jsx("feGaussianBlur",{stdDeviation:"5"})}),y.jsxs("linearGradient",{id:`sheen-${e.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[y.jsx("stop",{offset:"0%",stopColor:"#ffffff",stopOpacity:"0.18"}),y.jsx("stop",{offset:"55%",stopColor:"#ffffff",stopOpacity:"0.04"}),y.jsx("stop",{offset:"100%",stopColor:"#ffffff",stopOpacity:"0"})]}),y.jsxs("linearGradient",{id:`shade-${e.id}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[y.jsx("stop",{offset:"0%",stopColor:"#000000",stopOpacity:"0"}),y.jsx("stop",{offset:"100%",stopColor:"#000000",stopOpacity:"0.24"})]}),y.jsx("filter",{id:`label-${e.id}`,x:"-40%",y:"-40%",width:"180%",height:"180%",children:y.jsx("feDropShadow",{dx:"0",dy:"0.5",stdDeviation:"0.7",floodColor:"#000000",floodOpacity:"0.7"})})]}),y.jsx("rect",{width:"100%",height:"100%",fill:`url(#bg-${e.id})`}),y.jsx("rect",{width:"100%",height:"100%",fill:`url(#grid-${e.id})`,opacity:"0.5"}),y.jsx("g",{transform:`translate(${u.x}, ${u.y})`,children:f.map((k,_)=>{const S=Z.filter(E=>E.tier===_),P=$.has(_),B=t&&(U===_||U===null&&O===null&&j===_),Q=t&&(U!==null||j!==null||O!==null),fe=O?.tier===_,p=Q&&!B&&!fe,C=P?0:60,I=P?1:0,N=B&&s?{x:10,y:-34}:{x:0,y:0},se=B?1.03:1,J=b(m.width/2,m.depth/2,k.elevation),L=k.offset||{x:0,y:0};return y.jsxs("g",{"data-tier":_,onMouseEnter:()=>t&&T(_),onMouseLeave:()=>t&&T(null),onClick:E=>{t&&(E.stopPropagation(),R(null),M(K=>K===_?null:_),l?.(_))},style:{transform:`translate(${L.x+N.x}px, ${L.y+N.y}px) translate(${J.screenX}px, ${J.screenY+C}px) scale(${se}) translate(${-J.screenX}px, ${-J.screenY}px)`,transition:"transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease-out",opacity:I*(p?.35:1),filter:B?`url(#glow-${e.id})`:"none",cursor:t?"pointer":"default"},children:[y.jsx(An,{width:m.width,depth:m.depth,elevation:_===0?-2:k.elevation,color:k.floorColor||(h==="dark"?"#0f172a":"#f8fafc"),opacity:k.floorOpacity||(_===0?.95:.5),borderColor:k.borderColor,theme:h,isGround:_===0}),S.map((E,K)=>{const ye=k.elevation+5,fn=b(E.x,E.y,ye),ee=ue(E.width,E.depth,E.height,fn.screenX,fn.screenY,v),re=A[E.color]||A.slate,ze=O?.tier===_&&O?.index===K,Jo=t&&O!==null&&!ze,sn=b(E.x-3,E.y-3,k.elevation),et=ue(E.width+6,E.depth+6,0,sn.screenX,sn.screenY,v).top;return y.jsxs("g",{"data-node":`${_}-${K}`,opacity:(E.opacity??1)*(Jo?.3:1),onClick:t?V=>{if(V.stopPropagation(),M(null),R(ne=>ne&&ne.tier===_&&ne.index===K?null:{tier:_,index:K}),i?.(E,{tier:_,index:K}),E.link)try{window.open(E.link,"_blank")}catch{}}:void 0,style:{cursor:t?"pointer":"default",transition:"opacity 0.3s ease-out"},children:[y.jsx("path",{d:et,fill:"#000000",opacity:.3,filter:`url(#contact-${e.id})`}),ee.cornerBackRight?.map((V,ne)=>y.jsx("path",{d:V.path,fill:Te(re.front,re.side,V.intensity)},`cbr-${ne}`)),ee.cornerBackLeft?.map((V,ne)=>y.jsx("path",{d:V.path,fill:Te(re.side,re.front,V.intensity)},`cbl-${ne}`)),y.jsx("path",{d:ee.left,fill:re.side}),y.jsx("path",{d:ee.left,fill:`url(#shade-${e.id})`}),y.jsx("path",{d:ee.right,fill:re.front}),y.jsx("path",{d:ee.right,fill:`url(#shade-${e.id})`}),ee.cornerFrontRight?.map((V,ne)=>y.jsx("path",{d:V.path,fill:Te(re.front,re.side,V.intensity)},`cfr-${ne}`)),ee.cornerFrontLeft?.map((V,ne)=>y.jsx("path",{d:V.path,fill:Te(re.front,re.side,V.intensity)},`cfl-${ne}`)),y.jsx("path",{d:ee.top,fill:re.top}),y.jsx("path",{d:ee.top,fill:`url(#sheen-${e.id})`}),y.jsx("path",{d:ee.top,fill:"none",stroke:ze?"#ffffff":"rgba(255,255,255,0.28)",strokeWidth:ze?1.4:.75,strokeLinejoin:"round"}),c&&E.label&&y.jsx(bn,{x:E.x+E.width/2,y:E.y+E.depth/2,z:ye+E.height+2,fontSize:E.width>70?9:8,color:z,shadow:`url(#label-${e.id})`,children:E.label})]},K)}),c&&y.jsx("text",{x:b(-25,m.depth/2,k.elevation+15).screenX-35,y:b(-25,m.depth/2,k.elevation+15).screenY,fill:ce,fontSize:9,fontWeight:500,fontFamily:rr,opacity:.6,style:{letterSpacing:"0.05em"},children:k.name})]},_)})})]})})}const nr='"JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace',_n={blue:{top:"#3b82f6",side:"#2563eb",front:"#1d4ed8"},violet:{top:"#8b5cf6",side:"#7c3aed",front:"#6d28d9"},cyan:{top:"#06b6d4",side:"#0891b2",front:"#0e7490"},emerald:{top:"#10b981",side:"#059669",front:"#047857"},amber:{top:"#f59e0b",side:"#d97706",front:"#b45309"},rose:{top:"#f43f5e",side:"#e11d48",front:"#be123c"},slate:{top:"#475569",side:"#334155",front:"#1e293b"}},wn={blue:{top:"#93c5fd",side:"#60a5fa",front:"#3b82f6"},violet:{top:"#c4b5fd",side:"#a78bfa",front:"#8b5cf6"},cyan:{top:"#67e8f9",side:"#22d3ee",front:"#06b6d4"},emerald:{top:"#6ee7b7",side:"#34d399",front:"#10b981"},amber:{top:"#fcd34d",side:"#fbbf24",front:"#f59e0b"},rose:{top:"#fda4af",side:"#fb7185",front:"#f43f5e"},slate:{top:"#e2e8f0",side:"#cbd5e1",front:"#94a3b8"}};function ke(e,r,n){const o=s=>{const h=s.replace("#","");return{r:parseInt(h.substring(0,2),16),g:parseInt(h.substring(2,4),16),b:parseInt(h.substring(4,6),16)}},i=o(e),l=o(r),t=Math.round(i.r+(l.r-i.r)*n),a=Math.round(i.g+(l.g-i.g)*n),c=Math.round(i.b+(l.b-i.b)*n);return`rgb(${t},${a},${c})`}function ir(e){const{theme:r,canvas:n,origin:o,tiers:i,floorSize:l,nodes:t,cornerRadius:a=0}=e,c=r==="dark"?_n:wn,s=r==="dark"?"#0f172a":"#fafafa",h=r==="dark"?"#e2e8f0":"#1e293b",d=r==="dark"?"#64748b":"#94a3b8",u=[...t].sort((m,x)=>{const v=i[m.tier]?.elevation||0,A=i[x.tier]?.elevation||0;return v!==A?v-A:x.x+x.width+(x.y+x.depth)-(m.x+m.width+(m.y+m.depth))});let f=`<svg xmlns="http://www.w3.org/2000/svg" width="${n.width}" height="${n.height}" style="background:${s}">`;f+=`<defs>
7
+ <pattern id="grid" width="24" height="24" patternUnits="userSpaceOnUse">
8
+ <circle cx="12" cy="12" r="0.5" fill="${r==="dark"?"#1e293b":"#e2e8f0"}"/>
9
+ </pattern>
10
+ <radialGradient id="bg" cx="48%" cy="34%" r="82%">
11
+ <stop offset="0%" stop-color="${r==="dark"?"#16203a":"#ffffff"}"/>
12
+ <stop offset="55%" stop-color="${r==="dark"?"#0e1526":"#f2f5f9"}"/>
13
+ <stop offset="100%" stop-color="${r==="dark"?"#080d18":"#e7ecf2"}"/>
14
+ </radialGradient>
15
+ <filter id="contact" x="-60%" y="-60%" width="220%" height="220%"><feGaussianBlur stdDeviation="5"/></filter>
16
+ <linearGradient id="sheen" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.18"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.04"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></linearGradient>
17
+ <linearGradient id="shade" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#000000" stop-opacity="0"/><stop offset="100%" stop-color="#000000" stop-opacity="0.24"/></linearGradient>
18
+ <filter id="labelshadow" x="-40%" y="-40%" width="180%" height="180%"><feDropShadow dx="0" dy="0.5" stdDeviation="0.7" flood-color="#000000" flood-opacity="0.7"/></filter>
19
+ </defs>`,f+='<rect width="100%" height="100%" fill="url(#bg)"/>',f+='<rect width="100%" height="100%" fill="url(#grid)" opacity="0.5"/>',f+=`<g transform="translate(${o.x},${o.y})">`;for(let m=0;m<i.length;m++){const x=i[m],v=u.filter(T=>T.tier===m),A=x.offset||{x:0,y:0};f+=`<g transform="translate(${A.x},${A.y})">`;const w=m===0?8:2,z=ue(l.width,l.depth,w,0,0),ce=b(0,0,m===0?-2:x.elevation),$=x.floorColor||(r==="dark"?"#0f172a":"#f8fafc"),F=x.floorOpacity||(m===0?.95:.5);f+=`<g transform="translate(${ce.screenX},${ce.screenY})">`,m===0&&(f+=`<g transform="translate(4,4)" opacity="0.2"><path d="${z.top}" fill="#000"/></g>`),f+=`<path d="${z.top}" fill="${$}" opacity="${F}"/>`,m===0&&(f+=`<path d="${z.left}" fill="${r==="dark"?"#0f172a":"#cbd5e1"}" opacity="0.8"/>`,f+=`<path d="${z.right}" fill="${r==="dark"?"#1e293b":"#94a3b8"}" opacity="0.8"/>`),f+=`<path d="${z.top}" fill="none" stroke="${x.borderColor||(r==="dark"?"#475569":"#94a3b8")}" stroke-width="${m===0?1.5:.75}" opacity="${m===0?1:.6}"/>`,f+="</g>";for(const T of v){const U=x.elevation+5,M=b(T.x,T.y,U),O=ue(T.width,T.depth,T.height,M.screenX,M.screenY,a),R=c[T.color]||c.slate,Z=T.opacity??1;f+=`<g opacity="${Z}">`;const k=b(T.x-3,T.y-3,x.elevation),_=ue(T.width+6,T.depth+6,0,k.screenX,k.screenY,a).top;if(f+=`<path d="${_}" fill="#000000" opacity="0.3" filter="url(#contact)"/>`,O.cornerBackRight)for(const S of O.cornerBackRight)f+=`<path d="${S.path}" fill="${ke(R.front,R.side,S.intensity)}"/>`;if(O.cornerBackLeft)for(const S of O.cornerBackLeft)f+=`<path d="${S.path}" fill="${ke(R.side,R.front,S.intensity)}"/>`;if(f+=`<path d="${O.left}" fill="${R.side}"/>`,f+=`<path d="${O.left}" fill="url(#shade)"/>`,f+=`<path d="${O.right}" fill="${R.front}"/>`,f+=`<path d="${O.right}" fill="url(#shade)"/>`,O.cornerFrontRight)for(const S of O.cornerFrontRight)f+=`<path d="${S.path}" fill="${ke(R.front,R.side,S.intensity)}"/>`;if(O.cornerFrontLeft)for(const S of O.cornerFrontLeft)f+=`<path d="${S.path}" fill="${ke(R.front,R.side,S.intensity)}"/>`;if(f+=`<path d="${O.top}" fill="${R.top}"/>`,f+=`<path d="${O.top}" fill="url(#sheen)"/>`,f+=`<path d="${O.top}" fill="none" stroke="rgba(255,255,255,0.28)" stroke-width="0.75" stroke-linejoin="round"/>`,T.label){const S=b(T.x+T.width/2,T.y+T.depth/2,U+T.height+2),P=T.width>70?9:8;f+=`<g transform="translate(${S.screenX},${S.screenY})" filter="url(#labelshadow)">`,f+='<g transform="matrix(0.866,-0.5,0.866,0.5,0,0)">',f+=`<text x="0" y="0" text-anchor="middle" fill="${h}" font-size="${P}" font-weight="600" font-family='${nr}' style="text-transform:uppercase;letter-spacing:0.06em">${T.label}</text>`,f+="</g></g>"}f+="</g>"}const j=b(-25,l.depth/2,x.elevation+15);f+=`<text x="${j.screenX-35}" y="${j.screenY}" fill="${d}" font-size="9" font-weight="500" font-family='${nr}' opacity="0.6" style="letter-spacing:0.05em">${x.name}</text>`,f+="</g>"}return f+="</g></svg>",f}function En(e,r){e.innerHTML=ir(r)}function or(e){return typeof e>"u"||e===null}function Sn(e){return typeof e=="object"&&e!==null}function Tn(e){return Array.isArray(e)?e:or(e)?[]:[e]}function kn(e,r){var n,o,i,l;if(r)for(l=Object.keys(r),n=0,o=l.length;n<o;n+=1)i=l[n],e[i]=r[i];return e}function On(e,r){var n="",o;for(o=0;o<r;o+=1)n+=e;return n}function $n(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Fn=or,Rn=Sn,In=Tn,Ln=On,Nn=$n,jn=kn,Y={isNothing:Fn,isObject:Rn,toArray:In,repeat:Ln,isNegativeZero:Nn,extend:jn};function tr(e,r){var n="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(n+=`
20
+
21
+ `+e.mark.snippet),o+" "+n):o}function Ae(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=tr(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Ae.prototype=Object.create(Error.prototype),Ae.prototype.constructor=Ae,Ae.prototype.toString=function(r){return this.name+": "+tr(this,r)};var W=Ae;function Ne(e,r,n,o,i){var l="",t="",a=Math.floor(i/2)-1;return o-r>a&&(l=" ... ",r=o-a+l.length),n-o>a&&(t=" ...",n=o+a-t.length),{str:l+e.slice(r,n).replace(/\t/g,"→")+t,pos:o-r+l.length}}function je(e,r){return Y.repeat(" ",r-e.length)+e}function Mn(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var n=/\r?\n|\r|\0/g,o=[0],i=[],l,t=-1;l=n.exec(e.buffer);)i.push(l.index),o.push(l.index+l[0].length),e.position<=l.index&&t<0&&(t=o.length-2);t<0&&(t=o.length-1);var a="",c,s,h=Math.min(e.line+r.linesAfter,i.length).toString().length,d=r.maxLength-(r.indent+h+3);for(c=1;c<=r.linesBefore&&!(t-c<0);c++)s=Ne(e.buffer,o[t-c],i[t-c],e.position-(o[t]-o[t-c]),d),a=Y.repeat(" ",r.indent)+je((e.line-c+1).toString(),h)+" | "+s.str+`
22
+ `+a;for(s=Ne(e.buffer,o[t],i[t],e.position,d),a+=Y.repeat(" ",r.indent)+je((e.line+1).toString(),h)+" | "+s.str+`
23
+ `,a+=Y.repeat("-",r.indent+h+3+s.pos)+`^
24
+ `,c=1;c<=r.linesAfter&&!(t+c>=i.length);c++)s=Ne(e.buffer,o[t+c],i[t+c],e.position-(o[t]-o[t+c]),d),a+=Y.repeat(" ",r.indent)+je((e.line+c+1).toString(),h)+" | "+s.str+`
25
+ `;return a.replace(/\n$/,"")}var Pn=Mn,Dn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Yn=["scalar","sequence","mapping"];function Bn(e){var r={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(o){r[String(o)]=n})}),r}function Hn(e,r){if(r=r||{},Object.keys(r).forEach(function(n){if(Dn.indexOf(n)===-1)throw new W('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(n){return n},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=Bn(r.styleAliases||null),Yn.indexOf(this.kind)===-1)throw new W('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var H=Hn;function lr(e,r){var n=[];return e[r].forEach(function(o){var i=n.length;n.forEach(function(l,t){l.tag===o.tag&&l.kind===o.kind&&l.multi===o.multi&&(i=t)}),n[i]=o}),n}function Un(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,n;function o(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(r=0,n=arguments.length;r<n;r+=1)arguments[r].forEach(o);return e}function Me(e){return this.extend(e)}Me.prototype.extend=function(r){var n=[],o=[];if(r instanceof H)o.push(r);else if(Array.isArray(r))o=o.concat(r);else if(r&&(Array.isArray(r.implicit)||Array.isArray(r.explicit)))r.implicit&&(n=n.concat(r.implicit)),r.explicit&&(o=o.concat(r.explicit));else throw new W("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(l){if(!(l instanceof H))throw new W("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new W("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new W("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(l){if(!(l instanceof H))throw new W("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Me.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(o),i.compiledImplicit=lr(i,"implicit"),i.compiledExplicit=lr(i,"explicit"),i.compiledTypeMap=Un(i.compiledImplicit,i.compiledExplicit),i};var ar=Me,cr=new H("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),fr=new H("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),sr=new H("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),ur=new ar({explicit:[cr,fr,sr]});function Gn(e){if(e===null)return!0;var r=e.length;return r===1&&e==="~"||r===4&&(e==="null"||e==="Null"||e==="NULL")}function Wn(){return null}function Kn(e){return e===null}var pr=new H("tag:yaml.org,2002:null",{kind:"scalar",resolve:Gn,construct:Wn,predicate:Kn,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Xn(e){if(e===null)return!1;var r=e.length;return r===4&&(e==="true"||e==="True"||e==="TRUE")||r===5&&(e==="false"||e==="False"||e==="FALSE")}function qn(e){return e==="true"||e==="True"||e==="TRUE"}function zn(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var dr=new H("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Xn,construct:qn,predicate:zn,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Vn(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Zn(e){return 48<=e&&e<=55}function Qn(e){return 48<=e&&e<=57}function Jn(e){if(e===null)return!1;var r=e.length,n=0,o=!1,i;if(!r)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===r)return!0;if(i=e[++n],i==="b"){for(n++;n<r;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;o=!0}return o&&i!=="_"}if(i==="x"){for(n++;n<r;n++)if(i=e[n],i!=="_"){if(!Vn(e.charCodeAt(n)))return!1;o=!0}return o&&i!=="_"}if(i==="o"){for(n++;n<r;n++)if(i=e[n],i!=="_"){if(!Zn(e.charCodeAt(n)))return!1;o=!0}return o&&i!=="_"}}if(i==="_")return!1;for(;n<r;n++)if(i=e[n],i!=="_"){if(!Qn(e.charCodeAt(n)))return!1;o=!0}return!(!o||i==="_")}function ei(e){var r=e,n=1,o;if(r.indexOf("_")!==-1&&(r=r.replace(/_/g,"")),o=r[0],(o==="-"||o==="+")&&(o==="-"&&(n=-1),r=r.slice(1),o=r[0]),r==="0")return 0;if(o==="0"){if(r[1]==="b")return n*parseInt(r.slice(2),2);if(r[1]==="x")return n*parseInt(r.slice(2),16);if(r[1]==="o")return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)}function ri(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Y.isNegativeZero(e)}var hr=new H("tag:yaml.org,2002:int",{kind:"scalar",resolve:Jn,construct:ei,predicate:ri,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ni=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ii(e){return!(e===null||!ni.test(e)||e[e.length-1]==="_")}function oi(e){var r,n;return r=e.replace(/_/g,"").toLowerCase(),n=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:n*parseFloat(r,10)}var ti=/^[-+]?[0-9]+e/;function li(e,r){var n;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Y.isNegativeZero(e))return"-0.0";return n=e.toString(10),ti.test(n)?n.replace("e",".e"):n}function ai(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Y.isNegativeZero(e))}var mr=new H("tag:yaml.org,2002:float",{kind:"scalar",resolve:ii,construct:oi,predicate:ai,represent:li,defaultStyle:"lowercase"}),xr=ur.extend({implicit:[pr,dr,hr,mr]}),gr=xr,yr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),vr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ci(e){return e===null?!1:yr.exec(e)!==null||vr.exec(e)!==null}function fi(e){var r,n,o,i,l,t,a,c=0,s=null,h,d,u;if(r=yr.exec(e),r===null&&(r=vr.exec(e)),r===null)throw new Error("Date resolve error");if(n=+r[1],o=+r[2]-1,i=+r[3],!r[4])return new Date(Date.UTC(n,o,i));if(l=+r[4],t=+r[5],a=+r[6],r[7]){for(c=r[7].slice(0,3);c.length<3;)c+="0";c=+c}return r[9]&&(h=+r[10],d=+(r[11]||0),s=(h*60+d)*6e4,r[9]==="-"&&(s=-s)),u=new Date(Date.UTC(n,o,i,l,t,a,c)),s&&u.setTime(u.getTime()-s),u}function si(e){return e.toISOString()}var br=new H("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ci,construct:fi,instanceOf:Date,represent:si});function ui(e){return e==="<<"||e===null}var Ar=new H("tag:yaml.org,2002:merge",{kind:"scalar",resolve:ui}),Pe=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
26
+ \r`;function pi(e){if(e===null)return!1;var r,n,o=0,i=e.length,l=Pe;for(n=0;n<i;n++)if(r=l.indexOf(e.charAt(n)),!(r>64)){if(r<0)return!1;o+=6}return o%8===0}function di(e){var r,n,o=e.replace(/[\r\n=]/g,""),i=o.length,l=Pe,t=0,a=[];for(r=0;r<i;r++)r%4===0&&r&&(a.push(t>>16&255),a.push(t>>8&255),a.push(t&255)),t=t<<6|l.indexOf(o.charAt(r));return n=i%4*6,n===0?(a.push(t>>16&255),a.push(t>>8&255),a.push(t&255)):n===18?(a.push(t>>10&255),a.push(t>>2&255)):n===12&&a.push(t>>4&255),new Uint8Array(a)}function hi(e){var r="",n=0,o,i,l=e.length,t=Pe;for(o=0;o<l;o++)o%3===0&&o&&(r+=t[n>>18&63],r+=t[n>>12&63],r+=t[n>>6&63],r+=t[n&63]),n=(n<<8)+e[o];return i=l%3,i===0?(r+=t[n>>18&63],r+=t[n>>12&63],r+=t[n>>6&63],r+=t[n&63]):i===2?(r+=t[n>>10&63],r+=t[n>>4&63],r+=t[n<<2&63],r+=t[64]):i===1&&(r+=t[n>>2&63],r+=t[n<<4&63],r+=t[64],r+=t[64]),r}function mi(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Cr=new H("tag:yaml.org,2002:binary",{kind:"scalar",resolve:pi,construct:di,predicate:mi,represent:hi}),xi=Object.prototype.hasOwnProperty,gi=Object.prototype.toString;function yi(e){if(e===null)return!0;var r=[],n,o,i,l,t,a=e;for(n=0,o=a.length;n<o;n+=1){if(i=a[n],t=!1,gi.call(i)!=="[object Object]")return!1;for(l in i)if(xi.call(i,l))if(!t)t=!0;else return!1;if(!t)return!1;if(r.indexOf(l)===-1)r.push(l);else return!1}return!0}function vi(e){return e!==null?e:[]}var _r=new H("tag:yaml.org,2002:omap",{kind:"sequence",resolve:yi,construct:vi}),bi=Object.prototype.toString;function Ai(e){if(e===null)return!0;var r,n,o,i,l,t=e;for(l=new Array(t.length),r=0,n=t.length;r<n;r+=1){if(o=t[r],bi.call(o)!=="[object Object]"||(i=Object.keys(o),i.length!==1))return!1;l[r]=[i[0],o[i[0]]]}return!0}function Ci(e){if(e===null)return[];var r,n,o,i,l,t=e;for(l=new Array(t.length),r=0,n=t.length;r<n;r+=1)o=t[r],i=Object.keys(o),l[r]=[i[0],o[i[0]]];return l}var wr=new H("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ai,construct:Ci}),_i=Object.prototype.hasOwnProperty;function wi(e){if(e===null)return!0;var r,n=e;for(r in n)if(_i.call(n,r)&&n[r]!==null)return!1;return!0}function Ei(e){return e!==null?e:{}}var Er=new H("tag:yaml.org,2002:set",{kind:"mapping",resolve:wi,construct:Ei}),De=gr.extend({implicit:[br,Ar],explicit:[Cr,_r,wr,Er]}),le=Object.prototype.hasOwnProperty,Oe=1,Sr=2,Tr=3,$e=4,Ye=1,Si=2,kr=3,Ti=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ki=/[\x85\u2028\u2029]/,Oi=/[,\[\]\{\}]/,Or=/^(?:!|!!|![a-z\-]+!)$/i,$r=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Fr(e){return Object.prototype.toString.call(e)}function oe(e){return e===10||e===13}function pe(e){return e===9||e===32}function q(e){return e===9||e===32||e===10||e===13}function de(e){return e===44||e===91||e===93||e===123||e===125}function $i(e){var r;return 48<=e&&e<=57?e-48:(r=e|32,97<=r&&r<=102?r-97+10:-1)}function Fi(e){return e===120?2:e===117?4:e===85?8:0}function Ri(e){return 48<=e&&e<=57?e-48:-1}function Rr(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
27
+ `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function Ii(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Ir(e,r,n){r==="__proto__"?Object.defineProperty(e,r,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[r]=n}for(var Lr=new Array(256),Nr=new Array(256),he=0;he<256;he++)Lr[he]=Rr(he)?1:0,Nr[he]=Rr(he);function Li(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||De,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function jr(e,r){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=Pn(n),new W(r,n)}function g(e,r){throw jr(e,r)}function Fe(e,r){e.onWarning&&e.onWarning.call(null,jr(e,r))}var Mr={YAML:function(r,n,o){var i,l,t;r.version!==null&&g(r,"duplication of %YAML directive"),o.length!==1&&g(r,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),i===null&&g(r,"ill-formed argument of the YAML directive"),l=parseInt(i[1],10),t=parseInt(i[2],10),l!==1&&g(r,"unacceptable YAML version of the document"),r.version=o[0],r.checkLineBreaks=t<2,t!==1&&t!==2&&Fe(r,"unsupported YAML version of the document")},TAG:function(r,n,o){var i,l;o.length!==2&&g(r,"TAG directive accepts exactly two arguments"),i=o[0],l=o[1],Or.test(i)||g(r,"ill-formed tag handle (first argument) of the TAG directive"),le.call(r.tagMap,i)&&g(r,'there is a previously declared suffix for "'+i+'" tag handle'),$r.test(l)||g(r,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{g(r,"tag prefix is malformed: "+l)}r.tagMap[i]=l}};function ae(e,r,n,o){var i,l,t,a;if(r<n){if(a=e.input.slice(r,n),o)for(i=0,l=a.length;i<l;i+=1)t=a.charCodeAt(i),t===9||32<=t&&t<=1114111||g(e,"expected valid JSON character");else Ti.test(a)&&g(e,"the stream contains non-printable characters");e.result+=a}}function Pr(e,r,n,o){var i,l,t,a;for(Y.isObject(n)||g(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),t=0,a=i.length;t<a;t+=1)l=i[t],le.call(r,l)||(Ir(r,l,n[l]),o[l]=!0)}function me(e,r,n,o,i,l,t,a,c){var s,h;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),s=0,h=i.length;s<h;s+=1)Array.isArray(i[s])&&g(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Fr(i[s])==="[object Object]"&&(i[s]="[object Object]");if(typeof i=="object"&&Fr(i)==="[object Object]"&&(i="[object Object]"),i=String(i),r===null&&(r={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(s=0,h=l.length;s<h;s+=1)Pr(e,r,l[s],n);else Pr(e,r,l,n);else!e.json&&!le.call(n,i)&&le.call(r,i)&&(e.line=t||e.line,e.lineStart=a||e.lineStart,e.position=c||e.position,g(e,"duplicated mapping key")),Ir(r,i,l),delete n[i];return r}function Be(e){var r;r=e.input.charCodeAt(e.position),r===10?e.position++:r===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):g(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function D(e,r,n){for(var o=0,i=e.input.charCodeAt(e.position);i!==0;){for(;pe(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(r&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(oe(i))for(Be(e),i=e.input.charCodeAt(e.position),o++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&o!==0&&e.lineIndent<n&&Fe(e,"deficient indentation"),o}function Re(e){var r=e.position,n;return n=e.input.charCodeAt(r),!!((n===45||n===46)&&n===e.input.charCodeAt(r+1)&&n===e.input.charCodeAt(r+2)&&(r+=3,n=e.input.charCodeAt(r),n===0||q(n)))}function He(e,r){r===1?e.result+=" ":r>1&&(e.result+=Y.repeat(`
28
+ `,r-1))}function Ni(e,r,n){var o,i,l,t,a,c,s,h,d=e.kind,u=e.result,f;if(f=e.input.charCodeAt(e.position),q(f)||de(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=e.input.charCodeAt(e.position+1),q(i)||n&&de(i)))return!1;for(e.kind="scalar",e.result="",l=t=e.position,a=!1;f!==0;){if(f===58){if(i=e.input.charCodeAt(e.position+1),q(i)||n&&de(i))break}else if(f===35){if(o=e.input.charCodeAt(e.position-1),q(o))break}else{if(e.position===e.lineStart&&Re(e)||n&&de(f))break;if(oe(f))if(c=e.line,s=e.lineStart,h=e.lineIndent,D(e,!1,-1),e.lineIndent>=r){a=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=t,e.line=c,e.lineStart=s,e.lineIndent=h;break}}a&&(ae(e,l,t,!1),He(e,e.line-c),l=t=e.position,a=!1),pe(f)||(t=e.position+1),f=e.input.charCodeAt(++e.position)}return ae(e,l,t,!1),e.result?!0:(e.kind=d,e.result=u,!1)}function ji(e,r){var n,o,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(ae(e,o,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)o=e.position,e.position++,i=e.position;else return!0;else oe(n)?(ae(e,o,i,!0),He(e,D(e,!1,r)),o=i=e.position):e.position===e.lineStart&&Re(e)?g(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);g(e,"unexpected end of the stream within a single quoted scalar")}function Mi(e,r){var n,o,i,l,t,a;if(a=e.input.charCodeAt(e.position),a!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(a=e.input.charCodeAt(e.position))!==0;){if(a===34)return ae(e,n,e.position,!0),e.position++,!0;if(a===92){if(ae(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),oe(a))D(e,!1,r);else if(a<256&&Lr[a])e.result+=Nr[a],e.position++;else if((t=Fi(a))>0){for(i=t,l=0;i>0;i--)a=e.input.charCodeAt(++e.position),(t=$i(a))>=0?l=(l<<4)+t:g(e,"expected hexadecimal character");e.result+=Ii(l),e.position++}else g(e,"unknown escape sequence");n=o=e.position}else oe(a)?(ae(e,n,o,!0),He(e,D(e,!1,r)),n=o=e.position):e.position===e.lineStart&&Re(e)?g(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}g(e,"unexpected end of the stream within a double quoted scalar")}function Pi(e,r){var n=!0,o,i,l,t=e.tag,a,c=e.anchor,s,h,d,u,f,m=Object.create(null),x,v,A,w;if(w=e.input.charCodeAt(e.position),w===91)h=93,f=!1,a=[];else if(w===123)h=125,f=!0,a={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),w=e.input.charCodeAt(++e.position);w!==0;){if(D(e,!0,r),w=e.input.charCodeAt(e.position),w===h)return e.position++,e.tag=t,e.anchor=c,e.kind=f?"mapping":"sequence",e.result=a,!0;n?w===44&&g(e,"expected the node content, but found ','"):g(e,"missed comma between flow collection entries"),v=x=A=null,d=u=!1,w===63&&(s=e.input.charCodeAt(e.position+1),q(s)&&(d=u=!0,e.position++,D(e,!0,r))),o=e.line,i=e.lineStart,l=e.position,xe(e,r,Oe,!1,!0),v=e.tag,x=e.result,D(e,!0,r),w=e.input.charCodeAt(e.position),(u||e.line===o)&&w===58&&(d=!0,w=e.input.charCodeAt(++e.position),D(e,!0,r),xe(e,r,Oe,!1,!0),A=e.result),f?me(e,a,m,v,x,A,o,i,l):d?a.push(me(e,null,m,v,x,A,o,i,l)):a.push(x),D(e,!0,r),w=e.input.charCodeAt(e.position),w===44?(n=!0,w=e.input.charCodeAt(++e.position)):n=!1}g(e,"unexpected end of the stream within a flow collection")}function Di(e,r){var n,o,i=Ye,l=!1,t=!1,a=r,c=0,s=!1,h,d;if(d=e.input.charCodeAt(e.position),d===124)o=!1;else if(d===62)o=!0;else return!1;for(e.kind="scalar",e.result="";d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Ye===i?i=d===43?kr:Si:g(e,"repeat of a chomping mode identifier");else if((h=Ri(d))>=0)h===0?g(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):t?g(e,"repeat of an indentation width identifier"):(a=r+h-1,t=!0);else break;if(pe(d)){do d=e.input.charCodeAt(++e.position);while(pe(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!oe(d)&&d!==0)}for(;d!==0;){for(Be(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!t||e.lineIndent<a)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!t&&e.lineIndent>a&&(a=e.lineIndent),oe(d)){c++;continue}if(e.lineIndent<a){i===kr?e.result+=Y.repeat(`
29
+ `,l?1+c:c):i===Ye&&l&&(e.result+=`
30
+ `);break}for(o?pe(d)?(s=!0,e.result+=Y.repeat(`
31
+ `,l?1+c:c)):s?(s=!1,e.result+=Y.repeat(`
32
+ `,c+1)):c===0?l&&(e.result+=" "):e.result+=Y.repeat(`
33
+ `,c):e.result+=Y.repeat(`
34
+ `,l?1+c:c),l=!0,t=!0,c=0,n=e.position;!oe(d)&&d!==0;)d=e.input.charCodeAt(++e.position);ae(e,n,e.position,!1)}return!0}function Dr(e,r){var n,o=e.tag,i=e.anchor,l=[],t,a=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,g(e,"tab characters must not be used in indentation")),!(c!==45||(t=e.input.charCodeAt(e.position+1),!q(t))));){if(a=!0,e.position++,D(e,!0,-1)&&e.lineIndent<=r){l.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,xe(e,r,Tr,!1,!0),l.push(e.result),D(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>r)&&c!==0)g(e,"bad indentation of a sequence entry");else if(e.lineIndent<r)break}return a?(e.tag=o,e.anchor=i,e.kind="sequence",e.result=l,!0):!1}function Yi(e,r,n){var o,i,l,t,a,c,s=e.tag,h=e.anchor,d={},u=Object.create(null),f=null,m=null,x=null,v=!1,A=!1,w;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),w=e.input.charCodeAt(e.position);w!==0;){if(!v&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,g(e,"tab characters must not be used in indentation")),o=e.input.charCodeAt(e.position+1),l=e.line,(w===63||w===58)&&q(o))w===63?(v&&(me(e,d,u,f,m,null,t,a,c),f=m=x=null),A=!0,v=!0,i=!0):v?(v=!1,i=!0):g(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,w=o;else{if(t=e.line,a=e.lineStart,c=e.position,!xe(e,n,Sr,!1,!0))break;if(e.line===l){for(w=e.input.charCodeAt(e.position);pe(w);)w=e.input.charCodeAt(++e.position);if(w===58)w=e.input.charCodeAt(++e.position),q(w)||g(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(me(e,d,u,f,m,null,t,a,c),f=m=x=null),A=!0,v=!1,i=!1,f=e.tag,m=e.result;else if(A)g(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=s,e.anchor=h,!0}else if(A)g(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=s,e.anchor=h,!0}if((e.line===l||e.lineIndent>r)&&(v&&(t=e.line,a=e.lineStart,c=e.position),xe(e,r,$e,!0,i)&&(v?m=e.result:x=e.result),v||(me(e,d,u,f,m,x,t,a,c),f=m=x=null),D(e,!0,-1),w=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>r)&&w!==0)g(e,"bad indentation of a mapping entry");else if(e.lineIndent<r)break}return v&&me(e,d,u,f,m,null,t,a,c),A&&(e.tag=s,e.anchor=h,e.kind="mapping",e.result=d),A}function Bi(e){var r,n=!1,o=!1,i,l,t;if(t=e.input.charCodeAt(e.position),t!==33)return!1;if(e.tag!==null&&g(e,"duplication of a tag property"),t=e.input.charCodeAt(++e.position),t===60?(n=!0,t=e.input.charCodeAt(++e.position)):t===33?(o=!0,i="!!",t=e.input.charCodeAt(++e.position)):i="!",r=e.position,n){do t=e.input.charCodeAt(++e.position);while(t!==0&&t!==62);e.position<e.length?(l=e.input.slice(r,e.position),t=e.input.charCodeAt(++e.position)):g(e,"unexpected end of the stream within a verbatim tag")}else{for(;t!==0&&!q(t);)t===33&&(o?g(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(r-1,e.position+1),Or.test(i)||g(e,"named tag handle cannot contain such characters"),o=!0,r=e.position+1)),t=e.input.charCodeAt(++e.position);l=e.input.slice(r,e.position),Oi.test(l)&&g(e,"tag suffix cannot contain flow indicator characters")}l&&!$r.test(l)&&g(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch{g(e,"tag name is malformed: "+l)}return n?e.tag=l:le.call(e.tagMap,i)?e.tag=e.tagMap[i]+l:i==="!"?e.tag="!"+l:i==="!!"?e.tag="tag:yaml.org,2002:"+l:g(e,'undeclared tag handle "'+i+'"'),!0}function Hi(e){var r,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&g(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),r=e.position;n!==0&&!q(n)&&!de(n);)n=e.input.charCodeAt(++e.position);return e.position===r&&g(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(r,e.position),!0}function Ui(e){var r,n,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!q(o)&&!de(o);)o=e.input.charCodeAt(++e.position);return e.position===r&&g(e,"name of an alias node must contain at least one character"),n=e.input.slice(r,e.position),le.call(e.anchorMap,n)||g(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],D(e,!0,-1),!0}function xe(e,r,n,o,i){var l,t,a,c=1,s=!1,h=!1,d,u,f,m,x,v;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=t=a=$e===n||Tr===n,o&&D(e,!0,-1)&&(s=!0,e.lineIndent>r?c=1:e.lineIndent===r?c=0:e.lineIndent<r&&(c=-1)),c===1)for(;Bi(e)||Hi(e);)D(e,!0,-1)?(s=!0,a=l,e.lineIndent>r?c=1:e.lineIndent===r?c=0:e.lineIndent<r&&(c=-1)):a=!1;if(a&&(a=s||i),(c===1||$e===n)&&(Oe===n||Sr===n?x=r:x=r+1,v=e.position-e.lineStart,c===1?a&&(Dr(e,v)||Yi(e,v,x))||Pi(e,x)?h=!0:(t&&Di(e,x)||ji(e,x)||Mi(e,x)?h=!0:Ui(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&g(e,"alias node should not have any properties")):Ni(e,x,Oe===n)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(h=a&&Dr(e,v))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&g(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),d=0,u=e.implicitTypes.length;d<u;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(le.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,f=e.typeMap.multi[e.kind||"fallback"],d=0,u=f.length;d<u;d+=1)if(e.tag.slice(0,f[d].tag.length)===f[d].tag){m=f[d];break}m||g(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&g(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):g(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}function Gi(e){var r=e.position,n,o,i,l=!1,t;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(t=e.input.charCodeAt(e.position))!==0&&(D(e,!0,-1),t=e.input.charCodeAt(e.position),!(e.lineIndent>0||t!==37));){for(l=!0,t=e.input.charCodeAt(++e.position),n=e.position;t!==0&&!q(t);)t=e.input.charCodeAt(++e.position);for(o=e.input.slice(n,e.position),i=[],o.length<1&&g(e,"directive name must not be less than one character in length");t!==0;){for(;pe(t);)t=e.input.charCodeAt(++e.position);if(t===35){do t=e.input.charCodeAt(++e.position);while(t!==0&&!oe(t));break}if(oe(t))break;for(n=e.position;t!==0&&!q(t);)t=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}t!==0&&Be(e),le.call(Mr,o)?Mr[o](e,o,i):Fe(e,'unknown document directive "'+o+'"')}if(D(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,D(e,!0,-1)):l&&g(e,"directives end mark is expected"),xe(e,e.lineIndent-1,$e,!1,!0),D(e,!0,-1),e.checkLineBreaks&&ki.test(e.input.slice(r,e.position))&&Fe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Re(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,D(e,!0,-1));return}if(e.position<e.length-1)g(e,"end of the stream or a document separator is expected");else return}function Yr(e,r){e=String(e),r=r||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
35
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Li(e,r),o=e.indexOf("\0");for(o!==-1&&(n.position=o,g(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)Gi(n);return n.documents}function Wi(e,r,n){r!==null&&typeof r=="object"&&typeof n>"u"&&(n=r,r=null);var o=Yr(e,n);if(typeof r!="function")return o;for(var i=0,l=o.length;i<l;i+=1)r(o[i])}function Ki(e,r){var n=Yr(e,r);if(n.length!==0){if(n.length===1)return n[0];throw new W("expected a single document in the stream, but found more")}}var Xi=Wi,qi=Ki,Br={loadAll:Xi,load:qi},Hr=Object.prototype.toString,Ur=Object.prototype.hasOwnProperty,Ue=65279,zi=9,Ce=10,Vi=13,Zi=32,Qi=33,Ji=34,Ge=35,eo=37,ro=38,no=39,io=42,Gr=44,oo=45,Ie=58,to=61,lo=62,ao=63,co=64,Wr=91,Kr=93,fo=96,Xr=123,so=124,qr=125,G={};G[0]="\\0",G[7]="\\a",G[8]="\\b",G[9]="\\t",G[10]="\\n",G[11]="\\v",G[12]="\\f",G[13]="\\r",G[27]="\\e",G[34]='\\"',G[92]="\\\\",G[133]="\\N",G[160]="\\_",G[8232]="\\L",G[8233]="\\P";var uo=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],po=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ho(e,r){var n,o,i,l,t,a,c;if(r===null)return{};for(n={},o=Object.keys(r),i=0,l=o.length;i<l;i+=1)t=o[i],a=String(r[t]),t.slice(0,2)==="!!"&&(t="tag:yaml.org,2002:"+t.slice(2)),c=e.compiledTypeMap.fallback[t],c&&Ur.call(c.styleAliases,a)&&(a=c.styleAliases[a]),n[t]=a;return n}function mo(e){var r,n,o;if(r=e.toString(16).toUpperCase(),e<=255)n="x",o=2;else if(e<=65535)n="u",o=4;else if(e<=4294967295)n="U",o=8;else throw new W("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+Y.repeat("0",o-r.length)+r}var xo=1,_e=2;function go(e){this.schema=e.schema||De,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Y.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ho(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?_e:xo,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function zr(e,r){for(var n=Y.repeat(" ",r),o=0,i=-1,l="",t,a=e.length;o<a;)i=e.indexOf(`
36
+ `,o),i===-1?(t=e.slice(o),o=a):(t=e.slice(o,i+1),o=i+1),t.length&&t!==`
37
+ `&&(l+=n),l+=t;return l}function We(e,r){return`
38
+ `+Y.repeat(" ",e.indent*r)}function yo(e,r){var n,o,i;for(n=0,o=e.implicitTypes.length;n<o;n+=1)if(i=e.implicitTypes[n],i.resolve(r))return!0;return!1}function Le(e){return e===Zi||e===zi}function we(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ue||65536<=e&&e<=1114111}function Vr(e){return we(e)&&e!==Ue&&e!==Vi&&e!==Ce}function Zr(e,r,n){var o=Vr(e),i=o&&!Le(e);return(n?o:o&&e!==Gr&&e!==Wr&&e!==Kr&&e!==Xr&&e!==qr)&&e!==Ge&&!(r===Ie&&!i)||Vr(r)&&!Le(r)&&e===Ge||r===Ie&&i}function vo(e){return we(e)&&e!==Ue&&!Le(e)&&e!==oo&&e!==ao&&e!==Ie&&e!==Gr&&e!==Wr&&e!==Kr&&e!==Xr&&e!==qr&&e!==Ge&&e!==ro&&e!==io&&e!==Qi&&e!==so&&e!==to&&e!==lo&&e!==no&&e!==Ji&&e!==eo&&e!==co&&e!==fo}function bo(e){return!Le(e)&&e!==Ie}function Ee(e,r){var n=e.charCodeAt(r),o;return n>=55296&&n<=56319&&r+1<e.length&&(o=e.charCodeAt(r+1),o>=56320&&o<=57343)?(n-55296)*1024+o-56320+65536:n}function Qr(e){var r=/^\n* /;return r.test(e)}var Jr=1,Ke=2,en=3,rn=4,ge=5;function Ao(e,r,n,o,i,l,t,a){var c,s=0,h=null,d=!1,u=!1,f=o!==-1,m=-1,x=vo(Ee(e,0))&&bo(Ee(e,e.length-1));if(r||t)for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=Ee(e,c),!we(s))return ge;x=x&&Zr(s,h,a),h=s}else{for(c=0;c<e.length;s>=65536?c+=2:c++){if(s=Ee(e,c),s===Ce)d=!0,f&&(u=u||c-m-1>o&&e[m+1]!==" ",m=c);else if(!we(s))return ge;x=x&&Zr(s,h,a),h=s}u=u||f&&c-m-1>o&&e[m+1]!==" "}return!d&&!u?x&&!t&&!i(e)?Jr:l===_e?ge:Ke:n>9&&Qr(e)?ge:t?l===_e?ge:Ke:u?rn:en}function Co(e,r,n,o,i){e.dump=(function(){if(r.length===0)return e.quotingType===_e?'""':"''";if(!e.noCompatMode&&(uo.indexOf(r)!==-1||po.test(r)))return e.quotingType===_e?'"'+r+'"':"'"+r+"'";var l=e.indent*Math.max(1,n),t=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),a=o||e.flowLevel>-1&&n>=e.flowLevel;function c(s){return yo(e,s)}switch(Ao(r,a,e.indent,t,c,e.quotingType,e.forceQuotes&&!o,i)){case Jr:return r;case Ke:return"'"+r.replace(/'/g,"''")+"'";case en:return"|"+nn(r,e.indent)+on(zr(r,l));case rn:return">"+nn(r,e.indent)+on(zr(_o(r,t),l));case ge:return'"'+wo(r)+'"';default:throw new W("impossible error: invalid scalar style")}})()}function nn(e,r){var n=Qr(e)?String(r):"",o=e[e.length-1]===`
39
+ `,i=o&&(e[e.length-2]===`
40
+ `||e===`
41
+ `),l=i?"+":o?"":"-";return n+l+`
42
+ `}function on(e){return e[e.length-1]===`
43
+ `?e.slice(0,-1):e}function _o(e,r){for(var n=/(\n+)([^\n]*)/g,o=(function(){var s=e.indexOf(`
44
+ `);return s=s!==-1?s:e.length,n.lastIndex=s,tn(e.slice(0,s),r)})(),i=e[0]===`
45
+ `||e[0]===" ",l,t;t=n.exec(e);){var a=t[1],c=t[2];l=c[0]===" ",o+=a+(!i&&!l&&c!==""?`
46
+ `:"")+tn(c,r),i=l}return o}function tn(e,r){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,o,i=0,l,t=0,a=0,c="";o=n.exec(e);)a=o.index,a-i>r&&(l=t>i?t:a,c+=`
47
+ `+e.slice(i,l),i=l+1),t=a;return c+=`
48
+ `,e.length-i>r&&t>i?c+=e.slice(i,t)+`
49
+ `+e.slice(t+1):c+=e.slice(i),c.slice(1)}function wo(e){for(var r="",n=0,o,i=0;i<e.length;n>=65536?i+=2:i++)n=Ee(e,i),o=G[n],!o&&we(n)?(r+=e[i],n>=65536&&(r+=e[i+1])):r+=o||mo(n);return r}function Eo(e,r,n){var o="",i=e.tag,l,t,a;for(l=0,t=n.length;l<t;l+=1)a=n[l],e.replacer&&(a=e.replacer.call(n,String(l),a)),(te(e,r,a,!1,!1)||typeof a>"u"&&te(e,r,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=i,e.dump="["+o+"]"}function ln(e,r,n,o){var i="",l=e.tag,t,a,c;for(t=0,a=n.length;t<a;t+=1)c=n[t],e.replacer&&(c=e.replacer.call(n,String(t),c)),(te(e,r+1,c,!0,!0,!1,!0)||typeof c>"u"&&te(e,r+1,null,!0,!0,!1,!0))&&((!o||i!=="")&&(i+=We(e,r)),e.dump&&Ce===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=l,e.dump=i||"[]"}function So(e,r,n){var o="",i=e.tag,l=Object.keys(n),t,a,c,s,h;for(t=0,a=l.length;t<a;t+=1)h="",o!==""&&(h+=", "),e.condenseFlow&&(h+='"'),c=l[t],s=n[c],e.replacer&&(s=e.replacer.call(n,c,s)),te(e,r,c,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),te(e,r,s,!1,!1)&&(h+=e.dump,o+=h));e.tag=i,e.dump="{"+o+"}"}function To(e,r,n,o){var i="",l=e.tag,t=Object.keys(n),a,c,s,h,d,u;if(e.sortKeys===!0)t.sort();else if(typeof e.sortKeys=="function")t.sort(e.sortKeys);else if(e.sortKeys)throw new W("sortKeys must be a boolean or a function");for(a=0,c=t.length;a<c;a+=1)u="",(!o||i!=="")&&(u+=We(e,r)),s=t[a],h=n[s],e.replacer&&(h=e.replacer.call(n,s,h)),te(e,r+1,s,!0,!0,!0)&&(d=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,d&&(e.dump&&Ce===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,d&&(u+=We(e,r)),te(e,r+1,h,!0,d)&&(e.dump&&Ce===e.dump.charCodeAt(0)?u+=":":u+=": ",u+=e.dump,i+=u));e.tag=l,e.dump=i||"{}"}function an(e,r,n){var o,i,l,t,a,c;for(i=n?e.explicitTypes:e.implicitTypes,l=0,t=i.length;l<t;l+=1)if(a=i[l],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof r=="object"&&r instanceof a.instanceOf)&&(!a.predicate||a.predicate(r))){if(n?a.multi&&a.representName?e.tag=a.representName(r):e.tag=a.tag:e.tag="?",a.represent){if(c=e.styleMap[a.tag]||a.defaultStyle,Hr.call(a.represent)==="[object Function]")o=a.represent(r,c);else if(Ur.call(a.represent,c))o=a.represent[c](r,c);else throw new W("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');e.dump=o}return!0}return!1}function te(e,r,n,o,i,l,t){e.tag=null,e.dump=n,an(e,n,!1)||an(e,n,!0);var a=Hr.call(e.dump),c=o,s;o&&(o=e.flowLevel<0||e.flowLevel>r);var h=a==="[object Object]"||a==="[object Array]",d,u;if(h&&(d=e.duplicates.indexOf(n),u=d!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&r>0)&&(i=!1),u&&e.usedDuplicates[d])e.dump="*ref_"+d;else{if(h&&u&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),a==="[object Object]")o&&Object.keys(e.dump).length!==0?(To(e,r,e.dump,i),u&&(e.dump="&ref_"+d+e.dump)):(So(e,r,e.dump),u&&(e.dump="&ref_"+d+" "+e.dump));else if(a==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!t&&r>0?ln(e,r-1,e.dump,i):ln(e,r,e.dump,i),u&&(e.dump="&ref_"+d+e.dump)):(Eo(e,r,e.dump),u&&(e.dump="&ref_"+d+" "+e.dump));else if(a==="[object String]")e.tag!=="?"&&Co(e,e.dump,r,l,c);else{if(a==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new W("unacceptable kind of an object to dump "+a)}e.tag!==null&&e.tag!=="?"&&(s=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?s="!"+s:s.slice(0,18)==="tag:yaml.org,2002:"?s="!!"+s.slice(18):s="!<"+s+">",e.dump=s+" "+e.dump)}return!0}function ko(e,r){var n=[],o=[],i,l;for(Xe(e,n,o),i=0,l=o.length;i<l;i+=1)r.duplicates.push(n[o[i]]);r.usedDuplicates=new Array(l)}function Xe(e,r,n){var o,i,l;if(e!==null&&typeof e=="object")if(i=r.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(r.push(e),Array.isArray(e))for(i=0,l=e.length;i<l;i+=1)Xe(e[i],r,n);else for(o=Object.keys(e),i=0,l=o.length;i<l;i+=1)Xe(e[o[i]],r,n)}function Oo(e,r){r=r||{};var n=new go(r);n.noRefs||ko(e,n);var o=e;return n.replacer&&(o=n.replacer.call({"":o},"",o)),te(n,0,o,!0,!0)?n.dump+`
50
+ `:""}var $o=Oo,Fo={dump:$o};function qe(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}var Ro=H,Io=ar,Lo=ur,No=xr,jo=gr,Mo=De,Po=Br.load,Do=Br.loadAll,Yo=Fo.dump,Bo=W,Ho={binary:Cr,float:mr,map:sr,null:pr,pairs:wr,set:Er,timestamp:br,bool:dr,int:hr,merge:Ar,omap:_r,seq:fr,str:cr},Uo=qe("safeLoad","load"),Go=qe("safeLoadAll","loadAll"),Wo=qe("safeDump","dump"),Ko={Type:Ro,Schema:Io,FAILSAFE_SCHEMA:Lo,JSON_SCHEMA:No,CORE_SCHEMA:jo,DEFAULT_SCHEMA:Mo,load:Po,loadAll:Do,dump:Yo,YAMLException:Bo,types:Ho,safeLoad:Uo,safeLoadAll:Go,safeDump:Wo};function Xo(e){const r=e.match(/^(\d+)x(\d+)x(\d+)$/);return r?{width:parseInt(r[1],10),depth:parseInt(r[2],10),height:parseInt(r[3],10)}:null}function cn(e){const r=e.match(/^(\d+)x(\d+)$/);return r?{width:parseInt(r[1],10),height:parseInt(r[2],10)}:null}function qo(e){const r=e.match(/^(-?\d+),(-?\d+)$/);return r?{x:parseInt(r[1],10),y:parseInt(r[2],10)}:null}function zo(e){const r=e.match(/^(.+?)\s*@\s*(\d+)$/);return r?{name:r[1].trim(),elevation:parseInt(r[2],10)}:null}function Vo(e,r,n){let o={};const i=e.match(/\{([^}]+)\}\s*$/);if(i){const f=i[1].split(/\s+/);for(const m of f){const[x,v]=m.split("=");if(x&&v){const A=parseFloat(v);o[x]=isNaN(A)?v:A}}e=e.replace(/\{[^}]+\}\s*$/,"").trim()}const l=e.trim().split(/\s+/);if(l.length<4)return null;const t=l[0],a=l[1],c=l[2],s=l[3],h=qo(c),d=Xo(s);if(!h||!d)return null;const u=n[a]||a;return{tier:r,label:t,color:u,x:h.x,y:h.y,width:d.width,depth:d.depth,height:d.height,...o}}function Zo(e){const r=Ko.load(e);let n={width:1100,height:700};if(typeof r.canvas=="string"){const u=cn(r.canvas);u&&(n=u)}else r.canvas&&typeof r.canvas=="object"&&(n=r.canvas);let o={width:400,depth:280};if(typeof r.floor=="string"){const u=cn(r.floor);u&&(o={width:u.width,depth:u.height})}else r.floor&&typeof r.floor=="object"&&(o=r.floor);let i={x:n.width/2,y:n.height-80};r.origin&&typeof r.origin=="object"&&(i=r.origin);const l={};if(r.colors&&typeof r.colors=="object")for(const[u,f]of Object.entries(r.colors))l[u]=f;const t=[],a={dark:["#0f172a","#1e293b","#334155","#475569"],light:["#f1f5f9","#e0f2fe","#dbeafe","#ede9fe"]},c={dark:["#334155","#475569","#64748b","#94a3b8"],light:["#94a3b8","#7dd3fc","#93c5fd","#c4b5fd"]},s=r.theme||"dark";Array.isArray(r.tiers)&&r.tiers.forEach((u,f)=>{if(typeof u=="string"){const m=zo(u);m&&t.push({name:m.name,elevation:m.elevation,floorColor:a[s][f]||a[s][0],floorOpacity:f===0?.95:.7-f*.1,borderColor:c[s][f]||c[s][0]})}else if(u&&typeof u=="object"){const m=u;t.push({name:m.name||`Tier ${f}`,elevation:m.elevation||f*150,floorColor:m.floorColor||a[s][f],floorOpacity:m.floorOpacity??(f===0?.95:.7-f*.1),borderColor:m.borderColor||c[s][f]})}});const h=[];if(r.nodes&&typeof r.nodes=="object"&&!Array.isArray(r.nodes)){const u=r.nodes;for(const[f,m]of Object.entries(u)){const x=parseInt(f,10);if(!(isNaN(x)||!Array.isArray(m))){for(const v of m)if(typeof v=="string"){const A=Vo(v,x,l);A&&h.push(A)}else if(v&&typeof v=="object"){const A=v;h.push({tier:x,label:A.label||"",color:l[A.color]||A.color||"slate",x:A.x||0,y:A.y||0,width:A.width||100,depth:A.depth||80,height:A.height||40,opacity:A.opacity,blur:A.blur,translucent:A.translucent})}}}}const d=[];if(Array.isArray(r.pillars)){for(const u of r.pillars)if(typeof u=="string"){const f=u.match(/^(-?\d+),(-?\d+)\s+(\d+)->(\d+)$/);f&&d.push({x:parseInt(f[1],10),y:parseInt(f[2],10),fromTier:parseInt(f[3],10),toTier:parseInt(f[4],10)})}else if(u&&typeof u=="object"){const f=u;d.push({x:f.x||0,y:f.y||0,fromTier:f.fromTier||0,toTier:f.toTier||1})}}return{title:r.title||"Untitled",description:r.description||"",theme:s,canvas:n,origin:i,cornerRadius:r.corner??r.cornerRadius??14,tiers:t,floorSize:o,nodes:h,pillars:d.length>0?d:void 0}}function Qo(e){const r=[];r.push(`title: ${e.title}`),e.description&&r.push(`description: ${e.description}`),r.push(`theme: ${e.theme}`),r.push(`canvas: ${e.canvas.width}x${e.canvas.height}`),r.push(`floor: ${e.floorSize.width}x${e.floorSize.depth}`),e.cornerRadius&&r.push(`corner: ${e.cornerRadius}`),r.push("");const n={};e.nodes.forEach(i=>{n[i.color]=(n[i.color]||0)+1});const o=Object.entries(n).filter(([,i])=>i>=2).map(([i])=>i);return o.length>0&&(r.push("colors:"),o.forEach(i=>{const l=i.slice(0,3);r.push(` ${l}: &${l} ${i}`)}),r.push("")),r.push("tiers:"),e.tiers.forEach(i=>{r.push(` - ${i.name} @ ${i.elevation}`)}),r.push(""),r.push("nodes:"),e.tiers.forEach((i,l)=>{const t=e.nodes.filter(a=>a.tier===l);t.length!==0&&(r.push(` ${l}: # ${i.name}`),t.forEach(a=>{let c=a.color;o.includes(a.color)&&(c=`*${a.color.slice(0,3)}`);const s=[];a.opacity!==void 0&&s.push(`opacity=${a.opacity}`),a.blur!==void 0&&s.push(`blur=${a.blur}`),a.translucent&&s.push("translucent=true");const h=s.length>0?` { ${s.join(" ")} }`:"",d=`${a.width}x${a.depth}x${a.height}`,u=`${a.x},${a.y}`,f=a.label.padEnd(12),m=c.padEnd(8);r.push(` - ${f} ${m} ${u.padEnd(8)} ${d}${h}`)}))}),e.pillars&&e.pillars.length>0&&(r.push(""),r.push("pillars:"),e.pillars.forEach(i=>{r.push(` - ${i.x},${i.y} ${i.fromTier}->${i.toTier}`)})),r.join(`
51
+ `)}X.ArcDiagram=Cn,X.configToYaml=Qo,X.getColorShading=hn,X.isoBox=ue,X.isoToScreen=b,X.parseYamlConfig=Zo,X.renderToElement=En,X.renderToString=ir,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})}));