5343 lines
4.8 MiB
Plaintext
5343 lines
4.8 MiB
Plaintext
var UserComponent=function(N,Rn){"use strict";var Dqe=Object.defineProperty,$xr=Object.defineProperties;var Mxr=Object.getOwnPropertyDescriptors;var OR=Object.getOwnPropertySymbols;var Fqe=Object.prototype.hasOwnProperty,Bqe=Object.prototype.propertyIsEnumerable;var ph=Math.pow,Kre=(N,Rn,si)=>Rn in N?Dqe(N,Rn,{enumerable:!0,configurable:!0,writable:!0,value:si}):N[Rn]=si,X=(N,Rn)=>{for(var si in Rn||(Rn={}))Fqe.call(Rn,si)&&Kre(N,si,Rn[si]);if(OR)for(var si of OR(Rn))Bqe.call(Rn,si)&&Kre(N,si,Rn[si]);return N},Ne=(N,Rn)=>$xr(N,Mxr(Rn)),l=(N,Rn)=>Dqe(N,"name",{value:Rn,configurable:!0});var Xt=(N,Rn)=>{var si={};for(var G in N)Fqe.call(N,G)&&Rn.indexOf(G)<0&&(si[G]=N[G]);if(N!=null&&OR)for(var G of OR(N))Rn.indexOf(G)<0&&Bqe.call(N,G)&&(si[G]=N[G]);return si};var Ln=(N,Rn,si)=>Kre(N,typeof Rn!="symbol"?Rn+"":Rn,si);var nt=(N,Rn,si)=>new Promise((G,Nl)=>{var Pd=gh=>{try{f0(si.next(gh))}catch(vg){Nl(vg)}},yg=gh=>{try{f0(si.throw(gh))}catch(vg){Nl(vg)}},f0=gh=>gh.done?G(gh.value):Promise.resolve(gh.value).then(Pd,yg);f0((si=si.apply(N,Rn)).next())});var bC,cg,xC,wC,_y,TC,EC,CC,SC,_C,kC,AC,NC,IC,ky,Ay,Ny,Iy,Ly,$y,My,Py,Ry,Oy,Dy,Fy,By,LC,zy,$C,ug,MC,PC,hg,dg,RC,OC,DC,FC,fg,BC,zC,Hy,Wy,Vy,Gy,qy,Yy,Uy,_l,jy,Ky,Xy,Zy,Qy,Jy,ev,tv,rv,nv,av,iv,sv,ov,lv,cv,uv,hv,dv,fv,pv,gv,mv,yv,vv,bv,xv,wv,Tv,Ev,Cv,Sv,_v,kv,Av,Nv,Iv,Lv,$v,Mv,Pv,Rv,Ov,Dv,Fv,Bv,zv,Hv,Wv,Vv,Gv,qv,Yv,pg,Uv,jv,Kv,Xv,Zv,Qv,Jv,e2,t2,r2,n2,a2,gg,i2,s2,o2,l2,c2,u2,h2,d2,f2,p2,g2,h0,m2,y2,v2,b2,x2,w2,T2,E2,C2,S2,_2,k2,A2,N2,I2,L2,$2,M2,P2,R2,O2,D2,F2,B2,z2,H2,W2,V2,G2,q2,Y2,U2,j2,K2,X2,Z2,Q2,J2,eb,tb,rb,nb,ab,ib,sb,ob,lb,cb,ub,hb,db,HC,fb,pb,gb,mb,yb,vb,bb,xb,wb,Tb,Eb,Cb,Sb,_b,kb,Ab,Nb,Ib,Lb,$b,Mb,Pb,Rb,Ob,Db,Fb,Bb,zb,Hb,Wb,Vb,Gb,qb,Yb,Ub,jb,Kb,Xb,Zb,Qb,Jb,d0,mg,ex,tx,rx,$d,nx,ax,ix,sx,ox,lx,cx;function si(t){var e=Object.create(null);return t&&Object.keys(t).forEach(function(r){if(r!=="default"){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:l(function(){return t[r]},"get")})}}),e.default=t,Object.freeze(e)}l(si,"_interopNamespaceDefault");var G=si(N),Nl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Pd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}l(Pd,"getDefaultExportFromCjs$1");var yg,f0=Rn;if("production"==="production")yg=f0.createRoot,f0.hydrateRoot;else{var gh=f0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;yg=l(function(t,e){gh.usingClientEntryPoint=!0;try{return f0.createRoot(t,e)}finally{gh.usingClientEntryPoint=!1}},"createRoot")}var vg={exports:{}},VC={};var Xre;function zqe(){if(Xre)return VC;Xre=1;var t=N,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function s(o,u,h){var d,f={},p=null,g=null;h!==void 0&&(p=""+h),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(g=u.ref);for(d in u)n.call(u,d)&&!i.hasOwnProperty(d)&&(f[d]=u[d]);if(o&&o.defaultProps)for(d in u=o.defaultProps,u)f[d]===void 0&&(f[d]=u[d]);return{$$typeof:e,type:o,key:p,ref:g,props:f,_owner:a.current}}return l(s,"q"),VC.Fragment=r,VC.jsx=s,VC.jsxs=s,VC}l(zqe,"requireReactJsxRuntime_production_min");var GC={};var Zre;function Hqe(){return Zre||(Zre=1,"production"!=="production"&&function(){var t=N,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),m=Symbol.iterator,y="@@iterator";function v(ie){if(ie===null||typeof ie!="object")return null;var be=m&&ie[m]||ie[y];return typeof be=="function"?be:null}l(v,"getIteratorFn");var b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(ie){{for(var be=arguments.length,$e=new Array(be>1?be-1:0),le=1;le<be;le++)$e[le-1]=arguments[le];x("error",ie,$e)}}l(w,"error");function x(ie,be,$e){{var le=b.ReactDebugCurrentFrame,ke=le.getStackAddendum();ke!==""&&(be+="%s",$e=$e.concat([ke]));var je=$e.map(function(ut){return String(ut)});je.unshift("Warning: "+be),Function.prototype.apply.call(console[ie],console,je)}}l(x,"printWarning");var T=!1,C=!1,S=!1,E=!1,k=!1,A;A=Symbol.for("react.module.reference");function I(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===i||k||ie===a||ie===h||ie===d||E||ie===g||T||C||S||typeof ie=="object"&&ie!==null&&(ie.$$typeof===p||ie.$$typeof===f||ie.$$typeof===s||ie.$$typeof===o||ie.$$typeof===u||ie.$$typeof===A||ie.getModuleId!==void 0))}l(I,"isValidElementType");function L(ie,be,$e){var le=ie.displayName;if(le)return le;var ke=be.displayName||be.name||"";return ke!==""?$e+"("+ke+")":$e}l(L,"getWrappedName");function R(ie){return ie.displayName||"Context"}l(R,"getContextName");function O(ie){if(ie==null)return null;if(typeof ie.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof ie=="function")return ie.displayName||ie.name||null;if(typeof ie=="string")return ie;switch(ie){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case a:return"StrictMode";case h:return"Suspense";case d:return"SuspenseList"}if(typeof ie=="object")switch(ie.$$typeof){case o:var be=ie;return R(be)+".Consumer";case s:var $e=ie;return R($e._context)+".Provider";case u:return L(ie,ie.render,"ForwardRef");case f:var le=ie.displayName||null;return le!==null?le:O(ie.type)||"Memo";case p:{var ke=ie,je=ke._payload,ut=ke._init;try{return O(ut(je))}catch(Qe){return null}}}return null}l(O,"getComponentNameFromType");var M=Object.assign,P=0,z,D,B,W,U,j,V;function Y(){}l(Y,"disabledLog"),Y.__reactDisabledLog=!0;function H(){{if(P===0){z=console.log,D=console.info,B=console.warn,W=console.error,U=console.group,j=console.groupCollapsed,V=console.groupEnd;var ie={configurable:!0,enumerable:!0,value:Y,writable:!0};Object.defineProperties(console,{info:ie,log:ie,warn:ie,error:ie,group:ie,groupCollapsed:ie,groupEnd:ie})}P++}}l(H,"disableLogs");function q(){{if(P--,P===0){var ie={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},ie,{value:z}),info:M({},ie,{value:D}),warn:M({},ie,{value:B}),error:M({},ie,{value:W}),group:M({},ie,{value:U}),groupCollapsed:M({},ie,{value:j}),groupEnd:M({},ie,{value:V})})}P<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}l(q,"reenableLogs");var Z=b.ReactCurrentDispatcher,K;function re(ie,be,$e){{if(K===void 0)try{throw Error()}catch(ke){var le=ke.stack.trim().match(/\n( *(at )?)/);K=le&&le[1]||""}return`
|
||
`+K+ie}}l(re,"describeBuiltInComponentFrame");var Q=!1,te;{var ee=typeof WeakMap=="function"?WeakMap:Map;te=new ee}function J(ie,be){if(!ie||Q)return"";{var $e=te.get(ie);if($e!==void 0)return $e}var le;Q=!0;var ke=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var je;je=Z.current,Z.current=null,H();try{if(be){var ut=l(function(){throw Error()},"Fake");if(Object.defineProperty(ut.prototype,"props",{set:l(function(){throw Error()},"set")}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ut,[])}catch(Pe){le=Pe}Reflect.construct(ie,[],ut)}else{try{ut.call()}catch(Pe){le=Pe}ie.call(ut.prototype)}}else{try{throw Error()}catch(Pe){le=Pe}ie()}}catch(Pe){if(Pe&&le&&typeof Pe.stack=="string"){for(var Qe=Pe.stack.split(`
|
||
`),Ze=le.stack.split(`
|
||
`),st=Qe.length-1,Ct=Ze.length-1;st>=1&&Ct>=0&&Qe[st]!==Ze[Ct];)Ct--;for(;st>=1&&Ct>=0;st--,Ct--)if(Qe[st]!==Ze[Ct]){if(st!==1||Ct!==1)do if(st--,Ct--,Ct<0||Qe[st]!==Ze[Ct]){var Mt=`
|
||
`+Qe[st].replace(" at new "," at ");return ie.displayName&&Mt.includes("<anonymous>")&&(Mt=Mt.replace("<anonymous>",ie.displayName)),typeof ie=="function"&&te.set(ie,Mt),Mt}while(st>=1&&Ct>=0);break}}}finally{Q=!1,Z.current=je,q(),Error.prepareStackTrace=ke}var Bt=ie?ie.displayName||ie.name:"",Pt=Bt?re(Bt):"";return typeof ie=="function"&&te.set(ie,Pt),Pt}l(J,"describeNativeComponentFrame");function ae(ie,be,$e){return J(ie,!1)}l(ae,"describeFunctionComponentFrame");function se(ie){var be=ie.prototype;return!!(be&&be.isReactComponent)}l(se,"shouldConstruct");function fe(ie,be,$e){if(ie==null)return"";if(typeof ie=="function")return J(ie,se(ie));if(typeof ie=="string")return re(ie);switch(ie){case h:return re("Suspense");case d:return re("SuspenseList")}if(typeof ie=="object")switch(ie.$$typeof){case u:return ae(ie.render);case f:return fe(ie.type,be,$e);case p:{var le=ie,ke=le._payload,je=le._init;try{return fe(je(ke),be,$e)}catch(ut){}}}return""}l(fe,"describeUnknownElementTypeFrameInDEV");var ve=Object.prototype.hasOwnProperty,de={},Ee=b.ReactDebugCurrentFrame;function Ce(ie){if(ie){var be=ie._owner,$e=fe(ie.type,ie._source,be?be.type:null);Ee.setExtraStackFrame($e)}else Ee.setExtraStackFrame(null)}l(Ce,"setCurrentlyValidatingElement");function De(ie,be,$e,le,ke){{var je=Function.call.bind(ve);for(var ut in ie)if(je(ie,ut)){var Qe=void 0;try{if(typeof ie[ut]!="function"){var Ze=Error((le||"React class")+": "+$e+" type `"+ut+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof ie[ut]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ze.name="Invariant Violation",Ze}Qe=ie[ut](be,ut,le,$e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(st){Qe=st}Qe&&!(Qe instanceof Error)&&(Ce(ke),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",le||"React class",$e,ut,typeof Qe),Ce(null)),Qe instanceof Error&&!(Qe.message in de)&&(de[Qe.message]=!0,Ce(ke),w("Failed %s type: %s",$e,Qe.message),Ce(null))}}}l(De,"checkPropTypes");var ce=Array.isArray;function Ie(ie){return ce(ie)}l(Ie,"isArray");function ye(ie){{var be=typeof Symbol=="function"&&Symbol.toStringTag,$e=be&&ie[Symbol.toStringTag]||ie.constructor.name||"Object";return $e}}l(ye,"typeName");function pe(ie){try{return Ae(ie),!1}catch(be){return!0}}l(pe,"willCoercionThrow");function Ae(ie){return""+ie}l(Ae,"testStringCoercion");function Ve(ie){if(pe(ie))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ye(ie)),Ae(ie)}l(Ve,"checkKeyStringCoercion");var ze=b.ReactCurrentOwner,We={key:!0,ref:!0,__self:!0,__source:!0},me,Se;function ne(ie){if(ve.call(ie,"ref")){var be=Object.getOwnPropertyDescriptor(ie,"ref").get;if(be&&be.isReactWarning)return!1}return ie.ref!==void 0}l(ne,"hasValidRef");function xe(ie){if(ve.call(ie,"key")){var be=Object.getOwnPropertyDescriptor(ie,"key").get;if(be&&be.isReactWarning)return!1}return ie.key!==void 0}l(xe,"hasValidKey");function oe(ie,be){typeof ie.ref=="string"&&ze.current}l(oe,"warnIfStringRefCannotBeAutoConverted");function _e(ie,be){{var $e=l(function(){me||(me=!0,w("%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://reactjs.org/link/special-props)",be))},"warnAboutAccessingKey");$e.isReactWarning=!0,Object.defineProperty(ie,"key",{get:$e,configurable:!0})}}l(_e,"defineKeyPropWarningGetter");function ue(ie,be){{var $e=l(function(){Se||(Se=!0,w("%s: `ref` 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://reactjs.org/link/special-props)",be))},"warnAboutAccessingRef");$e.isReactWarning=!0,Object.defineProperty(ie,"ref",{get:$e,configurable:!0})}}l(ue,"defineRefPropWarningGetter");var tt=l(function(ie,be,$e,le,ke,je,ut){var Qe={$$typeof:e,type:ie,key:be,ref:$e,props:ut,_owner:je};return Qe._store={},Object.defineProperty(Qe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Qe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:le}),Object.defineProperty(Qe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ke}),Object.freeze&&(Object.freeze(Qe.props),Object.freeze(Qe)),Qe},"ReactElement");function Re(ie,be,$e,le,ke){{var je,ut={},Qe=null,Ze=null;$e!==void 0&&(Ve($e),Qe=""+$e),xe(be)&&(Ve(be.key),Qe=""+be.key),ne(be)&&(Ze=be.ref,oe(be,ke));for(je in be)ve.call(be,je)&&!We.hasOwnProperty(je)&&(ut[je]=be[je]);if(ie&&ie.defaultProps){var st=ie.defaultProps;for(je in st)ut[je]===void 0&&(ut[je]=st[je])}if(Qe||Ze){var Ct=typeof ie=="function"?ie.displayName||ie.name||"Unknown":ie;Qe&&_e(ut,Ct),Ze&&ue(ut,Ct)}return tt(ie,Qe,Ze,ke,le,ze.current,ut)}}l(Re,"jsxDEV");var et=b.ReactCurrentOwner,Xe=b.ReactDebugCurrentFrame;function ot(ie){if(ie){var be=ie._owner,$e=fe(ie.type,ie._source,be?be.type:null);Xe.setExtraStackFrame($e)}else Xe.setExtraStackFrame(null)}l(ot,"setCurrentlyValidatingElement$1");var Ge;Ge=!1;function ht(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}l(ht,"isValidElement");function Je(){{if(et.current){var ie=O(et.current.type);if(ie)return`
|
||
|
||
Check the render method of \``+ie+"`."}return""}}l(Je,"getDeclarationErrorAddendum");function St(ie){return""}l(St,"getSourceInfoErrorAddendum");var He={};function dt(ie){{var be=Je();if(!be){var $e=typeof ie=="string"?ie:ie.displayName||ie.name;$e&&(be=`
|
||
|
||
Check the top-level render call using <`+$e+">.")}return be}}l(dt,"getCurrentComponentErrorInfo");function Oe(ie,be){{if(!ie._store||ie._store.validated||ie.key!=null)return;ie._store.validated=!0;var $e=dt(be);if(He[$e])return;He[$e]=!0;var le="";ie&&ie._owner&&ie._owner!==et.current&&(le=" It was passed a child from "+O(ie._owner.type)+"."),ot(ie),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$e,le),ot(null)}}l(Oe,"validateExplicitKey");function vt(ie,be){{if(typeof ie!="object")return;if(Ie(ie))for(var $e=0;$e<ie.length;$e++){var le=ie[$e];ht(le)&&Oe(le,be)}else if(ht(ie))ie._store&&(ie._store.validated=!0);else if(ie){var ke=v(ie);if(typeof ke=="function"&&ke!==ie.entries)for(var je=ke.call(ie),ut;!(ut=je.next()).done;)ht(ut.value)&&Oe(ut.value,be)}}}l(vt,"validateChildKeys");function qe(ie){{var be=ie.type;if(be==null||typeof be=="string")return;var $e;if(typeof be=="function")$e=be.propTypes;else if(typeof be=="object"&&(be.$$typeof===u||be.$$typeof===f))$e=be.propTypes;else return;if($e){var le=O(be);De($e,ie.props,"prop",le,ie)}else if(be.PropTypes!==void 0&&!Ge){Ge=!0;var ke=O(be);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ke||"Unknown")}typeof be.getDefaultProps=="function"&&!be.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}l(qe,"validatePropTypes");function Me(ie){{for(var be=Object.keys(ie.props),$e=0;$e<be.length;$e++){var le=be[$e];if(le!=="children"&&le!=="key"){ot(ie),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",le),ot(null);break}}ie.ref!==null&&(ot(ie),w("Invalid attribute `ref` supplied to `React.Fragment`."),ot(null))}}l(Me,"validateFragmentProps");var lt={};function it(ie,be,$e,le,ke,je){{var ut=I(ie);if(!ut){var Qe="";(ie===void 0||typeof ie=="object"&&ie!==null&&Object.keys(ie).length===0)&&(Qe+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ze=St();Ze?Qe+=Ze:Qe+=Je();var st;ie===null?st="null":Ie(ie)?st="array":ie!==void 0&&ie.$$typeof===e?(st="<"+(O(ie.type)||"Unknown")+" />",Qe=" Did you accidentally export a JSX literal instead of a component?"):st=typeof ie,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",st,Qe)}var Ct=Re(ie,be,$e,ke,je);if(Ct==null)return Ct;if(ut){var Mt=be.children;if(Mt!==void 0)if(le)if(Ie(Mt)){for(var Bt=0;Bt<Mt.length;Bt++)vt(Mt[Bt],ie);Object.freeze&&Object.freeze(Mt)}else w("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 vt(Mt,ie)}if(ve.call(be,"key")){var Pt=O(ie),Pe=Object.keys(be).filter(function(Tt){return Tt!=="key"}),at=Pe.length>0?"{key: someKey, "+Pe.join(": ..., ")+": ...}":"{key: someKey}";if(!lt[Pt+at]){var yt=Pe.length>0?"{"+Pe.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
|
||
let props = %s;
|
||
<%s {...props} />
|
||
React keys must be passed directly to JSX without using spread:
|
||
let props = %s;
|
||
<%s key={someKey} {...props} />`,at,Pt,yt,Pt),lt[Pt+at]=!0}}return ie===n?Me(Ct):qe(Ct),Ct}}l(it,"jsxWithValidation");function Ue(ie,be,$e){return it(ie,be,$e,!0)}l(Ue,"jsxWithValidationStatic");function we(ie,be,$e){return it(ie,be,$e,!1)}l(we,"jsxWithValidationDynamic");var gt=we,ge=Ue;GC.Fragment=n,GC.jsx=gt,GC.jsxs=ge}()),GC}l(Hqe,"requireReactJsxRuntime_development"),"production"==="production"?vg.exports=zqe():vg.exports=Hqe();var bt=vg.exports,Wqe=Object.create,DR=Object.defineProperty,Vqe=Object.getOwnPropertyDescriptor,Qre=Object.getOwnPropertyNames,Gqe=Object.getPrototypeOf,qqe=Object.prototype.hasOwnProperty,Yqe=l((t,e,r)=>e in t?DR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp$5"),FR=l((t,e)=>l(function(){return e||(0,t[Qre(t)[0]])((e={exports:{}}).exports,e),e.exports},"__require"),"__commonJS$1"),Uqe=l((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Qre(e))!qqe.call(t,a)&&a!==r&&DR(t,a,{get:l(()=>e[a],"get"),enumerable:!(n=Vqe(e,a))||n.enumerable});return t},"__copyProps$1"),Jre=l((t,e,r)=>(r=t!=null?Wqe(Gqe(t)):{},Uqe(!t||!t.__esModule?DR(r,"default",{value:t,enumerable:!0}):r,t)),"__toESM$1"),qt=l((t,e,r)=>Yqe(t,typeof e!="symbol"?e+"":e,r),"__publicField"),jqe=FR({"../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.development.js"(t){(function(){var e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),u=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y=!1,v=!1,b=!1,w=!1,x=!1,T;T=Symbol.for("react.module.reference");function C(fe){return!!(typeof fe=="string"||typeof fe=="function"||fe===n||fe===i||x||fe===a||fe===d||fe===f||w||fe===m||y||v||b||typeof fe=="object"&&fe!==null&&(fe.$$typeof===g||fe.$$typeof===p||fe.$$typeof===s||fe.$$typeof===o||fe.$$typeof===h||fe.$$typeof===T||fe.getModuleId!==void 0))}l(C,"isValidElementType");function S(fe){if(typeof fe=="object"&&fe!==null){var ve=fe.$$typeof;switch(ve){case e:var de=fe.type;switch(de){case n:case i:case a:case d:case f:return de;default:var Ee=de&&de.$$typeof;switch(Ee){case u:case o:case h:case g:case p:case s:return Ee;default:return ve}}case r:return ve}}}l(S,"typeOf");var E=o,k=s,A=e,I=h,L=n,R=g,O=p,M=r,P=i,z=a,D=d,B=f,W=!1,U=!1;function j(fe){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}l(j,"isAsyncMode");function V(fe){return U||(U=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}l(V,"isConcurrentMode");function Y(fe){return S(fe)===o}l(Y,"isContextConsumer");function H(fe){return S(fe)===s}l(H,"isContextProvider");function q(fe){return typeof fe=="object"&&fe!==null&&fe.$$typeof===e}l(q,"isElement");function Z(fe){return S(fe)===h}l(Z,"isForwardRef");function K(fe){return S(fe)===n}l(K,"isFragment3");function re(fe){return S(fe)===g}l(re,"isLazy");function Q(fe){return S(fe)===p}l(Q,"isMemo2");function te(fe){return S(fe)===r}l(te,"isPortal");function ee(fe){return S(fe)===i}l(ee,"isProfiler");function J(fe){return S(fe)===a}l(J,"isStrictMode");function ae(fe){return S(fe)===d}l(ae,"isSuspense");function se(fe){return S(fe)===f}l(se,"isSuspenseList"),t.ContextConsumer=E,t.ContextProvider=k,t.Element=A,t.ForwardRef=I,t.Fragment=L,t.Lazy=R,t.Memo=O,t.Portal=M,t.Profiler=P,t.StrictMode=z,t.Suspense=D,t.SuspenseList=B,t.isAsyncMode=j,t.isConcurrentMode=V,t.isContextConsumer=Y,t.isContextProvider=H,t.isElement=q,t.isForwardRef=Z,t.isFragment=K,t.isLazy=re,t.isMemo=Q,t.isPortal=te,t.isProfiler=ee,t.isStrictMode=J,t.isSuspense=ae,t.isSuspenseList=se,t.isValidElementType=C,t.typeOf=S})()}}),Kqe=FR({"../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/index.js"(t,e){e.exports=jqe()}}),Xqe=FR({"../../node_modules/.pnpm/is-mobile@5.0.0/node_modules/is-mobile/index.js"(t,e){e.exports=i,e.exports.isMobile=i,e.exports.default=i;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,a=/android|ipad|playbook|silk/i;function i(s){s||(s={});let o=s.ua;if(!o&&typeof navigator!="undefined"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let u=r.test(o)&&!n.test(o)||!!s.tablet&&a.test(o);return!u&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(u=!0),u}l(i,"isMobile2")}});function Zqe(){return Number.parseInt(N.version.split(".")[0],10)}l(Zqe,"getReactMajorVersion");function Qqe(t){const e=G.useRef(t);return e.current=t,G.useCallback((...n)=>{var a;return(a=e.current)==null?void 0:a.call(e,...n)},[])}l(Qqe,"useEvent");var Ur=Qqe;function qo(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}l(qo,"canUseDom");var ene=qo()?G.useLayoutEffect:G.useEffect,tne=l((t,e)=>{const r=G.useRef(!0);ene(()=>t(r.current),e),ene(()=>(r.current=!1,()=>{r.current=!0}),[])},"useLayoutEffect2"),Rk=l((t,e)=>{tne(r=>{if(!r)return t()},e)},"useLayoutUpdateEffect"),On=tne,Jqe=l(t=>{const e=G.useRef(!1),[r,n]=G.useState(t);G.useEffect(()=>(e.current=!1,()=>{e.current=!0}),[]);function a(i,s){s&&e.current||n(i)}return l(a,"safeSetState"),[r,a]},"useSafeState"),Ok=Jqe;function Ta(t,e){const[r,n]=N.useState(t),a=e!==void 0?e:r;return On(i=>{i||n(e)},[e]),[a,n]}l(Ta,"useControlledState");var BR=Jre(Kqe());function ux(t,e,r){const n=G.useRef({});return(!("value"in n.current)||r(n.current.condition,e))&&(n.current.value=t(),n.current.condition=e),n.current.value}l(ux,"useMemo");var eYe=Symbol.for("react.element"),tYe=Symbol.for("react.transitional.element"),rYe=Symbol.for("react.fragment");function rne(t){return t&&typeof t=="object"&&(t.$$typeof===eYe||t.$$typeof===tYe)&&t.type===rYe}l(rne,"isFragment");var nYe=Number(N.version.split(".")[0]),aYe=l((t,e)=>{typeof t=="function"?t(e):typeof t=="object"&&t&&"current"in t&&(t.current=e)},"fillRef"),xo=l((...t)=>{const e=t.filter(Boolean);return e.length<=1?e[0]:r=>{t.forEach(n=>{aYe(n,r)})}},"composeRef"),bg=l((...t)=>ux(()=>xo(...t),t,(e,r)=>e.length!==r.length||e.every((n,a)=>n!==r[a])),"useComposeRef"),hx=l(t=>{var r,n;if(!t)return!1;if(nne(t)&&nYe>=19)return!0;const e=(0,BR.isMemo)(t)?t.type.type:t.type;return!(typeof e=="function"&&!((r=e.prototype)!=null&&r.render)&&e.$$typeof!==BR.ForwardRef||typeof t=="function"&&!((n=t.prototype)!=null&&n.render)&&t.$$typeof!==BR.ForwardRef)},"supportRef");function nne(t){return N.isValidElement(t)&&!rne(t)}l(nne,"isReactElement");var xg=l(t=>{if(t&&nne(t)){const e=t;return e.props.propertyIsEnumerable("ref")?e.props.ref:e.ref}return null},"getNodeRef");function vu(t,e){let r=t;for(let n=0;n<e.length;n+=1){if(r==null)return;r=r[e[n]]}return r}l(vu,"get$5");function ane(t,e,r,n){if(!e.length)return r;const[a,...i]=e;let s;return!t&&typeof a=="number"?s=[]:Array.isArray(t)?s=[...t]:s=X({},t),n&&r===void 0&&i.length===1?delete s[a][i[0]]:s[a]=ane(s[a],i,r,n),s}l(ane,"internalSet");function Dc(t,e,r,n=!1){return e.length&&n&&r===void 0&&!vu(t,e.slice(0,-1))?t:ane(t,e,r,n)}l(Dc,"set$4");function iYe(t){return typeof t=="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}l(iYe,"isObject$3");function ine(t){return Array.isArray(t)?[]:{}}l(ine,"createEmpty");var sYe=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function sne(t,e={}){const{prepareArray:r}=e,n=r||(()=>[]);let a=ine(t[0]);return t.forEach(i=>{function s(o,u){const h=new Set(u),d=vu(i,o),f=Array.isArray(d);if(f||iYe(d)){if(!h.has(d)){h.add(d);const p=vu(a,o);f?a=Dc(a,o,n(p,d)):(!p||typeof p!="object")&&(a=Dc(a,o,ine(d))),sYe(d).forEach(g=>{Object.getOwnPropertyDescriptor(d,g).enumerable&&s([...o,g],h)})}}else a=Dc(a,o,d)}l(s,"internalMerge"),s([])}),a}l(sne,"mergeWith$1");function dx(...t){return sne(t)}l(dx,"merge$4");var zR={},HR=[],oYe=l(t=>{HR.push(t)},"preMessage");function p0(t,e){if(!t&&console!==void 0){const r=HR.reduce((n,a)=>a(n!=null?n:"","warning"),e);r&&console.error(`Warning: ${r}`)}}l(p0,"warning");function lYe(t,e){if(!t&&console!==void 0){const r=HR.reduce((n,a)=>a(n!=null?n:"","note"),e);r&&console.warn(`Note: ${r}`)}}l(lYe,"note$2");function cYe(){zR={}}l(cYe,"resetWarned");function one(t,e,r){!e&&!zR[r]&&(t(!1,r),zR[r]=!0)}l(one,"call");function qC(t,e){one(p0,t,e)}l(qC,"warningOnce");function WR(t,e){one(lYe,t,e)}l(WR,"noteOnce"),qC.preMessage=oYe,qC.resetWarned=cYe,qC.noteOnce=WR;var an=qC;function ws(t,e){const r=Object.assign({},t);return Array.isArray(e)&&e.forEach(n=>{delete r[n]}),r}l(ws,"omit");function wo(t,e={}){let r=[];return N.Children.forEach(t,n=>{n==null&&!e.keepEmpty||(Array.isArray(n)?r=r.concat(wo(n)):rne(n)&&n.props?r=r.concat(wo(n.props.children,e)):r.push(n))}),r}l(wo,"toArray$1");function uYe(){}l(uYe,"noop$7");var g0=null,lne=uYe;lne=l((t,e,r)=>{an(t,`[antd: ${e}] ${r}`)},"_warning");var cne=lne,une=G.createContext({}),Tn=l(t=>{const{strict:e}=G.useContext(une),r=l((n,a,i)=>{if(!n)if(e===!1&&a==="deprecated"){const s=g0;g0||(g0={}),g0[t]=g0[t]||[],g0[t].includes(i||"")||g0[t].push(i||""),s||console.warn("[antd] There exists deprecated usage in your code:",g0)}else cne(n,t,i)},"typeWarning");return r.deprecated=(n,a,i,s="")=>{r(n,"deprecated",`\`${a}\` is deprecated. Please use \`${i}\` instead.${s?` ${s}`:""}`)},r},"devUseWarning"),VR=cne;function fx(t){return t instanceof HTMLElement||t instanceof SVGElement}l(fx,"isDOM");function px(t){return t&&typeof t=="object"&&fx(t.nativeElement)?t.nativeElement:fx(t)?t:null}l(px,"getDOM");var GR=G.createContext(null);function hYe({children:t,onBatchResize:e}){const r=G.useRef(0),n=G.useRef([]),a=G.useContext(GR),i=G.useCallback((s,o,u)=>{r.current+=1;const h=r.current;n.current.push({size:s,element:o,data:u}),Promise.resolve().then(()=>{h===r.current&&(e==null||e(n.current),n.current=[])}),a==null||a(s,o,u)},[e,a]);return G.createElement(GR.Provider,{value:i},t)}l(hYe,"Collection$1");var m0=new Map;function dYe(t){t.forEach(e=>{var n;const{target:r}=e;(n=m0.get(r))==null||n.forEach(a=>a(r))})}l(dYe,"onResize");var qR;function hne(){return qR||(qR=new ResizeObserver(dYe)),qR}l(hne,"ensureResizeObserver");function fYe(t,e){m0.has(t)||(m0.set(t,new Set),hne().observe(t)),m0.get(t).add(e)}l(fYe,"observe");function pYe(t,e){m0.has(t)&&(m0.get(t).delete(e),m0.get(t).size||(hne().unobserve(t),m0.delete(t)))}l(pYe,"unobserve");function dne(t,e,r,n){const a=G.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Ur(o=>{const{width:u,height:h}=o.getBoundingClientRect(),{offsetWidth:d,offsetHeight:f}=o,p=Math.floor(u),g=Math.floor(h);if(a.current.width!==p||a.current.height!==g||a.current.offsetWidth!==d||a.current.offsetHeight!==f){const m={width:p,height:g,offsetWidth:d,offsetHeight:f};a.current=m;const y=d===Math.round(u)?u:d,v=f===Math.round(h)?h:f,b=Ne(X({},m),{offsetWidth:y,offsetHeight:v});n==null||n(b,o),Promise.resolve().then(()=>{r==null||r(b,o)})}}),s=typeof e=="function";G.useEffect(()=>{const o=s?e():e;return o&&t&&fYe(o,i),()=>{o&&pYe(o,i)}},[t,s?0:e])}l(dne,"useResizeObserver");function gYe(t,e){const{children:r,disabled:n,onResize:a,data:i}=t,s=G.useRef(null),o=G.useContext(GR),u=typeof r=="function",h=u?r(s):r,d=!u&&G.isValidElement(h)&&hx(h),f=d?xg(h):null,p=bg(f,s),g=l(()=>px(s.current),"getDomElement");return G.useImperativeHandle(e,()=>g()),dne(!n,g,a,(m,y)=>{o==null||o(m,y,i)}),d?G.cloneElement(h,{ref:p}):h}l(gYe,"SingleObserver");var fne=G.forwardRef(gYe);fne.displayName="SingleObserver";var mYe=fne;function YR(){return YR=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},YR.apply(this,arguments)}l(YR,"_extends");var yYe="rc-observer-key";function vYe(t,e){const{children:r}=t,n=typeof r=="function"?[r]:wo(r);return n.length>1?p0(!1,"Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead."):n.length===0&&p0(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),n.map((a,i)=>{const s=(a==null?void 0:a.key)||`${yYe}-${i}`;return G.createElement(mYe,YR({},t,{key:s,ref:i===0?e:void 0}),a)})}l(vYe,"ResizeObserver2");var UR=G.forwardRef(vYe);UR.displayName="ResizeObserver",UR.Collection=hYe;var mh=UR;function pne(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(e=0;e<a;e++)t[e]&&(r=pne(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}l(pne,"r$1");function pt(){for(var t,e,r=0,n="",a=arguments.length;r<a;r++)(t=arguments[r])&&(e=pne(t))&&(n&&(n+=" "),n+=e);return n}l(pt,"clsx");var gne=pt;function jR(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}l(jR,"_arrayLikeToArray$2");function bYe(t){if(Array.isArray(t))return jR(t)}l(bYe,"_arrayWithoutHoles$1");function xYe(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}l(xYe,"_iterableToArray$1");function mne(t,e){if(t){if(typeof t=="string")return jR(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jR(t,e):void 0}}l(mne,"_unsupportedIterableToArray$2");function wYe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}l(wYe,"_nonIterableSpread$1");function Ea(t){return bYe(t)||xYe(t)||mne(t)||wYe()}l(Ea,"_toConsumableArray$1");var yne=l(t=>+setTimeout(t,16),"raf$1"),vne=l(t=>clearTimeout(t),"caf");typeof window!="undefined"&&"requestAnimationFrame"in window&&(yne=l(t=>window.requestAnimationFrame(t),"raf$1"),vne=l(t=>window.cancelAnimationFrame(t),"caf"));var bne=0,Dk=new Map;function xne(t){Dk.delete(t)}l(xne,"cleanup$1");var KR=l((t,e=1)=>{bne+=1;const r=bne;function n(a){if(a===0)xne(r),t();else{const i=yne(()=>{n(a-1)});Dk.set(r,i)}}return l(n,"callRef"),n(e),r},"wrapperRaf");KR.cancel=t=>{const e=Dk.get(t);return xne(t),vne(e)},KR.ids=()=>Dk;var pn=KR,Fk="ant",XR="anticon",TYe=["outlined","borderless","filled","underlined"],EYe=l((t,e)=>e||(t?`${Fk}-${t}`:Fk),"defaultGetPrefixCls"),vn=G.createContext({getPrefixCls:EYe,iconPrefixCls:XR}),{Consumer:Pxr}=vn,wne={};function Aa(t){const e=G.useContext(vn),{getPrefixCls:r,direction:n,getPopupContainer:a,renderEmpty:i}=e,s=e[t];return Ne(X({classNames:wne,styles:wne},s),{getPrefixCls:r,direction:n,getPopupContainer:a,renderEmpty:i})}l(Aa,"useComponentConfig");function CYe(t){for(var e=0,r,n=0,a=t.length;a>=4;++n,a-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(a){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}l(CYe,"murmur2");var YC=CYe;function ZR(t,e){if(!t)return!1;if(t.contains)return t.contains(e);let r=e;for(;r;){if(r===t)return!0;r=r.parentNode}return!1}l(ZR,"contains");var Tne="data-rc-order",Ene="data-rc-priority",SYe="rc-util-key",QR=new Map;function Cne({mark:t}={}){return t?t.startsWith("data-")?t:`data-${t}`:SYe}l(Cne,"getMark");function Bk(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}l(Bk,"getContainer");function _Ye(t){return t==="queue"?"prependQueue":t?"prepend":"append"}l(_Ye,"getOrder");function JR(t){return Array.from((QR.get(t)||t).children).filter(e=>e.tagName==="STYLE")}l(JR,"findStyles");function Sne(t,e={}){if(!qo())return null;const{csp:r,prepend:n,priority:a=0}=e,i=_Ye(n),s=i==="prependQueue",o=document.createElement("style");o.setAttribute(Tne,i),s&&a&&o.setAttribute(Ene,`${a}`),r!=null&&r.nonce&&(o.nonce=r==null?void 0:r.nonce),o.innerHTML=t;const u=Bk(e),{firstChild:h}=u;if(n){if(s){const d=(e.styles||JR(u)).filter(f=>{if(!["prepend","prependQueue"].includes(f.getAttribute(Tne)))return!1;const p=Number(f.getAttribute(Ene)||0);return a>=p});if(d.length)return u.insertBefore(o,d[d.length-1].nextSibling),o}u.insertBefore(o,h)}else u.appendChild(o);return o}l(Sne,"injectCSS");function _ne(t,e={}){let{styles:r}=e;return r||(r=JR(Bk(e))),r.find(n=>n.getAttribute(Cne(e))===t)}l(_ne,"findExistNode");function UC(t,e={}){const r=_ne(t,e);r&&Bk(e).removeChild(r)}l(UC,"removeCSS");function kYe(t,e){const r=QR.get(t);if(!r||!ZR(document,r)){const n=Sne("",e),{parentNode:a}=n;QR.set(t,a),t.removeChild(n)}}l(kYe,"syncRealContainer");function y0(t,e,r={}){var u,h,d;const n=Bk(r),a=JR(n),i=Ne(X({},r),{styles:a});kYe(n,i);const s=_ne(e,i);if(s)return(u=i.csp)!=null&&u.nonce&&s.nonce!==((h=i.csp)==null?void 0:h.nonce)&&(s.nonce=(d=i.csp)==null?void 0:d.nonce),s.innerHTML!==t&&(s.innerHTML=t),s;const o=Sne(t,i);return o.setAttribute(Cne(i),e),o}l(y0,"updateCSS");function AYe(t,e,r=!1){const n=new Set;function a(i,s,o=1){const u=n.has(i);if(an(!u,"Warning: There may be circular references"),u)return!1;if(i===s)return!0;if(r&&o>1)return!1;n.add(i);const h=o+1;if(Array.isArray(i)){if(!Array.isArray(s)||i.length!==s.length)return!1;for(let d=0;d<i.length;d++)if(!a(i[d],s[d],h))return!1;return!0}if(i&&s&&typeof i=="object"&&typeof s=="object"){const d=Object.keys(i);return d.length!==Object.keys(s).length?!1:d.every(f=>a(i[f],s[f],h))}return!1}return l(a,"deepEqual"),a(t,e)}l(AYe,"isEqual");var v0=AYe,NYe="%";function e9(t){return t.join(NYe)}l(e9,"pathKey");var kne=0,IYe=(bC=class{constructor(e){qt(this,"instanceId"),qt(this,"cache",new Map),qt(this,"updateTimes",new Map),qt(this,"extracted",new Set),this.instanceId=e}get(e){return this.opGet(e9(e))}opGet(e){return this.cache.get(e)||null}update(e,r){return this.opUpdate(e9(e),r)}opUpdate(e,r){const n=this.cache.get(e),a=r(n);a===null?(this.cache.delete(e),this.updateTimes.delete(e)):(this.cache.set(e,a),this.updateTimes.set(e,kne),kne+=1)}},l(bC,"Entity"),bC),LYe=IYe,$Ye={},t9="data-token-hash",Rd="data-css-hash",MYe="data-cache-path",b0="__cssinjs_instance__";function r9(){const t=Math.random().toString(12).slice(2);if(typeof document!="undefined"&&document.head&&document.body){const e=document.body.querySelectorAll(`style[${Rd}]`)||[],{firstChild:r}=document.head;Array.from(e).forEach(a=>{a[b0]||(a[b0]=t),a[b0]===t&&document.head.insertBefore(a,r)});const n={};Array.from(document.querySelectorAll(`style[${Rd}]`)).forEach(a=>{var s;const i=a.getAttribute(Rd);n[i]?a[b0]===t&&((s=a.parentNode)==null||s.removeChild(a)):n[i]=!0})}return new LYe(t)}l(r9,"createCache");var n9=G.createContext({hashPriority:"low",cache:r9(),defaultCache:!0,autoPrefix:!1}),PYe=l(t=>{const i=t,{children:e}=i,r=Xt(i,["children"]),n=G.useContext(n9),a=ux(()=>{const s=X({},n);Object.keys(r).forEach(h=>{const d=r[h];r[h]!==void 0&&(s[h]=d)});const{cache:o,transformers:u=[]}=r;return s.cache=s.cache||r9(),s.defaultCache=!o&&n.defaultCache,u.includes($Ye)&&(s.autoPrefix=!0),s},[n,r],(s,o)=>!v0(s[0],o[0],!0)||!v0(s[1],o[1],!0));return G.createElement(n9.Provider,{value:a},e)},"StyleProvider"),jC=n9;function RYe(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}l(RYe,"sameDerivativeOption");var a9=(cg=class{constructor(){qt(this,"cache"),qt(this,"keys"),qt(this,"cacheCallTimes"),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}size(){return this.keys.length}internalGet(e,r=!1){let n={map:this.cache};return e.forEach(a=>{var i;n?n=(i=n==null?void 0:n.map)==null?void 0:i.get(a):n=void 0}),n!=null&&n.value&&r&&(n.value[1]=this.cacheCallTimes++),n==null?void 0:n.value}get(e){var r;return(r=this.internalGet(e,!0))==null?void 0:r[0]}has(e){return!!this.internalGet(e)}set(e,r){if(!this.has(e)){if(this.size()+1>cg.MAX_CACHE_SIZE+cg.MAX_CACHE_OFFSET){const[a]=this.keys.reduce((i,s)=>{const[,o]=i;return this.internalGet(s)[1]<o?[s,this.internalGet(s)[1]]:i},[this.keys[0],this.cacheCallTimes]);this.delete(a)}this.keys.push(e)}let n=this.cache;e.forEach((a,i)=>{if(i===e.length-1)n.set(a,{value:[r,this.cacheCallTimes++]});else{const s=n.get(a);s?s.map||(s.map=new Map):n.set(a,{map:new Map}),n=n.get(a).map}})}deleteByPath(e,r){var i;const n=e.get(r[0]);if(r.length===1)return n.map?e.set(r[0],{map:n.map}):e.delete(r[0]),(i=n.value)==null?void 0:i[0];const a=this.deleteByPath(n.map,r.slice(1));return(!n.map||n.map.size===0)&&!n.value&&e.delete(r[0]),a}delete(e){if(this.has(e))return this.keys=this.keys.filter(r=>!RYe(r,e)),this.deleteByPath(this.cache,e)}},l(cg,"_ThemeCache"),cg);qt(a9,"MAX_CACHE_SIZE",20),qt(a9,"MAX_CACHE_OFFSET",5);var OYe=a9,Ane=0,Nne=(xC=class{constructor(e){qt(this,"derivatives"),qt(this,"id"),this.derivatives=Array.isArray(e)?e:[e],this.id=Ane,e.length===0&&p0(e.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Ane+=1}getDerivativeToken(e){return this.derivatives.reduce((r,n)=>n(e,r),void 0)}},l(xC,"Theme"),xC),i9=new OYe;function zk(t){const e=Array.isArray(t)?t:[t];return i9.has(e)||i9.set(e,new Nne(e)),i9.get(e)}l(zk,"createTheme");var DYe=new WeakMap,s9={};function FYe(t,e){let r=DYe;for(let n=0;n<e.length;n+=1){const a=e[n];r.has(a)||r.set(a,new WeakMap),r=r.get(a)}return r.has(s9)||r.set(s9,t()),r.get(s9)}l(FYe,"memoResult");var Ine=new WeakMap;function KC(t){let e=Ine.get(t)||"";return e||(Object.keys(t).forEach(r=>{const n=t[r];e+=r,n instanceof Nne?e+=n.id:n&&typeof n=="object"?e+=KC(n):e+=n}),e=YC(e),Ine.set(t,e)),e}l(KC,"flattenToken");function BYe(t,e){return YC(`${e}_${KC(t)}`)}l(BYe,"token2key");var o9=qo();function Rt(t){return typeof t=="number"?`${t}px`:t}l(Rt,"unit$1");function Lne(t){const{hashCls:e,hashPriority:r="low"}=t||{};if(!e)return"";const n=`.${e}`;return r==="low"?`:where(${n})`:n}l(Lne,"where");var zYe=l(t=>t!=null,"isNonNullable"),Hk=l((t,e="")=>`--${e?`${e}-`:""}${t}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),"token2CSSVar"),HYe=l((t,e,r)=>{const{hashCls:n,hashPriority:a="low",scope:i}=r||{};if(!Object.keys(t).length)return"";const s=`${Lne({hashCls:n,hashPriority:a})}.${e}`,o=[i].flat().filter(Boolean);return`${o.length?o.map(h=>`${s}.${h}`).join(", "):s}{${Object.entries(t).map(([h,d])=>`${h}:${d};`).join("")}}`},"serializeCSSVar"),$ne=l((t,e,r)=>{const{hashCls:n,hashPriority:a="low",prefix:i,unitless:s,ignore:o,preserve:u}=r||{},h={},d={};return Object.entries(t).forEach(([f,p])=>{if(u!=null&&u[f])d[f]=p;else if((typeof p=="string"||typeof p=="number")&&!(o!=null&&o[f])){const g=Hk(f,i);h[g]=typeof p=="number"&&!(s!=null&&s[f])?`${p}px`:String(p),d[f]=`var(${g})`}}),[d,HYe(h,e,{scope:r==null?void 0:r.scope,hashCls:n,hashPriority:a})]},"transformToken"),l9=!1;function WYe(){return l9}l(WYe,"useDevHMR");var VYe=WYe;if(typeof module!="undefined"&&module&&module.hot&&typeof window!="undefined"){const t=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:null;if(t&&typeof t.webpackHotUpdate=="function"){const e=t.webpackHotUpdate;t.webpackHotUpdate=(...r)=>(l9=!0,setTimeout(()=>{l9=!1},0),e(...r))}}var Wk=new Map;function c9(t,e,r,n,a){const{cache:i}=G.useContext(jC),s=[t,...e],o=e9(s),u=VYe(),h=l(p=>{i.opUpdate(o,g=>{const[m=0,y]=g||[void 0,void 0];let v=y;y&&u&&(n==null||n(v,u),v=null);const b=v||r(),w=[m,b];return p?p(w):w})},"buildCache");G.useMemo(()=>{h()},[o]);let d=i.opGet(o);d||(h(),d=i.opGet(o));const f=d[1];return N.useInsertionEffect(()=>(h(([p,g])=>[p+1,g]),Wk.has(o)||(a==null||a(f),Wk.set(o,!0),Promise.resolve().then(()=>{Wk.delete(o)})),()=>{i.opUpdate(o,p=>{const[g=0,m]=p||[];return g-1===0?(n==null||n(m,!1),Wk.delete(o),null):[g-1,m]})}),[o]),f}l(c9,"useGlobalCache");var GYe={},qYe="css-dev-only-do-not-override",wg=new Map;function YYe(t){wg.set(t,(wg.get(t)||0)+1)}l(YYe,"recordCleanToken");function UYe(t,e){typeof document!="undefined"&&document.querySelectorAll(`style[${t9}="${t}"]`).forEach(n=>{var a;n[b0]===e&&((a=n.parentNode)==null||a.removeChild(n))})}l(UYe,"removeStyleTags");var jYe=-1;function KYe(t,e){wg.set(t,(wg.get(t)||0)-1);const r=new Set;wg.forEach((n,a)=>{n<=0&&r.add(a)}),wg.size-r.size>jYe&&r.forEach(n=>{UYe(n,e),wg.delete(n)})}l(KYe,"cleanTokenStyle");var Mne=l((t,e,r,n)=>{const a=r.getDerivativeToken(t);let i=X(X({},a),e);return n&&(i=n(i)),i},"getComputedToken"),XYe="token";function ZYe(t,e,r){const{cache:{instanceId:n},container:a,hashPriority:i}=N.useContext(jC),{salt:s="",override:o=GYe,formatToken:u,getComputedToken:h,cssVar:d}=r,f=FYe(()=>Object.assign({},...e),e),p=KC(f),g=KC(o),m=KC(d);return c9(XYe,[s,t.id,p,g,m],()=>{const v=h?h(f,o,t):Mne(f,o,t,u),b=X({},v),w=`${s}_${d.prefix}`,x=YC(w),T=`${qYe}-${x}`;b._tokenKey=BYe(b,w);const[C,S]=$ne(v,d.key,{prefix:d.prefix,ignore:d.ignore,unitless:d.unitless,preserve:d.preserve,hashPriority:i,hashCls:d.hashed?T:void 0});return C._hashId=x,YYe(d.key),[C,T,b,S,d.key]},([,,,,v])=>{KYe(v,n)},([,,,v,b])=>{if(!v)return;const w=y0(v,YC(`css-var-${b}`),{mark:Rd,prepend:"queue",attachTo:a,priority:-999});w[b0]=n,w.setAttribute(t9,b)})}l(ZYe,"useCacheToken");var QYe={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JYe=QYe,Fa="-ms-",XC="-moz-",Kn="-webkit-",Pne="comm",u9="rule",h9="decl",eUe="@import",tUe="@namespace",Rne="@keyframes",rUe="@layer",One=Math.abs,d9=String.fromCharCode,f9=Object.assign;function nUe(t,e){return as(t,0)^45?(((e<<2^as(t,0))<<2^as(t,1))<<2^as(t,2))<<2^as(t,3):0}l(nUe,"hash");function Dne(t){return t.trim()}l(Dne,"trim$1");function Od(t,e){return(t=e.exec(t))?t[0]:t}l(Od,"match$1");function cn(t,e,r){return t.replace(e,r)}l(cn,"replace$1");function Vk(t,e,r){return t.indexOf(e,r)}l(Vk,"indexof");function as(t,e){return t.charCodeAt(e)|0}l(as,"charat$1");function Tg(t,e,r){return t.slice(e,r)}l(Tg,"substr$1");function bu(t){return t.length}l(bu,"strlen$1");function Fne(t){return t.length}l(Fne,"sizeof$1");function ZC(t,e){return e.push(t),t}l(ZC,"append$2");function aUe(t,e){return t.map(e).join("")}l(aUe,"combine");function Bne(t,e){return t.filter(function(r){return!Od(r,e)})}l(Bne,"filter$4");var Gk=1,gx=1,zne=0,Fc=0,Hi=0,mx="";function qk(t,e,r,n,a,i,s,o){return{value:t,root:e,parent:r,type:n,props:a,children:i,line:Gk,column:gx,length:s,return:"",siblings:o}}l(qk,"node$1");function x0(t,e){return f9(qk("",null,null,"",null,null,0,t.siblings),t,{length:-t.length},e)}l(x0,"copy$3");function yx(t){for(;t.root;)t=x0(t.root,{children:[t]});ZC(t,t.siblings)}l(yx,"lift");function iUe(){return Hi}l(iUe,"char$1");function sUe(){return Hi=Fc>0?as(mx,--Fc):0,gx--,Hi===10&&(gx=1,Gk--),Hi}l(sUe,"prev$1");function xu(){return Hi=Fc<zne?as(mx,Fc++):0,gx++,Hi===10&&(gx=1,Gk++),Hi}l(xu,"next$2");function w0(){return as(mx,Fc)}l(w0,"peek$1");function Yk(){return Fc}l(Yk,"caret$1");function Uk(t,e){return Tg(mx,t,e)}l(Uk,"slice$2");function QC(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}l(QC,"token$1");function oUe(t){return Gk=gx=1,zne=bu(mx=t),Fc=0,[]}l(oUe,"alloc$1");function lUe(t){return mx="",t}l(lUe,"dealloc$1");function p9(t){return Dne(Uk(Fc-1,g9(t===91?t+2:t===40?t+1:t)))}l(p9,"delimit$1");function cUe(t){for(;(Hi=w0())&&Hi<33;)xu();return QC(t)>2||QC(Hi)>3?"":" "}l(cUe,"whitespace$1");function uUe(t,e){for(;--e&&xu()&&!(Hi<48||Hi>102||Hi>57&&Hi<65||Hi>70&&Hi<97););return Uk(t,Yk()+(e<6&&w0()==32&&xu()==32))}l(uUe,"escaping$1");function g9(t){for(;xu();)switch(Hi){case t:return Fc;case 34:case 39:t!==34&&t!==39&&g9(Hi);break;case 40:t===41&&g9(t);break;case 92:xu();break}return Fc}l(g9,"delimiter$1");function hUe(t,e){for(;xu()&&t+Hi!==57;)if(t+Hi===84&&w0()===47)break;return"/*"+Uk(e,Fc-1)+"*"+d9(t===47?t:xu())}l(hUe,"commenter$1");function dUe(t){for(;!QC(w0());)xu();return Uk(t,Fc)}l(dUe,"identifier$1");function Hne(t){return lUe(jk("",null,null,null,[""],t=oUe(t),0,[0],t))}l(Hne,"compile$1");function jk(t,e,r,n,a,i,s,o,u){for(var h=0,d=0,f=s,p=0,g=0,m=0,y=1,v=1,b=1,w=0,x="",T=a,C=i,S=n,E=x;v;)switch(m=w,w=xu()){case 40:if(m!=108&&as(E,f-1)==58){Vk(E+=cn(p9(w),"&","&\f"),"&\f",One(h?o[h-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:E+=p9(w);break;case 9:case 10:case 13:case 32:E+=cUe(m);break;case 92:E+=uUe(Yk()-1,7);continue;case 47:switch(w0()){case 42:case 47:ZC(fUe(hUe(xu(),Yk()),e,r,u),u),(QC(m||1)==5||QC(w0()||1)==5)&&bu(E)&&Tg(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*y:o[h++]=bu(E)*b;case 125*y:case 59:case 0:switch(w){case 0:case 125:v=0;case 59+d:b==-1&&(E=cn(E,/\f/g,"")),g>0&&(bu(E)-f||y===0&&m===47)&&ZC(g>32?Vne(E+";",n,r,f-1,u):Vne(cn(E," ","")+";",n,r,f-2,u),u);break;case 59:E+=";";default:if(ZC(S=Wne(E,e,r,h,d,a,o,x,T=[],C=[],f,i),i),w===123)if(d===0)jk(E,e,S,S,T,i,f,o,C);else{switch(p){case 99:if(as(E,3)===110)break;case 108:if(as(E,2)===97)break;default:d=0;case 100:case 109:case 115:}d?jk(t,S,S,n&&ZC(Wne(t,S,S,0,0,a,o,x,a,T=[],f,C),C),a,C,f,o,n?T:C):jk(E,S,S,S,[""],C,0,o,C)}}h=d=g=0,y=b=1,x=E="",f=s;break;case 58:f=1+bu(E),g=m;default:if(y<1){if(w==123)--y;else if(w==125&&y++==0&&sUe()==125)continue}switch(E+=d9(w),w*y){case 38:b=d>0?1:(E+="\f",-1);break;case 44:o[h++]=(bu(E)-1)*b,b=1;break;case 64:w0()===45&&(E+=p9(xu())),p=w0(),d=f=bu(x=E+=dUe(Yk())),w++;break;case 45:m===45&&bu(E)==2&&(y=0)}}return i}l(jk,"parse$4");function Wne(t,e,r,n,a,i,s,o,u,h,d,f){for(var p=a-1,g=a===0?i:[""],m=Fne(g),y=0,v=0,b=0;y<n;++y)for(var w=0,x=Tg(t,p+1,p=One(v=s[y])),T=t;w<m;++w)(T=Dne(v>0?g[w]+" "+x:cn(x,/&\f/g,g[w])))&&(u[b++]=T);return qk(t,e,r,a===0?u9:o,u,h,d,f)}l(Wne,"ruleset$1");function fUe(t,e,r,n){return qk(t,e,r,Pne,d9(iUe()),Tg(t,2,-2),0,n)}l(fUe,"comment$1");function Vne(t,e,r,n,a){return qk(t,e,r,h9,Tg(t,0,n),Tg(t,n+1,-1),n,a)}l(Vne,"declaration$1");function Gne(t,e,r){switch(nUe(t,e)){case 5103:return Kn+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Kn+t+t;case 4855:return Kn+t.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+t;case 4789:return XC+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return Kn+t+XC+t+Fa+t+t;case 5936:switch(as(t,e+11)){case 114:return Kn+t+Fa+cn(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return Kn+t+Fa+cn(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return Kn+t+Fa+cn(t,/[svh]\w+-[tblr]{2}/,"lr")+t}case 6828:case 4268:case 2903:return Kn+t+Fa+t+t;case 6165:return Kn+t+Fa+"flex-"+t+t;case 5187:return Kn+t+cn(t,/(\w+).+(:[^]+)/,Kn+"box-$1$2"+Fa+"flex-$1$2")+t;case 5443:return Kn+t+Fa+"flex-item-"+cn(t,/flex-|-self/g,"")+(Od(t,/flex-|baseline/)?"":Fa+"grid-row-"+cn(t,/flex-|-self/g,""))+t;case 4675:return Kn+t+Fa+"flex-line-pack"+cn(t,/align-content|flex-|-self/g,"")+t;case 5548:return Kn+t+Fa+cn(t,"shrink","negative")+t;case 5292:return Kn+t+Fa+cn(t,"basis","preferred-size")+t;case 6060:return Kn+"box-"+cn(t,"-grow","")+Kn+t+Fa+cn(t,"grow","positive")+t;case 4554:return Kn+cn(t,/([^-])(transform)/g,"$1"+Kn+"$2")+t;case 6187:return cn(cn(cn(t,/(zoom-|grab)/,Kn+"$1"),/(image-set)/,Kn+"$1"),t,"")+t;case 5495:case 3959:return cn(t,/(image-set\([^]*)/,Kn+"$1$`$1");case 4968:return cn(cn(t,/(.+:)(flex-)?(.*)/,Kn+"box-pack:$3"+Fa+"flex-pack:$3"),/space-between/,"justify")+Kn+t+t;case 4200:if(!Od(t,/flex-|baseline/))return Fa+"grid-column-align"+Tg(t,e)+t;break;case 2592:case 3360:return Fa+cn(t,"template-","")+t;case 4384:case 3616:return r&&r.some(function(n,a){return e=a,Od(n.props,/grid-\w+-end/)})?~Vk(t+(r=r[e].value),"span",0)?t:Fa+cn(t,"-start","")+t+Fa+"grid-row-span:"+(~Vk(r,"span",0)?Od(r,/\d+/):+Od(r,/\d+/)-+Od(t,/\d+/))+";":Fa+cn(t,"-start","")+t;case 4896:case 4128:return r&&r.some(function(n){return Od(n.props,/grid-\w+-start/)})?t:Fa+cn(cn(t,"-end","-span"),"span ","")+t;case 4095:case 3583:case 4068:case 2532:return cn(t,/(.+)-inline(.+)/,Kn+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(bu(t)-1-e>6)switch(as(t,e+1)){case 109:if(as(t,e+4)!==45)break;case 102:return cn(t,/(.+:)(.+)-([^]+)/,"$1"+Kn+"$2-$3$1"+XC+(as(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~Vk(t,"stretch",0)?Gne(cn(t,"stretch","fill-available"),e,r)+t:t}break;case 5152:case 5920:return cn(t,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,a,i,s,o,u,h){return Fa+a+":"+i+h+(s?Fa+a+"-span:"+(o?u:+u-+i)+h:"")+t});case 4949:if(as(t,e+6)===121)return cn(t,":",":"+Kn)+t;break;case 6444:switch(as(t,as(t,14)===45?18:11)){case 120:return cn(t,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Kn+(as(t,14)===45?"inline-":"")+"box$3$1"+Kn+"$2$3$1"+Fa+"$2box$3")+t;case 100:return cn(t,":",":"+Fa)+t}break;case 5719:case 2647:case 2135:case 3927:case 2391:return cn(t,"scroll-","scroll-snap-")+t}return t}l(Gne,"prefix");function JC(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}l(JC,"serialize$1");function qne(t,e,r,n){switch(t.type){case rUe:if(t.children.length)break;case eUe:case tUe:case h9:return t.return=t.return||t.value;case Pne:return"";case Rne:return t.return=t.value+"{"+JC(t.children,n)+"}";case u9:if(!bu(t.value=t.props.join(",")))return""}return bu(r=JC(t.children,n))?t.return=t.value+"{"+r+"}":""}l(qne,"stringify$1");function pUe(t){var e=Fne(t);return function(r,n,a,i){for(var s="",o=0;o<e;o++)s+=t[o](r,n,a,i)||"";return s}}l(pUe,"middleware$1");function gUe(t,e,r,n){if(t.length>-1&&!t.return)switch(t.type){case h9:t.return=Gne(t.value,t.length,r);return;case Rne:return JC([x0(t,{value:cn(t.value,"@","@"+Kn)})],n);case u9:if(t.length)return aUe(r=t.props,function(a){switch(Od(a,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":yx(x0(t,{props:[cn(a,/:(read-\w+)/,":"+XC+"$1")]})),yx(x0(t,{props:[a]})),f9(t,{props:Bne(r,n)});break;case"::placeholder":yx(x0(t,{props:[cn(a,/:(plac\w+)/,":"+Kn+"input-$1")]})),yx(x0(t,{props:[cn(a,/:(plac\w+)/,":"+XC+"$1")]})),yx(x0(t,{props:[cn(a,/:(plac\w+)/,Fa+"input-$1")]})),yx(x0(t,{props:[a]})),f9(t,{props:Bne(r,n)});break}return""})}}l(gUe,"prefixer");function Yne(t,e){const{path:r,parentSelectors:n}=e;an(!1,`[Ant Design CSS-in-JS] ${r?`Error in ${r}: `:""}${t}${n.length?` Selector: ${n.join(" | ")}`:""}`)}l(Yne,"lintWarning");var mUe=l((t,e,r)=>{if(t==="content"){const n=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;(typeof e!="string"||["normal","none","initial","inherit","unset"].indexOf(e)===-1&&!n.test(e)&&!e.startsWith("var(")&&(e.charAt(0)!==e.charAt(e.length-1)||e.charAt(0)!=='"'&&e.charAt(0)!=="'"))&&Yne(`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${e}"'\`.`,r)}},"linter"),yUe=mUe,vUe=l((t,e,r)=>{t==="animation"&&r.hashId&&e!=="none"&&Yne(`You seem to be using hashed animation '${e}', in which case 'animationName' with Keyframe as value is recommended.`,r)},"linter2"),bUe=vUe,Une="data-ant-cssinjs-cache-path",jne="_FILE_STYLE__",Eg,Kne=!0;function xUe(){var t;if(!Eg&&(Eg={},qo())){const e=document.createElement("div");e.className=Une,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);let r=getComputedStyle(e).content||"";r=r.replace(/^"/,"").replace(/"$/,""),r.split(";").forEach(a=>{const[i,s]=a.split(":");Eg[i]=s});const n=document.querySelector(`style[${Une}]`);n&&(Kne=!1,(t=n.parentNode)==null||t.removeChild(n)),document.body.removeChild(e)}}l(xUe,"prepare");function wUe(t){return xUe(),!!Eg[t]}l(wUe,"existPath");function TUe(t){const e=Eg[t];let r=null;if(e&&qo())if(Kne)r=jne;else{const n=document.querySelector(`style[${Rd}="${Eg[t]}"]`);n?r=n.innerHTML:delete Eg[t]}return[r,e]}l(TUe,"getStyleAndHash");var Xne="_skip_check_",Zne="_multi_value_";function m9(t,e){return(e?JC(Hne(t),pUe([gUe,qne])):JC(Hne(t),qne)).replace(/\{%%%\:[^;];}/g,";")}l(m9,"normalizeStyle");function EUe(t){return typeof t=="object"&&t&&(Xne in t||Zne in t)}l(EUe,"isCompoundCSSProperty");function Qne(t,e,r="high"){if(!e)return t;const n=Lne({hashCls:e,hashPriority:r});return t.split(",").map(i=>{var h;const s=i.trim().split(/\s+/);let o=s[0]||"";const u=((h=o.match(/^\w+/))==null?void 0:h[0])||"";return o=`${u}${n}${o.slice(u.length)}`,[o,...s.slice(1)].join(" ")}).join(",")}l(Qne,"injectSelectorHash");var y9=l((t,e={},{root:r,injectHash:n,parentSelectors:a}={root:!0,parentSelectors:[]})=>{const{hashId:i,layer:s,path:o,hashPriority:u,transformers:h=[],linters:d=[]}=e;let f="",p={};function g(v){const b=v.getName(i);if(!p[b]){const[w]=y9(v.style,e,{root:!1,parentSelectors:a});p[b]=`@keyframes ${v.getName(i)}${w}`}}l(g,"parseKeyframes");function m(v,b=[]){return v.forEach(w=>{Array.isArray(w)?m(w,b):w&&b.push(w)}),b}return l(m,"flattenList"),m(Array.isArray(t)?t:[t]).forEach(v=>{const b=typeof v=="string"&&!r?{}:v;if(typeof b=="string")f+=`${b}
|
||
`;else if(b._keyframe)g(b);else{const w=h.reduce((x,T)=>{var C;return((C=T==null?void 0:T.visit)==null?void 0:C.call(T,x))||x},b);Object.keys(w).forEach(x=>{var C;const T=w[x];if(typeof T=="object"&&T&&(x!=="animationName"||!T._keyframe)&&!EUe(T)){let S=!1,E=x.trim(),k=!1;(r||n)&&i?E.startsWith("@")?S=!0:E==="&"?E=Qne("",i,u):E=Qne(x,i,u):r&&!i&&(E==="&"||E==="")&&(E="",k=!0);const[A,I]=y9(T,e,{root:k,injectHash:S,parentSelectors:[...a,E]});p=X(X({},p),I),f+=`${E}${A}`}else{let S=l(function(k,A){(typeof T!="object"||!(T!=null&&T[Xne]))&&[yUe,bUe,...d].forEach(R=>R(k,A,{path:o,hashId:i,parentSelectors:a}));const I=k.replace(/[A-Z]/g,R=>`-${R.toLowerCase()}`);let L=A;!JYe[k]&&typeof L=="number"&&L!==0&&(L=`${L}px`),k==="animationName"&&(A!=null&&A._keyframe)&&(g(A),L=A.getName(i)),f+=`${I}:${L};`},"appendStyle2");const E=(C=T==null?void 0:T.value)!=null?C:T;typeof T=="object"&&(T!=null&&T[Zne])&&Array.isArray(E)?E.forEach(k=>{S(x,k)}):zYe(E)&&S(x,E)}})}}),r?s&&(f&&(f=`@layer ${s.name} {${f}}`),s.dependencies&&(p[`@layer ${s.name}`]=s.dependencies.map(v=>`@layer ${v}, ${s.name};`).join(`
|
||
`))):f=`{${f}}`,[f,p]},"parseStyle");function Jne(t,e){return YC(`${t.join("%")}${e}`)}l(Jne,"uniqueHash");var CUe="style";function v9(t,e){const{path:r,hashId:n,layer:a,nonce:i,clientOnly:s,order:o=0}=t,{mock:u,hashPriority:h,container:d,transformers:f,linters:p,cache:g,layer:m,autoPrefix:y}=G.useContext(jC),v=[n||""];m&&v.push("layer"),v.push(...r);let b=o9;u!==void 0&&(b=u==="client"),c9(CUe,v,()=>{const w=v.join("|");if(wUe(w)){const[k,A]=TUe(w);if(k)return[k,A,{},s,o]}const x=e(),[T,C]=y9(x,{hashId:n,hashPriority:h,layer:m?a:void 0,path:r.join("-"),transformers:f,linters:p}),S=m9(T,y||!1),E=Jne(v,S);return[S,E,C,s,o]},(w,x)=>{const[,T]=w;x&&o9&&UC(T,{mark:Rd,attachTo:d})},w=>{const[x,T,C,,S]=w;if(b&&x!==jne){const E={mark:Rd,prepend:m?!1:"queue",attachTo:d,priority:S},k=typeof i=="function"?i():i;k&&(E.csp={nonce:k});const A=[],I=[];Object.keys(C).forEach(R=>{R.startsWith("@layer")?A.push(R):I.push(R)}),A.forEach(R=>{y0(m9(C[R],y||!1),`_layer-${R}`,Ne(X({},E),{prepend:!0}))});const L=y0(x,T,E);L[b0]=g.instanceId,L.setAttribute(MYe,v.join("|")),I.forEach(R=>{y0(m9(C[R],y||!1),`_effect-${R}`,E)})}})}l(v9,"useStyleRegister");var SUe="cssVar",_Ue=l((t,e)=>{const{key:r,prefix:n,unitless:a,ignore:i,token:s,hashId:o,scope:u}=t,{cache:{instanceId:h},container:d,hashPriority:f}=N.useContext(jC),{_tokenKey:p}=s,g=Array.isArray(u)?u.join("@@"):u,m=[...t.path,r,g,p];return c9(SUe,m,()=>{const v=e(),[b,w]=$ne(v,r,{prefix:n,unitless:a,ignore:i,scope:u,hashPriority:f,hashCls:o}),x=Jne(m,w);return[b,w,x,r]},([,,v])=>{o9&&UC(v,{mark:Rd,attachTo:d})},([,v,b])=>{if(!v)return;const w=y0(v,b,{mark:Rd,prepend:"queue",attachTo:d,priority:-999});w[b0]=h,w.setAttribute(t9,r)})},"useCSSVarRegister"),kUe=_Ue,AUe=(wC=class{constructor(e,r){qt(this,"name"),qt(this,"style"),qt(this,"_keyframe",!0),this.name=e,this.style=r}getName(e=""){return e?`${e}-${this.name}`:this.name}},l(wC,"Keyframe"),wC),gn=AUe;function vx(t){return t.notSplit=!0,t}l(vx,"noSplit"),vx(["borderTop","borderBottom"]),vx(["borderTop"]),vx(["borderBottom"]),vx(["borderLeft","borderRight"]),vx(["borderLeft"]),vx(["borderRight"]);function Wi(t){"@babel/helpers - typeof";return Wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wi(t)}l(Wi,"_typeof$1");function NUe(t){if(Array.isArray(t))return t}l(NUe,"_arrayWithHoles$2");function IUe(t,e){var r=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,s,o=[],u=!0,h=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(o.push(n.value),o.length!==e);u=!0);}catch(d){h=!0,a=d}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw a}}return o}}l(IUe,"_iterableToArrayLimit$2");function LUe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}l(LUe,"_nonIterableRest$2");function eae(t,e){return NUe(t)||IUe(t,e)||mne(t,e)||LUe()}l(eae,"_slicedToArray$2");function $Ue(t,e){if(Wi(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Wi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}l($Ue,"toPrimitive");function tae(t){var e=$Ue(t,"string");return Wi(e)=="symbol"?e:e+""}l(tae,"toPropertyKey");function oa(t,e,r){return(e=tae(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}l(oa,"_defineProperty$2");function rae(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}l(rae,"ownKeys");function fi(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rae(Object(r),!0).forEach(function(n){oa(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rae(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}l(fi,"_objectSpread2");function Dd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}l(Dd,"_classCallCheck$1");function MUe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tae(n.key),n)}}l(MUe,"_defineProperties$1");function Fd(t,e,r){return e&&MUe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}l(Fd,"_createClass$1");function Cg(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}l(Cg,"_assertThisInitialized");function eS(t,e){return eS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},eS(t,e)}l(eS,"_setPrototypeOf");function b9(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eS(t,e)}l(b9,"_inherits");function tS(t){return tS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tS(t)}l(tS,"_getPrototypeOf");function x9(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x9=l(function(){return!!t},"_isNativeReflectConstruct2"))()}l(x9,"_isNativeReflectConstruct");function PUe(t,e){if(e&&(Wi(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cg(t)}l(PUe,"_possibleConstructorReturn");function w9(t){var e=x9();return function(){var r,n=tS(t);if(e){var a=tS(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return PUe(this,r)}}l(w9,"_createSuper");var RUe=Fd(l(function t(){Dd(this,t)},"AbstractCalculator2")),nae=RUe,aae="CALC_UNIT",OUe=new RegExp(aae,"g");function T9(t){return typeof t=="number"?"".concat(t).concat(aae):t}l(T9,"unit2");var DUe=function(t){b9(r,t);var e=w9(r);function r(n,a){var i;Dd(this,r),i=e.call(this),oa(Cg(i),"result",""),oa(Cg(i),"unitlessCssVar",void 0),oa(Cg(i),"lowPriority",void 0);var s=Wi(n);return i.unitlessCssVar=a,n instanceof r?i.result="(".concat(n.result,")"):s==="number"?i.result=T9(n):s==="string"&&(i.result=n),i}return l(r,"CSSCalculator3"),Fd(r,[{key:"add",value:l(function(a){return a instanceof r?this.result="".concat(this.result," + ").concat(a.getResult()):(typeof a=="number"||typeof a=="string")&&(this.result="".concat(this.result," + ").concat(T9(a))),this.lowPriority=!0,this},"add")},{key:"sub",value:l(function(a){return a instanceof r?this.result="".concat(this.result," - ").concat(a.getResult()):(typeof a=="number"||typeof a=="string")&&(this.result="".concat(this.result," - ").concat(T9(a))),this.lowPriority=!0,this},"sub")},{key:"mul",value:l(function(a){return this.lowPriority&&(this.result="(".concat(this.result,")")),a instanceof r?this.result="".concat(this.result," * ").concat(a.getResult(!0)):(typeof a=="number"||typeof a=="string")&&(this.result="".concat(this.result," * ").concat(a)),this.lowPriority=!1,this},"mul")},{key:"div",value:l(function(a){return this.lowPriority&&(this.result="(".concat(this.result,")")),a instanceof r?this.result="".concat(this.result," / ").concat(a.getResult(!0)):(typeof a=="number"||typeof a=="string")&&(this.result="".concat(this.result," / ").concat(a)),this.lowPriority=!1,this},"div")},{key:"getResult",value:l(function(a){return this.lowPriority||a?"(".concat(this.result,")"):this.result},"getResult")},{key:"equal",value:l(function(a){var i=this,s=a||{},o=s.unit,u=!0;return typeof o=="boolean"?u=o:Array.from(this.unitlessCssVar).some(function(h){return i.result.includes(h)})&&(u=!1),this.result=this.result.replace(OUe,u?"px":""),typeof this.lowPriority!="undefined"?"calc(".concat(this.result,")"):this.result},"equal")}]),r}(nae),FUe=function(t){b9(r,t);var e=w9(r);function r(n){var a;return Dd(this,r),a=e.call(this),oa(Cg(a),"result",0),n instanceof r?a.result=n.result:typeof n=="number"&&(a.result=n),a}return l(r,"NumCalculator3"),Fd(r,[{key:"add",value:l(function(a){return a instanceof r?this.result+=a.result:typeof a=="number"&&(this.result+=a),this},"add")},{key:"sub",value:l(function(a){return a instanceof r?this.result-=a.result:typeof a=="number"&&(this.result-=a),this},"sub")},{key:"mul",value:l(function(a){return a instanceof r?this.result*=a.result:typeof a=="number"&&(this.result*=a),this},"mul")},{key:"div",value:l(function(a){return a instanceof r?this.result/=a.result:typeof a=="number"&&(this.result/=a),this},"div")},{key:"equal",value:l(function(){return this.result},"equal")}]),r}(nae),BUe=FUe,zUe=l(function(e,r){var n=e==="css"?DUe:BUe;return function(a){return new n(a,r)}},"genCalc2"),HUe=zUe,WUe=l(function(e,r){return"".concat([r,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))},"getCompVarPrefix2"),iae=WUe;function VUe(t,e,r,n){var a=fi({},e[t]);if(n!=null&&n.deprecatedTokens){var i=n.deprecatedTokens;i.forEach(function(o){var u=eae(o,2),h=u[0],d=u[1];if(an(!(a!=null&&a[h]),"Component Token `".concat(String(h),"` of ").concat(String(t)," is deprecated. Please use `").concat(String(d),"` instead.")),a!=null&&a[h]||a!=null&&a[d]){var f;(f=a[d])!==null&&f!==void 0||(a[d]=a==null?void 0:a[h])}})}var s=fi(fi({},r),a);return Object.keys(s).forEach(function(o){s[o]===e[o]&&delete s[o]}),s}l(VUe,"getComponentToken");var sae=VUe,E9=!0;function Wn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];E9=!1;var n={};return e.forEach(function(a){if(Wi(a)==="object"){var i=Object.keys(a);i.forEach(function(s){Object.defineProperty(n,s,{configurable:!0,enumerable:!0,get:l(function(){return a[s]},"get2")})})}}),E9=!0,n}l(Wn,"merge2");var oae={};function GUe(){}l(GUe,"noop2$1");var qUe=l(function(e){var r,n=e,a=GUe;return typeof Proxy!="undefined"&&(r=new Set,n=new Proxy(e,{get:l(function(s,o){if(E9){var u;(u=r)===null||u===void 0||u.add(o)}return s[o]},"get2")}),a=l(function(s,o){var u;oae[s]={global:Array.from(r),component:fi(fi({},(u=oae[s])===null||u===void 0?void 0:u.component),o)}},"flush2")),{token:n,keys:r,flush:a}},"statisticToken2"),YUe=qUe;function UUe(t,e,r){if(typeof r=="function"){var n;return r(Wn(e,(n=e[t])!==null&&n!==void 0?n:{}))}return r!=null?r:{}}l(UUe,"getDefaultComponentToken");var lae=UUe;function jUe(t){return t==="js"?{max:Math.max,min:Math.min}:{max:l(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return"max(".concat(n.map(function(i){return Rt(i)}).join(","),")")},"max"),min:l(function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return"min(".concat(n.map(function(i){return Rt(i)}).join(","),")")},"min")}}l(jUe,"genMaxMin");var KUe=jUe,XUe=1e3*60*10,ZUe=function(){function t(){Dd(this,t),oa(this,"map",new Map),oa(this,"objectIDMap",new WeakMap),oa(this,"nextID",0),oa(this,"lastAccessBeat",new Map),oa(this,"accessBeat",0)}return l(t,"ArrayKeyMap2"),Fd(t,[{key:"set",value:l(function(r,n){this.clear();var a=this.getCompositeKey(r);this.map.set(a,n),this.lastAccessBeat.set(a,Date.now())},"set2")},{key:"get",value:l(function(r){var n=this.getCompositeKey(r),a=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,a},"get2")},{key:"getCompositeKey",value:l(function(r){var n=this,a=r.map(function(i){return i&&Wi(i)==="object"?"obj_".concat(n.getObjectID(i)):"".concat(Wi(i),"_").concat(i)});return a.join("|")},"getCompositeKey")},{key:"getObjectID",value:l(function(r){if(this.objectIDMap.has(r))return this.objectIDMap.get(r);var n=this.nextID;return this.objectIDMap.set(r,n),this.nextID+=1,n},"getObjectID")},{key:"clear",value:l(function(){var r=this;if(this.accessBeat>1e4){var n=Date.now();this.lastAccessBeat.forEach(function(a,i){n-a>XUe&&(r.map.delete(i),r.lastAccessBeat.delete(i))}),this.accessBeat=0}},"clear")}]),t}(),cae=new ZUe;function QUe(t,e){return N.useMemo(function(){var r=cae.get(e);if(r)return r;var n=t();return cae.set(e,n),n},e)}l(QUe,"useUniqueMemo");var JUe=QUe,eje=l(function(){return{}},"useDefaultCSP2"),tje=eje;function rje(t){var e=t.useCSP,r=e===void 0?tje:e,n=t.useToken,a=t.usePrefix,i=t.getResetStyles,s=t.getCommonStyle,o=t.getCompUnitless;function u(p,g,m,y){var v=Array.isArray(p)?p[0]:p;function b(k){return"".concat(String(v)).concat(k.slice(0,1).toUpperCase()).concat(k.slice(1))}l(b,"prefixToken");var w=(y==null?void 0:y.unitless)||{},x=typeof o=="function"?o(p):{},T=fi(fi({},x),{},oa({},b("zIndexPopup"),!0));Object.keys(w).forEach(function(k){T[b(k)]=w[k]});var C=fi(fi({},y),{},{unitless:T,prefixToken:b}),S=d(p,g,m,C),E=h(v,m,C);return function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,I=S(k,A),L=y==null?void 0:y.extraCssVarPrefixCls,R=typeof L=="function"?L({prefixCls:k,rootCls:A}):L,O=E(R!=null&&R.length?[A].concat(Ea(R)):A);return[I,O]}}l(u,"genStyleHooks2");function h(p,g,m){var y=m.unitless,v=m.prefixToken,b=m.ignore;return function(w){var x=n(),T=x.cssVar,C=x.realToken;return kUe({path:[p],prefix:T.prefix,key:T.key,unitless:y,ignore:b,token:C,scope:w},function(){var S=lae(p,C,g),E=sae(p,C,S,{deprecatedTokens:m==null?void 0:m.deprecatedTokens});return S&&Object.keys(S).forEach(function(k){E[v(k)]=E[k],delete E[k]}),E}),T==null?void 0:T.key}}l(h,"genCSSVarRegister");function d(p,g,m){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},v=Array.isArray(p)?p:[p,p],b=eae(v,1),w=b[0],x=v.join("-"),T=t.layer||{name:"antd"};return function(C){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:C,E=n(),k=E.theme,A=E.realToken,I=E.hashId,L=E.token,R=E.cssVar,O=E.zeroRuntime,M=N.useMemo(function(){return O},[]);if(M)return I;var P=a(),z=P.rootPrefixCls,D=P.iconPrefixCls,B=r(),W="css",U=JUe(function(){var q=new Set;return Object.keys(y.unitless||{}).forEach(function(Z){q.add(Hk(Z,R.prefix)),q.add(Hk(Z,iae(w,R.prefix)))}),HUe(W,q)},[W,w,R==null?void 0:R.prefix]),j=KUe(W),V=j.max,Y=j.min,H={theme:k,token:L,hashId:I,nonce:l(function(){return B.nonce},"nonce"),clientOnly:y.clientOnly,layer:T,order:y.order||-999};return typeof i=="function"&&v9(fi(fi({},H),{},{clientOnly:!1,path:["Shared",z]}),function(){return i(L,{prefix:{rootPrefixCls:z,iconPrefixCls:D},csp:B})}),v9(fi(fi({},H),{},{path:[x,C,D]}),function(){if(y.injectStyle===!1)return[];var q=YUe(L),Z=q.token,K=q.flush,re=lae(w,A,m),Q=".".concat(C),te=sae(w,A,re,{deprecatedTokens:y.deprecatedTokens});re&&Wi(re)==="object"&&Object.keys(re).forEach(function(se){re[se]="var(".concat(Hk(se,iae(w,R.prefix)),")")});var ee=Wn(Z,{componentCls:Q,prefixCls:C,iconCls:".".concat(D),antCls:".".concat(z),calc:U,max:V,min:Y},re),J=g(ee,{hashId:I,prefixCls:C,rootPrefixCls:z,iconPrefixCls:D});K(w,te);var ae=typeof s=="function"?s(ee,C,S,y.resetFont):null;return[y.resetStyle===!1?null:ae,J]}),I}}l(d,"genComponentStyleHook2");function f(p,g,m){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},v=d(p,g,m,fi({resetStyle:!1,order:-998},y)),b=l(function(x){var T=x.prefixCls,C=x.rootCls,S=C===void 0?T:C;return v(T,S),null},"StyledComponent2");return b.displayName="SubStyle_".concat(String(Array.isArray(p)?p.join("."):p)),b}return l(f,"genSubStyleComponent2"),{genStyleHooks:u,genSubStyleComponent:f,genComponentStyleHook:d}}l(rje,"genStyleUtils");var nje=rje,yh=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Kk(t){return(t+8)/t}l(Kk,"getLineHeight");function aje(t){const e=Array.from({length:10}).map((r,n)=>{const a=n-1,i=t*ph(Math.E,a/5),s=n>1?Math.floor(i):Math.ceil(i);return Math.floor(s/2)*2});return e[1]=t,e.map(r=>({size:r,lineHeight:Kk(r)}))}l(aje,"getFontSizes");var ije="6.3.0",sje=ije,C9={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},oje=Ne(X({},C9),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
||
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
||
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),bx=oje,lje={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Ts=Math.round;function S9(t,e){const r=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(a=>parseFloat(a));for(let a=0;a<3;a+=1)n[a]=e(n[a]||0,r[a]||"",a);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}l(S9,"splitColorStr");var uae=l((t,e,r)=>r===0?t:t/100,"parseHSVorHSL");function rS(t,e){const r=e||255;return t>r?r:t<0?0:t}l(rS,"limitRange");var pa=(_y=class{constructor(e){qt(this,"isValid",!0),qt(this,"r",0),qt(this,"g",0),qt(this,"b",0),qt(this,"a",1),qt(this,"_h"),qt(this,"_hsl_s"),qt(this,"_hsv_s"),qt(this,"_l"),qt(this,"_v"),qt(this,"_max"),qt(this,"_min"),qt(this,"_brightness");function r(n){return n[0]in e&&n[1]in e&&n[2]in e}if(l(r,"matchFormat"),e)if(typeof e=="string"){let n=l(function(i){return a.startsWith(i)},"matchPrefix2");const a=e.trim();if(/^#?[A-F\d]{3,8}$/i.test(a))this.fromHexString(a);else if(n("rgb"))this.fromRgbString(a);else if(n("hsl"))this.fromHslString(a);else if(n("hsv")||n("hsb"))this.fromHsvString(a);else{const i=lje[a.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"))}}else if(e instanceof _y)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._hsl_s=e._hsl_s,this._hsv_s=e._hsv_s,this._l=e._l,this._v=e._v;else if(r("rgb"))this.r=rS(e.r),this.g=rS(e.g),this.b=rS(e.b),this.a=typeof e.a=="number"?rS(e.a,1):1;else if(r("hsl"))this.fromHsl(e);else if(r("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const r=this.toHsv();return r.h=e,this._c(r)}getLuminance(){function e(i){const s=i/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}l(e,"adjustGamma");const r=e(this.r),n=e(this.g),a=e(this.b);return .2126*r+.7152*n+.0722*a}getHue(){if(typeof this._h=="undefined"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=Ts(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){return this.getHSVSaturation()}getHSVSaturation(){if(typeof this._hsv_s=="undefined"){const e=this.getMax()-this.getMin();e===0?this._hsv_s=0:this._hsv_s=e/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s=="undefined"){const e=this.getMax()-this.getMin();if(e===0)this._hsl_s=0;else{const r=this.getLightness();this._hsl_s=e/255/(1-Math.abs(2*r-1))}}return this._hsl_s}getLightness(){return typeof this._l=="undefined"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v=="undefined"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness=="undefined"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const r=this.getHue(),n=this.getSaturation();let a=this.getLightness()-e/100;return a<0&&(a=0),this._c({h:r,s:n,l:a,a:this.a})}lighten(e=10){const r=this.getHue(),n=this.getSaturation();let a=this.getLightness()+e/100;return a>1&&(a=1),this._c({h:r,s:n,l:a,a:this.a})}mix(e,r=50){const n=this._c(e),a=r/100,i=l(o=>(n[o]-this[o])*a+this[o],"calc"),s={r:Ts(i("r")),g:Ts(i("g")),b:Ts(i("b")),a:Ts(i("a")*100)/100};return this._c(s)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const r=this._c(e),n=this.a+r.a*(1-this.a),a=l(i=>Ts((this[i]*this.a+r[i]*r.a*(1-this.a))/n),"calc");return this._c({r:a("r"),g:a("g"),b:a("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const r=(this.r||0).toString(16);e+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const a=(this.b||0).toString(16);if(e+=a.length===2?a:"0"+a,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Ts(this.a*255).toString(16);e+=i.length===2?i:"0"+i}return e}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),r=Ts(this.getHSLSaturation()*100),n=Ts(this.getLightness()*100);return this.a!==1?`hsla(${e},${r}%,${n}%,${this.a})`:`hsl(${e},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,r,n){const a=this.clone();return a[e]=rS(r,n),a}_c(e){return new this.constructor(e)}getMax(){return typeof this._max=="undefined"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min=="undefined"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const r=e.replace("#","");function n(a,i){return parseInt(r[a]+r[i||a],16)}l(n,"connectNum"),r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:e,s:r,l:n,a}){const i=(e%360+360)%360;if(this._h=i,this._hsl_s=r,this._l=n,this.a=typeof a=="number"?a:1,r<=0){const g=Ts(n*255);this.r=g,this.g=g,this.b=g;return}let s=0,o=0,u=0;const h=i/60,d=(1-Math.abs(2*n-1))*r,f=d*(1-Math.abs(h%2-1));h>=0&&h<1?(s=d,o=f):h>=1&&h<2?(s=f,o=d):h>=2&&h<3?(o=d,u=f):h>=3&&h<4?(o=f,u=d):h>=4&&h<5?(s=f,u=d):h>=5&&h<6&&(s=d,u=f);const p=n-d/2;this.r=Ts((s+p)*255),this.g=Ts((o+p)*255),this.b=Ts((u+p)*255)}fromHsv({h:e,s:r,v:n,a}){const i=(e%360+360)%360;this._h=i,this._hsv_s=r,this._v=n,this.a=typeof a=="number"?a:1;const s=Ts(n*255);if(this.r=s,this.g=s,this.b=s,r<=0)return;const o=i/60,u=Math.floor(o),h=o-u,d=Ts(n*(1-r)*255),f=Ts(n*(1-r*h)*255),p=Ts(n*(1-r*(1-h))*255);switch(u){case 0:this.g=p,this.b=d;break;case 1:this.r=f,this.b=d;break;case 2:this.r=d,this.b=p;break;case 3:this.r=d,this.g=f;break;case 4:this.r=p,this.g=d;break;case 5:default:this.g=d,this.b=f;break}}fromHsvString(e){const r=S9(e,uae);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(e){const r=S9(e,uae);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(e){const r=S9(e,(n,a)=>a.includes("%")?Ts(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}},l(_y,"_FastColor"),_y),Xk=2,hae=.16,cje=.05,uje=.05,hje=.15,dae=5,fae=4,dje=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function pae(t,e,r){let n;return Math.round(t.h)>=60&&Math.round(t.h)<=240?n=r?Math.round(t.h)-Xk*e:Math.round(t.h)+Xk*e:n=r?Math.round(t.h)+Xk*e:Math.round(t.h)-Xk*e,n<0?n+=360:n>=360&&(n-=360),n}l(pae,"getHue");function gae(t,e,r){if(t.h===0&&t.s===0)return t.s;let n;return r?n=t.s-hae*e:e===fae?n=t.s+hae:n=t.s+cje*e,n>1&&(n=1),r&&e===dae&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}l(gae,"getSaturation");function mae(t,e,r){let n;return r?n=t.v+uje*e:n=t.v-hje*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}l(mae,"getValue$3");function nS(t,e={}){const r=[],n=new pa(t),a=n.toHsv();for(let i=dae;i>0;i-=1){const s=new pa({h:pae(a,i,!0),s:gae(a,i,!0),v:mae(a,i,!0)});r.push(s)}r.push(n);for(let i=1;i<=fae;i+=1){const s=new pa({h:pae(a,i),s:gae(a,i),v:mae(a,i)});r.push(s)}return e.theme==="dark"?dje.map(({index:i,amount:s})=>new pa(e.backgroundColor||"#141414").mix(r[i],s).toHexString()):r.map(i=>i.toHexString())}l(nS,"generate");var _9={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},k9=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];k9.primary=k9[5];var A9=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];A9.primary=A9[5];var N9=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];N9.primary=N9[5];var Zk=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Zk.primary=Zk[5];var I9=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];I9.primary=I9[5];var L9=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];L9.primary=L9[5];var $9=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];$9.primary=$9[5];var M9=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];M9.primary=M9[5];var Qk=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Qk.primary=Qk[5];var P9=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];P9.primary=P9[5];var R9=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];R9.primary=R9[5];var O9=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];O9.primary=O9[5];var D9=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];D9.primary=D9[5];var F9={red:k9,volcano:A9,orange:N9,gold:Zk,yellow:I9,lime:L9,green:$9,cyan:M9,blue:Qk,geekblue:P9,purple:R9,magenta:O9,grey:D9};function yae(t,{generateColorPalettes:e,generateNeutralColorPalettes:r}){const{colorSuccess:n,colorWarning:a,colorError:i,colorInfo:s,colorPrimary:o,colorBgBase:u,colorTextBase:h}=t,d=e(o),f=e(n),p=e(a),g=e(i),m=e(s),y=r(u,h),v=t.colorLink||t.colorInfo,b=e(v),w=new pa(g[1]).mix(new pa(g[3]),50).toHexString(),x={};return yh.forEach(T=>{const C=t[T];if(C){const S=e(C);x[`${T}Hover`]=S[5],x[`${T}Active`]=S[7]}}),Ne(X(Ne(X({},y),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:g[1],colorErrorBgHover:g[2],colorErrorBgFilledHover:w,colorErrorBgActive:g[3],colorErrorBorder:g[3],colorErrorBorderHover:g[4],colorErrorHover:g[5],colorError:g[6],colorErrorActive:g[7],colorErrorTextHover:g[8],colorErrorText:g[9],colorErrorTextActive:g[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7]}),x),{colorBgMask:new pa("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}l(yae,"genColorMapToken");var fje=l(t=>{let e=t,r=t,n=t,a=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?r=4:t<8&&t>=7?r=5:t<14&&t>=8?r=6:t<16&&t>=14?r=7:t>=16&&(r=8),t<6&&t>=2?n=1:t>=6&&(n=2),t>4&&t<8?a=4:t>=8&&(a=6),{borderRadius:t,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:e,borderRadiusOuter:a}},"genRadius"),pje=fje;function gje(t){const{motionUnit:e,motionBase:r,borderRadius:n,lineWidth:a}=t;return X({motionDurationFast:`${(r+e).toFixed(1)}s`,motionDurationMid:`${(r+e*2).toFixed(1)}s`,motionDurationSlow:`${(r+e*3).toFixed(1)}s`,lineWidthBold:a+1},pje(n))}l(gje,"genCommonMapToken");var mje=l(t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}},"genControlHeight"),vae=mje,yje=l(t=>{const e=aje(t),r=e.map(d=>d.size),n=e.map(d=>d.lineHeight),a=r[1],i=r[0],s=r[2],o=n[1],u=n[0],h=n[2];return{fontSizeSM:i,fontSize:a,fontSizeLG:s,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:o,lineHeightLG:h,lineHeightSM:u,fontHeight:Math.round(o*a),fontHeightLG:Math.round(h*s),fontHeightSM:Math.round(u*i),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},"genFontMapToken"),bae=yje;function vje(t){const{sizeUnit:e,sizeStep:r}=t;return{sizeXXL:e*(r+8),sizeXL:e*(r+4),sizeLG:e*(r+2),sizeMD:e*(r+1),sizeMS:e*r,size:e*r,sizeSM:e*(r-1),sizeXS:e*(r-2),sizeXXS:e*(r-3)}}l(vje,"genSizeMapToken");var Bc=l((t,e)=>new pa(t).setA(e).toRgbString(),"getAlphaColor"),xx=l((t,e)=>new pa(t).darken(e).toHexString(),"getSolidColor"),bje=l(t=>{const e=nS(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},"generateColorPalettes"),xje=l((t,e)=>{const r=t||"#fff",n=e||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Bc(n,.88),colorTextSecondary:Bc(n,.65),colorTextTertiary:Bc(n,.45),colorTextQuaternary:Bc(n,.25),colorFill:Bc(n,.15),colorFillSecondary:Bc(n,.06),colorFillTertiary:Bc(n,.04),colorFillQuaternary:Bc(n,.02),colorBgSolid:Bc(n,1),colorBgSolidHover:Bc(n,.75),colorBgSolidActive:Bc(n,.95),colorBgLayout:xx(r,4),colorBgContainer:xx(r,0),colorBgElevated:xx(r,0),colorBgSpotlight:Bc(n,.85),colorBgBlur:"transparent",colorBorder:xx(r,15),colorBorderDisabled:xx(r,15),colorBorderSecondary:xx(r,6)}},"generateNeutralColorPalettes");function Jk(t){_9.pink=_9.magenta,F9.pink=F9.magenta;const e=Object.keys(C9).map(r=>{const n=t[r]===_9[r]?F9[r]:nS(t[r]);return Array.from({length:10},()=>1).reduce((a,i,s)=>(a[`${r}-${s+1}`]=n[s],a[`${r}${s+1}`]=n[s],a),{})}).reduce((r,n)=>(r=X(X({},r),n),r),{});return X(X(X(X(X(X(X({},t),e),yae(t,{generateColorPalettes:bje,generateNeutralColorPalettes:xje})),bae(t.fontSize)),vje(t)),vae(t)),gje(t))}l(Jk,"derivative");var wje=zk(Jk),B9=wje,aS={token:bx,override:{override:bx},hashed:!0},z9=N.createContext(aS);function H9(t){return t>=0&&t<=255}l(H9,"isStableColor");function Tje(t,e){const{r,g:n,b:a,a:i}=new pa(t).toRgb();if(i<1)return t;const{r:s,g:o,b:u}=new pa(e).toRgb();for(let h=.01;h<=1;h+=.01){const d=Math.round((r-s*(1-h))/h),f=Math.round((n-o*(1-h))/h),p=Math.round((a-u*(1-h))/h);if(H9(d)&&H9(f)&&H9(p))return new pa({r:d,g:f,b:p,a:Math.round(h*100)/100}).toRgbString()}return new pa({r,g:n,b:a,a:1}).toRgbString()}l(Tje,"getAlphaColor2");var iS=Tje;function xae(t){const g=t,{override:e}=g,r=Xt(g,["override"]),n=X({},e);Object.keys(bx).forEach(m=>{delete n[m]});const a=X(X({},r),n),i=480,s=576,o=768,u=992,h=1200,d=1600,f=1920;if(a.motion===!1){const m="0s";a.motionDurationFast=m,a.motionDurationMid=m,a.motionDurationSlow=m}return X(Ne(X({},a),{colorFillContent:a.colorFillSecondary,colorFillContentHover:a.colorFill,colorFillAlter:a.colorFillQuaternary,colorBgContainerDisabled:a.colorFillTertiary,colorBorderBg:a.colorBgContainer,colorSplit:iS(a.colorBorderSecondary,a.colorBgContainer),colorTextPlaceholder:a.colorTextQuaternary,colorTextDisabled:a.colorTextQuaternary,colorTextHeading:a.colorText,colorTextLabel:a.colorTextSecondary,colorTextDescription:a.colorTextTertiary,colorTextLightSolid:a.colorWhite,colorHighlight:a.colorError,colorBgTextHover:a.colorFillSecondary,colorBgTextActive:a.colorFill,colorIcon:a.colorTextTertiary,colorIconHover:a.colorText,colorErrorOutline:iS(a.colorErrorBg,a.colorBgContainer),colorWarningOutline:iS(a.colorWarningBg,a.colorBgContainer),fontSizeIcon:a.fontSizeSM,lineWidthFocus:a.lineWidth*3,lineWidth:a.lineWidth,controlOutlineWidth:a.lineWidth*2,controlInteractiveSize:a.controlHeight/2,controlItemBgHover:a.colorFillTertiary,controlItemBgActive:a.colorPrimaryBg,controlItemBgActiveHover:a.colorPrimaryBgHover,controlItemBgActiveDisabled:a.colorFill,controlTmpOutline:a.colorFillQuaternary,controlOutline:iS(a.colorPrimaryBg,a.colorBgContainer),lineType:a.lineType,borderRadius:a.borderRadius,borderRadiusXS:a.borderRadiusXS,borderRadiusSM:a.borderRadiusSM,borderRadiusLG:a.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:a.sizeXXS,paddingXS:a.sizeXS,paddingSM:a.sizeSM,padding:a.size,paddingMD:a.sizeMD,paddingLG:a.sizeLG,paddingXL:a.sizeXL,paddingContentHorizontalLG:a.sizeLG,paddingContentVerticalLG:a.sizeMS,paddingContentHorizontal:a.sizeMS,paddingContentVertical:a.sizeSM,paddingContentHorizontalSM:a.size,paddingContentVerticalSM:a.sizeXS,marginXXS:a.sizeXXS,marginXS:a.sizeXS,marginSM:a.sizeSM,margin:a.size,marginMD:a.sizeMD,marginLG:a.sizeLG,marginXL:a.sizeXL,marginXXL:a.sizeXXL,boxShadow:`
|
||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||
`,boxShadowSecondary:`
|
||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||
`,boxShadowTertiary:`
|
||
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
||
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
||
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
||
`,screenXS:i,screenXSMin:i,screenXSMax:s-1,screenSM:s,screenSMMin:s,screenSMMax:o-1,screenMD:o,screenMDMin:o,screenMDMax:u-1,screenLG:u,screenLGMin:u,screenLGMax:h-1,screenXL:h,screenXLMin:h,screenXLMax:d-1,screenXXL:d,screenXXLMin:d,screenXXLMax:f-1,screenXXXL:f,screenXXXLMin:f,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
|
||
0 1px 2px -2px ${new pa("rgba(0, 0, 0, 0.16)").toRgbString()},
|
||
0 3px 6px 0 ${new pa("rgba(0, 0, 0, 0.12)").toRgbString()},
|
||
0 5px 12px 4px ${new pa("rgba(0, 0, 0, 0.09)").toRgbString()}
|
||
`,boxShadowDrawerRight:`
|
||
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
||
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
||
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
||
`,boxShadowDrawerLeft:`
|
||
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
||
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
||
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
||
`,boxShadowDrawerUp:`
|
||
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
||
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
||
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
||
`,boxShadowDrawerDown:`
|
||
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
||
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
||
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
||
`,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}l(xae,"formatToken");var wae={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Eje={motionBase:!0,motionUnit:!0},Cje={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},Tae=l((t,e,r)=>{const n=r.getDerivativeToken(t),o=e,{override:a}=o,i=Xt(o,["override"]);let s=Ne(X({},n),{override:a});return s=xae(s),i&&Object.entries(i).forEach(([u,h])=>{const g=h,{theme:d}=g,f=Xt(g,["theme"]);let p=f;d&&(p=Tae(X(X({},s),f),{override:f},d)),s[u]=p}),s},"getComputedToken2");function Il(){var p,g;const{token:t,hashed:e,theme:r,override:n,cssVar:a,zeroRuntime:i}=N.useContext(z9),s={prefix:(p=a==null?void 0:a.prefix)!=null?p:"ant",key:(g=a==null?void 0:a.key)!=null?g:"css-var-root"},o=`${sje}-${e||""}`,u=r||B9,[h,d,f]=ZYe(u,[bx,t],{salt:o,override:n,getComputedToken:Tae,cssVar:Ne(X({},s),{unitless:wae,ignore:Eje,preserve:Cje})});return[u,f,e?d:"",h,s,!!i]}l(Il,"useToken");var Sg={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},is=l((t,e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}),"resetComponent"),sS=l(()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),"resetIcon"),Eae=l(()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),"clearFix"),Sje=l(t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),"genLinkStyle"),_je=l((t,e,r,n)=>{const a=`[class^="${e}"], [class*=" ${e}"]`,i=r?`.${r}`:a,s={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let o={};return n!==!1&&(o={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[i]:Ne(X(X({},o),s),{[a]:s})}},"genCommonStyle"),oS=l((t,e)=>({outline:`${Rt(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e!=null?e:1,transition:["outline-offset","outline"].map(r=>`${r} 0s`).join(", ")}),"genFocusOutline"),vh=l((t,e)=>({"&:focus-visible":oS(t,e)}),"genFocusStyle"),Cae=l(t=>({[`.${t}`]:Ne(X({},sS()),{[`.${t} .${t}-icon`]:{display:"block"}})}),"genIconStyle"),Sae=l(t=>Ne(X({color:t.colorLink,textDecoration:t.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},vh(t)),{"&:hover":{color:t.colorLinkHover,textDecoration:t.linkHoverDecoration},"&:focus":{color:t.colorLinkHover,textDecoration:t.linkFocusDecoration},"&:active":{color:t.colorLinkActive,textDecoration:t.linkHoverDecoration}}),"operationUnit"),{genStyleHooks:ea,genComponentStyleHook:kje,genSubStyleComponent:_ae}=nje({usePrefix:l(()=>{const{getPrefixCls:t,iconPrefixCls:e}=N.useContext(vn);return{rootPrefixCls:t(),iconPrefixCls:e}},"usePrefix"),useToken:l(()=>{const[t,e,r,n,a,i]=Il();return{theme:t,realToken:e,hashId:r,token:n,cssVar:a,zeroRuntime:i}},"useToken"),useCSP:l(()=>{const{csp:t}=N.useContext(vn);return t!=null?t:{}},"useCSP"),getResetStyles:l((t,e)=>{var n;const r=Sje(t);return[r,{"&":r},Cae((n=e==null?void 0:e.prefix.iconPrefixCls)!=null?n:XR)]},"getResetStyles"),getCommonStyle:_je,getCompUnitless:l(()=>wae,"getCompUnitless")}),To=l((t,e)=>{const r=`--${t.replace(/\./g,"")}-${e}-`;return[l(i=>`${r}${i}`,"varName"),l((i,s)=>s?`var(${r}${i}, ${s})`:`var(${r}${i})`,"varRef")]},"genCssVar");function Aje(t,e){return yh.reduce((r,n)=>{const a=t[`${n}1`],i=t[`${n}3`],s=t[`${n}6`],o=t[`${n}7`];return X(X({},r),e(n,{lightColor:a,lightBorderColor:i,darkColor:s,textColor:o}))},{})}l(Aje,"genPresetColor");var Nje=l((t,e)=>(Il(),v9({hashId:"",path:["ant-design-icons",t],nonce:l(()=>e==null?void 0:e.nonce,"nonce"),layer:{name:"antd"}},()=>Cae(t))),"useResetIconStyle"),Ije=Nje,Lje={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},$je=Lje,Mje=N.createContext({}),W9=Mje;function kae(t){var e;return(e=t==null?void 0:t.getRootNode)==null?void 0:e.call(t)}l(kae,"getRoot$1");function Pje(t){return kae(t)instanceof ShadowRoot}l(Pje,"inShadow");function e6(t){return Pje(t)?kae(t):null}l(e6,"getShadowRoot");function Rje(t){return t.replace(/-(.)/g,(e,r)=>r.toUpperCase())}l(Rje,"camelCase");function Oje(t,e){qC(t,`[@ant-design/icons] ${e}`)}l(Oje,"warning3");function Aae(t){return typeof t=="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(typeof t.icon=="object"||typeof t.icon=="function")}l(Aae,"isIconDefinition");function Nae(t={}){return Object.keys(t).reduce((e,r)=>{const n=t[r];switch(r){case"class":e.className=n,delete e.class;break;default:delete e[r],e[Rje(r)]=n}return e},{})}l(Nae,"normalizeAttrs");function V9(t,e,r){return r?N.createElement(t.tag,X(X({key:e},Nae(t.attrs)),r),(t.children||[]).map((n,a)=>V9(n,`${e}-${t.tag}-${a}`))):N.createElement(t.tag,X({key:e},Nae(t.attrs)),(t.children||[]).map((n,a)=>V9(n,`${e}-${t.tag}-${a}`)))}l(V9,"generate2");function Iae(t){return nS(t)[0]}l(Iae,"getSecondaryColor");function Lae(t){return t?Array.isArray(t)?t:[t]:[]}l(Lae,"normalizeTwoToneColors");var Dje=`
|
||
.anticon {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
color: inherit;
|
||
font-style: normal;
|
||
line-height: 0;
|
||
text-align: center;
|
||
text-transform: none;
|
||
vertical-align: -0.125em;
|
||
text-rendering: optimizeLegibility;
|
||
-webkit-font-smoothing: antialiased;
|
||
-moz-osx-font-smoothing: grayscale;
|
||
}
|
||
|
||
.anticon > * {
|
||
line-height: 1;
|
||
}
|
||
|
||
.anticon svg {
|
||
display: inline-block;
|
||
vertical-align: inherit;
|
||
}
|
||
|
||
.anticon::before {
|
||
display: none;
|
||
}
|
||
|
||
.anticon .anticon-icon {
|
||
display: block;
|
||
}
|
||
|
||
.anticon[tabindex] {
|
||
cursor: pointer;
|
||
}
|
||
|
||
.anticon-spin::before,
|
||
.anticon-spin {
|
||
display: inline-block;
|
||
-webkit-animation: loadingCircle 1s infinite linear;
|
||
animation: loadingCircle 1s infinite linear;
|
||
}
|
||
|
||
@-webkit-keyframes loadingCircle {
|
||
100% {
|
||
-webkit-transform: rotate(360deg);
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
|
||
@keyframes loadingCircle {
|
||
100% {
|
||
-webkit-transform: rotate(360deg);
|
||
transform: rotate(360deg);
|
||
}
|
||
}
|
||
`,Fje=l(t=>{const{csp:e,prefixCls:r,layer:n}=N.useContext(W9);let a=Dje;r&&(a=a.replace(/anticon/g,r)),n&&(a=`@layer ${n} {
|
||
${a}
|
||
}`),N.useEffect(()=>{const i=t.current,s=e6(i);y0(a,"@ant-design-icons",{prepend:!n,csp:e,attachTo:s})},[])},"useInsertStyles"),lS={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Bje({primaryColor:t,secondaryColor:e}){lS.primaryColor=t,lS.secondaryColor=e||Iae(t),lS.calculated=!!e}l(Bje,"setTwoToneColors");function zje(){return X({},lS)}l(zje,"getTwoToneColors");var t6=l(t=>{const f=t,{icon:e,className:r,onClick:n,style:a,primaryColor:i,secondaryColor:s}=f,o=Xt(f,["icon","className","onClick","style","primaryColor","secondaryColor"]),u=G.useRef(null);let h=lS;if(i&&(h={primaryColor:i,secondaryColor:s||Iae(i)}),Fje(u),Oje(Aae(e),`icon should be icon definiton, but got ${e}`),!Aae(e))return null;let d=e;return d&&typeof d.icon=="function"&&(d=Ne(X({},d),{icon:d.icon(h.primaryColor,h.secondaryColor)})),V9(d.icon,`svg-${d.name}`,Ne(X({className:r,onClick:n,style:a,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},o),{ref:u}))},"IconBase");t6.displayName="IconReact",t6.getTwoToneColors=zje,t6.setTwoToneColors=Bje;var G9=t6;function $ae(t){const[e,r]=Lae(t);return G9.setTwoToneColors({primaryColor:e,secondaryColor:r})}l($ae,"setTwoToneColor");function Hje(){const t=G9.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}l(Hje,"getTwoToneColor");function q9(){return q9=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},q9.apply(this,arguments)}l(q9,"_extends2"),$ae(Qk.primary);var r6=G.forwardRef((t,e)=>{const b=t,{className:r,icon:n,spin:a,rotate:i,tabIndex:s,onClick:o,twoToneColor:u}=b,h=Xt(b,["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"]),{prefixCls:d="anticon",rootClassName:f}=G.useContext(W9),p=pt(f,d,{[`${d}-${n.name}`]:!!n.name,[`${d}-spin`]:!!a||n.name==="loading"},r);let g=s;g===void 0&&o&&(g=-1);const m=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[y,v]=Lae(u);return G.createElement("span",q9({role:"img","aria-label":n.name},h,{ref:e,tabIndex:g,onClick:o,className:p}),G.createElement(G9,{icon:n,primaryColor:y,secondaryColor:v,style:m}))});r6.getTwoToneColor=Hje,r6.setTwoToneColor=$ae,r6.displayName="AntdIcon";var Vn=r6;function Y9(){return Y9=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Y9.apply(this,arguments)}l(Y9,"_extends3");var Wje=l((t,e)=>G.createElement(Vn,Y9({},t,{ref:e,icon:$je})),"CheckCircleFilled2"),Mae=G.forwardRef(Wje);Mae.displayName="CheckCircleFilled";var U9=Mae,Vje={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},Gje=Vje;function j9(){return j9=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},j9.apply(this,arguments)}l(j9,"_extends4");var qje=l((t,e)=>G.createElement(Vn,j9({},t,{ref:e,icon:Gje})),"CloseCircleFilled2"),Pae=G.forwardRef(qje);Pae.displayName="CloseCircleFilled";var cS=Pae,Yje={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},Uje=Yje;function K9(){return K9=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},K9.apply(this,arguments)}l(K9,"_extends5");var jje=l((t,e)=>G.createElement(Vn,K9({},t,{ref:e,icon:Uje})),"CloseOutlined2"),Rae=G.forwardRef(jje);Rae.displayName="CloseOutlined";var T0=Rae,Kje={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},Xje=Kje;function X9(){return X9=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},X9.apply(this,arguments)}l(X9,"_extends6");var Zje=l((t,e)=>G.createElement(Vn,X9({},t,{ref:e,icon:Xje})),"ExclamationCircleFilled2"),Oae=G.forwardRef(Zje);Oae.displayName="ExclamationCircleFilled";var Z9=Oae,Qje={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},Jje=Qje;function Q9(){return Q9=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Q9.apply(this,arguments)}l(Q9,"_extends7");var eKe=l((t,e)=>G.createElement(Vn,Q9({},t,{ref:e,icon:Jje})),"InfoCircleFilled2"),Dae=G.forwardRef(eKe);Dae.displayName="InfoCircleFilled";var J9=Dae,Fae=G.createContext({});function tKe(r){var n=r,{children:t}=n,e=Xt(n,["children"]);return G.createElement(Fae.Provider,{value:e},t)}l(tKe,"MotionProvider");function rKe(t){const[,e]=G.useReducer(i=>i+1,0),r=G.useRef(t),n=Ur(()=>r.current),a=Ur(i=>{r.current=typeof i=="function"?i(r.current):i,e()});return[n,a]}l(rKe,"useSyncState");var nKe=rKe,Bd="none",n6="appear",a6="enter",i6="leave",Bae="none",wu="prepare",wx="start",Tx="active",eO="end",zae="prepared";function Hae(t,e){const r={};return r[t.toLowerCase()]=e.toLowerCase(),r[`Webkit${t}`]=`webkit${e}`,r[`Moz${t}`]=`moz${e}`,r[`ms${t}`]=`MS${e}`,r[`O${t}`]=`o${e.toLowerCase()}`,r}l(Hae,"makePrefixMap");function aKe(t,e){const r={animationend:Hae("Animation","AnimationEnd"),transitionend:Hae("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete r.animationend.animation,"TransitionEvent"in e||delete r.transitionend.transition),r}l(aKe,"getVendorPrefixes");var iKe=aKe(qo(),typeof window!="undefined"?window:{}),Wae={};qo()&&({style:Wae}=document.createElement("div"));var s6={};function Vae(t){if(s6[t])return s6[t];const e=iKe[t];if(e){const r=Object.keys(e),n=r.length;for(let a=0;a<n;a+=1){const i=r[a];if(Object.prototype.hasOwnProperty.call(e,i)&&i in Wae)return s6[t]=e[i],s6[t]}}return""}l(Vae,"getVendorPrefixedEventName");var Gae=Vae("animationend"),qae=Vae("transitionend"),sKe=!!(Gae&&qae),Yae=Gae||"animationend",Uae=qae||"transitionend";function jae(t,e){if(!t)return null;if(typeof t=="object"){const r=e.replace(/-\w/g,n=>n[1].toUpperCase());return t[r]}return`${t}-${e}`}l(jae,"getTransitionName");var oKe=l(t=>{const e=N.useRef();function r(a){a&&(a.removeEventListener(Uae,t),a.removeEventListener(Yae,t))}l(r,"removeMotionEvents");function n(a){e.current&&e.current!==a&&r(e.current),a&&a!==e.current&&(a.addEventListener(Uae,t),a.addEventListener(Yae,t),e.current=a)}return l(n,"patchMotionEvents"),G.useEffect(()=>()=>{r(e.current),e.current=null},[]),[n,r]},"useDomMotionEvents_default"),lKe=qo()?N.useLayoutEffect:N.useEffect,Kae=lKe,cKe=l(()=>{const t=G.useRef(null);function e(){pn.cancel(t.current)}l(e,"cancelNextFrame");function r(n,a=2){e();const i=pn(()=>{a<=1?n({isCanceled:l(()=>i!==t.current,"isCanceled")}):r(n,a-1)});t.current=i}return l(r,"nextFrame"),G.useEffect(()=>()=>{e()},[]),[r,e]},"useNextFrame_default"),uKe=[wu,wx,Tx,eO],hKe=[wu,zae],Xae=!1,dKe=!0;function Zae(t){return t===Tx||t===eO}l(Zae,"isActive");var fKe=l((t,e,r)=>{const[n,a]=Ok(Bae),[i,s]=cKe();function o(){a(wu,!0)}l(o,"startQueue");const u=e?hKe:uKe;return Kae(()=>{if(n!==Bae&&n!==eO){const h=u.indexOf(n),d=u[h+1],f=r(n);f===Xae?a(d,!0):d&&i(p=>{function g(){p.isCanceled()||a(d,!0)}l(g,"doNext"),f===!0?g():Promise.resolve(f).then(g)})}},[t,n]),G.useEffect(()=>()=>{s()},[]),[o,n]},"useStepQueue_default");function pKe(t,e,r,{motionEnter:n=!0,motionAppear:a=!0,motionLeave:i=!0,motionDeadline:s,motionLeaveImmediately:o,onAppearPrepare:u,onEnterPrepare:h,onLeavePrepare:d,onAppearStart:f,onEnterStart:p,onLeaveStart:g,onAppearActive:m,onEnterActive:y,onLeaveActive:v,onAppearEnd:b,onEnterEnd:w,onLeaveEnd:x,onVisibleChanged:T}){const[C,S]=Ok(),[E,k]=nKe(Bd),[A,I]=Ok(null),L=E(),R=N.useRef(!1),O=N.useRef(null);function M(){return r()}l(M,"getDomElement");const P=N.useRef(!1);function z(){k(Bd),I(null,!0)}l(z,"updateMotionEndStatus");const D=Ur(K=>{const re=E();if(re===Bd)return;const Q=M();if(K&&!K.deadline&&K.target!==Q)return;const te=P.current;let ee;re===n6&&te?ee=b==null?void 0:b(Q,K):re===a6&&te?ee=w==null?void 0:w(Q,K):re===i6&&te&&(ee=x==null?void 0:x(Q,K)),te&&ee!==!1&&z()}),[B]=oKe(D),W=l(K=>{switch(K){case n6:return{[wu]:u,[wx]:f,[Tx]:m};case a6:return{[wu]:h,[wx]:p,[Tx]:y};case i6:return{[wu]:d,[wx]:g,[Tx]:v};default:return{}}},"getEventHandlers"),U=G.useMemo(()=>W(L),[L]),[j,V]=fKe(L,!t,K=>{var re;if(K===wu){const Q=U[wu];return Q?Q(M()):Xae}return V in U&&I(((re=U[V])==null?void 0:re.call(U,M(),null))||null),V===Tx&&L!==Bd&&(B(M()),s>0&&(clearTimeout(O.current),O.current=setTimeout(()=>{D({deadline:!0})},s))),V===zae&&z(),dKe}),Y=Zae(V);P.current=Y;const H=N.useRef(null);Kae(()=>{if(R.current&&H.current===e)return;S(e);const K=R.current;R.current=!0;let re;!K&&e&&a&&(re=n6),K&&e&&n&&(re=a6),(K&&!e&&i||!K&&o&&!e&&i)&&(re=i6);const Q=W(re);re&&(t||Q[wu])?(k(re),j()):k(Bd),H.current=e},[e]),N.useEffect(()=>{(L===n6&&!a||L===a6&&!n||L===i6&&!i)&&k(Bd)},[a,n,i]),N.useEffect(()=>()=>{R.current=!1,clearTimeout(O.current)},[]);const q=G.useRef(!1);N.useEffect(()=>{C&&(q.current=!0),C!==void 0&&L===Bd&&((q.current||C)&&(T==null||T(C)),q.current=!0)},[C,L]);let Z=A;return U[wu]&&V===wx&&(Z=X({transition:"none"},Z)),[E,V,Z,C!=null?C:e]}l(pKe,"useStatus");function gKe(t){let e=t;typeof t=="object"&&({transitionSupport:e}=t);function r(a,i){return!!(a.motionName&&e&&i!==!1)}l(r,"isSupportTransition");const n=G.forwardRef((a,i)=>{const{visible:s=!0,removeOnLeave:o=!0,forceRender:u,children:h,motionName:d,leavedClassName:f,eventProps:p}=a,{motion:g}=G.useContext(Fae),m=r(a,g),y=N.useRef();function v(){return px(y.current)}l(v,"getDomElement");const[b,w,x,T]=pKe(m,s,v,a),C=b(),S=G.useRef(T);T&&(S.current=!0);const E=G.useMemo(()=>{const I={};return Object.defineProperties(I,{nativeElement:{enumerable:!0,get:v},inMotion:{enumerable:!0,get:l(()=>()=>b()!==Bd,"get")},enableMotion:{enumerable:!0,get:l(()=>()=>m,"get")}}),I},[]);G.useImperativeHandle(i,()=>E,[]);let k;const A=Ne(X({},p),{visible:s});if(!h)k=null;else if(C===Bd)T?k=h(X({},A),y):!o&&S.current&&f?k=h(Ne(X({},A),{className:f}),y):u||!o&&!f?k=h(Ne(X({},A),{style:{display:"none"}}),y):k=null;else{let I;w===wu?I="prepare":Zae(w)?I="active":w===wx&&(I="start");const L=jae(d,`${C}-${I}`);k=h(Ne(X({},A),{className:pt(jae(d,C),{[L]:L&&I,[d]:typeof d=="string"}),style:x}),y)}return G.isValidElement(k)&&hx(k)&&(xg(k)||(k=G.cloneElement(k,{ref:y}))),k});return n.displayName="CSSMotion",n}l(gKe,"genCSSMotion");var Qae=gKe(sKe),tO="add",rO="keep",nO="remove",aO="removed";function mKe(t){let e;return t&&typeof t=="object"&&"key"in t?e=t:e={key:t},Ne(X({},e),{key:String(e.key)})}l(mKe,"wrapKeyToObject");function iO(t=[]){return t.map(mKe)}l(iO,"parseKeys");function yKe(t=[],e=[]){let r=[],n=0;const a=e.length,i=iO(t),s=iO(e);i.forEach(h=>{let d=!1;for(let f=n;f<a;f+=1){const p=s[f];if(p.key===h.key){n<f&&(r=r.concat(s.slice(n,f).map(g=>Ne(X({},g),{status:tO}))),n=f),r.push(Ne(X({},p),{status:rO})),n+=1,d=!0;break}}d||r.push(Ne(X({},h),{status:nO}))}),n<a&&(r=r.concat(s.slice(n).map(h=>Ne(X({},h),{status:tO}))));const o={};return r.forEach(({key:h})=>{o[h]=(o[h]||0)+1}),Object.keys(o).filter(h=>o[h]>1).forEach(h=>{r=r.filter(({key:d,status:f})=>d!==h||f!==nO),r.forEach(d=>{d.key===h&&(d.status=rO)})}),r}l(yKe,"diffKeys");function sO(){return sO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},sO.apply(this,arguments)}l(sO,"_extends8");var vKe=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function bKe(t,e=Qae){const n=class n extends G.Component{constructor(){super(...arguments),qt(this,"state",{keyEntities:[]}),qt(this,"removeKey",i=>{this.setState(s=>({keyEntities:s.keyEntities.map(u=>u.key!==i?u:Ne(X({},u),{status:aO}))}),()=>{const{keyEntities:s}=this.state;s.filter(({status:u})=>u!==aO).length===0&&this.props.onAllRemoved&&this.props.onAllRemoved()})})}static getDerivedStateFromProps({keys:i},{keyEntities:s}){const o=iO(i);return{keyEntities:yKe(s,o).filter(h=>{const d=s.find(({key:f})=>h.key===f);return!(d&&d.status===aO&&h.status===nO)})}}render(){const{keyEntities:i}=this.state,g=this.props,{component:s,children:o,onVisibleChanged:u,onAllRemoved:h}=g,d=Xt(g,["component","children","onVisibleChanged","onAllRemoved"]),f=s||G.Fragment,p={};return vKe.forEach(m=>{p[m]=d[m],delete d[m]}),delete d.keys,G.createElement(f,d,i.map((b,v)=>{var w=b,{status:m}=w,y=Xt(w,["status"]);const x=m===tO||m===rO;return G.createElement(e,sO({},p,{key:y.key,visible:x,eventProps:y,onVisibleChanged:l(T=>{u==null||u(T,{key:y.key}),T||this.removeKey(y.key)},"onVisibleChanged")}),(T,C)=>o(Ne(X({},T),{index:v}),C))}))}};l(n,"CSSMotionList");let r=n;return qt(r,"defaultProps",{component:"div"}),r}l(bKe,"genCSSMotionList");var xKe=bKe(),zc=Qae,wKe=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
||
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
||
charSet checked classID className colSpan cols content contentEditable contextMenu
|
||
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
||
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
||
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
||
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
||
mediaGroup method min minLength multiple muted name noValidate nonce open
|
||
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
||
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
||
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
||
summary tabIndex target title type useMap value width wmode wrap`,TKe=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
||
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
||
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
||
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
||
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
||
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
||
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,EKe=`${wKe} ${TKe}`.split(/[\s\n]+/),CKe="aria-",SKe="data-";function Jae(t,e){return t.indexOf(e)===0}l(Jae,"match2");function Hc(t,e=!1){let r;e===!1?r={aria:!0,data:!0,attr:!0}:e===!0?r={aria:!0}:r=X({},e);const n={};return Object.keys(t).forEach(a=>{(r.aria&&(a==="role"||Jae(a,CKe))||r.data&&Jae(a,SKe)||r.attr&&EKe.includes(a))&&(n[a]=t[a])}),n}l(Hc,"pickAttrs");var _Ke={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},kKe=_Ke,AKe={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};function uS(t){"@babel/helpers - typeof";return uS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uS(t)}l(uS,"_typeof2");function eie(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}l(eie,"ownKeys2");function tie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?eie(Object(r),!0).forEach(function(n){NKe(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):eie(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}l(tie,"_objectSpread");function NKe(t,e,r){return e=IKe(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}l(NKe,"_defineProperty2");function IKe(t){var e=LKe(t,"string");return uS(e)=="symbol"?e:String(e)}l(IKe,"_toPropertyKey$1");function LKe(t,e){if(uS(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(uS(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}l(LKe,"_toPrimitive$1");var $Ke=tie(tie({},AKe),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),MKe=$Ke,PKe={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},rie=PKe,RKe={lang:X({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},MKe),timePickerLocale:X({},rie)},nie=RKe,OKe=nie,ac="${label} is not a valid ${type}",DKe={locale:"en",Pagination:kKe,DatePicker:nie,TimePicker:rie,Calendar:OKe,global:{placeholder:"Please select",close:"Close",sortable:"sortable"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ac,method:ac,array:ac,object:ac,number:ac,date:ac,boolean:ac,integer:ac,float:ac,regexp:ac,email:ac,url:ac,hex:ac},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},E0=DKe,o6=X({},E0.Modal),l6=[],aie=l(()=>l6.reduce((t,e)=>X(X({},t),e),E0.Modal),"generateLocale");function FKe(t){if(t){const e=X({},t);return l6.push(e),o6=aie(),()=>{l6=l6.filter(r=>r!==e),o6=aie()}}o6=X({},E0.Modal)}l(FKe,"changeConfirmLocale");function BKe(){return o6}l(BKe,"getConfirmLocale");var zKe=N.createContext(void 0),oO=zKe,HKe=l((t,e)=>{const r=G.useContext(oO),n=G.useMemo(()=>{var o;const i=e||E0[t],s=(o=r==null?void 0:r[t])!=null?o:{};return X(X({},typeof i=="function"?i():i),s||{})},[t,e,r]),a=G.useMemo(()=>{const i=r==null?void 0:r.locale;return r!=null&&r.exist&&!i?E0.locale:i},[r]);return[n,a]},"useLocale"),Tu=HKe,iie="internalMark",sie=l(t=>{const{locale:e={},children:r,_ANT_MARK__:n}=t;Tn("LocaleProvider")(n===iie,"deprecated","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),G.useEffect(()=>FKe(e==null?void 0:e.Modal),[e]);const a=G.useMemo(()=>Ne(X({},e),{exist:!0}),[e]);return G.createElement(oO.Provider,{value:a},r)},"LocaleProvider");sie.displayName="LocaleProvider";var WKe=sie;function VKe(...t){const e={};return t.forEach(r=>{r&&Object.keys(r).forEach(n=>{r[n]!==void 0&&(e[n]=r[n])})}),e}l(VKe,"mergeProps");var oie=VKe,GKe=l(t=>t!=null,"isNonNullable2"),Eu=GKe,c6=l(t=>{if(!t)return;const{closable:e,closeIcon:r}=t;return{closable:e,closeIcon:r}},"pickClosable"),lie={},cie=l((t,e)=>{if(!t&&(t===!1||e===!1||e===null))return!1;if(t===void 0&&e===void 0)return null;let r={closeIcon:typeof e!="boolean"&&e!==null?e:void 0};return t&&typeof t=="object"&&(r=X(X({},r),t)),r},"computeClosableConfig"),qKe=l((t,e,r)=>t===!1?!1:t?oie(r,e,t):e===!1?!1:e?oie(r,e):r.closable?r:!1,"mergeClosableConfigs"),YKe=l((t,e,r)=>{const{closeIconRender:n}=e,u=t,{closeIcon:a}=u,i=Xt(u,["closeIcon"]);let s=a;const o=Hc(i,!0);return Eu(s)&&(n&&(s=n(s)),s=N.isValidElement(s)?N.cloneElement(s,X(X({"aria-label":r},s.props),o)):N.createElement("span",X({"aria-label":r},o),s)),[s,o]},"computeCloseIcon"),uie=l((t,e,r=lie,n="Close")=>{const a=cie(t==null?void 0:t.closable,t==null?void 0:t.closeIcon),i=cie(e==null?void 0:e.closable,e==null?void 0:e.closeIcon),s=X({closeIcon:N.createElement(T0,null)},r),o=qKe(a,i,s),u=typeof o!="boolean"?!!(o!=null&&o.disabled):!1;if(o===!1)return[!1,null,u,{}];const[h,d]=YKe(o,s,n);return[!0,h,u,d]},"computeClosable"),UKe=l((t,e,r=lie)=>{const[n]=Tu("global",E0.global);return N.useMemo(()=>uie(t,e,X({closeIcon:N.createElement(T0,null)},r),n.close),[t,e,r,n.close])},"useClosable"),jKe=l(()=>N.useReducer(t=>t+1,0),"useForceUpdate"),lO=l((t,e)=>{let r={};return t&&typeof t=="object"&&(r=t),typeof t=="boolean"&&(r={enabled:t}),r.closable===void 0&&e!==void 0&&(r.closable=e),r},"normalizeMaskConfig"),KKe=l((t,e,r,n)=>N.useMemo(()=>{var u,h,d;const a=lO(t,n),i=lO(e),s=Ne(X(X({blur:!1},i),a),{closable:(d=(h=(u=a.closable)!=null?u:n)!=null?h:i.closable)!=null?d:!0}),o=s.blur?`${r}-mask-blur`:void 0;return[s.enabled!==!1,{mask:o},!!s.closable]},[t,e,r,n]),"useMergedMask"),u6=l((t,...e)=>{const r=t||{};return e.filter(Boolean).reduce((n,a)=>(Object.keys(a||{}).forEach(i=>{const s=r[i],o=a[i];if(s&&typeof s=="object")if(o&&typeof o=="object")n[i]=u6(s,n[i],o);else{const{_default:u}=s;u&&(n[i]=n[i]||{},n[i][u]=pt(n[i][u],o))}else n[i]=pt(n[i],o)}),n),{})},"mergeClassNames"),XKe=l((t,...e)=>G.useMemo(()=>u6.apply(void 0,[t].concat(e)),[t].concat(e)),"useSemanticClassNames"),cO=l((...t)=>t.filter(Boolean).reduce((e,r={})=>(Object.keys(r).forEach(n=>{e[n]=X(X({},e[n]),r[n])}),e),{}),"mergeStyles"),ZKe=l((...t)=>G.useMemo(()=>cO.apply(void 0,t),[].concat(t)),"useSemanticStyles"),uO=l((t,e)=>{const r=X({},t);return Object.keys(e).forEach(n=>{if(n!=="_default"){const a=e[n],i=r[n]||{};r[n]=a?uO(i,a):i}}),r},"fillObjectBySchema"),C0=l((t,e)=>typeof t=="function"?t(e):t,"resolveStyleOrClass"),Qa=l((t,e,r,n)=>{const a=t.map(u=>u?C0(u,r):void 0),i=e.map(u=>u?C0(u,r):void 0),s=XKe.apply(void 0,[n].concat(Ea(a))),o=ZKe.apply(void 0,Ea(i));return G.useMemo(()=>n?[uO(s,n),uO(o,n)]:[s,o],[s,o,n])},"useMergeSemantic"),hie=l(t=>t==="horizontal"||t==="vertical","isValidOrientation"),Ex=l((t,e,r)=>N.useMemo(()=>{const n=hie(t);let a;return n?a=t:typeof e=="boolean"?a=e?"vertical":"horizontal":a=hie(r)?r:"horizontal",[a,a==="vertical"]},[r,t,e]),"useOrientation"),QKe=l(()=>{const[t,e]=G.useState([]),r=G.useCallback(n=>(e(a=>[].concat(Ea(a),[n])),()=>{e(a=>a.filter(i=>i!==n))}),[]);return[t,r]},"usePatchElement"),die=N.createContext(void 0);die.displayName="ZIndexContext";var hO=die,zd=100,JKe=10,h6=zd*JKe,eXe=h6+zd,fie={Modal:zd,Drawer:zd,Popover:zd,Popconfirm:zd,Tooltip:zd,Tour:zd,FloatButton:zd},tXe={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},rXe=l(t=>t in fie,"isContainerType"),dO=l((t,e)=>{const[,r]=Il(),n=N.useContext(hO),a=rXe(t);let i;if(e!==void 0)i=[e,e];else{let s=n!=null?n:0;a?s+=(n?0:r.zIndexPopupBase)+fie[t]:s+=tXe[t],i=[n===void 0?e:s,s]}{const s=Tn(t),o=r.zIndexPopupBase+eXe,u=i[0]||0;s(e!==void 0||u<=o,"usage","`zIndex` is over design token `zIndexPopupBase` too much. It may cause unexpected override.")}return i},"useZIndex"),nXe=l(t=>`${t}-css-var`,"useCSSVarCls"),Cu=nXe,aXe=N.createContext(void 0),iXe=G.createContext(null),pie=iXe,sXe=!1;function oXe(t){return sXe}l(oXe,"inlineMock");var gie=[];function lXe(t,e){const[r]=G.useState(()=>{if(!qo())return null;const d=document.createElement("div");return e&&d.setAttribute("data-debug",e),d}),n=G.useRef(!1),a=G.useContext(pie),[i,s]=G.useState(gie),o=a||(n.current?void 0:d=>{s(f=>[d,...f])});function u(){r.parentElement||document.body.appendChild(r),n.current=!0}l(u,"append2");function h(){var d;(d=r.parentElement)==null||d.removeChild(r),n.current=!1}return l(h,"cleanup2"),On(()=>(t?a?a(u):u():h(),h),[t]),On(()=>{i.length&&(i.forEach(d=>d()),s(gie))},[i]),[r,o]}l(lXe,"useDom");function cXe(t){const e=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,r=document.createElement("div");r.id=e;const n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";let a,i;if(t){const u=getComputedStyle(t);n.scrollbarColor=u.scrollbarColor,n.scrollbarWidth=u.scrollbarWidth;const h=getComputedStyle(t,"::-webkit-scrollbar"),d=parseInt(h.width,10),f=parseInt(h.height,10);try{const p=d?`width: ${h.width};`:"",g=f?`height: ${h.height};`:"";y0(`
|
||
#${e}::-webkit-scrollbar {
|
||
${p}
|
||
${g}
|
||
}`,e)}catch(p){console.error(p),a=d,i=f}}document.body.appendChild(r);const s=t&&a&&!isNaN(a)?a:r.offsetWidth-r.clientWidth,o=t&&i&&!isNaN(i)?i:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),UC(e),{width:s,height:o}}l(cXe,"measureScrollbarSize");function uXe(t){return typeof document=="undefined"||!t||!(t instanceof Element)?{width:0,height:0}:cXe(t)}l(uXe,"getTargetScrollBarSize");function hXe(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}l(hXe,"isBodyOverflowing");var dXe=`rc-util-locker-${Date.now()}`,mie=0;function fXe(t){const e=!!t,[r]=G.useState(()=>(mie+=1,`${dXe}_${mie}`));On(()=>{if(e){const n=uXe(document.body).width,a=hXe();y0(`
|
||
html body {
|
||
overflow-y: hidden;
|
||
${a?`width: calc(100% - ${n}px);`:""}
|
||
}`,r)}else UC(r);return()=>{UC(r)}},[e,r])}l(fXe,"useScrollLocker");function pXe(){return X({},G).useId}l(pXe,"getUseId");var yie=0,vie=pXe(),S0=vie?l(function(e){const r=vie();return e||r},"useId"):l(function(e){const[r,n]=G.useState("ssr-id");return G.useEffect(()=>{const a=yie;yie+=1,n(`rc_unique_${a}`)},[]),e||r},"useCompatId"),_g=[],gXe=200,bie=0,xie=l(t=>{if(t.key==="Escape"&&!t.isComposing){if(Date.now()-bie<gXe)return;const r=_g.length;for(let n=r-1;n>=0;n-=1)_g[n].onEsc({top:n===r-1,event:t})}},"onGlobalKeyDown"),wie=l(()=>{bie=Date.now()},"onGlobalCompositionEnd");function mXe(){window.addEventListener("keydown",xie),window.addEventListener("compositionend",wie)}l(mXe,"attachGlobalEventListeners");function yXe(){_g.length===0&&(window.removeEventListener("keydown",xie),window.removeEventListener("compositionend",wie))}l(yXe,"detachGlobalEventListeners");function vXe(t,e){const r=S0(),n=Ur(e),a=l(()=>{_g.find(s=>s.id===r)||_g.push({id:r,onEsc:n})},"ensure"),i=l(()=>{_g=_g.filter(s=>s.id!==r)},"clear");N.useMemo(()=>{t?a():t||i()},[t]),N.useEffect(()=>{if(t)return a(),mXe(),()=>{i(),yXe()}},[t])}l(vXe,"useEscKeyDown");var Tie=l(t=>t===!1?!1:!qo()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t,"getPortalContainer"),Eie=G.forwardRef((t,e)=>{const{open:r,autoLock:n,getContainer:a,debug:i,autoDestroy:s=!0,children:o,onEsc:u}=t,[h,d]=G.useState(r),f=h||r;an(qo()||!r,"Portal only work in client side. Please call 'useEffect' to show Portal instead default render in SSR."),G.useEffect(()=>{(s||r)&&d(r)},[r,s]);const[p,g]=G.useState(()=>Tie(a));G.useEffect(()=>{const C=Tie(a);g(()=>C!=null?C:null)});const[m,y]=lXe(f&&!p,i),v=p!=null?p:m;fXe(n&&r&&qo()&&(v===m||v===document.body)),vXe(r,u);let b=null;o&&hx(o)&&e&&(b=xg(o));const w=bg(b,e);if(!f||!qo()||p===void 0)return null;const x=v===!1||oXe();let T=o;return e&&(T=G.cloneElement(o,{ref:w})),G.createElement(pie.Provider,{value:y},x?T:Rn.createPortal(T,v))});Eie.displayName="Portal";var bXe=Eie,d6=bXe;function xXe(t){const{prefixCls:e,align:r,arrow:n,arrowPos:a}=t,{className:i,content:s,style:o}=n||{},{x:u=0,y:h=0}=a,d=G.useRef(null);if(!r||!r.points)return null;const f={position:"absolute"};if(r.autoArrow!==!1){const p=r.points[0],g=r.points[1],m=p[0],y=p[1],v=g[0],b=g[1];m===v||!["t","b"].includes(m)?f.top=h:m==="t"?f.top=0:f.bottom=0,y===b||!["l","r"].includes(y)?f.left=u:y==="l"?f.left=0:f.right=0}return G.createElement("div",{ref:d,className:pt(`${e}-arrow`,i),style:X(X({},f),o)},s)}l(xXe,"Arrow");function fO(){return fO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fO.apply(this,arguments)}l(fO,"_extends9");function wXe(t){const{prefixCls:e,open:r,zIndex:n,mask:a,motion:i,mobile:s}=t;return a?G.createElement(zc,fO({},i,{motionAppear:!0,visible:r,removeOnLeave:!0}),({className:o})=>G.createElement("div",{style:{zIndex:n},className:pt(`${e}-mask`,s&&`${e}-mobile-mask`,o)})):null}l(wXe,"Mask");var Cie=G.memo(({children:t})=>t,(t,e)=>e.cache);Cie.displayName="PopupContent";var TXe=Cie;function Sie(t,e,r,n,a,i,s,o){var d;const u="auto",h=t?{}:{left:"-1000vw",top:"-1000vh",right:u,bottom:u};if(!t&&(e||!r)){const{points:f}=n,p=n.dynamicInset||((d=n._experimental)==null?void 0:d.dynamicInset),g=p&&f[0][1]==="r",m=p&&f[0][0]==="b";g?(h.right=a,h.left=u):(h.left=s,h.right=u),m?(h.bottom=i,h.top=u):(h.top=o,h.bottom=u)}return h}l(Sie,"useOffsetStyle");function pO(){return pO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pO.apply(this,arguments)}l(pO,"_extends10");var _ie=G.forwardRef((t,e)=>{const{onEsc:r,popup:n,className:a,prefixCls:i,style:s,target:o,onVisibleChanged:u,open:h,keepDom:d,fresh:f,onClick:p,mask:g,arrow:m,arrowPos:y,align:v,motion:b,maskMotion:w,mobile:x,forceRender:T,getPopupContainer:C,autoDestroy:S,portal:E,children:k,zIndex:A,onMouseEnter:I,onMouseLeave:L,onPointerEnter:R,onPointerDownCapture:O,ready:M,offsetX:P,offsetY:z,offsetR:D,offsetB:B,onAlign:W,onPrepare:U,onResize:j,stretch:V,targetWidth:Y,targetHeight:H}=t,q=typeof n=="function"?n():n,Z=h||d,K=!!x,[re,Q,te]=G.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[g,w,b],[x,g,w,b]),ee=(C==null?void 0:C.length)>0,[J,ae]=G.useState(!C||!ee);On(()=>{!J&&ee&&o&&ae(!0)},[J,ee,o]);const se=Ur((de,Ee)=>{j==null||j(de,Ee),W()}),fe=Sie(K,M,h,v,D,B,P,z);if(!J)return null;const ve={};return V&&(V.includes("height")&&H?ve.height=H:V.includes("minHeight")&&H&&(ve.minHeight=H),V.includes("width")&&Y?ve.width=Y:V.includes("minWidth")&&Y&&(ve.minWidth=Y)),h||(ve.pointerEvents="none"),G.createElement(E,{open:T||Z,getContainer:C&&(()=>C(o)),autoDestroy:S,onEsc:r},G.createElement(wXe,{prefixCls:i,open:h,zIndex:A,mask:re,motion:Q,mobile:K}),G.createElement(mh,{onResize:se,disabled:!h},de=>G.createElement(zc,pO({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:T,leavedClassName:`${i}-hidden`},te,{onAppearPrepare:U,onEnterPrepare:U,visible:h,onVisibleChanged:l(Ee=>{var Ce;(Ce=b==null?void 0:b.onVisibleChanged)==null||Ce.call(b,Ee),u(Ee)},"onVisibleChanged")}),({className:Ee,style:Ce},De)=>{const ce=pt(i,Ee,a,{[`${i}-mobile`]:K});return G.createElement("div",{ref:xo(de,e,De),className:ce,style:X(Ne(X(X(X({"--arrow-x":`${y.x||0}px`,"--arrow-y":`${y.y||0}px`},fe),ve),Ce),{boxSizing:"border-box",zIndex:A}),s),onMouseEnter:I,onMouseLeave:L,onPointerEnter:R,onClick:p,onPointerDownCapture:O},m&&G.createElement(xXe,{prefixCls:i,arrow:m,arrowPos:y,align:v}),G.createElement(TXe,{cache:!h&&!f},q))})),k)});_ie.displayName="Popup";var kie=_ie,EXe=G.createContext(null),f6=EXe,Aie=G.createContext(null);function Nie(t){return t?Array.isArray(t)?t:[t]:[]}l(Nie,"toArray2");function CXe(t,e,r){return G.useMemo(()=>{const n=Nie(e!=null?e:t),a=Nie(r!=null?r:t),i=new Set(n),s=new Set(a);return i.has("hover")&&!i.has("click")&&i.add("touch"),s.has("hover")&&!s.has("click")&&s.add("touch"),[i,s]},[t,e,r])}l(CXe,"useAction");var gO=l(t=>{if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){const{width:e,height:r}=t.getBBox();if(e||r)return!0}if(t.getBoundingClientRect){const{width:e,height:r}=t.getBoundingClientRect();if(e||r)return!0}}return!1},"isVisible_default");function SXe(t=[],e=[],r){const n=l((a,i)=>a[i]||"","getVal");return r?n(t,0)===n(e,0):n(t,0)===n(e,0)&&n(t,1)===n(e,1)}l(SXe,"isPointsEq");function Iie(t,e,r,n){var s;const{points:a}=r,i=Object.keys(t);for(let o=0;o<i.length;o+=1){const u=i[o];if(SXe((s=t[u])==null?void 0:s.points,a,n))return`${e}-placement-${u}`}return""}l(Iie,"getAlignPopupClassName");function hS(t){return t.ownerDocument.defaultView}l(hS,"getWin");function mO(t){const e=[];let r=t==null?void 0:t.parentElement;const n=["hidden","scroll","clip","auto"];for(;r;){const{overflowX:a,overflowY:i,overflow:s}=hS(r).getComputedStyle(r);[a,i,s].some(o=>n.includes(o))&&e.push(r),r=r.parentElement}return e}l(mO,"collectScroller");function dS(t,e=1){return Number.isNaN(t)?e:t}l(dS,"toNum");function fS(t){return dS(parseFloat(t),0)}l(fS,"getPxValue");function Lie(t,e){const r=X({},t);return(e||[]).forEach(n=>{if(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)return;const{overflow:a,overflowClipMargin:i,borderTopWidth:s,borderBottomWidth:o,borderLeftWidth:u,borderRightWidth:h}=hS(n).getComputedStyle(n),d=n.getBoundingClientRect(),{offsetHeight:f,clientHeight:p,offsetWidth:g,clientWidth:m}=n,y=fS(s),v=fS(o),b=fS(u),w=fS(h),x=dS(Math.round(d.width/g*1e3)/1e3),T=dS(Math.round(d.height/f*1e3)/1e3),C=(g-m-b-w)*x,S=(f-p-y-v)*T,E=y*T,k=v*T,A=b*x,I=w*x;let L=0,R=0;if(a==="clip"){const D=fS(i);L=D*x,R=D*T}const O=d.x+A-L,M=d.y+E-R,P=O+d.width+2*L-A-I-C,z=M+d.height+2*R-E-k-S;r.left=Math.max(r.left,O),r.top=Math.max(r.top,M),r.right=Math.min(r.right,P),r.bottom=Math.min(r.bottom,z)}),r}l(Lie,"getVisibleArea");function $ie(t,e=0){const r=`${e}`,n=r.match(/^(.*)\%$/);return n?t*(parseFloat(n[1])/100):parseFloat(r)}l($ie,"getUnitOffset");function Mie(t,e){const[r,n]=e||[];return[$ie(t.width,r),$ie(t.height,n)]}l(Mie,"getNumberOffset");function Pie(t=""){return[t[0],t[1]]}l(Pie,"splitPoints");function Cx(t,e){const r=e[0],n=e[1];let a,i;return r==="t"?i=t.y:r==="b"?i=t.y+t.height:i=t.y+t.height/2,n==="l"?a=t.x:n==="r"?a=t.x+t.width:a=t.x+t.width/2,{x:a,y:i}}l(Cx,"getAlignPoint");function _0(t,e){const r={t:"b",b:"t",l:"r",r:"l"},n=[...t];return n[e]=r[t[e]]||"c",n}l(_0,"reversePoints");function Rie(t){return t.join("")}l(Rie,"flatPoints");function Oie(t,e,r,n,a,i,s,o){const[u,h]=G.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[n]||{}}),d=G.useRef(0),f=G.useMemo(()=>!e||o?[]:mO(e),[e]),p=G.useRef({});t||l(()=>{p.current={}},"resetFlipCache")();const m=Ur(()=>{var b,w,x,T,C,S;if(e&&r&&t&&!o){let E=l(function(Ut,rt,vr=Ie){const en=j.x+Ut,Pn=j.y+rt,ia=en+ee,Us=Pn+te,lr=Math.max(en,vr.left),$r=Math.max(Pn,vr.top),xn=Math.min(ia,vr.right),ka=Math.min(Us,vr.bottom);return Math.max(0,(xn-lr)*(ka-$r))},"getIntersectionVisibleArea2"),k=l(function(){gt=j.y+ht,ge=gt+te,ie=j.x+Ge,be=ie+ee},"syncNextPopupPosition2");const A=e,I=A.ownerDocument,L=hS(A),{position:R}=L.getComputedStyle(A),O=A.style.left,M=A.style.top,P=A.style.right,z=A.style.bottom,D=A.style.overflow,B=X(X({},a[n]),i),W=I.createElement("div");(b=A.parentElement)==null||b.appendChild(W),W.style.left=`${A.offsetLeft}px`,W.style.top=`${A.offsetTop}px`,W.style.position=R,W.style.height=`${A.offsetHeight}px`,W.style.width=`${A.offsetWidth}px`,A.style.left="0",A.style.top="0",A.style.right="auto",A.style.bottom="auto",A.style.overflow="hidden";let U;if(Array.isArray(r))U={x:r[0],y:r[1],width:0,height:0};else{const Ut=r.getBoundingClientRect();Ut.x=(w=Ut.x)!=null?w:Ut.left,Ut.y=(x=Ut.y)!=null?x:Ut.top,U={x:Ut.x,y:Ut.y,width:Ut.width,height:Ut.height}}const j=A.getBoundingClientRect(),{height:V,width:Y}=L.getComputedStyle(A);j.x=(T=j.x)!=null?T:j.left,j.y=(C=j.y)!=null?C:j.top;const{clientWidth:H,clientHeight:q,scrollWidth:Z,scrollHeight:K,scrollTop:re,scrollLeft:Q}=I.documentElement,te=j.height,ee=j.width,J=U.height,ae=U.width,se={left:0,top:0,right:H,bottom:q},fe={left:-Q,top:-re,right:Z-Q,bottom:K-re};let{htmlRegion:ve}=B;const de="visible",Ee="visibleFirst";ve!=="scroll"&&ve!==Ee&&(ve=de);const Ce=ve===Ee,De=Lie(fe,f),ce=Lie(se,f),Ie=ve===de?ce:De,ye=Ce?ce:Ie;A.style.left="auto",A.style.top="auto",A.style.right="0",A.style.bottom="0";const pe=A.getBoundingClientRect();A.style.left=O,A.style.top=M,A.style.right=P,A.style.bottom=z,A.style.overflow=D,(S=A.parentElement)==null||S.removeChild(W);const Ae=dS(Math.round(ee/parseFloat(Y)*1e3)/1e3),Ve=dS(Math.round(te/parseFloat(V)*1e3)/1e3);if(Ae===0||Ve===0||fx(r)&&!gO(r))return;const{offset:ze,targetOffset:We}=B;let[me,Se]=Mie(j,ze);const[ne,xe]=Mie(U,We);U.x-=ne,U.y-=xe;const[oe,_e]=B.points||[],ue=Pie(_e),tt=Pie(oe),Re=Cx(U,ue),et=Cx(j,tt),Xe=X({},B);let ot=[tt,ue],Ge=Re.x-et.x+me,ht=Re.y-et.y+Se;const Je=E(Ge,ht),St=E(Ge,ht,ce),He=Cx(U,["t","l"]),dt=Cx(j,["t","l"]),Oe=Cx(U,["b","r"]),vt=Cx(j,["b","r"]),qe=B.overflow||{},{adjustX:Me,adjustY:lt,shiftX:it,shiftY:Ue}=qe,we=l(Ut=>typeof Ut=="boolean"?Ut:Ut>=0,"supportAdjust");let gt,ge,ie,be;k();const $e=we(lt),le=tt[0]===ue[0];if($e&&tt[0]==="t"&&(ge>ye.bottom||p.current.bt)){let Ut=ht;le?Ut-=te-J:Ut=He.y-vt.y-Se;const rt=E(Ge,Ut),vr=E(Ge,Ut,ce);rt>Je||rt===Je&&(!Ce||vr>=St)?(p.current.bt=!0,ht=Ut,Se=-Se,ot=[_0(ot[0],0),_0(ot[1],0)]):p.current.bt=!1}if($e&&tt[0]==="b"&&(gt<ye.top||p.current.tb)){let Ut=ht;le?Ut+=te-J:Ut=Oe.y-dt.y-Se;const rt=E(Ge,Ut),vr=E(Ge,Ut,ce);rt>Je||rt===Je&&(!Ce||vr>=St)?(p.current.tb=!0,ht=Ut,Se=-Se,ot=[_0(ot[0],0),_0(ot[1],0)]):p.current.tb=!1}const ke=we(Me),je=tt[1]===ue[1];if(ke&&tt[1]==="l"&&(be>ye.right||p.current.rl)){let Ut=Ge;je?Ut-=ee-ae:Ut=He.x-vt.x-me;const rt=E(Ut,ht),vr=E(Ut,ht,ce);rt>Je||rt===Je&&(!Ce||vr>=St)?(p.current.rl=!0,Ge=Ut,me=-me,ot=[_0(ot[0],1),_0(ot[1],1)]):p.current.rl=!1}if(ke&&tt[1]==="r"&&(ie<ye.left||p.current.lr)){let Ut=Ge;je?Ut+=ee-ae:Ut=Oe.x-dt.x-me;const rt=E(Ut,ht),vr=E(Ut,ht,ce);rt>Je||rt===Je&&(!Ce||vr>=St)?(p.current.lr=!0,Ge=Ut,me=-me,ot=[_0(ot[0],1),_0(ot[1],1)]):p.current.lr=!1}Xe.points=[Rie(ot[0]),Rie(ot[1])],k();const ut=it===!0?0:it;typeof ut=="number"&&(ie<ce.left&&(Ge-=ie-ce.left-me,U.x+ae<ce.left+ut&&(Ge+=U.x-ce.left+ae-ut)),be>ce.right&&(Ge-=be-ce.right-me,U.x>ce.right-ut&&(Ge+=U.x-ce.right+ut)));const Qe=Ue===!0?0:Ue;typeof Qe=="number"&&(gt<ce.top&&(ht-=gt-ce.top-Se,U.y+J<ce.top+Qe&&(ht+=U.y-ce.top+J-Qe)),ge>ce.bottom&&(ht-=ge-ce.bottom-Se,U.y>ce.bottom-Qe&&(ht+=U.y-ce.bottom+Qe)));const Ze=j.x+Ge,st=Ze+ee,Ct=j.y+ht,Mt=Ct+te,Bt=U.x,Pt=Bt+ae,Pe=U.y,at=Pe+J,yt=Math.max(Ze,Bt),Tt=Math.min(st,Pt),zt=(yt+Tt)/2-Ze,Jt=Math.max(Ct,Pe),Ht=Math.min(Mt,at),_t=(Jt+Ht)/2-Ct;s==null||s(e,Xe);let Ot=pe.right-j.x-(Ge+j.width),er=pe.bottom-j.y-(ht+j.height);Ae===1&&(Ge=Math.floor(Ge),Ot=Math.floor(Ot)),Ve===1&&(ht=Math.floor(ht),er=Math.floor(er));const Ye={ready:!0,offsetX:Ge/Ae,offsetY:ht/Ve,offsetR:Ot/Ae,offsetB:er/Ve,arrowX:zt/Ae,arrowY:_t/Ve,scaleX:Ae,scaleY:Ve,align:Xe};h(Ye)}}),y=l(()=>{d.current+=1;const b=d.current;Promise.resolve().then(()=>{d.current===b&&m()})},"triggerAlign"),v=l(()=>{h(b=>Ne(X({},b),{ready:!1}))},"resetReady");return On(v,[n]),On(()=>{t||v()},[t]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,y]}l(Oie,"useAlign");function Die(){const t=G.useRef(null),e=l(()=>{t.current&&(clearTimeout(t.current),t.current=null)},"clearDelay"),r=l((n,a)=>{e(),a===0?n():t.current=setTimeout(()=>{n()},a*1e3)},"delayInvoke");return G.useEffect(()=>()=>{e()},[]),r}l(Die,"useDelay");function _Xe(t,e,r,n,a){On(()=>{if(t&&e&&r){let i=l(function(){n(),a()},"notifyScroll2");const s=e,o=r,u=mO(s),h=mO(o),d=hS(o),f=new Set([d,...u,...h]);return f.forEach(p=>{p.addEventListener("scroll",i,{passive:!0})}),d.addEventListener("resize",i,{passive:!0}),n(),()=>{f.forEach(p=>{p.removeEventListener("scroll",i),d.removeEventListener("resize",i)})}}},[t,e,r])}l(_Xe,"useWatch");function kXe(t,e,r,n,a,i,s,o){const u=G.useRef(t);u.current=t;const h=G.useRef(!1);G.useEffect(()=>{var f,p;if(e&&n&&(!a||i)){const g=l(()=>{h.current=!1},"onPointerDown"),m=l(b=>{var w,x;u.current&&!s(((x=(w=b.composedPath)==null?void 0:w.call(b))==null?void 0:x[0])||b.target)&&!h.current&&o(!1)},"onTriggerClose"),y=hS(n);y.addEventListener("pointerdown",g,!0),y.addEventListener("mousedown",m,!0),y.addEventListener("contextmenu",m,!0);const v=e6(r);if(v&&(v.addEventListener("mousedown",m,!0),v.addEventListener("contextmenu",m,!0)),r){const b=(f=r.getRootNode)==null?void 0:f.call(r),w=(p=n.getRootNode)==null?void 0:p.call(n);p0(b===w,"trigger element and popup element should in same shadow root.")}return()=>{y.removeEventListener("pointerdown",g,!0),y.removeEventListener("mousedown",m,!0),y.removeEventListener("contextmenu",m,!0),v&&(v.removeEventListener("mousedown",m,!0),v.removeEventListener("contextmenu",m,!0))}}},[e,r,n,a,i]);function d(){h.current=!0}return l(d,"onPopupPointerDown"),d}l(kXe,"useWinClick");function AXe(){const[t,e]=N.useState(null),[r,n]=N.useState(!1),[a,i]=N.useState(!1),s=N.useRef(null),o=Ur(h=>{h===!1?(s.current=null,n(!1)):a&&r?s.current=h:(n(!0),e(h),s.current=null,r||i(!0))}),u=Ur(h=>{h?(i(!1),s.current&&(e(s.current),s.current=null)):(i(!1),s.current=null)});return[o,r,t,u]}l(AXe,"useTargetState");function yO(){return yO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},yO.apply(this,arguments)}l(yO,"_extends11");var NXe=l(t=>{const{prefixCls:e,isMobile:r,ready:n,open:a,align:i,offsetR:s,offsetB:o,offsetX:u,offsetY:h,arrowPos:d,popupSize:f,motion:p,uniqueContainerClassName:g,uniqueContainerStyle:m}=t,y=`${e}-unique-container`,[v,b]=N.useState(!1),w=Sie(r,n,a,i,s,o,u,h),x=N.useRef(w);n&&(x.current=w);const T={};return f&&(T.width=f.width,T.height=f.height),N.createElement(zc,yO({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${y}-hidden`},p,{visible:a,onVisibleChanged:l(C=>{b(C)},"onVisibleChanged")}),({className:C,style:S})=>{const E=pt(y,C,g,{[`${y}-visible`]:v});return N.createElement("div",{className:E,style:X(X(X(X({"--arrow-x":`${(d==null?void 0:d.x)||0}px`,"--arrow-y":`${(d==null?void 0:d.y)||0}px`},x.current),T),S),m)})})},"UniqueContainer"),IXe=NXe,LXe=l(({children:t,postTriggerProps:e})=>{const[r,n,a,i]=AXe(),s=G.useMemo(()=>!a||!e?a:e(a),[a,e]),[o,u]=G.useState(null),[h,d]=G.useState(null),f=G.useRef(null),p=Ur(B=>{f.current=B,fx(B)&&o!==B&&u(B)}),g=G.useRef(null),m=Die(),y=Ur((B,W)=>{g.current=W,m(()=>{r(B)},B.delay)}),v=l(B=>{m(()=>{var W;(W=g.current)!=null&&W.call(g)||r(!1)},B)},"hide"),b=Ur(B=>{i(B)}),[w,x,T,C,S,E,k,,,A,I]=Oie(n,o,s==null?void 0:s.target,s==null?void 0:s.popupPlacement,(s==null?void 0:s.builtinPlacements)||{},s==null?void 0:s.popupAlign,void 0,!1),L=G.useMemo(()=>{var W;if(!s)return"";const B=Iie(s.builtinPlacements||{},s.prefixCls||"",A,!1);return pt(B,(W=s.getPopupClassNameFromAlign)==null?void 0:W.call(s,A))},[A,s==null?void 0:s.getPopupClassNameFromAlign,s==null?void 0:s.builtinPlacements,s==null?void 0:s.prefixCls]),R=G.useMemo(()=>({show:y,hide:v}),[]);G.useEffect(()=>{I()},[s==null?void 0:s.target]);const O=Ur(()=>(I(),Promise.resolve())),M=G.useRef({}),P=G.useContext(f6),z=G.useMemo(()=>({registerSubPopup:l((B,W)=>{M.current[B]=W,P==null||P.registerSubPopup(B,W)},"registerSubPopup")}),[P]),D=s==null?void 0:s.prefixCls;return G.createElement(Aie.Provider,{value:R},t,s&&G.createElement(f6.Provider,{value:z},G.createElement(kie,{ref:p,portal:d6,onEsc:s.onEsc,prefixCls:D,popup:s.popup,className:pt(s.popupClassName,L,`${D}-unique-controlled`),style:s.popupStyle,target:s.target,open:n,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:b,ready:w,offsetX:x,offsetY:T,offsetR:C,offsetB:S,onAlign:I,onPrepare:O,onResize:l(B=>d({width:B.offsetWidth,height:B.offsetHeight}),"onResize"),arrowPos:{x:E,y:k},align:A,zIndex:s.zIndex,mask:s.mask,arrow:s.arrow,motion:s.popupMotion,maskMotion:s.maskMotion,getPopupContainer:s.getPopupContainer},G.createElement(IXe,{prefixCls:D,isMobile:!1,ready:w,open:n,align:A,offsetR:C,offsetB:S,offsetX:x,offsetY:T,arrowPos:{x:E,y:k},popupSize:h,motion:s.popupMotion,uniqueContainerClassName:pt(s.uniqueContainerClassName,L),uniqueContainerStyle:s.uniqueContainerStyle}))))},"UniqueProvider"),$Xe=LXe;function MXe(t=d6){const e=G.forwardRef((r,n)=>{const Us=r,{prefixCls:a="rc-trigger-popup",children:i,action:s="hover",showAction:o,hideAction:u,popupVisible:h,defaultPopupVisible:d,onOpenChange:f,afterOpenChange:p,onPopupVisibleChange:g,afterPopupVisibleChange:m,mouseEnterDelay:y,mouseLeaveDelay:v=.1,focusDelay:b,blurDelay:w,mask:x,maskClosable:T=!0,getPopupContainer:C,forceRender:S,autoDestroy:E,popup:k,popupClassName:A,uniqueContainerClassName:I,uniqueContainerStyle:L,popupStyle:R,popupPlacement:O,builtinPlacements:M={},popupAlign:P,zIndex:z,stretch:D,getPopupClassNameFromAlign:B,fresh:W,unique:U,alignPoint:j,onPopupClick:V,onPopupAlign:Y,arrow:H,popupMotion:q,maskMotion:Z,mobile:K}=Us,re=Xt(Us,["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onOpenChange","afterOpenChange","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","popup","popupClassName","uniqueContainerClassName","uniqueContainerStyle","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","unique","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","mobile"]),Q=E||!1,te=h===void 0,ee=!!K,J=G.useRef({}),ae=G.useContext(f6),se=G.useMemo(()=>({registerSubPopup:l((lr,$r)=>{J.current[lr]=$r,ae==null||ae.registerSubPopup(lr,$r)},"registerSubPopup")}),[ae]),fe=G.useContext(Aie),ve=S0(),[de,Ee]=G.useState(null),Ce=G.useRef(null),De=Ur(lr=>{Ce.current=lr,fx(lr)&&de!==lr&&Ee(lr),ae==null||ae.registerSubPopup(ve,lr)}),[ce,Ie]=G.useState(null),ye=G.useRef(null),pe=Ur(lr=>{const $r=px(lr);fx($r)&&ce!==$r&&(Ie($r),ye.current=$r)}),Ae={},Ve=Ur(lr=>{var xn,ka;const $r=ce;return($r==null?void 0:$r.contains(lr))||((xn=e6($r))==null?void 0:xn.host)===lr||lr===$r||(de==null?void 0:de.contains(lr))||((ka=e6(de))==null?void 0:ka.host)===lr||lr===de||Object.values(J.current).some(di=>(di==null?void 0:di.contains(lr))||lr===di)}),ze=H?X({},H!==!0?H:{}):null,[We,me]=Ta(d||!1,h),Se=We||!1,ne=G.useMemo(()=>{const lr=typeof i=="function"?i({open:Se}):i;return G.Children.only(lr)},[i,Se]),xe=(ne==null?void 0:ne.props)||{},oe=Ur(()=>Se),_e=Ur((lr=0)=>({popup:k,target:ce,delay:lr,prefixCls:a,popupClassName:A,uniqueContainerClassName:I,uniqueContainerStyle:L,popupStyle:R,popupPlacement:O,builtinPlacements:M,popupAlign:P,zIndex:z,mask:x,maskClosable:T,popupMotion:q,maskMotion:Z,arrow:ze,getPopupContainer:C,getPopupClassNameFromAlign:B,id:ve,onEsc:Xe}));On(()=>{fe&&U&&ce&&!te&&!ae&&(Se?fe.show(_e(y),oe):fe.hide(v))},[Se,ce]);const ue=G.useRef(Se);ue.current=Se;const tt=Ur(lr=>{Rn.flushSync(()=>{Se!==lr&&(me(lr),f==null||f(lr),g==null||g(lr))})}),Re=Die(),et=l((lr,$r=0)=>{if(h!==void 0){Re(()=>{tt(lr)},$r);return}if(fe&&U&&te&&!ae){lr?fe.show(_e($r),oe):fe.hide($r);return}Re(()=>{tt(lr)},$r)},"triggerOpen");function Xe({top:lr}){lr&&et(!1)}l(Xe,"onEsc");const[ot,Ge]=G.useState(!1);On(lr=>{(!lr||Se)&&Ge(!0)},[Se]);const[ht,Je]=G.useState(null),[St,He]=G.useState(null),dt=l(lr=>{He([lr.clientX,lr.clientY])},"setMousePosByEvent"),[Oe,vt,qe,Me,lt,it,Ue,we,gt,ge,ie]=Oie(Se,de,j&&St!==null?St:ce,O,M,P,Y,ee),[be,$e]=CXe(s,o,u),le=be.has("click"),ke=$e.has("click")||$e.has("contextMenu"),je=Ur(()=>{ot||ie()});_Xe(Se,ce,de,je,l(()=>{ue.current&&j&&ke&&et(!1)},"onScroll")),On(()=>{je()},[St,O]),On(()=>{Se&&!(M!=null&&M[O])&&je()},[JSON.stringify(P)]);const Qe=G.useMemo(()=>{const lr=Iie(M,a,ge,j);return pt(lr,B==null?void 0:B(ge))},[ge,B,M,a,j]);G.useImperativeHandle(n,()=>({nativeElement:ye.current,popupElement:Ce.current,forceAlign:je}));const[Ze,st]=G.useState(0),[Ct,Mt]=G.useState(0),Bt=l(()=>{if(D&&ce){const lr=ce.getBoundingClientRect();st(lr.width),Mt(lr.height)}},"syncTargetSize"),Pt=l(()=>{Bt(),je()},"onTargetResize"),Pe=l(lr=>{Ge(!1),ie(),p==null||p(lr),m==null||m(lr)},"onVisibleChanged"),at=l(()=>new Promise(lr=>{Bt(),Je(()=>lr)}),"onPrepare");On(()=>{ht&&(ie(),ht(),Je(null))},[ht]);function yt(lr,$r,xn,ka,di){Ae[lr]=(cr,...ct)=>{var $t;(!di||!di())&&(ka==null||ka(cr),et($r,xn)),($t=xe[lr])==null||$t.call(xe,cr,...ct)}}l(yt,"wrapperAction");const Tt=be.has("touch"),Nt=$e.has("touch"),zt=G.useRef(!1);(Tt||Nt)&&(Ae.onTouchStart=(...lr)=>{var $r;zt.current=!0,ue.current&&Nt?et(!1):!ue.current&&Tt&&et(!0),($r=xe.onTouchStart)==null||$r.call(xe,...lr)}),(le||ke)&&(Ae.onClick=(lr,...$r)=>{var xn;ue.current&&ke?et(!1):!ue.current&&le&&(dt(lr),et(!0)),(xn=xe.onClick)==null||xn.call(xe,lr,...$r),zt.current=!1});const Jt=kXe(Se,ke||Nt,ce,de,x,T,Ve,et),Ht=be.has("hover"),wt=$e.has("hover");let _t,Ot;const er=l(()=>zt.current,"ignoreMouseTrigger");if(Ht){const lr=l($r=>{dt($r)},"onMouseEnterCallback");yt("onMouseEnter",!0,y,lr,er),yt("onPointerEnter",!0,y,lr,er),_t=l($r=>{(Se||ot)&&(de!=null&&de.contains($r.target))&&et(!0,y)},"onPopupMouseEnter"),j&&(Ae.onMouseMove=$r=>{var xn;(xn=xe.onMouseMove)==null||xn.call(xe,$r)})}wt&&(yt("onMouseLeave",!1,v,void 0,er),yt("onPointerLeave",!1,v,void 0,er),Ot=l(()=>{et(!1,v)},"onPopupMouseLeave")),be.has("focus")&&yt("onFocus",!0,b),$e.has("focus")&&yt("onBlur",!1,w),be.has("contextMenu")&&(Ae.onContextMenu=(lr,...$r)=>{var xn;ue.current&&$e.has("contextMenu")?et(!1):(dt(lr),et(!0)),lr.preventDefault(),(xn=xe.onContextMenu)==null||xn.call(xe,lr,...$r)});const Ye=G.useRef(!1);Ye.current||(Ye.current=S||Se||ot);const Ut=X(X({},xe),Ae),rt={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(lr=>{re[lr]&&(rt[lr]=(...$r)=>{var xn;(xn=Ut[lr])==null||xn.call(Ut,...$r),re[lr](...$r)})});const en={x:it,y:Ue};dne(Se,ce,Pt);const Pn=bg(pe,xg(ne)),ia=G.cloneElement(ne,Ne(X(X({},Ut),rt),{ref:Pn}));return G.createElement(G.Fragment,null,ia,Ye.current&&(!fe||!U)&&G.createElement(f6.Provider,{value:se},G.createElement(kie,{portal:t,ref:De,prefixCls:a,popup:k,className:pt(A,!ee&&Qe),style:R,target:ce,onMouseEnter:_t,onMouseLeave:Ot,onPointerEnter:_t,zIndex:z,open:Se,keepDom:ot,fresh:W,onClick:V,onPointerDownCapture:Jt,mask:x,motion:q,maskMotion:Z,onVisibleChanged:Pe,onPrepare:at,forceRender:S,autoDestroy:Q,getPopupContainer:C,onEsc:Xe,align:ge,arrow:ze,arrowPos:en,ready:Oe,offsetX:vt,offsetY:qe,offsetR:Me,offsetB:lt,onAlign:je,stretch:D,targetWidth:Ze/we,targetHeight:Ct/gt,mobile:K})))});return e.displayName="Trigger",e}l(MXe,"generateTrigger");var p6=MXe(d6);function Fie(t){return t&&N.isValidElement(t)&&t.type===N.Fragment}l(Fie,"isFragment2");var PXe=l((t,e,r)=>N.isValidElement(t)?N.cloneElement(t,typeof r=="function"?r(t.props||{}):r):e,"replaceElement");function bh(t,e){return PXe(t,t,e)}l(bh,"cloneElement5");var RXe=l(({children:t})=>{const{getPrefixCls:e}=N.useContext(vn),r=e();return N.isValidElement(t)?N.createElement(zc,{visible:!0,motionName:`${r}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:n,className:a})=>bh(t,i=>({className:pt(i.className,a),style:X(X({},i.style),n)}))):t},"MotionContent"),OXe=RXe,g6=[null,null];function DXe(t){if(g6[0]!==t){const e={};Object.keys(t).forEach(r=>{e[r]=Ne(X({},t[r]),{dynamicInset:!1})}),g6[0]=t,g6[1]=e}return g6[1]}l(DXe,"uniqueBuiltinPlacements");var FXe=l(({children:t})=>{const e=l(r=>{const{id:n,builtinPlacements:a,popup:i}=r,s=typeof i=="function"?i():i,o=DXe(a);return Ne(X({},r),{getPopupContainer:null,arrow:!1,popup:N.createElement(OXe,{key:n},s),builtinPlacements:o})},"renderPopup");return N.createElement($Xe,{postTriggerProps:e},t)},"UniqueProvider2"),Bie=FXe,vO=G.createContext(!1),zie=l(({children:t,disabled:e})=>{const r=G.useContext(vO);return G.createElement(vO.Provider,{value:e!=null?e:r},t)},"DisabledContextProvider"),xh=vO,bO=G.createContext(void 0),BXe=l(({children:t,size:e})=>{const r=G.useContext(bO);return G.createElement(bO.Provider,{value:e||r},t)},"SizeContextProvider"),m6=bO;function zXe(){const t=N.useContext(xh),e=N.useContext(m6);return{componentDisabled:t,componentSize:e}}l(zXe,"useConfig");var HXe=zXe;function WXe(t,e,r){var o,u;const n=Tn("ConfigProvider"),a=t||{},i=a.inherit===!1||!e?Ne(X({},aS),{hashed:(o=e==null?void 0:e.hashed)!=null?o:aS.hashed,cssVar:e==null?void 0:e.cssVar}):e,s=N.useId();{const h=a.cssVar||i.cssVar,d=!!(typeof a.cssVar=="object"&&((u=a.cssVar)!=null&&u.key)||s);n(!h||d,"breaking","Missing key in `cssVar` config. Please upgrade to React 18 or set `cssVar.key` manually in each ConfigProvider inside `cssVar` enabled ConfigProvider.")}return ux(()=>{var p;if(!t)return e;const h=X({},i.components);Object.keys(t.components||{}).forEach(g=>{h[g]=X(X({},h[g]),t.components[g])});const d=`css-var-${s.replace(/:/g,"")}`,f=Ne(X(X({prefix:r==null?void 0:r.prefixCls},i.cssVar),a.cssVar),{key:((p=a.cssVar)==null?void 0:p.key)||d});return Ne(X(X({},i),a),{token:X(X({},i.token),a.token),components:h,cssVar:f})},[a,i],(h,d)=>h.some((f,p)=>{const g=d[p];return!v0(f,g,!0)}))}l(WXe,"useTheme");var xO=G.createContext(!0);xO.displayName="MotionCacheContext";function VXe(t){const e=G.useContext(xO),{children:r}=t,[,n]=Il(),{motion:a}=n,i=G.useRef(!1);return i.current||(i.current=e!==a),i.current?G.createElement(xO.Provider,{value:a},G.createElement(tKe,{motion:a},r)):r}l(VXe,"MotionWrapper");var Hie=G.memo(({dropdownMatchSelectWidth:t})=>(Tn("ConfigProvider").deprecated(t===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),null));Hie.displayName="PropWarning";var GXe=Hie,qXe=l(({iconPrefixCls:t,csp:e})=>(Ije(t,e),null),"IconStyle"),YXe=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"],UXe=l(t=>{const{prefixCls:e,iconPrefixCls:r,theme:n,holderRender:a}=t},"setGlobalConfig"),jXe=l(t=>{const{children:e,csp:r,autoInsertSpaceInButton:n,alert:a,affix:i,anchor:s,app:o,form:u,locale:h,componentSize:d,direction:f,space:p,splitter:g,virtual:m,dropdownMatchSelectWidth:y,popupMatchSelectWidth:v,popupOverflow:b,legacyLocale:w,parentContext:x,iconPrefixCls:T,theme:C,componentDisabled:S,segmented:E,statistic:k,spin:A,calendar:I,carousel:L,cascader:R,collapse:O,typography:M,checkbox:P,descriptions:z,divider:D,drawer:B,skeleton:W,steps:U,image:j,layout:V,list:Y,mentions:H,modal:q,progress:Z,result:K,slider:re,breadcrumb:Q,masonry:te,menu:ee,pagination:J,input:ae,textArea:se,otp:fe,empty:ve,badge:de,radio:Ee,rate:Ce,ribbon:De,switch:ce,transfer:Ie,avatar:ye,message:pe,tag:Ae,table:Ve,card:ze,cardMeta:We,tabs:me,timeline:Se,timePicker:ne,upload:xe,notification:oe,tree:_e,colorPicker:ue,datePicker:tt,rangePicker:Re,flex:et,wave:Xe,dropdown:ot,warning:Ge,tour:ht,tooltip:Je,popover:St,popconfirm:He,qrcode:dt,floatButton:Oe,floatButtonGroup:vt,variant:qe,inputNumber:Me,treeSelect:lt,watermark:it}=t,Ue=G.useCallback((Ze,st)=>{const{prefixCls:Ct}=t;if(st)return st;const Mt=Ct||x.getPrefixCls("");return Ze?`${Mt}-${Ze}`:Mt},[x.getPrefixCls,t.prefixCls]),we=T||x.iconPrefixCls||XR,gt=r||x.csp,ge=WXe(C,x.theme,{prefixCls:Ue("")}),ie={csp:gt,autoInsertSpaceInButton:n,alert:a,affix:i,anchor:s,app:o,locale:h||w,direction:f,space:p,splitter:g,virtual:m,popupMatchSelectWidth:v!=null?v:y,popupOverflow:b,getPrefixCls:Ue,iconPrefixCls:we,theme:ge,segmented:E,statistic:k,spin:A,calendar:I,carousel:L,cascader:R,collapse:O,typography:M,checkbox:P,descriptions:z,divider:D,drawer:B,skeleton:W,steps:U,image:j,input:ae,textArea:se,otp:fe,layout:V,list:Y,mentions:H,modal:q,progress:Z,result:K,slider:re,breadcrumb:Q,masonry:te,menu:ee,pagination:J,empty:ve,badge:de,radio:Ee,rate:Ce,ribbon:De,switch:ce,transfer:Ie,avatar:ye,message:pe,tag:Ae,table:Ve,card:ze,cardMeta:We,tabs:me,timeline:Se,timePicker:ne,upload:xe,notification:oe,tree:_e,colorPicker:ue,datePicker:tt,rangePicker:Re,flex:et,wave:Xe,dropdown:ot,warning:Ge,tour:ht,tooltip:Je,popover:St,popconfirm:He,qrcode:dt,floatButton:Oe,floatButtonGroup:vt,variant:qe,inputNumber:Me,treeSelect:lt,watermark:it};Tn("ConfigProvider")(!("autoInsertSpaceInButton"in t),"deprecated","`autoInsertSpaceInButton` is deprecated. Please use `{ button: { autoInsertSpace: boolean }}` instead.");const be=X({},x);Object.keys(ie).forEach(Ze=>{ie[Ze]!==void 0&&(be[Ze]=ie[Ze])}),YXe.forEach(Ze=>{const st=t[Ze];st&&(be[Ze]=st)}),typeof n!="undefined"&&(be.button=X({autoInsertSpace:n},be.button));const $e=ux(()=>be,be,(Ze,st)=>{const Ct=Object.keys(Ze),Mt=Object.keys(st);return Ct.length!==Mt.length||Ct.some(Bt=>Ze[Bt]!==st[Bt])}),{layer:le}=G.useContext(jC),ke=G.useMemo(()=>({prefixCls:we,csp:gt,layer:le?"antd":void 0}),[we,gt,le]);let je=G.createElement(G.Fragment,null,G.createElement(qXe,{iconPrefixCls:we,csp:gt}),G.createElement(GXe,{dropdownMatchSelectWidth:y}),e);const ut=G.useMemo(()=>{var Ze,st,Ct,Mt;return dx(((Ze=E0.Form)==null?void 0:Ze.defaultValidateMessages)||{},((Ct=(st=$e.locale)==null?void 0:st.Form)==null?void 0:Ct.defaultValidateMessages)||{},((Mt=$e.form)==null?void 0:Mt.validateMessages)||{},(u==null?void 0:u.validateMessages)||{})},[$e,u==null?void 0:u.validateMessages]);Object.keys(ut).length>0&&(je=G.createElement(aXe.Provider,{value:ut},je)),h&&(je=G.createElement(WKe,{locale:h,_ANT_MARK__:iie},je)),je=G.createElement(W9.Provider,{value:ke},je),d&&(je=G.createElement(BXe,{size:d},je)),je=G.createElement(VXe,null,je),Je!=null&&Je.unique&&(je=G.createElement(Bie,null,je));const Qe=G.useMemo(()=>{const yt=ge||{},{algorithm:Ze,token:st,components:Ct,cssVar:Mt}=yt,Bt=Xt(yt,["algorithm","token","components","cssVar"]),Pt=Ze&&(!Array.isArray(Ze)||Ze.length>0)?zk(Ze):B9,Pe={};Object.entries(Ct||{}).forEach(([Tt,Nt])=>{const zt=X({},Nt);"algorithm"in zt&&(zt.algorithm===!0?zt.theme=Pt:(Array.isArray(zt.algorithm)||typeof zt.algorithm=="function")&&(zt.theme=zk(zt.algorithm)),delete zt.algorithm),Pe[Tt]=zt});const at=X(X({},bx),st);return Ne(X({},Bt),{theme:Pt,token:at,components:Pe,override:X({override:at},Pe),cssVar:Mt})},[ge]);return C&&(je=G.createElement(z9.Provider,{value:Qe},je)),$e.warning&&(je=G.createElement(une.Provider,{value:$e.warning},je)),S!==void 0&&(je=G.createElement(zie,{disabled:S},je)),G.createElement(vn.Provider,{value:$e},je)},"ProviderChildren"),kg=l(t=>{const e=G.useContext(vn),r=G.useContext(oO);return G.createElement(jXe,X({parentContext:e,legacyLocale:r},t))},"ConfigProvider");kg.ConfigContext=vn,kg.SizeContext=m6,kg.config=UXe,kg.useConfig=HXe,Object.defineProperty(kg,"SizeContext",{get:l(()=>(VR(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),m6),"get")}),kg.displayName="ConfigProvider";var y6=kg,KXe={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},gr=KXe;function v6(){return v6=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},v6.apply(this,arguments)}l(v6,"_extends12");var XXe=G.forwardRef((t,e)=>{var P;const{prefixCls:r,style:n,className:a,duration:i=4.5,showProgress:s,pauseOnHover:o=!0,eventKey:u,content:h,closable:d,props:f,onClick:p,onNoticeClose:g,times:m,hovering:y}=t,[v,b]=G.useState(!1),[w,x]=G.useState(0),[T,C]=G.useState(0),S=y||v,E=typeof i=="number"?i:0,k=E>0&&s,A=l(()=>{g(u)},"onInternalClose"),I=l(z=>{(z.key==="Enter"||z.code==="Enter"||z.keyCode===gr.ENTER)&&A()},"onCloseKeyDown");G.useEffect(()=>{if(!S&&E>0){const z=Date.now()-T,D=setTimeout(()=>{A()},E*1e3-T);return()=>{o&&clearTimeout(D),C(Date.now()-z)}}},[E,S,m]),G.useEffect(()=>{if(!S&&k&&(o||T===0)){const z=performance.now();let D;const B=l(()=>{cancelAnimationFrame(D),D=requestAnimationFrame(W=>{const U=W+T-z,j=Math.min(U/(E*1e3),1);x(j*100),j<1&&B()})},"calculate");return B(),()=>{o&&cancelAnimationFrame(D)}}},[E,T,S,k,m]);const L=G.useMemo(()=>typeof d=="object"&&d!==null?d:{},[d]),R=Hc(L,!0),O=100-(!w||w<0?0:w>100?100:w),M=`${r}-notice`;return G.createElement("div",v6({},f,{ref:e,className:pt(M,a,{[`${M}-closable`]:d}),style:n,onMouseEnter:l(z=>{var D;b(!0),(D=f==null?void 0:f.onMouseEnter)==null||D.call(f,z)},"onMouseEnter"),onMouseLeave:l(z=>{var D;b(!1),(D=f==null?void 0:f.onMouseLeave)==null||D.call(f,z)},"onMouseLeave"),onClick:p}),G.createElement("div",{className:`${M}-content`},h),d&&G.createElement("button",v6({className:`${M}-close`,onKeyDown:I,"aria-label":"Close"},R,{onClick:l(z=>{z.preventDefault(),z.stopPropagation(),A()},"onClick")}),(P=L.closeIcon)!=null?P:"x"),k&&G.createElement("progress",{className:`${M}-progress`,max:"100",value:O},O+"%"))}),ZXe=XXe,Wie=N.createContext({}),QXe=l(({children:t,classNames:e})=>N.createElement(Wie.Provider,{value:{classNames:e}},t),"NotificationProvider"),Vie=QXe,Gie=8,qie=3,Yie=16,JXe=l(t=>{var r,n,a;const e={offset:Gie,threshold:qie,gap:Yie};return t&&typeof t=="object"&&(e.offset=(r=t.offset)!=null?r:Gie,e.threshold=(n=t.threshold)!=null?n:qie,e.gap=(a=t.gap)!=null?a:Yie),[!!t,e]},"useStack"),eZe=JXe;function b6(){return b6=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},b6.apply(this,arguments)}l(b6,"_extends13");var Uie=l(t=>{const{configList:e,placement:r,prefixCls:n,className:a,style:i,motion:s,onAllNoticeRemoved:o,onNoticeClose:u,stack:h}=t,{classNames:d}=N.useContext(Wie),f=N.useRef({}),[p,g]=N.useState(null),[m,y]=N.useState([]),v=e.map(E=>({config:E,key:String(E.key)})),[b,{offset:w,threshold:x,gap:T}]=eZe(h),C=b&&(m.length>0||v.length<=x),S=typeof s=="function"?s(r):s;return N.useEffect(()=>{b&&m.length>1&&y(E=>E.filter(k=>v.some(({key:A})=>k===A)))},[m,v,b]),N.useEffect(()=>{var E,k;b&&f.current[(E=v[v.length-1])==null?void 0:E.key]&&g(f.current[(k=v[v.length-1])==null?void 0:k.key])},[v,b]),N.createElement(xKe,b6({key:r,className:pt(n,`${n}-${r}`,d==null?void 0:d.list,a,{[`${n}-stack`]:!!b,[`${n}-stack-expanded`]:C}),style:i,keys:v,motionAppear:!0},S,{onAllRemoved:l(()=>{o(r)},"onAllRemoved")}),({config:E,className:k,style:A,index:I},L)=>{var Y,H,q,Z;const{key:R,times:O}=E,M=String(R),V=E,{className:P,style:z,classNames:D,styles:B}=V,W=Xt(V,["className","style","classNames","styles"]),U=v.findIndex(K=>K.key===M),j={};if(b){const K=v.length-1-(U>-1?U:I-1),re=r==="top"||r==="bottom"?"-50%":"0";if(K>0){j.height=C?(Y=f.current[M])==null?void 0:Y.offsetHeight:p==null?void 0:p.offsetHeight;let Q=0;for(let J=0;J<K;J++)Q+=((H=f.current[v[v.length-1-J].key])==null?void 0:H.offsetHeight)+T;const te=(C?Q:K*w)*(r.startsWith("top")?1:-1),ee=!C&&(p!=null&&p.offsetWidth)&&((q=f.current[M])!=null&&q.offsetWidth)?((p==null?void 0:p.offsetWidth)-w*2*(K<3?K:3))/((Z=f.current[M])==null?void 0:Z.offsetWidth):1;j.transform=`translate3d(${re}, ${te}px, 0) scaleX(${ee})`}else j.transform=`translate3d(${re}, 0, 0)`}return N.createElement("div",{ref:L,className:pt(`${n}-notice-wrapper`,k,D==null?void 0:D.wrapper),style:X(X(X({},A),j),B==null?void 0:B.wrapper),onMouseEnter:l(()=>y(K=>K.includes(M)?K:[...K,M]),"onMouseEnter"),onMouseLeave:l(()=>y(K=>K.filter(re=>re!==M)),"onMouseLeave")},N.createElement(ZXe,b6({},W,{ref:l(K=>{U>-1?f.current[M]=K:delete f.current[M]},"ref"),prefixCls:n,classNames:D,styles:B,className:pt(P,d==null?void 0:d.notice),style:z,times:O,key:R,eventKey:R,onNoticeClose:u,hovering:b&&m.length>0})))})},"NoticeList");Uie.displayName="NoticeList";var tZe=Uie,jie=G.forwardRef((t,e)=>{const{prefixCls:r="rc-notification",container:n,motion:a,maxCount:i,className:s,style:o,onAllRemoved:u,stack:h,renderNotifications:d}=t,[f,p]=G.useState([]),g=l(x=>{var k;const T=f.find(A=>A.key===x),C=T==null?void 0:T.closable,S=C&&typeof C=="object"?C:{},{onClose:E}=S;E==null||E(),(k=T==null?void 0:T.onClose)==null||k.call(T),p(A=>A.filter(I=>I.key!==x))},"onNoticeClose");G.useImperativeHandle(e,()=>({open:l(x=>{p(T=>{var k;let C=[...T];const S=C.findIndex(A=>A.key===x.key),E=X({},x);return S>=0?(E.times=(((k=T[S])==null?void 0:k.times)||0)+1,C[S]=E):(E.times=0,C.push(E)),i>0&&C.length>i&&(C=C.slice(-i)),C})},"open"),close:l(x=>{g(x)},"close"),destroy:l(()=>{p([])},"destroy")}));const[m,y]=G.useState({});G.useEffect(()=>{const x={};f.forEach(T=>{const{placement:C="topRight"}=T;C&&(x[C]=x[C]||[],x[C].push(T))}),Object.keys(m).forEach(T=>{x[T]=x[T]||[]}),y(x)},[f]);const v=l(x=>{y(T=>{const C=X({},T);return(C[x]||[]).length||delete C[x],C})},"onAllNoticeRemoved"),b=G.useRef(!1);if(G.useEffect(()=>{Object.keys(m).length>0?b.current=!0:b.current&&(u==null||u(),b.current=!1)},[m]),!n)return null;const w=Object.keys(m);return Rn.createPortal(G.createElement(G.Fragment,null,w.map(x=>{const T=m[x],C=G.createElement(tZe,{key:x,configList:T,placement:x,prefixCls:r,className:s==null?void 0:s(x),style:o==null?void 0:o(x),motion:a,onNoticeClose:g,onAllNoticeRemoved:v,stack:h});return d?d(C,{prefixCls:r,key:x}):C})),n)});jie.displayName="Notifications";var rZe=jie,nZe=l(()=>document.body,"defaultGetContainer"),Kie=0;function aZe(...t){const e={};return t.forEach(r=>{r&&Object.keys(r).forEach(n=>{const a=r[n];a!==void 0&&(e[n]=a)})}),e}l(aZe,"mergeConfig");function Xie(t={}){const x=t,{getContainer:e=nZe,motion:r,prefixCls:n,maxCount:a,className:i,style:s,onAllRemoved:o,stack:u,renderNotifications:h}=x,d=Xt(x,["getContainer","motion","prefixCls","maxCount","className","style","onAllRemoved","stack","renderNotifications"]),[f,p]=G.useState(),g=G.useRef(),m=G.createElement(rZe,{container:f,ref:g,prefixCls:n,motion:r,maxCount:a,className:i,style:s,onAllRemoved:o,stack:u,renderNotifications:h}),[y,v]=G.useState([]),b=Ur(T=>{const C=aZe(d,T);(C.key===null||C.key===void 0)&&(C.key=`rc-notification-${Kie}`,Kie+=1),v(S=>[...S,{type:"open",config:C}])}),w=G.useMemo(()=>({open:b,close:l(T=>{v(C=>[...C,{type:"close",key:T}])},"close"),destroy:l(()=>{v(T=>[...T,{type:"destroy"}])},"destroy")}),[]);return G.useEffect(()=>{p(e())}),G.useEffect(()=>{if(g.current&&y.length){y.forEach(S=>{switch(S.type){case"open":g.current.open(S.config);break;case"close":g.current.close(S.key);break;case"destroy":g.current.destroy();break}});let T,C;v(S=>((T!==S||!C)&&(T=S,C=S.filter(E=>!y.includes(E))),C))}},[y]),[w,m]}l(Xie,"useNotification");var iZe={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},sZe=iZe;function wO(){return wO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},wO.apply(this,arguments)}l(wO,"_extends14");var oZe=l((t,e)=>G.createElement(Vn,wO({},t,{ref:e,icon:sZe})),"LoadingOutlined2"),Zie=G.forwardRef(oZe);Zie.displayName="LoadingOutlined";var Sx=Zie,lZe=l(t=>{const{componentCls:e,iconCls:r,boxShadow:n,colorText:a,colorSuccess:i,colorError:s,colorWarning:o,colorInfo:u,fontSizeLG:h,motionEaseInOutCirc:d,motionDurationSlow:f,marginXS:p,paddingXS:g,borderRadiusLG:m,zIndexPopup:y,contentPadding:v,contentBg:b}=t,w=`${e}-notice`,x=new gn("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:g,transform:"translateY(0)",opacity:1}}),T=new gn("MessageMoveOut",{"0%":{maxHeight:t.height,padding:g,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}}),C={padding:g,textAlign:"center",[`${e}-custom-content`]:{display:"flex",alignItems:"center"},[`${e}-custom-content > ${r}`]:{marginInlineEnd:p,fontSize:h},[`${w}-content`]:{display:"inline-block",padding:v,background:b,borderRadius:m,boxShadow:n,pointerEvents:"all"},[`${e}-success > ${r}`]:{color:i},[`${e}-error > ${r}`]:{color:s},[`${e}-warning > ${r}`]:{color:o},[`${e}-info > ${r},
|
||
${e}-loading > ${r}`]:{color:u}};return[{[e]:Ne(X({},is(t)),{color:a,position:"fixed",top:p,width:"100%",pointerEvents:"none",zIndex:y,[`${e}-move-up`]:{animationFillMode:"forwards"},[`
|
||
${e}-move-up-appear,
|
||
${e}-move-up-enter
|
||
`]:{animationName:x,animationDuration:f,animationPlayState:"paused",animationTimingFunction:d},[`
|
||
${e}-move-up-appear${e}-move-up-appear-active,
|
||
${e}-move-up-enter${e}-move-up-enter-active
|
||
`]:{animationPlayState:"running"},[`${e}-move-up-leave`]:{animationName:T,animationDuration:f,animationPlayState:"paused",animationTimingFunction:d},[`${e}-move-up-leave${e}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[e]:{[`${w}-wrapper`]:X({},C)}},{[`${e}-notice-pure-panel`]:Ne(X({},C),{padding:0,textAlign:"start"})}]},"genMessageStyle"),cZe=l(t=>({zIndexPopup:t.zIndexPopupBase+h6+10,contentBg:t.colorBgElevated,contentPadding:`${(t.controlHeightLG-t.fontSize*t.lineHeight)/2}px ${t.paddingSM}px`}),"prepareComponentToken"),uZe=ea("Message",t=>{const e=Wn(t,{height:150});return lZe(e)},cZe),hZe={info:G.createElement(J9,null),success:G.createElement(U9,null),error:G.createElement(cS,null),warning:G.createElement(Z9,null),loading:G.createElement(Sx,null)},dZe=l(t=>{const{prefixCls:e,type:r,icon:n,children:a,classNames:i,styles:s}=t,o=n||r&&hZe[r],u=bh(o,h=>{const d=X(X({},h==null?void 0:h.style),s==null?void 0:s.icon);return{className:pt(h.className,i==null?void 0:i.icon),style:d}});return G.createElement("div",{className:pt(`${e}-custom-content`,`${e}-${r}`)},u,G.createElement("span",{className:i==null?void 0:i.content,style:s==null?void 0:s.content},a))},"PureContent");function fZe(t,e){return{motionName:e!=null?e:`${t}-move-up`}}l(fZe,"getMotion");function pZe(t){let e;const r=new Promise(a=>{e=t(()=>{a(!0)})}),n=l(()=>{e==null||e()},"result");return n.then=(a,i)=>r.then(a,i),n.promise=r,n}l(pZe,"wrapPromiseFn");var gZe=8,mZe=3,yZe=l(({children:t,prefixCls:e})=>{const r=Cu(e),[n,a]=uZe(e,r);return G.createElement(Vie,{classNames:{list:pt(n,a,r)}},t)},"Wrapper"),vZe=l((t,{prefixCls:e,key:r})=>G.createElement(yZe,{prefixCls:e,key:r},t),"renderNotifications"),bZe=G.forwardRef((t,e)=>{const{top:r,prefixCls:n,getContainer:a,maxCount:i,duration:s=mZe,rtl:o,transitionName:u,onAllRemoved:h,pauseOnHover:d=!0}=t,{getPrefixCls:f,direction:p,getPopupContainer:g}=Aa("message"),{message:m}=G.useContext(vn),y=n||f("message"),v=l(()=>({left:"50%",transform:"translateX(-50%)",top:r!=null?r:gZe}),"getStyle"),b=l(()=>pt({[`${y}-rtl`]:o!=null?o:p==="rtl"}),"getClassName"),w=l(()=>fZe(y,u),"getNotificationMotion"),[x,T]=Qa([t==null?void 0:t.classNames,m==null?void 0:m.classNames],[t==null?void 0:t.styles,m==null?void 0:m.styles],{props:t}),[C,S]=Xie({prefixCls:y,style:v,className:b,motion:w,closable:!1,duration:s,getContainer:l(()=>(a==null?void 0:a())||(g==null?void 0:g())||document.body,"getContainer"),maxCount:i,onAllRemoved:h,renderNotifications:vZe,pauseOnHover:d});return G.useImperativeHandle(e,()=>Ne(X({},C),{prefixCls:y,message:m,classNames:x,styles:T})),S}),Qie=0;function xZe(t){const e=G.useRef(null),r=Tn("Message");return[G.useMemo(()=>{const a=l(h=>{var d;(d=e.current)==null||d.close(h)},"close"),i=l(h=>{if(!e.current){r(!1,"usage","You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");const Y=l(()=>{},"fakeResult");return Y.then=()=>{},Y}const{open:d,prefixCls:f,message:p,classNames:g,styles:m}=e.current,y=(p==null?void 0:p.className)||{},v=(p==null?void 0:p.style)||{},b=(p==null?void 0:p.classNames)||{},w=(p==null?void 0:p.styles)||{},x=`${f}-notice`,V=h,{content:T,icon:C,type:S,key:E,className:k,style:A,onClose:I,classNames:L={},styles:R={}}=V,O=Xt(V,["content","icon","type","key","className","style","onClose","classNames","styles"]);let M=E;Eu(M)||(Qie+=1,M=`antd-message-${Qie}`);const P=X(X({},t),h),z=C0(b,{props:P}),D=C0(L,{props:P}),B=C0(w,{props:P}),W=C0(R,{props:P}),U=u6(void 0,z,D,g),j=cO(B,W,m);return pZe(Y=>(d(Ne(X({},O),{key:M,content:G.createElement(dZe,{prefixCls:f,type:S,icon:C,classNames:U,styles:j},T),placement:"top",className:pt({[`${x}-${S}`]:S},k,y,U.root),style:X(X(X({},j.root),v),A),onClose:l(()=>{I==null||I(),Y()},"onClose")})),()=>{a(M)}))},"open"),o={open:i,destroy:l(h=>{var d;h!==void 0?a(h):(d=e.current)==null||d.destroy()},"destroy")};return["info","success","warning","error","loading"].forEach(h=>{const d=l((f,p,g)=>{let m;f&&typeof f=="object"&&"content"in f?m=f:m={content:f};let y,v;typeof p=="function"?v=p:(y=p,v=g);const b=Ne(X({onClose:v,duration:y},m),{type:h});return i(b)},"typeOpen");o[h]=d}),o},[]),G.createElement(bZe,Ne(X({key:"message-holder"},t),{ref:e}))]}l(xZe,"useInternalMessage");function wZe(t){return xZe(t)}l(wZe,"useMessage");var x6="__rc_react_root__";function TZe(t,e){const r=e[x6]||yg(e);r.render(t),e[x6]=r}l(TZe,"render$6");function EZe(t){return nt(this,null,function*(){return Promise.resolve().then(()=>{var e;(e=t[x6])==null||e.unmount(),delete t[x6]})})}l(EZe,"unmount");var TO=l(()=>({height:0,opacity:0}),"getCollapsedHeight"),Jie=l(t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},"getRealHeight"),CZe=l(t=>({height:t?t.offsetHeight:0}),"getCurrentHeight"),EO=l((t,e)=>(e==null?void 0:e.deadline)===!0||e.propertyName==="height","skipOpacityTransition"),SZe=l((t=Fk)=>({motionName:`${t}-motion-collapse`,onAppearStart:TO,onEnterStart:TO,onAppearActive:Jie,onEnterActive:Jie,onLeaveStart:CZe,onLeaveActive:TO,onAppearEnd:EO,onEnterEnd:EO,onLeaveEnd:EO,motionDeadline:500}),"initCollapseMotion"),k0=l((t,e,r)=>r!==void 0?r:`${t}-${e}`,"getTransitionName2"),_Ze=SZe,kZe=l(t=>{const{componentCls:e,colorPrimary:r,motionDurationSlow:n,motionEaseInOut:a,motionEaseOutCirc:i,antCls:s}=t,[,o]=To(s,"wave");return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:o("color",r),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(u=>`${u} ${i}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(u=>`${u} ${n} ${a}`).join(",")}}}}},"genWaveStyle"),AZe=kje("Wave",kZe),ese=`${Fk}-wave-target`;function tse(t){return t&&typeof t=="string"&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"&&t!=="canvastext"}l(tse,"isValidWaveColor");function NZe(t,e=null){var s;const r=getComputedStyle(t),{borderTopColor:n,borderColor:a,backgroundColor:i}=r;return e&&tse(r[e])?r[e]:(s=[n,a,i].find(tse))!=null?s:null}l(NZe,"getTargetWaveColor");function CO(t){return Number.isNaN(t)?0:t}l(CO,"validateNum");var IZe=l(t=>{const{className:e,target:r,component:n,colorSource:a}=t,i=G.useRef(null),{getPrefixCls:s}=G.useContext(vn),o=s(),[u]=To(o,"wave"),[h,d]=G.useState(null),[f,p]=G.useState([]),[g,m]=G.useState(0),[y,v]=G.useState(0),[b,w]=G.useState(0),[x,T]=G.useState(0),[C,S]=G.useState(!1),E={left:g,top:y,width:b,height:x,borderRadius:f.map(I=>`${I}px`).join(" ")};h&&(E[u("color")]=h);function k(){const I=getComputedStyle(r);d(NZe(r,a));const L=I.position==="static",{borderLeftWidth:R,borderTopWidth:O}=I;m(L?r.offsetLeft:CO(-Number.parseFloat(R))),v(L?r.offsetTop:CO(-Number.parseFloat(O))),w(r.offsetWidth),T(r.offsetHeight);const{borderTopLeftRadius:M,borderTopRightRadius:P,borderBottomLeftRadius:z,borderBottomRightRadius:D}=I;p([M,P,D,z].map(B=>CO(Number.parseFloat(B))))}if(l(k,"syncPos"),G.useEffect(()=>{if(r){const I=pn(()=>{k(),S(!0)});let L;return typeof ResizeObserver!="undefined"&&(L=new ResizeObserver(k),L.observe(r)),()=>{pn.cancel(I),L==null||L.disconnect()}}},[r]),!C)return null;const A=(n==="Checkbox"||n==="Radio")&&(r==null?void 0:r.classList.contains(ese));return G.createElement(zc,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:l((I,L)=>{var R;if(L.deadline||L.propertyName==="opacity"){const O=(R=i.current)==null?void 0:R.parentElement;EZe(O).then(()=>{O==null||O.remove()})}return!1},"onAppearEnd")},({className:I},L)=>G.createElement("div",{ref:xo(i,L),className:pt(e,I,{"wave-quick":A}),style:E}))},"WaveEffect"),LZe=l((t,e)=>{var a;const{component:r}=e;if(r==="Checkbox"&&!((a=t.querySelector("input"))!=null&&a.checked))return;const n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",t==null||t.insertBefore(n,t==null?void 0:t.firstChild),TZe(G.createElement(IZe,Ne(X({},e),{target:t})),n)},"showWaveEffect"),$Ze=LZe,MZe=l((t,e,r,n)=>{const{wave:a}=G.useContext(vn),[,i,s]=Il(),o=Ur(d=>{const f=t.current;if(a!=null&&a.disabled||!f)return;const p=f.querySelector(`.${ese}`)||f,{showEffect:g}=a||{};(g||$Ze)(p,{className:e,token:i,component:r,event:d,hashId:s,colorSource:n})}),u=G.useRef(null);return G.useEffect(()=>()=>{pn.cancel(u.current)},[]),l(d=>{pn.cancel(u.current),u.current=pn(()=>{o(d)})},"showDebounceWave")},"useWave"),PZe=MZe,rse=l(t=>{const{children:e,disabled:r,component:n,colorSource:a}=t,{getPrefixCls:i}=N.useContext(vn),s=N.useRef(null),o=i("wave"),u=AZe(o),h=PZe(s,pt(o,u),n,a);if(N.useEffect(()=>{const f=s.current;if(!f||f.nodeType!==window.Node.ELEMENT_NODE||r)return;const p=l(g=>{!gO(g.target)||!f.getAttribute||f.getAttribute("disabled")||f.disabled||f.className.includes("disabled")&&!f.className.includes("disabled:")||f.getAttribute("aria-disabled")==="true"||f.className.includes("-leave")||h(g)},"onClick");return f.addEventListener("click",p,!0),()=>{f.removeEventListener("click",p,!0)}},[r]),!N.isValidElement(e))return e!=null?e:null;const d=hx(e)?xo(xg(e),s):s;return bh(e,{ref:d})},"Wave");rse.displayName="Wave";var nse=rse,RZe=l(t=>{const e=N.useContext(m6);return N.useMemo(()=>t?typeof t=="string"?t!=null?t:e:typeof t=="function"?t(e):e:e,[t,e])},"useSize"),Ll=RZe,OZe=l(t=>{const{componentCls:e}=t;return{[e]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},"genSpaceCompactStyle"),DZe=ea(["Space","Compact"],t=>[OZe(t)],()=>({}),{resetStyle:!1}),w6=G.createContext(null),A0=l((t,e)=>{const r=G.useContext(w6),n=G.useMemo(()=>{if(!r)return"";const{compactDirection:a,isFirstItem:i,isLastItem:s}=r,o=a==="vertical"?"-vertical-":"-";return pt(`${t}-compact${o}item`,{[`${t}-compact${o}first-item`]:i,[`${t}-compact${o}last-item`]:s,[`${t}-compact${o}item-rtl`]:e==="rtl"})},[t,e,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:n}},"useCompactItemContext"),FZe=l(t=>{const{children:e}=t;return G.createElement(w6.Provider,{value:null},e)},"NoCompactStyle"),BZe=l(t=>{const n=t,{children:e}=n,r=Xt(n,["children"]);return G.createElement(w6.Provider,{value:G.useMemo(()=>r,[r])},e)},"CompactItem"),zZe=l(t=>{const{getPrefixCls:e,direction:r}=G.useContext(vn),S=t,{size:n,direction:a,orientation:i,block:s,prefixCls:o,className:u,rootClassName:h,children:d,vertical:f}=S,p=Xt(S,["size","direction","orientation","block","prefixCls","className","rootClassName","children","vertical"]);Tn("Space.Compact").deprecated(!a,"direction","orientation");const[g,m]=Ex(i,f,a),y=Ll(E=>n!=null?n:E),v=e("space-compact",o),[b]=DZe(v),w=pt(v,b,{[`${v}-rtl`]:r==="rtl",[`${v}-block`]:s,[`${v}-vertical`]:m},u,h),x=G.useContext(w6),T=wo(d),C=G.useMemo(()=>T.map((E,k)=>{const A=(E==null?void 0:E.key)||`${v}-item-${k}`;return G.createElement(BZe,{key:A,compactSize:y,compactDirection:g,isFirstItem:k===0&&(!x||(x==null?void 0:x.isFirstItem)),isLastItem:k===T.length-1&&(!x||(x==null?void 0:x.isLastItem))},E)}),[T,x,g,y,v]);return T.length===0?null:G.createElement("div",X({className:w},p),C)},"Compact"),SO=zZe,ase=G.createContext(void 0),HZe=l(t=>{const{getPrefixCls:e,direction:r}=G.useContext(vn),f=t,{prefixCls:n,size:a,className:i}=f,s=Xt(f,["prefixCls","size","className"]),o=e("btn-group",n),[,,u]=Il(),h=G.useMemo(()=>{switch(a){case"large":return"lg";case"small":return"sm";default:return""}},[a]);{const p=Tn("Button.Group");p.deprecated(!1,"Button.Group","Space.Compact"),p(!a||["large","small","middle"].includes(a),"usage","Invalid prop `size`.")}const d=pt(o,{[`${o}-${h}`]:h,[`${o}-rtl`]:r==="rtl"},i,u);return G.createElement(ase.Provider,{value:a},G.createElement("div",Ne(X({},s),{className:d})))},"ButtonGroup"),WZe=HZe,ise=/^[\u4E00-\u9FA5]{2}$/,_O=ise.test.bind(ise);function sse(t){return t==="danger"?{danger:!0}:{type:t}}l(sse,"convertLegacyProps");function ose(t){return typeof t=="string"}l(ose,"isString$1");function T6(t){return t==="text"||t==="link"}l(T6,"isUnBorderedButtonVariant");function VZe(t,e,r,n){if(!Eu(t)||t==="")return;const a=e?" ":"";return typeof t!="string"&&typeof t!="number"&&ose(t.type)&&_O(t.props.children)?bh(t,i=>{const s=pt(i.className,n)||void 0,o=X(X({},r),i.style);return Ne(X({},i),{children:i.children.split("").join(a),className:s,style:o})}):ose(t)?N.createElement("span",{className:n,style:r},_O(t)?t.split("").join(a):t):Fie(t)?N.createElement("span",{className:n,style:r},t):bh(t,i=>Ne(X({},i),{className:pt(i.className,n)||void 0,style:X(X({},i.style),r)}))}l(VZe,"splitCNCharsBySpace");function GZe(t,e,r,n){let a=!1;const i=[];return N.Children.forEach(t,s=>{const o=typeof s,u=o==="string"||o==="number";if(a&&u){const h=i.length-1,d=i[h];i[h]=`${d}${s}`}else i.push(s);a=u}),N.Children.map(i,s=>VZe(s,e,r,n))}l(GZe,"spaceChildren"),["default","primary","danger"].concat(Ea(yh));var qZe=N.forwardRef((t,e)=>{const{className:r,style:n,children:a,prefixCls:i}=t,s=pt(`${i}-icon`,r);return N.createElement("span",{ref:e,className:s,style:n},a)}),lse=qZe,cse=N.forwardRef((t,e)=>{const{prefixCls:r,className:n,style:a,iconClassName:i}=t,s=pt(`${r}-loading-icon`,n);return N.createElement(lse,{prefixCls:r,className:s,style:a,ref:e},N.createElement(Sx,{className:i}))}),kO=l(()=>({width:0,opacity:0,transform:"scale(0)"}),"getCollapsedWidth"),AO=l(t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),"getRealWidth"),YZe=l(t=>{const{prefixCls:e,loading:r,existIcon:n,className:a,style:i,mount:s}=t,o=!!r;return n?N.createElement(cse,{prefixCls:e,className:a,style:i}):N.createElement(zc,{visible:o,motionName:`${e}-loading-icon-motion`,motionAppear:!s,motionEnter:!s,motionLeave:!s,removeOnLeave:!0,onAppearStart:kO,onAppearActive:AO,onEnterStart:kO,onEnterActive:AO,onLeaveStart:AO,onLeaveActive:kO},({className:u,style:h},d)=>{const f=X(X({},i),h);return N.createElement(cse,{prefixCls:e,className:pt(a,u),style:f,ref:d})})},"DefaultLoadingIcon"),UZe=YZe,use=l((t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),"genButtonBorderStyle"),jZe=l(t=>{const{componentCls:e,fontSize:r,lineWidth:n,groupBorderColor:a,colorErrorHover:i}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(n).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:r}},use(`${e}-primary`,a),use(`${e}-danger`,i)]}},"genGroupStyle"),KZe=jZe,NO=l(t=>Math.round(Number(t||0)),"getRoundNumber"),XZe=l(t=>{if(t instanceof pa)return t;if(t&&typeof t=="object"&&"h"in t&&"b"in t){const e=t,{b:r}=e,n=Xt(e,["b"]);return Ne(X({},n),{v:r})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},"convertHsb2Hsv"),Su=(TC=class extends pa{constructor(e){super(XZe(e))}toHsbString(){const e=this.toHsb(),r=NO(e.s*100),n=NO(e.b*100),a=NO(e.h),i=e.a,s=`hsb(${a}, ${r}%, ${n}%)`,o=`hsba(${a}, ${r}%, ${n}%, ${i.toFixed(i===0?0:2)})`;return i===1?s:o}toHsb(){const n=this.toHsv(),{v:e}=n,r=Xt(n,["v"]);return Ne(X({},r),{b:e,a:this.a})}},l(TC,"Color"),TC),ZZe="rc-color-picker",_x=l(t=>t instanceof Su?t:new Su(t),"generateColor"),QZe=_x("#1677ff"),hse=l(t=>{const{offset:e,targetRef:r,containerRef:n,color:a,type:i}=t,{width:s,height:o}=n.current.getBoundingClientRect(),{width:u,height:h}=r.current.getBoundingClientRect(),d=u/2,f=h/2,p=(e.x+d)/s,g=1-(e.y+f)/o,m=a.toHsb(),y=p,v=(e.x+d)/s*360;if(i)switch(i){case"hue":return _x(Ne(X({},m),{h:v<=0?0:v}));case"alpha":return _x(Ne(X({},m),{a:y<=0?0:y}))}return _x({h:m.h,s:p<=0?0:p,b:g>=1?1:g,a:m.a})},"calculateColor"),dse=l((t,e)=>{const r=t.toHsb();switch(e){case"hue":return{x:r.h/360*100,y:50};case"alpha":return{x:t.a*100,y:50};default:return{x:r.s*100,y:(1-r.b)*100}}},"calcOffset"),JZe=l(({color:t,prefixCls:e,className:r,style:n,innerClassName:a,innerStyle:i,onClick:s})=>{const o=`${e}-color-block`;return N.createElement("div",{className:pt(o,r),style:n,onClick:s},N.createElement("div",{className:pt(`${o}-inner`,a),style:X({background:t},i)}))},"ColorBlock"),IO=JZe;function eQe(t){const e="touches"in t?t.touches[0]:t,r=document.documentElement.scrollLeft||document.body.scrollLeft||window.pageXOffset,n=document.documentElement.scrollTop||document.body.scrollTop||window.pageYOffset;return{pageX:e.pageX-r,pageY:e.pageY-n}}l(eQe,"getPosition");function tQe(t){const{targetRef:e,containerRef:r,direction:n,onDragChange:a,onDragChangeComplete:i,calculate:s,color:o,disabledDrag:u}=t,[h,d]=N.useState({x:0,y:0}),f=N.useRef(null),p=N.useRef(null);N.useEffect(()=>{d(s())},[o]),N.useEffect(()=>()=>{document.removeEventListener("mousemove",f.current),document.removeEventListener("mouseup",p.current),document.removeEventListener("touchmove",f.current),document.removeEventListener("touchend",p.current),f.current=null,p.current=null},[]);const g=l(b=>{const{pageX:w,pageY:x}=eQe(b),{x:T,y:C,width:S,height:E}=r.current.getBoundingClientRect(),{width:k,height:A}=e.current.getBoundingClientRect(),I=k/2,L=A/2,R=Math.max(0,Math.min(w-T,S))-I,O=Math.max(0,Math.min(x-C,E))-L,M={x:R,y:n==="x"?h.y:O};if(k===0&&A===0||k!==A)return!1;a==null||a(M)},"updateOffset"),m=l(b=>{b.preventDefault(),g(b)},"onDragMove"),y=l(b=>{b.preventDefault(),document.removeEventListener("mousemove",f.current),document.removeEventListener("mouseup",p.current),document.removeEventListener("touchmove",f.current),document.removeEventListener("touchend",p.current),f.current=null,p.current=null,i==null||i()},"onDragStop");return[h,l(b=>{document.removeEventListener("mousemove",f.current),document.removeEventListener("mouseup",p.current),!u&&(g(b),document.addEventListener("mousemove",m),document.addEventListener("mouseup",y),document.addEventListener("touchmove",m),document.addEventListener("touchend",y),f.current=m,p.current=y)},"onDragStart")]}l(tQe,"useColorDrag");var fse=tQe,rQe=l(({size:t="default",color:e,prefixCls:r})=>N.createElement("div",{className:pt(`${r}-handler`,{[`${r}-handler-sm`]:t==="small"}),style:{backgroundColor:e}}),"Handler"),pse=rQe,nQe=l(({children:t,style:e,prefixCls:r})=>N.createElement("div",{className:`${r}-palette`,style:X({position:"relative"},e)},t),"Palette"),gse=nQe,aQe=N.forwardRef((t,e)=>{const{children:r,x:n,y:a}=t;return N.createElement("div",{ref:e,style:{position:"absolute",left:`${n}%`,top:`${a}%`,zIndex:1,transform:"translate(-50%, -50%)"}},r)}),mse=aQe,iQe=l(({color:t,onChange:e,prefixCls:r,onChangeComplete:n,disabled:a})=>{const i=N.useRef(),s=N.useRef(),o=N.useRef(t),u=Ur(f=>{const p=hse({offset:f,targetRef:s,containerRef:i,color:t});o.current=p,e(p)}),[h,d]=fse({color:t,containerRef:i,targetRef:s,calculate:l(()=>dse(t),"calculate"),onDragChange:u,onDragChangeComplete:l(()=>n==null?void 0:n(o.current),"onDragChangeComplete"),disabledDrag:a});return N.createElement("div",{ref:i,className:`${r}-select`,onMouseDown:d,onTouchStart:d},N.createElement(gse,{prefixCls:r},N.createElement(mse,{x:h.x,y:h.y,ref:s},N.createElement(pse,{color:t.toRgbString(),prefixCls:r})),N.createElement("div",{className:`${r}-saturation`,style:{backgroundColor:`hsl(${t.toHsb().h},100%, 50%)`,backgroundImage:"linear-gradient(0deg, #000, transparent),linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0))"}})))},"Picker"),sQe=iQe,oQe=l((t,e)=>{const[r,n]=Ta(t,e);return[N.useMemo(()=>_x(r),[r]),n]},"useColorState"),lQe=oQe,cQe=l(({colors:t,children:e,direction:r="to right",type:n,prefixCls:a})=>{const i=N.useMemo(()=>t.map((s,o)=>{let u=_x(s);return n==="alpha"&&o===t.length-1&&(u=new Su(u.setA(1))),u.toRgbString()}).join(","),[t,n]);return N.createElement("div",{className:`${a}-gradient`,style:{position:"absolute",inset:0,background:`linear-gradient(${r}, ${i})`}},e)},"Gradient"),uQe=cQe,hQe=l(t=>{const{prefixCls:e,colors:r,disabled:n,onChange:a,onChangeComplete:i,color:s,type:o}=t,u=N.useRef(null),h=N.useRef(null),d=N.useRef(s),f=l(b=>o==="hue"?b.getHue():b.a*100,"getValue3"),p=Ur(b=>{const w=hse({offset:b,targetRef:h,containerRef:u,color:s,type:o});d.current=w,a(f(w))}),[g,m]=fse({color:s,targetRef:h,containerRef:u,calculate:l(()=>dse(s,o),"calculate"),onDragChange:p,onDragChangeComplete(){i(f(d.current))},direction:"x",disabledDrag:n}),y=N.useMemo(()=>{if(o==="hue"){const b=s.toHsb();return b.s=1,b.b=1,b.a=1,new Su(b)}return s},[s,o]),v=N.useMemo(()=>r.map(b=>`${b.color} ${b.percent}%`),[r]);return N.createElement("div",{ref:u,className:pt(`${e}-slider`,`${e}-slider-${o}`),onMouseDown:m,onTouchStart:m},N.createElement(gse,{prefixCls:e},N.createElement(mse,{x:g.x,y:g.y,ref:h},N.createElement(pse,{size:"small",color:y.toHexString(),prefixCls:e})),N.createElement(uQe,{colors:v,type:o,prefixCls:e})))},"Slider"),dQe=hQe;function fQe(t){return G.useMemo(()=>{const{slider:e}=t||{};return[e||dQe]},[t])}l(fQe,"useComponent");function pS(){return pS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pS.apply(this,arguments)}l(pS,"_extends15");var pQe=[{color:"rgb(255, 0, 0)",percent:0},{color:"rgb(255, 255, 0)",percent:17},{color:"rgb(0, 255, 0)",percent:33},{color:"rgb(0, 255, 255)",percent:50},{color:"rgb(0, 0, 255)",percent:67},{color:"rgb(255, 0, 255)",percent:83},{color:"rgb(255, 0, 0)",percent:100}],yse=N.forwardRef((t,e)=>{const{value:r,defaultValue:n,prefixCls:a=ZZe,onChange:i,onChangeComplete:s,className:o,style:u,panelRender:h,disabledAlpha:d=!1,disabled:f=!1,components:p}=t,[g]=fQe(p),[m,y]=lQe(n||QZe,r),v=N.useMemo(()=>m.setA(1).toRgbString(),[m]),b=l((L,R)=>{r||y(L),i==null||i(L,R)},"handleChange"),w=l(L=>new Su(m.setHue(L)),"getHueColor"),x=l(L=>new Su(m.setA(L/100)),"getAlphaColor4"),T=l(L=>{b(w(L),{type:"hue",value:L})},"onHueChange"),C=l(L=>{b(x(L),{type:"alpha",value:L})},"onAlphaChange"),S=l(L=>{s&&s(w(L))},"onHueChangeComplete"),E=l(L=>{s&&s(x(L))},"onAlphaChangeComplete"),k=pt(`${a}-panel`,o,{[`${a}-panel-disabled`]:f}),A={prefixCls:a,disabled:f,color:m},I=N.createElement(N.Fragment,null,N.createElement(sQe,pS({onChange:b},A,{onChangeComplete:s})),N.createElement("div",{className:`${a}-slider-container`},N.createElement("div",{className:pt(`${a}-slider-group`,{[`${a}-slider-group-disabled-alpha`]:d})},N.createElement(g,pS({},A,{type:"hue",colors:pQe,min:0,max:359,value:m.getHue(),onChange:T,onChangeComplete:S})),!d&&N.createElement(g,pS({},A,{type:"alpha",colors:[{percent:0,color:"rgba(255, 0, 4, 0)"},{percent:100,color:v}],min:0,max:100,value:m.a*100,onChange:C,onChangeComplete:E}))),N.createElement(IO,{color:m.toRgbString(),prefixCls:a})));return N.createElement("div",{className:k,style:u,ref:e},typeof h=="function"?h(I):I)});yse.displayName="ColorPicker";var gQe=yse,mQe=gQe,gS=l((t,e)=>(t==null?void 0:t.replace(/[^0-9a-f]/gi,"").slice(0,e?8:6))||"","toHexFormat"),yQe=l((t,e)=>t?gS(t,e):"","getHex"),ic=function(){function t(e){var n;if(Dd(this,t),this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(n=e.colors)==null?void 0:n.map(a=>({color:new t(a.color),percent:a.percent})),this.cleared=e.cleared;return}const r=Array.isArray(e);r&&e.length?(this.colors=e.map(({color:a,percent:i})=>({color:new t(a),percent:i})),this.metaColor=new Su(this.colors[0].color.metaColor)):this.metaColor=new Su(r?"":e),(!e||r&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return l(t,"AggregationColor2"),Fd(t,[{key:"toHsb",value:l(function(){return this.metaColor.toHsb()},"toHsb")},{key:"toHsbString",value:l(function(){return this.metaColor.toHsbString()},"toHsbString")},{key:"toHex",value:l(function(){return yQe(this.toHexString(),this.metaColor.a<1)},"toHex")},{key:"toHexString",value:l(function(){return this.metaColor.toHexString()},"toHexString")},{key:"toRgb",value:l(function(){return this.metaColor.toRgb()},"toRgb")},{key:"toRgbString",value:l(function(){return this.metaColor.toRgbString()},"toRgbString")},{key:"isGradient",value:l(function(){return!!this.colors&&!this.cleared},"isGradient")},{key:"getColors",value:l(function(){return this.colors||[{color:this,percent:0}]},"getColors")},{key:"toCssString",value:l(function(){const{colors:r}=this;return r?`linear-gradient(90deg, ${r.map(a=>`${a.color.toRgbString()} ${a.percent}%`).join(", ")})`:this.metaColor.toRgbString()},"toCssString")},{key:"equals",value:l(function(r){return!r||this.isGradient()!==r.isGradient()?!1:this.isGradient()?this.colors.length===r.colors.length&&this.colors.every((n,a)=>{const i=r.colors[a];return n.percent===i.percent&&n.color.equals(i.color)}):this.toHexString()===r.toHexString()},"equals")}])}(),vQe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},bQe=vQe;function LO(){return LO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},LO.apply(this,arguments)}l(LO,"_extends16");var xQe=l((t,e)=>G.createElement(Vn,LO({},t,{ref:e,icon:bQe})),"RightOutlined2"),vse=G.forwardRef(xQe);vse.displayName="RightOutlined";var bse=vse;function Vi(){return Vi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vi.apply(null,arguments)}l(Vi,"_extends17");var xse=N.forwardRef((t,e)=>{const{prefixCls:r,forceRender:n,className:a,style:i,children:s,isActive:o,role:u,classNames:h,styles:d}=t,[f,p]=N.useState(o||n);return N.useEffect(()=>{(n||o)&&p(!0)},[n,o]),f?N.createElement("div",{ref:e,className:pt(`${r}-panel`,{[`${r}-panel-active`]:o,[`${r}-panel-inactive`]:!o},a),style:i,role:u},N.createElement("div",{className:pt(`${r}-body`,h==null?void 0:h.body),style:d==null?void 0:d.body},s)):null});xse.displayName="PanelContent";var wQe=xse,TQe=N.forwardRef((t,e)=>{const O=t,{showArrow:r=!0,headerClass:n,isActive:a,onItemClick:i,forceRender:s,className:o,classNames:u={},styles:h={},prefixCls:d,collapsible:f,accordion:p,panelKey:g,extra:m,header:y,expandIcon:v,openMotion:b,destroyOnHidden:w,children:x}=O,T=Xt(O,["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyOnHidden","children"]),C=f==="disabled",S=m!=null&&typeof m!="boolean",E={onClick:l(()=>{i==null||i(g)},"onClick"),onKeyDown:l(M=>{(M.key==="Enter"||M.keyCode===gr.ENTER||M.which===gr.ENTER)&&(i==null||i(g))},"onKeyDown"),role:p?"tab":"button","aria-expanded":a,"aria-disabled":C,tabIndex:C?-1:0},k=typeof v=="function"?v(t):N.createElement("i",{className:"arrow"}),A=k&&N.createElement("div",Vi({className:pt(`${d}-expand-icon`,u==null?void 0:u.icon),style:h==null?void 0:h.icon},["header","icon"].includes(f)?E:{}),k),I=pt(`${d}-item`,{[`${d}-item-active`]:a,[`${d}-item-disabled`]:C},o),L=pt(n,`${d}-header`,{[`${d}-collapsible-${f}`]:!!f},u==null?void 0:u.header),R=X({className:L,style:h==null?void 0:h.header},["header","icon"].includes(f)?{}:E);return N.createElement("div",Vi({},T,{ref:e,className:I}),N.createElement("div",R,r&&A,N.createElement("span",Vi({className:pt(`${d}-title`,u==null?void 0:u.title),style:h==null?void 0:h.title},f==="header"?E:{}),y),S&&N.createElement("div",{className:`${d}-extra`},m)),N.createElement(zc,Vi({visible:a,leavedClassName:`${d}-panel-hidden`},b,{forceRender:s,removeOnLeave:w}),({className:M,style:P},z)=>N.createElement(wQe,{ref:z,prefixCls:d,className:M,classNames:u,style:P,styles:h,isActive:a,forceRender:s,role:p?"tabpanel":void 0},x)))}),wse=TQe;function Tse(t,e,r){if(!t||!e)return t||e;const n=Array.from(new Set([...Object.keys(t),...Object.keys(e)])),a={};return n.forEach(i=>{a[i]=r(t[i],e[i])}),a}l(Tse,"mergeSemantic");function EQe(t,e){return Tse(t,e,(r,n)=>gne(r,n))}l(EQe,"mergeSemanticClassNames");function CQe(t,e){return Tse(t,e,(r,n)=>X(X({},r),n))}l(CQe,"mergeSemanticStyles");var SQe=l((t,e)=>{const{prefixCls:r,accordion:n,collapsible:a,destroyOnHidden:i,onItemClick:s,activeKey:o,openMotion:u,expandIcon:h,classNames:d,styles:f}=e;return t.map((p,g)=>{const R=p,{children:m,label:y,key:v,collapsible:b,onItemClick:w,destroyOnHidden:x,classNames:T,styles:C}=R,S=Xt(R,["children","label","key","collapsible","onItemClick","destroyOnHidden","classNames","styles"]),E=String(v!=null?v:g),k=b!=null?b:a,A=x!=null?x:i,I=l(O=>{k!=="disabled"&&(s(O),w==null||w(O))},"handleItemClick");let L=!1;return n?L=o[0]===E:L=o.indexOf(E)>-1,N.createElement(wse,Vi({},S,{classNames:EQe(d,T),styles:CQe(f,C),prefixCls:r,key:E,panelKey:E,isActive:L,accordion:n,openMotion:u,expandIcon:h,header:y,collapsible:k,onItemClick:I,destroyOnHidden:A}),m)})},"convertItemsToNodes"),_Qe=l((t,e,r)=>{if(!t)return null;const{prefixCls:n,accordion:a,collapsible:i,destroyOnHidden:s,onItemClick:o,activeKey:u,openMotion:h,expandIcon:d,classNames:f,styles:p}=r,g=t.key||String(e),{header:m,headerClass:y,destroyOnHidden:v,collapsible:b,onItemClick:w}=t.props;let x=!1;a?x=u[0]===g:x=u.indexOf(g)>-1;const T=b!=null?b:i,C=l(E=>{T!=="disabled"&&(o(E),w==null||w(E))},"handleItemClick"),S={key:g,panelKey:g,header:m,headerClass:y,classNames:f,styles:p,isActive:x,prefixCls:n,destroyOnHidden:v!=null?v:s,openMotion:h,accordion:a,children:t.props.children,onItemClick:C,expandIcon:d,collapsible:T};return typeof t.type=="string"?t:(Object.keys(S).forEach(E=>{typeof S[E]=="undefined"&&delete S[E]}),N.cloneElement(t,S))},"getNewChild");function kQe(t,e,r){return Array.isArray(t)?SQe(t,r):wo(e).map((n,a)=>_Qe(n,a,r))}l(kQe,"useItems");var AQe=kQe;function Ese(t){let e=t;if(!Array.isArray(e)){const r=typeof e;e=r==="number"||r==="string"?[e]:[]}return e.map(r=>String(r))}l(Ese,"getActiveKeysArray");var NQe=N.forwardRef((t,e)=>{const{prefixCls:r="rc-collapse",destroyOnHidden:n=!1,style:a,accordion:i,className:s,children:o,collapsible:u,openMotion:h,expandIcon:d,activeKey:f,defaultActiveKey:p,onChange:g,items:m,classNames:y,styles:v}=t,b=pt(r,s),[w,x]=Ta(p,f),T=Ese(w),C=Ur(k=>{const A=Ese(k);x(A),g==null||g(A)}),S=l(k=>{C(i?T[0]===k?[]:[k]:T.includes(k)?T.filter(A=>A!==k):[...T,k])},"onItemClick");an(!o,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");const E=AQe(m,o,{prefixCls:r,accordion:i,openMotion:h,expandIcon:d,collapsible:u,destroyOnHidden:n,onItemClick:S,activeKey:T,classNames:y,styles:v});return N.createElement("div",Vi({ref:e,className:b,style:a,role:i?"tablist":void 0},Hc(t,{aria:!0,data:!0})),E)}),Cse=Object.assign(NQe,{Panel:wse}),Sse=Cse,{Panel:Rxr}=Cse,IQe=G.forwardRef((t,e)=>{Tn("Collapse.Panel").deprecated(!("disabled"in t),"disabled",'collapsible="disabled"');const{getPrefixCls:r}=G.useContext(vn),{prefixCls:n,className:a,showArrow:i=!0}=t,s=r("collapse",n),o=pt({[`${s}-no-arrow`]:!i},a);return G.createElement(Sse.Panel,Ne(X({ref:e},t),{prefixCls:s,className:o}))}),LQe=IQe,$Qe=l(t=>{const{componentCls:e,antCls:r,motionDurationMid:n,motionEaseInOut:a}=t;return{[e]:{[`${r}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(i=>`${i} ${n} ${a}`).join(", ")} !important`}},[`${r}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(i=>`${i} ${n} ${a}`).join(", ")} !important`}}}},"genCollapseMotion"),MQe=$Qe,PQe=l(t=>({animationDuration:t,animationFillMode:"both"}),"initMotionCommon"),RQe=l(t=>({animationDuration:t,animationFillMode:"both"}),"initMotionCommonLeave"),E6=l((t,e,r,n,a=!1)=>{const i=a?"&":"";return{[`
|
||
${i}${t}-enter,
|
||
${i}${t}-appear
|
||
`]:Ne(X({},PQe(n)),{animationPlayState:"paused"}),[`${i}${t}-leave`]:Ne(X({},RQe(n)),{animationPlayState:"paused"}),[`
|
||
${i}${t}-enter${t}-enter-active,
|
||
${i}${t}-appear${t}-appear-active
|
||
`]:{animationName:e,animationPlayState:"running"},[`${i}${t}-leave${t}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},"initMotion"),OQe=new gn("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),DQe=new gn("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),_se=l((t,e=!1)=>{const{antCls:r}=t,n=`${r}-fade`,a=e?"&":"";return[E6(n,OQe,DQe,t.motionDurationMid,e),{[`
|
||
${a}${n}-enter,
|
||
${a}${n}-appear
|
||
`]:{opacity:0,animationTimingFunction:"linear"},[`${a}${n}-leave`]:{animationTimingFunction:"linear"}}]},"initFadeMotion"),FQe=new gn("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),BQe=new gn("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),zQe=new gn("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),HQe=new gn("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),WQe=new gn("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),VQe=new gn("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),GQe=new gn("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),qQe=new gn("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),YQe={"move-up":{inKeyframes:GQe,outKeyframes:qQe},"move-down":{inKeyframes:FQe,outKeyframes:BQe},"move-left":{inKeyframes:zQe,outKeyframes:HQe},"move-right":{inKeyframes:WQe,outKeyframes:VQe}},kse=l((t,e)=>{const{antCls:r}=t,n=`${r}-${e}`,{inKeyframes:a,outKeyframes:i}=YQe[e];return[E6(n,a,i,t.motionDurationMid),{[`
|
||
${n}-enter,
|
||
${n}-appear
|
||
`]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},"initMoveMotion"),Ase=new gn("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Nse=new gn("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Ise=new gn("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Lse=new gn("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),UQe=new gn("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),jQe=new gn("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),KQe=new gn("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),XQe=new gn("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),ZQe={"slide-up":{inKeyframes:Ase,outKeyframes:Nse},"slide-down":{inKeyframes:Ise,outKeyframes:Lse},"slide-left":{inKeyframes:UQe,outKeyframes:jQe},"slide-right":{inKeyframes:KQe,outKeyframes:XQe}},C6=l((t,e)=>{const{antCls:r}=t,n=`${r}-${e}`,{inKeyframes:a,outKeyframes:i}=ZQe[e];return[E6(n,a,i,t.motionDurationMid),{[`
|
||
${n}-enter,
|
||
${n}-appear
|
||
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},"initSlideMotion"),QQe=new gn("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),JQe=new gn("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),$se=new gn("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Mse=new gn("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),eJe=new gn("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),tJe=new gn("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),rJe=new gn("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),nJe=new gn("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),aJe=new gn("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),iJe=new gn("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),sJe=new gn("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),oJe=new gn("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),lJe={zoom:{inKeyframes:QQe,outKeyframes:JQe},"zoom-big":{inKeyframes:$se,outKeyframes:Mse},"zoom-big-fast":{inKeyframes:$se,outKeyframes:Mse},"zoom-left":{inKeyframes:rJe,outKeyframes:nJe},"zoom-right":{inKeyframes:aJe,outKeyframes:iJe},"zoom-up":{inKeyframes:eJe,outKeyframes:tJe},"zoom-down":{inKeyframes:sJe,outKeyframes:oJe}},$O=l((t,e)=>{const{antCls:r}=t,n=`${r}-${e}`,{inKeyframes:a,outKeyframes:i}=lJe[e];return[E6(n,a,i,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[`
|
||
${n}-enter,
|
||
${n}-appear
|
||
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},"initZoomMotion"),cJe=l(t=>{const{componentCls:e,contentBg:r,padding:n,headerBg:a,headerPadding:i,collapseHeaderPaddingSM:s,collapseHeaderPaddingLG:o,collapsePanelBorderRadius:u,lineWidth:h,lineType:d,colorBorder:f,colorText:p,colorTextHeading:g,colorTextDisabled:m,fontSizeLG:y,lineHeight:v,lineHeightLG:b,marginSM:w,paddingSM:x,paddingLG:T,paddingXS:C,motionDurationSlow:S,fontSizeIcon:E,contentPadding:k,fontHeight:A,fontHeightLG:I}=t,L=`${Rt(h)} ${d} ${f}`;return{[e]:Ne(X({},is(t)),{backgroundColor:a,border:L,borderRadius:u,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:L,"&:first-child":{[`
|
||
&,
|
||
& > ${e}-header`]:{borderRadius:`${Rt(u)} ${Rt(u)} 0 0`}},"&:last-child":{[`
|
||
&,
|
||
& > ${e}-header`]:{borderRadius:`0 0 ${Rt(u)} ${Rt(u)}`}},[`> ${e}-header`]:Ne(X({position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:i,color:g,lineHeight:v,cursor:"pointer",transition:`all ${S}, visibility 0s`},vh(t)),{[`> ${e}-title`]:{flex:"auto"},[`${e}-expand-icon`]:{height:A,display:"flex",alignItems:"center",marginInlineEnd:w},[`${e}-arrow`]:Ne(X({},sS()),{fontSize:E,transition:`transform ${S}`,svg:{transition:`transform ${S}`}}),[`${e}-title`]:{marginInlineEnd:"auto"}}),[`${e}-collapsible-header`]:{cursor:"default",[`${e}-title`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-collapsible-icon`]:{cursor:"unset",[`${e}-expand-icon`]:{cursor:"pointer"}}},[`${e}-panel`]:{color:p,backgroundColor:r,borderTop:L,[`& > ${e}-body`]:{padding:k},"&-hidden":{display:"none"}},"&-small":{[`> ${e}-item`]:{[`> ${e}-header`]:{padding:s,paddingInlineStart:C,[`> ${e}-expand-icon`]:{marginInlineStart:t.calc(x).sub(C).equal()}},[`> ${e}-panel > ${e}-body`]:{padding:x}}},"&-large":{[`> ${e}-item`]:{fontSize:y,lineHeight:b,[`> ${e}-header`]:{padding:o,paddingInlineStart:n,[`> ${e}-expand-icon`]:{height:I,marginInlineStart:t.calc(T).sub(n).equal()}},[`> ${e}-panel > ${e}-body`]:{padding:T}}},[`${e}-item:last-child`]:{borderBottom:0,[`> ${e}-panel`]:{borderRadius:`0 0 ${Rt(u)} ${Rt(u)}`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:"not-allowed"}},[`&${e}-icon-placement-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,marginInlineEnd:0,marginInlineStart:w}}}}})}},"genBaseStyle"),uJe=l(t=>{const{componentCls:e}=t,r=`> ${e}-item > ${e}-header ${e}-arrow`;return{[`${e}-rtl`]:{[r]:{transform:"rotate(180deg)"}}}},"genArrowStyle"),hJe=l(t=>{const{componentCls:e,headerBg:r,borderlessContentPadding:n,borderlessContentBg:a,colorBorder:i}=t;return{[`${e}-borderless`]:{backgroundColor:r,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${i}`},[`
|
||
> ${e}-item:last-child,
|
||
> ${e}-item:last-child ${e}-header
|
||
`]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-panel`]:{backgroundColor:a,borderTop:0},[`> ${e}-item > ${e}-panel > ${e}-body`]:{padding:n}}}},"genBorderlessStyle"),dJe=l(t=>{const{componentCls:e,paddingSM:r}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-panel`]:{backgroundColor:"transparent",border:0,[`> ${e}-body`]:{paddingBlock:r}}}}}},"genGhostStyle"),fJe=l(t=>({headerPadding:`${t.paddingSM}px ${t.padding}px`,headerBg:t.colorFillAlter,contentPadding:`${t.padding}px 16px`,contentBg:t.colorBgContainer,borderlessContentPadding:`${t.paddingXXS}px 16px ${t.padding}px`,borderlessContentBg:"transparent"}),"prepareComponentToken2"),pJe=ea("Collapse",t=>{const e=Wn(t,{collapseHeaderPaddingSM:`${Rt(t.paddingXS)} ${Rt(t.paddingSM)}`,collapseHeaderPaddingLG:`${Rt(t.padding)} ${Rt(t.paddingLG)}`,collapsePanelBorderRadius:t.borderRadiusLG});return[cJe(e),hJe(e),dJe(e),uJe(e),MQe(e)]},fJe),Pse=G.forwardRef((t,e)=>{var V;const{getPrefixCls:r,direction:n,expandIcon:a,className:i,style:s,classNames:o,styles:u}=Aa("collapse"),{prefixCls:h,className:d,rootClassName:f,style:p,bordered:g=!0,ghost:m,size:y,expandIconPlacement:v,expandIconPosition:b,children:w,destroyInactivePanel:x,destroyOnHidden:T,expandIcon:C,classNames:S,styles:E}=t,k=Ll(Y=>{var H;return(H=y!=null?y:Y)!=null?H:"middle"}),A=r("collapse",h),I=r(),[L,R]=pJe(A),O=(V=v!=null?v:b)!=null?V:"start",M=Ne(X({},t),{size:k,bordered:g,expandIconPlacement:O}),[P,z]=Qa([o,S],[u,E],{props:M}),D=C!=null?C:a;{const Y=Tn("Collapse");[["destroyInactivePanel","destroyOnHidden"],["expandIconPosition","expandIconPlacement"]].forEach(([H,q])=>{Y.deprecated(!(H in t),H,q)})}const B=G.useCallback((Y={})=>{const H=typeof D=="function"?D(Y):G.createElement(bse,{rotate:Y.isActive?n==="rtl"?-90:90:void 0,"aria-label":Y.isActive?"expanded":"collapsed"});return bh(H,q=>({className:pt(q.className,`${A}-arrow`)}))},[D,A,n]),W=pt(`${A}-icon-placement-${O}`,{[`${A}-borderless`]:!g,[`${A}-rtl`]:n==="rtl",[`${A}-ghost`]:!!m,[`${A}-${k}`]:k!=="middle"},i,d,f,L,R,P.root),U=G.useMemo(()=>Ne(X({},_Ze(I)),{motionAppear:!1,leavedClassName:`${A}-panel-hidden`}),[I,A]),j=G.useMemo(()=>w?wo(w).map(Y=>Y):null,[w]);return G.createElement(Sse,Ne(X({ref:e,openMotion:U},ws(t,["rootClassName"])),{expandIcon:B,prefixCls:A,className:W,style:X(X(X({},z.root),s),p),classNames:P,styles:z,destroyOnHidden:T!=null?T:x}),j)});Pse.displayName="Collapse";var gJe=Object.assign(Pse,{Panel:LQe}),mJe=gJe,js=l(t=>t instanceof ic?t:new ic(t),"generateColor2"),S6=l(t=>Math.round(Number(t||0)),"getRoundNumber2"),MO=l(t=>S6(t.toHsb().a*100),"getColorAlpha"),_6=l((t,e)=>{const r=t.toRgb();if(!r.r&&!r.g&&!r.b){const n=t.toHsb();return n.a=1,js(n)}return r.a=1,js(r)},"genAlphaColor"),Rse=l((t,e)=>{const r=[{percent:0,color:t[0].color}].concat(Ea(t),[{percent:100,color:t[t.length-1].color}]);for(let n=0;n<r.length-1;n+=1){const a=r[n].percent,i=r[n+1].percent,s=r[n].color,o=r[n+1].color;if(a<=e&&e<=i){const u=i-a;if(u===0)return s;const h=(e-a)/u*100,d=new Su(s),f=new Su(o);return d.mix(f,h).toRgbString()}}return""},"getGradientPercentColor"),yJe=l(t=>t.map(e=>(e.colors=e.colors.map(js),e)),"genPresetColor2"),Ose=l((t,e)=>{const{r,g:n,b:a,a:i}=t.toRgb(),s=new Su(t.toRgbString()).onBackground(e).toHsv();return i<=.5?s.v>.5:r*.299+n*.587+a*.114>192},"isBright"),Dse=l((t,e)=>{var n;return`panel-${(n=t.key)!=null?n:e}`},"genCollapsePanelKey"),vJe=l(({prefixCls:t,presets:e,value:r,onChange:n})=>{const[a]=Tu("ColorPicker"),[,i]=Il(),s=N.useMemo(()=>yJe(e),[e]),o=`${t}-presets`,u=N.useMemo(()=>s.reduce((f,p,g)=>{const{defaultOpen:m=!0}=p;return m&&f.push(Dse(p,g)),f},[]),[s]),h=l(f=>{n==null||n(f)},"handleClick"),d=s.map((f,p)=>{var g;return{key:Dse(f,p),label:N.createElement("div",{className:`${o}-label`},f==null?void 0:f.label),children:N.createElement("div",{className:`${o}-items`},Array.isArray(f==null?void 0:f.colors)&&((g=f.colors)==null?void 0:g.length)>0?f.colors.map((m,y)=>{const v=js(m);return N.createElement(IO,{key:`preset-${y}-${m.toHexString()}`,color:v.toCssString(),prefixCls:t,className:pt(`${o}-color`,{[`${o}-color-checked`]:m.toCssString()===(r==null?void 0:r.toCssString()),[`${o}-color-bright`]:Ose(m,i.colorBgElevated)}),onClick:l(()=>h(m),"onClick")})}):N.createElement("span",{className:`${o}-empty`},a.presetEmpty))}});return N.createElement("div",{className:o},N.createElement(mJe,{defaultActiveKey:u,ghost:!0,items:d}))},"ColorPresets"),bJe=vJe,Fse=l(t=>{const{paddingInline:e,onlyIconSize:r,borderColorDisabled:n}=t;return Wn(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:r,colorBorderDisabled:n})},"prepareToken"),Bse=l(t=>{var f,p,g,m,y,v;const e=(f=t.contentFontSize)!=null?f:t.fontSize,r=(p=t.contentFontSizeSM)!=null?p:t.fontSize,n=(g=t.contentFontSizeLG)!=null?g:t.fontSizeLG,a=(m=t.contentLineHeight)!=null?m:Kk(e),i=(y=t.contentLineHeightSM)!=null?y:Kk(r),s=(v=t.contentLineHeightLG)!=null?v:Kk(n),o=Ose(new ic(t.colorBgSolid),"#fff")?"#000":"#fff",u=yh.reduce((b,w)=>Ne(X({},b),{[`${w}ShadowColor`]:`0 ${Rt(t.controlOutlineWidth)} 0 ${iS(t[`${w}1`],t.colorBgContainer)}`}),{}),h=t.colorBgContainerDisabled,d=t.colorBgContainerDisabled;return Ne(X({},u),{fontWeight:400,iconGap:t.marginXS,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorderDisabled,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:o,contentFontSize:e,contentFontSizeSM:r,contentFontSizeLG:n,contentLineHeight:a,contentLineHeightSM:i,contentLineHeightLG:s,paddingBlock:Math.max((t.controlHeight-e*a)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-r*i)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-n*s)/2-t.lineWidth,0),defaultBgDisabled:h,dashedBgDisabled:d})},"prepareComponentToken3"),xJe=l(t=>{const{componentCls:e,antCls:r,lineWidth:n}=t,[a,i]=To(r,"btn");return{[e]:[{[a("border-width")]:n,[a("border-color")]:"#000",[a("border-color-hover")]:i("border-color"),[a("border-color-active")]:i("border-color"),[a("border-color-disabled")]:i("border-color"),[a("border-style")]:"solid",[a("text-color")]:"#000",[a("text-color-hover")]:i("text-color"),[a("text-color-active")]:i("text-color"),[a("text-color-disabled")]:i("text-color"),[a("bg-color")]:"#ddd",[a("bg-color-hover")]:i("bg-color"),[a("bg-color-active")]:i("bg-color"),[a("bg-color-disabled")]:t.colorBgContainerDisabled,[a("bg-color-container")]:t.colorBgContainer,[a("shadow")]:"none"},{border:[i("border-width"),i("border-style"),i("border-color")].join(" "),color:i("text-color"),backgroundColor:i("bg-color"),[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":{border:[i("border-width"),i("border-style"),i("border-color-hover")].join(" "),color:i("text-color-hover"),backgroundColor:i("bg-color-hover")},"&:active":{border:[i("border-width"),i("border-style"),i("border-color-active")].join(" "),color:i("text-color-active"),backgroundColor:i("bg-color-active")}}},{[`&${e}-variant-solid`]:{[a("solid-bg-color")]:i("color-base"),[a("solid-bg-color-hover")]:i("color-hover"),[a("solid-bg-color-active")]:i("color-active"),[a("border-color")]:"transparent",[a("text-color")]:t.colorTextLightSolid,[a("bg-color")]:i("solid-bg-color"),[a("bg-color-hover")]:i("solid-bg-color-hover"),[a("bg-color-active")]:i("solid-bg-color-active"),boxShadow:i("shadow")},[`&${e}-variant-outlined, &${e}-variant-dashed`]:{[a("border-color")]:i("color-base"),[a("border-color-hover")]:i("color-hover"),[a("border-color-active")]:i("color-active"),[a("bg-color")]:i("bg-color-container"),[a("text-color")]:i("color-base"),[a("text-color-hover")]:i("color-hover"),[a("text-color-active")]:i("color-active"),boxShadow:i("shadow")},[`&${e}-variant-dashed`]:{[a("border-style")]:"dashed",[a("bg-color-disabled")]:t.dashedBgDisabled},[`&${e}-variant-filled`]:{[a("border-color")]:"transparent",[a("text-color")]:i("color-base"),[a("bg-color")]:i("color-light"),[a("bg-color-hover")]:i("color-light-hover"),[a("bg-color-active")]:i("color-light-active")},[`&${e}-variant-text, &${e}-variant-link`]:{[a("border-color")]:"transparent",[a("text-color")]:i("color-base"),[a("text-color-hover")]:i("color-hover"),[a("text-color-active")]:i("color-active"),[a("bg-color")]:"transparent",[a("bg-color-hover")]:"transparent",[a("bg-color-active")]:"transparent",[`&:disabled, &${t.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${e}-variant-text`]:{[a("bg-color-hover")]:i("color-light"),[a("bg-color-active")]:i("color-light-active")}},{[`&${e}-variant-link`]:{[a("color-base")]:t.colorLink,[a("color-hover")]:t.colorLinkHover,[a("color-active")]:t.colorLinkActive,[a("bg-color-hover")]:t.linkHoverBg},[`&${e}-color-primary`]:{[a("color-base")]:t.colorPrimary,[a("color-hover")]:t.colorPrimaryHover,[a("color-active")]:t.colorPrimaryActive,[a("color-light")]:t.colorPrimaryBg,[a("color-light-hover")]:t.colorPrimaryBgHover,[a("color-light-active")]:t.colorPrimaryBorder,[a("shadow")]:t.primaryShadow,[`&${e}-variant-solid`]:{[a("text-color")]:t.primaryColor,[a("text-color-hover")]:i("text-color"),[a("text-color-active")]:i("text-color")}},[`&${e}-color-dangerous`]:{[a("color-base")]:t.colorError,[a("color-hover")]:t.colorErrorHover,[a("color-active")]:t.colorErrorActive,[a("color-light")]:t.colorErrorBg,[a("color-light-hover")]:t.colorErrorBgFilledHover,[a("color-light-active")]:t.colorErrorBgActive,[a("shadow")]:t.dangerShadow,[`&${e}-variant-solid`]:{[a("text-color")]:t.dangerColor,[a("text-color-hover")]:i("text-color"),[a("text-color-active")]:i("text-color")}},[`&${e}-color-default`]:{[a("solid-bg-color")]:t.colorBgSolid,[a("solid-bg-color-hover")]:t.colorBgSolidHover,[a("solid-bg-color-active")]:t.colorBgSolidActive,[a("color-base")]:t.defaultBorderColor,[a("color-hover")]:t.defaultHoverBorderColor,[a("color-active")]:t.defaultActiveBorderColor,[a("color-light")]:t.colorFillTertiary,[a("color-light-hover")]:t.colorFillSecondary,[a("color-light-active")]:t.colorFill,[a("text-color")]:t.defaultColor,[a("text-color-hover")]:t.defaultHoverColor,[a("text-color-active")]:t.defaultActiveColor,[a("shadow")]:t.defaultShadow,[`&${e}-variant-outlined`]:{[a("bg-color-disabled")]:t.defaultBgDisabled},[`&${e}-variant-solid`]:{[a("text-color")]:t.solidTextColor,[a("text-color-hover")]:i("text-color"),[a("text-color-active")]:i("text-color")},[`&${e}-variant-filled, &${e}-variant-text`]:{[a("text-color-hover")]:i("text-color"),[a("text-color-active")]:i("text-color")},[`&${e}-variant-outlined, &${e}-variant-dashed`]:{[a("text-color")]:t.defaultColor,[a("text-color-hover")]:t.defaultHoverColor,[a("text-color-active")]:t.defaultActiveColor,[a("bg-color-container")]:t.defaultBg,[a("bg-color-hover")]:t.defaultHoverBg,[a("bg-color-active")]:t.defaultActiveBg},[`&${e}-variant-text`]:{[a("text-color")]:t.textTextColor,[a("text-color-hover")]:t.textTextHoverColor,[a("text-color-active")]:t.textTextActiveColor,[a("bg-color-hover")]:t.textHoverBg},[`&${e}-background-ghost`]:{[`&${e}-variant-outlined, &${e}-variant-dashed`]:{[a("text-color")]:t.defaultGhostColor,[a("border-color")]:t.defaultGhostBorderColor}}}},yh.map(s=>{const o=t[`${s}6`],u=t[`${s}1`],h=t[`${s}Hover`],d=t[`${s}2`],f=t[`${s}3`],p=t[`${s}Active`],g=t[`${s}ShadowColor`];return{[`&${e}-color-${s}`]:{[a("color-base")]:o,[a("color-hover")]:h,[a("color-active")]:p,[a("color-light")]:u,[a("color-light-hover")]:d,[a("color-light-active")]:f,[a("shadow")]:g}}}),{[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:t.colorBorderDisabled,background:i("bg-color-disabled"),color:t.colorTextDisabled,boxShadow:"none"}},{[`&${e}-background-ghost`]:{[a("bg-color")]:t.ghostBg,[a("bg-color-hover")]:t.ghostBg,[a("bg-color-active")]:t.ghostBg,[a("shadow")]:"none",[`&${e}-variant-outlined, &${e}-variant-dashed`]:{[a("bg-color-hover")]:t.ghostBg,[a("bg-color-active")]:t.ghostBg}}}]}},"genVariantStyle"),wJe=xJe,TJe=l(t=>{const{componentCls:e,iconCls:r,fontWeight:n,opacityLoading:a,motionDurationSlow:i,motionEaseInOut:s,iconGap:o,calc:u}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:o,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation","&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:sS(),"> a":{color:"currentColor"},"&:not(:disabled)":vh(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"}},[`&${e}-loading`]:{opacity:a,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(h=>`${h} ${i} ${s}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:u(o).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:u(o).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:u(o).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:u(o).mul(-1).equal()}}}}}},"genSharedButtonStyle"),EJe=l(t=>({minWidth:t.controlHeight,paddingInline:0,borderRadius:"50%"}),"genCircleButtonStyle"),PO=l((t,e="")=>{const{componentCls:r,controlHeight:n,fontSize:a,borderRadius:i,buttonPaddingHorizontal:s,iconCls:o,buttonPaddingVertical:u,buttonIconOnlyFontSize:h}=t;return[{[e]:{fontSize:a,height:n,padding:`${Rt(u)} ${Rt(s)}`,borderRadius:i,[`&${r}-icon-only`]:{width:n,[o]:{fontSize:h}}}},{[`${r}${r}-circle${e}`]:EJe(t)},{[`${r}${r}-round${e}`]:{borderRadius:t.controlHeight,[`&:not(${r}-icon-only)`]:{paddingInline:t.buttonPaddingHorizontal}}}]},"genButtonStyle"),CJe=l(t=>{const e=Wn(t,{fontSize:t.contentFontSize});return PO(e,t.componentCls)},"genSizeBaseButtonStyle"),SJe=l(t=>{const e=Wn(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return PO(e,`${t.componentCls}-sm`)},"genSizeSmallButtonStyle"),_Je=l(t=>{const e=Wn(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return PO(e,`${t.componentCls}-lg`)},"genSizeLargeButtonStyle"),kJe=l(t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},"genBlockButtonStyle"),AJe=ea("Button",t=>{const e=Fse(t);return[TJe(e),CJe(e),SJe(e),_Je(e),kJe(e),wJe(e),KZe(e)]},Bse,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function NJe(t,e,r,n){const{focusElCls:a,focus:i,borderElCls:s}=r,o=s?"> *":"",u=["hover",i?"focus":null,"active"].filter(Boolean).map(h=>`&:${h} ${o}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":Ne(X({[u]:{zIndex:3}},a?{[`&${a}`]:{zIndex:3}}:{}),{[`&[disabled] ${o}`]:{zIndex:0}})}}l(NJe,"compactItemBorder");function IJe(t,e,r){const{borderElCls:n}=r,a=n?`> ${n}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${a}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${a}, &${t}-sm ${a}, &${t}-lg ${a}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${a}, &${t}-sm ${a}, &${t}-lg ${a}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}l(IJe,"compactItemBorderRadius");function kx(t,e={focus:!0}){const{componentCls:r}=t,{componentCls:n}=e,a=n||r,i=`${a}-compact`;return{[i]:X(X({},NJe(t,i,e,a)),IJe(a,i,e))}}l(kx,"genCompactItemStyle");function LJe(t,e,r){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}l(LJe,"compactItemVerticalBorder");function $Je(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}l($Je,"compactItemBorderVerticalRadius");function MJe(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:X(X({},LJe(t,e,t.componentCls)),$Je(t.componentCls,e))}}l(MJe,"genCompactItemVerticalStyle");var PJe=l(t=>{const{antCls:e,componentCls:r,lineWidth:n,calc:a,colorBgContainer:i}=t,s=`${r}-variant-solid:not([disabled])`,o=a(n).mul(-1).equal(),[u,h]=To(e,"btn"),d=l(f=>({[`${r}-compact${f?"-vertical":""}-item`]:{[u("compact-connect-border-color")]:h("bg-color-hover"),[`&${s}`]:{transition:"none",[`& + ${s}:before`]:[{position:"absolute",backgroundColor:h("compact-connect-border-color"),content:'""'},f?{top:o,insetInline:o,height:n}:{insetBlock:o,insetInlineStart:o,width:n}],"&:hover:before":{display:"none"}}}}),"getCompactBorderStyle");return[d(),d(!0),{[`${s}${r}-color-default`]:{[u("compact-connect-border-color")]:`color-mix(in srgb, ${h("bg-color-hover")} 75%, ${i})`}}]},"genButtonCompactStyle"),RJe=_ae(["Button","compact"],t=>{const e=Fse(t);return[kx(e),MJe(e),PJe(e)]},Bse);function OJe(t){if(typeof t=="object"&&t){let e=t==null?void 0:t.delay;return e=!Number.isNaN(e)&&typeof e=="number"?e:0,{loading:e<=0,delay:e}}return{loading:!!t,delay:0}}l(OJe,"getLoadingConfig");var DJe={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},FJe=N.forwardRef((t,e)=>{var qe,Me,lt;const vt=t,{_skipSemantic:r,loading:n=!1,prefixCls:a,color:i,variant:s,type:o,danger:u=!1,shape:h,size:d,disabled:f,className:p,rootClassName:g,children:m,icon:y,iconPosition:v,iconPlacement:b,ghost:w=!1,block:x=!1,htmlType:T="button",classNames:C,styles:S,style:E,autoInsertSpace:k,autoFocus:A}=vt,I=Xt(vt,["_skipSemantic","loading","prefixCls","color","variant","type","danger","shape","size","disabled","className","rootClassName","children","icon","iconPosition","iconPlacement","ghost","block","htmlType","classNames","styles","style","autoInsertSpace","autoFocus"]),L=wo(m),R=o||"default",{getPrefixCls:O,direction:M,autoInsertSpace:P,className:z,style:D,classNames:B,styles:W,loadingIcon:U,shape:j,color:V,variant:Y}=Aa("button"),H=h||j||"default",[q,Z]=N.useMemo(()=>{if(i&&s)return[i,s];if(o||u){const it=DJe[R]||[];return u?["danger",it[1]]:it}return V&&Y?[V,Y]:["default","outlined"]},[i,s,o,u,V,Y,R]),[K,re]=N.useMemo(()=>w&&Z==="solid"?[q,"outlined"]:[q,Z],[q,Z,w]),Q=K==="danger",te=Q?"dangerous":K,ee=(qe=k!=null?k:P)!=null?qe:!0,J=O("btn",a),[ae,se]=AJe(J),fe=N.useContext(xh),ve=f!=null?f:fe,de=N.useContext(ase),Ee=N.useMemo(()=>OJe(n),[n]),[Ce,De]=N.useState(Ee.loading),[ce,Ie]=N.useState(!1),ye=N.useRef(null),pe=bg(e,ye),Ae=L.length===1&&!y&&!T6(re),Ve=N.useRef(!0);N.useEffect(()=>(Ve.current=!1,()=>{Ve.current=!0}),[]),On(()=>{let it=null;Ee.delay>0?it=setTimeout(()=>{it=null,De(!0)},Ee.delay):De(Ee.loading);function Ue(){it&&(clearTimeout(it),it=null)}return l(Ue,"cleanupTimer"),Ue},[Ee.delay,Ee.loading]),N.useEffect(()=>{if(!ye.current||!ee)return;const it=ye.current.textContent||"";Ae&&_O(it)?ce||Ie(!0):ce&&Ie(!1)}),N.useEffect(()=>{A&&ye.current&&ye.current.focus()},[]);const ze=N.useCallback(it=>{var Ue;if(Ce||ve){it.preventDefault();return}(Ue=t.onClick)==null||Ue.call(t,("href"in t,it))},[t.onClick,Ce,ve]);{const it=Tn("Button");it(!(typeof y=="string"&&y.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${y}\` at https://ant.design/components/icon`),it(!(w&&T6(re)),"usage","`link` or `text` button can't be a `ghost` button."),it.deprecated(!v,"iconPosition","iconPlacement")}const{compactSize:We,compactItemClassnames:me}=A0(J,M),Se={large:"lg",small:"sm",middle:void 0,medium:void 0},ne=Ll(it=>{var Ue,we;return(we=(Ue=d!=null?d:We)!=null?Ue:de)!=null?we:it}),xe=ne&&(Me=Se[ne])!=null?Me:"",oe=Ce?"loading":y,_e=(lt=b!=null?b:v)!=null?lt:"start",ue=ws(I,["navigate"]),tt=Ne(X({},t),{type:R,color:K,variant:re,danger:Q,shape:H,size:ne,disabled:ve,loading:Ce,iconPlacement:_e}),[Re,et]=Qa([r?void 0:B,C],[r?void 0:W,S],{props:tt}),Xe=pt(J,ae,se,{[`${J}-${H}`]:H!=="default"&&H!=="square"&&H,[`${J}-${R}`]:R,[`${J}-dangerous`]:u,[`${J}-color-${te}`]:te,[`${J}-variant-${re}`]:re,[`${J}-${xe}`]:xe,[`${J}-icon-only`]:!m&&m!==0&&!!oe,[`${J}-background-ghost`]:w&&!T6(re),[`${J}-loading`]:Ce,[`${J}-two-chinese-chars`]:ce&&ee&&!Ce,[`${J}-block`]:x,[`${J}-rtl`]:M==="rtl",[`${J}-icon-end`]:_e==="end"},me,p,g,z,Re.root),ot=X(X(X({},et.root),D),E),Ge={className:Re.icon,style:et.icon},ht=l(it=>N.createElement(lse,X({prefixCls:J},Ge),it),"iconWrapperElement"),Je=N.createElement(UZe,X({existIcon:!!y,prefixCls:J,loading:Ce,mount:Ve.current},Ge)),St=n&&typeof n=="object"&&n.icon||U;let He;y&&!Ce?He=ht(y):n&&St?He=ht(St):He=Je;const dt=Eu(m)?GZe(m,Ae&&ee,et.content,Re.content):null;if(ue.href!==void 0)return N.createElement("a",Ne(X({},ue),{className:pt(Xe,{[`${J}-disabled`]:ve}),href:ve?void 0:ue.href,style:ot,onClick:ze,ref:pe,tabIndex:ve?-1:0,"aria-disabled":ve}),He,dt);let Oe=N.createElement("button",Ne(X({},I),{type:T,className:Xe,style:ot,onClick:ze,disabled:ve,ref:pe}),He,dt,me&&N.createElement(RJe,{prefixCls:J}));return T6(re)||(Oe=N.createElement(nse,{component:"Button",disabled:Ce},Oe)),Oe}),k6=FJe;k6.Group=WZe,k6.__ANT_BUTTON=!0,k6.displayName="Button";var mS=k6,RO=l(t=>typeof(t==null?void 0:t.then)=="function","isThenable"),BJe=l(t=>{const{type:e,children:r,prefixCls:n,buttonProps:a,close:i,autoFocus:s,emitEvent:o,isSilent:u,quitOnNullishReturnValue:h,actionFn:d}=t,f=G.useRef(!1),p=G.useRef(null),[g,m]=Ok(!1),y=l((...w)=>{i==null||i(...w)},"onInternalClose");G.useEffect(()=>{let w=null;return s&&(w=setTimeout(()=>{var x;(x=p.current)==null||x.focus({preventScroll:!0})})),()=>{w&&clearTimeout(w)}},[s]);const v=l(w=>{RO(w)&&(m(!0),w.then((...x)=>{m(!1,!0),y.apply(void 0,x),f.current=!1},x=>{if(m(!1,!0),f.current=!1,!(u!=null&&u()))return Promise.reject(x)}))},"handlePromiseOnOk"),b=l(w=>{if(f.current)return;if(f.current=!0,!d){y();return}let x;if(o){if(x=d(w),h&&!RO(x)){f.current=!1,y(w);return}}else if(d.length)x=d(i),f.current=!1;else if(x=d(),!RO(x)){y();return}v(x)},"onClick");return G.createElement(mS,Ne(X(Ne(X({},sse(e)),{onClick:b,loading:g,prefixCls:n}),a),{ref:p}),r)},"ActionButton"),zse=BJe,yS=N.createContext({}),{Provider:Hse}=yS,zJe=l(()=>{const{autoFocusButton:t,cancelButtonProps:e,cancelTextLocale:r,isSilent:n,mergedOkCancel:a,rootPrefixCls:i,close:s,onCancel:o,onConfirm:u,onClose:h}=N.useContext(yS);return a?N.createElement(zse,{isSilent:n,actionFn:o,close:l((...d)=>{s==null||s(...d),u==null||u(!1),h==null||h()},"close"),autoFocus:t==="cancel",buttonProps:e,prefixCls:`${i}-btn`},r):null},"ConfirmCancelBtn"),Wse=zJe,HJe=l(()=>{const{autoFocusButton:t,close:e,isSilent:r,okButtonProps:n,rootPrefixCls:a,okTextLocale:i,okType:s,onConfirm:o,onOk:u,onClose:h}=N.useContext(yS);return N.createElement(zse,{isSilent:r,type:s||"primary",actionFn:u,close:l((...d)=>{e==null||e(...d),o==null||o(!0),h==null||h()},"close"),autoFocus:t==="ok",buttonProps:n,prefixCls:`${a}-btn`},i)},"ConfirmOkBtn"),Vse=HJe,Gse=G.createContext({});function qse(t,e,r){let n=e;return!n&&r&&(n=`${t}-${r}`),n}l(qse,"getMotionName");function Yse(t,e){let r=t[`page${e?"Y":"X"}Offset`];const n=`scroll${e?"Top":"Left"}`;if(typeof r!="number"){const a=t.document;r=a.documentElement[n],typeof r!="number"&&(r=a.body[n])}return r}l(Yse,"getScroll");function WJe(t){const e=t.getBoundingClientRect(),r={left:e.left,top:e.top},n=t.ownerDocument,a=n.defaultView||n.parentWindow;return r.left+=Yse(a),r.top+=Yse(a,!0),r}l(WJe,"offset");function Use(t,e=!1){if(gO(t)){const r=t.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||t.isContentEditable||r==="a"&&!!t.getAttribute("href"),a=t.getAttribute("tabindex"),i=Number(a);let s=null;return a&&!Number.isNaN(i)?s=i:n&&s===null&&(s=0),n&&t.disabled&&(s=null),s!==null&&(s>=0||e&&s<0)}return!1}l(Use,"focusable");function OO(t,e=!1){const r=[...t.querySelectorAll("*")].filter(n=>Use(n,e));return Use(t,e)&&r.unshift(t),r}l(OO,"getFocusNodeList");function DO(t,e){if(!t)return;t.focus(e);const{cursor:r}=e||{};if(r&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)){const n=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(n,n);break;default:t.setSelectionRange(0,n)}}}l(DO,"triggerFocus");var Ax=null,N0=[],FO=new Map,BO=new Map;function zO(){return N0[N0.length-1]}l(zO,"getLastElement");function VJe(t){const e=zO();if(t&&e){let r;for(const[a,i]of FO.entries())if(i===e){r=a;break}const n=BO.get(r);return!!n&&(n===t||n.contains(t))}return!1}l(VJe,"isIgnoredElement");function GJe(t){const{activeElement:e}=document;return t===e||t.contains(e)}l(GJe,"hasFocus");function HO(){const t=zO(),{activeElement:e}=document;if(!VJe(e))if(t&&!GJe(t)){const r=OO(t),n=r.includes(Ax)?Ax:r[0];n==null||n.focus({preventScroll:!0})}else Ax=e}l(HO,"syncFocus");function jse(t){if(t.key==="Tab"){const{activeElement:e}=document,r=zO(),n=OO(r),a=n[n.length-1];t.shiftKey&&e===n[0]?Ax=a:!t.shiftKey&&e===a&&(Ax=n[0])}}l(jse,"onWindowKeyDown");function qJe(t,e){return t&&(FO.set(e,t),N0=N0.filter(r=>r!==t),N0.push(t),window.addEventListener("focusin",HO),window.addEventListener("keydown",jse,!0),HO()),()=>{Ax=null,N0=N0.filter(r=>r!==t),FO.delete(e),BO.delete(e),N0.length===0&&(window.removeEventListener("focusin",HO),window.removeEventListener("keydown",jse,!0))}}l(qJe,"lockFocus");function YJe(t,e){const r=S0();return N.useEffect(()=>{if(t){const a=e();if(a)return qJe(a,r)}},[t,r]),[l(a=>{a&&BO.set(r,a)},"ignoreElement")]}l(YJe,"useLockFocus");var UJe=G.memo(({children:t})=>t,(t,{shouldUpdate:e})=>!e);function A6(){return A6=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},A6.apply(this,arguments)}l(A6,"_extends18");var Kse=N.forwardRef((t,e)=>{const{prefixCls:r,className:n,style:a,title:i,ariaId:s,footer:o,closable:u,closeIcon:h,onClose:d,children:f,bodyStyle:p,bodyProps:g,modalRender:m,onMouseDown:y,onMouseUp:v,holderRef:b,visible:w,forceRender:x,width:T,height:C,classNames:S,styles:E,isFixedPos:k,focusTrap:A}=t,{panel:I}=N.useContext(Gse),L=N.useRef(null),R=bg(b,I,L),[O]=YJe(w&&k&&A!==!1,()=>L.current);N.useImperativeHandle(e,()=>({focus:l(()=>{var V;(V=L.current)==null||V.focus({preventScroll:!0})},"focus")}));const M={};T!==void 0&&(M.width=T),C!==void 0&&(M.height=C);const P=o?N.createElement("div",{className:pt(`${r}-footer`,S==null?void 0:S.footer),style:X({},E==null?void 0:E.footer)},o):null,z=i?N.createElement("div",{className:pt(`${r}-header`,S==null?void 0:S.header),style:X({},E==null?void 0:E.header)},N.createElement("div",{className:pt(`${r}-title`,S==null?void 0:S.title),id:s,style:X({},E==null?void 0:E.title)},i)):null,D=N.useMemo(()=>typeof u=="object"&&u!==null?u:u?{closeIcon:h!=null?h:N.createElement("span",{className:`${r}-close-x`})}:{},[u,h,r]),B=Hc(D,!0),W=typeof u=="object"&&u.disabled,U=u?N.createElement("button",A6({type:"button",onClick:d,"aria-label":"Close"},B,{className:`${r}-close`,disabled:W}),D.closeIcon):null,j=N.createElement("div",{className:pt(`${r}-container`,S==null?void 0:S.container),style:E==null?void 0:E.container},U,z,N.createElement("div",A6({className:pt(`${r}-body`,S==null?void 0:S.body),style:X(X({},p),E==null?void 0:E.body)},g),f),P);return N.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?s:null,"aria-modal":"true",ref:R,style:X(X({},a),M),className:pt(r,n),onMouseDown:y,onMouseUp:v,tabIndex:-1,onFocus:l(V=>{O(V.target)},"onFocus")},N.createElement(UJe,{shouldUpdate:w||x},m?m(j):j))});Kse.displayName="Panel";var jJe=Kse;function WO(){return WO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},WO.apply(this,arguments)}l(WO,"_extends19");var Xse=G.forwardRef((t,e)=>{const{prefixCls:r,title:n,style:a,className:i,visible:s,forceRender:o,destroyOnHidden:u,motionName:h,ariaId:d,onVisibleChanged:f,mousePosition:p}=t,g=N.useRef(null),m=N.useRef(null);G.useImperativeHandle(e,()=>Ne(X({},m.current),{inMotion:g.current.inMotion,enableMotion:g.current.enableMotion}));const[y,v]=G.useState(),b={};y&&(b.transformOrigin=y);function w(){var T;if(!((T=g.current)!=null&&T.nativeElement))return;const x=WJe(g.current.nativeElement);v(p&&(p.x||p.y)?`${p.x-x.left}px ${p.y-x.top}px`:"")}return l(w,"onPrepare"),G.createElement(zc,{visible:s,onVisibleChanged:f,onAppearPrepare:w,onEnterPrepare:w,forceRender:o,motionName:h,removeOnLeave:u,ref:g},({className:x,style:T},C)=>G.createElement(jJe,WO({},t,{ref:m,title:n,ariaId:d,prefixCls:r,holderRef:C,style:X(X(X({},T),a),b),className:pt(i,x)})))});Xse.displayName="Content";var KJe=Xse;function VO(){return VO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},VO.apply(this,arguments)}l(VO,"_extends20");var XJe=l(t=>{const{prefixCls:e,style:r,visible:n,maskProps:a,motionName:i,className:s}=t;return G.createElement(zc,{key:"mask",visible:n,motionName:i,leavedClassName:`${e}-mask-hidden`},({className:o,style:u},h)=>G.createElement("div",VO({ref:h,style:X(X({},u),r),className:pt(`${e}-mask`,o,s)},a)))},"Mask2"),ZJe=XJe;function vS(){return vS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},vS.apply(this,arguments)}l(vS,"_extends21");var QJe=l(t=>{const{prefixCls:e="rc-dialog",zIndex:r,visible:n=!1,focusTriggerAfterClose:a=!0,wrapStyle:i,wrapClassName:s,wrapProps:o,onClose:u,afterOpenChange:h,afterClose:d,transitionName:f,animation:p,closable:g=!0,mask:m=!0,maskTransitionName:y,maskAnimation:v,maskClosable:b=!0,maskStyle:w,maskProps:x,rootClassName:T,rootStyle:C,classNames:S,styles:E}=t;["wrapStyle","bodyStyle","maskStyle"].forEach(q=>{p0(!(q in t),`${q} is deprecated, please use styles instead.`)}),"wrapClassName"in t&&p0(!1,"wrapClassName is deprecated, please use classNames instead.");const k=N.useRef(null),A=N.useRef(null),I=N.useRef(null),[L,R]=G.useState(n),[O,M]=G.useState(!1),P=S0();function z(){ZR(A.current,document.activeElement)||(k.current=document.activeElement)}l(z,"saveLastOutSideActiveElementRef");function D(){var q;ZR(A.current,document.activeElement)||(q=I.current)==null||q.focus()}l(D,"focusDialogContent");function B(){if(R(!1),m&&k.current&&a){try{k.current.focus({preventScroll:!0})}catch(q){}k.current=null}L&&(d==null||d())}l(B,"doClose");function W(q){q?D():B(),h==null||h(q)}l(W,"onDialogVisibleChanged");function U(q){u==null||u(q)}l(U,"onInternalClose");const j=N.useRef(!1);let V=null;b&&(V=l(q=>{A.current===q.target&&j.current&&U(q)},"onWrapperClick"));function Y(q){j.current=q.target===A.current}l(Y,"onWrapperMouseDown"),N.useEffect(()=>{if(n){if(j.current=!1,R(!0),z(),A.current){const q=getComputedStyle(A.current);M(q.position==="fixed")}}else L&&I.current.enableMotion()&&!I.current.inMotion()&&B()},[n]);const H=Ne(X(X({zIndex:r},i),E==null?void 0:E.wrapper),{display:L?null:"none"});return G.createElement("div",vS({className:pt(`${e}-root`,T),style:C},Hc(t,{data:!0})),G.createElement(ZJe,{prefixCls:e,visible:m&&n,motionName:qse(e,y,v),style:X(X({zIndex:r},w),E==null?void 0:E.mask),maskProps:x,className:S==null?void 0:S.mask}),G.createElement("div",vS({className:pt(`${e}-wrap`,s,S==null?void 0:S.wrapper),ref:A,onClick:V,onMouseDown:Y,style:H},o),G.createElement(KJe,vS({},t,{isFixedPos:O,ref:I,closable:g,ariaId:P,prefixCls:e,visible:n&&L,onClose:U,onVisibleChanged:W,motionName:qse(e,f,p)}))))},"Dialog"),JJe=QJe;function GO(){return GO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},GO.apply(this,arguments)}l(GO,"_extends22");var Zse=l(t=>{const{visible:e,getContainer:r,forceRender:n,destroyOnHidden:a=!1,afterClose:i,closable:s,panelRef:o,keyboard:u=!0,onClose:h}=t,[d,f]=G.useState(e),p=G.useMemo(()=>({panel:o}),[o]),g=l(({top:m,event:y})=>{if(m&&u){y.stopPropagation(),h==null||h(y);return}},"onEsc");return G.useEffect(()=>{e&&f(!0)},[e]),!n&&a&&!d?null:G.createElement(Gse.Provider,{value:p},G.createElement(d6,{open:e||n||d,onEsc:g,autoDestroy:!1,getContainer:r,autoLock:e||d},G.createElement(JJe,GO({},t,{destroyOnHidden:a,afterClose:l(()=>{const m=s&&typeof s=="object"?s:{},{afterClose:y}=m||{};y==null||y(),i==null||i(),f(!1)},"afterClose")}))))},"DialogWrap");Zse.displayName="Dialog";var eet=Zse,tet=eet,Ag="RC_FORM_INTERNAL_HOOKS",ga=l(()=>{an(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},"warningFunc"),ret=G.createContext({getFieldValue:ga,getFieldsValue:ga,getFieldError:ga,getFieldWarning:ga,getFieldsError:ga,isFieldsTouched:ga,isFieldTouched:ga,isFieldValidating:ga,isFieldsValidating:ga,resetFields:ga,setFields:ga,setFieldValue:ga,setFieldsValue:ga,validateFields:ga,submit:ga,getInternalHooks:l(()=>(ga(),{dispatch:ga,initEntityValue:ga,registerField:ga,useSubscribe:ga,setInitialValues:ga,destroyForm:ga,setCallbacks:ga,registerWatch:ga,getFields:ga,setValidateMessages:ga,setPreserve:ga,getInitialValue:ga}),"getInternalHooks")}),Nx=ret,net=G.createContext(null),N6=net;function qO(t){return t==null?[]:Array.isArray(t)?t:[t]}l(qO,"toArray3");function aet(t){return t&&!!t._init}l(aet,"isFormInstance");function YO(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:l(function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e},"clone")}}l(YO,"newMessages");var UO=YO();function iet(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch(e){return typeof t=="function"}}l(iet,"_isNativeFunction");function set(t,e,r){if(x9())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var a=new(t.bind.apply(t,n));return r&&eS(a,r.prototype),a}l(set,"_construct");function jO(t){var e=typeof Map=="function"?new Map:void 0;return jO=l(function(n){if(n===null||!iet(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,a)}function a(){return set(n,arguments,tS(this).constructor)}return l(a,"Wrapper3"),a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),eS(a,n)},"_wrapNativeSuper2"),jO(t)}l(jO,"_wrapNativeSuper");var oet=/%[sdj%]/g,Qse=l(function(){},"warning5");typeof process!="undefined"&&process.env&&typeof window!="undefined"&&typeof document!="undefined"&&(Qse=l(function(e,r){typeof console!="undefined"&&console.warn&&typeof ASYNC_VALIDATOR_NO_WARNING=="undefined"&&r.every(function(n){return typeof n=="string"})&&console.warn(e,r)},"warning6"));function KO(t){if(!t||!t.length)return null;var e={};return t.forEach(function(r){var n=r.field;e[n]=e[n]||[],e[n].push(r)}),e}l(KO,"convertFieldsError");function sc(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var a=0,i=r.length;if(typeof t=="function")return t.apply(null,r);if(typeof t=="string"){var s=t.replace(oet,function(o){if(o==="%%")return"%";if(a>=i)return o;switch(o){case"%s":return String(r[a++]);case"%d":return Number(r[a++]);case"%j":try{return JSON.stringify(r[a++])}catch(u){return"[Circular]"}break;default:return o}});return s}return t}l(sc,"format$2");function cet(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"||t==="tel"}l(cet,"isNativeStringType");function ss(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||cet(e)&&typeof t=="string"&&!t)}l(ss,"isEmptyValue");function uet(t,e,r){var n=[],a=0,i=t.length;function s(o){n.push.apply(n,Ea(o||[])),a++,a===i&&r(n)}l(s,"count"),t.forEach(function(o){e(o,s)})}l(uet,"asyncParallelArray");function Jse(t,e,r){var n=0,a=t.length;function i(s){if(s&&s.length){r(s);return}var o=n;n=n+1,o<a?e(t[o],i):r([])}l(i,"next2"),i([])}l(Jse,"asyncSerialArray");function het(t){var e=[];return Object.keys(t).forEach(function(r){e.push.apply(e,Ea(t[r]||[]))}),e}l(het,"flattenObjArr");var eoe=function(t){b9(r,t);var e=w9(r);function r(n,a){var i;return Dd(this,r),i=e.call(this,"Async Validation Error"),oa(Cg(i),"errors",void 0),oa(Cg(i),"fields",void 0),i.errors=n,i.fields=a,i}return l(r,"AsyncValidationError2"),Fd(r)}(jO(Error));function det(t,e,r,n,a){if(e.first){var i=new Promise(function(p,g){var m=l(function(b){return n(b),b.length?g(new eoe(b,KO(b))):p(a)},"next3"),y=het(t);Jse(y,r,m)});return i.catch(function(p){return p}),i}var s=e.firstFields===!0?Object.keys(t):e.firstFields||[],o=Object.keys(t),u=o.length,h=0,d=[],f=new Promise(function(p,g){var m=l(function(v){if(d.push.apply(d,v),h++,h===u)return n(d),d.length?g(new eoe(d,KO(d))):p(a)},"next3");o.length||(n(d),p(a)),o.forEach(function(y){var v=t[y];s.indexOf(y)!==-1?Jse(v,r,m):uet(v,r,m)})});return f.catch(function(p){return p}),f}l(det,"asyncMap");function fet(t){return!!(t&&t.message!==void 0)}l(fet,"isErrorObj");function pet(t,e){for(var r=t,n=0;n<e.length;n++){if(r==null)return r;r=r[e[n]]}return r}l(pet,"getValue2$1");function toe(t,e){return function(r){var n;return t.fullFields?n=pet(e,t.fullFields):n=e[r.field||t.fullField],fet(r)?(r.field=r.field||t.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||t.fullField}}}l(toe,"complementError");function roe(t,e){if(e){for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];Wi(n)==="object"&&Wi(t[r])==="object"?t[r]=fi(fi({},t[r]),n):t[r]=n}}return t}l(roe,"deepMerge");var Ix="enum",get=l(function(e,r,n,a,i){e[Ix]=Array.isArray(e[Ix])?e[Ix]:[],e[Ix].indexOf(r)===-1&&a.push(sc(i.messages[Ix],e.fullField,e[Ix].join(", ")))},"enumerable2"),met=get,yet=l(function(e,r,n,a,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(r)||a.push(sc(i.messages.pattern.mismatch,e.fullField,r,e.pattern));else if(typeof e.pattern=="string"){var s=new RegExp(e.pattern);s.test(r)||a.push(sc(i.messages.pattern.mismatch,e.fullField,r,e.pattern))}}},"pattern2"),vet=yet,bet=l(function(e,r,n,a,i){var s=typeof e.len=="number",o=typeof e.min=="number",u=typeof e.max=="number",h=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=r,f=null,p=typeof r=="number",g=typeof r=="string",m=Array.isArray(r);if(p?f="number":g?f="string":m&&(f="array"),!f)return!1;m&&(d=r.length),g&&(d=r.replace(h,"_").length),s?d!==e.len&&a.push(sc(i.messages[f].len,e.fullField,e.len)):o&&!u&&d<e.min?a.push(sc(i.messages[f].min,e.fullField,e.min)):u&&!o&&d>e.max?a.push(sc(i.messages[f].max,e.fullField,e.max)):o&&u&&(d<e.min||d>e.max)&&a.push(sc(i.messages[f].range,e.fullField,e.min,e.max))},"range2"),xet=bet,wet=l(function(e,r,n,a,i,s){e.required&&(!n.hasOwnProperty(e.field)||ss(r,s||e.type))&&a.push(sc(i.messages.required,e.fullField))},"required2"),noe=wet,I6,Tet=l(function(){if(I6)return I6;var t="[a-fA-F\\d:]",e=l(function(S){return S&&S.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},"b2"),r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",a=["(?:".concat(n,":){7}(?:").concat(n,"|:)"),"(?:".concat(n,":){6}(?:").concat(r,"|:").concat(n,"|:)"),"(?:".concat(n,":){5}(?::").concat(r,"|(?::").concat(n,"){1,2}|:)"),"(?:".concat(n,":){4}(?:(?::").concat(n,"){0,1}:").concat(r,"|(?::").concat(n,"){1,3}|:)"),"(?:".concat(n,":){3}(?:(?::").concat(n,"){0,2}:").concat(r,"|(?::").concat(n,"){1,4}|:)"),"(?:".concat(n,":){2}(?:(?::").concat(n,"){0,3}:").concat(r,"|(?::").concat(n,"){1,5}|:)"),"(?:".concat(n,":){1}(?:(?::").concat(n,"){0,4}:").concat(r,"|(?::").concat(n,"){1,6}|:)"),"(?::(?:(?::".concat(n,"){0,5}:").concat(r,"|(?::").concat(n,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",s="(?:".concat(a.join("|"),")").concat(i),o=new RegExp("(?:^".concat(r,"$)|(?:^").concat(s,"$)")),u=new RegExp("^".concat(r,"$")),h=new RegExp("^".concat(s,"$")),d=l(function(S){return S&&S.exact?o:new RegExp("(?:".concat(e(S)).concat(r).concat(e(S),")|(?:").concat(e(S)).concat(s).concat(e(S),")"),"g")},"ip2");d.v4=function(C){return C&&C.exact?u:new RegExp("".concat(e(C)).concat(r).concat(e(C)),"g")},d.v6=function(C){return C&&C.exact?h:new RegExp("".concat(e(C)).concat(s).concat(e(C)),"g")};var f="(?:(?:[a-z]+:)?//)",p="(?:\\S+(?::\\S*)?@)?",g=d.v4().source,m=d.v6().source,y="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",b="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",w="(?::\\d{2,5})?",x='(?:[/?#][^\\s"]*)?',T="(?:".concat(f,"|www\\.)").concat(p,"(?:localhost|").concat(g,"|").concat(m,"|").concat(y).concat(v).concat(b,")").concat(w).concat(x);return I6=new RegExp("(?:^".concat(T,"$)"),"i"),I6},"url_default"),XO={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},bS={integer:l(function(e){return bS.number(e)&&parseInt(e,10)===e},"integer"),float:l(function(e){return bS.number(e)&&!bS.integer(e)},"float"),array:l(function(e){return Array.isArray(e)},"array"),regexp:l(function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(r){return!1}},"regexp3"),date:l(function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},"date"),number:l(function(e){return isNaN(e)?!1:typeof e=="number"},"number"),object:l(function(e){return Wi(e)==="object"&&!bS.array(e)},"object"),method:l(function(e){return typeof e=="function"},"method"),email:l(function(e){return typeof e=="string"&&e.length<=320&&!!e.match(XO.email)},"email"),tel:l(function(e){return typeof e=="string"&&e.length<=32&&!!e.match(XO.tel)},"tel"),url:l(function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Tet())},"url"),hex:l(function(e){return typeof e=="string"&&!!e.match(XO.hex)},"hex")},Eet=l(function(e,r,n,a,i){if(e.required&&r===void 0){noe(e,r,n,a,i);return}var s=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],o=e.type;s.indexOf(o)>-1?bS[o](r)||a.push(sc(i.messages.types[o],e.fullField,e.type)):o&&Wi(r)!==e.type&&a.push(sc(i.messages.types[o],e.fullField,e.type))},"type2"),Cet=Eet,_et=l(function(e,r,n,a,i){(/^\s+$/.test(r)||r==="")&&a.push(sc(i.messages.whitespace,e.fullField))},"whitespace3"),ket=_et,En={required:noe,whitespace:ket,type:Cet,range:xet,enum:met,pattern:vet},Aet=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r)&&!e.required)return n();En.required(e,r,a,s,i)}n(s)},"any2"),Net=Aet,Iet=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(r==null&&!e.required)return n();En.required(e,r,a,s,i,"array"),r!=null&&(En.type(e,r,a,s,i),En.range(e,r,a,s,i))}n(s)},"array3"),Let=Iet,$et=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r)&&!e.required)return n();En.required(e,r,a,s,i),r!==void 0&&En.type(e,r,a,s,i)}n(s)},"boolean2"),Met=$et,Pet=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r,"date")&&!e.required)return n();if(En.required(e,r,a,s,i),!ss(r,"date")){var u;r instanceof Date?u=r:u=new Date(r),En.type(e,u,a,s,i),u&&En.range(e,u.getTime(),a,s,i)}}n(s)},"date3"),Ret=Pet,Oet="enum",Det=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r)&&!e.required)return n();En.required(e,r,a,s,i),r!==void 0&&En[Oet](e,r,a,s,i)}n(s)},"enumerable4"),Fet=Det,Bet=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r)&&!e.required)return n();En.required(e,r,a,s,i),r!==void 0&&(En.type(e,r,a,s,i),En.range(e,r,a,s,i))}n(s)},"floatFn2"),zet=Bet,Het=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r)&&!e.required)return n();En.required(e,r,a,s,i),r!==void 0&&(En.type(e,r,a,s,i),En.range(e,r,a,s,i))}n(s)},"integer3"),Wet=Het,Vet=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r)&&!e.required)return n();En.required(e,r,a,s,i),r!==void 0&&En.type(e,r,a,s,i)}n(s)},"method3"),Get=Vet,qet=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(r===""&&(r=void 0),ss(r)&&!e.required)return n();En.required(e,r,a,s,i),r!==void 0&&(En.type(e,r,a,s,i),En.range(e,r,a,s,i))}n(s)},"number3"),Yet=qet,Uet=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r)&&!e.required)return n();En.required(e,r,a,s,i),r!==void 0&&En.type(e,r,a,s,i)}n(s)},"object3"),jet=Uet,Ket=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r,"string")&&!e.required)return n();En.required(e,r,a,s,i),ss(r,"string")||En.pattern(e,r,a,s,i)}n(s)},"pattern5"),Xet=Ket,Zet=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r)&&!e.required)return n();En.required(e,r,a,s,i),ss(r)||En.type(e,r,a,s,i)}n(s)},"regexp5"),Qet=Zet,Jet=l(function(e,r,n,a,i){var s=[],o=Array.isArray(r)?"array":Wi(r);En.required(e,r,a,s,i,o),n(s)},"required4"),ett=Jet,ttt=l(function(e,r,n,a,i){var s=[],o=e.required||!e.required&&a.hasOwnProperty(e.field);if(o){if(ss(r,"string")&&!e.required)return n();En.required(e,r,a,s,i,"string"),ss(r,"string")||(En.type(e,r,a,s,i),En.range(e,r,a,s,i),En.pattern(e,r,a,s,i),e.whitespace===!0&&En.whitespace(e,r,a,s,i))}n(s)},"string2"),rtt=ttt,ntt=l(function(e,r,n,a,i){var s=e.type,o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ss(r,s)&&!e.required)return n();En.required(e,r,a,o,i,s),ss(r,s)||En.type(e,r,a,o,i)}n(o)},"type4"),L6=ntt,xS={string:rtt,method:Get,number:Yet,boolean:Met,regexp:Qet,integer:Wet,float:zet,array:Let,object:jet,enum:Fet,pattern:Xet,date:Ret,url:L6,hex:L6,email:L6,tel:L6,required:ett,any:Net},wS=function(){function t(e){Dd(this,t),oa(this,"rules",null),oa(this,"_messages",UO),this.define(e)}return l(t,"Schema2"),Fd(t,[{key:"define",value:l(function(r){var n=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(Wi(r)!=="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(a){var i=r[a];n.rules[a]=Array.isArray(i)?i:[i]})},"define")},{key:"messages",value:l(function(r){return r&&(this._messages=roe(YO(),r)),this._messages},"messages2")},{key:"validate",value:l(function(r){var n=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},s=r,o=a,u=i;if(typeof o=="function"&&(u=o,o={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,s),Promise.resolve(s);function h(m){var y=[],v={};function b(x){if(Array.isArray(x)){var T;y=(T=y).concat.apply(T,Ea(x))}else y.push(x)}l(b,"add");for(var w=0;w<m.length;w++)b(m[w]);y.length?(v=KO(y),u(y,v)):u(null,s)}if(l(h,"complete"),o.messages){var d=this.messages();d===UO&&(d=YO()),roe(d,o.messages),o.messages=d}else o.messages=this.messages();var f={},p=o.keys||Object.keys(this.rules);p.forEach(function(m){var y=n.rules[m],v=s[m];y.forEach(function(b){var w=b;typeof w.transform=="function"&&(s===r&&(s=fi({},s)),v=s[m]=w.transform(v),v!=null&&(w.type=w.type||(Array.isArray(v)?"array":Wi(v)))),typeof w=="function"?w={validator:w}:w=fi({},w),w.validator=n.getValidationMethod(w),w.validator&&(w.field=m,w.fullField=w.fullField||m,w.type=n.getType(w),f[m]=f[m]||[],f[m].push({rule:w,value:v,source:s,field:m}))})});var g={};return det(f,o,function(m,y){var v=m.rule,b=(v.type==="object"||v.type==="array")&&(Wi(v.fields)==="object"||Wi(v.defaultField)==="object");b=b&&(v.required||!v.required&&m.value),v.field=m.field;function w(E,k){return fi(fi({},k),{},{fullField:"".concat(v.fullField,".").concat(E),fullFields:v.fullFields?[].concat(Ea(v.fullFields),[E]):[E]})}l(w,"addFullField");function x(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],k=Array.isArray(E)?E:[E];!o.suppressWarning&&k.length&&t.warning("async-validator:",k),k.length&&v.message!==void 0&&v.message!==null&&(k=[].concat(v.message));var A=k.map(toe(v,s));if(o.first&&A.length)return g[v.field]=1,y(A);if(!b)y(A);else{if(v.required&&!m.value)return v.message!==void 0?A=[].concat(v.message).map(toe(v,s)):o.error&&(A=[o.error(v,sc(o.messages.required,v.field))]),y(A);var I={};v.defaultField&&Object.keys(m.value).map(function(O){I[O]=v.defaultField}),I=fi(fi({},I),m.rule.fields);var L={};Object.keys(I).forEach(function(O){var M=I[O],P=Array.isArray(M)?M:[M];L[O]=P.map(w.bind(null,O))});var R=new t(L);R.messages(o.messages),m.rule.options&&(m.rule.options.messages=o.messages,m.rule.options.error=o.error),R.validate(m.value,m.rule.options||o,function(O){var M=[];A&&A.length&&M.push.apply(M,Ea(A)),O&&O.length&&M.push.apply(M,Ea(O)),y(M.length?M:null)})}}l(x,"cb");var T;if(v.asyncValidator)T=v.asyncValidator(v,m.value,x,m.source,o);else if(v.validator){try{T=v.validator(v,m.value,x,m.source,o)}catch(E){var C,S;(C=(S=console).error)===null||C===void 0||C.call(S,E),o.suppressValidatorError||setTimeout(function(){throw E},0),x(E.message)}T===!0?x():T===!1?x(typeof v.message=="function"?v.message(v.fullField||v.field):v.message||"".concat(v.fullField||v.field," fails")):T instanceof Array?x(T):T instanceof Error&&x(T.message)}T&&T.then&&T.then(function(){return x()},function(E){return x(E)})},function(m){h(m)},s)},"validate")},{key:"getType",value:l(function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!xS.hasOwnProperty(r.type))throw new Error(sc("Unknown rule type %s",r.type));return r.type||"string"},"getType")},{key:"getValidationMethod",value:l(function(r){if(typeof r.validator=="function")return r.validator;var n=Object.keys(r),a=n.indexOf("message");return a!==-1&&n.splice(a,1),n.length===1&&n[0]==="required"?xS.required:xS[this.getType(r)]||void 0},"getValidationMethod")}]),t}();oa(wS,"register",l(function(e,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");xS[e]=r},"register")),oa(wS,"warning",Qse),oa(wS,"messages",UO),oa(wS,"validators",xS);var att=wS,$l="'${name}' is not a valid ${type}",aoe={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:$l,method:$l,array:$l,object:$l,number:$l,date:$l,boolean:$l,integer:$l,float:$l,regexp:$l,email:$l,tel:$l,url:$l,hex:$l},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},ioe=att;function itt(t,e){return t.replace(/\\?\$\{\w+\}/g,r=>{if(r.startsWith("\\"))return r.slice(1);const n=r.slice(2,-1);return e[n]})}l(itt,"replaceMessage");var soe="CODE_LOGIC_ERROR";function ZO(t,e,r,n,a){return nt(this,null,function*(){const i=X({},r);if(delete i.ruleIndex,ioe.warning=()=>{},i.validator){const p=i.validator;i.validator=(...g)=>{try{return p(...g)}catch(m){return console.error(m),Promise.reject(soe)}}}let s=null;i&&i.type==="array"&&i.defaultField&&(s=i.defaultField,delete i.defaultField);const o=new ioe({[t]:[i]}),u=dx(aoe,n.validateMessages);o.messages(u);let h=[];try{yield Promise.resolve(o.validate({[t]:e},X({},n)))}catch(p){p.errors&&(h=p.errors.map(({message:g},m)=>{const y=g===soe?u.default:g;return G.isValidElement(y)?G.cloneElement(y,{key:`error_${m}`}):y}))}if(!h.length&&s&&Array.isArray(e)&&e.length>0)return(yield Promise.all(e.map((g,m)=>ZO(`${t}.${m}`,g,s,n,a)))).reduce((g,m)=>[...g,...m],[]);const d=X(Ne(X({},r),{name:t,enum:(r.enum||[]).join(", ")}),a);return h.map(p=>typeof p=="string"?itt(p,d):p)})}l(ZO,"validateRule");function stt(t,e,r,n,a,i){const s=t.join("."),o=r.map((h,d)=>{const f=h.validator,p=Ne(X({},h),{ruleIndex:d});return f&&(p.validator=(g,m,y)=>{let v=!1;const w=f(g,m,l((...x)=>{Promise.resolve().then(()=>{an(!v,"Your validator function has already return a promise. `callback` will be ignored."),v||y(...x)})},"wrappedCallback"));v=w&&typeof w.then=="function"&&typeof w.catch=="function",an(v,"`callback` is deprecated. Please return a promise instead."),v&&w.then(()=>{y()}).catch(x=>{y(x||" ")})}),p}).sort(({warningOnly:h,ruleIndex:d},{warningOnly:f,ruleIndex:p})=>!!h==!!f?d-p:h?1:-1);let u;if(a===!0)u=new Promise((h,d)=>nt(this,null,function*(){for(let f=0;f<o.length;f+=1){const p=o[f],g=yield ZO(s,e,p,n,i);if(g.length){d([{errors:g,rule:p}]);return}}h([])}));else{const h=o.map(d=>ZO(s,e,d,n,i).then(f=>({errors:f,rule:d})));u=(a?ltt(h):ott(h)).then(d=>Promise.reject(d))}return u.catch(h=>h),u}l(stt,"validateRules");function ott(t){return nt(this,null,function*(){return Promise.all(t).then(e=>[].concat(...e))})}l(ott,"finishOnAllFailed");function ltt(t){return nt(this,null,function*(){let e=0;return new Promise(r=>{t.forEach(n=>{n.then(a=>{a.errors.length&&r([a]),e+=1,e===t.length&&r([])})})})})}l(ltt,"finishOnFirstFailed");function pi(t){return qO(t)}l(pi,"getNamePath");function ooe(t,e){let r={};return e.forEach(n=>{const a=vu(t,n);r=Dc(r,n,a)}),r}l(ooe,"cloneByNamePathList");function Lx(t,e,r=!1){return t&&t.some(n=>$6(e,n,r))}l(Lx,"containsNamePath");function $6(t,e,r=!1){return!t||!e||!r&&t.length!==e.length?!1:e.every((n,a)=>t[a]===n)}l($6,"matchNamePath");function ctt(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||typeof t!="object"||typeof e!="object")return!1;const r=Object.keys(t),n=Object.keys(e);return[...new Set([...r,...n])].every(i=>{const s=t[i],o=e[i];return typeof s=="function"&&typeof o=="function"?!0:s===o})}l(ctt,"isSimilar");function utt(t,...e){const r=e[0];return r&&r.target&&typeof r.target=="object"&&t in r.target?r.target[t]:r}l(utt,"defaultGetValueFromEvent");function loe(t,e,r){const{length:n}=t;if(e<0||e>=n||r<0||r>=n)return t;const a=t[e],i=e-r;return i>0?[...t.slice(0,r),a,...t.slice(r,e),...t.slice(e+1,n)]:i<0?[...t.slice(0,e),...t.slice(e+1,r+1),a,...t.slice(r+1,n)]:t}l(loe,"move");function QO(){return QO=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},QO.apply(this,arguments)}l(QO,"_extends23");var Ng=[],TS=[];function JO(t,e,r,n,a,i){return typeof t=="function"?t(e,r,"source"in i?{source:i.source}:{}):n!==a}l(JO,"requireUpdate");var coe=(EC=class extends G.Component{constructor(e){if(super(e),qt(this,"state",{resetCount:0}),qt(this,"cancelRegisterFunc",null),qt(this,"mounted",!1),qt(this,"touched",!1),qt(this,"dirty",!1),qt(this,"validatePromise"),qt(this,"prevValidating"),qt(this,"errors",Ng),qt(this,"warnings",TS),qt(this,"cancelRegister",()=>{const{preserve:r,isListField:n,name:a}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(n,r,pi(a)),this.cancelRegisterFunc=null}),qt(this,"getNamePath",()=>{const{name:r,fieldContext:n}=this.props,{prefixName:a=[]}=n;return r!==void 0?[...a,...r]:[]}),qt(this,"getRules",()=>{const{rules:r=[],fieldContext:n}=this.props;return r.map(a=>typeof a=="function"?a(n):a)}),qt(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:r})=>({resetCount:r+1}))}),qt(this,"metaCache",null),qt(this,"triggerMetaEvent",r=>{const{onMetaChange:n}=this.props;if(n){const a=Ne(X({},this.getMeta()),{destroy:r});v0(this.metaCache,a)||n(a),this.metaCache=a}else this.metaCache=null}),qt(this,"onStoreChange",(r,n,a)=>{const{shouldUpdate:i,dependencies:s=[],onReset:o}=this.props,{store:u}=a,h=this.getNamePath(),d=this.getValue(r),f=this.getValue(u),p=n&&Lx(n,h);switch(a.type==="valueUpdate"&&a.source==="external"&&!v0(d,f)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=Ng,this.warnings=TS,this.triggerMetaEvent()),a.type){case"reset":if(!n||p){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=Ng,this.warnings=TS,this.triggerMetaEvent(),o==null||o(),this.refresh();return}break;case"remove":{if(i&&JO(i,r,u,d,f,a)){this.reRender();return}break}case"setField":{const{data:g}=a;if(p){"touched"in g&&(this.touched=g.touched),"validating"in g&&!("originRCField"in g)&&(this.validatePromise=g.validating?Promise.resolve([]):null),"errors"in g&&(this.errors=g.errors||Ng),"warnings"in g&&(this.warnings=g.warnings||TS),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in g&&Lx(n,h,!0)){this.reRender();return}if(i&&!h.length&&JO(i,r,u,d,f,a)){this.reRender();return}break}case"dependenciesUpdate":{if(s.map(pi).some(m=>Lx(a.relatedFields,m))){this.reRender();return}break}default:if(p||(!s.length||h.length||i)&&JO(i,r,u,d,f,a)){this.reRender();return}break}i===!0&&this.reRender()}),qt(this,"validateRules",r=>{const n=this.getNamePath(),a=this.getValue(),{triggerName:i,validateOnly:s=!1}=r||{},o=Promise.resolve().then(()=>nt(this,null,function*(){if(!this.mounted)return[];const{validateFirst:u=!1,messageVariables:h,validateDebounce:d}=this.props;let f=this.getRules();if(i&&(f=f.filter(g=>g).filter(g=>{const{validateTrigger:m}=g;return m?qO(m).includes(i):!0})),d&&i&&(yield new Promise(g=>{setTimeout(g,d)}),this.validatePromise!==o))return[];const p=stt(n,a,f,r,u,h);return p.catch(g=>g).then((g=Ng)=>{var m;if(this.validatePromise===o){this.validatePromise=null;const y=[],v=[];(m=g.forEach)==null||m.call(g,({rule:{warningOnly:b},errors:w=Ng})=>{b?v.push(...w):y.push(...w)}),this.errors=y,this.warnings=v,this.triggerMetaEvent(),this.reRender()}}),p}));return s||(this.validatePromise=o,this.dirty=!0,this.errors=Ng,this.warnings=TS,this.triggerMetaEvent(),this.reRender()),o}),qt(this,"isFieldValidating",()=>!!this.validatePromise),qt(this,"isFieldTouched",()=>this.touched),qt(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;const{fieldContext:r}=this.props,{getInitialValue:n}=r.getInternalHooks(Ag);return n(this.getNamePath())!==void 0}),qt(this,"getErrors",()=>this.errors),qt(this,"getWarnings",()=>this.warnings),qt(this,"isListField",()=>this.props.isListField),qt(this,"isList",()=>this.props.isList),qt(this,"isPreserve",()=>this.props.preserve),qt(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null})),qt(this,"getOnlyChild",r=>{if(typeof r=="function"){const a=this.getMeta();return Ne(X({},this.getOnlyChild(r(this.getControlled(),a,this.props.fieldContext))),{isFunction:!0})}const n=wo(r);return n.length!==1||!G.isValidElement(n[0])?{child:n,isFunction:!1}:{child:n[0],isFunction:!1}}),qt(this,"getValue",r=>{const{getFieldsValue:n}=this.props.fieldContext,a=this.getNamePath();return vu(r||n(!0),a)}),qt(this,"getControlled",(r={})=>{const{name:n,trigger:a="onChange",validateTrigger:i,getValueFromEvent:s,normalize:o,valuePropName:u="value",getValueProps:h,fieldContext:d}=this.props,f=i!==void 0?i:d.validateTrigger,p=this.getNamePath(),{getInternalHooks:g,getFieldsValue:m}=d,{dispatch:y}=g(Ag),v=this.getValue(),b=h||(S=>({[u]:S})),w=r[a],x=n!==void 0?b(v):{};x&&Object.keys(x).forEach(S=>{an(typeof x[S]!="function",`It's not recommended to generate dynamic function prop by \`getValueProps\`. Please pass it to child component directly (prop: ${S})`)});const T=X(X({},r),x);return T[a]=(...S)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let E;s?E=s(...S):E=utt(u,...S),o&&(E=o(E,v,m(!0))),E!==v&&y({type:"updateValue",namePath:p,value:E}),w&&w(...S)},qO(f||[]).forEach(S=>{const E=T[S];T[S]=(...k)=>{E&&E(...k);const{rules:A}=this.props;A&&A.length&&y({type:"validateField",namePath:p,triggerName:S})}}),T}),e.fieldContext){const{getInternalHooks:r}=e.fieldContext,{initEntityValue:n}=r(Ag);n(this)}}componentDidMount(){const{shouldUpdate:e,fieldContext:r}=this.props;if(this.mounted=!0,r){const{getInternalHooks:n}=r,{registerField:a}=n(Ag);this.cancelRegisterFunc=a(this)}e===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){const{resetCount:e}=this.state,{children:r}=this.props,{child:n,isFunction:a}=this.getOnlyChild(r);let i;return a?i=n:G.isValidElement(n)?i=G.cloneElement(n,this.getControlled(n.props)):(an(!n,"`children` of Field is not validate ReactElement."),i=n),G.createElement(G.Fragment,{key:e},i)}},l(EC,"Field"),EC);qt(coe,"contextType",Nx);function htt(r){var n=r,{name:t}=n,e=Xt(n,["name"]);var h;const a=G.useContext(Nx),i=G.useContext(N6),s=t!==void 0?pi(t):void 0,o=(h=e.isListField)!=null?h:!!i;let u="keep";return o||(u=`_${(s||[]).join("_")}`),e.preserve===!1&&o&&s.length<=1&&an(!1,"`preserve` should not apply on Form.List fields."),G.createElement(coe,QO({key:u,name:s,isListField:o},e,{fieldContext:a}))}l(htt,"WrapperField");var uoe=htt;function dtt({name:t,initialValue:e,children:r,rules:n,validateTrigger:a,isListField:i}){const s=G.useContext(Nx),o=G.useContext(N6),h=G.useRef({keys:[],id:0}).current,d=G.useMemo(()=>[...pi(s.prefixName)||[],...pi(t)],[s.prefixName,t]),f=G.useMemo(()=>Ne(X({},s),{prefixName:d}),[s,d]),p=G.useMemo(()=>({getKey:l(m=>{const y=d.length,v=m[y];return[h.keys[v],m.slice(y+1)]},"getKey")}),[h,d]);if(typeof r!="function")return an(!1,"Form.List only accepts function as children."),null;const g=l((m,y,{source:v})=>v==="internal"?!1:m!==y,"shouldUpdate");return G.createElement(N6.Provider,{value:p},G.createElement(Nx.Provider,{value:f},G.createElement(uoe,{name:[],shouldUpdate:g,rules:n,validateTrigger:a,initialValue:e,isList:!0,isListField:i!=null?i:!!o},({value:m=[],onChange:y},v)=>{const{getFieldValue:b}=s,w=l(()=>b(d||[])||[],"getNewValue"),x={add:l((C,S)=>{const E=w();S>=0&&S<=E.length?(h.keys=[...h.keys.slice(0,S),h.id,...h.keys.slice(S)],y([...E.slice(0,S),C,...E.slice(S)])):((S<0||S>E.length)&&an(!1,"The second parameter of the add function should be a valid positive number."),h.keys=[...h.keys,h.id],y([...E,C])),h.id+=1},"add"),remove:l(C=>{const S=w(),E=new Set(Array.isArray(C)?C:[C]);E.size<=0||(h.keys=h.keys.filter((k,A)=>!E.has(A)),y(S.filter((k,A)=>!E.has(A))))},"remove"),move(C,S){if(C===S)return;const E=w();C<0||C>=E.length||S<0||S>=E.length||(h.keys=loe(h.keys,C,S),y(loe(E,C,S)))}};let T=m||[];return Array.isArray(T)||(T=[],an(!1,`Current value of '${d.join(" > ")}' is not an array type.`)),r(T.map((C,S)=>{let E=h.keys[S];return E===void 0&&(h.keys[S]=h.id,E=h.keys[S],h.id+=1),{name:S,key:E,isListField:!0}}),x,v)})))}l(dtt,"List$1");var ftt=dtt;function ptt(t){let e=!1,r=t.length;const n=[];return t.length?new Promise((a,i)=>{t.forEach((s,o)=>{s.catch(u=>(e=!0,u)).then(u=>{r-=1,n[o]=u,!(r>0)&&(e&&i(n),a(n))})})}):Promise.resolve([])}l(ptt,"allPromiseFinish");var eD="__@field_split__";function M6(t){return t.map(e=>`${typeof e}:${e}`).join(eD)}l(M6,"normalize$2");var gtt=(CC=class{constructor(){qt(this,"kvs",new Map)}set(e,r){this.kvs.set(M6(e),r)}get(e){return this.kvs.get(M6(e))}getAsPrefix(e){const r=M6(e),n=r+eD,a=[],i=this.kvs.get(r);return i!==void 0&&a.push(i),this.kvs.forEach((s,o)=>{o.startsWith(n)&&a.push(s)}),a}update(e,r){const n=this.get(e),a=r(n);a?this.set(e,a):this.delete(e)}delete(e){this.kvs.delete(M6(e))}map(e){return[...this.kvs.entries()].map(([r,n])=>{const a=r.split(eD);return e({key:a.map(i=>{const[,s,o]=i.match(/^([^:]*):(.*)$/);return s==="number"?Number(o):o}),value:n})})}toJSON(){const e={};return this.map(({key:r,value:n})=>(e[r.join(".")]=n,null)),e}},l(CC,"NameMap"),CC),$x=gtt,mtt=l(t=>{const e=new MessageChannel;e.port1.onmessage=t,e.port2.postMessage(null)},"macroTask"),ytt=(SC=class{constructor(e){qt(this,"namePathList",[]),qt(this,"taskId",0),qt(this,"watcherList",new Set),qt(this,"form"),this.form=e}register(e){return this.watcherList.add(e),()=>{this.watcherList.delete(e)}}notify(e){e.forEach(r=>{this.namePathList.every(n=>!$6(n,r))&&this.namePathList.push(r)}),this.doBatch()}doBatch(){this.taskId+=1;const e=this.taskId;mtt(()=>{if(e===this.taskId&&this.watcherList.size){const r=this.form.getForm(),n=r.getFieldsValue(),a=r.getFieldsValue(!0);this.watcherList.forEach(i=>{i(n,a,this.namePathList)}),this.namePathList=[]}})}},l(SC,"WatcherCenter"),SC),vtt=(_C=class{constructor(e){qt(this,"formHooked",!1),qt(this,"forceRootUpdate"),qt(this,"subscribable",!0),qt(this,"store",{}),qt(this,"fieldEntities",[]),qt(this,"initialValues",{}),qt(this,"callbacks",{}),qt(this,"validateMessages",null),qt(this,"preserve",null),qt(this,"lastValidatePromise",null),qt(this,"watcherCenter",new ytt(this)),qt(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks})),qt(this,"getInternalHooks",r=>r===Ag?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(an(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)),qt(this,"useSubscribe",r=>{this.subscribable=r}),qt(this,"prevWithoutPreserves",null),qt(this,"setInitialValues",(r,n)=>{var a;if(this.initialValues=r||{},n){let i=dx(r,this.store);(a=this.prevWithoutPreserves)==null||a.map(({key:s})=>{i=Dc(i,s,vu(r,s))}),this.prevWithoutPreserves=null,this.updateStore(i)}}),qt(this,"destroyForm",r=>{if(r)this.updateStore({});else{const n=new $x;this.getFieldEntities(!0).forEach(a=>{this.isMergedPreserve(a.isPreserve())||n.set(a.getNamePath(),!0)}),this.prevWithoutPreserves=n}}),qt(this,"getInitialValue",r=>{const n=vu(this.initialValues,r);return r.length?dx(n):n}),qt(this,"setCallbacks",r=>{this.callbacks=r}),qt(this,"setValidateMessages",r=>{this.validateMessages=r}),qt(this,"setPreserve",r=>{this.preserve=r}),qt(this,"registerWatch",r=>this.watcherCenter.register(r)),qt(this,"notifyWatch",(r=[])=>{this.watcherCenter.notify(r)}),qt(this,"timeoutId",null),qt(this,"warningUnhooked",()=>{!this.timeoutId&&typeof window!="undefined"&&(this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.formHooked||an(!1,"Instance created by `useForm` is not connected to any Form element. Forget to pass `form` prop?")}))}),qt(this,"updateStore",r=>{this.store=r}),qt(this,"getFieldEntities",(r=!1)=>r?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities),qt(this,"getFieldsMap",(r=!1)=>{const n=new $x;return this.getFieldEntities(r).forEach(a=>{const i=a.getNamePath();n.set(i,a)}),n}),qt(this,"getFieldEntitiesForNamePathList",(r,n=!1)=>{if(!r)return this.getFieldEntities(!0);const a=this.getFieldsMap(!0);return n?r.flatMap(i=>{const s=pi(i),o=a.getAsPrefix(s);return o.length?o:[{INVALIDATE_NAME_PATH:s}]}):r.map(i=>{const s=pi(i);return a.get(s)||{INVALIDATE_NAME_PATH:pi(i)}})}),qt(this,"getFieldsValue",(r,n)=>{this.warningUnhooked();let a,i;if(r===!0||Array.isArray(r)?(a=r,i=n):r&&typeof r=="object"&&(i=r.filter),a===!0&&!i)return this.store;const s=this.getFieldEntitiesForNamePathList(Array.isArray(a)?a:null,!0),o=[],u=[];s.forEach(d=>{var p;const f=d.INVALIDATE_NAME_PATH||d.getNamePath();if((p=d.isList)!=null&&p.call(d)){u.push(f);return}if(!i)o.push(f);else{const g="getMeta"in d?d.getMeta():null;i(g)&&o.push(f)}});let h=ooe(this.store,o.map(pi));return u.forEach(d=>{vu(h,d)||(h=Dc(h,d,[]))}),h}),qt(this,"getFieldValue",r=>{this.warningUnhooked();const n=pi(r);return vu(this.store,n)}),qt(this,"getFieldsError",r=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(r).map((a,i)=>a&&!a.INVALIDATE_NAME_PATH?{name:a.getNamePath(),errors:a.getErrors(),warnings:a.getWarnings()}:{name:pi(r[i]),errors:[],warnings:[]}))),qt(this,"getFieldError",r=>{this.warningUnhooked();const n=pi(r);return this.getFieldsError([n])[0].errors}),qt(this,"getFieldWarning",r=>{this.warningUnhooked();const n=pi(r);return this.getFieldsError([n])[0].warnings}),qt(this,"isFieldsTouched",(...r)=>{this.warningUnhooked();const[n,a]=r;let i,s=!1;r.length===0?i=null:r.length===1?Array.isArray(n)?(i=n.map(pi),s=!1):(i=null,s=n):(i=n.map(pi),s=a);const o=this.getFieldEntities(!0),u=l(p=>p.isFieldTouched(),"isFieldTouched");if(!i)return s?o.every(p=>u(p)||p.isList()):o.some(u);const h=new $x;i.forEach(p=>{h.set(p,[])}),o.forEach(p=>{const g=p.getNamePath();i.forEach(m=>{m.every((y,v)=>g[v]===y)&&h.update(m,y=>[...y,p])})});const d=l(p=>p.some(u),"isNamePathListTouched"),f=h.map(({value:p})=>p);return s?f.every(d):f.some(d)}),qt(this,"isFieldTouched",r=>(this.warningUnhooked(),this.isFieldsTouched([r]))),qt(this,"isFieldsValidating",r=>{this.warningUnhooked();const n=this.getFieldEntities();if(!r)return n.some(i=>i.isFieldValidating());const a=r.map(pi);return n.some(i=>{const s=i.getNamePath();return Lx(a,s)&&i.isFieldValidating()})}),qt(this,"isFieldValidating",r=>(this.warningUnhooked(),this.isFieldsValidating([r]))),qt(this,"resetWithFieldInitialValue",(r={})=>{const n=new $x,a=this.getFieldEntities(!0);a.forEach(o=>{const{initialValue:u}=o.props,h=o.getNamePath();if(u!==void 0){const d=n.get(h)||new Set;d.add({entity:o,value:u}),n.set(h,d)}});const i=l(o=>{o.forEach(u=>{const{initialValue:h}=u.props;if(h!==void 0){const d=u.getNamePath();if(this.getInitialValue(d)!==void 0)an(!1,`Form already set 'initialValues' with path '${d.join(".")}'. Field can not overwrite it.`);else{const p=n.get(d);if(p&&p.size>1)an(!1,`Multiple Field with path '${d.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(p){const g=this.getFieldValue(d);!u.isListField()&&(!r.skipExist||g===void 0)&&this.updateStore(Dc(this.store,d,[...p][0].value))}}}})},"resetWithFields");let s;r.entities?s=r.entities:r.namePathList?(s=[],r.namePathList.forEach(o=>{const u=n.get(o);u&&s.push(...[...u].map(h=>h.entity))})):s=a,i(s)}),qt(this,"resetFields",r=>{this.warningUnhooked();const n=this.store;if(!r){this.updateStore(dx(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const a=r.map(pi);a.forEach(i=>{const s=this.getInitialValue(i);this.updateStore(Dc(this.store,i,s))}),this.resetWithFieldInitialValue({namePathList:a}),this.notifyObservers(n,a,{type:"reset"}),this.notifyWatch(a)}),qt(this,"setFields",r=>{this.warningUnhooked();const n=this.store,a=[];r.forEach(i=>{const h=i,{name:s}=h,o=Xt(h,["name"]),u=pi(s);a.push(u),"value"in o&&this.updateStore(Dc(this.store,u,o.value)),this.notifyObservers(n,[u],{type:"setField",data:i})}),this.notifyWatch(a)}),qt(this,"getFields",()=>this.getFieldEntities(!0).map(a=>{const i=a.getNamePath(),s=a.getMeta(),o=Ne(X({},s),{name:i,value:this.getFieldValue(i)});return Object.defineProperty(o,"originRCField",{value:!0}),o})),qt(this,"initEntityValue",r=>{const{initialValue:n}=r.props;if(n!==void 0){const a=r.getNamePath();vu(this.store,a)===void 0&&this.updateStore(Dc(this.store,a,n))}}),qt(this,"isMergedPreserve",r=>{const n=r!==void 0?r:this.preserve;return n!=null?n:!0}),qt(this,"registerField",r=>{this.fieldEntities.push(r);const n=r.getNamePath();if(this.notifyWatch([n]),r.props.initialValue!==void 0){const a=this.store;this.resetWithFieldInitialValue({entities:[r],skipExist:!0}),this.notifyObservers(a,[r.getNamePath()],{type:"valueUpdate",source:"internal"})}return(a,i,s=[])=>{if(this.fieldEntities=this.fieldEntities.filter(o=>o!==r),!this.isMergedPreserve(i)&&(!a||s.length>1)){const o=a?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==o&&this.fieldEntities.every(u=>!$6(u.getNamePath(),n))){const u=this.store;this.updateStore(Dc(u,n,o,!0)),this.notifyObservers(u,[n],{type:"remove"}),this.triggerDependenciesUpdate(u,n)}}this.notifyWatch([n])}}),qt(this,"dispatch",r=>{switch(r.type){case"updateValue":{const{namePath:n,value:a}=r;this.updateValue(n,a);break}case"validateField":{const{namePath:n,triggerName:a}=r;this.validateFields([n],{triggerName:a});break}}}),qt(this,"notifyObservers",(r,n,a)=>{if(this.subscribable){const i=Ne(X({},a),{store:this.getFieldsValue(!0)});this.getFieldEntities().forEach(({onStoreChange:s})=>{s(r,n,i)})}else this.forceRootUpdate()}),qt(this,"triggerDependenciesUpdate",(r,n)=>{const a=this.getDependencyChildrenFields(n);return a.length&&this.validateFields(a),this.notifyObservers(r,a,{type:"dependenciesUpdate",relatedFields:[n,...a]}),a}),qt(this,"updateValue",(r,n)=>{const a=pi(r),i=this.store;this.updateStore(Dc(this.store,a,n)),this.notifyObservers(i,[a],{type:"valueUpdate",source:"internal"}),this.notifyWatch([a]);const s=this.triggerDependenciesUpdate(i,a),{onValuesChange:o}=this.callbacks;if(o){const u=this.getFieldsMap(!0).get(a),h=ooe(this.store,[a]),d=this.getFieldsValue(),f=sne([d,h],{prepareArray:l(p=>u!=null&&u.isList()?[]:[...p||[]],"prepareArray")});o(h,f)}this.triggerOnFieldsChange([a,...s])}),qt(this,"setFieldsValue",r=>{this.warningUnhooked();const n=this.store;if(r){const a=dx(this.store,r);this.updateStore(a)}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()}),qt(this,"setFieldValue",(r,n)=>{this.setFields([{name:r,value:n,errors:[],warnings:[],touched:!0}])}),qt(this,"getDependencyChildrenFields",r=>{const n=new Set,a=[],i=new $x;this.getFieldEntities().forEach(o=>{const{dependencies:u}=o.props;(u||[]).forEach(h=>{const d=pi(h);i.update(d,(f=new Set)=>(f.add(o),f))})});const s=l(o=>{(i.get(o)||new Set).forEach(h=>{if(!n.has(h)){n.add(h);const d=h.getNamePath();h.isFieldDirty()&&d.length&&(a.push(d),s(d))}})},"fillChildren");return s(r),a}),qt(this,"triggerOnFieldsChange",(r,n)=>{const{onFieldsChange:a}=this.callbacks;if(a){const i=this.getFields();if(n){const o=new $x;n.forEach(({name:u,errors:h})=>{o.set(u,h)}),i.forEach(u=>{u.errors=o.get(u.name)||u.errors})}const s=i.filter(({name:o})=>Lx(r,o));s.length&&a(s,i)}}),qt(this,"validateFields",(r,n)=>{this.warningUnhooked();let a,i;Array.isArray(r)||typeof r=="string"||typeof n=="string"?(a=r,i=n):i=r;const s=!!a,o=s?a.map(pi):[],u=[...o],h=[],d=String(Date.now()),f=new Set,{recursive:p,dirty:g}=i||{};this.getFieldEntities(!0).forEach(b=>{const w=b.getNamePath();if(s||((!b.isList()||!o.some(x=>$6(x,w,!0)))&&u.push(w),o.push(w)),!(!b.props.rules||!b.props.rules.length)&&!(g&&!b.isFieldDirty())&&(f.add(w.join(d)),!s||Lx(o,w,p))){const x=b.validateRules(X({validateMessages:X(X({},aoe),this.validateMessages)},i));h.push(x.then(()=>({name:w,errors:[],warnings:[]})).catch(T=>{var E;const C=[],S=[];return(E=T.forEach)==null||E.call(T,({rule:{warningOnly:k},errors:A})=>{k?S.push(...A):C.push(...A)}),C.length?Promise.reject({name:w,errors:C,warnings:S}):{name:w,errors:C,warnings:S}}))}});const m=ptt(h);this.lastValidatePromise=m,m.catch(b=>b).then(b=>{const w=b.map(({name:x})=>x);this.notifyObservers(this.store,w,{type:"validateFinish"}),this.triggerOnFieldsChange(w,b)});const y=m.then(()=>this.lastValidatePromise===m?Promise.resolve(this.getFieldsValue(u)):Promise.reject([])).catch(b=>{var T,C;const w=b.filter(S=>S&&S.errors.length),x=(C=(T=w[0])==null?void 0:T.errors)==null?void 0:C[0];return Promise.reject({message:x,values:this.getFieldsValue(o),errorFields:w,outOfDate:this.lastValidatePromise!==m})});y.catch(b=>b);const v=o.filter(b=>f.has(b.join(d)));return this.triggerOnFieldsChange(v),y}),qt(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(r=>{const{onFinish:n}=this.callbacks;if(n)try{n(r)}catch(a){console.error(a)}}).catch(r=>{const{onFinishFailed:n}=this.callbacks;n&&n(r)})}),this.forceRootUpdate=e}},l(_C,"FormStore"),_C);function btt(t){const e=G.useRef(null),[,r]=G.useState({});if(!e.current)if(t)e.current=t;else{const n=l(()=>{r({})},"forceReRender"),a=new vtt(n);e.current=a.getForm()}return[e.current]}l(btt,"useForm");var hoe=btt,tD=G.createContext({triggerFormChange:l(()=>{},"triggerFormChange"),triggerFormFinish:l(()=>{},"triggerFormFinish"),registerForm:l(()=>{},"registerForm"),unregisterForm:l(()=>{},"unregisterForm")}),xtt=l(({validateMessages:t,onFormChange:e,onFormFinish:r,children:n})=>{const a=G.useContext(tD),i=G.useRef({});return G.createElement(tD.Provider,{value:Ne(X({},a),{validateMessages:X(X({},a.validateMessages),t),triggerFormChange:l((s,o)=>{e&&e(s,{changedFields:o,forms:i.current}),a.triggerFormChange(s,o)},"triggerFormChange"),triggerFormFinish:l((s,o)=>{r&&r(s,{values:o,forms:i.current}),a.triggerFormFinish(s,o)},"triggerFormFinish"),registerForm:l((s,o)=>{s&&(i.current=Ne(X({},i.current),{[s]:o})),a.registerForm(s,o)},"registerForm"),unregisterForm:l(s=>{const o=X({},i.current);delete o[s],i.current=o,a.unregisterForm(s)},"unregisterForm")})},n)},"FormProvider"),wtt=tD;function rD(){return rD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rD.apply(this,arguments)}l(rD,"_extends24");var Ttt=l((v,y)=>{var b=v,{name:t,initialValues:e,fields:r,form:n,preserve:a,children:i,component:s="form",validateMessages:o,validateTrigger:u="onChange",onValuesChange:h,onFieldsChange:d,onFinish:f,onFinishFailed:p,clearOnDestroy:g}=b,m=Xt(b,["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"]);const w=G.useRef(null),x=G.useContext(wtt),[T]=hoe(n),{useSubscribe:C,setInitialValues:S,setCallbacks:E,setValidateMessages:k,setPreserve:A,destroyForm:I}=T.getInternalHooks(Ag);G.useImperativeHandle(y,()=>Ne(X({},T),{nativeElement:w.current})),G.useEffect(()=>(x.registerForm(t,T),()=>{x.unregisterForm(t)}),[x,T,t]),k(X(X({},x.validateMessages),o)),E({onValuesChange:h,onFieldsChange:l((D,...B)=>{x.triggerFormChange(t,D),d&&d(D,...B)},"onFieldsChange"),onFinish:l(D=>{x.triggerFormFinish(t,D),f&&f(D)},"onFinish"),onFinishFailed:p}),A(a);const L=G.useRef(null);S(e,!L.current),L.current||(L.current=!0),G.useEffect(()=>()=>I(g),[]);let R;const O=typeof i=="function";if(O){const D=T.getFieldsValue(!0);R=i(D,T)}else R=i;C(!O);const M=G.useRef(null);G.useEffect(()=>{ctt(M.current||[],r||[])||T.setFields(r||[]),M.current=r},[r,T]);const P=G.useMemo(()=>Ne(X({},T),{validateTrigger:u}),[T,u]),z=G.createElement(N6.Provider,{value:null},G.createElement(Nx.Provider,{value:P},R));return s===!1?z:G.createElement(s,rD({},m,{ref:w,onSubmit:l(D=>{D.preventDefault(),D.stopPropagation(),T.submit()},"onSubmit"),onReset:l(D=>{var B;D.preventDefault(),T.resetFields(),(B=m.onReset)==null||B.call(m,D)},"onReset")}),z)},"Form"),Ett=Ttt;function nD(t){try{return JSON.stringify(t)}catch(e){return Math.random()}}l(nD,"stringify2");function Ctt(...t){const[e,r={}]=t,n=aet(r)?{form:r}:r,a=n.form,[i,s]=N.useState(()=>typeof e=="function"?e({}):void 0),o=N.useMemo(()=>nD(i),[i]),u=N.useRef(o);u.current=o;const h=N.useContext(Nx),d=a||h,f=d&&d._init;an(t.length===2?a?f:!0:f,"useWatch requires a form instance since it can not auto detect from context.");const{getFieldsValue:p,getInternalHooks:g}=d,{registerWatch:m}=g(Ag),y=Ur((b,w)=>{const x=n.preserve?w!=null?w:p(!0):b!=null?b:p(),T=typeof e=="function"?e(x):vu(x,pi(e));nD(i)!==nD(T)&&s(T)}),v=typeof e=="function"?e:JSON.stringify(e);return N.useEffect(()=>{f&&y()},[f,v]),N.useEffect(()=>f?m((w,x)=>{y(w,x)}):void 0,[f]),i}l(Ctt,"useWatch2");var Stt=Ctt,_tt=G.forwardRef(Ett),ES=_tt;ES.FormProvider=xtt,ES.Field=uoe,ES.List=ftt,ES.useForm=hoe,ES.useWatch=Stt;var oc=G.createContext({});oc.displayName="FormItemInputContext";var ktt=l(({children:t,status:e,override:r})=>{const n=G.useContext(oc),a=G.useMemo(()=>{const i=X({},n);return r&&delete i.isFormItemInput,e&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[e,r,n]);return G.createElement(oc.Provider,{value:a},t)},"NoFormStyle"),Att=G.createContext(void 0),Ntt=l(t=>{const{space:e,form:r,children:n}=t;if(!Eu(n))return null;let a=n;return r&&(a=N.createElement(ktt,{override:!0,status:!0},a)),e&&(a=N.createElement(FZe,null,a)),a},"ContextIsolator"),Ig=Ntt,Itt=l(t=>{if(qo()&&window.document.documentElement){const e=Array.isArray(t)?t:[t],{documentElement:r}=window.document;return e.some(n=>n in r.style)}return!1},"isStyleNameSupport");function doe(t,e){return Itt(t)}l(doe,"isStyleSupport");var Ltt=l(()=>qo()&&window.document.documentElement,"canUseDocElement");function $tt(t,e,r){return N.useMemo(()=>{const n={trap:e!=null?e:!0,focusTriggerAfterClose:r!=null?r:!0};return X(X({},n),t)},[t,e,r])}l($tt,"useFocusable");var Mtt=l(t=>{const{prefixCls:e,className:r,style:n,size:a,shape:i}=t,s=pt({[`${e}-lg`]:a==="large",[`${e}-sm`]:a==="small"}),o=pt({[`${e}-circle`]:i==="circle",[`${e}-square`]:i==="square",[`${e}-round`]:i==="round"}),u=G.useMemo(()=>typeof a=="number"?{width:a,height:a,lineHeight:`${a}px`}:{},[a]);return G.createElement("span",{className:pt(e,s,o,r),style:X(X({},u),n)})},"Element2"),P6=Mtt,Ptt=new gn("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),aD=l(t=>({height:t,lineHeight:Rt(t)}),"genSkeletonElementCommonSize"),I0=l(t=>X({width:t},aD(t)),"genSkeletonElementSize"),Rtt=l(t=>({background:t.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Ptt,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),"genSkeletonColor"),iD=l((t,e)=>X({width:e(t).mul(5).equal(),minWidth:e(t).mul(5).equal()},aD(t)),"genSkeletonElementInputSize"),Ott=l(t=>{const{skeletonAvatarCls:e,gradientFromColor:r,controlHeight:n,controlHeightLG:a,controlHeightSM:i}=t;return{[e]:X({display:"inline-block",verticalAlign:"top",background:r},I0(n)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:X({},I0(a)),[`${e}${e}-sm`]:X({},I0(i))}},"genSkeletonElementAvatar"),Dtt=l(t=>{const{controlHeight:e,borderRadiusSM:r,skeletonInputCls:n,controlHeightLG:a,controlHeightSM:i,gradientFromColor:s,calc:o}=t;return{[n]:X({display:"inline-block",verticalAlign:"top",background:s,borderRadius:r},iD(e,o)),[`${n}-lg`]:X({},iD(a,o)),[`${n}-sm`]:X({},iD(i,o))}},"genSkeletonElementInput"),foe=l(t=>{const{gradientFromColor:e,borderRadiusSM:r,imageSizeBase:n,calc:a}=t;return X({display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:e,borderRadius:r},I0(a(n).mul(2).equal()))},"genSkeletonElementShape"),Ftt=l(t=>({[t.skeletonNodeCls]:X({},foe(t))}),"genSkeletonElementNode"),Btt=l(t=>{const{skeletonImageCls:e,imageSizeBase:r,calc:n}=t;return{[e]:Ne(X({},foe(t)),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:Ne(X({},I0(r)),{maxWidth:n(r).mul(4).equal(),maxHeight:n(r).mul(4).equal()}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},"genSkeletonElementImage"),sD=l((t,e,r)=>{const{skeletonButtonCls:n}=t;return{[`${r}${n}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${r}${n}-round`]:{borderRadius:e}}},"genSkeletonElementButtonShape"),oD=l((t,e)=>X({width:e(t).mul(2).equal(),minWidth:e(t).mul(2).equal()},aD(t)),"genSkeletonElementButtonSize"),ztt=l(t=>{const{borderRadiusSM:e,skeletonButtonCls:r,controlHeight:n,controlHeightLG:a,controlHeightSM:i,gradientFromColor:s,calc:o}=t;return X(Ne(X(Ne(X({[r]:X({display:"inline-block",verticalAlign:"top",background:s,borderRadius:e,width:o(n).mul(2).equal(),minWidth:o(n).mul(2).equal()},oD(n,o))},sD(t,n,r)),{[`${r}-lg`]:X({},oD(a,o))}),sD(t,a,`${r}-lg`)),{[`${r}-sm`]:X({},oD(i,o))}),sD(t,i,`${r}-sm`))},"genSkeletonElementButton"),Htt=l(t=>{const{componentCls:e,skeletonAvatarCls:r,skeletonTitleCls:n,skeletonParagraphCls:a,skeletonButtonCls:i,skeletonInputCls:s,skeletonNodeCls:o,skeletonImageCls:u,controlHeight:h,controlHeightLG:d,controlHeightSM:f,gradientFromColor:p,padding:g,marginSM:m,borderRadius:y,titleHeight:v,blockRadius:b,paragraphLiHeight:w,controlHeightXS:x,paragraphMarginTop:T}=t;return{[e]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:g,verticalAlign:"top",[r]:X({display:"inline-block",verticalAlign:"top",background:p},I0(h)),[`${r}-circle`]:{borderRadius:"50%"},[`${r}-lg`]:X({},I0(d)),[`${r}-sm`]:X({},I0(f))},[`${e}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[n]:{width:"100%",height:v,background:p,borderRadius:b,[`+ ${a}`]:{marginBlockStart:f}},[a]:{padding:0,"> li":{width:"100%",height:w,listStyle:"none",background:p,borderRadius:b,"+ li":{marginBlockStart:x}}},[`${a}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-section`]:{[`${n}, ${a} > li`]:{borderRadius:y}}},[`${e}-with-avatar ${e}-section`]:{[n]:{marginBlockStart:m,[`+ ${a}`]:{marginBlockStart:T}}},[`${e}${e}-element`]:X(X(X(X(X({display:"inline-block",width:"auto"},ztt(t)),Ott(t)),Dtt(t)),Ftt(t)),Btt(t)),[`${e}${e}-block`]:{width:"100%",[i]:{width:"100%"},[s]:{width:"100%"}},[`${e}${e}-active`]:{[`
|
||
${n},
|
||
${a} > li,
|
||
${r},
|
||
${i},
|
||
${s},
|
||
${o},
|
||
${u}
|
||
`]:X({},Rtt(t))}}},"genBaseStyle2"),Wtt=l(t=>{const{colorFillContent:e,colorFill:r}=t,n=e,a=r;return{color:n,colorGradientEnd:a,gradientFromColor:n,gradientToColor:a,titleHeight:t.controlHeight/2,blockRadius:t.borderRadiusSM,paragraphMarginTop:t.marginLG+t.marginXXS,paragraphLiHeight:t.controlHeight/2}},"prepareComponentToken4"),CS=ea("Skeleton",t=>{const{componentCls:e,calc:r}=t,n=Wn(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonNodeCls:`${e}-node`,skeletonImageCls:`${e}-image`,imageSizeBase:r(t.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.gradientFromColor} 25%, ${t.gradientToColor} 37%, ${t.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return Htt(n)},Wtt,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Vtt=l(t=>{const v=t,{prefixCls:e,className:r,classNames:n,rootClassName:a,active:i,style:s,styles:o,shape:u="circle",size:h="default"}=v,d=Xt(v,["prefixCls","className","classNames","rootClassName","active","style","styles","shape","size"]),{getPrefixCls:f}=G.useContext(vn),p=f("skeleton",e),[g,m]=CS(p),y=pt(p,`${p}-element`,{[`${p}-active`]:i},n==null?void 0:n.root,r,a,g,m);return G.createElement("div",{className:y,style:o==null?void 0:o.root},G.createElement(P6,X({prefixCls:`${p}-avatar`,className:n==null?void 0:n.content,style:X(X({},o==null?void 0:o.content),s),shape:u,size:h},d)))},"SkeletonAvatar"),Gtt=Vtt,qtt=l(t=>{const v=t,{prefixCls:e,className:r,rootClassName:n,classNames:a,active:i,style:s,styles:o,block:u=!1,size:h="default"}=v,d=Xt(v,["prefixCls","className","rootClassName","classNames","active","style","styles","block","size"]),{getPrefixCls:f}=G.useContext(vn),p=f("skeleton",e),[g,m]=CS(p),y=pt(p,`${p}-element`,{[`${p}-active`]:i,[`${p}-block`]:u},a==null?void 0:a.root,r,n,g,m);return G.createElement("div",{className:y,style:o==null?void 0:o.root},G.createElement(P6,X({prefixCls:`${p}-button`,className:a==null?void 0:a.content,style:X(X({},o==null?void 0:o.content),s),size:h},d)))},"SkeletonButton"),Ytt=qtt,Utt=l(t=>{const{prefixCls:e,className:r,classNames:n,rootClassName:a,internalClassName:i,style:s,styles:o,active:u,children:h}=t,{getPrefixCls:d}=G.useContext(vn),f=d("skeleton",e),[p,g]=CS(f),m=pt(f,`${f}-element`,{[`${f}-active`]:u},p,n==null?void 0:n.root,r,a,g);return G.createElement("div",{className:m,style:o==null?void 0:o.root},G.createElement("div",{className:pt(n==null?void 0:n.content,i||`${f}-node`),style:X(X({},o==null?void 0:o.content),s)},h))},"SkeletonNode"),poe=Utt,jtt=l(t=>{const{getPrefixCls:e}=G.useContext(vn),r=e("skeleton",t.prefixCls);return G.createElement(poe,Ne(X({},t),{internalClassName:`${r}-image`}),G.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${r}-image-svg`},G.createElement("title",null,"Image placeholder"),G.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:`${r}-image-path`})))},"SkeletonImage"),Ktt=jtt,Xtt=l(t=>{const v=t,{prefixCls:e,className:r,classNames:n,rootClassName:a,active:i,block:s,style:o,styles:u,size:h="default"}=v,d=Xt(v,["prefixCls","className","classNames","rootClassName","active","block","style","styles","size"]),{getPrefixCls:f}=G.useContext(vn),p=f("skeleton",e),[g,m]=CS(p),y=pt(p,`${p}-element`,{[`${p}-active`]:i,[`${p}-block`]:s},n==null?void 0:n.root,r,a,g,m);return G.createElement("div",{className:y,style:u==null?void 0:u.root},G.createElement(P6,X({prefixCls:`${p}-input`,className:n==null?void 0:n.content,style:X(X({},u==null?void 0:u.content),o),size:h},d)))},"SkeletonInput"),Ztt=Xtt,Qtt=l((t,e)=>{const{width:r,rows:n=2}=e;if(Array.isArray(r))return r[t];if(n-1===t)return r},"getWidth"),Jtt=l(t=>{const{prefixCls:e,className:r,style:n,rows:a=0}=t,i=Array.from({length:a}).map((s,o)=>G.createElement("li",{key:o,style:{width:Qtt(o,t)}}));return G.createElement("ul",{className:pt(e,r),style:n},i)},"Paragraph"),ert=Jtt,trt=l(({prefixCls:t,className:e,width:r,style:n})=>G.createElement("h3",{className:pt(t,e),style:X({width:r},n)}),"Title"),rrt=trt;function lD(t){return t&&typeof t=="object"?t:{}}l(lD,"getComponentProps");function nrt(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}l(nrt,"getAvatarBasicProps");function art(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}l(art,"getTitleBasicProps");function irt(t,e){const r={};return(!t||!e)&&(r.width="61%"),!t&&e?r.rows=3:r.rows=2,r}l(irt,"getParagraphBasicProps");var Lg=l(t=>{const{prefixCls:e,loading:r,className:n,rootClassName:a,classNames:i,style:s,styles:o,children:u,avatar:h=!1,title:d=!0,paragraph:f=!0,active:p,round:g}=t,{getPrefixCls:m,direction:y,className:v,style:b,classNames:w,styles:x}=Aa("skeleton"),T=m("skeleton",e),[C,S]=CS(T),E=Ne(X({},t),{avatar:h,title:d,paragraph:f}),[k,A]=Qa([w,i],[x,o],{props:E});if(r||!("loading"in t)){const I=!!h,L=!!d,R=!!f;let O;if(I){const z=Ne(X(X({className:k.avatar,prefixCls:`${T}-avatar`},nrt(L,R)),lD(h)),{style:A.avatar});O=G.createElement("div",{className:pt(k.header,`${T}-header`),style:A.header},G.createElement(P6,X({},z)))}let M;if(L||R){let z;if(L){const B=Ne(X(X({className:k.title,prefixCls:`${T}-title`},art(I,R)),lD(d)),{style:A.title});z=G.createElement(rrt,X({},B))}let D;if(R){const B=Ne(X(X({className:k.paragraph,prefixCls:`${T}-paragraph`},irt(I,L)),lD(f)),{style:A.paragraph});D=G.createElement(ert,X({},B))}M=G.createElement("div",{className:pt(k.section,`${T}-section`),style:A.section},z,D)}const P=pt(T,{[`${T}-with-avatar`]:I,[`${T}-active`]:p,[`${T}-rtl`]:y==="rtl",[`${T}-round`]:g},k.root,v,n,a,C,S);return G.createElement("div",{className:P,style:X(X(X({},A.root),b),s)},O,M)}return u!=null?u:null},"Skeleton");Lg.Button=Ytt,Lg.Avatar=Gtt,Lg.Input=Ztt,Lg.Image=Ktt,Lg.Node=poe,Lg.displayName="Skeleton";var srt=Lg,ort=srt;function goe(){}l(goe,"voidFunc");var lrt=G.createContext({add:goe,remove:goe});function crt(t){const e=G.useContext(lrt),r=G.useRef(null);return Ur(a=>{if(a){const i=t?a.querySelector(t):a;i&&(e.add(i),r.current=i)}else e.remove(r.current)})}l(crt,"usePanelRef");var urt=l(()=>{const{cancelButtonProps:t,cancelTextLocale:e,onCancel:r}=N.useContext(yS);return N.createElement(mS,X({onClick:r},t),e)},"NormalCancelBtn"),moe=urt,hrt=l(()=>{const{confirmLoading:t,okButtonProps:e,okType:r,okTextLocale:n,onOk:a}=N.useContext(yS);return N.createElement(mS,X(Ne(X({},sse(r)),{loading:t,onClick:a}),e),n)},"NormalOkBtn"),yoe=hrt;function drt(t,e){return N.createElement("span",{className:`${t}-close-x`},e||N.createElement(T0,{className:`${t}-close-icon`}))}l(drt,"renderCloseIcon");var frt=l(t=>{const{okText:e,okType:r="primary",cancelText:n,confirmLoading:a,onOk:i,onCancel:s,okButtonProps:o,cancelButtonProps:u,footer:h}=t,[d]=Tu("Modal",BKe()),f=e||(d==null?void 0:d.okText),p=n||(d==null?void 0:d.cancelText),g=N.useMemo(()=>({confirmLoading:a,okButtonProps:o,cancelButtonProps:u,okTextLocale:f,cancelTextLocale:p,okType:r,onOk:i,onCancel:s}),[a,o,u,f,p,r,i,s]);let m;return typeof h=="function"||typeof h=="undefined"?(m=N.createElement(N.Fragment,null,N.createElement(moe,null),N.createElement(yoe,null)),typeof h=="function"&&(m=h(m,{OkBtn:yoe,CancelBtn:moe})),m=N.createElement(Hse,{value:g},m)):m=h,N.createElement(zie,{disabled:!1},m)},"Footer"),prt=l(t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},"genGridRowStyle"),grt=l(t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},"genGridColStyle"),mrt=l((t,e)=>{const{componentCls:r,gridColumns:n,antCls:a}=t,[i,s]=To(a,"grid"),[,o]=To(a,"col"),u={};for(let h=n;h>=0;h--)h===0?(u[`${r}${e}-${h}`]={display:"none"},u[`${r}-push-${h}`]={insetInlineStart:"auto"},u[`${r}-pull-${h}`]={insetInlineEnd:"auto"},u[`${r}${e}-push-${h}`]={insetInlineStart:"auto"},u[`${r}${e}-pull-${h}`]={insetInlineEnd:"auto"},u[`${r}${e}-offset-${h}`]={marginInlineStart:0},u[`${r}${e}-order-${h}`]={order:0}):(u[`${r}${e}-${h}`]=[{[i("display")]:"block",display:"block"},{display:s("display"),flex:`0 0 ${h/n*100}%`,maxWidth:`${h/n*100}%`}],u[`${r}${e}-push-${h}`]={insetInlineStart:`${h/n*100}%`},u[`${r}${e}-pull-${h}`]={insetInlineEnd:`${h/n*100}%`},u[`${r}${e}-offset-${h}`]={marginInlineStart:`${h/n*100}%`},u[`${r}${e}-order-${h}`]={order:h});return u[`${r}${e}-flex`]={flex:o(`${e.replace(/-/,"")}-flex`)},u},"genLoopGridColumnsStyle"),cD=l((t,e)=>mrt(t,e),"genGridStyle"),yrt=l((t,e,r)=>({[`@media (min-width: ${Rt(e)})`]:X({},cD(t,r))}),"genGridMediaStyle"),vrt=l(()=>({}),"prepareRowComponentToken"),brt=l(()=>({}),"prepareColComponentToken");ea("Grid",prt,vrt);var voe=l(t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin}),"getMediaSize");ea("Grid",t=>{const e=Wn(t,{gridColumns:24}),r=voe(e);return delete r.xs,[grt(e),cD(e,""),cD(e,"-xs"),Object.keys(r).map(n=>yrt(e,r[n],`-${n}`)).reduce((n,a)=>X(X({},n),a),{})]},brt);function boe(t){return{position:t,inset:0}}l(boe,"box");var xrt=l(t=>{const{componentCls:e,antCls:r}=t;return[{[`${e}-root`]:{[`${e}${r}-zoom-enter, ${e}${r}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${r}-zoom-leave ${e}-container`]:{pointerEvents:"none"},[`${e}-mask`]:Ne(X({},boe("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,pointerEvents:"none",[`&${e}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:Ne(X({},boe("fixed")),{zIndex:t.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:_se(t)}]},"genModalMaskStyle"),wrt=l(t=>{const{componentCls:e,motionDurationMid:r}=t;return[{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${Rt(t.marginXS)} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:Ne(X({},is(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${Rt(t.calc(t.margin).mul(2).equal())})`,margin:"0 auto","&:focus-visible":X({borderRadius:t.borderRadiusLG},oS(t)),[`${e}-title`]:{margin:0,color:t.titleColor,fontWeight:t.fontWeightStrong,fontSize:t.titleFontSize,lineHeight:t.titleLineHeight,wordWrap:"break-word"},[`${e}-container`]:{position:"relative",backgroundColor:t.contentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadow,pointerEvents:"auto",padding:t.contentPadding},[`${e}-close`]:X({position:"absolute",top:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),insetInlineEnd:t.calc(t.modalHeaderHeight).sub(t.modalCloseBtnSize).div(2).equal(),zIndex:t.calc(t.zIndexPopupBase).add(10).equal(),padding:0,color:t.modalCloseIconColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalCloseBtnSize,height:t.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:["color","background-color"].map(n=>`${n} ${r}`).join(", "),"&-x":{display:"flex",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:Rt(t.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:t.modalCloseIconHoverColor,backgroundColor:t.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:t.colorBgTextActive}},vh(t)),[`${e}-header`]:{color:t.colorText,background:t.headerBg,borderRadius:`${Rt(t.borderRadiusLG)} ${Rt(t.borderRadiusLG)} 0 0`,marginBottom:t.headerMarginBottom,padding:t.headerPadding,borderBottom:t.headerBorderBottom},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word",padding:t.bodyPadding,[`${e}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${Rt(t.margin)} auto`}},[`${e}-footer`]:{textAlign:"end",background:t.footerBg,marginTop:t.footerMarginTop,padding:t.footerPadding,borderTop:t.footerBorderTop,borderRadius:t.footerBorderRadius,[`> ${t.antCls}-btn + ${t.antCls}-btn`]:{marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-container,
|
||
${e}-body,
|
||
${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},"genModalStyle"),Trt=l(t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},"genRTLStyle"),Ert=l(t=>{const{componentCls:e}=t,r=voe(t),n=X({},r);delete n.xs;const a=`--${e.replace(".","")}-`,i=Object.keys(n).map(s=>({[`@media (min-width: ${Rt(n[s])})`]:{width:`var(${a}${s}-width)`}}));return{[`${e}-root`]:{[e]:[].concat(Ea(Object.keys(r).map((s,o)=>{const u=Object.keys(r)[o-1];return u?{[`${a}${s}-width`]:`var(${a}${u}-width)`}:null})),[{width:`var(${a}xs-width)`}],Ea(i))}}},"genResponsiveWidthStyle"),xoe=l(t=>{const e=t.padding,r=t.fontSizeHeading5,n=t.lineHeightHeading5;return Wn(t,{modalHeaderHeight:t.calc(t.calc(n).mul(r).equal()).add(t.calc(e).mul(2).equal()).equal(),modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterBorderWidth:t.lineWidth,modalCloseIconColor:t.colorIcon,modalCloseIconHoverColor:t.colorIconHover,modalCloseBtnSize:t.controlHeight,modalConfirmIconSize:t.fontHeight,modalTitleHeight:t.calc(t.titleFontSize).mul(t.titleLineHeight).equal()})},"prepareToken2"),woe=l(t=>({footerBg:"transparent",headerBg:"transparent",titleLineHeight:t.lineHeightHeading5,titleFontSize:t.fontSizeHeading5,contentBg:t.colorBgElevated,titleColor:t.colorTextHeading,contentPadding:t.wireframe?0:`${Rt(t.paddingMD)} ${Rt(t.paddingContentHorizontalLG)}`,headerPadding:t.wireframe?`${Rt(t.padding)} ${Rt(t.paddingLG)}`:0,headerBorderBottom:t.wireframe?`${Rt(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",headerMarginBottom:t.wireframe?0:t.marginXS,bodyPadding:t.wireframe?t.paddingLG:0,footerPadding:t.wireframe?`${Rt(t.paddingXS)} ${Rt(t.padding)}`:0,footerBorderTop:t.wireframe?`${Rt(t.lineWidth)} ${t.lineType} ${t.colorSplit}`:"none",footerBorderRadius:t.wireframe?`0 0 ${Rt(t.borderRadiusLG)} ${Rt(t.borderRadiusLG)}`:0,footerMarginTop:t.wireframe?0:t.marginSM,confirmBodyPadding:t.wireframe?`${Rt(t.padding*2)} ${Rt(t.padding*2)} ${Rt(t.paddingLG)}`:0,confirmIconMarginInlineEnd:t.wireframe?t.margin:t.marginSM,confirmBtnsMarginTop:t.wireframe?t.marginLG:t.marginSM,mask:!0}),"prepareComponentToken5"),Crt=ea("Modal",t=>{const e=xoe(t);return[wrt(e),Trt(e),xrt(e),$O(e,"zoom"),Ert(e)]},woe,{unitless:{titleLineHeight:!0}}),uD,Srt=l(t=>{uD={x:t.pageX,y:t.pageY},setTimeout(()=>{uD=null},100)},"getClickPosition");Ltt()&&document.documentElement.addEventListener("click",Srt,!0);var _rt=l(t=>{const ot=t,{prefixCls:e,className:r,rootClassName:n,open:a,wrapClassName:i,centered:s,getContainer:o,style:u,width:h=520,footer:d,classNames:f,styles:p,children:g,loading:m,confirmLoading:y,zIndex:v,mousePosition:b,onOk:w,onCancel:x,okButtonProps:T,cancelButtonProps:C,destroyOnHidden:S,destroyOnClose:E,panelRef:k=null,closable:A,mask:I,modalRender:L,maskClosable:R,focusTriggerAfterClose:O,focusable:M}=ot,P=Xt(ot,["prefixCls","className","rootClassName","open","wrapClassName","centered","getContainer","style","width","footer","classNames","styles","children","loading","confirmLoading","zIndex","mousePosition","onOk","onCancel","okButtonProps","cancelButtonProps","destroyOnHidden","destroyOnClose","panelRef","closable","mask","modalRender","maskClosable","focusTriggerAfterClose","focusable"]),{getPopupContainer:z,getPrefixCls:D,direction:B,className:W,style:U,classNames:j,styles:V,centered:Y,cancelButtonProps:H,okButtonProps:q,mask:Z}=Aa("modal"),{modal:K}=G.useContext(vn),[re,Q]=G.useMemo(()=>typeof A=="boolean"?[void 0,void 0]:[A==null?void 0:A.afterClose,A==null?void 0:A.onClose],[A]),te=D("modal",e),ee=D(),[J,ae,se]=KKe(I,Z,te,R),fe=$tt(M,J,O),ve=l(Ge=>{y||(x==null||x(Ge),Q==null||Q())},"handleCancel"),de=l(Ge=>{w==null||w(Ge),Q==null||Q()},"handleOk");{const Ge=Tn("Modal");[["bodyStyle","styles.body"],["maskStyle","styles.mask"],["destroyOnClose","destroyOnHidden"],["autoFocusButton","focusable.autoFocusButton"],["focusTriggerAfterClose","focusable.focusTriggerAfterClose"],["maskClosable","mask.closable"]].forEach(([ht,Je])=>{Ge.deprecated(!(ht in t),ht,Je)})}const Ee=Cu(te),[Ce,De]=Crt(te,Ee),ce=pt(i,{[`${te}-centered`]:s!=null?s:Y,[`${te}-wrap-rtl`]:B==="rtl"}),Ie=d!==null&&!m?G.createElement(frt,Ne(X({},t),{okButtonProps:X(X({},q),T),onOk:de,cancelButtonProps:X(X({},H),C),onCancel:ve})):null,[ye,pe,Ae,Ve]=UKe(c6(t),c6(K),{closable:!0,closeIcon:G.createElement(T0,{className:`${te}-close-icon`}),closeIconRender:l(Ge=>drt(te,Ge),"closeIconRender")}),ze=ye?X({disabled:Ae,closeIcon:pe,afterClose:re},Ve):!1,We=L?Ge=>G.createElement("div",{className:`${te}-render`},L(Ge)):void 0,me=`.${te}-${L?"render":"container"}`,Se=crt(me),ne=xo(k,Se),[xe,oe]=dO("Modal",v),_e=Ne(X({},t),{width:h,panelRef:k,focusTriggerAfterClose:fe.focusTriggerAfterClose,focusable:fe,mask:J,maskClosable:se,zIndex:xe}),[ue,tt]=Qa([j,f,ae],[V,p],{props:_e}),[Re,et]=G.useMemo(()=>h&&typeof h=="object"?[void 0,h]:[h,void 0],[h]),Xe=G.useMemo(()=>{const Ge={};return et&&Object.keys(et).forEach(ht=>{const Je=et[ht];Je!==void 0&&(Ge[`--${te}-${ht}-width`]=typeof Je=="number"?`${Je}px`:Je)}),Ge},[te,et]);return G.createElement(Ig,{form:!0,space:!0},G.createElement(hO.Provider,{value:oe},G.createElement(tet,Ne(X({width:Re},P),{zIndex:xe,getContainer:o===void 0?z:o,prefixCls:te,rootClassName:pt(Ce,n,De,Ee,ue.root),rootStyle:tt.root,footer:Ie,visible:a,mousePosition:b!=null?b:uD,onClose:ve,closable:ze,closeIcon:pe,transitionName:k0(ee,"zoom",t.transitionName),maskTransitionName:k0(ee,"fade",t.maskTransitionName),mask:J,maskClosable:se,className:pt(Ce,r,W),style:X(X(X({},U),u),Xe),classNames:Ne(X({},ue),{wrapper:pt(ue.wrapper,ce)}),styles:tt,panelRef:ne,destroyOnHidden:S!=null?S:E,modalRender:We,focusTriggerAfterClose:fe.focusTriggerAfterClose,focusTrap:fe.trap}),m?G.createElement(ort,{active:!0,title:!1,paragraph:{rows:4},className:`${te}-body-skeleton`}):g)))},"Modal"),krt=_rt,Art=l(t=>{const{componentCls:e,titleFontSize:r,titleLineHeight:n,modalConfirmIconSize:a,fontSize:i,lineHeight:s,modalTitleHeight:o,fontHeight:u,confirmBodyPadding:h}=t,d=`${e}-confirm`;return{[d]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${d}-body-wrapper`]:X({},Eae()),[`&${e} ${e}-body`]:{padding:h},[`${d}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${t.iconCls}`]:{flex:"none",fontSize:a,marginInlineEnd:t.confirmIconMarginInlineEnd,marginTop:t.calc(t.calc(u).sub(a).equal()).div(2).equal()},[`&-has-title > ${t.iconCls}`]:{marginTop:t.calc(t.calc(o).sub(a).equal()).div(2).equal()}},[`${d}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:t.marginXS,maxWidth:`calc(100% - ${Rt(t.marginSM)})`},[`${t.iconCls} + ${d}-paragraph`]:{maxWidth:`calc(100% - ${Rt(t.calc(t.modalConfirmIconSize).add(t.marginSM).equal())})`},[`${d}-title`]:{color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:r,lineHeight:n},[`${d}-container`]:{color:t.colorText,fontSize:i,lineHeight:s},[`${d}-btns`]:{textAlign:"end",marginTop:t.confirmBtnsMarginTop,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${d}-error ${d}-body > ${t.iconCls}`]:{color:t.colorError},[`${d}-warning ${d}-body > ${t.iconCls},
|
||
${d}-confirm ${d}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${d}-info ${d}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${d}-success ${d}-body > ${t.iconCls}`]:{color:t.colorSuccess}}},"genModalConfirmStyle"),Nrt=_ae(["Modal","confirm"],t=>{const e=xoe(t);return Art(e)},woe,{order:-1e3}),Irt=l(t=>{const I=t,{prefixCls:e,icon:r,okText:n,cancelText:a,confirmPrefixCls:i,type:s,okCancel:o,footer:u,locale:h,autoFocusButton:d,focusable:f}=I,p=Xt(I,["prefixCls","icon","okText","cancelText","confirmPrefixCls","type","okCancel","footer","locale","autoFocusButton","focusable"]);Tn("Modal")(!(typeof r=="string"&&r.length>2),"breaking",`\`icon\` is using ReactNode instead of string naming in v4. Please check \`${r}\` at https://ant.design/components/icon`);let g=r;if(!r&&r!==null)switch(s){case"info":g=G.createElement(J9,null);break;case"success":g=G.createElement(U9,null);break;case"error":g=G.createElement(cS,null);break;default:g=G.createElement(Z9,null)}const m=o!=null?o:s==="confirm",y=G.useMemo(()=>{const L=(f==null?void 0:f.autoFocusButton)||d;return L||L===null?L:"ok"},[d,f==null?void 0:f.autoFocusButton]),[v]=Tu("Modal"),b=h||v,w=n||(m?b==null?void 0:b.okText:b==null?void 0:b.justOkText),x=a||(b==null?void 0:b.cancelText),{closable:T}=p,{onClose:C}=T&&typeof T=="object"?T:{},S=G.useMemo(()=>X({autoFocusButton:y,cancelTextLocale:x,okTextLocale:w,mergedOkCancel:m,onClose:C},p),[y,x,w,m,C,p]),E=G.createElement(G.Fragment,null,G.createElement(Wse,null),G.createElement(Vse,null)),k=t.title!==void 0&&t.title!==null,A=`${i}-body`;return G.createElement("div",{className:`${i}-body-wrapper`},G.createElement("div",{className:pt(A,{[`${A}-has-title`]:k})},g,G.createElement("div",{className:`${i}-paragraph`},k&&G.createElement("span",{className:`${i}-title`},t.title),G.createElement("div",{className:`${i}-content`},t.content))),u===void 0||typeof u=="function"?G.createElement(Hse,{value:S},G.createElement("div",{className:`${i}-btns`},typeof u=="function"?u(E,{OkBtn:Vse,CancelBtn:Wse}):E)):u,G.createElement(Nrt,{prefixCls:e}))},"ConfirmContent"),Toe=l(t=>{const{close:e,zIndex:r,maskStyle:n,direction:a,prefixCls:i,wrapClassName:s,rootPrefixCls:o,bodyStyle:u,closable:h=!1,onConfirm:d,styles:f,title:p,mask:g,maskClosable:m,okButtonProps:y,cancelButtonProps:v}=t,{cancelButtonProps:b,okButtonProps:w}=Aa("modal");{const I=Tn("Modal");[["bodyStyle","styles.body"],["maskStyle","styles.mask"]].forEach(([L,R])=>{I.deprecated(!(L in t),L,R)})}const x=`${i}-confirm`,T=t.width||416,C=t.style||{},S=pt(x,`${x}-${t.type}`,{[`${x}-rtl`]:a==="rtl"},t.className),E=G.useMemo(()=>{var L;const I=lO(g,m);return(L=I.closable)!=null||(I.closable=!1),I},[g,m]),[,k]=Il(),A=G.useMemo(()=>r!==void 0?r:k.zIndexPopupBase+h6,[r,k]);return G.createElement(krt,Ne(X({},t),{className:S,wrapClassName:pt({[`${x}-centered`]:!!t.centered},s),onCancel:l(()=>{e==null||e({triggerCancel:!0}),d==null||d(!1)},"onCancel"),title:p,footer:null,transitionName:k0(o||"","zoom",t.transitionName),maskTransitionName:k0(o||"","fade",t.maskTransitionName),mask:E,style:C,styles:X({body:u,mask:n},f),width:T,zIndex:A,closable:h}),G.createElement(Irt,Ne(X({},t),{confirmPrefixCls:x,okButtonProps:X(X({},w),y),cancelButtonProps:X(X({},b),v)})))},"ConfirmDialog"),Eoe=l(t=>{const{rootPrefixCls:e,iconPrefixCls:r,direction:n,theme:a}=t;return G.createElement(y6,{prefixCls:e,iconPrefixCls:r,direction:n,theme:a},G.createElement(Toe,X({},t)))},"ConfirmDialogWrapper");Toe.displayName="ConfirmDialog",Eoe.displayName="ConfirmDialogWrapper";var Lrt=Eoe;function $rt(t){return Ne(X({},t),{type:"warning"})}l($rt,"withWarn");function Mrt(t){return Ne(X({},t),{type:"info"})}l(Mrt,"withInfo");function Prt(t){return Ne(X({},t),{type:"success"})}l(Prt,"withSuccess");function Rrt(t){return Ne(X({},t),{type:"error"})}l(Rrt,"withError");function Ort(t){return Ne(X({},t),{type:"confirm"})}l(Ort,"withConfirm");var Drt=l((a,n)=>{var i=a,{afterClose:t,config:e}=i,r=Xt(i,["afterClose","config"]);var w;const[s,o]=G.useState(!0),[u,h]=G.useState(e),{direction:d,getPrefixCls:f}=G.useContext(vn),p=f("modal"),g=f(),m=l(()=>{var x;t(),(x=u.afterClose)==null||x.call(u)},"afterClose"),y=l((...x)=>{var C;o(!1),x.some(S=>S==null?void 0:S.triggerCancel)&&((C=u.onCancel)==null||C.call(u,()=>{},...x.slice(1)))},"close");G.useImperativeHandle(n,()=>({destroy:y,update:l(x=>{h(T=>{const C=typeof x=="function"?x(T):x;return X(X({},T),C)})},"update")}));const v=(w=u.okCancel)!=null?w:u.type==="confirm",[b]=Tu("Modal",E0.Modal);return G.createElement(Lrt,X(Ne(X({prefixCls:p,rootPrefixCls:g},u),{close:y,open:s,afterClose:m,okText:u.okText||(v?b==null?void 0:b.okText:b==null?void 0:b.justOkText),direction:u.direction||d,cancelText:u.cancelText||(b==null?void 0:b.cancelText)}),r))},"HookModal"),Frt=G.forwardRef(Drt),Coe=0,Brt=G.memo(G.forwardRef((t,e)=>{const[r,n]=QKe();return G.useImperativeHandle(e,()=>({patchElement:n}),[n]),G.createElement(G.Fragment,null,r)}));function zrt(){const t=G.useRef(null),[e,r]=G.useState([]);G.useEffect(()=>{e.length&&(Ea(e).forEach(s=>{s()}),r([]))},[e]);const n=G.useCallback(i=>l(function(o){var y;Coe+=1;const u=G.createRef();let h;const d=new Promise(v=>{h=v});let f=!1,p;const g=G.createElement(Frt,{key:`modal-${Coe}`,config:i(o),ref:u,afterClose:l(()=>{p==null||p()},"afterClose"),isSilent:l(()=>f,"isSilent"),onConfirm:l(v=>{h(v)},"onConfirm")});return p=(y=t.current)==null?void 0:y.patchElement(g),{destroy:l(()=>{function v(){var b;(b=u.current)==null||b.destroy()}l(v,"destroyAction"),u.current?v():r(b=>[].concat(Ea(b),[v]))},"destroy"),update:l(v=>{function b(){var w;(w=u.current)==null||w.update(v)}l(b,"updateAction"),u.current?b():r(w=>[].concat(Ea(w),[b]))},"update"),then:l(v=>(f=!0,d.then(v)),"then")}},"hookConfirm"),[]);return[G.useMemo(()=>({info:n(Mrt),success:n(Prt),error:n(Rrt),warning:n($rt),confirm:n(Ort)}),[n]),G.createElement(Brt,{key:"modal-holder",ref:t})]}l(zrt,"useModal");var Hrt=zrt,Wrt=l(t=>{const{componentCls:e,notificationMarginEdge:r,animationMaxHeight:n}=t,a=`${e}-notice`,i=new gn("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),s=new gn("antNotificationTopFadeIn",{"0%":{top:-n,opacity:0},"100%":{top:0,opacity:1}}),o=new gn("antNotificationBottomFadeIn",{"0%":{bottom:t.calc(n).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),u=new gn("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[e]:{[`&${e}-top, &${e}-bottom`]:{marginInline:0,[a]:{marginInline:"auto auto"}},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:s}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:o}},[`&${e}-topRight, &${e}-bottomRight`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:i}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:r,_skip_check_:!0},[a]:{marginInlineEnd:"auto",marginInlineStart:0},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:u}}}}},"genNotificationPlacementStyle"),Vrt=Wrt,Grt=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],qrt={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},Yrt=l((t,e)=>{const{componentCls:r}=t;return{[`${r}-${e}`]:{[`&${r}-stack > ${r}-notice-wrapper`]:{[e.startsWith("top")?"top":"bottom"]:0,[qrt[e]]:{value:0,_skip_check_:!0}}}}},"genPlacementStackStyle"),Urt=l(t=>{const e={};for(let r=1;r<t.notificationStackLayer;r++)e[`&:nth-last-child(${r+1})`]={overflow:"hidden",[`& > ${t.componentCls}-notice`]:{opacity:0,transition:`opacity ${t.motionDurationMid}`}};return X({[`&:not(:nth-last-child(-n+${t.notificationStackLayer}))`]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},e)},"genStackChildrenStyle"),jrt=l(t=>{const e={};for(let r=1;r<t.notificationStackLayer;r++)e[`&:nth-last-child(${r+1})`]={background:t.colorBgBlur,backdropFilter:"blur(10px)","-webkit-backdrop-filter":"blur(10px)"};return X({},e)},"genStackedNoticeStyle"),Krt=l(t=>{const{componentCls:e}=t;return X({[`${e}-stack`]:{[`& > ${e}-notice-wrapper`]:X({transition:`transform ${t.motionDurationSlow}, backdrop-filter 0s`,willChange:"transform, opacity",position:"absolute"},Urt(t))},[`${e}-stack:not(${e}-stack-expanded)`]:{[`& > ${e}-notice-wrapper`]:X({},jrt(t))},[`${e}-stack${e}-stack-expanded`]:{[`& > ${e}-notice-wrapper`]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",[`& > ${t.componentCls}-notice`]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:t.margin,width:"100%",insetInline:0,bottom:t.calc(t.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},Grt.map(r=>Yrt(t,r)).reduce((r,n)=>X(X({},r),n),{}))},"genStackStyle"),Xrt=Krt,Zrt=l(t=>{const{iconCls:e,componentCls:r,boxShadow:n,fontSizeLG:a,notificationMarginBottom:i,borderRadiusLG:s,colorSuccess:o,colorInfo:u,colorWarning:h,colorError:d,colorTextHeading:f,notificationBg:p,notificationPadding:g,notificationMarginEdge:m,progressBg:y,notificationProgressHeight:v,fontSize:b,lineHeight:w,width:x,notificationIconSize:T,colorText:C,colorSuccessBg:S,colorErrorBg:E,colorInfoBg:k,colorWarningBg:A,motionDurationMid:I}=t,L=`${r}-notice`;return{position:"relative",marginBottom:i,marginInlineStart:"auto",background:p,borderRadius:s,boxShadow:n,[L]:{padding:g,width:x,maxWidth:`calc(100vw - ${Rt(t.calc(m).mul(2).equal())})`,lineHeight:w,wordWrap:"break-word",borderRadius:s,overflow:"hidden","&-success":S?{background:S}:{},"&-error":E?{background:E}:{},"&-info":k?{background:k}:{},"&-warning":A?{background:A}:{}},[`${L}-title`]:{marginBottom:t.marginXS,color:f,fontSize:a,lineHeight:t.lineHeightLG},[`${L}-description`]:{fontSize:b,color:C,marginTop:t.marginXS},[`${L}-closable ${L}-title`]:{paddingInlineEnd:t.paddingLG},[`${L}-with-icon ${L}-title`]:{marginBottom:t.marginXS,marginInlineStart:t.calc(t.marginSM).add(T).equal(),fontSize:a},[`${L}-with-icon ${L}-description`]:{marginInlineStart:t.calc(t.marginSM).add(T).equal(),fontSize:b},[`${L}-icon`]:{position:"absolute",fontSize:T,lineHeight:1,[`&-success${e}`]:{color:o},[`&-info${e}`]:{color:u},[`&-warning${e}`]:{color:h},[`&-error${e}`]:{color:d}},[`${L}-close`]:X({position:"absolute",top:t.notificationPaddingVertical,insetInlineEnd:t.notificationPaddingHorizontal,color:t.colorIcon,outline:"none",width:t.notificationCloseButtonSize,height:t.notificationCloseButtonSize,borderRadius:t.borderRadiusSM,transition:["color","background-color"].map(R=>`${R} ${I}`).join(", "),display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none","&:hover":{color:t.colorIconHover,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},vh(t)),[`${L}-progress`]:{position:"absolute",display:"block",appearance:"none",inlineSize:`calc(100% - ${Rt(s)} * 2)`,left:{_skip_check_:!0,value:s},right:{_skip_check_:!0,value:s},bottom:0,blockSize:v,border:0,"&, &::-webkit-progress-bar":{borderRadius:s,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:y},"&::-webkit-progress-value":{borderRadius:s,background:y}},[`${L}-actions`]:{float:"right",marginTop:t.marginSM}}},"genNoticeStyle"),Qrt=l(t=>{const{componentCls:e,notificationMarginBottom:r,notificationMarginEdge:n,motionDurationMid:a,motionEaseInOut:i}=t,s=`${e}-notice`,o=new gn("antNotificationFadeOut",{"0%":{maxHeight:t.animationMaxHeight,marginBottom:r},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[e]:Ne(X({},is(t)),{position:"fixed",zIndex:t.zIndexPopup,marginRight:{value:n,_skip_check_:!0},[`${e}-hook-holder`]:{position:"relative"},[`${e}-fade-appear-prepare`]:{opacity:"0 !important"},[`${e}-fade-enter, ${e}-fade-appear`]:{animationDuration:t.motionDurationMid,animationTimingFunction:i,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${e}-fade-leave`]:{animationTimingFunction:i,animationFillMode:"both",animationDuration:a,animationPlayState:"paused"},[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationPlayState:"running"},[`${e}-fade-leave${e}-fade-leave-active`]:{animationName:o,animationPlayState:"running"},"&-rtl":{direction:"rtl",[`${s}-actions`]:{float:"left"}}})},{[e]:{[`${s}-wrapper`]:Zrt(t)}}]},"genNotificationStyle"),Jrt=l(t=>({zIndexPopup:t.zIndexPopupBase+h6+50,width:384,progressBg:`linear-gradient(90deg, ${t.colorPrimaryBorderHover}, ${t.colorPrimary})`,colorSuccessBg:void 0,colorErrorBg:void 0,colorInfoBg:void 0,colorWarningBg:void 0}),"prepareComponentToken6"),ent=l(t=>{const e=t.paddingMD,r=t.paddingLG;return Wn(t,{notificationBg:t.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:r,notificationIconSize:t.calc(t.fontSizeLG).mul(t.lineHeightLG).equal(),notificationCloseButtonSize:t.calc(t.controlHeightLG).mul(.55).equal(),notificationMarginBottom:t.margin,notificationPadding:`${Rt(t.paddingMD)} ${Rt(t.paddingContentHorizontalLG)}`,notificationMarginEdge:t.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2})},"prepareNotificationToken"),tnt=ea("Notification",t=>{const e=ent(t);return[Qrt(e),Vrt(e),Xrt(e)]},Jrt);function Soe(t,e){return e===null||e===!1?null:e||G.createElement(T0,{className:`${t}-close-icon`})}l(Soe,"getCloseIcon");var rnt={success:U9,info:J9,error:cS,warning:Z9},nnt=l(t=>{const{prefixCls:e,icon:r,type:n,title:a,description:i,actions:s,role:o="alert",styles:u,classNames:h}=t;let d=null;return r?d=G.createElement("span",{className:pt(`${e}-icon`,h.icon),style:u.icon},r):n&&(d=G.createElement(rnt[n]||null,{className:pt(`${e}-icon`,h.icon,`${e}-icon-${n}`),style:u.icon})),G.createElement("div",{className:pt({[`${e}-with-icon`]:d}),role:o},d,G.createElement("div",{className:pt(`${e}-title`,h.title),style:u.title},a),i&&G.createElement("div",{className:pt(`${e}-description`,h.description),style:u.description},i),s&&G.createElement("div",{className:pt(`${e}-actions`,h.actions),style:u.actions},s))},"PureContent2");function ant(t,e,r){let n;switch(t){case"top":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":n={left:0,top:e,bottom:"auto"};break;case"topRight":n={right:0,top:e,bottom:"auto"};break;case"bottom":n={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:r};break;case"bottomLeft":n={left:0,top:"auto",bottom:r};break;default:n={right:0,top:"auto",bottom:r};break}return n}l(ant,"getPlacementStyle");function int(t){return{motionName:`${t}-fade`}}l(int,"getMotion2");function snt(t,e,r){return typeof t!="undefined"?t:typeof(e==null?void 0:e.closeIcon)!="undefined"?e.closeIcon:r==null?void 0:r.closeIcon}l(snt,"getCloseIconConfig");var _oe=24,ont=4.5,lnt="topRight",cnt=l(({children:t,prefixCls:e})=>{const r=Cu(e),[n,a]=tnt(e,r);return N.createElement(Vie,{classNames:{list:pt(n,a,r)}},t)},"Wrapper2"),unt=l((t,{prefixCls:e,key:r})=>N.createElement(cnt,{prefixCls:e,key:r},t),"renderNotifications2"),hnt=N.forwardRef((t,e)=>{const{top:r,bottom:n,prefixCls:a,getContainer:i,maxCount:s,rtl:o,onAllRemoved:u,stack:h,duration:d=ont,pauseOnHover:f=!0,showProgress:p}=t,{getPrefixCls:g,getPopupContainer:m,direction:y}=Aa("notification"),{notification:v}=N.useContext(vn),[,b]=Il(),w=a||g("notification"),x=N.useMemo(()=>typeof d=="number"&&d>0?d:!1,[d]),T=l(L=>ant(L,r!=null?r:_oe,n!=null?n:_oe),"getStyle"),C=l(()=>pt({[`${w}-rtl`]:o!=null?o:y==="rtl"}),"getClassName"),S=l(()=>int(w),"getNotificationMotion"),[E,k]=Xie({prefixCls:w,style:T,className:C,motion:S,closable:{closeIcon:Soe(w)},duration:x,getContainer:l(()=>(i==null?void 0:i())||(m==null?void 0:m())||document.body,"getContainer"),maxCount:s,pauseOnHover:f,showProgress:p,onAllRemoved:u,renderNotifications:unt,stack:h===!1?!1:{threshold:typeof h=="object"?h==null?void 0:h.threshold:void 0,offset:8,gap:b.margin}}),[A,I]=Qa([v==null?void 0:v.classNames,t==null?void 0:t.classNames],[v==null?void 0:v.styles,t==null?void 0:t.styles],{props:t});return N.useImperativeHandle(e,()=>Ne(X({},E),{prefixCls:w,notification:v,classNames:A,styles:I})),k});function dnt(t){const e=N.useRef(null),r=Tn("Notification"),{notification:n}=N.useContext(vn);return[N.useMemo(()=>{const i=l(h=>{var Q;if(!e.current){r(!1,"usage","You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.");return}const{open:d,prefixCls:f,notification:p,classNames:g,styles:m}=e.current,y=(p==null?void 0:p.className)||{},v=(p==null?void 0:p.style)||{},b=`${f}-notice`,re=h,{title:w,message:x,description:T,icon:C,type:S,btn:E,actions:k,className:A,style:I,role:L="alert",closeIcon:R,closable:O,classNames:M={},styles:P={}}=re,z=Xt(re,["title","message","description","icon","type","btn","actions","className","style","role","closeIcon","closable","classNames","styles"]);[["btn","actions"],["message","title"]].forEach(([te,ee])=>{r.deprecated(!(te in h),te,ee)});const D=w!=null?w:x,B=k!=null?k:E,W=Soe(b,snt(R,t,p)),[U,j,,V]=uie(c6(X(X({},t||{}),h)),c6(n),{closable:!0,closeIcon:W}),Y=U?X({onClose:O&&typeof O=="object"?O.onClose:void 0,closeIcon:j},V):!1,H=C0(M,{props:h}),q=C0(P,{props:h}),Z=u6(void 0,g,H),K=cO(m,q);return d(Ne(X({placement:(Q=t==null?void 0:t.placement)!=null?Q:lnt},z),{content:N.createElement(nnt,{prefixCls:b,icon:C,type:S,title:D,description:T,actions:B,role:L,classNames:Z,styles:K}),className:pt({[`${b}-${S}`]:S},A,y,Z.root),style:X(X(X({},v),K.root),I),closable:Y}))},"open"),o={open:i,destroy:l(h=>{var d,f;h!==void 0?(d=e.current)==null||d.close(h):(f=e.current)==null||f.destroy()},"destroy")};return["success","info","warning","error"].forEach(h=>{o[h]=d=>i(Ne(X({},d),{type:h}))}),o},[t,n]),N.createElement(hnt,Ne(X({key:"notification-holder"},t),{ref:e}))]}l(dnt,"useInternalNotification");function fnt(t){return dnt(t)}l(fnt,"useNotification2");var koe=N.createContext({}),pnt=N.createContext({message:{},notification:{},modal:{}}),Aoe=pnt,gnt=l(t=>{const{componentCls:e,colorText:r,fontSize:n,lineHeight:a,fontFamily:i}=t;return{[e]:{color:r,fontSize:n,lineHeight:a,fontFamily:i,[`&${e}-rtl`]:{direction:"rtl"}}}},"genBaseStyle3"),mnt=l(()=>({}),"prepareComponentToken7"),ynt=ea("App",gnt,mnt),Noe=l(t=>{const{prefixCls:e,children:r,className:n,rootClassName:a,message:i,notification:s,style:o,component:u="div"}=t,{direction:h,getPrefixCls:d,className:f,style:p}=Aa("app"),g=d("app",e),[m,y]=ynt(g),v=pt(m,g,n,a,y,{[`${g}-rtl`]:h==="rtl"}),b=N.useContext(koe),w=N.useMemo(()=>({message:X(X({},b.message),i),notification:X(X({},b.notification),s)}),[i,s,b.message,b.notification]),[x,T]=wZe(w.message),[C,S]=fnt(w.notification),[E,k]=Hrt(),A=N.useMemo(()=>({message:x,notification:C,modal:E}),[x,C,E]);Tn("App")(!(y&&u===!1),"usage","When using cssVar, ensure `component` is assigned a valid React component string.");const I=u===!1?N.Fragment:u,L={className:pt(f,v),style:X(X({},p),o)};return N.createElement(Aoe.Provider,{value:A},N.createElement(koe.Provider,{value:w},N.createElement(I,X({},u===!1?void 0:L),k,T,S,r)))},"App");Noe.displayName="App";var vnt=Noe,bnt=l(()=>N.useContext(Aoe),"useApp"),xnt=bnt,Ioe=vnt;Ioe.useApp=xnt;var wnt=Ioe;function Tnt(t){return e=>G.createElement(y6,{theme:{token:{motion:!1,zIndexPopupBase:0}}},G.createElement(t,X({},e)))}l(Tnt,"withPureRenderTheme");var Ent=l((t,e,r,n,a)=>Tnt(l(s=>{const{prefixCls:o,style:u}=s,h=G.useRef(null),[d,f]=G.useState(0),[p,g]=G.useState(0),[m,y]=Ta(!1,s.open),{getPrefixCls:v}=G.useContext(vn),b=v(n||"select",o);G.useEffect(()=>{if(y(!0),typeof ResizeObserver!="undefined"){const T=new ResizeObserver(S=>{const E=S[0].target;f(E.offsetHeight+8),g(E.offsetWidth)}),C=setInterval(()=>{var k;const S=a?`.${a(b)}`:`.${b}-dropdown`,E=(k=h.current)==null?void 0:k.querySelector(S);E&&(clearInterval(C),T.observe(E))},10);return()=>{clearInterval(C),T.disconnect()}}},[b]);let w=Ne(X({},s),{style:Ne(X({},u),{margin:0}),open:m,getPopupContainer:l(()=>h.current,"getPopupContainer")});r&&(w=r(w)),e&&Object.assign(w,{[e]:{overflow:{adjustX:!1,adjustY:!1}}});const x={paddingBottom:d,position:"relative",minWidth:p};return G.createElement("div",{ref:h,style:x},G.createElement(t,X({},w)))},"PurePanel5")),"genPurePanel"),Loe=Ent,Cnt=l((t,e,r,n,a=!1,i,s)=>{const o=N.useMemo(()=>typeof r=="boolean"?{allowClear:r}:r&&typeof r=="object"?r:{allowClear:!1},[r]);return N.useMemo(()=>{const u=!a&&o.allowClear!==!1&&(e.length||i)&&!(s==="combobox"&&i==="");return{allowClear:u,clearIcon:u?o.clearIcon||n||"×":null}},[o,n,a,e.length,i,s])},"useAllowClear"),$oe=G.createContext(null);function $g(){return G.useContext($oe)}l($g,"useBaseProps");function Snt(t=250){const e=G.useRef(null),r=G.useRef(null);G.useEffect(()=>()=>{window.clearTimeout(r.current)},[]);function n(a){(a||e.current===null)&&(e.current=a),window.clearTimeout(r.current),r.current=window.setTimeout(()=>{e.current=null},t)}return l(n,"doLock"),[()=>e.current,n]}l(Snt,"useLock");function Moe(t,e){return t.filter(r=>r).some(r=>r.contains(e)||r===e)}l(Moe,"isInside");function _nt(t,e,r,n){const a=Ur(i=>{if(n)return;let s=i.target;s.shadowRoot&&i.composed&&(s=i.composedPath()[0]||s),i._ori_target&&(s=i._ori_target),e&&!Moe(t(),s)&&r(!1)});G.useEffect(()=>(window.addEventListener("mousedown",a),()=>window.removeEventListener("mousedown",a)),[a])}l(_nt,"useSelectTriggerControl");function hD(){return hD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},hD.apply(this,arguments)}l(hD,"_extends25");var knt=l(t=>{const e=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:e,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:e,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:e,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:e,adjustY:1},htmlRegion:"scroll"}}},"getBuiltInPlacements"),Ant=l((t,e)=>{const z=t,{prefixCls:r,disabled:n,visible:a,children:i,popupElement:s,animation:o,transitionName:u,popupStyle:h,popupClassName:d,direction:f="ltr",placement:p,builtinPlacements:g,popupMatchSelectWidth:m,popupRender:y,popupAlign:v,getPopupContainer:b,empty:w,onPopupVisibleChange:x,onPopupMouseEnter:T,onPopupMouseDown:C,onPopupBlur:S}=z,E=Xt(z,["prefixCls","disabled","visible","children","popupElement","animation","transitionName","popupStyle","popupClassName","direction","placement","builtinPlacements","popupMatchSelectWidth","popupRender","popupAlign","getPopupContainer","empty","onPopupVisibleChange","onPopupMouseEnter","onPopupMouseDown","onPopupBlur"]),k=`${r}-dropdown`;let A=s;y&&(A=y(s));const I=G.useMemo(()=>g||knt(m),[g,m]),L=o?`${k}-${o}`:u,R=typeof m=="number",O=G.useMemo(()=>R?null:m===!1?"minWidth":"width",[m,R]);let M=h;R&&(M=Ne(X({},h),{width:m}));const P=G.useRef(null);return G.useImperativeHandle(e,()=>({getPopupElement:l(()=>{var D;return(D=P.current)==null?void 0:D.popupElement},"getPopupElement")})),G.createElement(p6,hD({},E,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:p||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:I,prefixCls:k,popupMotion:{motionName:L},popup:G.createElement("div",{onMouseEnter:T,onMouseDown:C,onBlur:S},A),ref:P,stretch:O,popupAlign:v,popupVisible:a,getPopupContainer:b,popupClassName:pt(d,{[`${k}-empty`]:w}),popupStyle:M,onPopupVisibleChange:x}),i)},"SelectTrigger"),Poe=G.forwardRef(Ant);Poe.displayName="SelectTrigger";var Nnt=Poe;function Roe(t,e){const{key:r}=t;let n;return"value"in t&&({value:n}=t),r!=null?r:n!==void 0?n:`rc-index-key-${e}`}l(Roe,"getKey$1");function dD(t){return typeof t!="undefined"&&!Number.isNaN(t)}l(dD,"isValidCount");function Ooe(t,e){const{label:r,value:n,options:a,groupLabel:i}=t||{},s=r||(e?"children":"label");return{label:s,value:n||"value",options:a||"options",groupLabel:i||s}}l(Ooe,"fillFieldNames");function Int(t,{fieldNames:e,childrenAsData:r}={}){const n=[],{label:a,value:i,options:s,groupLabel:o}=Ooe(e,!1);function u(h,d){Array.isArray(h)&&h.forEach(f=>{if(d||!(s in f)){const p=f[i];n.push({key:Roe(f,n.length),groupOption:d,data:f,label:f[a],value:p})}else{let p=f[o];p===void 0&&r&&(p=f.label),n.push({key:Roe(f,n.length),group:!0,data:f,label:p}),u(f[s],!0)}})}return l(u,"dig"),u(t,!1),n}l(Int,"flattenOptions");function fD(t){const e=X({},t);return"props"in e||Object.defineProperty(e,"props",{get(){return an(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}l(fD,"injectPropsWithOption");var Lnt=l((t,e,r)=>{if(!e||!e.length)return null;let n=!1;const a=l((s,[o,...u])=>{if(!o)return[s];const h=s.split(o);return n=n||h.length>1,h.reduce((d,f)=>[...d,...a(f,u)],[]).filter(Boolean)},"separate"),i=a(t,e);return n?typeof r!="undefined"?i.slice(0,r):i:null},"getSeparatedContent");function $nt(t){const{visible:e,values:r}=t;if(!e)return null;const n=50;return G.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${r.slice(0,n).map(({label:a,value:i})=>["number","string"].includes(typeof a)?a:i).join(", ")}`,r.length>n?", ...":null)}l($nt,"Polite");var Mnt=l(t=>{const e=new MessageChannel;e.port1.onmessage=t,e.port2.postMessage(null)},"internalMacroTask"),pD=l((t,e=1)=>{if(e<=0){t();return}Mnt(()=>{pD(t,e-1)})},"macroTask2");function Pnt(t,e,r,n){const[a,i]=N.useState(!1);N.useEffect(()=>{i(!0)},[]);const[s,o]=Ta(t,e),[u,h]=N.useState(!1),d=a?s:!1,f=n(d),p=N.useRef(0),g=Ur(y=>{r&&f!==y&&r(y),o(y)}),m=Ur((y,v={})=>{const{cancelFun:b}=v;p.current+=1;const w=p.current,x=typeof y=="boolean"?y:!f;h(!x);function T(){w===p.current&&!(b!=null&&b())&&(g(x),h(!1))}l(T,"triggerUpdate"),x?T():pD(()=>{T()})});return[d,f,m,u]}l(Pnt,"useOpen");function gD(t){const n=t,{children:e}=n,r=Xt(n,["children"]);return e?G.createElement("div",r,e):null}l(gD,"Affix");var Doe=G.createContext(null);function SS(){return G.useContext(Doe)}l(SS,"useSelectInputContext");var Rnt=Doe,Ont=G.forwardRef((t,e)=>{const q=t,{onChange:r,onKeyDown:n,onBlur:a,style:i,syncWidth:s,value:o,className:u,autoComplete:h}=q,d=Xt(q,["onChange","onKeyDown","onBlur","style","syncWidth","value","className","autoComplete"]),{prefixCls:f,mode:p,onSearch:g,onSearchSubmit:m,onInputBlur:y,autoFocus:v,tokenWithEnter:b,placeholder:w,components:{input:x="input"}}=SS(),{id:T,classNames:C,styles:S,open:E,activeDescendantId:k,role:A,disabled:I}=$g()||{},L=pt(`${f}-input`,C==null?void 0:C.input,u),R=G.useRef(!1),O=G.useRef(null),M=G.useRef(null);G.useImperativeHandle(e,()=>M.current);const P=l(Z=>{let{value:K}=Z.target;if(b&&O.current&&/[\r\n]/.test(O.current)){const re=O.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");K=K.replace(re,O.current)}O.current=null,g&&g(K,!0,R.current),r==null||r(Z)},"handleChange"),z=l(Z=>{const{key:K}=Z,{value:re}=Z.currentTarget;K==="Enter"&&p==="tags"&&!R.current&&m&&m(re),n==null||n(Z)},"handleKeyDown"),D=l(Z=>{y==null||y(),a==null||a(Z)},"handleBlur"),B=l(()=>{R.current=!0},"handleCompositionStart"),W=l(Z=>{if(R.current=!1,p!=="combobox"){const{value:K}=Z.currentTarget;g==null||g(K,!0,!1)}},"handleCompositionEnd"),U=l(Z=>{const{clipboardData:K}=Z,re=K==null?void 0:K.getData("text");O.current=re||""},"handlePaste"),[j,V]=G.useState(void 0);On(()=>{const Z=M.current;if(s&&Z){Z.style.width="0px";const K=Z.scrollWidth;V(K),Z.style.width=""}},[s,o]);const Y=Ne(X({id:T,type:p==="combobox"?"text":"search"},d),{ref:M,style:Ne(X(X({},S==null?void 0:S.input),i),{"--select-input-width":j}),autoFocus:v,autoComplete:h||"off",className:L,disabled:I,value:o||"",onChange:P,onKeyDown:z,onBlur:D,onPaste:U,onCompositionStart:B,onCompositionEnd:W,role:A||"combobox","aria-expanded":E||!1,"aria-haspopup":"listbox","aria-owns":E?`${T}_list`:void 0,"aria-autocomplete":"list","aria-controls":E?`${T}_list`:void 0,"aria-activedescendant":E?k:void 0});if(G.isValidElement(x)){const Z=x.props||{},K=X(X({placeholder:t.placeholder||w},Y),Z);return Object.keys(Z).forEach(re=>{const Q=Z[re];typeof Q=="function"&&(K[re]=(...te)=>{var ee;Q(...te),(ee=Y[re])==null||ee.call(Y,...te)})}),K.ref=xo(x.ref,Y.ref),G.cloneElement(x,K)}const H=x;return G.createElement(H,Y)}),Foe=Ont;function Boe(t){const{prefixCls:e,placeholder:r,displayValues:n}=SS(),{classNames:a,styles:i}=$g(),{show:s=!0}=t;return n.length?null:G.createElement("div",{className:pt(`${e}-placeholder`,a==null?void 0:a.placeholder),style:X({visibility:s?"visible":"hidden"},i==null?void 0:i.placeholder)},r)}l(Boe,"Placeholder");var Dnt=G.createContext(null),mD=Dnt;function yD(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}l(yD,"toArray4");function Fnt(t){return t!=null}l(Fnt,"hasValue");function Bnt(t){return!t&&t!==0}l(Bnt,"isComboNoValue");function zoe(t){return["string","number"].includes(typeof t)}l(zoe,"isTitleType");function vD(t){let e;return t&&(zoe(t.title)?e=t.title.toString():zoe(t.label)&&(e=t.label.toString())),e}l(vD,"getTitle$2");function bD(){return bD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},bD.apply(this,arguments)}l(bD,"_extends26");var znt=G.forwardRef(({inputProps:t},e)=>{const{prefixCls:r,searchValue:n,activeValue:a,displayValues:i,maxLength:s,mode:o}=SS(),{triggerOpen:u,title:h,showSearch:d,classNames:f,styles:p}=$g(),g=G.useContext(mD),[m,y]=G.useState(!1),v=o==="combobox",b=i[0],w=G.useMemo(()=>v&&a&&!m&&u?a:d?n:"",[v,a,m,u,n,d]),[x,T,C,S]=G.useMemo(()=>{let A,I,L;if(b&&(g!=null&&g.flattenOptions)){const O=g.flattenOptions.find(M=>M.value===b.value);O!=null&&O.data&&(A=O.data.className,I=O.data.style,L=vD(O.data))}return b&&!L&&(L=vD(b)),h!==void 0&&(L=h),[A,I,L,!!A||!!I]},[b,g==null?void 0:g.flattenOptions,h]);G.useEffect(()=>{v&&y(!1)},[v,a]);const E=b&&b.label!==null&&b.label!==void 0&&String(b.label).trim()!=="",k=b?S?G.createElement("div",{className:pt(`${r}-content-value`,x),style:X(X({},w?{visibility:"hidden"}:{}),T),title:C},b.label):b.label:G.createElement(Boe,{show:!w});return G.createElement("div",{className:pt(`${r}-content`,E&&`${r}-content-has-value`,w&&`${r}-content-has-search-value`,S&&`${r}-content-has-option-style`,f==null?void 0:f.content),style:p==null?void 0:p.content,title:S?void 0:C},k,G.createElement(Foe,bD({ref:e},t,{value:w,maxLength:o==="combobox"?s:void 0,onChange:l(A=>{var I;y(!0),(I=t.onChange)==null||I.call(t,A)},"onChange")})))}),Hnt=znt,Mx=void 0;function Wnt(t,e){const E=t,{prefixCls:r,invalidate:n,item:a,renderItem:i,responsive:s,responsiveDisabled:o,registerSize:u,itemKey:h,className:d,style:f,children:p,display:g,order:m,component:y="div"}=E,v=Xt(E,["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"]),b=s&&!g;function w(k){u(h,k)}l(w,"internalRegisterSize"),G.useEffect(()=>()=>{w(null)},[]);const x=i&&a!==Mx?i(a,{index:m}):p;let T;n||(T={opacity:b?0:1,height:b?0:Mx,overflowY:b?"hidden":Mx,order:s?m:Mx,pointerEvents:b?"none":Mx,position:b?"absolute":Mx});const C={};b&&(C["aria-hidden"]=!0);let S=G.createElement(y,Vi({className:pt(!n&&r,d),style:X(X({},T),f)},C,v,{ref:e}),x);return s&&(S=G.createElement(mh,{onResize:l(({offsetWidth:k})=>{w(k)},"onResize"),disabled:o},S)),S}l(Wnt,"InternalItem");var Hoe=G.forwardRef(Wnt);Hoe.displayName="Item";var _S=Hoe;function Vnt(t){if(typeof MessageChannel=="undefined")pn(t);else{const e=new MessageChannel;e.port1.onmessage=()=>t(),e.port2.postMessage(void 0)}}l(Vnt,"channelUpdate");function Gnt(){const t=G.useRef(null);return l(r=>{t.current||(t.current=[],Vnt(()=>{Rn.unstable_batchedUpdates(()=>{t.current.forEach(n=>{n()}),t.current=null})})),t.current.push(r)},"notifyEffectUpdate")}l(Gnt,"useBatcher");function Px(t,e){const[r,n]=G.useState(e),a=Ur(i=>{t(()=>{n(i)})});return[r,a]}l(Px,"useEffectState");var R6=N.createContext(null),qnt=l((t,e)=>{const r=G.useContext(R6);if(!r){const o=t,{component:d="div"}=o,f=Xt(o,["component"]);return G.createElement(d,Vi({},f,{ref:e}))}const u=r,{className:n}=u,a=Xt(u,["className"]),h=t,{className:i}=h,s=Xt(h,["className"]);return G.createElement(R6.Provider,{value:null},G.createElement(_S,Vi({ref:e,className:pt(n,i)},a,s)))},"InternalRawItem"),Woe=G.forwardRef(qnt);Woe.displayName="RawItem";var Ynt=Woe,Voe="responsive",Goe="invalidate";function Unt(t){return`+ ${t.length} ...`}l(Unt,"defaultRenderRest");function jnt(t,e){const ne=t,{prefixCls:r="rc-overflow",data:n=[],renderItem:a,renderRawItem:i,itemKey:s,itemWidth:o=10,ssr:u,style:h,className:d,maxCount:f,renderRest:p,renderRawRest:g,prefix:m,suffix:y,component:v="div",itemComponent:b,onVisibleChange:w}=ne,x=Xt(ne,["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","prefix","suffix","component","itemComponent","onVisibleChange"]),T=u==="full",C=Gnt(),[S,E]=Px(C,null),k=S||0,[A,I]=Px(C,new Map),[L,R]=Px(C,0),[O,M]=Px(C,0),[P,z]=Px(C,0),[D,B]=Px(C,0),[W,U]=N.useState(null),[j,V]=N.useState(null),Y=G.useMemo(()=>j===null&&T?Number.MAX_SAFE_INTEGER:j||0,[j,S]),[H,q]=N.useState(!1),Z=`${r}-item`,K=Math.max(L,O),re=f===Voe,Q=n.length&&re,te=f===Goe,ee=Q||typeof f=="number"&&n.length>f,J=N.useMemo(()=>{let xe=n;return Q?S===null&&T?xe=n:xe=n.slice(0,Math.min(n.length,k/o)):typeof f=="number"&&(xe=n.slice(0,f)),xe},[n,o,S,f,Q]),ae=N.useMemo(()=>Q?n.slice(Y+1):n.slice(J.length),[n,J,Q,Y]),se=N.useCallback((xe,oe)=>{var _e;return typeof s=="function"?s(xe):(_e=s&&(xe==null?void 0:xe[s]))!=null?_e:oe},[s]),fe=N.useCallback(a||(xe=>xe),[a]);function ve(xe,oe,_e){j===xe&&(oe===void 0||oe===W)||(V(xe),_e||(q(xe<n.length-1),w==null||w(xe)),oe!==void 0&&U(oe))}l(ve,"updateDisplayCount");function de(xe,oe){E(oe.clientWidth)}l(de,"onOverflowResize");function Ee(xe,oe){I(_e=>{const ue=new Map(_e);return oe===null?ue.delete(xe):ue.set(xe,oe),ue})}l(Ee,"registerSize");function Ce(xe,oe){M(oe),R(O)}l(Ce,"registerOverflowSize");function De(xe,oe){z(oe)}l(De,"registerPrefixSize");function ce(xe,oe){B(oe)}l(ce,"registerSuffixSize");function Ie(xe){return A.get(se(J[xe],xe))}l(Ie,"getItemWidth"),On(()=>{if(k&&typeof K=="number"&&J){let xe=P+D;const oe=J.length,_e=oe-1;if(!oe){ve(0,null);return}for(let ue=0;ue<oe;ue+=1){let tt=Ie(ue);if(T&&(tt=tt||0),tt===void 0){ve(ue-1,void 0,!0);break}if(xe+=tt,_e===0&&xe<=k||ue===_e-1&&xe+Ie(_e)<=k){ve(_e,null);break}else if(xe+K>k){ve(ue-1,xe-tt-D+O);break}}y&&Ie(0)+D>k&&U(null)}},[k,A,O,P,D,se,J]);const ye=H&&!!ae.length;let pe={};W!==null&&Q&&(pe={position:"absolute",left:W,top:0});const Ae={prefixCls:Z,responsive:Q,component:b,invalidate:te},Ve=i?(xe,oe)=>{const _e=se(xe,oe);return G.createElement(R6.Provider,{key:_e,value:Ne(X({},Ae),{order:oe,item:xe,itemKey:_e,registerSize:Ee,display:oe<=Y})},i(xe,oe))}:(xe,oe)=>{const _e=se(xe,oe);return G.createElement(_S,Vi({},Ae,{order:oe,key:_e,item:xe,renderItem:fe,itemKey:_e,registerSize:Ee,display:oe<=Y}))},ze={order:ye?Y:Number.MAX_SAFE_INTEGER,className:`${Z}-rest`,registerSize:Ce,display:ye},We=p||Unt,me=g?G.createElement(R6.Provider,{value:X(X({},Ae),ze)},g(ae)):G.createElement(_S,Vi({},Ae,ze),typeof We=="function"?We(ae):We),Se=G.createElement(v,Vi({className:pt(!te&&r,d),style:h,ref:e},x),m&&G.createElement(_S,Vi({},Ae,{responsive:re,responsiveDisabled:!Q,order:-1,className:`${Z}-prefix`,registerSize:De,display:!0}),m),J.map(Ve),ee?me:null,y&&G.createElement(_S,Vi({},Ae,{responsive:re,responsiveDisabled:!Q,order:Y,className:`${Z}-suffix`,registerSize:ce,display:!0,style:pe}),y));return re?G.createElement(mh,{onResize:de,disabled:!Q},Se):Se}l(jnt,"Overflow");var kS=G.forwardRef(jnt);kS.Item=Ynt,kS.RESPONSIVE=Voe,kS.INVALIDATE=Goe,kS.displayName="Overflow";var Knt=kS,Rx=Knt,Xnt=l(t=>{const{className:e,style:r,customizeIcon:n,customizeIconProps:a,children:i,onMouseDown:s,onClick:o}=t,u=typeof n=="function"?n(a):n;return G.createElement("span",{className:e,onMouseDown:l(h=>{h.preventDefault(),s==null||s(h)},"onMouseDown"),style:X({userSelect:"none",WebkitUserSelect:"none"},r),unselectable:"on",onClick:o,"aria-hidden":!0},u!==void 0?u:G.createElement("span",{className:pt(e.split(/\s+/).map(h=>`${h}-icon`))},i))},"TransBtn"),qoe=Xnt;function xD(){return xD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xD.apply(this,arguments)}l(xD,"_extends27");function Znt(t){var e;return(e=t.key)!=null?e:t.value}l(Znt,"itemKey");var Yoe=l(t=>{t.preventDefault(),t.stopPropagation()},"onPreventMouseDown"),Qnt=G.forwardRef(l(function({inputProps:e},r){const{prefixCls:n,displayValues:a,searchValue:i,mode:s,onSelectorRemove:o,removeIcon:u}=SS(),{disabled:h,showSearch:d,triggerOpen:f,rawOpen:p,toggleOpen:g,autoClearSearchValue:m,tagRender:y,maxTagPlaceholder:v,maxTagTextLength:b,maxTagCount:w,classNames:x,styles:T}=$g(),C=`${n}-selection-item`;let S=i;!p&&s==="multiple"&&m!==!1&&(S="");const E=d&&S||"",k=d&&!h,A=u!=null?u:"×",I=v!=null?v:B=>`+ ${B.length} ...`,L=y,R=l(B=>{g(B)},"onToggleOpen"),O=l(B=>{o==null||o(B)},"onRemove"),M=l((B,W,U,j,V)=>G.createElement("span",{title:vD(B),className:pt(C,{[`${C}-disabled`]:U},x==null?void 0:x.item),style:T==null?void 0:T.item},G.createElement("span",{className:pt(`${C}-content`,x==null?void 0:x.itemContent),style:T==null?void 0:T.itemContent},W),j&&G.createElement(qoe,{className:pt(`${C}-remove`,x==null?void 0:x.itemRemove),style:T==null?void 0:T.itemRemove,onMouseDown:Yoe,onClick:V,customizeIcon:A},"×")),"defaultRenderSelector"),P=l((B,W,U,j,V,Y,H)=>{const q=l(Z=>{Yoe(Z),R(!f)},"onMouseDown");return G.createElement("span",{onMouseDown:q},L({label:W,value:B,index:H==null?void 0:H.index,disabled:U,closable:j,onClose:V,isMaxTag:!!Y}))},"customizeRenderSelector"),z=l((B,W)=>{const{disabled:U,label:j,value:V}=B,Y=!h&&!U;let H=j;if(typeof b=="number"&&(typeof j=="string"||typeof j=="number")){const Z=String(H);Z.length>b&&(H=`${Z.slice(0,b)}...`)}const q=l(Z=>{Z&&Z.stopPropagation(),O(B)},"onClose");return typeof L=="function"?P(V,H,U,Y,q,void 0,W):M(B,H,U,Y,q)},"renderItem"),D=l(B=>{if(!a.length)return null;const W=typeof I=="function"?I(B):I;return typeof L=="function"?P(void 0,W,!1,!1,void 0,!0):M({title:W},W,!1)},"renderRest");return G.createElement(Rx,{prefixCls:`${n}-content`,className:x==null?void 0:x.content,style:T==null?void 0:T.content,prefix:!a.length&&!E&&G.createElement(Boe,null),data:a,renderItem:z,renderRest:D,suffix:G.createElement(Foe,xD({ref:r,disabled:h,readOnly:!k},e,{value:E||"",syncWidth:!0})),itemKey:Znt,maxCount:w})},"MultipleContent")),Jnt=G.forwardRef(l(function(e,r){const{multiple:n,onInputKeyDown:a,tabIndex:i}=SS(),s=$g(),{showSearch:o}=s,u=Hc(s,{aria:!0}),h=Ne(X({},u),{onKeyDown:a,readOnly:!o,tabIndex:i});return n?G.createElement(Qnt,{ref:r,inputProps:h}):G.createElement(Hnt,{ref:r,inputProps:h})},"SelectContent2")),eat=Jnt;function tat(t){return t&&![gr.ESC,gr.SHIFT,gr.BACKSPACE,gr.TAB,gr.WIN_KEY,gr.ALT,gr.META,gr.WIN_KEY_RIGHT,gr.CTRL,gr.SEMICOLON,gr.EQUALS,gr.CAPS_LOCK,gr.CONTEXT_MENU,gr.UP,gr.LEFT,gr.RIGHT,gr.F1,gr.F2,gr.F3,gr.F4,gr.F5,gr.F6,gr.F7,gr.F8,gr.F9,gr.F10,gr.F11,gr.F12].includes(t)}l(tat,"isValidateOpenKey");function O6(){return O6=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},O6.apply(this,arguments)}l(O6,"_extends28");var rat=["value","onChange","removeIcon","placeholder","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex","activeValue","onSelectorRemove","focused"],nat=G.forwardRef(l(function(e,r){const K=e,{prefixCls:n,className:a,style:i,prefix:s,suffix:o,clearIcon:u,children:h,multiple:d,displayValues:f,placeholder:p,mode:g,searchValue:m,onSearch:y,onSearchSubmit:v,onInputBlur:b,maxLength:w,autoFocus:x,onMouseDown:T,onClearMouseDown:C,onInputKeyDown:S,onSelectorRemove:E,tokenWithEnter:k,components:A}=K,I=Xt(K,["prefixCls","className","style","prefix","suffix","clearIcon","children","multiple","displayValues","placeholder","mode","searchValue","onSearch","onSearchSubmit","onInputBlur","maxLength","autoFocus","onMouseDown","onClearMouseDown","onInputKeyDown","onSelectorRemove","tokenWithEnter","components"]),{triggerOpen:L,toggleOpen:R,showSearch:O,disabled:M,loading:P,classNames:z,styles:D}=$g(),B=G.useRef(null),W=G.useRef(null),U=Ur(re=>{const{which:Q}=re,te=W.current instanceof HTMLTextAreaElement;if(!te&&L&&(Q===gr.UP||Q===gr.DOWN)&&re.preventDefault(),S&&S(re),te&&!L&&~[gr.UP,gr.DOWN,gr.LEFT,gr.RIGHT].indexOf(Q))return;!(re.ctrlKey||re.altKey||re.metaKey)&&tat(Q)&&R(!0)});G.useImperativeHandle(r,()=>({focus:l(re=>{var Q,te;(te=(Q=W.current||B.current).focus)==null||te.call(Q,re)},"focus"),blur:l(()=>{var re,Q;(Q=(re=W.current||B.current).blur)==null||Q.call(re)},"blur"),nativeElement:B.current}));const j=Ur(re=>{var Q;if(!M){const te=px(W.current);re.nativeEvent._ori_target=te,te&&re.target!==te&&!te.contains(re.target)&&re.preventDefault();const ee=L&&!d&&(g==="combobox"||O);re.nativeEvent._select_lazy?L&&R(!1):((Q=W.current)==null||Q.focus(),ee||R())}T==null||T(re)}),{root:V}=A,Y=ws(I,rat),H=Hc(Y,{aria:!0}),q=Object.keys(H),Z=Ne(X({},e),{onInputKeyDown:U});return V?G.isValidElement(V)?G.cloneElement(V,Ne(X({},Y),{ref:xo(V.ref,B)})):G.createElement(V,O6({},Y,{ref:B})):G.createElement(Rnt.Provider,{value:Z},G.createElement("div",O6({},ws(Y,q),{ref:B,className:a,style:i,onMouseDown:j}),G.createElement(gD,{className:pt(`${n}-prefix`,z==null?void 0:z.prefix),style:D==null?void 0:D.prefix},s),G.createElement(eat,{ref:W}),G.createElement(gD,{className:pt(`${n}-suffix`,{[`${n}-suffix-loading`]:P},z==null?void 0:z.suffix),style:D==null?void 0:D.suffix},o),u&&G.createElement(gD,{className:pt(`${n}-clear`,z==null?void 0:z.clear),style:D==null?void 0:D.clear,onMouseDown:l(re=>{re.nativeEvent._select_lazy=!0,C==null||C(re)},"onMouseDown")},u),h))},"SelectInput"));function aat(t,e,r){return G.useMemo(()=>{let{root:n,input:a}=t||{};return r&&(n=r()),e&&(a=e()),{root:n,input:a}},[t,e,r])}l(aat,"useComponents");function wD(){return wD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},wD.apply(this,arguments)}l(wD,"_extends29");var D6=l(t=>t==="tags"||t==="multiple","isMultiple"),Uoe=G.forwardRef((t,e)=>{const Qe=t,{id:r,prefixCls:n,className:a,styles:i,classNames:s,showSearch:o,tagRender:u,showScrollBar:h="optional",direction:d,omitDomProps:f,displayValues:p,onDisplayValuesChange:g,emptyOptions:m,notFoundContent:y="Not Found",onClear:v,maxCount:b,placeholder:w,mode:x,disabled:T,loading:C,getInputElement:S,getRawInputElement:E,open:k,defaultOpen:A,onPopupVisibleChange:I,activeValue:L,onActiveValueChange:R,activeDescendantId:O,searchValue:M,autoClearSearchValue:P,onSearch:z,onSearchSplit:D,tokenSeparators:B,allowClear:W,prefix:U,suffix:j,suffixIcon:V,clearIcon:Y,OptionList:H,animation:q,transitionName:Z,popupStyle:K,popupClassName:re,popupMatchSelectWidth:Q,popupRender:te,popupAlign:ee,placement:J,builtinPlacements:ae,getPopupContainer:se,showAction:fe=[],onFocus:ve,onBlur:de,onKeyUp:Ee,onKeyDown:Ce,onMouseDown:De,components:ce}=Qe,Ie=Xt(Qe,["id","prefixCls","className","styles","classNames","showSearch","tagRender","showScrollBar","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","maxCount","placeholder","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onPopupVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffix","suffixIcon","clearIcon","OptionList","animation","transitionName","popupStyle","popupClassName","popupMatchSelectWidth","popupRender","popupAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown","components"]),ye=D6(x),pe=G.useRef(null),Ae=G.useRef(null),Ve=G.useRef(null),[ze,We]=G.useState(!1);G.useImperativeHandle(e,()=>{var Ze,st;return{focus:(Ze=pe.current)==null?void 0:Ze.focus,blur:(st=pe.current)==null?void 0:st.blur,scrollTo:l(Ct=>{var Mt;return(Mt=Ve.current)==null?void 0:Mt.scrollTo(Ct)},"scrollTo"),nativeElement:px(pe.current)}});const me=aat(ce,S,E),Se=G.useMemo(()=>{var st;if(x!=="combobox")return M;const Ze=(st=p[0])==null?void 0:st.value;return typeof Ze=="string"||typeof Ze=="number"?String(Ze):""},[M,x,p]),ne=x==="combobox"&&typeof S=="function"&&S()||null,xe=!y&&m,[oe,_e,ue,tt]=Pnt(A||!1,k,I,Ze=>T||xe?!1:Ze),Re=G.useMemo(()=>(B||[]).some(Ze=>[`
|
||
`,`\r
|
||
`].includes(Ze)),[B]),et=l((Ze,st,Ct)=>{if(ye&&dD(b)&&p.length>=b)return;let Mt=!0,Bt=Ze;R==null||R(null);const Pt=Lnt(Ze,B,dD(b)?b-p.length:void 0),Pe=Ct?null:Pt;return x!=="combobox"&&Pe&&(Bt="",D==null||D(Pe),ue(!1),Mt=!1),z&&Se!==Bt&&z(Bt,{source:st?"typing":"effect"}),Ze&&st&&Mt&&ue(!0),Mt},"onInternalSearch"),Xe=l(Ze=>{!Ze||!Ze.trim()||z(Ze,{source:"submit"})},"onInternalSearchSubmit");G.useEffect(()=>{!oe&&!ye&&x!=="combobox"&&et("",!1,!1)},[oe]),G.useEffect(()=>{T&&(ue(!1),We(!1))},[T,_e]);const[ot,Ge]=Snt(),ht=G.useRef(!1),Je=l(Ze=>{var Pt;const st=ot(),{key:Ct}=Ze,Mt=Ct==="Enter",Bt=Ct===" ";if(Mt||Bt){const Pe=x==="combobox";(Bt&&!(Pe||o)||Mt&&!Pe)&&Ze.preventDefault(),_e||ue(!0)}if(Ge(!!Se),Ct==="Backspace"&&!st&&ye&&!Se&&p.length){const Pe=[...p];let at=null;for(let yt=Pe.length-1;yt>=0;yt-=1){const Tt=Pe[yt];if(!Tt.disabled){Pe.splice(yt,1),at=Tt;break}}at&&g(Pe,{type:"remove",values:[at]})}_e&&(!Mt||!ht.current)&&!Bt&&(Mt&&(ht.current=!0),(Pt=Ve.current)==null||Pt.onKeyDown(Ze)),Ce==null||Ce(Ze)},"onInternalKeyDown"),St=l((Ze,...st)=>{var Ct;_e&&((Ct=Ve.current)==null||Ct.onKeyUp(Ze,...st)),Ze.key==="Enter"&&(ht.current=!1),Ee==null||Ee(Ze,...st)},"onInternalKeyUp"),He=Ur(Ze=>{const st=p.filter(Ct=>Ct!==Ze);g(st,{type:"remove",values:[Ze]})}),dt=l(()=>{ht.current=!1},"onInputBlur"),Oe=l(()=>{var Ze;return[px(pe.current),(Ze=Ae.current)==null?void 0:Ze.getPopupElement()]},"getSelectElements");_nt(Oe,_e,ue,!!me.root);const vt=G.useRef(!1),qe=l(Ze=>{We(!0),T||(fe.includes("focus")&&ue(!0),ve==null||ve(Ze))},"onInternalFocus"),Me=l(()=>{_e&&!vt.current&&ue(!1,{cancelFun:l(()=>Moe(Oe(),document.activeElement),"cancelFun")})},"onRootBlur"),lt=l(Ze=>{We(!1),Se&&(x==="tags"?z(Se,{source:"submit"}):x==="multiple"&&z("",{source:"blur"})),Me(),T||de==null||de(Ze)},"onInternalBlur"),it=l((Ze,...st)=>{var Bt;const{target:Ct}=Ze,Mt=(Bt=Ae.current)==null?void 0:Bt.getPopupElement();Mt!=null&&Mt.contains(Ct)&&ue&&ue(!0),De==null||De(Ze,...st),vt.current=!0,pD(()=>{vt.current=!1})},"onRootMouseDown"),[,Ue]=G.useState({});function we(){Ue({})}l(we,"onPopupMouseEnter");let gt;me.root&&(gt=l(Ze=>{ue(Ze)},"onTriggerVisibleChange"));const ge=G.useMemo(()=>Ne(X({},t),{notFoundContent:y,open:_e,triggerOpen:_e,rawOpen:oe,id:r,showSearch:o,multiple:ye,toggleOpen:ue,showScrollBar:h,styles:i,classNames:s,lockOptions:tt}),[t,y,ue,r,o,ye,_e,oe,h,i,s,tt]),ie=G.useMemo(()=>{const Ze=j!=null?j:V;return typeof Ze=="function"?Ze({searchValue:Se,open:_e,focused:ze,showSearch:o,loading:C}):Ze},[j,V,Se,_e,ze,o,C]),be=l(()=>{var Ze;v==null||v(),(Ze=pe.current)==null||Ze.focus(),g([],{type:"clear",values:p}),et("",!1,!1)},"onClearMouseDown"),{allowClear:$e,clearIcon:le}=Cnt(n,p,W,Y,T,Se,x),ke=G.createElement(H,{ref:Ve}),je=pt(n,a,{[`${n}-focused`]:ze,[`${n}-multiple`]:ye,[`${n}-single`]:!ye,[`${n}-allow-clear`]:$e,[`${n}-show-arrow`]:ie!=null,[`${n}-disabled`]:T,[`${n}-loading`]:C,[`${n}-open`]:_e,[`${n}-customize-input`]:ne,[`${n}-show-search`]:o});let ut=G.createElement(nat,wD({},Ie,{ref:pe,prefixCls:n,className:je,focused:ze,prefix:U,suffix:ie,clearIcon:le,multiple:ye,mode:x,displayValues:p,placeholder:w,searchValue:Se,activeValue:L,onSearch:et,onSearchSubmit:Xe,onInputBlur:dt,onFocus:qe,onBlur:lt,onClearMouseDown:be,onKeyDown:Je,onKeyUp:St,onSelectorRemove:He,tokenWithEnter:Re,onMouseDown:it,components:me}));return ut=G.createElement(Nnt,{ref:Ae,disabled:T,prefixCls:n,visible:_e,popupElement:ke,animation:q,transitionName:Z,popupStyle:K,popupClassName:re,direction:d,popupMatchSelectWidth:Q,popupRender:te,popupAlign:ee,placement:J,builtinPlacements:ae,getPopupContainer:se,empty:m,onPopupVisibleChange:gt,onPopupMouseEnter:we,onPopupMouseDown:it,onPopupBlur:Me},ut),G.createElement($oe.Provider,{value:ge},G.createElement($nt,{visible:ze&&!_e,values:p}),ut)});Uoe.displayName="BaseSelect";var iat=Uoe,joe=l(()=>null,"OptGroup");joe.isSelectOptGroup=!0;var Koe=joe,Xoe=l(()=>null,"Option$2");Xoe.isSelectOption=!0;var Zoe=Xoe,Qoe=G.forwardRef(({height:t,offsetY:e,offsetX:r,children:n,prefixCls:a,onInnerResize:i,innerProps:s,rtl:o,extra:u},h)=>{let d={},f={display:"flex",flexDirection:"column"};return e!==void 0&&(d={height:t,position:"relative",overflow:"hidden"},f=Ne(X({},f),{transform:`translateY(${e}px)`,[o?"marginRight":"marginLeft"]:-r,position:"absolute",left:0,right:0,top:0})),G.createElement("div",{style:d},G.createElement(mh,{onResize:l(({offsetHeight:p})=>{p&&i&&i()},"onResize")},G.createElement("div",Vi({style:f,className:pt({[`${a}-holder-inner`]:a}),ref:h},s),n,u)))});Qoe.displayName="Filler";var sat=Qoe;function oat({children:t,setRef:e}){const r=G.useCallback(n=>{e(n)},[]);return G.cloneElement(t,{ref:r})}l(oat,"Item2");function lat(t,e,r,n,a,i,s,{getKey:o}){return t.slice(e,r+1).map((u,h)=>{const d=e+h,f=s(u,d,{style:{width:n},offsetX:a}),p=o(u);return G.createElement(oat,{key:p,setRef:l(g=>i(u,g),"setRef")},f)})}l(lat,"useChildren");function cat(t,e,r){const n=t.length,a=e.length;let i,s;if(n===0&&a===0)return null;n<a?(i=t,s=e):(i=e,s=t);const o={__EMPTY_ITEM__:!0};function u(f){return f!==void 0?r(f):o}l(u,"getItemKey");let h=null,d=Math.abs(n-a)!==1;for(let f=0;f<s.length;f+=1){const p=u(i[f]),g=u(s[f]);if(p!==g){h=f,d=d||p!==u(s[f+1]);break}}return h===null?null:{index:h,multiple:d}}l(cat,"findListDiffIndex");function uat(t,e,r){const[n,a]=G.useState(t),[i,s]=G.useState(null);return G.useEffect(()=>{const o=cat(n||[],t||[],e);(o==null?void 0:o.index)!==void 0&&s(t[o.index]),a(t)},[t]),[i]}l(uat,"useDiffItem");var hat=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),Joe=hat,ele=l((t,e,r,n)=>{const a=N.useRef(!1),i=N.useRef(null);function s(){clearTimeout(i.current),a.current=!0,i.current=setTimeout(()=>{a.current=!1},50)}l(s,"lockScroll");const o=N.useRef({top:t,bottom:e,left:r,right:n});return o.current.top=t,o.current.bottom=e,o.current.left=r,o.current.right=n,(u,h,d=!1)=>{const f=u?h<0&&o.current.left||h>0&&o.current.right:h<0&&o.current.top||h>0&&o.current.bottom;return d&&f?(clearTimeout(i.current),a.current=!1):(!f||a.current)&&s(),!a.current&&f}},"useOriginScroll_default");function dat(t,e,r,n,a,i,s){const o=N.useRef(0),u=N.useRef(null),h=N.useRef(null),d=N.useRef(!1),f=ele(e,r,n,a);function p(w,x){if(pn.cancel(u.current),f(!1,x))return;const T=w;if(!T._virtualHandled)T._virtualHandled=!0;else return;o.current+=x,h.current=x,Joe||T.preventDefault(),u.current=pn(()=>{const C=d.current?10:1;s(o.current*C,!1),o.current=0})}l(p,"onWheelY");function g(w,x){s(x,!0),Joe||w.preventDefault()}l(g,"onWheelX");const m=N.useRef(null),y=N.useRef(null);function v(w){if(!t)return;pn.cancel(y.current),y.current=pn(()=>{m.current=null},2);const{deltaX:x,deltaY:T,shiftKey:C}=w;let S=x,E=T;(m.current==="sx"||!m.current&&C&&T&&!x)&&(S=T,E=0,m.current="sx");const k=Math.abs(S),A=Math.abs(E);m.current===null&&(m.current=i&&k>A?"x":"y"),m.current==="y"?p(w,E):g(w,S)}l(v,"onWheel");function b(w){t&&(d.current=w.detail===h.current)}return l(b,"onFireFoxScroll"),[v,b]}l(dat,"useFrameWheel");function fat(t,e,r,n){const[a,i]=G.useMemo(()=>[new Map,[]],[t,r.id,n]);return l((o,u=o)=>{var f;let h=a.get(o),d=a.get(u);if(h===void 0||d===void 0){const p=t.length;for(let g=i.length;g<p;g+=1){const m=t[g],y=e(m);a.set(y,g);const v=(f=r.get(y))!=null?f:n;if(i[g]=(i[g-1]||0)+v,y===o&&(h=g),y===u&&(d=g),h!==void 0&&d!==void 0)break}}return{top:i[h-1]||0,bottom:i[d]}},"getSize2")}l(fat,"useGetSize");var pat=(kC=class{constructor(){qt(this,"maps"),qt(this,"id",0),qt(this,"diffRecords",new Map),this.maps=Object.create(null)}set(e,r){this.diffRecords.set(e,this.maps[e]),this.maps[e]=r,this.id+=1}get(e){return this.maps[e]}resetRecord(){this.diffRecords.clear()}getRecord(){return this.diffRecords}},l(kC,"CacheMap"),kC),gat=pat;function tle(t){const e=parseFloat(t);return isNaN(e)?0:e}l(tle,"parseNumber");function mat(t,e,r){const[n,a]=G.useState(0),i=N.useRef(new Map),s=N.useRef(new gat),o=N.useRef(0);function u(){o.current+=1}l(u,"cancelRaf");function h(f=!1){u();const p=l(()=>{let g=!1;i.current.forEach((m,y)=>{if(m&&m.offsetParent){const{offsetHeight:v}=m,{marginTop:b,marginBottom:w}=getComputedStyle(m),x=tle(b),T=tle(w),C=v+x+T;s.current.get(y)!==C&&(s.current.set(y,C),g=!0)}}),g&&a(m=>m+1)},"doCollect");if(f)p();else{o.current+=1;const g=o.current;Promise.resolve().then(()=>{g===o.current&&p()})}}l(h,"collectHeight");function d(f,p){const g=t(f);i.current.get(g),p?(i.current.set(g,p),h()):i.current.delete(g)}return l(d,"setInstanceRef"),N.useEffect(()=>u,[]),[d,h,s.current,n]}l(mat,"useHeights");var rle=14/15;function yat(t,e,r){const n=N.useRef(!1),a=N.useRef(0),i=N.useRef(0),s=N.useRef(null),o=N.useRef(null);let u;const h=l(p=>{if(n.current){const g=Math.ceil(p.touches[0].pageX),m=Math.ceil(p.touches[0].pageY);let y=a.current-g,v=i.current-m;const b=Math.abs(y)>Math.abs(v);b?a.current=g:i.current=m;const w=r(b,b?y:v,!1,p);w&&p.preventDefault(),clearInterval(o.current),w&&(o.current=setInterval(()=>{b?y*=rle:v*=rle;const x=Math.floor(b?y:v);(!r(b,x,!0)||Math.abs(x)<=.1)&&clearInterval(o.current)},16))}},"onTouchMove"),d=l(()=>{n.current=!1,u()},"onTouchEnd"),f=l(p=>{u(),p.touches.length===1&&!n.current&&(n.current=!0,a.current=Math.ceil(p.touches[0].pageX),i.current=Math.ceil(p.touches[0].pageY),s.current=p.target,s.current.addEventListener("touchmove",h,{passive:!1}),s.current.addEventListener("touchend",d,{passive:!0}))},"onTouchStart");u=l(()=>{s.current&&(s.current.removeEventListener("touchmove",h),s.current.removeEventListener("touchend",d))},"cleanUpEvents"),On(()=>(t&&e.current.addEventListener("touchstart",f,{passive:!0}),()=>{var p;(p=e.current)==null||p.removeEventListener("touchstart",f),u(),clearInterval(o.current)}),[t])}l(yat,"useMobileTouchMove");function nle(t){return Math.floor(ph(t,.5))}l(nle,"smoothScrollOffset");function TD(t,e){return("touches"in t?t.touches[0]:t)[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}l(TD,"getPageXY");function vat(t,e,r){G.useEffect(()=>{const n=e.current;if(t&&n){let a=!1,i,s;const o=l(()=>{pn.cancel(i)},"stopScroll"),u=l(()=>{o(),i=pn(()=>{r(s),u()})},"continueScroll"),h=l(()=>{a=!1,o()},"clearDragState"),d=l(p=>{if(p.target.draggable||p.button!==0)return;const g=p;g._virtualHandled||(g._virtualHandled=!0,a=!0)},"onMouseDown"),f=l(p=>{if(a){const g=TD(p,!1),{top:m,bottom:y}=n.getBoundingClientRect();if(g<=m){const v=m-g;s=-nle(v),u()}else if(g>=y){const v=g-y;s=nle(v),u()}else o()}},"onMouseMove");return n.addEventListener("mousedown",d),n.ownerDocument.addEventListener("mouseup",h),n.ownerDocument.addEventListener("mousemove",f),n.ownerDocument.addEventListener("dragend",h),()=>{n.removeEventListener("mousedown",d),n.ownerDocument.removeEventListener("mouseup",h),n.ownerDocument.removeEventListener("mousemove",f),n.ownerDocument.removeEventListener("dragend",h),o()}}},[t])}l(vat,"useScrollDrag");var ale=10;function bat(t,e,r,n,a,i,s,o){const u=G.useRef(),[h,d]=G.useState(null);return On(()=>{if(h&&h.times<ale){if(!t.current){d(x=>X({},x));return}i();const{targetAlign:f,originAlign:p,index:g,offset:m}=h,y=t.current.clientHeight;let v=!1,b=f,w=null;if(y){const x=f||p;let T=0,C=0,S=0;const E=Math.min(e.length-1,g);for(let A=0;A<=E;A+=1){const I=a(e[A]);C=T;const L=r.get(I);S=C+(L===void 0?n:L),T=S}let k=x==="top"?m:y-m;for(let A=E;A>=0;A-=1){const I=a(e[A]),L=r.get(I);if(L===void 0){v=!0;break}if(k-=L,k<=0)break}switch(x){case"top":w=C-m;break;case"bottom":w=S-y+m;break;default:{const{scrollTop:A}=t.current,I=A+y;C<A?b="top":S>I&&(b="bottom")}}w!==null&&s(w),w!==h.lastTop&&(v=!0)}v&&d(Ne(X({},h),{times:h.times+1,targetAlign:b,lastTop:w}))}else(h==null?void 0:h.times)===ale&&an(!1,"Seems `scrollTo` with `rc-virtual-list` reach the max limitation. Please fire issue for us. Thanks.")},[h,t.current]),f=>{if(f==null){o();return}if(pn.cancel(u.current),typeof f=="number")s(f);else if(f&&typeof f=="object"){let p;const{align:g}=f;"index"in f?{index:p}=f:p=e.findIndex(y=>a(y)===f.key);const{offset:m=0}=f;d({times:0,index:p,offset:m,originAlign:g})}}}l(bat,"useScrollTo");var ile=G.forwardRef((t,e)=>{const{prefixCls:r,rtl:n,scrollOffset:a,scrollRange:i,onStartMove:s,onStopMove:o,onScroll:u,horizontal:h,spinSize:d,containerSize:f,style:p,thumbStyle:g,showScrollBar:m}=t,[y,v]=G.useState(!1),[b,w]=G.useState(null),[x,T]=G.useState(null),C=!n,S=G.useRef(),E=G.useRef(),[k,A]=G.useState(m),I=G.useRef(),L=l(()=>{m===!0||m===!1||(clearTimeout(I.current),A(!0),I.current=setTimeout(()=>{A(!1)},3e3))},"delayHidden"),R=i-f||0,O=f-d||0,M=G.useMemo(()=>a===0||R===0?0:a/R*O,[a,R,O]),P=l(Y=>{Y.stopPropagation(),Y.preventDefault()},"onContainerMouseDown"),z=G.useRef({top:M,dragging:y,pageY:b,startTop:x});z.current={top:M,dragging:y,pageY:b,startTop:x};const D=l(Y=>{v(!0),w(TD(Y,h)),T(z.current.top),s(),Y.stopPropagation(),Y.preventDefault()},"onThumbMouseDown");G.useEffect(()=>{const Y=l(Z=>{Z.preventDefault()},"onScrollbarTouchStart"),H=S.current,q=E.current;return H.addEventListener("touchstart",Y,{passive:!1}),q.addEventListener("touchstart",D,{passive:!1}),()=>{H.removeEventListener("touchstart",Y),q.removeEventListener("touchstart",D)}},[]);const B=G.useRef();B.current=R;const W=G.useRef();W.current=O,G.useEffect(()=>{if(y){let Y;const H=l(Z=>{const{dragging:K,pageY:re,startTop:Q}=z.current;pn.cancel(Y);const te=S.current.getBoundingClientRect(),ee=f/(h?te.width:te.height);if(K){const J=(TD(Z,h)-re)*ee;let ae=Q;!C&&h?ae-=J:ae+=J;const se=B.current,fe=W.current,ve=fe?ae/fe:0;let de=Math.ceil(ve*se);de=Math.max(de,0),de=Math.min(de,se),Y=pn(()=>{u(de,h)})}},"onMouseMove"),q=l(()=>{v(!1),o()},"onMouseUp");return window.addEventListener("mousemove",H,{passive:!0}),window.addEventListener("touchmove",H,{passive:!0}),window.addEventListener("mouseup",q,{passive:!0}),window.addEventListener("touchend",q,{passive:!0}),()=>{window.removeEventListener("mousemove",H),window.removeEventListener("touchmove",H),window.removeEventListener("mouseup",q),window.removeEventListener("touchend",q),pn.cancel(Y)}}},[y]),G.useEffect(()=>(L(),()=>{clearTimeout(I.current)}),[a]),G.useImperativeHandle(e,()=>({delayHidden:L}));const U=`${r}-scrollbar`,j={position:"absolute",visibility:k?null:"hidden"},V={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return h?(Object.assign(j,{height:8,left:0,right:0,bottom:0}),Object.assign(V,{height:"100%",width:d,[C?"left":"right"]:M})):(Object.assign(j,{width:8,top:0,bottom:0,[C?"right":"left"]:0}),Object.assign(V,{width:"100%",height:d,top:M})),G.createElement("div",{ref:S,className:pt(U,{[`${U}-horizontal`]:h,[`${U}-vertical`]:!h,[`${U}-visible`]:k}),style:X(X({},j),p),onMouseDown:P,onMouseMove:L},G.createElement("div",{ref:E,className:pt(`${U}-thumb`,{[`${U}-thumb-moving`]:y}),style:X(X({},V),g),onMouseDown:D}))});ile.displayName="ScrollBar";var sle=ile,xat=20;function ole(t=0,e=0){let r=t/e*t;return isNaN(r)&&(r=0),r=Math.max(r,xat),Math.floor(r)}l(ole,"getSpinSize");var wat=[],Tat={overflowY:"auto",overflowAnchor:"none"};function Eat(t,e){const qe=t,{prefixCls:r="rc-virtual-list",className:n,height:a,itemHeight:i,fullHeight:s=!0,style:o,data:u,children:h,itemKey:d,virtual:f,direction:p,scrollWidth:g,component:m="div",onScroll:y,onVirtualScroll:v,onVisibleChange:b,innerProps:w,extraRender:x,styles:T,showScrollBar:C="optional"}=qe,S=Xt(qe,["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"]),E=G.useCallback(Me=>typeof d=="function"?d(Me):Me==null?void 0:Me[d],[d]),[k,A,I,L]=mat(E),R=!!(f!==!1&&a&&i),O=G.useMemo(()=>Object.values(I.maps).reduce((Me,lt)=>Me+lt,0),[I.id,I.maps]),M=R&&u&&(Math.max(i*u.length,O)>a||!!g),P=p==="rtl",z=pt(r,{[`${r}-rtl`]:P},n),D=u||wat,B=N.useRef(),W=N.useRef(),U=N.useRef(),[j,V]=N.useState(0),[Y,H]=N.useState(0),[q,Z]=N.useState(!1),K=l(()=>{Z(!0)},"onScrollbarStartMove"),re=l(()=>{Z(!1)},"onScrollbarStopMove"),Q={getKey:E};function te(Me){V(lt=>{let it;typeof Me=="function"?it=Me(lt):it=Me;const Ue=ze(it);return B.current.scrollTop=Ue,Ue})}l(te,"syncScrollTop");const ee=N.useRef({start:0,end:D.length}),J=N.useRef(),[ae]=uat(D,E);J.current=ae;const{scrollHeight:se,start:fe,end:ve,offset:de}=G.useMemo(()=>{var gt;if(!R)return{scrollHeight:void 0,start:0,end:D.length-1,offset:void 0};if(!M)return{scrollHeight:((gt=W.current)==null?void 0:gt.offsetHeight)||0,start:0,end:D.length-1,offset:void 0};let Me=0,lt,it,Ue;const we=D.length;for(let ge=0;ge<we;ge+=1){const ie=D[ge],be=E(ie),$e=I.get(be),le=Me+($e===void 0?i:$e);le>=j&<===void 0&&(lt=ge,it=Me),le>j+a&&Ue===void 0&&(Ue=ge),Me=le}return lt===void 0&&(lt=0,it=0,Ue=Math.ceil(a/i)),Ue===void 0&&(Ue=D.length-1),Ue=Math.min(Ue+1,D.length-1),{scrollHeight:Me,start:lt,end:Ue,offset:it}},[M,R,j,D,L,a]);ee.current.start=fe,ee.current.end=ve,G.useLayoutEffect(()=>{const Me=I.getRecord();if(Me.size===1){const lt=Array.from(Me.keys())[0],it=Me.get(lt),Ue=D[fe];if(Ue&&it===void 0&&E(Ue)===lt){const ge=I.get(lt)-i;te(ie=>ie+ge)}}I.resetRecord()},[se]);const[Ee,Ce]=G.useState({width:0,height:a}),De=l(Me=>{Ce({width:Me.offsetWidth,height:Me.offsetHeight})},"onHolderResize"),ce=N.useRef(),Ie=N.useRef(),ye=G.useMemo(()=>ole(Ee.width,g),[Ee.width,g]),pe=G.useMemo(()=>ole(Ee.height,se),[Ee.height,se]),Ae=se-a,Ve=N.useRef(Ae);Ve.current=Ae;function ze(Me){let lt=Me;return Number.isNaN(Ve.current)||(lt=Math.min(lt,Ve.current)),lt=Math.max(lt,0),lt}l(ze,"keepInRange");const We=j<=0,me=j>=Ae,Se=Y<=0,ne=Y>=g,xe=ele(We,me,Se,ne),oe=l(()=>({x:P?-Y:Y,y:j}),"getVirtualScrollInfo"),_e=N.useRef(oe()),ue=Ur(Me=>{if(v){const lt=X(X({},oe()),Me);(_e.current.x!==lt.x||_e.current.y!==lt.y)&&(v(lt),_e.current=lt)}});function tt(Me,lt){const it=Me;lt?(Rn.flushSync(()=>{H(it)}),ue()):te(it)}l(tt,"onScrollBar");function Re(Me){const{scrollTop:lt}=Me.currentTarget;lt!==j&&te(lt),y==null||y(Me),ue()}l(Re,"onFallbackScroll");const et=l(Me=>{let lt=Me;const it=g?g-Ee.width:0;return lt=Math.max(lt,0),lt=Math.min(lt,it),lt},"keepInHorizontalRange"),Xe=Ur((Me,lt)=>{lt?(Rn.flushSync(()=>{H(it=>{const Ue=it+(P?-Me:Me);return et(Ue)})}),ue()):te(it=>it+Me)}),[ot,Ge]=dat(R,We,me,Se,ne,!!g,Xe);yat(R,B,(Me,lt,it,Ue)=>{const we=Ue;return xe(Me,lt,it)?!1:!we||!we._virtualHandled?(we&&(we._virtualHandled=!0),ot({preventDefault(){},deltaX:Me?lt:0,deltaY:Me?0:lt}),!0):!1}),vat(M,B,Me=>{te(lt=>lt+Me)}),On(()=>{function Me(it){const Ue=We&&it.detail<0,we=me&&it.detail>0;R&&!Ue&&!we&&it.preventDefault()}l(Me,"onMozMousePixelScroll");const lt=B.current;return lt.addEventListener("wheel",ot,{passive:!1}),lt.addEventListener("DOMMouseScroll",Ge,{passive:!0}),lt.addEventListener("MozMousePixelScroll",Me,{passive:!1}),()=>{lt.removeEventListener("wheel",ot),lt.removeEventListener("DOMMouseScroll",Ge),lt.removeEventListener("MozMousePixelScroll",Me)}},[R,We,me]),On(()=>{if(g){const Me=et(Y);H(Me),ue({x:Me})}},[Ee.width,g]);const ht=l(()=>{var Me,lt;(Me=ce.current)==null||Me.delayHidden(),(lt=Ie.current)==null||lt.delayHidden()},"delayHideScrollBar"),Je=bat(B,D,I,i,E,()=>A(!0),te,ht);G.useImperativeHandle(e,()=>({nativeElement:U.current,getScrollInfo:oe,scrollTo:l(Me=>{function lt(it){return it&&typeof it=="object"&&("left"in it||"top"in it)}l(lt,"isPosScroll"),lt(Me)?(Me.left!==void 0&&H(et(Me.left)),Je(Me.top)):Je(Me)},"scrollTo")})),On(()=>{if(b){const Me=D.slice(fe,ve+1);b(Me,D)}},[fe,ve,D]);const St=fat(D,E,I,i),He=x==null?void 0:x({start:fe,end:ve,virtual:M,offsetX:Y,offsetY:de,rtl:P,getSize:St}),dt=lat(D,fe,ve,g,Y,k,h,Q);let Oe=null;a&&(Oe=X({[s?"height":"maxHeight"]:a},Tat),R&&(Oe.overflowY="hidden",g&&(Oe.overflowX="hidden"),q&&(Oe.pointerEvents="none")));const vt={};return P&&(vt.dir="rtl"),G.createElement("div",Vi({ref:U,style:Ne(X({},o),{position:"relative"}),className:z},vt,S),G.createElement(mh,{onResize:De},G.createElement(m,{className:`${r}-holder`,style:Oe,ref:B,onScroll:Re,onMouseEnter:ht},G.createElement(sat,{prefixCls:r,height:se,offsetX:Y,offsetY:de,scrollWidth:g,onInnerResize:A,ref:W,innerProps:w,rtl:P,extra:He},dt))),M&&se>a&&G.createElement(sle,{ref:ce,prefixCls:r,scrollOffset:j,scrollRange:se,rtl:P,onScroll:tt,onStartMove:K,onStopMove:re,spinSize:pe,containerSize:Ee.height,style:T==null?void 0:T.verticalScrollBar,thumbStyle:T==null?void 0:T.verticalScrollBarThumb,showScrollBar:C}),M&&g>Ee.width&&G.createElement(sle,{ref:Ie,prefixCls:r,scrollOffset:Y,scrollRange:g,rtl:P,onScroll:tt,onStartMove:K,onStopMove:re,spinSize:ye,containerSize:Ee.width,horizontal:!0,style:T==null?void 0:T.horizontalScrollBar,thumbStyle:T==null?void 0:T.horizontalScrollBarThumb,showScrollBar:C}))}l(Eat,"RawList");var lle=G.forwardRef(Eat);lle.displayName="List";var Cat=lle,Sat=Cat;function _at(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}l(_at,"isPlatformMac");function AS(){return AS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},AS.apply(this,arguments)}l(AS,"_extends30");function cle(t){return typeof t=="string"||typeof t=="number"}l(cle,"isTitleType2");var kat=l((t,e)=>{var te,ee;const{prefixCls:r,id:n,open:a,multiple:i,mode:s,searchValue:o,toggleOpen:u,notFoundContent:h,onPopupScroll:d,showScrollBar:f,lockOptions:p}=$g(),{maxCount:g,flattenOptions:m,onActiveValue:y,defaultActiveFirstOption:v,onSelect:b,menuItemSelectedIcon:w,rawValues:x,fieldNames:T,virtual:C,direction:S,listHeight:E,listItemHeight:k,optionRender:A,classNames:I,styles:L}=G.useContext(mD),R=`${r}-item`,O=ux(()=>m,[a,p],(J,ae)=>ae[0]&&!ae[1]),M=G.useRef(null),P=G.useMemo(()=>i&&dD(g)&&(x==null?void 0:x.size)>=g,[i,g,x==null?void 0:x.size]),z=l(J=>{J.preventDefault()},"onListMouseDown"),D=l(J=>{var ae;(ae=M.current)==null||ae.scrollTo(typeof J=="number"?{index:J}:J)},"scrollIntoView"),B=G.useCallback(J=>s==="combobox"?!1:x.has(J),[s,[...x].toString(),x.size]),W=l((J,ae=1)=>{const se=O.length;for(let fe=0;fe<se;fe+=1){const ve=(J+fe*ae+se)%se,{group:de,data:Ee}=O[ve]||{};if(!de&&!(Ee!=null&&Ee.disabled)&&(B(Ee.value)||!P))return ve}return-1},"getEnabledActiveIndex"),[U,j]=G.useState(()=>W(0)),V=l((J,ae=!1)=>{j(J);const se={source:ae?"keyboard":"mouse"},fe=O[J];if(!fe){y(null,-1,se);return}y(fe.value,J,se)},"setActive");N.useEffect(()=>{V(v!==!1?W(0):-1)},[O.length,o]);const Y=G.useCallback(J=>s==="combobox"?String(J).toLowerCase()===o.toLowerCase():x.has(J),[s,o,[...x].toString(),x.size]);N.useEffect(()=>{var ae;let J;if(!i&&a&&x.size===1){const se=Array.from(x)[0],fe=O.findIndex(({data:ve})=>o?String(ve.value).startsWith(o):ve.value===se);fe!==-1&&(V(fe),J=setTimeout(()=>{D(fe)}))}return a&&((ae=M.current)==null||ae.scrollTo(void 0)),()=>clearTimeout(J)},[a,o]);const H=l(J=>{J!==void 0&&b(J,{selected:!x.has(J)}),i||u(!1)},"onSelectValue");if(G.useImperativeHandle(e,()=>({onKeyDown:l(J=>{const{which:ae,ctrlKey:se}=J;switch(ae){case gr.N:case gr.P:case gr.UP:case gr.DOWN:{let fe=0;if(ae===gr.UP?fe=-1:ae===gr.DOWN?fe=1:_at()&&se&&(ae===gr.N?fe=1:ae===gr.P&&(fe=-1)),fe!==0){const ve=W(U+fe,fe);D(ve),V(ve,!0)}break}case gr.TAB:case gr.ENTER:{const fe=O[U];if(!fe||fe.data.disabled)return H(void 0);!P||x.has(fe.value)?H(fe.value):H(void 0),a&&J.preventDefault();break}case gr.ESC:u(!1),a&&J.stopPropagation()}},"onKeyDown"),onKeyUp:l(()=>{},"onKeyUp"),scrollTo:l(J=>{D(J)},"scrollTo")})),O.length===0)return G.createElement("div",{role:"listbox",id:`${n}_list`,className:`${R}-empty`,onMouseDown:z},h);const q=Object.keys(T).map(J=>T[J]),Z=l(J=>J.label,"getLabel");function K(J,ae){const{group:se}=J;return{role:se?"presentation":"option",id:`${n}_list_${ae}`}}l(K,"getItemAriaProps");const re=l(J=>{const ae=O[J];if(!ae)return null;const se=ae.data||{},{value:fe}=se,{group:ve}=ae,de=Hc(se,!0),Ee=Z(ae);return ae?G.createElement("div",AS({"aria-label":typeof Ee=="string"&&!ve?Ee:null},de,{key:J},K(ae,J),{"aria-selected":Y(fe)}),fe):null},"renderItem"),Q={role:"listbox",id:`${n}_list`};return G.createElement(G.Fragment,null,C&&G.createElement("div",AS({},Q,{style:{height:0,width:0,overflow:"hidden"}}),re(U-1),re(U),re(U+1)),G.createElement(Sat,{itemKey:"key",ref:M,data:O,height:E,itemHeight:k,fullHeight:!1,onMouseDown:z,onScroll:d,virtual:C,direction:S,innerProps:C?null:Q,showScrollBar:f,className:(te=I==null?void 0:I.popup)==null?void 0:te.list,style:(ee=L==null?void 0:L.popup)==null?void 0:ee.list},(J,ae)=>{var ue,Re,et;const{group:se,groupOption:fe,data:ve,label:de,value:Ee}=J,{key:Ce}=ve;if(se){const Xe=(ue=ve.title)!=null?ue:cle(de)?de.toString():void 0;return G.createElement("div",{className:pt(R,`${R}-group`,ve.className),title:Xe},de!==void 0?de:Ce)}const tt=ve,{disabled:De,title:ce,children:Ie,style:ye,className:pe}=tt,Ae=Xt(tt,["disabled","title","children","style","className"]),Ve=ws(Ae,q),ze=B(Ee),We=De||!ze&&P,me=`${R}-option`,Se=pt(R,me,pe,(Re=I==null?void 0:I.popup)==null?void 0:Re.listItem,{[`${me}-grouped`]:fe,[`${me}-active`]:U===ae&&!We,[`${me}-disabled`]:We,[`${me}-selected`]:ze}),ne=Z(J),xe=!w||typeof w=="function"||ze,oe=typeof ne=="number"?ne:ne||Ee;let _e=cle(oe)?oe.toString():void 0;return ce!==void 0&&(_e=ce),G.createElement("div",AS({},Hc(Ve),C?{}:K(J,ae),{"aria-selected":C?void 0:Y(Ee),className:Se,title:_e,onMouseMove:l(()=>{U===ae||We||V(ae)},"onMouseMove"),onClick:l(()=>{We||H(Ee)},"onClick"),style:X(X({},(et=L==null?void 0:L.popup)==null?void 0:et.listItem),ye)}),G.createElement("div",{className:`${me}-content`},typeof A=="function"?A(J,{index:ae}):oe),G.isValidElement(w)||ze,xe&&G.createElement(qoe,{className:`${R}-option-state`,customizeIcon:w,customizeIconProps:{value:Ee,disabled:We,isSelected:ze}},ze?"✓":null))}))},"OptionList"),ule=G.forwardRef(kat);ule.displayName="OptionList";var Aat=ule,Nat=l((t,e)=>{const r=G.useRef({values:new Map,options:new Map}),n=G.useMemo(()=>{const{values:i,options:s}=r.current,o=t.map(d=>{var f;return d.label===void 0?Ne(X({},d),{label:(f=i.get(d.value))==null?void 0:f.label}):d}),u=new Map,h=new Map;return o.forEach(d=>{u.set(d.value,d),h.set(d.value,e.get(d.value)||s.get(d.value))}),r.current.values=u,r.current.options=h,o},[t,e]),a=G.useCallback(i=>e.get(i)||r.current.options.get(i),[e]);return[n,a]},"useCache_default");function ED(t,e){return yD(t).join("").toUpperCase().includes(e)}l(ED,"includes$2");var Iat=l((t,e,r,n,a)=>G.useMemo(()=>{if(!r||n===!1)return t;const{options:i,label:s,value:o}=e,u=[],h=typeof n=="function",d=r.toUpperCase(),f=h?n:(g,m)=>a&&a.length?a.some(y=>ED(m[y],d)):m[i]?ED(m[s!=="children"?s:"label"],d):ED(m[o],d),p=h?g=>fD(g):g=>g;return t.forEach(g=>{if(g[i]){if(f(r,p(g)))u.push(g);else{const y=g[i].filter(v=>f(r,p(v)));y.length&&u.push(Ne(X({},g),{[i]:y}))}return}f(r,p(g))&&u.push(g)}),u},[t,n,a,r,e]),"useFilterOptions_default");function Lat(t){const{key:e,props:i}=t,s=i,{children:r,value:n}=s,a=Xt(s,["children","value"]);return X({key:e,value:n!==void 0?n:e,children:r},a)}l(Lat,"convertNodeToOption");function CD(t,e=!1){return wo(t).map((r,n)=>{if(!G.isValidElement(r)||!r.type)return null;const{type:{isSelectOptGroup:a},key:i,props:u}=r,h=u,{children:s}=h,o=Xt(h,["children"]);return e||!a?Lat(r):Ne(X({key:`__RC_SELECT_GRP__${i===null?n:i}__`,label:i},o),{options:CD(s)})}).filter(r=>r)}l(CD,"convertChildrenToData");var $at=l((t,e,r,n,a)=>G.useMemo(()=>{let i=t;!t&&(i=CD(e));const o=new Map,u=new Map,h=l((f,p,g)=>{g&&typeof g=="string"&&f.set(p[g],p)},"setLabelOptions"),d=l((f,p=!1)=>{for(let g=0;g<f.length;g+=1){const m=f[g];!m[r.options]||p?(o.set(m[r.value],m),h(u,m,r.label),n.forEach(y=>{h(u,m,y)}),h(u,m,a)):d(m[r.options],!0)}},"dig");return d(i),{options:i,valueOptions:o,labelOptions:u}},[t,e,r,n,a]),"useOptions"),Mat=$at;function hle(t){const e=G.useRef();return e.current=t,G.useCallback((...n)=>e.current(...n),[])}l(hle,"useRefFunc");function Pat(t){const{mode:e,options:r,children:n,backfill:a,allowClear:i,placeholder:s,getInputElement:o,showSearch:u,onSearch:h,defaultOpen:d,autoFocus:f,labelInValue:p,value:g,optionLabelProp:m}=t,y=D6(e),v=u!==void 0?u:y||e==="combobox",b=r||CD(n);if(an(e!=="tags"||b.every(w=>!w.disabled),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),e==="tags"||e==="combobox"){const w=b.some(x=>x.options?x.options.some(T=>typeof("value"in T?T.value:T.key)=="number"):typeof("value"in x?x.value:x.key)=="number");an(!w,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(an(e!=="combobox"||!m,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),an(e==="combobox"||!a,"`backfill` only works with `combobox` mode."),an(e==="combobox"||!o,"`getInputElement` only work with `combobox` mode."),WR(e!=="combobox"||!o||!i||!s,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),h&&!v&&e!=="combobox"&&e!=="tags"&&an(!1,"`onSearch` should work with `showSearch` instead of use alone."),WR(!d||f,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),g!=null){const w=yD(g);an(!p||w.every(x=>typeof x=="object"&&("key"in x||"value"in x)),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),an(!y||Array.isArray(g),"`value` should be array when `mode` is `multiple` or `tags`")}if(n){let w=null;wo(n).some(x=>{if(!G.isValidElement(x)||!x.type)return!1;const{type:T}=x;return T.isSelectOption?!1:T.isSelectOptGroup?!wo(x.props.children).every(S=>!G.isValidElement(S)||!x.type||S.type.isSelectOption?!0:(w=S.type,!1)):(w=T,!0)}),w&&an(!1,`\`children\` should be \`Select.Option\` or \`Select.OptGroup\` instead of \`${w.displayName||w.name||w}\`.`)}}l(Pat,"warningProps");function Rat(t,e){if(t){const r=l((n,a=!1)=>{for(let i=0;i<n.length;i++){const s=n[i];if(s[e==null?void 0:e.value]===null)return an(!1,"`value` in Select options should not be `null`."),!0;if(!a&&Array.isArray(s[e==null?void 0:e.options])&&r(s[e==null?void 0:e.options],!0))break}},"recursiveOptions");r(t)}}l(Rat,"warningNullOptions");var Oat=Pat;function Dat(t,e,r){const{filterOption:n,searchValue:a,optionFilterProp:i,filterSort:s,onSearch:o,autoClearSearchValue:u}=e;return G.useMemo(()=>{const h=typeof t=="object",d=X({filterOption:n,searchValue:a,optionFilterProp:i,filterSort:s,onSearch:o,autoClearSearchValue:u},h?t:{});return[h||r==="combobox"||r==="tags"||r==="multiple"&&t===void 0?!0:t,d]},[r,t,n,a,i,s,o,u])}l(Dat,"useSearchConfig");function SD(){return SD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},SD.apply(this,arguments)}l(SD,"_extends31");var Fat=["inputValue"];function Bat(t){return!t||typeof t!="object"}l(Bat,"isRawValue");var dle=G.forwardRef((t,e)=>{const it=t,{id:r,mode:n,prefixCls:a="rc-select",backfill:i,fieldNames:s,showSearch:o,searchValue:u,onSearch:h,autoClearSearchValue:d,filterOption:f,optionFilterProp:p,filterSort:g,onSelect:m,onDeselect:y,onActive:v,popupMatchSelectWidth:b=!0,optionLabelProp:w,options:x,optionRender:T,children:C,defaultActiveFirstOption:S,menuItemSelectedIcon:E,virtual:k,direction:A,listHeight:I=200,listItemHeight:L=20,labelRender:R,value:O,defaultValue:M,labelInValue:P,onChange:z,maxCount:D,classNames:B,styles:W}=it,U=Xt(it,["id","mode","prefixCls","backfill","fieldNames","showSearch","searchValue","onSearch","autoClearSearchValue","filterOption","optionFilterProp","filterSort","onSelect","onDeselect","onActive","popupMatchSelectWidth","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount","classNames","styles"]),j={searchValue:u,onSearch:h,autoClearSearchValue:d,filterOption:f,optionFilterProp:p,filterSort:g},[V,Y]=Dat(o,j,n),{filterOption:H,searchValue:q,optionFilterProp:Z,filterSort:K,onSearch:re,autoClearSearchValue:Q=!0}=Y,te=G.useMemo(()=>Z?Array.isArray(Z)?Z:[Z]:[],[Z]),ee=S0(r),J=D6(n),ae=!!(!x&&C),se=G.useMemo(()=>H===void 0&&n==="combobox"?!1:H,[H,n]),fe=G.useMemo(()=>Ooe(s,ae),[JSON.stringify(s),ae]),[ve,de]=Ta("",q),Ee=ve||"",Ce=Mat(x,C,fe,te,w),{valueOptions:De,labelOptions:ce,options:Ie}=Ce,ye=G.useCallback(Ue=>yD(Ue).map(gt=>{let ge,ie,be,$e;Bat(gt)?ge=gt:(ie=gt.label,ge=gt.value);const le=De.get(ge);if(le&&(ie===void 0&&(ie=le==null?void 0:le[w||fe.label]),be=le==null?void 0:le.disabled,$e=le==null?void 0:le.title,!w)){const ke=le==null?void 0:le[fe.label];ke!==void 0&&!G.isValidElement(ke)&&!G.isValidElement(ie)&&ke!==ie&&an(!1,"`label` of `value` is not same as `label` in Select options.")}return{label:ie,value:ge,key:ge,disabled:be,title:$e}}),[fe,w,De]),[pe,Ae]=Ta(M,O),Ve=G.useMemo(()=>{var gt;const we=ye(J&&pe===null?[]:pe);return n==="combobox"&&Bnt((gt=we[0])==null?void 0:gt.value)?[]:we},[pe,ye,n,J]),[ze,We]=Nat(Ve,De),me=G.useMemo(()=>{if(!n&&ze.length===1){const Ue=ze[0];if(Ue.value===null&&(Ue.label===null||Ue.label===void 0))return[]}return ze.map(Ue=>{var we;return Ne(X({},Ue),{label:(we=typeof R=="function"?R(Ue):Ue.label)!=null?we:Ue.value})})},[n,ze,R]),Se=G.useMemo(()=>new Set(ze.map(Ue=>Ue.value)),[ze]);G.useEffect(()=>{var Ue;if(n==="combobox"){const we=(Ue=ze[0])==null?void 0:Ue.value;de(Fnt(we)?String(we):"")}},[ze]);const ne=hle((Ue,we)=>{const gt=we!=null?we:Ue;return{[fe.value]:Ue,[fe.label]:gt}}),xe=G.useMemo(()=>{if(n!=="tags")return Ie;const Ue=[...Ie],we=l(gt=>De.has(gt),"existOptions");return[...ze].sort((gt,ge)=>gt.value<ge.value?-1:1).forEach(gt=>{const ge=gt.value;we(ge)||Ue.push(ne(ge,gt.label))}),Ue},[ne,Ie,De,ze,n]),oe=Iat(xe,fe,Ee,se,te),_e=G.useMemo(()=>{const Ue=l(we=>te.length?te.some(gt=>(we==null?void 0:we[gt])===Ee):(we==null?void 0:we.value)===Ee,"hasItemMatchingSearch");return n!=="tags"||!Ee||oe.some(we=>Ue(we))||oe.some(we=>we[fe.value]===Ee)?oe:[ne(Ee),...oe]},[ne,te,n,oe,Ee,fe]),ue=l(Ue=>[...Ue].sort((gt,ge)=>K(gt,ge,{searchValue:Ee})).map(gt=>Array.isArray(gt.options)?Ne(X({},gt),{options:gt.options.length>0?ue(gt.options):gt.options}):gt),"sorter"),tt=G.useMemo(()=>K?ue(_e):_e,[_e,K,Ee]),Re=G.useMemo(()=>Int(tt,{fieldNames:fe,childrenAsData:ae}),[tt,fe,ae]),et=l(Ue=>{const we=ye(Ue);if(Ae(we),z&&(we.length!==ze.length||we.some((gt,ge)=>{var ie;return((ie=ze[ge])==null?void 0:ie.value)!==(gt==null?void 0:gt.value)}))){const gt=P?we.map(({label:ie,value:be})=>({label:ie,value:be})):we.map(ie=>ie.value),ge=we.map(ie=>fD(We(ie.value)));z(J?gt:gt[0],J?ge:ge[0])}},"triggerChange"),[Xe,ot]=G.useState(null),[Ge,ht]=G.useState(0),Je=S!==void 0?S:n!=="combobox",St=G.useRef(),He=G.useCallback((Ue,we,{source:gt="keyboard"}={})=>{ht(we),i&&n==="combobox"&&Ue!==null&>==="keyboard"&&ot(String(Ue));const ge=Promise.resolve().then(()=>{St.current===ge&&(v==null||v(Ue))});St.current=ge},[i,n,v]),dt=l((Ue,we,gt)=>{const ge=l(()=>{const ie=We(Ue);return[P?{label:ie==null?void 0:ie[fe.label],value:Ue}:Ue,fD(ie)]},"getSelectEnt");if(we&&m){const[ie,be]=ge();m(ie,be)}else if(!we&&y&>!=="clear"){const[ie,be]=ge();y(ie,be)}},"triggerSelect"),Oe=hle((Ue,we)=>{let gt;const ge=J?we.selected:!0;ge?gt=J?[...ze,Ue]:[Ue]:gt=ze.filter(ie=>ie.value!==Ue),et(gt),dt(Ue,ge),n==="combobox"?ot(""):(!D6||Q)&&(de(""),ot(""))}),vt=l((Ue,we)=>{et(Ue);const{type:gt,values:ge}=we;(gt==="remove"||gt==="clear")&&ge.forEach(ie=>{dt(ie.value,!1,gt)})},"onDisplayValuesChange"),qe=l((Ue,we)=>{if(de(Ue),ot(null),we.source==="submit"){const gt=(Ue||"").trim();if(gt){const ge=Array.from(new Set([...Se,gt]));et(ge),dt(gt,!0),de("")}return}we.source!=="blur"&&(n==="combobox"&&et(Ue),re==null||re(Ue))},"onInternalSearch"),Me=l(Ue=>{let we=Ue;n!=="tags"&&(we=Ue.map(ge=>{const ie=ce.get(ge);return ie==null?void 0:ie.value}).filter(ge=>ge!==void 0));const gt=Array.from(new Set([...Se,...we]));et(gt),gt.forEach(ge=>{dt(ge,!0)})},"onInternalSearchSplit"),lt=G.useMemo(()=>{const Ue=k!==!1&&b!==!1;return Ne(X({},Ce),{flattenOptions:Re,onActiveValue:He,defaultActiveFirstOption:Je,onSelect:Oe,menuItemSelectedIcon:E,rawValues:Se,fieldNames:fe,virtual:Ue,direction:A,listHeight:I,listItemHeight:L,childrenAsData:ae,maxCount:D,optionRender:T,classNames:B,styles:W})},[D,Ce,Re,He,Je,Oe,E,Se,fe,k,b,A,I,L,ae,T,B,W]);return Oat(t),Rat(Ie,fe),G.createElement(mD.Provider,{value:lt},G.createElement(iat,SD({},U,{id:ee,prefixCls:a,ref:e,omitDomProps:Fat,mode:n,classNames:B,styles:W,displayValues:me,onDisplayValuesChange:vt,maxCount:D,direction:A,showSearch:V,searchValue:Ee,onSearch:qe,autoClearSearchValue:Q,onSearchSplit:Me,popupMatchSelectWidth:b,OptionList:Aat,emptyOptions:!Re.length,activeValue:Xe,activeDescendantId:`${ee}_list_${Ge}`})))});dle.displayName="Select";var _D=dle;_D.Option=Zoe,_D.OptGroup=Koe;var zat=_D,Hat=zat,Mg=l((t,e,r)=>pt({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:r}),"getStatusClassNames"),NS=l((t,e)=>e||t,"getMergedStatus"),fle=l(()=>{const[,t]=Il(),[e]=Tu("Empty"),n=new pa(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return G.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},G.createElement("title",null,(e==null?void 0:e.description)||"Empty"),G.createElement("g",{fill:"none",fillRule:"evenodd"},G.createElement("g",{transform:"translate(24 31.7)"},G.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.8",cy:"106.9",rx:"67.8",ry:"12.7"}),G.createElement("path",{fill:"#aeb8c2",d:"M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z"}),G.createElement("path",{fill:"#f5f5f7",d:"M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4"}),G.createElement("path",{fill:"#dce0e6",d:"M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8"})),G.createElement("path",{fill:"#dce0e6",d:"m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8"}),G.createElement("g",{fill:"#fff",transform:"translate(149.7 15.4)"},G.createElement("circle",{cx:"20.7",cy:"3.2",r:"2.8"}),G.createElement("path",{d:"M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z"}))))},"Empty");fle.displayName="EmptyImage";var Wat=fle,ple=l(()=>{const[,t]=Il(),[e]=Tu("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:a,colorBgContainer:i}=t,{borderColor:s,shadowColor:o,contentColor:u}=N.useMemo(()=>({borderColor:new pa(r).onBackground(i).toHexString(),shadowColor:new pa(n).onBackground(i).toHexString(),contentColor:new pa(a).onBackground(i).toHexString()}),[r,n,a,i]);return G.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},G.createElement("title",null,(e==null?void 0:e.description)||"Empty"),G.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},G.createElement("ellipse",{fill:o,cx:"32",cy:"33",rx:"32",ry:"7"}),G.createElement("g",{fillRule:"nonzero",stroke:s},G.createElement("path",{d:"M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"}),G.createElement("path",{d:"M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3",fill:u}))))},"Simple");ple.displayName="SimpleImage";var Vat=ple,Gat=l(t=>{const{componentCls:e,margin:r,marginXS:n,marginXL:a,fontSize:i,lineHeight:s}=t;return{[e]:{marginInline:n,fontSize:i,lineHeight:s,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:n,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:r},"&-normal":{marginBlock:a,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:n,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},"genSharedEmptyStyle"),qat=ea("Empty",t=>{const{componentCls:e,controlHeightLG:r,calc:n}=t,a=Wn(t,{emptyImgCls:`${e}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return Gat(a)}),gle=G.createElement(Wat,null),mle=G.createElement(Vat,null),F6=l(t=>{var M;const O=t,{className:e,rootClassName:r,prefixCls:n,image:a,description:i,children:s,imageStyle:o,style:u,classNames:h,styles:d}=O,f=Xt(O,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:p,direction:g,className:m,style:y,classNames:v,styles:b,image:w}=Aa("empty"),x=p("empty",n),[T,C]=qat(x),[S,E]=Qa([v,h],[b,d],{props:t}),[k]=Tu("Empty"),A=typeof i!="undefined"?i:k==null?void 0:k.description,I=typeof A=="string"?A:"empty",L=(M=a!=null?a:w)!=null?M:gle;let R=null;typeof L=="string"?R=G.createElement("img",{draggable:!1,alt:I,src:L}):R=L;{const P=Tn("Empty");[["imageStyle","styles.image"]].forEach(([z,D])=>{P.deprecated(!(z in t),z,D)})}return G.createElement("div",X({className:pt(T,C,x,m,{[`${x}-normal`]:L===mle,[`${x}-rtl`]:g==="rtl"},e,r,S.root),style:X(X(X({},E.root),y),u)},f),G.createElement("div",{className:pt(`${x}-image`,S.image),style:X(X({},o),E.image)},R),A&&G.createElement("div",{className:pt(`${x}-description`,S.description),style:E.description},A),s&&G.createElement("div",{className:pt(`${x}-footer`,S.footer),style:E.footer},s))},"Empty2");F6.PRESENTED_IMAGE_DEFAULT=gle,F6.PRESENTED_IMAGE_SIMPLE=mle,F6.displayName="Empty";var Pg=F6,Yat=l(t=>{const{componentName:e}=t,{getPrefixCls:r}=N.useContext(vn),n=r("empty");switch(e){case"Table":case"List":return N.createElement(Pg,{image:Pg.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return N.createElement(Pg,{image:Pg.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return N.createElement(Pg,null)}},"DefaultRenderEmpty"),Uat=Yat,jat=l((t,e,r)=>{var h,d;const{variant:n,[t]:a}=G.useContext(vn),i=G.useContext(Att),s=a==null?void 0:a.variant;let o;typeof e!="undefined"?o=e:r===!1?o="borderless":o=(d=(h=i!=null?i:s)!=null?h:n)!=null?d:"outlined";const u=TYe.includes(o);return[o,u]},"useVariant"),B6=jat,Kat=l(t=>{const r={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Ne(X({},r),{points:["tl","bl"],offset:[0,4]}),bottomRight:Ne(X({},r),{points:["tr","br"],offset:[0,4]}),topLeft:Ne(X({},r),{points:["bl","tl"],offset:[0,-4]}),topRight:Ne(X({},r),{points:["br","tr"],offset:[0,-4]})}},"getBuiltInPlacements2");function Xat(t,e){return t||Kat(e)}l(Xat,"mergedBuiltinPlacements");var Zat=Xat,yle=l(t=>{const{optionHeight:e,optionFontSize:r,optionLineHeight:n,optionPadding:a}=t;return{position:"relative",display:"block",minHeight:e,padding:a,color:t.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}},"genItemStyle"),Qat=l(t=>{const{antCls:e,componentCls:r}=t,n=`${r}-item`,a=`&${e}-slide-up-enter${e}-slide-up-enter-active`,i=`&${e}-slide-up-appear${e}-slide-up-appear-active`,s=`&${e}-slide-up-leave${e}-slide-up-leave-active`,o=`${r}-dropdown-placement-`,u=`${n}-option-selected`;return[{[`${r}-dropdown`]:Ne(X({},is(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[`
|
||
${a}${o}bottomLeft,
|
||
${i}${o}bottomLeft
|
||
`]:{animationName:Ase},[`
|
||
${a}${o}topLeft,
|
||
${i}${o}topLeft,
|
||
${a}${o}topRight,
|
||
${i}${o}topRight
|
||
`]:{animationName:Ise},[`${s}${o}bottomLeft`]:{animationName:Nse},[`
|
||
${s}${o}topLeft,
|
||
${s}${o}topRight
|
||
`]:{animationName:Lse},"&-hidden":{display:"none"},[n]:Ne(X({},yle(t)),{cursor:"pointer",transition:`background-color ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":X({flex:"auto"},Sg),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${n}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Ne(X({},yle(t)),{color:t.colorTextDisabled})}),[`${u}:has(+ ${u})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${u}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},C6(t,"slide-up"),C6(t,"slide-down"),kse(t,"move-up"),kse(t,"move-down")]},"genSingleStyle"),Jat=Qat,eit=l(t=>{const{componentCls:e}=t;return{[`&${e}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${e}-placeholder`]:{display:"none"},[`${e}-content`]:{margin:0,padding:0,"&-value":{display:"none"}}}}},"genSelectInputCustomizeStyle"),tit=eit,vle=4,rit=l(t=>{const{componentCls:e,calc:r,iconCls:n,paddingXS:a,paddingXXS:i,INTERNAL_FIXED_ITEM_MARGIN:s,lineWidth:o,colorIcon:u,colorIconHover:h,inputPaddingHorizontalBase:d,antCls:f}=t,[p,g]=To(f,"select");return{"&-multiple":{[p("multi-item-background")]:t.multipleItemBg,[p("multi-item-border-color")]:"transparent",[p("multi-item-border-radius")]:t.borderRadiusSM,[p("multi-item-height")]:t.multipleItemHeight,[p("multi-padding-base")]:`calc((${g("height")} - ${g("multi-item-height")}) / 2)`,[p("multi-padding-vertical")]:`calc(${g("multi-padding-base")} - ${s} - ${o})`,[p("multi-item-padding-horizontal")]:`calc(${d} - ${g("multi-padding-vertical")} - ${o} * 2)`,paddingBlock:g("multi-padding-vertical"),paddingInlineStart:`calc(${g("multi-padding-base")} - ${o})`,[`${e}-prefix`]:{marginInlineStart:g("multi-item-padding-horizontal")},[`${e}-prefix + ${e}-content`]:{[`${e}-placeholder`]:{insetInlineStart:0},[`${e}-content-item${e}-content-item-suffix`]:{marginInlineStart:0}},[`${e}-placeholder`]:{position:"absolute",lineHeight:g("line-height"),insetInlineStart:g("multi-item-padding-horizontal"),width:`calc(100% - ${g("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${e}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:g("font-size")},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${vle}px)`},[`${e}-content-item-prefix + ${e}-content-item-suffix,
|
||
${e}-content-item-suffix:first-child`]:{marginInlineStart:g("multi-item-padding-horizontal")},[`${e}-selection-item`]:{lineHeight:`calc(${g("multi-item-height")} - ${o} * 2)`,border:`${o} solid ${g("multi-item-border-color")}`,display:"flex",marginBlock:s,marginInlineEnd:r(s).mul(2).equal(),background:g("multi-item-background"),borderRadius:g("multi-item-border-radius"),paddingInlineStart:a,paddingInlineEnd:i,transition:["height","line-height","padding"].map(m=>`${m} ${t.motionDurationSlow}`).join(","),"&-content":Ne(X({},Sg),{marginInlineEnd:i}),"&-remove":Ne(X({},sS()),{display:"inline-flex",alignItems:"center",color:u,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${n}`]:{verticalAlign:"-0.2em"},"&:hover":{color:h}})},[`${e}-input`]:{lineHeight:r(s).mul(2).add(g("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:vle,maxWidth:"100%",transition:`line-height ${t.motionDurationSlow}`}},[`&${e}-sm`]:{[p("multi-item-height")]:t.multipleItemHeightSM,[p("multi-item-border-radius")]:t.borderRadiusXS},[`&${e}-lg`]:{[p("multi-item-height")]:t.multipleItemHeightLG,[p("multi-item-border-radius")]:t.borderRadius},[`&${e}-filled`]:{[p("multi-item-border-color")]:t.colorSplit,[p("multi-item-background")]:t.colorBgContainer,[`&${e}-disabled`]:{[p("multi-item-border-color")]:"transparent"}}}}},"genSelectInputMultipleStyle"),nit=rit,kD=l((t,e)=>{const{componentCls:r,antCls:n}=t,[a]=To(n,"select"),{border:i,borderHover:s,borderActive:o,borderOutline:u}=e,h=e.background||t.selectorBg||t.colorBgContainer;return{[a("border-color")]:i,[a("background-color")]:h,[a("color")]:e.color||t.colorText,[`&:not(${r}-disabled)`]:{"&:hover":{[a("border-color")]:s,[a("background-color")]:e.backgroundHover||h},[`&${r}-focused`]:{[a("border-color")]:o,[a("background-color")]:e.backgroundActive||h,boxShadow:`0 0 0 ${Rt(t.controlOutlineWidth)} ${u}`}},[`&${r}-disabled`]:{[a("border-color")]:e.borderDisabled||e.border,[a("background-color")]:e.backgroundDisabled||e.background}}},"genSelectInputVariableStyle"),z6=l((t,e,r,n={},a={},i)=>{const{componentCls:s}=t;return{[`&${s}-${e}`]:[kD(t,r),{[`&${s}-status-error`]:kD(t,X(Ne(X({},r),{color:n.color||t.colorError}),n)),[`&${s}-status-warning`]:kD(t,X(Ne(X({},r),{color:a.color||t.colorWarning}),a))},i]}},"genSelectInputVariantStyle"),ait=l(t=>{const{componentCls:e,fontHeight:r,controlHeight:n,iconCls:a,antCls:i,calc:s}=t,[o,u]=To(i,"select");return{[e]:[Ne(X({[o("border-radius")]:t.borderRadius,[o("border-color")]:"#000",[o("border-size")]:t.lineWidth,[o("background-color")]:t.colorBgContainer,[o("font-size")]:t.fontSize,[o("line-height")]:t.lineHeight,[o("font-height")]:r,[o("color")]:t.colorText,[o("height")]:n,[o("padding-horizontal")]:s(t.paddingSM).sub(t.lineWidth).equal(),[o("padding-vertical")]:`calc((${u("height")} - ${u("font-height")}) / 2 - ${u("border-size")})`},is(t,!0)),{display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${t.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:u("border-radius"),borderWidth:u("border-size"),borderStyle:t.lineType,borderColor:u("border-color"),background:u("background-color"),fontSize:u("font-size"),lineHeight:u("line-height"),color:u("color"),paddingInline:u("padding-horizontal"),paddingBlock:u("padding-vertical"),[`${e}-prefix`]:{flex:"none",lineHeight:1},[`${e}-placeholder`]:Ne(X({},Sg),{color:t.colorTextPlaceholder,pointerEvents:"none",zIndex:1}),[`${e}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:s(t.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`${e}-suffix`]:{flex:"none",color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:t.marginXS}},[`${e}-prefix, ${e}-suffix`]:{alignSelf:"center",[a]:{verticalAlign:"top"}},"&-disabled":{background:t.colorBgContainerDisabled,color:t.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[o("height")]:t.controlHeightSM,[o("padding-horizontal")]:s(t.paddingXS).sub(t.lineWidth).equal(),[o("border-radius")]:t.borderRadiusSM,[`${e}-clear`]:{insetInlineEnd:u("padding-horizontal")}},"&-lg":{[o("height")]:t.controlHeightLG,[o("font-size")]:t.fontSizeLG,[o("line-height")]:t.lineHeightLG,[o("font-height")]:t.fontHeightLG,[o("border-radius")]:t.borderRadiusLG}}),{[`&:not(${e}-customize)`]:{[`${e}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:u("color"),"&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${e}-customize)`]:{[`${e}-input`]:{position:"absolute",insetInline:0,insetBlock:`calc(${u("padding-vertical")} * -1)`,lineHeight:`calc(${u("font-height")} + ${u("padding-vertical")} * 2)`},[`${e}-content`]:Ne(X({},Sg),{alignSelf:"center","&-has-value":{display:"block","&:before":{display:"none"}},"&-has-search-value":{color:"transparent"},"&-value":{transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,zIndex:1}}),[`&${e}-open ${e}-content`]:{color:t.colorTextPlaceholder}}},{[`&-show-search:not(${e}-customize-input):not(${e}-disabled)`]:{cursor:"text"}},nit(t),z6(t,"outlined",{border:t.colorBorder,borderHover:t.hoverBorderColor,borderActive:t.activeBorderColor,borderOutline:t.activeOutlineColor,borderDisabled:t.colorBorderDisabled},{border:t.colorError,borderHover:t.colorErrorHover,borderActive:t.colorError,borderOutline:t.colorErrorOutline},{border:t.colorWarning,borderHover:t.colorWarningHover,borderActive:t.colorWarning,borderOutline:t.colorWarningOutline}),z6(t,"filled",{border:"transparent",borderHover:"transparent",borderActive:t.activeBorderColor,borderOutline:"transparent",borderDisabled:t.colorBorderDisabled,background:t.colorFillTertiary,backgroundHover:t.colorFillSecondary,backgroundActive:t.colorBgContainer},{background:t.colorErrorBg,backgroundHover:t.colorErrorBgHover,borderActive:t.colorError},{background:t.colorWarningBg,backgroundHover:t.colorWarningBgHover,borderActive:t.colorWarning}),z6(t,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),z6(t,"underlined",{border:t.colorBorder,borderHover:t.hoverBorderColor,borderActive:t.activeBorderColor,borderOutline:"transparent"},{border:t.colorError,borderHover:t.colorErrorHover,borderActive:t.colorError},{border:t.colorWarning,borderHover:t.colorWarningHover,borderActive:t.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}),tit(t)]}},"genSelectInputStyle"),iit=ait,sit=l(t=>{const{fontSize:e,lineHeight:r,lineWidth:n,controlHeight:a,controlHeightSM:i,controlHeightLG:s,paddingXXS:o,controlPaddingHorizontal:u,zIndexPopupBase:h,colorText:d,fontWeightStrong:f,controlItemBgActive:p,controlItemBgHover:g,colorBgContainer:m,colorFillSecondary:y,colorBgContainerDisabled:v,colorTextDisabled:b,colorPrimaryHover:w,colorPrimary:x,controlOutline:T}=t,C=o*2,S=n*2,E=Math.min(a-C,a-S),k=Math.min(i-C,i-S),A=Math.min(s-C,s-S);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(o/2),zIndexPopup:h+50,optionSelectedColor:d,optionSelectedFontWeight:f,optionSelectedBg:p,optionActiveBg:g,optionPadding:`${(a-e*r)/2}px ${u}px`,optionFontSize:e,optionLineHeight:r,optionHeight:a,selectorBg:m,clearBg:m,singleItemHeightLG:s,multipleItemBg:y,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:k,multipleItemHeightLG:A,multipleSelectorBgDisabled:v,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:w,activeBorderColor:x,activeOutlineColor:T,selectAffixPadding:o}},"prepareComponentToken8"),oit=l(t=>{const{antCls:e,componentCls:r,motionDurationMid:n,inputPaddingHorizontalBase:a}=t,i={[`${r}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}};return{[r]:Ne(X({},is(t)),{[`${r}-selection-item`]:Ne(X({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Sg),{[`> ${e}-typography`]:{display:"inline"}}),[`${r}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:a,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:["color","opacity"].map(s=>`${s} ${n} ease`).join(", "),textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:t.colorIcon}},"@media(hover:none)":i,"&:hover":i}),[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:t.calc(a).add(t.fontSize).add(t.paddingXS).equal()}}}}}},"genBaseStyle4"),lit=l(t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},oit(t),Jat(t),{[`${e}-rtl`]:{direction:"rtl"}},kx(t,{focusElCls:`${e}-focused`})]},"genSelectStyle"),cit=ea("Select",(t,{rootPrefixCls:e})=>{const r=Wn(t,{rootPrefixCls:e,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(t.lineWidth).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[lit(r),iit(r)]},sit,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}}),uit={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},hit=uit;function AD(){return AD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},AD.apply(this,arguments)}l(AD,"_extends32");var dit=l((t,e)=>G.createElement(Vn,AD({},t,{ref:e,icon:hit})),"CheckOutlined2"),ble=G.forwardRef(dit);ble.displayName="CheckOutlined";var xle=ble,fit={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},pit=fit;function ND(){return ND=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ND.apply(this,arguments)}l(ND,"_extends33");var git=l((t,e)=>G.createElement(Vn,ND({},t,{ref:e,icon:pit})),"DownOutlined2"),wle=G.forwardRef(git);wle.displayName="DownOutlined";var ID=wle,mit={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},yit=mit;function LD(){return LD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},LD.apply(this,arguments)}l(LD,"_extends34");var vit=l((t,e)=>G.createElement(Vn,LD({},t,{ref:e,icon:yit})),"SearchOutlined2"),Tle=G.forwardRef(vit);Tle.displayName="SearchOutlined";var Ele=Tle;function bit({suffixIcon:t,clearIcon:e,menuItemSelectedIcon:r,removeIcon:n,loading:a,loadingIcon:i,multiple:s,hasFeedback:o,showSuffixIcon:u,feedbackIcon:h,showArrow:d,componentName:f}){Tn(f).deprecated(!e,"clearIcon","allowClear={{ clearIcon: React.ReactNode }}");const p=e!=null?e:G.createElement(cS,null),g=l(b=>t===null&&!o&&!d?null:G.createElement(G.Fragment,null,u!==!1&&b,o&&h),"getSuffixIconNode");let m=null;t!==void 0?m=g(t):a?m=g(i!=null?i:G.createElement(Sx,{spin:!0})):m=l(({open:b,showSearch:w})=>g(b&&w?G.createElement(Ele,null):G.createElement(ID,null)),"mergedSuffixIcon");let y=null;r!==void 0?y=r:s?y=G.createElement(xle,null):y=null;let v=null;return n!==void 0?v=n:v=G.createElement(T0,null),{clearIcon:p,suffixIcon:m,itemIcon:y,removeIcon:v}}l(bit,"useIcons");function xit(t){return N.useMemo(()=>{if(t)return(...e)=>N.createElement(Ig,{space:!0},t.apply(void 0,e))},[t])}l(xit,"usePopupRender");var wit=xit;function Tit(t,e){return e!==void 0?e:t!==null}l(Tit,"useShowArrow");var Cle="SECRET_COMBOBOX_MODE_DO_NOT_USE",Sle=l((t,e)=>{var we,gt,ge,ie,be,$e,le;const Ue=t,{prefixCls:r,bordered:n,className:a,rootClassName:i,getPopupContainer:s,popupClassName:o,dropdownClassName:u,listHeight:h=256,placement:d,listItemHeight:f,size:p,disabled:g,notFoundContent:m,status:y,builtinPlacements:v,dropdownMatchSelectWidth:b,popupMatchSelectWidth:w,direction:x,style:T,allowClear:C,variant:S,popupStyle:E,dropdownStyle:k,transitionName:A,tagRender:I,maxCount:L,prefix:R,dropdownRender:O,popupRender:M,onDropdownVisibleChange:P,onOpenChange:z,styles:D,classNames:B}=Ue,W=Xt(Ue,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","popupStyle","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:U,getPrefixCls:j,renderEmpty:V,direction:Y,virtual:H,popupMatchSelectWidth:q,popupOverflow:Z}=G.useContext(vn),{showSearch:K,style:re,styles:Q,className:te,classNames:ee}=Aa("select"),[,J]=Il(),ae=f!=null?f:J==null?void 0:J.controlHeight,se=j("select",r),fe=j(),ve=x!=null?x:Y,{compactSize:de,compactItemClassnames:Ee}=A0(se,ve),[Ce,De]=B6("select",S,n),ce=Cu(se),[Ie,ye]=cit(se,ce),pe=G.useMemo(()=>{const{mode:ke}=t;if(ke!=="combobox")return ke===Cle?"combobox":ke},[t.mode]),Ae=pe==="multiple"||pe==="tags",Ve=Tit(t.suffixIcon,t.showArrow),ze=(we=w!=null?w:b)!=null?we:q,We=wit(M||O),me=z||P,{status:Se,hasFeedback:ne,isFormItemInput:xe,feedbackIcon:oe}=G.useContext(oc),_e=NS(Se,y);let ue;m!==void 0?ue=m:pe==="combobox"?ue=null:ue=(V==null?void 0:V("Select"))||G.createElement(Uat,{componentName:"Select"});const{suffixIcon:tt,itemIcon:Re,removeIcon:et,clearIcon:Xe}=bit(Ne(X({},W),{multiple:Ae,hasFeedback:ne,feedbackIcon:oe,showSuffixIcon:Ve,componentName:"Select"})),ot=C===!0?{clearIcon:Xe}:C,Ge=ws(W,["suffixIcon","itemIcon"]),ht=Ll(ke=>{var je;return(je=p!=null?p:de)!=null?je:ke}),Je=G.useContext(xh),St=g!=null?g:Je,He=Ne(X({},t),{variant:Ce,status:_e,disabled:St,size:ht}),[dt,Oe]=Qa([ee,B],[Q,D],{props:He},{popup:{_default:"root"}}),vt=pt((gt=dt.popup)==null?void 0:gt.root,o,u,{[`${se}-dropdown-${ve}`]:ve==="rtl"},i,ye,ce,Ie),qe=X(X({},(ge=Oe.popup)==null?void 0:ge.root),E!=null?E:k),Me=pt({[`${se}-lg`]:ht==="large",[`${se}-sm`]:ht==="small",[`${se}-rtl`]:ve==="rtl",[`${se}-${Ce}`]:De,[`${se}-in-form-item`]:xe},Mg(se,_e,ne),Ee,te,a,dt.root,i,ye,ce,Ie),lt=G.useMemo(()=>d!==void 0?d:ve==="rtl"?"bottomRight":"bottomLeft",[d,ve]);{const ke=Tn("Select");Object.entries({dropdownMatchSelectWidth:"popupMatchSelectWidth",dropdownStyle:"styles.popup.root",dropdownClassName:"classNames.popup.root",popupClassName:"classNames.popup.root",dropdownRender:"popupRender",onDropdownVisibleChange:"onOpenChange",bordered:"variant"}).forEach(([ut,Qe])=>{ke.deprecated(!(ut in t),ut,Qe)}),ke(!("showArrow"in t),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),ke(!(typeof L!="undefined"&&!Ae),"usage","`maxCount` only works with mode `multiple` or `tags`")}const[it]=dO("SelectLike",($e=(be=(ie=Oe.popup)==null?void 0:ie.root)==null?void 0:be.zIndex)!=null?$e:qe==null?void 0:qe.zIndex);return G.createElement(Hat,Ne(X({ref:e,virtual:H,classNames:dt,styles:Oe,showSearch:K},Ge),{style:X(X(X({},Oe.root),re),T),popupMatchSelectWidth:ze,transitionName:k0(fe,"slide-up",A),builtinPlacements:Zat(v,Z),listHeight:h,listItemHeight:ae,mode:pe,prefixCls:se,placement:lt,direction:ve,prefix:R,suffixIcon:tt,menuItemSelectedIcon:Re,removeIcon:et,allowClear:ot,notFoundContent:ue,className:Me,getPopupContainer:s||U,popupClassName:vt,disabled:St,popupStyle:Ne(X(X({},(le=Oe.popup)==null?void 0:le.root),qe),{zIndex:it}),maxCount:Ae?L:void 0,tagRender:Ae?I:void 0,popupRender:We,onPopupVisibleChange:me}))},"InternalSelect");Sle.displayName="Select";var Rg=G.forwardRef(Sle),Eit=Loe(Rg,"popupAlign");Rg.SECRET_COMBOBOX_MODE_DO_NOT_USE=Cle,Rg.Option=Zoe,Rg.OptGroup=Koe,Rg._InternalPanelDoNotUseOrYouWillBeFired=Eit,Rg.displayName="Select";var _le=Rg,H6=l(t=>t?typeof t=="function"?t():t:null,"getRenderPropValue"),Cit=l(t=>{const{children:e,prefixCls:r,id:n,classNames:a,styles:i,className:s,style:o}=t;return G.createElement("div",{id:n,className:pt(`${r}-container`,a==null?void 0:a.container,s),style:X(X({},i==null?void 0:i.container),o),role:"tooltip"},typeof e=="function"?e():e)},"Popup2"),$D=Cit,Ox={shiftX:64,adjustY:1},Dx={adjustX:1,shiftY:!0},Wc=[0,0],Sit={left:{points:["cr","cl"],overflow:Dx,offset:[-4,0],targetOffset:Wc},right:{points:["cl","cr"],overflow:Dx,offset:[4,0],targetOffset:Wc},top:{points:["bc","tc"],overflow:Ox,offset:[0,-4],targetOffset:Wc},bottom:{points:["tc","bc"],overflow:Ox,offset:[0,4],targetOffset:Wc},topLeft:{points:["bl","tl"],overflow:Ox,offset:[0,-4],targetOffset:Wc},leftTop:{points:["tr","tl"],overflow:Dx,offset:[-4,0],targetOffset:Wc},topRight:{points:["br","tr"],overflow:Ox,offset:[0,-4],targetOffset:Wc},rightTop:{points:["tl","tr"],overflow:Dx,offset:[4,0],targetOffset:Wc},bottomRight:{points:["tr","br"],overflow:Ox,offset:[0,4],targetOffset:Wc},rightBottom:{points:["bl","br"],overflow:Dx,offset:[4,0],targetOffset:Wc},bottomLeft:{points:["tl","bl"],overflow:Ox,offset:[0,4],targetOffset:Wc},leftBottom:{points:["br","bl"],overflow:Dx,offset:[-4,0],targetOffset:Wc}};function MD(){return MD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},MD.apply(this,arguments)}l(MD,"_extends35");var _it=G.forwardRef((t,e)=>{const L=t,{trigger:r=["hover"],mouseEnterDelay:n=0,mouseLeaveDelay:a=.1,prefixCls:i="rc-tooltip",children:s,onVisibleChange:o,afterVisibleChange:u,motion:h,placement:d="right",align:f={},destroyOnHidden:p=!1,defaultVisible:g,getTooltipContainer:m,arrowContent:y,overlay:v,id:b,showArrow:w=!0,classNames:x,styles:T}=L,C=Xt(L,["trigger","mouseEnterDelay","mouseLeaveDelay","prefixCls","children","onVisibleChange","afterVisibleChange","motion","placement","align","destroyOnHidden","defaultVisible","getTooltipContainer","arrowContent","overlay","id","showArrow","classNames","styles"]),S=S0(b),E=N.useRef(null);N.useImperativeHandle(e,()=>E.current);const k=X({},C);"visible"in t&&(k.popupVisible=t.visible);const A=G.useMemo(()=>{var O;if(!w)return!1;const R=w===!0?{}:w;return Ne(X({},R),{className:pt(R.className,x==null?void 0:x.arrow),style:X(X({},R.style),T==null?void 0:T.arrow),content:(O=R.content)!=null?O:y})},[w,x==null?void 0:x.arrow,T==null?void 0:T.arrow,y]),I=l(({open:R})=>{const O=G.Children.only(s),M={"aria-describedby":v&&R?S:void 0};return G.cloneElement(O,M)},"getChildren");return G.createElement(p6,MD({popupClassName:x==null?void 0:x.root,prefixCls:i,popup:G.createElement($D,{key:"content",prefixCls:i,id:S,classNames:x,styles:T},v),action:r,builtinPlacements:Sit,popupPlacement:d,ref:E,popupAlign:f,getPopupContainer:m,onOpenChange:o,afterOpenChange:u,popupMotion:h,defaultPopupVisible:g,autoDestroy:p,mouseLeaveDelay:a,popupStyle:T==null?void 0:T.root,mouseEnterDelay:n,arrow:A,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:T==null?void 0:T.uniqueContainer},k),I)}),kit=_it,Ait=kit;function kle(t){const{sizePopupArrow:e,borderRadiusXS:r,borderRadiusOuter:n}=t,a=e/2,i=0,s=a,o=n*1/Math.sqrt(2),u=a-n*(1-1/Math.sqrt(2)),h=a-r*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),f=2*a-h,p=d,g=2*a-o,m=u,y=2*a-i,v=s,b=a*Math.sqrt(2)+n*(Math.sqrt(2)-2),w=n*(Math.sqrt(2)-1),x=`polygon(${w}px 100%, 50% ${w}px, ${2*a-w}px 100%, ${w}px 100%)`,T=`path('M ${i} ${s} A ${n} ${n} 0 0 0 ${o} ${u} L ${h} ${d} A ${r} ${r} 0 0 1 ${f} ${p} L ${g} ${m} A ${n} ${n} 0 0 0 ${y} ${v} Z')`;return{arrowShadowWidth:b,arrowPath:T,arrowPolygon:x}}l(kle,"getArrowToken");var Nit=l((t,e,r)=>{const{sizePopupArrow:n,arrowPolygon:a,arrowPath:i,arrowShadowWidth:s,borderRadiusXS:o,calc:u}=t;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:u(n).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[a,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:s,height:s,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Rt(o)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},"genRoundedArrow"),Ale=8;function PD(t){const{contentRadius:e,limitVerticalRadius:r}=t,n=e>12?e+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?Ale:n}}l(PD,"getArrowOffsetToken");function W6(t,e){return t?e:{}}l(W6,"isInject");var Iit=l((t,e,r)=>{const{componentCls:n,boxShadowPopoverArrow:a,arrowOffsetVertical:i,arrowOffsetHorizontal:s,antCls:o}=t,[u]=To(o,"tooltip"),{arrowDistance:h=0,arrowPlacement:d={left:!0,right:!0,top:!0,bottom:!0}}=r||{};return{[n]:X(X(X(X({[`${n}-arrow`]:[Ne(X({position:"absolute",zIndex:1,display:"block"},Nit(t,e,a)),{"&:before":{background:e}})]},W6(!!d.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:h,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[u("arrow-offset-x")]:s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-topRight":{[u("arrow-offset-x")]:`calc(100% - ${Rt(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),W6(!!d.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:h,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[u("arrow-offset-x")]:s,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:s}}},"&-placement-bottomRight":{[u("arrow-offset-x")]:`calc(100% - ${Rt(s)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:s}}}})),W6(!!d.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:h},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:i},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:i}})),W6(!!d.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:h},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:i},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:i}}))}},"getArrowStyle"),Nle=Iit;function Lit(t,e,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const a=n&&typeof n=="object"?n:{},i={};switch(t){case"top":case"bottom":i.shiftX=e.arrowOffsetHorizontal*2+r,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=e.arrowOffsetVertical*2+r,i.shiftX=!0,i.adjustX=!0;break}const s=X(X({},i),a);return s.shiftX||(s.adjustX=!0),s.shiftY||(s.adjustY=!0),s}l(Lit,"getOverflowOptions");var Ile={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},$it={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},Mit=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function Pit(t){const{arrowWidth:e,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:a,borderRadius:i}=t,s=e/2,o={},u=PD({contentRadius:i,limitVerticalRadius:!0});return Object.keys(Ile).forEach(h=>{const d=n&&$it[h]||Ile[h],f=Ne(X({},d),{offset:[0,0],dynamicInset:!0});switch(o[h]=f,Mit.has(h)&&(f.autoArrow=!1),h){case"top":case"topLeft":case"topRight":f.offset[1]=-s-a;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+a;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-a;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+a;break}if(n)switch(h){case"topLeft":case"bottomLeft":f.offset[0]=-u.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=u.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-u.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=u.arrowOffsetHorizontal*2-s;break}f.overflow=Lit(h,u,e,r),f.htmlRegion="visibleFirst"}),o}l(Pit,"getPlacements");var Rit=l((t,e)=>{const r=l(n=>typeof n=="boolean"?{show:n}:n||{},"toConfig");return N.useMemo(()=>{var i,s;const n=r(t),a=r(e);return Ne(X(X({},a),n),{show:(s=(i=n.show)!=null?i:a.show)!=null?s:!0})},[t,e])},"useMergedArrow"),RD=Rit,Lle="50%",Oit=l(t=>{const{calc:e,componentCls:r,tooltipMaxWidth:n,tooltipColor:a,tooltipBg:i,tooltipBorderRadius:s,zIndexPopup:o,controlHeight:u,boxShadowSecondary:h,paddingSM:d,paddingXS:f,arrowOffsetHorizontal:p,sizePopupArrow:g,antCls:m}=t,[y,v]=To(m,"tooltip"),b=e(s).add(g).add(p).equal(),x={minWidth:e(s).mul(2).add(g).equal(),minHeight:u,padding:`${Rt(t.calc(d).div(2).equal())} ${Rt(f)}`,color:v("overlay-color",a),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:s,boxShadow:h,boxSizing:"border-box"},T={[y("valid-offset-x")]:v("arrow-offset-x","var(--arrow-x)"),transformOrigin:[v("valid-offset-x",Lle),`var(--arrow-y, ${Lle})`].join(" ")};return[{[r]:Ne(X(Ne(X(Ne(X({},is(t)),{position:"absolute",zIndex:o,display:"block",width:"max-content",maxWidth:n,visibility:"visible"}),T),{"&-hidden":{display:"none"},[y("arrow-background-color")]:i,[`${r}-container`]:[x,_se(t,!0)],[`&:has(~ ${r}-unique-container)`]:{[`${r}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:b},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:t.min(s,Ale)}},[`${r}-content`]:{position:"relative"}}),Aje(t,(C,{darkColor:S})=>({[`&${r}-${C}`]:{[`${r}-container`]:{backgroundColor:S},[`${r}-arrow`]:{[y("arrow-background-color")]:S}}}))),{"&-rtl":{direction:"rtl"}})},Nle(t,v("arrow-background-color")),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}},{[`${r}-unique-container`]:Ne(X(X({},x),T),{position:"absolute",zIndex:e(o).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${t.motionDurationSlow}`}})}]},"genTooltipStyle"),Dit=l(t=>X(X({zIndexPopup:t.zIndexPopupBase+70,maxWidth:250},PD({contentRadius:t.borderRadius,limitVerticalRadius:!0})),kle(Wn(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),"prepareComponentToken9"),$le=l((t,e,r=!0)=>ea("Tooltip",a=>{const{borderRadius:i,colorTextLightSolid:s,colorBgSpotlight:o,maxWidth:u}=a,h=Wn(a,{tooltipMaxWidth:u,tooltipColor:s,tooltipBorderRadius:i,tooltipBg:o});return[Oit(h),$O(a,"zoom-big-fast")]},Dit,{resetStyle:!1,injectStyle:r})(t,e),"style_default11"),Fit=yh.map(t=>`${t}-inverse`);function Bit(t,e=!0){return e?[].concat(Ea(Fit),Ea(yh)).includes(t):yh.includes(t)}l(Bit,"isPresetColor");var Mle=l((t,e,r)=>{const n=Bit(r),[a]=To(t,"tooltip"),i=pt({[`${e}-${r}`]:r&&n}),s={},o={},u=js(r).toRgb(),d=(.299*u.r+.587*u.g+.114*u.b)/255<.5?"#FFF":"#000";return r&&!n&&(s.background=r,s[a("overlay-color")]=d,o[a("arrow-background-color")]=r),{className:i,overlayStyle:s,arrowStyle:o}},"parseColor"),zit=l(t=>{const{prefixCls:e,className:r,placement:n="top",title:a,color:i,overlayInnerStyle:s,classNames:o,styles:u}=t,{getPrefixCls:h}=G.useContext(vn),d=h("tooltip",e),f=h(),p=Cu(d),[g,m]=$le(d,p),y=Mle(f,d,i),v=y.arrowStyle,b=G.useMemo(()=>({container:X(X({},s),y.overlayStyle)}),[s,y.overlayStyle]),w=Ne(X({},t),{placement:n}),[x,T]=Qa([o],[b,u],{props:w}),C=pt(p,g,m,d,`${d}-pure`,`${d}-placement-${n}`,r,y.className);return G.createElement("div",{className:C,style:v},G.createElement("div",{className:`${d}-arrow`}),G.createElement($D,Ne(X({},t),{className:g,prefixCls:d,classNames:x,styles:T}),a))},"PurePanel2"),Hit=zit,Wit=G.forwardRef((t,e)=>{var et;const Re=t,{prefixCls:r,openClassName:n,getTooltipContainer:a,color:i,children:s,afterOpenChange:o,arrow:u,destroyTooltipOnHide:h,destroyOnHidden:d,title:f,overlay:p,trigger:g,builtinPlacements:m,autoAdjustOverflow:y=!0,motion:v,getPopupContainer:b,placement:w="top",mouseEnterDelay:x=.1,mouseLeaveDelay:T=.1,rootClassName:C,styles:S,classNames:E,onOpenChange:k,overlayInnerStyle:A,overlayStyle:I,overlayClassName:L}=Re,R=Xt(Re,["prefixCls","openClassName","getTooltipContainer","color","children","afterOpenChange","arrow","destroyTooltipOnHide","destroyOnHidden","title","overlay","trigger","builtinPlacements","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","rootClassName","styles","classNames","onOpenChange","overlayInnerStyle","overlayStyle","overlayClassName"]),[,O]=Il(),{getPopupContainer:M,getPrefixCls:P,direction:z,className:D,style:B,classNames:W,styles:U,arrow:j,trigger:V}=Aa("tooltip"),Y=RD(u,j),H=Y.show,q=g||V||"hover",Z=Tn("Tooltip"),K=G.useRef(null),re=l(()=>{var Xe;(Xe=K.current)==null||Xe.forceAlign()},"forceAlign");G.useImperativeHandle(e,()=>{var Xe,ot;return{forceAlign:re,nativeElement:(Xe=K.current)==null?void 0:Xe.nativeElement,popupElement:(ot=K.current)==null?void 0:ot.popupElement}}),[["overlayStyle","styles.root"],["overlayInnerStyle","styles.container"],["overlayClassName","classNames.root"],["destroyTooltipOnHide","destroyOnHidden"]].forEach(([Xe,ot])=>{Z.deprecated(!(Xe in t),Xe,ot)}),Z(!h||typeof h=="boolean","usage","`destroyTooltipOnHide` no need config `keepParent` anymore. Please use `boolean` value directly.");const[Q,te]=Ta((et=t.defaultOpen)!=null?et:!1,t.open),ee=!f&&!p&&f!==0,J=l(Xe=>{te(ee?!1:Xe),!ee&&k&&k(Xe)},"onInternalOpenChange"),ae=G.useMemo(()=>{var Xe;return m||Pit({arrowPointAtCenter:(Xe=Y==null?void 0:Y.pointAtCenter)!=null?Xe:!1,autoAdjustOverflow:y,arrowWidth:H?O.sizePopupArrow:0,borderRadius:O.borderRadius,offset:O.marginXXS})},[Y,m,O,H,y]),se=G.useMemo(()=>f===0?f:p||f||"",[p,f]),fe=G.createElement(Ig,{space:!0,form:!0},typeof se=="function"?se():se),ve=Ne(X({},t),{trigger:q,color:i,placement:w,builtinPlacements:m,openClassName:n,arrow:u,autoAdjustOverflow:y,getPopupContainer:b,children:s,destroyTooltipOnHide:h,destroyOnHidden:d}),[de,Ee]=Qa([W,E],[U,S],{props:ve}),Ce=P("tooltip",r),De=P(),ce=t["data-popover-inject"];let Ie=Q;!("open"in t)&&ee&&(Ie=!1);const ye=G.isValidElement(s)&&!Fie(s)?s:G.createElement("span",null,s),pe=ye.props,Ae=!pe.className||typeof pe.className=="string"?pt(pe.className,n||`${Ce}-open`):pe.className,Ve=Cu(Ce),[ze,We]=$le(Ce,Ve,!ce),me=Mle(De,Ce,i),Se=me.arrowStyle,ne=pt(Ve,ze,We),xe=pt(L,{[`${Ce}-rtl`]:z==="rtl"},me.className,C,ne,D,de.root),[oe,_e]=dO("Tooltip",R.zIndex),ue=X(X(X({},Ee.container),A),me.overlayStyle),tt=G.createElement(Ait,Ne(X({unique:!0},R),{trigger:q,zIndex:oe,showArrow:H,placement:w,mouseEnterDelay:x,mouseLeaveDelay:T,prefixCls:Ce,classNames:{root:xe,container:de.container,arrow:de.arrow,uniqueContainer:pt(ne,de.container)},styles:{root:X(X(X(X({},Se),Ee.root),B),I),container:ue,uniqueContainer:ue,arrow:Ee.arrow},getTooltipContainer:b||a||M,ref:K,builtinPlacements:ae,overlay:fe,visible:Ie,onVisibleChange:J,afterVisibleChange:o,arrowContent:G.createElement("span",{className:`${Ce}-arrow-content`}),motion:{motionName:k0(De,"zoom-big-fast",typeof(v==null?void 0:v.motionName)=="string"?v==null?void 0:v.motionName:void 0),motionDeadline:1e3},destroyOnHidden:d!=null?d:!!h}),Ie?bh(ye,{className:Ae}):ye);return G.createElement(hO.Provider,{value:_e},tt)}),V6=Wit;V6.displayName="Tooltip",V6._InternalPanelDoNotUseOrYouWillBeFired=Hit,V6.UniqueProvider=Bie;var Ml=V6,Ple="50%",Vit=l(t=>{const{componentCls:e,popoverColor:r,titleMinWidth:n,fontWeightStrong:a,innerPadding:i,boxShadowSecondary:s,colorTextHeading:o,borderRadiusLG:u,zIndexPopup:h,titleMarginBottom:d,colorBgElevated:f,popoverBg:p,titleBorderBottom:g,innerContentPadding:m,titlePadding:y,antCls:v}=t,[b,w]=To(v,"tooltip");return[{[e]:Ne(X({},is(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:h,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",[b("valid-offset-x")]:w("arrow-offset-x","var(--arrow-x)"),transformOrigin:[w("valid-offset-x",Ple),`var(--arrow-y, ${Ple})`].join(" "),[b("arrow-background-color")]:f,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-container`]:{backgroundColor:p,backgroundClip:"padding-box",borderRadius:u,boxShadow:s,padding:i},[`${e}-title`]:{minWidth:n,marginBottom:d,color:o,fontWeight:a,borderBottom:g,padding:y},[`${e}-content`]:{color:r,padding:m}})},Nle(t,w("arrow-background-color")),{[`${e}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow,display:"inline-block"}}]},"genBaseStyle5"),Git=l(t=>{const{componentCls:e,antCls:r}=t,[n]=To(r,"tooltip");return{[e]:yh.map(a=>{const i=t[`${a}6`];return{[`&${e}-${a}`]:{[n("arrow-background-color")]:i,[`${e}-inner`]:{backgroundColor:i},[`${e}-arrow`]:{background:"transparent"}}}})}},"genColorStyle"),qit=l(t=>{const{lineWidth:e,controlHeight:r,fontHeight:n,padding:a,wireframe:i,zIndexPopupBase:s,borderRadiusLG:o,marginXS:u,lineType:h,colorSplit:d,paddingSM:f}=t,p=r-n,g=p/2,m=p/2-e,y=a;return Ne(X(X({titleMinWidth:177,zIndexPopup:s+30},kle(t)),PD({contentRadius:o,limitVerticalRadius:!0})),{innerPadding:i?0:12,titleMarginBottom:i?0:u,titlePadding:i?`${g}px ${y}px ${m}px`:0,titleBorderBottom:i?`${e}px ${h} ${d}`:"none",innerContentPadding:i?`${f}px ${y}px`:0})},"prepareComponentToken10"),Rle=ea("Popover",t=>{const{colorBgElevated:e,colorText:r}=t,n=Wn(t,{popoverBg:e,popoverColor:r});return[Vit(n),Git(n),$O(n,"zoom-big")]},qit,{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]}),Ole=l(t=>{const{title:e,content:r,prefixCls:n,classNames:a,styles:i}=t;return!e&&!r?null:G.createElement(G.Fragment,null,e&&G.createElement("div",{className:pt(`${n}-title`,a==null?void 0:a.title),style:i==null?void 0:i.title},e),r&&G.createElement("div",{className:pt(`${n}-content`,a==null?void 0:a.content),style:i==null?void 0:i.content},r))},"Overlay"),Yit=l(t=>{const{hashId:e,prefixCls:r,className:n,style:a,placement:i="top",title:s,content:o,children:u,classNames:h,styles:d}=t,f=H6(s),p=H6(o),g=Ne(X({},t),{placement:i}),[m,y]=Qa([h],[d],{props:g}),v=pt(e,r,`${r}-pure`,`${r}-placement-${i}`,n);return G.createElement("div",{className:v,style:a},G.createElement("div",{className:`${r}-arrow`}),G.createElement($D,Ne(X({},t),{className:e,prefixCls:r,classNames:m,styles:y}),u||G.createElement(Ole,{prefixCls:r,title:f,content:p,classNames:m,styles:y})))},"RawPurePanel"),Uit=l(t=>{const u=t,{prefixCls:e,className:r}=u,n=Xt(u,["prefixCls","className"]),{getPrefixCls:a}=G.useContext(vn),i=a("popover",e),[s,o]=Rle(i);return G.createElement(Yit,Ne(X({},n),{prefixCls:i,hashId:s,className:pt(r,o)}))},"PurePanel3"),jit=Uit,Kit=G.forwardRef((t,e)=>{var q;const H=t,{prefixCls:r,title:n,content:a,overlayClassName:i,placement:s="top",trigger:o,children:u,mouseEnterDelay:h=.1,mouseLeaveDelay:d=.1,onOpenChange:f,overlayStyle:p={},styles:g,classNames:m,motion:y,arrow:v}=H,b=Xt(H,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames","motion","arrow"]),{getPrefixCls:w,className:x,style:T,classNames:C,styles:S,arrow:E,trigger:k}=Aa("popover"),A=w("popover",r),[I,L]=Rle(A),R=w(),O=RD(v,E),M=o||k||"hover";Tn("Popover")(!f||f.length<=1,"usage","The second `onOpenChange` parameter is internal and unsupported. Please lock to a previous version if needed.");const P=Ne(X({},t),{placement:s,trigger:M,mouseEnterDelay:h,mouseLeaveDelay:d,overlayStyle:p,styles:g,classNames:m}),[z,D]=Qa([C,m],[S,g],{props:P}),B=pt(i,I,L,x,z.root),[W,U]=Ta((q=t.defaultOpen)!=null?q:!1,t.open),j=l(Z=>{U(Z),f==null||f(Z)},"settingOpen"),V=H6(n),Y=H6(a);return G.createElement(Ml,Ne(X({unique:!1,arrow:O,placement:s,trigger:M,mouseEnterDelay:h,mouseLeaveDelay:d},b),{prefixCls:A,classNames:{root:B,container:z.container,arrow:z.arrow},styles:{root:X(X(X({},D.root),T),p),container:D.container,arrow:D.arrow},ref:e,open:W,onOpenChange:j,overlay:V||Y?G.createElement(Ole,{prefixCls:A,title:V,content:Y,classNames:z,styles:D}):null,motion:{motionName:k0(R,"zoom-big",typeof(y==null?void 0:y.motionName)=="string"?y==null?void 0:y.motionName:void 0)},"data-popover-inject":!0}),u)}),OD=Kit;OD._InternalPanelDoNotUseOrYouWillBeFired=jit,OD.displayName="Popover";var Dle=OD,{ESC:Xit,TAB:Zit}=gr;function Qit({visible:t,triggerRef:e,onVisibleChange:r,autoFocus:n,overlayRef:a}){const i=G.useRef(!1),s=l(()=>{var h,d;t&&((d=(h=e.current)==null?void 0:h.focus)==null||d.call(h),r==null||r(!1))},"handleCloseMenuAndReturnFocus"),o=l(()=>{var h;return(h=a.current)!=null&&h.focus?(a.current.focus(),i.current=!0,!0):!1},"focusMenu"),u=l(h=>{switch(h.keyCode){case Xit:s();break;case Zit:{let d=!1;i.current||(d=o()),d?h.preventDefault():s();break}}},"handleKeyDown");G.useEffect(()=>t?(window.addEventListener("keydown",u),n&&pn(o,3),()=>{window.removeEventListener("keydown",u),i.current=!1}):()=>{i.current=!1},[t])}l(Qit,"useAccessibility");var Jit=N.forwardRef((t,e)=>{const{overlay:r,arrow:n,prefixCls:a}=t,i=N.useMemo(()=>{let o;return typeof r=="function"?o=r():o=r,o},[r]),s=xo(e,xg(i));return N.createElement(N.Fragment,null,n&&N.createElement("div",{className:`${a}-arrow`}),N.cloneElement(i,{ref:hx(i)?s:void 0}))}),est=Jit,Fx={adjustX:1,adjustY:1},Bx=[0,0],tst={topLeft:{points:["bl","tl"],overflow:Fx,offset:[0,-4],targetOffset:Bx},top:{points:["bc","tc"],overflow:Fx,offset:[0,-4],targetOffset:Bx},topRight:{points:["br","tr"],overflow:Fx,offset:[0,-4],targetOffset:Bx},bottomLeft:{points:["tl","bl"],overflow:Fx,offset:[0,4],targetOffset:Bx},bottom:{points:["tc","bc"],overflow:Fx,offset:[0,4],targetOffset:Bx},bottomRight:{points:["tr","br"],overflow:Fx,offset:[0,4],targetOffset:Bx}},rst=tst;function DD(){return DD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},DD.apply(this,arguments)}l(DD,"_extends36");var nst=N.forwardRef((t,e)=>{var j;const U=t,{arrow:r=!1,prefixCls:n="rc-dropdown",transitionName:a,animation:i,align:s,placement:o="bottomLeft",placements:u=rst,getPopupContainer:h,showAction:d,hideAction:f,overlayClassName:p,overlayStyle:g,visible:m,trigger:y=["hover"],autoFocus:v,overlay:b,children:w,onVisibleChange:x}=U,T=Xt(U,["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"]),[C,S]=N.useState(),E="visible"in t?m:C,k=i?`${n}-${i}`:a,A=N.useRef(null),I=N.useRef(null),L=N.useRef(null);N.useImperativeHandle(e,()=>A.current);const R=l(V=>{S(V),x==null||x(V)},"handleVisibleChange");Qit({visible:E,triggerRef:L,onVisibleChange:R,autoFocus:v,overlayRef:I});const O=l(V=>{const{onOverlayClick:Y}=t;S(!1),Y&&Y(V)},"onClick"),M=l(()=>N.createElement(est,{ref:I,overlay:b,prefixCls:n,arrow:r}),"getMenuElement"),P=l(()=>typeof b=="function"?M:M(),"getMenuElementOrLambda"),z=l(()=>{const{minOverlayWidthMatchTrigger:V,alignPoint:Y}=t;return"minOverlayWidthMatchTrigger"in t?V:!Y},"getMinOverlayWidthMatchTrigger"),D=l(()=>{const{openClassName:V}=t;return V!==void 0?V:`${n}-open`},"getOpenClassName"),B=N.cloneElement(w,{className:pt((j=w.props)==null?void 0:j.className,E&&D()),ref:hx(w)?xo(L,xg(w)):void 0});let W=f;return!W&&y.indexOf("contextMenu")!==-1&&(W=["click"]),N.createElement(p6,DD({builtinPlacements:u},T,{prefixCls:n,ref:A,popupClassName:pt(p,{[`${n}-show-arrow`]:r}),popupStyle:g,action:y,showAction:d,hideAction:W,popupPlacement:o,popupAlign:s,popupMotion:{motionName:k},popupVisible:E,stretch:z()?"minWidth":"",popup:P(),onOpenChange:R,onPopupClick:O,getPopupContainer:h}),B)}),ast=nst,ist=ast,Fle=G.createContext(null);function Ble(t,e){return`${t}-${e}`}l(Ble,"getMenuId");function zle(t){const e=G.useContext(Fle);return Ble(e,t)}l(zle,"useMenuId");var _u=G.createContext(null);function sst(t,e){const r=X({},t);return Object.keys(e).forEach(n=>{const a=e[n];a!==void 0&&(r[n]=a)}),r}l(sst,"mergeProps2");function IS(n){var a=n,{children:t,locked:e}=a,r=Xt(a,["children","locked"]);const i=G.useContext(_u),s=ux(()=>sst(i,r),[i,r],(o,u)=>!e&&(o[0]!==u[0]||!v0(o[1],u[1],!0)));return G.createElement(_u.Provider,{value:s},t)}l(IS,"InheritableContextProvider");var ost=[],Hle=G.createContext(null);function G6(){return G.useContext(Hle)}l(G6,"useMeasure");var Wle=G.createContext(ost);function LS(t){const e=G.useContext(Wle);return G.useMemo(()=>t!==void 0?[...e,t]:e,[e,t])}l(LS,"useFullPath");var Vle=G.createContext(null),lst=G.createContext({}),FD=lst,{LEFT:BD,RIGHT:zD,UP:HD,DOWN:q6,ENTER:Y6,ESC:Gle,HOME:$S,END:MS}=gr,qle=[HD,q6,BD,zD];function cst(t,e,r,n){var g;const a="prev",i="next",s="children",o="parent";if(t==="inline"&&n===Y6)return{inlineTrigger:!0};const u={[HD]:a,[q6]:i},h={[BD]:r?i:a,[zD]:r?a:i,[q6]:s,[Y6]:s},d={[HD]:a,[q6]:i,[Y6]:s,[Gle]:o,[BD]:r?s:o,[zD]:r?o:s};switch((g={inline:u,horizontal:h,vertical:d,inlineSub:u,horizontalSub:d,verticalSub:d}[`${t}${e?"":"Sub"}`])==null?void 0:g[n]){case a:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case o:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}l(cst,"getOffset");function ust(t){let e=t;for(;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}l(ust,"findContainerUL");function hst(t,e){let r=t||document.activeElement;for(;r;){if(e.has(r))return r;r=r.parentElement}return null}l(hst,"getFocusElement");function WD(t,e){return OO(t,!0).filter(n=>e.has(n))}l(WD,"getFocusableElements");function Yle(t,e,r,n=1){if(!t)return null;const a=WD(t,e),i=a.length;let s=a.findIndex(o=>r===o);return n<0?s===-1?s=i-1:s-=1:n>0&&(s+=1),s=(s+i)%i,a[s]}l(Yle,"getNextFocusElement");var U6=l((t,e)=>{const r=new Set,n=new Map,a=new Map;return t.forEach(i=>{const s=document.querySelector(`[data-menu-id='${Ble(e,i)}']`);s&&(r.add(s),a.set(s,i),n.set(i,s))}),{elements:r,key2element:n,element2key:a}},"refreshElements");function dst(t,e,r,n,a,i,s,o,u,h){const d=G.useRef(),f=G.useRef();f.current=e;const p=l(()=>{pn.cancel(d.current)},"cleanRaf");return G.useEffect(()=>()=>{p()},[]),g=>{const{which:m}=g;if([...qle,Y6,Gle,$S,MS].includes(m)){const y=i();let v=U6(y,n);const{elements:b,key2element:w,element2key:x}=v,T=w.get(e),C=hst(T,b),S=x.get(C),E=cst(t,s(S,!0).length===1,r,m);if(!E&&m!==$S&&m!==MS)return;(qle.includes(m)||[$S,MS].includes(m))&&g.preventDefault();const k=l(A=>{if(A){let I=A;const L=A.querySelector("a");L!=null&&L.getAttribute("href")&&(I=L);const R=x.get(A);o(R),p(),d.current=pn(()=>{f.current===R&&I.focus()})}},"tryFocus");if([$S,MS].includes(m)||E.sibling||!C){let A;!C||t==="inline"?A=a.current:A=ust(C);let I;const L=WD(A,b);m===$S?I=L[0]:m===MS?I=L[L.length-1]:I=Yle(A,b,C,E.offset),k(I)}else if(E.inlineTrigger)u(S);else if(E.offset>0)u(S,!0),p(),d.current=pn(()=>{v=U6(y,n);const A=C.getAttribute("aria-controls"),I=document.getElementById(A),L=Yle(I,v.elements);k(L)},5);else if(E.offset<0){const A=s(S,!0),I=A[A.length-2],L=w.get(I);u(I,!1),k(L)}}h==null||h(g)}}l(dst,"useAccessibility2");function fst(t){Promise.resolve().then(t)}l(fst,"nextSlice");var VD="__RC_UTIL_PATH_SPLIT__",Ule=l(t=>t.join(VD),"getPathStr"),pst=l(t=>t.split(VD),"getPathKeys"),GD="rc-menu-more";function gst(){const[,t]=G.useState({}),e=N.useRef(new Map),r=N.useRef(new Map),[n,a]=G.useState([]),i=N.useRef(0),s=N.useRef(!1),o=l(()=>{s.current||t({})},"forceUpdate"),u=N.useCallback((y,v)=>{an(!e.current.has(y),`Duplicated key '${y}' used in Menu by path [${v.join(" > ")}]`);const b=Ule(v);r.current.set(b,y),e.current.set(y,b),i.current+=1;const w=i.current;fst(()=>{w===i.current&&o()})},[]),h=N.useCallback((y,v)=>{const b=Ule(v);r.current.delete(b),e.current.delete(y)},[]),d=N.useCallback(y=>{a(y)},[]),f=N.useCallback((y,v)=>{const b=e.current.get(y)||"",w=pst(b);return v&&n.includes(w[0])&&w.unshift(GD),w},[n]),p=N.useCallback((y,v)=>y.filter(b=>b!==void 0).some(b=>f(b,!0).includes(v)),[f]),g=l(()=>{const y=[...e.current.keys()];return n.length&&y.push(GD),y},"getKeys"),m=N.useCallback(y=>{const v=`${e.current.get(y)}${VD}`,b=new Set;return[...r.current.keys()].forEach(w=>{w.startsWith(v)&&b.add(r.current.get(w))}),b},[]);return G.useEffect(()=>()=>{s.current=!0},[]),{registerPath:u,unregisterPath:h,refreshOverflowKeys:d,isSubPathKey:p,getKeyPath:f,getKeys:g,getSubPathKeys:m}}l(gst,"useKeyRecords");function PS(t){const e=G.useRef(t);e.current=t;const r=G.useCallback((...n)=>{var a;return(a=e.current)==null?void 0:a.call(e,...n)},[]);return t?r:void 0}l(PS,"useMemoCallback");function jle(t,e,r,n){const{activeKey:a,onActive:i,onInactive:s}=G.useContext(_u),o={active:a===t};return e||(o.onMouseEnter=u=>{r==null||r({key:t,domEvent:u}),i(t)},o.onMouseLeave=u=>{n==null||n({key:t,domEvent:u}),s(t)}),o}l(jle,"useActive");function Kle(t){const{mode:e,rtl:r,inlineIndent:n}=G.useContext(_u);if(e!=="inline")return null;const a=t;return r?{paddingRight:a*n}:{paddingLeft:a*n}}l(Kle,"useDirectionStyle");function Xle({icon:t,props:e,children:r}){let n;return t===null||t===!1?null:(typeof t=="function"?n=G.createElement(t,X({},e)):typeof t!="boolean"&&(n=t),n||r||null)}l(Xle,"Icon2");function j6(r){var n=r,{item:t}=n,e=Xt(n,["item"]);return Object.defineProperty(e,"item",{get:l(()=>(an(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t),"get")}),e}l(j6,"warnItemProp");function RS(){return RS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},RS.apply(this,arguments)}l(RS,"_extends37");var mst=(AC=class extends G.Component{render(){const s=this.props,{title:e,attribute:r,elementRef:n}=s,a=Xt(s,["title","attribute","elementRef"]),i=ws(a,["eventKey","popupClassName","popupOffset","onTitleClick"]);return an(!r,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),G.createElement(Rx.Item,RS({},r,{title:typeof e=="string"?e:void 0},i,{ref:n}))}},l(AC,"LegacyMenuItem"),AC),yst=G.forwardRef((t,e)=>{const Z=t,{style:r,className:n,eventKey:a,warnKey:i,disabled:s,itemIcon:o,children:u,role:h,onMouseEnter:d,onMouseLeave:f,onClick:p,onKeyDown:g,onFocus:m}=Z,y=Xt(Z,["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"]),v=zle(a),{prefixCls:b,onItemClick:w,disabled:x,overflowDisabled:T,itemIcon:C,selectedKeys:S,onActive:E}=G.useContext(_u),{_internalRenderMenuItem:k}=G.useContext(FD),A=`${b}-item`,I=G.useRef(),L=G.useRef(),R=x||s,O=bg(e,L),M=LS(a);i&&an(!1,"MenuItem should not leave undefined `key`.");const P=l(re=>({key:a,keyPath:[...M].reverse(),item:I.current,domEvent:re}),"getEventInfo"),z=o||C,K=jle(a,R,d,f),{active:D}=K,B=Xt(K,["active"]),W=S.includes(a),U=Kle(M.length),j=l(re=>{if(R)return;const Q=P(re);p==null||p(j6(Q)),w(Q)},"onInternalClick"),V=l(re=>{if(g==null||g(re),re.which===gr.ENTER){const Q=P(re);p==null||p(j6(Q)),w(Q)}},"onInternalKeyDown"),Y=l(re=>{E(a),m==null||m(re)},"onInternalFocus"),H={};t.role==="option"&&(H["aria-selected"]=W);let q=G.createElement(mst,RS({ref:I,elementRef:O,role:h===null?"none":h||"menuitem",tabIndex:s?null:-1,"data-menu-id":T&&v?null:v},ws(y,["extra"]),B,H,{component:"li","aria-disabled":s,style:X(X({},U),r),className:pt(A,{[`${A}-active`]:D,[`${A}-selected`]:W,[`${A}-disabled`]:R},n),onClick:j,onKeyDown:V,onFocus:Y}),u,G.createElement(Xle,{props:Ne(X({},t),{isSelected:W}),icon:z}));return k&&(q=k(q,t,{selected:W})),q});function vst(t,e){const{eventKey:r}=t,n=G6(),a=LS(r);return G.useEffect(()=>{if(n)return n.registerPath(r,a),()=>{n.unregisterPath(r,a)}},[a]),n?null:G.createElement(yst,RS({},t,{ref:e}))}l(vst,"MenuItem");var K6=G.forwardRef(vst);function qD(){return qD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qD.apply(this,arguments)}l(qD,"_extends38");var bst=l((a,n)=>{var i=a,{className:t,children:e}=i,r=Xt(i,["className","children"]);const{prefixCls:s,mode:o,rtl:u}=G.useContext(_u);return G.createElement("ul",qD({className:pt(s,u&&`${s}-rtl`,`${s}-sub`,`${s}-${o==="inline"?"inline":"vertical"}`,t),role:"menu"},r,{"data-menu-list":!0,ref:n}),e)},"InternalSubMenuList"),Zle=G.forwardRef(bst);Zle.displayName="SubMenuList";var Qle=Zle;function YD(t,e){return wo(t).map((r,n)=>{var a,i;if(G.isValidElement(r)){const{key:s}=r;let o=(i=(a=r.props)==null?void 0:a.eventKey)!=null?i:s;const u=o==null;u&&(o=`tmp_key-${[...e,n].join("-")}`);const h={key:o,eventKey:o};return u&&(h.warnKey=!0),G.cloneElement(r,h)}return r})}l(YD,"parseChildren");var Eo={adjustX:1,adjustY:1},xst={topLeft:{points:["bl","tl"],overflow:Eo},topRight:{points:["br","tr"],overflow:Eo},bottomLeft:{points:["tl","bl"],overflow:Eo},bottomRight:{points:["tr","br"],overflow:Eo},leftTop:{points:["tr","tl"],overflow:Eo},leftBottom:{points:["br","bl"],overflow:Eo},rightTop:{points:["tl","tr"],overflow:Eo},rightBottom:{points:["bl","br"],overflow:Eo}},wst={topLeft:{points:["bl","tl"],overflow:Eo},topRight:{points:["br","tr"],overflow:Eo},bottomLeft:{points:["tl","bl"],overflow:Eo},bottomRight:{points:["tr","br"],overflow:Eo},rightTop:{points:["tr","tl"],overflow:Eo},rightBottom:{points:["br","bl"],overflow:Eo},leftTop:{points:["tl","tr"],overflow:Eo},leftBottom:{points:["bl","br"],overflow:Eo}};function Jle(t,e,r){if(e)return e;if(r)return r[t]||r.other}l(Jle,"getMotion3");var Tst={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Est({prefixCls:t,visible:e,children:r,popup:n,popupStyle:a,popupClassName:i,popupOffset:s,disabled:o,mode:u,onVisibleChange:h}){const{getPopupContainer:d,rtl:f,subMenuOpenDelay:p,subMenuCloseDelay:g,builtinPlacements:m,triggerSubMenuAction:y,forceSubMenuRender:v,rootClassName:b,motion:w,defaultMotions:x}=G.useContext(_u),[T,C]=G.useState(!1),S=X(f?X({},wst):X({},xst),m),E=Tst[u],k=Jle(u,w,x),A=G.useRef(k);u!=="inline"&&(A.current=k);const I=Ne(X({},A.current),{leavedClassName:`${t}-hidden`,removeOnLeave:!1,motionAppear:!0}),L=G.useRef();return G.useEffect(()=>(L.current=pn(()=>{C(e)}),()=>{pn.cancel(L.current)}),[e]),G.createElement(p6,{prefixCls:t,popupClassName:pt(`${t}-popup`,{[`${t}-rtl`]:f},i,b),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:d,builtinPlacements:S,popupPlacement:E,popupVisible:T,popup:n,popupStyle:a,popupAlign:s&&{offset:s},action:o?[]:[y],mouseEnterDelay:p,mouseLeaveDelay:g,onPopupVisibleChange:h,forceRender:v,popupMotion:I,fresh:!0},r)}l(Est,"PopupTrigger");function UD(){return UD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},UD.apply(this,arguments)}l(UD,"_extends39");function Cst({id:t,open:e,keyPath:r,children:n}){const a="inline",{prefixCls:i,forceSubMenuRender:s,motion:o,defaultMotions:u,mode:h}=G.useContext(_u),d=G.useRef(!1);d.current=h===a;const[f,p]=G.useState(!d.current),g=d.current?e:!1;G.useEffect(()=>{d.current&&p(!1)},[h]);const m=X({},Jle(a,o,u));r.length>1&&(m.motionAppear=!1);const y=m.onVisibleChanged;return m.onVisibleChanged=v=>(!d.current&&!v&&p(!0),y==null?void 0:y(v)),f?null:G.createElement(IS,{mode:a,locked:!d.current},G.createElement(zc,UD({visible:g},m,{forceRender:s,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:v,style:b})=>G.createElement(Qle,{id:t,className:v,style:b},n)))}l(Cst,"InlineSubMenuList");function OS(){return OS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},OS.apply(this,arguments)}l(OS,"_extends40");var Sst=G.forwardRef((t,e)=>{const ue=t,{style:r,className:n,styles:a,classNames:i,title:s,eventKey:o,warnKey:u,disabled:h,internalPopupClose:d,children:f,itemIcon:p,expandIcon:g,popupClassName:m,popupOffset:y,popupStyle:v,onClick:b,onMouseEnter:w,onMouseLeave:x,onTitleClick:T,onTitleMouseEnter:C,onTitleMouseLeave:S,popupRender:E}=ue,k=Xt(ue,["style","className","styles","classNames","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave","popupRender"]),A=zle(o),{prefixCls:I,mode:L,openKeys:R,disabled:O,overflowDisabled:M,activeKey:P,selectedKeys:z,itemIcon:D,expandIcon:B,onItemClick:W,onOpenChange:U,onActive:j,popupRender:V}=G.useContext(_u),{_internalRenderSubMenuItem:Y}=G.useContext(FD),{isSubPathKey:H}=G.useContext(Vle),q=LS(),Z=`${I}-submenu`,K=O||h,re=G.useRef(),Q=G.useRef();u&&an(!1,"SubMenu should not leave undefined `key`.");const te=p!=null?p:D,ee=g!=null?g:B,J=R.includes(o),ae=!M&&J,se=H(z,o),tt=jle(o,K,C,S),{active:fe}=tt,ve=Xt(tt,["active"]),[de,Ee]=G.useState(!1),Ce=l(Re=>{K||Ee(Re)},"triggerChildrenActive"),De=l(Re=>{Ce(!0),w==null||w({key:o,domEvent:Re})},"onInternalMouseEnter"),ce=l(Re=>{Ce(!1),x==null||x({key:o,domEvent:Re})},"onInternalMouseLeave"),Ie=G.useMemo(()=>fe||(L!=="inline"?de||H([P],o):!1),[L,fe,P,de,o,H]),ye=Kle(q.length),pe=l(Re=>{K||(T==null||T({key:o,domEvent:Re}),L==="inline"&&U(o,!J))},"onInternalTitleClick"),Ae=PS(Re=>{b==null||b(j6(Re)),W(Re)}),Ve=l(Re=>{L!=="inline"&&U(o,Re)},"onPopupVisibleChange"),ze=l(()=>{j(o)},"onInternalFocus"),We=A&&`${A}-popup`,me=G.useMemo(()=>G.createElement(Xle,{icon:L!=="horizontal"?ee:void 0,props:Ne(X({},t),{isOpen:ae,isSubMenu:!0})},G.createElement("i",{className:`${Z}-arrow`})),[L,ee,t,ae,Z]);let Se=G.createElement("div",OS({role:"menuitem",style:ye,className:`${Z}-title`,tabIndex:K?null:-1,ref:re,title:typeof s=="string"?s:null,"data-menu-id":M&&A?null:A,"aria-expanded":ae,"aria-haspopup":!0,"aria-controls":We,"aria-disabled":K,onClick:pe,onFocus:ze},ve),s,me);const ne=G.useRef(L);L!=="inline"&&q.length>1?ne.current="vertical":ne.current=L;const xe=ne.current,oe=G.useMemo(()=>{const Re=G.createElement(IS,{classNames:i,styles:a,mode:xe==="horizontal"?"vertical":xe},G.createElement(Qle,{id:We,ref:Q},f)),et=E||V;return et?et(Re,{item:t,keys:q}):Re},[E,V,q,We,f,t,xe]);if(!M){const Re=ne.current;Se=G.createElement(Est,{mode:Re,prefixCls:Z,visible:!d&&ae&&L!=="inline",popupClassName:m,popupOffset:y,popupStyle:v,popup:oe,disabled:K,onVisibleChange:Ve},Se)}let _e=G.createElement(Rx.Item,OS({ref:e,role:"none"},k,{component:"li",style:r,className:pt(Z,`${Z}-${L}`,n,{[`${Z}-open`]:ae,[`${Z}-active`]:Ie,[`${Z}-selected`]:se,[`${Z}-disabled`]:K}),onMouseEnter:De,onMouseLeave:ce}),Se,!M&&G.createElement(Cst,{id:We,open:ae,keyPath:q},f));return Y&&(_e=Y(_e,t,{selected:se,active:Ie,open:ae,disabled:K})),G.createElement(IS,{classNames:i,styles:a,onItemClick:Ae,mode:L==="horizontal"?"vertical":L,itemIcon:te,expandIcon:ee},_e)}),ece=G.forwardRef((t,e)=>{const{eventKey:r,children:n}=t,a=LS(r),i=YD(n,a),s=G6();G.useEffect(()=>{if(s)return s.registerPath(r,a),()=>{s.unregisterPath(r,a)}},[a]);let o;return s?o=i:o=G.createElement(Sst,OS({ref:e},t),i),G.createElement(Wle.Provider,{value:a},o)});ece.displayName="SubMenu";var jD=ece;function tce({className:t,style:e}){const{prefixCls:r}=G.useContext(_u);return G6()?null:G.createElement("li",{role:"separator",className:pt(`${r}-item-divider`,t),style:e})}l(tce,"Divider");function X6(){return X6=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},X6.apply(this,arguments)}l(X6,"_extends41");var _st=G.forwardRef((t,e)=>{const f=t,{className:r,title:n,eventKey:a,children:i}=f,s=Xt(f,["className","title","eventKey","children"]),{prefixCls:o,classNames:u,styles:h}=G.useContext(_u),d=`${o}-item-group`;return G.createElement("li",X6({ref:e,role:"presentation"},s,{onClick:l(p=>p.stopPropagation(),"onClick"),className:pt(d,r)}),G.createElement("div",{role:"presentation",className:pt(`${d}-title`,u==null?void 0:u.listTitle),style:h==null?void 0:h.listTitle,title:typeof n=="string"?n:void 0},n),G.createElement("ul",{role:"group",className:pt(`${d}-list`,u==null?void 0:u.list),style:h==null?void 0:h.list},i))}),rce=G.forwardRef((t,e)=>{const{eventKey:r,children:n}=t,a=LS(r),i=YD(n,a);return G6()?i:G.createElement(_st,X6({ref:e},ws(t,["warnKey"])),i)});rce.displayName="MenuItemGroup";var nce=rce;function zx(){return zx=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zx.apply(this,arguments)}l(zx,"_extends42");function KD(t,e,r){const{item:n,group:a,submenu:i,divider:s}=e;return(t||[]).map((o,u)=>{if(o&&typeof o=="object"){const h=o,{label:d,children:f,key:p,type:g,extra:m}=h,y=Xt(h,["label","children","key","type","extra"]),v=p!=null?p:`tmp-${u}`;return f||g==="group"?g==="group"?G.createElement(a,zx({key:v},y,{title:d}),KD(f,e,r)):G.createElement(i,zx({key:v},y,{title:d}),KD(f,e,r)):g==="divider"?G.createElement(s,zx({key:v},y)):G.createElement(n,zx({key:v},y,{extra:m}),d,(!!m||m===0)&&G.createElement("span",{className:`${r}-item-extra`},m))}return null}).filter(o=>o)}l(KD,"convertItemsToNodes2");function ace(t,e,r,n,a){let i=t;const s=X({divider:tce,item:K6,group:nce,submenu:jD},n);return e&&(i=KD(e,s,a)),YD(i,r)}l(ace,"parseItems");function XD(){return XD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},XD.apply(this,arguments)}l(XD,"_extends43");var Og=[],kst=G.forwardRef((t,e)=>{var ut;const je=t,{prefixCls:r="rc-menu",rootClassName:n,style:a,className:i,styles:s,classNames:o,tabIndex:u=0,items:h,children:d,direction:f,id:p,mode:g="vertical",inlineCollapsed:m,disabled:y,disabledOverflow:v,subMenuOpenDelay:b=.1,subMenuCloseDelay:w=.1,forceSubMenuRender:x,defaultOpenKeys:T,openKeys:C,activeKey:S,defaultActiveFirst:E,selectable:k=!0,multiple:A=!1,defaultSelectedKeys:I,selectedKeys:L,onSelect:R,onDeselect:O,inlineIndent:M=24,motion:P,defaultMotions:z,triggerSubMenuAction:D="hover",builtinPlacements:B,itemIcon:W,expandIcon:U,overflowedIndicator:j="...",overflowedIndicatorPopupClassName:V,getPopupContainer:Y,onClick:H,onOpenChange:q,onKeyDown:Z,openAnimation:K,openTransitionName:re,_internalRenderMenuItem:Q,_internalRenderSubMenuItem:te,_internalComponents:ee,popupRender:J}=je,ae=Xt(je,["prefixCls","rootClassName","style","className","styles","classNames","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents","popupRender"]),[se,fe]=G.useMemo(()=>[ace(d,h,Og,ee,r),ace(d,h,Og,{},r)],[d,h,ee]),[ve,de]=G.useState(!1),Ee=G.useRef(),Ce=S0(p?`rc-menu-uuid-${p}`:"rc-menu-uuid"),De=f==="rtl";an(!K&&!re,"`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");const[ce,Ie]=Ta(T,C),ye=ce||Og,pe=l((Qe,Ze=!1)=>{function st(){Ie(Qe),q==null||q(Qe)}l(st,"doUpdate"),Ze?Rn.flushSync(st):st()},"triggerOpenKeys"),[Ae,Ve]=G.useState(ye),ze=G.useRef(!1),[We,me]=G.useMemo(()=>(g==="inline"||g==="vertical")&&m?["vertical",m]:[g,!1],[g,m]),Se=We==="inline",[ne,xe]=G.useState(We),[oe,_e]=G.useState(me);G.useEffect(()=>{xe(We),_e(me),ze.current&&(Se?Ie(Ae):pe(Og))},[We,me]);const[ue,tt]=G.useState(0),Re=ue>=se.length-1||ne!=="horizontal"||v;G.useEffect(()=>{Se&&Ve(ye)},[ye]),G.useEffect(()=>(ze.current=!0,()=>{ze.current=!1}),[]);const{registerPath:et,unregisterPath:Xe,refreshOverflowKeys:ot,isSubPathKey:Ge,getKeyPath:ht,getKeys:Je,getSubPathKeys:St}=gst(),He=G.useMemo(()=>({registerPath:et,unregisterPath:Xe}),[et,Xe]),dt=G.useMemo(()=>({isSubPathKey:Ge}),[Ge]);G.useEffect(()=>{ot(Re?Og:se.slice(ue+1).map(Qe=>Qe.key))},[ue,Re]);const[Oe,vt]=Ta(S||E&&((ut=se[0])==null?void 0:ut.key),S),qe=PS(Qe=>{vt(Qe)}),Me=PS(()=>{vt(void 0)});N.useImperativeHandle(e,()=>({list:Ee.current,focus:l(Qe=>{var at,yt;const Ze=Je(),{elements:st,key2element:Ct,element2key:Mt}=U6(Ze,Ce),Bt=WD(Ee.current,st);let Pt;Oe&&Ze.includes(Oe)?Pt=Oe:Pt=Bt[0]?Mt.get(Bt[0]):(at=se.find(Tt=>!Tt.props.disabled))==null?void 0:at.key;const Pe=Ct.get(Pt);Pt&&Pe&&((yt=Pe==null?void 0:Pe.focus)==null||yt.call(Pe,Qe))},"focus"),findItem:l(({key:Qe})=>{const Ze=Je(),{key2element:st}=U6(Ze,Ce);return st.get(Qe)||null},"findItem")}));const[lt,it]=Ta(I||[],L),Ue=G.useMemo(()=>Array.isArray(lt)?lt:lt==null?Og:[lt],[lt]),we=l(Qe=>{if(k){const{key:Ze}=Qe,st=Ue.includes(Ze);let Ct;A?st?Ct=Ue.filter(Bt=>Bt!==Ze):Ct=[...Ue,Ze]:Ct=[Ze],it(Ct);const Mt=Ne(X({},Qe),{selectedKeys:Ct});st?O==null||O(Mt):R==null||R(Mt)}!A&&ye.length&&ne!=="inline"&&pe(Og)},"triggerSelection"),gt=PS(Qe=>{H==null||H(j6(Qe)),we(Qe)}),ge=PS((Qe,Ze)=>{let st=ye.filter(Ct=>Ct!==Qe);if(Ze)st.push(Qe);else if(ne!=="inline"){const Ct=St(Qe);st=st.filter(Mt=>!Ct.has(Mt))}v0(ye,st,!0)||pe(st,!0)}),be=dst(ne,Oe,De,Ce,Ee,Je,ht,vt,l((Qe,Ze)=>{const st=Ze!=null?Ze:!ye.includes(Qe);ge(Qe,st)},"triggerAccessibilityOpen"),Z);G.useEffect(()=>{de(!0)},[]);const $e=G.useMemo(()=>({_internalRenderMenuItem:Q,_internalRenderSubMenuItem:te}),[Q,te]),le=ne!=="horizontal"||v?se:se.map((Qe,Ze)=>G.createElement(IS,{key:Qe.key,overflowDisabled:Ze>ue,classNames:o,styles:s},Qe)),ke=G.createElement(Rx,XD({id:p,ref:Ee,prefixCls:`${r}-overflow`,component:"ul",itemComponent:K6,className:pt(r,`${r}-root`,`${r}-${ne}`,i,{[`${r}-inline-collapsed`]:oe,[`${r}-rtl`]:De},n),dir:f,style:a,role:"menu",tabIndex:u,data:le,renderRawItem:l(Qe=>Qe,"renderRawItem"),renderRawRest:l(Qe=>{const Ze=Qe.length,st=Ze?se.slice(-Ze):null;return G.createElement(jD,{eventKey:GD,title:j,disabled:Re,internalPopupClose:Ze===0,popupClassName:V},st)},"renderRawRest"),maxCount:ne!=="horizontal"||v?Rx.INVALIDATE:Rx.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:l(Qe=>{tt(Qe)},"onVisibleChange"),onKeyDown:be},ae));return G.createElement(FD.Provider,{value:$e},G.createElement(Fle.Provider,{value:Ce},G.createElement(IS,{prefixCls:r,rootClassName:n,classNames:o,styles:s,mode:ne,openKeys:ye,rtl:De,disabled:y,motion:ve?P:null,defaultMotions:ve?z:null,activeKey:Oe,onActive:qe,onInactive:Me,selectedKeys:Ue,inlineIndent:M,subMenuOpenDelay:b,subMenuCloseDelay:w,forceSubMenuRender:x,builtinPlacements:B,triggerSubMenuAction:D,getPopupContainer:Y,itemIcon:W,expandIcon:U,onItemClick:gt,onOpenChange:ge,popupRender:J},G.createElement(Vle.Provider,{value:dt},ke),G.createElement("div",{style:{display:"none"},"aria-hidden":!0},G.createElement(Hle.Provider,{value:He},fe)))))}),Ast=kst,DS=Ast;DS.Item=K6,DS.SubMenu=jD,DS.ItemGroup=nce,DS.Divider=tce;var Nst=DS,Ist={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},Lst=Ist;function ZD(){return ZD=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ZD.apply(this,arguments)}l(ZD,"_extends44");var $st=l((t,e)=>G.createElement(Vn,ZD({},t,{ref:e,icon:Lst})),"EllipsisOutlined2"),ice=G.forwardRef($st);ice.displayName="EllipsisOutlined";var Mst=ice,wh=mS;function FS(t){return Wn(t,{inputAffixPadding:t.paddingXXS})}l(FS,"initInputToken");var BS=l(t=>{const{controlHeight:e,fontSize:r,lineHeight:n,lineWidth:a,controlHeightSM:i,controlHeightLG:s,fontSizeLG:o,lineHeightLG:u,paddingSM:h,controlPaddingHorizontalSM:d,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:g,colorPrimary:m,controlOutlineWidth:y,controlOutline:v,colorErrorOutline:b,colorWarningOutline:w,colorBgContainer:x,inputFontSize:T,inputFontSizeLG:C,inputFontSizeSM:S}=t,E=T||r,k=S||E,A=C||o,I=Math.round((e-E*n)/2*10)/10-a,L=Math.round((i-k*n)/2*10)/10-a,R=Math.ceil((s-A*u)/2*10)/10-a;return{paddingBlock:Math.max(I,0),paddingBlockSM:Math.max(L,0),paddingBlockLG:Math.max(R,0),paddingInline:h-a,paddingInlineSM:d-a,paddingInlineLG:f-a,addonBg:p,activeBorderColor:m,hoverBorderColor:g,activeShadow:`0 0 0 ${y}px ${v}`,errorActiveShadow:`0 0 0 ${y}px ${b}`,warningActiveShadow:`0 0 0 ${y}px ${w}`,hoverBg:x,activeBg:x,inputFontSize:E,inputFontSizeLG:A,inputFontSizeSM:k}},"initComponentToken"),Pst=l(t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),"genHoverStyle"),QD=l(t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":X({},Pst(Wn(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),"genDisabledStyle"),sce=l((t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),"genBaseOutlinedStyle"),oce=l((t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Ne(X({},sce(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),"genOutlinedStatusStyle"),lce=l((t,e)=>({"&-outlined":X(X(X(Ne(X({},sce(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:X({},QD(t))}),oce(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),oce(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),"genOutlinedStyle"),cce=l((t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),"genOutlinedGroupStatusStyle"),Rst=l(t=>({"&-outlined":Ne(X(X({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},cce(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),cce(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:X({},QD(t))}})}),"genOutlinedGroupStyle"),uce=l((t,e)=>{const{componentCls:r}=t;return{"&-borderless":X({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},"genBorderlessStyle2"),hce=l((t,e)=>{var r;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(r=e==null?void 0:e.inputColor)!=null?r:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},"genBaseFilledStyle"),dce=l((t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Ne(X({},hce(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),"genFilledStatusStyle"),fce=l((t,e)=>({"&-filled":X(X(X(Ne(X({},hce(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,inputColor:t.colorText})),{[`&${t.componentCls}-disabled, &[disabled]`]:X({},QD(t))}),dce(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),dce(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),"genFilledStyle"),pce=l((t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),"genFilledGroupStatusStyle"),Ost=l(t=>({"&-filled":Ne(X(X({[`${t.componentCls}-group-addon`]:{background:t.colorFillTertiary,"&:last-child":{position:"static"}}},pce(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),pce(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),"genFilledGroupStyle"),gce=l((t,e)=>({background:t.colorBgContainer,borderWidth:`${Rt(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.hoverBorderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.activeBorderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),"genBaseUnderlinedStyle"),mce=l((t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Ne(X({},gce(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),"genUnderlinedStatusStyle"),yce=l((t,e)=>({"&-underlined":X(X(X(Ne(X({},gce(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),mce(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),mce(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),"genUnderlinedStyle"),vce=l(t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),"genPlaceholderStyle"),bce=l(t=>{const{paddingBlockLG:e,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:a}=t;return{padding:`${Rt(e)} ${Rt(a)}`,fontSize:t.inputFontSizeLG,lineHeight:r,borderRadius:n}},"genInputLargeStyle"),xce=l(t=>({padding:`${Rt(t.paddingBlockSM)} ${Rt(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),"genInputSmallStyle"),JD=l((t,e={})=>Ne(X({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${Rt(t.paddingBlock)} ${Rt(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},vce(t.colorTextPlaceholder)),{"&-lg":X(X({},bce(t)),e.largeStyle),"&-sm":X(X({},xce(t)),e.smallStyle),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),"genBasicInputStyle"),Dst=l(t=>{const{componentCls:e,antCls:r}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:X({},bce(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:X({},xce(t)),[`&-lg ${r}-select-single`]:{height:t.controlHeightLG},[`&-sm ${r}-select-single`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${Rt(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${Rt(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${Rt(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${Rt(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}},[`${r}-cascader-picker`]:{margin:`-9px ${Rt(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Ne(X({display:"block"},Eae()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
||
& > ${e}-affix-wrapper,
|
||
& > ${e}-number-affix-wrapper,
|
||
& > ${r}-picker-range
|
||
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderInlineEndWidth:t.lineWidth},[e]:{float:"none"},[`& > ${r}-select,
|
||
& > ${r}-select-auto-complete ${e},
|
||
& > ${r}-cascader-picker ${e},
|
||
& > ${e}-group-wrapper ${e}`]:{borderInlineEndWidth:t.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
||
& > ${r}-select:first-child,
|
||
& > ${r}-select-auto-complete:first-child ${e},
|
||
& > ${r}-cascader-picker:first-child ${e}`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius},[`& > *:last-child,
|
||
& > ${r}-select:last-child,
|
||
& > ${r}-cascader-picker:last-child ${e},
|
||
& > ${r}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${r}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),[`${e}-affix-wrapper`]:{}}})}},"genInputGroupStyle"),Fst=l(t=>{const{componentCls:e,controlHeightSM:r,lineWidth:n,calc:a}=t,s=a(r).sub(a(n).mul(2)).sub(16).div(2).equal();return{[e]:Ne(X(X(X(X(X(X({},is(t)),JD(t)),lce(t)),fce(t)),uce(t)),yce(t)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:r,paddingTop:s,paddingBottom:s}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},"genInputStyle"),Bst=l(t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:t.colorIcon},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${Rt(t.inputAffixPadding)}`}}}},"genAllowClearStyle"),zst=l(t=>{const{componentCls:e,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:a,colorIcon:i,colorIconHover:s,iconCls:o}=t,u=`${e}-affix-wrapper`,h=`${e}-affix-wrapper-disabled`;return{[u]:Ne(X(Ne(X({},JD(t)),{display:"inline-flex","&-focused, &:focus":{zIndex:1},[`> input${e}`]:{padding:0},[`> input${e}, > textarea${e}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}}}),Bst(t)),{[`${o}${e}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${a}`,"&:hover":{color:s}}}),[`${e}-underlined`]:{borderRadius:0},[h]:{[`${o}${e}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},"genAffixStyle"),Hst=l(t=>{const{componentCls:e,borderRadiusLG:r,borderRadiusSM:n}=t;return{[`${e}-group`]:Ne(X(X({},is(t)),Dst(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":Ne(X(X({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:r,fontSize:t.inputFontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:n}}},Rst(t)),Ost(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},"genGroupStyle2"),Wst=l(t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},"genRangeStyle"),wce=ea(["Input","Shared"],t=>{const e=Wn(t,FS(t));return[Fst(e),zst(e)]},BS,{resetFont:!1}),Tce=ea(["Input","Component"],t=>{const e=Wn(t,FS(t));return[Hst(e),Wst(e),kx(e,{focus:!0,focusElCls:`${e.componentCls}-affix-wrapper-focused`})]},BS,{resetFont:!1}),Vst={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},Gst=Vst;function eF(){return eF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},eF.apply(this,arguments)}l(eF,"_extends45");var qst=l((t,e)=>G.createElement(Vn,eF({},t,{ref:e,icon:Gst})),"PlusOutlined2"),Ece=G.forwardRef(qst);Ece.displayName="PlusOutlined";var Cce=Ece,Yst=Jre(Xqe()),tF,Ust=l(()=>(typeof tF=="undefined"&&(tF=(0,Yst.default)()),tF),"isMobile_default"),rF=N.createContext(null),jst=l(t=>{const{activeTabOffset:e,horizontal:r,rtl:n,indicator:a={}}=t,{size:i,align:s="center"}=a,[o,u]=N.useState(),h=N.useRef(),d=N.useCallback(p=>typeof i=="function"?i(p):typeof i=="number"?i:p,[i]);function f(){pn.cancel(h.current)}return l(f,"cleanInkBarRaf"),N.useEffect(()=>{const p={};if(e)if(r){p.width=d(e.width);const g=n?"right":"left";s==="start"&&(p[g]=e[g]),s==="center"&&(p[g]=e[g]+e.width/2,p.transform=n?"translateX(50%)":"translateX(-50%)"),s==="end"&&(p[g]=e[g]+e.width,p.transform="translateX(-100%)")}else p.height=d(e.height),s==="start"&&(p.top=e.top),s==="center"&&(p.top=e.top+e.height/2,p.transform="translateY(-50%)"),s==="end"&&(p.top=e.top+e.height,p.transform="translateY(-100%)");return f(),h.current=pn(()=>{o&&p&&Object.keys(p).every(m=>{const y=p[m],v=o[m];return typeof y=="number"&&typeof v=="number"?Math.round(y)===Math.round(v):y===v})||u(p)}),f},[JSON.stringify(e),r,n,s,d]),{style:o}},"useIndicator"),Kst=jst,Sce={width:0,height:0,left:0,top:0};function Xst(t,e,r){return N.useMemo(()=>{var s,o;const n=new Map,a=e.get((s=t[0])==null?void 0:s.key)||Sce,i=a.left+a.width;for(let u=0;u<t.length;u+=1){const{key:h}=t[u];let d=e.get(h);d||(d=e.get((o=t[u-1])==null?void 0:o.key)||Sce);const f=n.get(h)||X({},d);f.right=i-f.left-f.width,n.set(h,f)}return n},[t.map(n=>n.key).join("_"),e,r])}l(Xst,"useOffsets");function _ce(t,e){const r=G.useRef(t),[,n]=G.useState({});function a(i){const s=typeof i=="function"?i(r.current):i;s!==r.current&&e(s,r.current),r.current=s,n({})}return l(a,"setState"),[r.current,a]}l(_ce,"useSyncState2");var Zst=.1,kce=.01,Z6=20,Ace=ph(.995,Z6);function Qst(t,e){const[r,n]=N.useState(),[a,i]=N.useState(0),[s,o]=N.useState(0),[u,h]=N.useState(),d=N.useRef();function f(b){const{screenX:w,screenY:x}=b.touches[0];n({x:w,y:x}),window.clearInterval(d.current)}l(f,"onTouchStart");function p(b){if(!r)return;const{screenX:w,screenY:x}=b.touches[0];n({x:w,y:x});const T=w-r.x,C=x-r.y;e(T,C);const S=Date.now();i(S),o(S-a),h({x:T,y:C})}l(p,"onTouchMove");function g(){if(r&&(n(null),h(null),u)){const b=u.x/s,w=u.y/s,x=Math.abs(b),T=Math.abs(w);if(Math.max(x,T)<Zst)return;let C=b,S=w;d.current=window.setInterval(()=>{if(Math.abs(C)<kce&&Math.abs(S)<kce){window.clearInterval(d.current);return}C*=Ace,S*=Ace,e(C*Z6,S*Z6)},Z6)}}l(g,"onTouchEnd");const m=N.useRef();function y(b){const{deltaX:w,deltaY:x}=b;let T=0;const C=Math.abs(w),S=Math.abs(x);C===S?T=m.current==="x"?w:x:C>S?(T=w,m.current="x"):(T=x,m.current="y"),e(-T,-T)&&b.preventDefault()}l(y,"onWheel");const v=N.useRef(null);v.current={onTouchStart:f,onTouchMove:p,onTouchEnd:g,onWheel:y},G.useEffect(()=>{function b(C){v.current.onTouchStart(C)}l(b,"onProxyTouchStart");function w(C){v.current.onTouchMove(C)}l(w,"onProxyTouchMove");function x(C){v.current.onTouchEnd(C)}l(x,"onProxyTouchEnd");function T(C){v.current.onWheel(C)}return l(T,"onProxyWheel"),document.addEventListener("touchmove",w,{passive:!1}),document.addEventListener("touchend",x,{passive:!0}),t.current.addEventListener("touchstart",b,{passive:!0}),t.current.addEventListener("wheel",T,{passive:!1}),()=>{document.removeEventListener("touchmove",w),document.removeEventListener("touchend",x)}},[])}l(Qst,"useTouchMove");function Nce(t){const[e,r]=N.useState(0),n=N.useRef(0),a=N.useRef();return a.current=t,Rk(()=>{var i;(i=a.current)==null||i.call(a)},[e]),()=>{n.current===e&&(n.current+=1,r(n.current))}}l(Nce,"useUpdate");function Jst(t){const e=N.useRef([]),[,r]=N.useState({}),n=N.useRef(typeof t=="function"?t():t),a=Nce(()=>{let s=n.current;e.current.forEach(o=>{s=o(s)}),e.current=[],n.current=s,r({})});function i(s){e.current.push(s),a()}return l(i,"updater"),[n.current,i]}l(Jst,"useUpdateState");var Ice={width:0,height:0,left:0,top:0,right:0};function eot(t,e,r,n,a,i,{tabs:s,tabPosition:o,rtl:u}){let h,d,f;return["top","bottom"].includes(o)?(h="width",d=u?"right":"left",f=Math.abs(r)):(h="height",d="top",f=-r),N.useMemo(()=>{if(!s.length)return[0,0];const p=s.length;let g=p;for(let y=0;y<p;y+=1){const v=t.get(s[y].key)||Ice;if(Math.floor(v[d]+v[h])>Math.floor(f+e)){g=y-1;break}}let m=0;for(let y=p-1;y>=0;y-=1)if((t.get(s[y].key)||Ice)[d]<f){m=y+1;break}return m>g?[0,-1]:[m,g]},[t,e,n,a,i,f,o,s.map(p=>p.key).join("_"),u])}l(eot,"useVisibleRange");function Lce(t){let e;return t instanceof Map?(e={},t.forEach((r,n)=>{e[n]=r})):e=t,JSON.stringify(e)}l(Lce,"stringify3");var tot="TABS_DQ";function $ce(t){return String(t).replace(/"/g,tot)}l($ce,"genDataNodeKey");function nF(t,e,r,n){return!(!r||n||t===!1||t===void 0&&(e===!1||e===null))}l(nF,"getRemovable");var rot=G.forwardRef((t,e)=>{const{prefixCls:r,editable:n,locale:a,style:i}=t;return!n||n.showAdd===!1?null:G.createElement("button",{ref:e,type:"button",className:`${r}-nav-add`,style:i,"aria-label":(a==null?void 0:a.addAriaLabel)||"Add tab",onClick:l(s=>{n.onEdit("add",{event:s})},"onClick")},n.addIcon||"+")}),Mce=rot,Pce=G.forwardRef((t,e)=>{const{position:r,prefixCls:n,extra:a}=t;if(!a)return null;let i,s={};return typeof a=="object"&&!G.isValidElement(a)?s=a:s.right=a,r==="right"&&(i=s.right),r==="left"&&(i=s.left),i?G.createElement("div",{className:`${n}-extra-content`,ref:e},i):null});Pce.displayName="ExtraContent";var Rce=Pce;function aF(){return aF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},aF.apply(this,arguments)}l(aF,"_extends46");var not=G.forwardRef((t,e)=>{const{prefixCls:r,id:n,tabs:a,locale:i,mobile:s,more:o={},style:u,className:h,editable:d,tabBarGutter:f,rtl:p,removeAriaLabel:g,onTabClick:m,getPopupContainer:y,popupClassName:v,popupStyle:b}=t,[w,x]=N.useState(!1),[T,C]=N.useState(null),{icon:S="More"}=o,E=`${n}-more-popup`,k=`${r}-dropdown`,A=T!==null?`${E}-${T}`:null,I=i==null?void 0:i.dropdownAriaLabel;function L(B,W){B.preventDefault(),B.stopPropagation(),d.onEdit("remove",{key:W,event:B})}l(L,"onRemoveTab");const R=G.createElement(Nst,{onClick:l(({key:B,domEvent:W})=>{m(B,W),x(!1)},"onClick"),prefixCls:`${k}-menu`,id:E,tabIndex:-1,role:"listbox","aria-activedescendant":A,selectedKeys:[T],"aria-label":I!==void 0?I:"expanded dropdown"},a.map(B=>{const{closable:W,disabled:U,closeIcon:j,key:V,label:Y}=B,H=nF(W,j,d,U);return G.createElement(K6,{key:V,id:`${E}-${V}`,role:"option","aria-controls":n&&`${n}-panel-${V}`,disabled:U},G.createElement("span",null,Y),H&&G.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:0,className:`${k}-menu-item-remove`,onClick:l(q=>{q.stopPropagation(),L(q,V)},"onClick")},j||d.removeIcon||"×"))}));function O(B){const W=a.filter(V=>!V.disabled);let U=W.findIndex(V=>V.key===T)||0;const j=W.length;for(let V=0;V<j;V+=1){U=(U+B+j)%j;const Y=W[U];if(!Y.disabled){C(Y.key);return}}}l(O,"selectOffset");function M(B){const{which:W}=B;if(!w){[gr.DOWN,gr.SPACE,gr.ENTER].includes(W)&&(x(!0),B.preventDefault());return}switch(W){case gr.UP:O(-1),B.preventDefault();break;case gr.DOWN:O(1),B.preventDefault();break;case gr.ESC:x(!1);break;case gr.SPACE:case gr.ENTER:T!==null&&m(T,B);break}}l(M,"onKeyDown"),N.useEffect(()=>{const B=document.getElementById(A);B!=null&&B.scrollIntoView&&B.scrollIntoView(!1)},[A,T]),N.useEffect(()=>{w||C(null)},[w]);const P={marginInlineStart:f};a.length||(P.visibility="hidden",P.order=1);const z=pt(v,{[`${k}-rtl`]:p}),D=s?null:G.createElement(ist,aF({prefixCls:k,overlay:R,visible:a.length?w:!1,onVisibleChange:x,overlayClassName:z,overlayStyle:b,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:y},o),G.createElement("button",{type:"button",className:`${r}-nav-more`,style:P,"aria-haspopup":"listbox","aria-controls":E,id:`${n}-more`,"aria-expanded":w,onKeyDown:M},S));return G.createElement("div",{className:pt(`${r}-nav-operations`,h),style:u,ref:e},D,G.createElement(Mce,{prefixCls:r,locale:i,editable:d}))}),aot=G.memo(not,(t,e)=>e.tabMoving),iot=l(t=>{const{prefixCls:e,id:r,active:n,focus:a,tab:{key:i,label:s,disabled:o,closeIcon:u,icon:h},closable:d,renderWrapper:f,removeAriaLabel:p,editable:g,onClick:m,onFocus:y,onBlur:v,onKeyDown:b,onMouseDown:w,onMouseUp:x,style:T,className:C,tabCount:S,currentPosition:E}=t,k=`${e}-tab`,A=nF(d,u,g,o);function I(P){o||m(P)}l(I,"onInternalClick");function L(P){P.preventDefault(),P.stopPropagation(),g.onEdit("remove",{key:i,event:P})}l(L,"onRemoveTab");const R=G.useMemo(()=>h&&typeof s=="string"?G.createElement("span",null,s):s,[s,h]),O=G.useRef(null);G.useEffect(()=>{a&&O.current&&O.current.focus()},[a]);const M=G.createElement("div",{key:i,"data-node-key":$ce(i),className:pt(k,C,{[`${k}-with-remove`]:A,[`${k}-active`]:n,[`${k}-disabled`]:o,[`${k}-focus`]:a}),style:T,onClick:I},G.createElement("div",{ref:O,role:"tab","aria-selected":n,id:r&&`${r}-tab-${i}`,className:`${k}-btn`,"aria-controls":r&&`${r}-panel-${i}`,"aria-disabled":o,tabIndex:o?null:n?0:-1,onClick:l(P=>{P.stopPropagation(),I(P)},"onClick"),onKeyDown:b,onMouseDown:w,onMouseUp:x,onFocus:y,onBlur:v},a&&G.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${E} of ${S}`),h&&G.createElement("span",{className:`${k}-icon`},h),s&&R),A&&G.createElement("button",{type:"button","aria-label":p||"remove",tabIndex:n?0:-1,className:`${k}-remove`,onClick:l(P=>{P.stopPropagation(),L(P)},"onClick")},u||g.removeIcon||"×"));return f?f(M):M},"TabNode"),sot=iot;function iF(){return iF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},iF.apply(this,arguments)}l(iF,"_extends47");var oot=l((t,e)=>{const{offsetWidth:r,offsetHeight:n,offsetTop:a,offsetLeft:i}=t,{width:s,height:o,left:u,top:h}=t.getBoundingClientRect();return Math.abs(s-r)<1?[s,o,u-e.left,h-e.top]:[r,n,i,a]},"getTabSize"),Hx=l(t=>{const{offsetWidth:e=0,offsetHeight:r=0}=t.current||{};if(t.current){const{width:n,height:a}=t.current.getBoundingClientRect();if(Math.abs(n-e)<1)return[n,a]}return[e,r]},"getSize"),Q6=l((t,e)=>t[e?0:1],"getUnitValue"),lot=G.forwardRef((t,e)=>{const{className:r,style:n,id:a,animated:i,activeKey:s,rtl:o,extra:u,editable:h,locale:d,tabPosition:f,tabBarGutter:p,children:g,onTabClick:m,onTabScroll:y,indicator:v,classNames:b,styles:w}=t,{prefixCls:x,tabs:T}=G.useContext(rF),C=N.useRef(null),S=N.useRef(null),E=N.useRef(null),k=N.useRef(null),A=N.useRef(null),I=N.useRef(null),L=N.useRef(null),R=f==="top"||f==="bottom",[O,M]=_ce(0,(Me,lt)=>{R&&y&&y({direction:Me>lt?"left":"right"})}),[P,z]=_ce(0,(Me,lt)=>{!R&&y&&y({direction:Me>lt?"top":"bottom"})}),[D,B]=N.useState([0,0]),[W,U]=N.useState([0,0]),[j,V]=N.useState([0,0]),[Y,H]=N.useState([0,0]),[q,Z]=Jst(new Map),K=Xst(T,q,W[0]),re=Q6(D,R),Q=Q6(W,R),te=Q6(j,R),ee=Q6(Y,R),J=Math.floor(re)<Math.floor(Q+te),ae=J?re-ee:re-te,se=`${x}-nav-operations-hidden`;let fe=0,ve=0;R&&o?(fe=0,ve=Math.max(0,Q-ae)):(fe=Math.min(0,ae-Q),ve=0);function de(Me){return Me<fe?fe:Me>ve?ve:Me}l(de,"alignInRange");const Ee=N.useRef(null),[Ce,De]=N.useState();function ce(){De(Date.now())}l(ce,"doLockAnimation");function Ie(){Ee.current&&clearTimeout(Ee.current)}l(Ie,"clearTouchMoving"),Qst(k,(Me,lt)=>{function it(Ue,we){Ue(gt=>de(gt+we))}return l(it,"doMove"),J?(R?it(M,Me):it(z,lt),Ie(),ce(),!0):!1}),N.useEffect(()=>(Ie(),Ce&&(Ee.current=setTimeout(()=>{De(0)},100)),Ie),[Ce]);const[ye,pe]=eot(K,ae,R?O:P,Q,te,ee,Ne(X({},t),{tabs:T})),Ae=Ur((Me=s)=>{const lt=K.get(Me)||{width:0,height:0,left:0,right:0,top:0};if(R){let it=O;o?lt.right<O?it=lt.right:lt.right+lt.width>O+ae&&(it=lt.right+lt.width-ae):lt.left<-O?it=-lt.left:lt.left+lt.width>-O+ae&&(it=-(lt.left+lt.width-ae)),z(0),M(de(it))}else{let it=P;lt.top<-P?it=-lt.top:lt.top+lt.height>-P+ae&&(it=-(lt.top+lt.height-ae)),M(0),z(de(it))}}),[Ve,ze]=N.useState(),[We,me]=N.useState(!1),Se=T.filter(Me=>!Me.disabled).map(Me=>Me.key),ne=l(Me=>{const lt=Se.indexOf(Ve||s),it=Se.length,Ue=(lt+Me+it)%it,we=Se[Ue];ze(we)},"onOffset"),xe=l((Me,lt)=>{const it=Se.indexOf(Me),Ue=T.find(gt=>gt.key===Me);nF(Ue==null?void 0:Ue.closable,Ue==null?void 0:Ue.closeIcon,h,Ue==null?void 0:Ue.disabled)&&(lt.preventDefault(),lt.stopPropagation(),h.onEdit("remove",{key:Me,event:lt}),it===Se.length-1?ne(-1):ne(1))},"handleRemoveTab"),oe=l((Me,lt)=>{me(!0),lt.button===1&&xe(Me,lt)},"handleMouseDown"),_e=l(Me=>{const{code:lt}=Me,it=o&&R,Ue=Se[0],we=Se[Se.length-1];switch(lt){case"ArrowLeft":{R&&ne(it?1:-1);break}case"ArrowRight":{R&&ne(it?-1:1);break}case"ArrowUp":{Me.preventDefault(),R||ne(-1);break}case"ArrowDown":{Me.preventDefault(),R||ne(1);break}case"Home":{Me.preventDefault(),ze(Ue);break}case"End":{Me.preventDefault(),ze(we);break}case"Enter":case"Space":{Me.preventDefault(),m(Ve!=null?Ve:s,Me);break}case"Backspace":case"Delete":{xe(Ve,Me);break}}},"handleKeyDown"),ue={};R?ue.marginInlineStart=p:ue.marginTop=p;const tt=T.map((Me,lt)=>{const{key:it}=Me;return G.createElement(sot,{id:a,prefixCls:x,key:it,tab:Me,className:b==null?void 0:b.item,style:lt===0?w==null?void 0:w.item:X(X({},ue),w==null?void 0:w.item),closable:Me.closable,editable:h,active:it===s,focus:it===Ve,renderWrapper:g,removeAriaLabel:d==null?void 0:d.removeAriaLabel,tabCount:Se.length,currentPosition:lt+1,onClick:l(Ue=>{m(it,Ue)},"onClick"),onKeyDown:_e,onFocus:l(()=>{We||ze(it),Ae(it),ce(),k.current&&(o||(k.current.scrollLeft=0),k.current.scrollTop=0)},"onFocus"),onBlur:l(()=>{ze(void 0)},"onBlur"),onMouseDown:l(Ue=>oe(it,Ue),"onMouseDown"),onMouseUp:l(()=>{me(!1)},"onMouseUp")})}),Re=l(()=>Z(()=>{var it;const Me=new Map,lt=(it=A.current)==null?void 0:it.getBoundingClientRect();return T.forEach(({key:Ue})=>{var gt;const we=(gt=A.current)==null?void 0:gt.querySelector(`[data-node-key="${$ce(Ue)}"]`);if(we){const[ge,ie,be,$e]=oot(we,lt);Me.set(Ue,{width:ge,height:ie,left:be,top:$e})}}),Me}),"updateTabSizes");N.useEffect(()=>{Re()},[T.map(Me=>Me.key).join("_")]);const et=Nce(()=>{const Me=Hx(C),lt=Hx(S),it=Hx(E);B([Me[0]-lt[0]-it[0],Me[1]-lt[1]-it[1]]);const Ue=Hx(L);V(Ue);const we=Hx(I);H(we);const gt=Hx(A);U([gt[0]-Ue[0],gt[1]-Ue[1]]),Re()}),Xe=T.slice(0,ye),ot=T.slice(pe+1),Ge=[...Xe,...ot],ht=K.get(s),{style:Je}=Kst({activeTabOffset:ht,horizontal:R,indicator:v,rtl:o});N.useEffect(()=>{Ae()},[s,fe,ve,Lce(ht),Lce(K),R]),N.useEffect(()=>{et()},[o]);const St=!!Ge.length,He=`${x}-nav-wrap`;let dt,Oe,vt,qe;return R?o?(Oe=O>0,dt=O!==ve):(dt=O<0,Oe=O!==fe):(vt=P<0,qe=P!==fe),G.createElement(mh,{onResize:et},G.createElement("div",{ref:bg(e,C),role:"tablist","aria-orientation":R?"horizontal":"vertical",className:pt(`${x}-nav`,r,b==null?void 0:b.header),style:X(X({},w==null?void 0:w.header),n),onKeyDown:l(()=>{ce()},"onKeyDown")},G.createElement(Rce,{ref:S,position:"left",extra:u,prefixCls:x}),G.createElement(mh,{onResize:et},G.createElement("div",{className:pt(He,{[`${He}-ping-left`]:dt,[`${He}-ping-right`]:Oe,[`${He}-ping-top`]:vt,[`${He}-ping-bottom`]:qe}),ref:k},G.createElement(mh,{onResize:et},G.createElement("div",{ref:A,className:`${x}-nav-list`,style:{transform:`translate(${O}px, ${P}px)`,transition:Ce?"none":void 0}},tt,G.createElement(Mce,{ref:L,prefixCls:x,locale:d,editable:h,style:Ne(X({},tt.length===0?void 0:ue),{visibility:St?"hidden":null})}),G.createElement("div",{className:pt(`${x}-ink-bar`,b==null?void 0:b.indicator,{[`${x}-ink-bar-animated`]:i.inkBar}),style:X(X({},Je),w==null?void 0:w.indicator)}))))),G.createElement(aot,iF({},t,{removeAriaLabel:d==null?void 0:d.removeAriaLabel,ref:I,prefixCls:x,tabs:Ge,className:!St&&se,popupStyle:w==null?void 0:w.popup,tabMoving:!!Ce})),G.createElement(Rce,{ref:E,position:"right",extra:u,prefixCls:x})))}),Oce=lot,Dce=l(r=>{var n=r,{renderTabBar:t}=n,e=Xt(n,["renderTabBar"]);return t?t(e,Oce):G.createElement(Oce,e)},"TabNavListWrapper");Dce.displayName="TabNavListWrapper";var cot=Dce,Fce=G.forwardRef((t,e)=>{const{prefixCls:r,className:n,style:a,id:i,active:s,tabKey:o,children:u}=t,h=G.Children.count(u)>0;return G.createElement("div",{id:i&&`${i}-panel-${o}`,role:"tabpanel",tabIndex:s&&h?0:-1,"aria-labelledby":i&&`${i}-tab-${o}`,"aria-hidden":!s,style:a,className:pt(r,s&&`${r}-active`,n),ref:e},u)});Fce.displayName="TabPane";var uot=Fce;function J6(){return J6=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},J6.apply(this,arguments)}l(J6,"_extends48");var hot=l(t=>{const{id:e,activeKey:r,animated:n,tabPosition:a,destroyOnHidden:i,contentStyle:s,contentClassName:o}=t,{prefixCls:u,tabs:h}=G.useContext(rF),d=n.tabPane,f=`${u}-tabpane`;return G.createElement("div",{className:pt(`${u}-content-holder`)},G.createElement("div",{className:pt(`${u}-content`,`${u}-content-${a}`,{[`${u}-content-animated`]:d})},h.map(p=>{const T=p,{key:g,forceRender:m,style:y,className:v,destroyOnHidden:b}=T,w=Xt(T,["key","forceRender","style","className","destroyOnHidden"]),x=g===r;return G.createElement(zc,J6({key:g,visible:x,forceRender:m,removeOnLeave:!!(i!=null?i:b),leavedClassName:`${f}-hidden`},n.tabPaneMotion),({style:C,className:S},E)=>G.createElement(uot,J6({},w,{prefixCls:f,id:e,tabKey:g,animated:d,active:x,style:X(X(X({},s),y),C),className:pt(o,v,S),ref:E})))})))},"TabPanelList"),dot=hot;function fot(t={inkBar:!0,tabPane:!1}){let e;return t===!1?e={inkBar:!1,tabPane:!1}:t===!0?e={inkBar:!0,tabPane:!1}:e=X({inkBar:!0},typeof t=="object"?t:{}),e.tabPaneMotion&&e.tabPane===void 0&&(e.tabPane=!0),!e.tabPaneMotion&&e.tabPane&&(an(!1,"`animated.tabPane` is true but `animated.tabPaneMotion` is not provided. Motion will not work."),e.tabPane=!1),e}l(fot,"useAnimateConfig");function zS(){return zS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zS.apply(this,arguments)}l(zS,"_extends49");var Bce=0,zce=G.forwardRef((t,e)=>{var re;const K=t,{id:r,prefixCls:n="rc-tabs",className:a,items:i,direction:s,activeKey:o,defaultActiveKey:u,editable:h,animated:d,tabPosition:f="top",tabBarGutter:p,tabBarStyle:g,tabBarExtraContent:m,locale:y,more:v,destroyOnHidden:b,renderTabBar:w,onChange:x,onTabClick:T,onTabScroll:C,getPopupContainer:S,popupClassName:E,indicator:k,classNames:A,styles:I}=K,L=Xt(K,["id","prefixCls","className","items","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","more","destroyOnHidden","renderTabBar","onChange","onTabClick","onTabScroll","getPopupContainer","popupClassName","indicator","classNames","styles"]),R=G.useMemo(()=>(i||[]).filter(Q=>Q&&typeof Q=="object"&&"key"in Q),[i]),O=s==="rtl",M=fot(d),[P,z]=N.useState(!1);N.useEffect(()=>{z(Ust())},[]);const[D,B]=Ta(u!=null?u:(re=R[0])==null?void 0:re.key,o),[W,U]=N.useState(()=>R.findIndex(Q=>Q.key===D));N.useEffect(()=>{var te;let Q=R.findIndex(ee=>ee.key===D);Q===-1&&(Q=Math.max(0,Math.min(W,R.length-1)),B((te=R[Q])==null?void 0:te.key)),U(Q)},[R.map(Q=>Q.key).join("_"),D,W]);const[j,V]=Ta(null,r);N.useEffect(()=>{r||(V(`rc-tabs-${Bce}`),Bce+=1)},[]);function Y(Q,te){T==null||T(Q,te);const ee=Q!==D;B(Q),ee&&(x==null||x(Q))}l(Y,"onInternalTabClick");const H={id:j,activeKey:D,animated:M,tabPosition:f,rtl:O,mobile:P},q=Ne(X({},H),{editable:h,locale:y,more:v,tabBarGutter:p,onTabClick:Y,onTabScroll:C,extra:m,style:g,getPopupContainer:S,popupClassName:pt(E,A==null?void 0:A.popup),indicator:k,styles:I,classNames:A}),Z=G.useMemo(()=>({tabs:R,prefixCls:n}),[R,n]);return G.createElement(rF.Provider,{value:Z},G.createElement("div",zS({ref:e,id:r,className:pt(n,`${n}-${f}`,{[`${n}-mobile`]:P,[`${n}-editable`]:h,[`${n}-rtl`]:O},a)},L),G.createElement(cot,zS({},q,{renderTabBar:w})),G.createElement(dot,zS({destroyOnHidden:b},H,{contentStyle:I==null?void 0:I.content,contentClassName:A==null?void 0:A.content,animated:M}))))});zce.displayName="Tabs";var pot=zce,got=pot,mot={motionAppear:!1,motionEnter:!0,motionLeave:!0};function yot(t,e={inkBar:!0,tabPane:!1}){let r;return e===!1?r={inkBar:!1,tabPane:!1}:e===!0?r={inkBar:!0,tabPane:!0}:r=X({inkBar:!0},typeof e=="object"?e:{}),r.tabPane&&(r.tabPaneMotion=Ne(X({},mot),{motionName:k0(t,"switch")})),r}l(yot,"useAnimateConfig2");function vot(t){return t.filter(e=>e)}l(vot,"filter2$1");function bot(t,e){if(Tn("Tabs").deprecated(!e,"Tabs.TabPane","items"),t)return t.map(n=>{var a;return Ne(X({},n),{destroyOnHidden:(a=n.destroyOnHidden)!=null?a:n.destroyInactiveTabPane})});const r=wo(e).map(n=>{if(G.isValidElement(n)){const{key:i,props:s}=n,a=s||{},{tab:o}=a,u=Xt(a,["tab"]);return Ne(X({key:String(i)},u),{label:o})}return null});return vot(r)}l(bot,"useLegacyItems");var xot=bot,wot=l(t=>{const{componentCls:e,motionDurationSlow:r}=t;return[{[e]:{[`${e}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${r}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${r}`}}}}},[C6(t,"slide-up"),C6(t,"slide-down")]]},"genMotionStyle"),Tot=wot,Eot=l(t=>{const{componentCls:e,tabsCardPadding:r,cardBg:n,cardGutter:a,colorBorderSecondary:i,itemSelectedColor:s}=t;return{[`${e}-card`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{margin:0,padding:r,background:n,border:`${Rt(t.lineWidth)} ${t.lineType} ${i}`,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`${e}-tab-active`]:{color:s,background:t.colorBgContainer},[`${e}-tab-focus:has(${e}-tab-btn:focus-visible)`]:oS(t,-3),[`& ${e}-tab${e}-tab-focus ${e}-tab-btn:focus-visible`]:{outline:"none"},[`${e}-ink-bar`]:{visibility:"hidden"}},[`&${e}-top, &${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginLeft:{_skip_check_:!0,value:Rt(a)}}}},[`&${e}-top`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`${Rt(t.borderRadiusLG)} ${Rt(t.borderRadiusLG)} 0 0`},[`${e}-tab-active`]:{borderBottomColor:t.colorBgContainer}}},[`&${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`0 0 ${Rt(t.borderRadiusLG)} ${Rt(t.borderRadiusLG)}`},[`${e}-tab-active`]:{borderTopColor:t.colorBgContainer}}},[`&${e}-left, &${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginTop:Rt(a)}}},[`&${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Rt(t.borderRadiusLG)} 0 0 ${Rt(t.borderRadiusLG)}`}},[`${e}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},[`&${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Rt(t.borderRadiusLG)} ${Rt(t.borderRadiusLG)} 0`}},[`${e}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},"genCardStyle"),Cot=l(t=>{const{componentCls:e,itemHoverColor:r,dropdownEdgeChildVerticalPadding:n}=t;return{[`${e}-dropdown`]:Ne(X({},is(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${Rt(n)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":Ne(X({},Sg),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:`${Rt(t.paddingXXS)} ${Rt(t.paddingSM)}`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:r}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},"genDropdownStyle"),Sot=l(t=>{const{componentCls:e,margin:r,colorBorderSecondary:n,horizontalMargin:a,verticalItemPadding:i,verticalItemMargin:s,motionDurationSlow:o,calc:u}=t;return{[`${e}-top, ${e}-bottom`]:{flexDirection:"column",[`> ${e}-nav, > div > ${e}-nav`]:{margin:a,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${Rt(t.lineWidth)} ${t.lineType} ${n}`,content:"''"},[`${e}-ink-bar`]:{height:t.lineWidthBold,"&-animated":{transition:["width","left","right"].map(h=>`${h} ${o}`).join(", ")}},[`${e}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:t.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowRight},[`&${e}-nav-wrap-ping-left::before`]:{opacity:1},[`&${e}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${e}-top`]:{[`> ${e}-nav,
|
||
> div > ${e}-nav`]:{"&::before":{bottom:0},[`${e}-ink-bar`]:{bottom:0}}},[`${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,marginTop:r,marginBottom:0,"&::before":{top:0},[`${e}-ink-bar`]:{top:0}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0}},[`${e}-left, ${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{flexDirection:"column",minWidth:u(t.controlHeight).mul(1.25).equal(),[`${e}-tab`]:{padding:i,textAlign:"center"},[`${e}-tab + ${e}-tab`]:{margin:s},[`${e}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},[`&${e}-nav-wrap-ping-top::before`]:{opacity:1},[`&${e}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${e}-ink-bar`]:{width:t.lineWidthBold,"&-animated":{transition:["height","top"].map(h=>`${h} ${o}`).join(", ")}},[`${e}-nav-list, ${e}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{marginLeft:{_skip_check_:!0,value:Rt(u(t.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},[`${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,[`${e}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:u(t.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${Rt(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},"genPositionStyle"),_ot=l(t=>{const{componentCls:e,cardPaddingSM:r,cardPaddingLG:n,cardHeightSM:a,cardHeightLG:i,horizontalItemPaddingSM:s,horizontalItemPaddingLG:o}=t;return{[e]:{"&-small":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:s,fontSize:t.titleFontSizeSM}}},"&-large":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:o,fontSize:t.titleFontSizeLG,lineHeight:t.lineHeightLG}}}},[`${e}-card`]:{[`&${e}-small`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:r},[`${e}-nav-add`]:{minWidth:a,minHeight:a}},[`&${e}-bottom`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`0 0 ${Rt(t.borderRadius)} ${Rt(t.borderRadius)}`}},[`&${e}-top`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`${Rt(t.borderRadius)} ${Rt(t.borderRadius)} 0 0`}},[`&${e}-right`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${Rt(t.borderRadius)} ${Rt(t.borderRadius)} 0`}}},[`&${e}-left`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${Rt(t.borderRadius)} 0 0 ${Rt(t.borderRadius)}`}}}},[`&${e}-large`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:n},[`${e}-nav-add`]:{minWidth:i,minHeight:i}}}}}},"genSizeStyle"),kot=l(t=>{const{componentCls:e,itemActiveColor:r,itemHoverColor:n,iconCls:a,tabsHorizontalItemMargin:i,horizontalItemPadding:s,itemSelectedColor:o,itemColor:u}=t,h=`${e}-tab`;return{[h]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:s,fontSize:t.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:u,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:r}},"&-btn":{outline:"none",transition:`all ${t.motionDurationSlow}`,[`${h}-icon:not(:last-child)`]:{marginInlineEnd:t.marginSM}},"&-remove":X({flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:t.calc(t.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorIcon,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextHeading}},vh(t)),"&:hover":{color:n},[`&${h}-active ${h}-btn`]:{color:o},[`&${h}-focus ${h}-btn:focus-visible`]:oS(t),[`&${h}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${h}-disabled ${h}-btn, &${h}-disabled ${e}-remove`]:{"&:focus, &:active":{color:t.colorTextDisabled}},[`& ${h}-remove ${a}`]:{margin:0,verticalAlign:"middle"},[`${a}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},[`${h} + ${h}`]:{margin:{_skip_check_:!0,value:i}}}},"genTabStyle"),Aot=l(t=>{const{componentCls:e,tabsHorizontalItemMarginRTL:r,iconCls:n,cardGutter:a,calc:i}=t;return{[`${e}-rtl`]:{direction:"rtl",[`${e}-nav`]:{[`${e}-tab`]:{margin:{_skip_check_:!0,value:r},[`${e}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[n]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:Rt(t.marginSM)}},[`${e}-tab-remove`]:{marginRight:{_skip_check_:!0,value:Rt(t.marginXS)},marginLeft:{_skip_check_:!0,value:Rt(i(t.marginXXS).mul(-1).equal())},[n]:{margin:0}}}},[`&${e}-left`]:{[`> ${e}-nav`]:{order:1},[`> ${e}-content-holder`]:{order:0}},[`&${e}-right`]:{[`> ${e}-nav`]:{order:0},[`> ${e}-content-holder`]:{order:1}},[`&${e}-card${e}-top, &${e}-card${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginRight:{_skip_check_:!0,value:a},marginLeft:{_skip_check_:!0,value:0}}}}},[`${e}-dropdown-rtl`]:{direction:"rtl"},[`${e}-menu-item`]:{[`${e}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},"genRtlStyle"),Not=l(t=>{const{componentCls:e,tabsCardPadding:r,cardHeight:n,cardGutter:a,itemHoverColor:i,itemActiveColor:s,colorBorderSecondary:o}=t;return{[e]:Ne(X(Ne(X({},is(t)),{display:"flex",[`> ${e}-nav, > div > ${e}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${e}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${e}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${t.motionDurationSlow}`},[`${e}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${e}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${e}-nav-more`]:{position:"relative",padding:r,background:"transparent",border:0,color:t.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.calc(t.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${e}-nav-add`]:X({minWidth:n,minHeight:n,marginLeft:{_skip_check_:!0,value:a},background:"transparent",border:`${Rt(t.lineWidth)} ${t.lineType} ${o}`,borderRadius:`${Rt(t.borderRadiusLG)} ${Rt(t.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:s}},vh(t,-3))},[`${e}-extra-content`]:{flex:"none"},[`${e}-ink-bar`]:{position:"absolute",background:t.inkBarColor,pointerEvents:"none"}}),kot(t)),{[`${e}-content`]:{position:"relative",width:"100%"},[`${e}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${e}-tabpane`]:Ne(X({},vh(t)),{"&-hidden":{display:"none"}})}),[`${e}-centered`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-nav-wrap`]:{[`&:not([class*='${e}-nav-wrap-ping']) > ${e}-nav-list`]:{margin:"auto"}}}}}},"genTabsStyle"),Iot=l(t=>{const{cardHeight:e,cardHeightSM:r,cardHeightLG:n,controlHeight:a,controlHeightLG:i}=t,s=e||i,o=r||a,u=n||i+8;return{zIndexPopup:t.zIndexPopupBase+50,cardBg:t.colorFillAlter,cardHeight:s,cardHeightSM:o,cardHeightLG:u,cardPadding:`${(s-t.fontHeight)/2-t.lineWidth}px ${t.padding}px`,cardPaddingSM:`${(o-t.fontHeight)/2-t.lineWidth}px ${t.paddingXS}px`,cardPaddingLG:`${(u-t.fontHeightLG)/2-t.lineWidth}px ${t.padding}px`,titleFontSize:t.fontSize,titleFontSizeLG:t.fontSizeLG,titleFontSizeSM:t.fontSize,inkBarColor:t.colorPrimary,horizontalMargin:`0 0 ${t.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${t.paddingSM}px 0`,horizontalItemPaddingSM:`${t.paddingXS}px 0`,horizontalItemPaddingLG:`${t.padding}px 0`,verticalItemPadding:`${t.paddingXS}px ${t.paddingLG}px`,verticalItemMargin:`${t.margin}px 0 0 0`,itemColor:t.colorText,itemSelectedColor:t.colorPrimary,itemHoverColor:t.colorPrimaryHover,itemActiveColor:t.colorPrimaryActive,cardGutter:t.marginXXS/2}},"prepareComponentToken11"),Lot=ea("Tabs",t=>{const e=Wn(t,{tabsCardPadding:t.cardPadding,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${Rt(t.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${Rt(t.horizontalItemGutter)}`});return[_ot(e),Aot(e),Sot(e),Cot(e),Eot(e),Not(e),Tot(e)]},Iot),Hce=l(()=>null,"TabPane2");Hce.displayName="DeprecatedTabPane";var $ot=Hce,Mot=G.forwardRef((t,e)=>{var ve,de,Ee,Ce,De,ce,Ie,ye,pe,Ae,Ve,ze;const fe=t,{type:r,className:n,rootClassName:a,size:i,onEdit:s,hideAdd:o,centered:u,addIcon:h,removeIcon:d,moreIcon:f,more:p,popupClassName:g,children:m,items:y,animated:v,style:b,indicatorSize:w,indicator:x,classNames:T,styles:C,destroyInactiveTabPane:S,destroyOnHidden:E,tabPlacement:k,tabPosition:A}=fe,I=Xt(fe,["type","className","rootClassName","size","onEdit","hideAdd","centered","addIcon","removeIcon","moreIcon","more","popupClassName","children","items","animated","style","indicatorSize","indicator","classNames","styles","destroyInactiveTabPane","destroyOnHidden","tabPlacement","tabPosition"]),{prefixCls:L}=I,{getPrefixCls:R,direction:O,getPopupContainer:M,className:P,style:z,classNames:D,styles:B}=Aa("tabs"),{tabs:W}=G.useContext(vn),U=R("tabs",L),j=Cu(U),[V,Y]=Lot(U,j),H=G.useRef(null);G.useImperativeHandle(e,()=>({nativeElement:H.current}));let q;r==="editable-card"&&(q={onEdit:l((We,{key:me,event:Se})=>{s==null||s(We==="add"?Se:me,We)},"onEdit"),removeIcon:(ve=d!=null?d:W==null?void 0:W.removeIcon)!=null?ve:G.createElement(T0,null),addIcon:(h!=null?h:W==null?void 0:W.addIcon)||G.createElement(Cce,null),showAdd:o!==!0});const Z=R();{const We=Tn("Tabs");[["popupClassName","classNames.popup"],["tabPosition","tabPlacement"]].forEach(([me,Se])=>{We.deprecated(!(me in t),me,Se)}),We(!("onPrevClick"in t)&&!("onNextClick"in t),"breaking","`onPrevClick` and `onNextClick` has been removed. Please use `onTabScroll` instead."),We(!(w||W!=null&&W.indicatorSize),"deprecated","`indicatorSize` has been deprecated. Please use `indicator={{ size: ... }}` instead."),We.deprecated(!("destroyInactiveTabPane"in t||y!=null&&y.some(me=>"destroyInactiveTabPane"in me)),"destroyInactiveTabPane","destroyOnHidden")}const K=Ll(i),re=xot(y,m),Q=yot(U,v),te={align:(Ee=x==null?void 0:x.align)!=null?Ee:(de=W==null?void 0:W.indicator)==null?void 0:de.align,size:(Ie=(ce=(Ce=x==null?void 0:x.size)!=null?Ce:w)!=null?ce:(De=W==null?void 0:W.indicator)==null?void 0:De.size)!=null?Ie:W==null?void 0:W.indicatorSize},ee=G.useMemo(()=>{var Se;const We=(Se=k!=null?k:A)!=null?Se:void 0,me=O==="rtl";switch(We){case"start":return me?"right":"left";case"end":return me?"left":"right";default:return We}},[k,A,O]),J=Ne(X({},t),{size:K,tabPlacement:ee,items:re}),[ae,se]=Qa([D,T],[B,C],{props:J},{popup:{_default:"root"}});return G.createElement(got,Ne(X({ref:H,direction:O,getPopupContainer:M},I),{items:re,className:pt({[`${U}-${K}`]:K,[`${U}-card`]:["card","editable-card"].includes(r),[`${U}-editable-card`]:r==="editable-card",[`${U}-centered`]:u},P,n,a,ae.root,V,Y,j),classNames:Ne(X({},ae),{popup:pt(g,V,Y,j,(ye=ae.popup)==null?void 0:ye.root)}),styles:se,style:X(X(X({},se.root),z),b),editable:q,more:X({icon:(ze=(Ve=(Ae=(pe=W==null?void 0:W.more)==null?void 0:pe.icon)!=null?Ae:W==null?void 0:W.moreIcon)!=null?Ve:f)!=null?ze:G.createElement(Mst,null),transitionName:`${Z}-slide-up`},p),prefixCls:U,animated:Q,indicator:te,destroyOnHidden:E!=null?E:S,tabPosition:ee}))}),sF=Mot;sF.TabPane=$ot,sF.displayName="Tabs";var Pot=sF,Rot=l(t=>{const{componentCls:e}=t;return{[e]:{"&-horizontal":{[`&${e}`]:{"&-sm":{marginBlock:t.marginXS},"&-md":{marginBlock:t.margin}}}}}},"genSizeDividerStyle"),Oot=l(t=>{const{componentCls:e,sizePaddingEdgeHorizontal:r,colorSplit:n,lineWidth:a,textPaddingInline:i,orientationMargin:s,verticalMarginInline:o}=t,u=`${e}-rail`;return{[e]:Ne(X({},is(t)),{borderBlockStart:`${Rt(a)} solid ${n}`,[u]:{borderBlockStart:`${Rt(a)} solid ${n}`},"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:o,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${Rt(a)} solid ${n}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${Rt(t.marginLG)} 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${Rt(t.dividerHorizontalWithTextGutterMargin)} 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${n}`,[`${u}-start, ${u}-end`]:{width:"50%",borderBlockStartColor:"inherit",borderBlockEnd:0,content:"''"}},[`&-horizontal${e}-with-text-start`]:{[`${u}-start`]:{width:`calc(${s} * 100%)`},[`${u}-end`]:{width:`calc(100% - ${s} * 100%)`}},[`&-horizontal${e}-with-text-end`]:{[`${u}-start`]:{width:`calc(100% - ${s} * 100%)`},[`${u}-end`]:{width:`calc(${s} * 100%)`}},[`${e}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:i},"&-dashed":{background:"none",borderColor:n,borderStyle:"dashed",borderWidth:`${Rt(a)} 0 0`,[u]:{borderBlockStart:`${Rt(a)} dashed ${n}`}},[`&-horizontal${e}-with-text${e}-dashed`]:{[`${u}-start, ${u}-end`]:{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},"&-dotted":{background:"none",borderColor:n,borderStyle:"dotted",borderWidth:`${Rt(a)} 0 0`,[u]:{borderBlockStart:`${Rt(a)} dotted ${n}`}},[`&-horizontal${e}-with-text${e}-dotted`]:{"&::before, &::after":{borderStyle:"dotted none none"}},[`&-vertical${e}-dotted`]:{borderInlineStartWidth:a,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-start${e}-no-default-orientation-margin-start`]:{[`${u}-start`]:{width:0},[`${u}-end`]:{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:r}},[`&-horizontal${e}-with-text-end${e}-no-default-orientation-margin-end`]:{[`${u}-start`]:{width:"100%"},[`${u}-end`]:{width:0},[`${e}-inner-text`]:{paddingInlineEnd:r}}})}},"genSharedDividerStyle"),Dot=l(t=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:t.marginXS}),"prepareComponentToken12"),Fot=ea("Divider",t=>{const e=Wn(t,{dividerHorizontalWithTextGutterMargin:t.margin,sizePaddingEdgeHorizontal:0});return[Oot(e),Rot(e)]},Dot,{unitless:{orientationMargin:!0}}),Bot=["left","right","center","start","end"],zot={small:"sm",middle:"md"},Wce=l(t=>{const{getPrefixCls:e,direction:r,className:n,style:a,classNames:i,styles:s}=Aa("divider"),K=t,{prefixCls:o,type:u,orientation:h,vertical:d,titlePlacement:f,orientationMargin:p,className:g,rootClassName:m,children:y,dashed:v,variant:b="solid",plain:w,style:x,size:T,classNames:C,styles:S}=K,E=Xt(K,["prefixCls","type","orientation","vertical","titlePlacement","orientationMargin","className","rootClassName","children","dashed","variant","plain","style","size","classNames","styles"]),k=e("divider",o),A=`${k}-rail`,[I,L]=Fot(k),R=Ll(T),O=zot[R],M=!!y,P=Bot.includes(h||""),z=G.useMemo(()=>{const re=f!=null?f:P?h:"center";return re==="left"?r==="rtl"?"end":"start":re==="right"?r==="rtl"?"start":"end":re},[r,h,f,P]),D=z==="start"&&p!=null,B=z==="end"&&p!=null,[W,U]=Ex(h,d,u),j=Ne(X({},t),{orientation:W,titlePlacement:z,size:R}),[V,Y]=Qa([i,C],[s,S],{props:j}),H=pt(k,n,I,L,`${k}-${W}`,{[`${k}-with-text`]:M,[`${k}-with-text-${z}`]:M,[`${k}-dashed`]:!!v,[`${k}-${b}`]:b!=="solid",[`${k}-plain`]:!!w,[`${k}-rtl`]:r==="rtl",[`${k}-no-default-orientation-margin-start`]:D,[`${k}-no-default-orientation-margin-end`]:B,[`${k}-${O}`]:!!O,[A]:!y,[V.rail]:V.rail&&!y},g,m,V.root),q=G.useMemo(()=>typeof p=="number"?p:/^\d+$/.test(p)?Number(p):p,[p]),Z={marginInlineStart:D?q:void 0,marginInlineEnd:B?q:void 0};{const re=Tn("Divider");re(!y||!U,"usage","`children` not working in `vertical` mode."),re(!P,"usage","`orientation` is used for direction, please use `titlePlacement` replace this"),[["type","orientation"],["orientationMargin","styles.content.margin"]].forEach(([Q,te])=>{re.deprecated(!(Q in t),Q,te)})}return G.createElement("div",Ne(X({className:H,style:X(X(X(X({},a),Y.root),y?{}:Y.rail),x)},E),{role:"separator"}),y&&!U&&G.createElement(G.Fragment,null,G.createElement("div",{className:pt(A,`${A}-start`,V.rail),style:Y.rail}),G.createElement("span",{className:pt(`${k}-inner-text`,V.content),style:X(X({},Z),Y.content)},y),G.createElement("div",{className:pt(A,`${A}-end`,V.rail),style:Y.rail})))},"Divider2");Wce.displayName="Divider";var oF=Wce,Vce=l((t,e)=>{if(!t)return null;const r={left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth,top:t.offsetTop,bottom:t.parentElement.clientHeight-t.clientHeight-t.offsetTop,height:t.clientHeight};return e?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},"calcThumbStyle"),Th=l(t=>t!==void 0?`${t}px`:void 0,"toPX");function Hot(t){const{prefixCls:e,containerRef:r,value:n,getValueIndex:a,motionName:i,onMotionStart:s,onMotionEnd:o,direction:u,vertical:h=!1}=t,d=G.useRef(null),[f,p]=G.useState(n),g=l(E=>{var I;const k=a(E),A=(I=r.current)==null?void 0:I.querySelectorAll(`.${e}-item`)[k];return(A==null?void 0:A.offsetParent)&&A},"findValueElement"),[m,y]=G.useState(null),[v,b]=G.useState(null);On(()=>{if(f!==n){const E=g(f),k=g(n),A=Vce(E,h),I=Vce(k,h);p(n),y(A),b(I),E&&k?s():o()}},[n]);const w=G.useMemo(()=>{var E;return Th(h?(E=m==null?void 0:m.top)!=null?E:0:u==="rtl"?-(m==null?void 0:m.right):m==null?void 0:m.left)},[h,u,m]),x=G.useMemo(()=>{var E;return Th(h?(E=v==null?void 0:v.top)!=null?E:0:u==="rtl"?-(v==null?void 0:v.right):v==null?void 0:v.left)},[h,u,v]),T=l(()=>h?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"},"onAppearStart"),C=l(()=>h?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"},"onAppearActive"),S=l(()=>{y(null),b(null),o()},"onVisibleChanged");return!m||!v?null:G.createElement(zc,{visible:!0,motionName:i,motionAppear:!0,onAppearStart:T,onAppearActive:C,onVisibleChanged:S},({className:E,style:k},A)=>{const I=Ne(X({},k),{"--thumb-start-left":w,"--thumb-start-width":Th(m==null?void 0:m.width),"--thumb-active-left":x,"--thumb-active-width":Th(v==null?void 0:v.width),"--thumb-start-top":w,"--thumb-start-height":Th(m==null?void 0:m.height),"--thumb-active-top":x,"--thumb-active-height":Th(v==null?void 0:v.height)}),L={ref:xo(d,A),style:I,className:pt(`${e}-thumb`,E)};return G.createElement("div",L)})}l(Hot,"MotionThumb");function Wot(t){var e;if(typeof t.title!="undefined")return t.title;if(typeof t.label!="object")return(e=t.label)==null?void 0:e.toString()}l(Wot,"getValidTitle");function Vot(t){return t.map(e=>{if(typeof e=="object"&&e!==null){const r=Wot(e);return Ne(X({},e),{title:r})}return{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e}})}l(Vot,"normalizeOptions$1");var Got=l(({prefixCls:t,className:e,style:r,styles:n,classNames:a,data:i,disabled:s,checked:o,label:u,title:h,value:d,name:f,onChange:p,onFocus:g,onBlur:m,onKeyDown:y,onKeyUp:v,onMouseDown:b,itemRender:w=l(x=>x,"itemRender")})=>{const x=l(C=>{s||p(C,d)},"handleChange"),T=G.createElement("label",{className:pt(e,{[`${t}-item-disabled`]:s}),style:r,onMouseDown:b},G.createElement("input",{name:f,className:`${t}-item-input`,type:"radio",disabled:s,checked:o,onChange:x,onFocus:g,onBlur:m,onKeyDown:y,onKeyUp:v}),G.createElement("div",{className:pt(`${t}-item-label`,a==null?void 0:a.label),title:h,style:n==null?void 0:n.label},u));return w(T,{item:i})},"InternalSegmentedOption"),Gce=G.forwardRef((t,e)=>{var Y;const V=t,{prefixCls:r="rc-segmented",direction:n,vertical:a,options:i=[],disabled:s,defaultValue:o,value:u,name:h,onChange:d,className:f="",style:p,styles:g,classNames:m,motionName:y="thumb-motion",itemRender:v}=V,b=Xt(V,["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","style","styles","classNames","motionName","itemRender"]),w=G.useRef(null),x=G.useMemo(()=>xo(w,e),[w,e]),T=G.useMemo(()=>Vot(i),[i]),[C,S]=Ta(o!=null?o:(Y=T[0])==null?void 0:Y.value,u),[E,k]=G.useState(!1),A=l((H,q)=>{S(q),d==null||d(q)},"handleChange"),I=ws(b,["children"]),[L,R]=G.useState(!1),[O,M]=G.useState(!1),P=l(()=>{M(!0)},"handleFocus"),z=l(()=>{M(!1)},"handleBlur"),D=l(()=>{R(!1)},"handleMouseDown"),B=l(H=>{H.key==="Tab"&&R(!0)},"handleKeyUp"),W=l(H=>{const q=T.findIndex(Q=>Q.value===C),Z=T.length,K=(q+H+Z)%Z,re=T[K];re&&(S(re.value),d==null||d(re.value))},"onOffset"),U=l(H=>{switch(H.key){case"ArrowLeft":case"ArrowUp":W(-1);break;case"ArrowRight":case"ArrowDown":W(1);break}},"handleKeyDown"),j=l(H=>{const{value:q,disabled:Z}=H;return G.createElement(Got,Vi({},H,{name:h,data:H,itemRender:v,key:q,prefixCls:r,className:pt(H.className,`${r}-item`,m==null?void 0:m.item,{[`${r}-item-selected`]:q===C&&!E,[`${r}-item-focused`]:O&&L&&q===C}),style:g==null?void 0:g.item,classNames:m,styles:g,checked:q===C,onChange:A,onFocus:P,onBlur:z,onKeyDown:U,onKeyUp:B,onMouseDown:D,disabled:!!s||!!Z}))},"renderOption");return G.createElement("div",Vi({role:"radiogroup","aria-label":"segmented control",tabIndex:s?void 0:0,"aria-orientation":a?"vertical":"horizontal",style:p},I,{className:pt(r,{[`${r}-rtl`]:n==="rtl",[`${r}-disabled`]:s,[`${r}-vertical`]:a},f),ref:x}),G.createElement("div",{className:`${r}-group`},G.createElement(Hot,{vertical:a,prefixCls:r,value:C,containerRef:w,motionName:`${r}-${y}`,direction:n,getValueIndex:l(H=>T.findIndex(q=>q.value===H),"getValueIndex"),onMotionStart:l(()=>{k(!0)},"onMotionStart"),onMotionEnd:l(()=>{k(!1)},"onMotionEnd")}),T.map(j)))});Gce.displayName="Segmented";var qot=Gce,Yot=qot;function qce(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}l(qce,"getItemDisabledStyle");function Yce(t){return{background:t.itemSelectedBg,boxShadow:t.boxShadowTertiary}}l(Yce,"getItemSelectedStyle");var Uot=X({overflow:"hidden"},Sg),jot=l(t=>{const{componentCls:e,motionDurationSlow:r,motionEaseInOut:n,motionDurationMid:a}=t,i=t.calc(t.controlHeight).sub(t.calc(t.trackPadding).mul(2)).equal(),s=t.calc(t.controlHeightLG).sub(t.calc(t.trackPadding).mul(2)).equal(),o=t.calc(t.controlHeightSM).sub(t.calc(t.trackPadding).mul(2)).equal();return{[e]:Ne(X(X(Ne(X(Ne(X({},is(t)),{display:"inline-block",padding:t.trackPadding,color:t.itemColor,background:t.trackBg,borderRadius:t.borderRadius,transition:`all ${a}`}),vh(t)),{[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-vertical`]:{[`${e}-group`]:{flexDirection:"column"},[`${e}-thumb`]:{width:"100%",height:0,padding:`0 ${Rt(t.paddingXXS)}`}},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${a}`,borderRadius:t.borderRadiusSM,transform:"translateZ(0)","&-selected":Ne(X({},Yce(t)),{color:t.itemSelectedColor}),"&-focused":oS(t),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,pointerEvents:"none",transition:["opacity","background-color"].map(u=>`${u} ${a}`).join(", ")},[`&:not(${e}-item-selected):not(${e}-item-disabled)`]:{"&:hover, &:active":{color:t.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:t.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:t.itemActiveBg}},"&-label":X({minHeight:i,lineHeight:Rt(i),padding:`0 ${Rt(t.segmentedPaddingHorizontal)}`},Uot),"&-icon + *":{marginInlineStart:t.calc(t.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:Ne(X({},Yce(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${Rt(t.paddingXXS)} 0`,borderRadius:t.borderRadiusSM,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:s,lineHeight:Rt(s),padding:`0 ${Rt(t.segmentedPaddingHorizontal)}`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:o,lineHeight:Rt(o),padding:`0 ${Rt(t.segmentedPaddingHorizontalSM)}`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),qce(`&-disabled ${e}-item`,t)),qce(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{willChange:"transform, width",transition:["transform","width"].map(u=>`${u} ${r} ${n}`).join(", ")},[`&${e}-shape-round`]:{borderRadius:9999,[`${e}-item, ${e}-thumb`]:{borderRadius:9999}}})}},"genSegmentedStyle"),Kot=l(t=>{const{colorTextLabel:e,colorText:r,colorFillSecondary:n,colorBgElevated:a,colorFill:i,lineWidthBold:s,colorBgLayout:o}=t;return{trackPadding:s,trackBg:o,itemColor:e,itemHoverColor:r,itemHoverBg:n,itemSelectedBg:a,itemActiveBg:i,itemSelectedColor:r}},"prepareComponentToken13"),Xot=ea("Segmented",t=>{const{lineWidth:e,calc:r}=t,n=Wn(t,{segmentedPaddingHorizontal:r(t.controlPaddingHorizontal).sub(e).equal(),segmentedPaddingHorizontalSM:r(t.controlPaddingHorizontalSM).sub(e).equal()});return jot(n)},Kot);function Zot(t){return typeof t=="object"&&!!(t!=null&&t.icon)}l(Zot,"isSegmentedLabeledOptionWithIcon");var Qot=G.forwardRef((t,e)=>{const r=S0(),W=t,{prefixCls:n,className:a,rootClassName:i,block:s,options:o=[],size:u="middle",style:h,vertical:d,orientation:f,shape:p="default",name:g=r,styles:m,classNames:y}=W,v=Xt(W,["prefixCls","className","rootClassName","block","options","size","style","vertical","orientation","shape","name","styles","classNames"]),{getPrefixCls:b,direction:w,className:x,style:T,classNames:C,styles:S}=Aa("segmented"),E=Ne(X({},t),{options:o,size:u,shape:p}),[k,A]=Qa([C,y],[S,m],{props:E}),I=b("segmented",n),[L,R]=Xot(I),O=Ll(u),M=G.useMemo(()=>o.map(U=>{if(Zot(U)){const j=U,{icon:V,label:Y}=j,H=Xt(j,["icon","label"]);return Ne(X({},H),{label:G.createElement(G.Fragment,null,G.createElement("span",{className:pt(`${I}-item-icon`,k.icon),style:A.icon},V),Y&&G.createElement("span",null,Y))})}return U}),[o,I,k.icon,A.icon]),[,P]=Ex(f,d),z=pt(a,i,x,k.root,{[`${I}-block`]:s,[`${I}-sm`]:O==="small",[`${I}-lg`]:O==="large",[`${I}-vertical`]:P,[`${I}-shape-${p}`]:p==="round"},L,R),D=X(X(X({},A.root),T),h),B=l((U,{item:j})=>{if(!j.tooltip)return U;const V=typeof j.tooltip=="object"?j.tooltip:{title:j.tooltip};return G.createElement(Ml,X({},V),U)},"itemRender");return G.createElement(Yot,Ne(X({},v),{name:g,className:z,style:D,classNames:k,styles:A,itemRender:B,options:M,ref:e,prefixCls:I,direction:w,vertical:P}))}),Uce=Qot;Uce.displayName="Segmented";var eA=Uce,jce=N.createContext({}),Kce=N.createContext({}),Jot=l(({prefixCls:t,value:e,onChange:r,className:n,style:a})=>{const i=l(()=>{if(r&&e&&!e.cleared){const s=e.toHsb();s.a=0;const o=js(s);o.cleared=!0,r(o)}},"onClick");return N.createElement("div",{className:gne(`${t}-clear`,n),style:a,onClick:i})},"ColorClear"),Xce=Jot,Zce="hex",Qce="rgb",Jce="hsb",elt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"},tlt=elt;function lF(){return lF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},lF.apply(this,arguments)}l(lF,"_extends50");var rlt=l((t,e)=>G.createElement(Vn,lF({},t,{ref:e,icon:tlt})),"MinusOutlined2"),eue=G.forwardRef(rlt);eue.displayName="MinusOutlined";var nlt=eue,alt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},ilt=alt;function cF(){return cF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},cF.apply(this,arguments)}l(cF,"_extends51");var slt=l((t,e)=>G.createElement(Vn,cF({},t,{ref:e,icon:ilt})),"UpOutlined2"),tue=G.forwardRef(slt);tue.displayName="UpOutlined";var olt=tue;function uF(){return typeof BigInt=="function"}l(uF,"supportBigInt");function rue(t){return!t&&t!==0&&!Number.isNaN(t)||!String(t).trim()}l(rue,"isEmpty$3");function Dg(t){var e=t.trim(),r=e.startsWith("-");r&&(e=e.slice(1)),e=e.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),e.startsWith(".")&&(e="0".concat(e));var n=e||"0",a=n.split("."),i=a[0]||"0",s=a[1]||"0";i==="0"&&s==="0"&&(r=!1);var o=r?"-":"";return{negative:r,negativeStr:o,trimStr:n,integerStr:i,decimalStr:s,fullStr:"".concat(o).concat(n)}}l(Dg,"trimNumber");function hF(t){var e=String(t);return!Number.isNaN(Number(e))&&e.includes("e")}l(hF,"isE");function Fg(t){var e=String(t);if(hF(t)){var r=Number(e.slice(e.indexOf("e-")+2)),n=e.match(/\.(\d+)/);return n!=null&&n[1]&&(r+=n[1].length),r}return e.includes(".")&&dF(e)?e.length-e.indexOf(".")-1:0}l(Fg,"getNumberPrecision");function tA(t){var e=String(t);if(hF(t)){if(t>Number.MAX_SAFE_INTEGER)return String(uF()?BigInt(t).toString():Number.MAX_SAFE_INTEGER);if(t<Number.MIN_SAFE_INTEGER)return String(uF()?BigInt(t).toString():Number.MIN_SAFE_INTEGER);e=t.toFixed(Fg(e))}return Dg(e).fullStr}l(tA,"num2str");function dF(t){return typeof t=="number"?!Number.isNaN(t):t?/^\s*-?\d+(\.\d+)?\s*$/.test(t)||/^\s*-?\d+\.\s*$/.test(t)||/^\s*-?\.\d+\s*$/.test(t):!1}l(dF,"validateNumber$1");var llt=function(){function t(e){if(Dd(this,t),oa(this,"origin",""),oa(this,"negative",void 0),oa(this,"integer",void 0),oa(this,"decimal",void 0),oa(this,"decimalLen",void 0),oa(this,"empty",void 0),oa(this,"nan",void 0),rue(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}var r=e;if(hF(r)&&(r=Number(r)),r=typeof r=="string"?r:tA(r),dF(r)){var n=Dg(r);this.negative=n.negative;var a=n.trimStr.split(".");this.integer=BigInt(a[0]);var i=a[1]||"0";this.decimal=BigInt(i),this.decimalLen=i.length}else this.nan=!0}return l(t,"BigIntDecimal2"),Fd(t,[{key:"getMark",value:l(function(){return this.negative?"-":""},"getMark2")},{key:"getIntegerStr",value:l(function(){return this.integer.toString()},"getIntegerStr")},{key:"getDecimalStr",value:l(function(){return this.decimal.toString().padStart(this.decimalLen,"0")},"getDecimalStr")},{key:"alignDecimal",value:l(function(r){var n="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(r,"0"));return BigInt(n)},"alignDecimal")},{key:"negate",value:l(function(){var r=new t(this.toString());return r.negative=!r.negative,r},"negate")},{key:"cal",value:l(function(r,n,a){var i=Math.max(this.getDecimalStr().length,r.getDecimalStr().length),s=this.alignDecimal(i),o=r.alignDecimal(i),u=n(s,o).toString(),h=a(i),d=Dg(u),f=d.negativeStr,p=d.trimStr,g="".concat(f).concat(p.padStart(h+1,"0"));return new t("".concat(g.slice(0,-h),".").concat(g.slice(-h)))},"cal")},{key:"add",value:l(function(r){if(this.isInvalidate())return new t(r);var n=new t(r);return n.isInvalidate()?this:this.cal(n,function(a,i){return a+i},function(a){return a})},"add")},{key:"multi",value:l(function(r){var n=new t(r);return this.isInvalidate()||n.isInvalidate()?new t(NaN):this.cal(n,function(a,i){return a*i},function(a){return a*2})},"multi")},{key:"isEmpty",value:l(function(){return this.empty},"isEmpty2")},{key:"isNaN",value:l(function(){return this.nan},"isNaN2")},{key:"isInvalidate",value:l(function(){return this.isEmpty()||this.isNaN()},"isInvalidate")},{key:"equals",value:l(function(r){return this.toString()===(r==null?void 0:r.toString())},"equals")},{key:"lessEquals",value:l(function(r){return this.add(r.negate().toString()).toNumber()<=0},"lessEquals")},{key:"toNumber",value:l(function(){return this.isNaN()?NaN:Number(this.toString())},"toNumber")},{key:"toString",value:l(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":Dg("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin},"toString")}]),t}(),clt=function(){function t(e){if(Dd(this,t),oa(this,"origin",""),oa(this,"number",void 0),oa(this,"empty",void 0),rue(e)){this.empty=!0;return}this.origin=String(e),this.number=Number(e)}return l(t,"NumberDecimal2"),Fd(t,[{key:"negate",value:l(function(){return new t(-this.toNumber())},"negate")},{key:"add",value:l(function(r){if(this.isInvalidate())return new t(r);var n=Number(r);if(Number.isNaN(n))return this;var a=this.number+n;if(a>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var i=Math.max(Fg(this.number),Fg(n));return new t(a.toFixed(i))},"add")},{key:"multi",value:l(function(r){var n=Number(r);if(this.isInvalidate()||Number.isNaN(n))return new t(NaN);var a=this.number*n;if(a>Number.MAX_SAFE_INTEGER)return new t(Number.MAX_SAFE_INTEGER);if(a<Number.MIN_SAFE_INTEGER)return new t(Number.MIN_SAFE_INTEGER);var i=Math.max(Fg(this.number),Fg(n));return new t(a.toFixed(i))},"multi")},{key:"isEmpty",value:l(function(){return this.empty},"isEmpty2")},{key:"isNaN",value:l(function(){return Number.isNaN(this.number)},"isNaN2")},{key:"isInvalidate",value:l(function(){return this.isEmpty()||this.isNaN()},"isInvalidate")},{key:"equals",value:l(function(r){return this.toNumber()===(r==null?void 0:r.toNumber())},"equals")},{key:"lessEquals",value:l(function(r){return this.add(r.negate().toString()).toNumber()<=0},"lessEquals")},{key:"toNumber",value:l(function(){return this.number},"toNumber")},{key:"toString",value:l(function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":tA(this.number):this.origin},"toString")}]),t}();function nue(t){return uF()?new llt(t):new clt(t)}l(nue,"getMiniDecimal");function rA(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="")return"";var a=Dg(t),i=a.negativeStr,s=a.integerStr,o=a.decimalStr,u="".concat(e).concat(o),h="".concat(i).concat(s);if(r>=0){var d=Number(o[r]);if(d>=5&&!n){var f=nue(t).add("".concat(i,"0.").concat("0".repeat(r)).concat(10-d));return rA(f.toString(),e,r,n)}return r===0?h:"".concat(h).concat(e).concat(o.padEnd(r,"0").slice(0,r))}return u===".0"?h:"".concat(h).concat(u)}l(rA,"toFixed");var Eh=nue;function ult(t,e){return typeof Proxy!="undefined"&&t?new Proxy(t,{get(r,n){if(e[n])return e[n];const a=r[n];return typeof a=="function"?a.bind(r):a}}):t}l(ult,"proxyObject");function hlt(t,e){const r=N.useRef(null);function n(){try{const{selectionStart:i,selectionEnd:s,value:o}=t,u=o.substring(0,i),h=o.substring(s);r.current={start:i,end:s,value:o,beforeTxt:u,afterTxt:h}}catch(i){}}l(n,"recordCursor");function a(){if(t&&r.current&&e)try{const{value:i}=t,{beforeTxt:s,afterTxt:o,start:u}=r.current;let h=i.length;if(i.startsWith(s))h=s.length;else if(i.endsWith(o))h=i.length-r.current.afterTxt.length;else{const d=s[u-1],f=i.indexOf(d,u-1);f!==-1&&(h=f+1)}t.setSelectionRange(h,h)}catch(i){an(!1,`Something warning of cursor restore. Please fire issue about this: ${i.message}`)}}return l(a,"restoreCursor"),[n,a]}l(hlt,"useCursor");var dlt=200,flt=600;function aue({prefixCls:t,action:e,children:r,disabled:n,className:a,style:i,onStep:s}){const o=e==="up",u=G.useRef(),h=G.useRef([]),d=l(()=>{clearTimeout(u.current)},"onStopStep"),f=l(y=>{y.preventDefault(),d(),s(o,"handler");function v(){s(o,"handler"),u.current=setTimeout(v,dlt)}l(v,"loopStep"),u.current=setTimeout(v,flt)},"onStepMouseDown");G.useEffect(()=>()=>{d(),h.current.forEach(y=>{pn.cancel(y)})},[]);const p=`${t}-action`,g=pt(p,`${p}-${e}`,{[`${p}-${e}-disabled`]:n},a),m=l(()=>h.current.push(pn(d)),"safeOnStopStep");return G.createElement("span",{unselectable:"on",role:"button",onMouseUp:m,onMouseLeave:m,onMouseDown:l(y=>{f(y)},"onMouseDown"),"aria-label":o?"Increase Value":"Decrease Value","aria-disabled":n,className:g,style:i},r||G.createElement("span",{unselectable:"on",className:`${t}-action-${e}-inner`}))}l(aue,"StepHandler");function iue(t){const e=typeof t=="number"?tA(t):Dg(t).fullStr;return e.includes(".")?Dg(e.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:t+"0"}l(iue,"getDecupleSteps");var plt=l(()=>{const t=N.useRef(0),e=l(()=>{pn.cancel(t.current)},"cleanUp");return N.useEffect(()=>e,[]),r=>{e(),t.current=pn(()=>{r()})}},"useFrame_default");function HS(){return HS=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},HS.apply(this,arguments)}l(HS,"_extends52");var sue=l((t,e)=>t||e.isEmpty()?e.toString():e.toNumber(),"getDecimalValue"),oue=l(t=>{const e=Eh(t);return e.isInvalidate()?null:e},"getDecimalIfValidate"),lue=G.forwardRef((t,e)=>{const He=t,{mode:r="input",prefixCls:n="rc-input-number",className:a,style:i,classNames:s,styles:o,min:u,max:h,step:d=1,defaultValue:f,value:p,disabled:g,readOnly:m,upHandler:y,downHandler:v,keyboard:b,changeOnWheel:w=!1,controls:x=!0,prefix:T,suffix:C,stringMode:S,parser:E,formatter:k,precision:A,decimalSeparator:I,onChange:L,onInput:R,onPressEnter:O,onStep:M,onMouseDown:P,onClick:z,onMouseUp:D,onMouseLeave:B,onMouseMove:W,onMouseEnter:U,onMouseOut:j,changeOnBlur:V=!0}=He,Y=Xt(He,["mode","prefixCls","className","style","classNames","styles","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","prefix","suffix","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","onMouseDown","onClick","onMouseUp","onMouseLeave","onMouseMove","onMouseEnter","onMouseOut","changeOnBlur"]),[H,q]=G.useState(!1),Z=G.useRef(!1),K=G.useRef(!1),re=G.useRef(!1),Q=G.useRef(null),te=G.useRef(null);G.useImperativeHandle(e,()=>ult(te.current,{focus:l(dt=>{DO(te.current,dt)},"focus"),blur:l(()=>{var dt;(dt=te.current)==null||dt.blur()},"blur"),nativeElement:Q.current}));const[ee,J]=G.useState(()=>Eh(p!=null?p:f));function ae(dt){p===void 0&&J(dt)}l(ae,"setUncontrolledDecimalValue");const se=G.useCallback((dt,Oe)=>{if(!Oe)return A>=0?A:Math.max(Fg(dt),Fg(d))},[A,d]),fe=G.useCallback(dt=>{const Oe=String(dt);if(E)return E(Oe);let vt=Oe;return I&&(vt=vt.replace(I,".")),vt.replace(/[^\w.-]+/g,"")},[E,I]),ve=G.useRef(""),de=G.useCallback((dt,Oe)=>{if(k)return k(dt,{userTyping:Oe,input:String(ve.current)});let vt=typeof dt=="number"?tA(dt):dt;if(!Oe){const qe=se(vt,Oe);dF(vt)&&(I||qe>=0)&&(vt=rA(vt,I||".",qe))}return vt},[k,se,I]),[Ee,Ce]=G.useState(()=>{const dt=f!=null?f:p;return ee.isInvalidate()&&["string","number"].includes(typeof dt)?Number.isNaN(dt)?"":dt:de(ee.toString(),!1)});ve.current=Ee;function De(dt,Oe){Ce(de(dt.isInvalidate()?dt.toString(!1):dt.toString(!Oe),Oe))}l(De,"setInputValue");const ce=G.useMemo(()=>oue(h),[h,A]),Ie=G.useMemo(()=>oue(u),[u,A]),ye=G.useMemo(()=>!ce||!ee||ee.isInvalidate()?!1:ce.lessEquals(ee),[ce,ee]),pe=G.useMemo(()=>!Ie||!ee||ee.isInvalidate()?!1:ee.lessEquals(Ie),[Ie,ee]),[Ae,Ve]=hlt(te.current,H),ze=l(dt=>ce&&!dt.lessEquals(ce)?ce:Ie&&!Ie.lessEquals(dt)?Ie:null,"getRangeValue"),We=l(dt=>!ze(dt),"isInRange"),me=l((dt,Oe)=>{let vt=dt,qe=We(vt)||vt.isEmpty();if(!vt.isEmpty()&&!Oe&&(vt=ze(vt)||vt,qe=!0),!m&&!g&&qe){const Me=vt.toString(),lt=se(Me,Oe);return lt>=0&&(vt=Eh(rA(Me,".",lt)),We(vt)||(vt=Eh(rA(Me,".",lt,!0)))),vt.equals(ee)||(ae(vt),L==null||L(vt.isEmpty()?null:sue(S,vt)),p===void 0&&De(vt,Oe)),vt}return ee},"triggerValueUpdate"),Se=plt(),ne=l(dt=>{if(Ae(),ve.current=dt,Ce(dt),!K.current){const Oe=fe(dt),vt=Eh(Oe);vt.isNaN()||me(vt,!0)}R==null||R(dt),Se(()=>{let Oe=dt;E||(Oe=dt.replace(/。/g,".")),Oe!==dt&&ne(Oe)})},"collectInputValue"),xe=l(()=>{K.current=!0},"onCompositionStart"),oe=l(()=>{K.current=!1,ne(te.current.value)},"onCompositionEnd"),_e=l(dt=>{ne(dt.target.value)},"onInternalInput"),ue=Ur((dt,Oe)=>{var lt;if(dt&&ye||!dt&&pe)return;Z.current=!1;let vt=Eh(re.current?iue(d):d);dt||(vt=vt.negate());const qe=(ee||Eh(0)).add(vt.toString()),Me=me(qe,!1);M==null||M(sue(S,Me),{offset:re.current?iue(d):d,type:dt?"up":"down",emitter:Oe}),(lt=te.current)==null||lt.focus()}),tt=l(dt=>{const Oe=Eh(fe(Ee));let vt;Oe.isNaN()?vt=me(ee,dt):vt=me(Oe,dt),p!==void 0?De(ee,!1):vt.isNaN()||De(vt,!1)},"flushInputValue"),Re=l(()=>{Z.current=!0},"onBeforeInput"),et=l(dt=>{const{key:Oe,shiftKey:vt}=dt;Z.current=!0,re.current=vt,Oe==="Enter"&&(K.current||(Z.current=!1),tt(!1),O==null||O(dt)),b!==!1&&!K.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Oe)&&(ue(Oe==="Up"||Oe==="ArrowUp","keyboard"),dt.preventDefault())},"onKeyDown"),Xe=l(()=>{Z.current=!1,re.current=!1},"onKeyUp");G.useEffect(()=>{if(w&&H){const dt=l(vt=>{ue(vt.deltaY<0,"wheel"),vt.preventDefault()},"onWheel"),Oe=te.current;if(Oe)return Oe.addEventListener("wheel",dt,{passive:!1}),()=>Oe.removeEventListener("wheel",dt)}});const ot=l(()=>{V&&tt(!1),q(!1),Z.current=!1},"onBlur"),Ge=l(dt=>{te.current&&dt.target!==te.current&&(te.current.focus(),dt.preventDefault()),P==null||P(dt)},"onInternalMouseDown");Rk(()=>{ee.isInvalidate()||De(ee,!1)},[A,k]),Rk(()=>{const dt=Eh(p);J(dt);const Oe=Eh(fe(Ee));(!dt.equals(Oe)||!Z.current||k)&&De(dt,Z.current)},[p]),Rk(()=>{k&&Ve()},[Ee]);const ht={prefixCls:n,onStep:ue,className:s==null?void 0:s.action,style:o==null?void 0:o.action},Je=G.createElement(aue,HS({},ht,{action:"up",disabled:ye}),y),St=G.createElement(aue,HS({},ht,{action:"down",disabled:pe}),v);return G.createElement("div",{ref:Q,className:pt(n,`${n}-mode-${r}`,a,s==null?void 0:s.root,{[`${n}-focused`]:H,[`${n}-disabled`]:g,[`${n}-readonly`]:m,[`${n}-not-a-number`]:ee.isNaN(),[`${n}-out-of-range`]:!ee.isInvalidate()&&!We(ee)}),style:X(X({},o==null?void 0:o.root),i),onMouseDown:Ge,onMouseUp:D,onMouseLeave:B,onMouseMove:W,onMouseEnter:U,onMouseOut:j,onClick:z,onFocus:l(()=>{q(!0)},"onFocus"),onBlur:ot,onKeyDown:et,onKeyUp:Xe,onCompositionStart:xe,onCompositionEnd:oe,onBeforeInput:Re},r==="spinner"&&x&&St,T!==void 0&&G.createElement("div",{className:pt(`${n}-prefix`,s==null?void 0:s.prefix),style:o==null?void 0:o.prefix},T),G.createElement("input",HS({autoComplete:"off",role:"spinbutton","aria-valuemin":u,"aria-valuemax":h,"aria-valuenow":ee.isInvalidate()?null:ee.toString(),step:d,ref:te,className:pt(`${n}-input`,s==null?void 0:s.input),style:o==null?void 0:o.input,value:Ee,onChange:_e,disabled:g,readOnly:m},Y)),C!==void 0&&G.createElement("div",{className:pt(`${n}-suffix`,s==null?void 0:s.suffix),style:o==null?void 0:o.suffix},C),r==="spinner"&&x&&Je,r==="input"&&x&&G.createElement("div",{className:pt(`${n}-actions`,s==null?void 0:s.actions),style:o==null?void 0:o.actions},Je,St))});lue.displayName="InputNumber";var glt=lue,mlt=glt,ylt=l(t=>{const{componentCls:e,borderRadius:r,paddingSM:n,colorBorder:a,paddingXS:i,fontSizeLG:s,fontSizeSM:o,borderRadiusLG:u,borderRadiusSM:h,colorBgContainerDisabled:d,lineWidth:f,antCls:p}=t,[g,m]=To(p,"space");return{[e]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:n,margin:0,borderWidth:f,borderStyle:"solid",borderRadius:r,"&:hover":{zIndex:0},[`&${e}-disabled`]:{color:t.colorTextDisabled},"&-large":{fontSize:s,borderRadius:u},"&-small":{paddingInline:i,borderRadius:h,fontSize:o},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[g("addon-border-color")]:a,[g("addon-background")]:d,[g("addon-border-color-outlined")]:a,[g("addon-background-filled")]:d,borderColor:m("addon-border-color"),background:m("addon-background"),"&-variant-outlined":{[g("addon-border-color")]:m("addon-border-color-outlined")},"&-variant-filled":{[g("addon-border-color")]:"transparent",[g("addon-background")]:m("addon-background-filled"),[`&${e}-disabled`]:{[g("addon-border-color")]:a,[g("addon-background")]:d}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[g("addon-border-color-outlined")]:t.colorError,[g("addon-background-filled")]:t.colorErrorBg,color:t.colorError},"&-status-warning":{[g("addon-border-color-outlined")]:t.colorWarning,[g("addon-background-filled")]:t.colorWarningBg,color:t.colorWarning}}]}},"genSpaceAddonStyle"),vlt=ea(["Space","Addon"],t=>[ylt(t),kx(t,{focus:!1})]),blt=N.forwardRef((t,e)=>{const x=t,{className:r,children:n,style:a,prefixCls:i,variant:s="outlined",disabled:o,status:u}=x,h=Xt(x,["className","children","style","prefixCls","variant","disabled","status"]),{getPrefixCls:d,direction:f}=N.useContext(vn),p=d("space-addon",i),[g,m]=vlt(p),{compactItemClassnames:y,compactSize:v}=A0(p,f),b=Mg(p,u),w=pt(p,g,y,m,`${p}-variant-${s}`,b,{[`${p}-${v}`]:v,[`${p}-disabled`]:o},r);return N.createElement("div",X({ref:e,className:w,style:a},h),n)}),cue=blt,xlt=l(t=>{var n;const e=(n=t.handleVisible)!=null?n:"auto",r=t.controlHeightSM-t.lineWidth*2;return Ne(X({},BS(t)),{controlWidth:90,handleWidth:r,handleFontSize:t.fontSize/2,handleVisible:e,handleActiveBg:t.colorFillAlter,handleBg:t.colorBgContainer,filledHandleBg:new pa(t.colorFillSecondary).onBackground(t.colorBgContainer).toHexString(),handleHoverColor:t.colorPrimary,handleBorderColor:t.colorBorder,handleOpacity:e===!0?1:0,handleVisibleWidth:e===!0?r:0})},"prepareComponentToken14"),wlt=l(t=>{const{componentCls:e,lineWidth:r,lineType:n,borderRadius:a,inputFontSizeSM:i,inputFontSizeLG:s,colorError:o,paddingInlineSM:u,paddingBlockSM:h,paddingBlockLG:d,paddingInlineLG:f,colorIcon:p,motionDurationMid:g,handleHoverColor:m,handleOpacity:y,paddingInline:v,paddingBlock:b,handleBg:w,handleActiveBg:x,inputAffixPadding:T,borderRadiusSM:C,controlWidth:S,handleBorderColor:E,filledHandleBg:k,lineHeightLG:A,antCls:I}=t,L=`${Rt(r)} ${n} ${E}`,[R,O]=To(I,"input-number");return[{[e]:Ne(X(X(X(X(Ne(X(X({},is(t)),JD(t)),{[R("input-padding-block")]:Rt(b),[R("input-padding-inline")]:Rt(v),display:"inline-flex",width:S,margin:0,paddingBlock:0,borderRadius:a}),lce(t,{[`${e}-actions`]:{background:w,[`${e}-action-down`]:{borderBlockStart:L}}})),fce(t,{[`${e}-actions`]:{background:k,[`${e}-action-down`]:{borderBlockStart:L}},"&:focus-within":{[`${e}-actions`]:{background:w}}})),yce(t,{[`${e}-actions`]:{background:w,[`${e}-action-down`]:{borderBlockStart:L}}})),uce(t)),{"&-rtl":{direction:"rtl",[`${e}-input`]:{direction:"rtl"}},[`&${e}-out-of-range`]:{[`${e}-input`]:{color:o}},[`${e}-input`]:Ne(X(Ne(X({},is(t)),{width:"100%",paddingBlock:O("input-padding-block"),textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:a,outline:0,transition:`all ${g} linear`,appearance:"textfield",fontSize:"inherit",lineHeight:"inherit"}),vce(t.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}}),[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{width:t.handleWidth,opacity:1},[`&-disabled ${e}-input`]:{cursor:"not-allowed",color:t.colorTextDisabled}})},{[e]:{[`
|
||
${e}-action-up-disabled,
|
||
${e}-action-down-disabled
|
||
`]:{cursor:"not-allowed"},[`${e}-action`]:Ne(X({},sS()),{userSelect:"none",overflow:"hidden",fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",transition:`all ${g} linear`,"&:active":{background:x},"&:hover":{color:m}}),"&-mode-input":{overflow:"hidden",[`${e}-actions`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:t.handleVisibleWidth,opacity:y,height:"100%",borderRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${g}`,overflow:"hidden",[`${e}-action`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",marginInlineEnd:0,fontSize:t.handleFontSize}},[`&:hover ${e}-actions, &-focused ${e}-actions`]:{width:t.handleWidth,opacity:1},[`${e}-action`]:{color:p,height:"50%",borderInlineStart:L,"&:hover":{height:"60%"}},[`&${e}-disabled, &${e}-readonly`]:{[`${e}-actions`]:{display:"none"}}},[`&${e}-mode-spinner`]:{padding:0,width:"auto",[`${e}-action`]:{flex:"none",paddingInline:O("input-padding-inline"),"&-up":{borderInlineStart:L},"&-down":{borderInlineEnd:L}},[`${e}-input`]:{textAlign:"center",paddingInline:O("input-padding-inline")}}}},{[e]:{"&-lg":{[R("input-padding-block")]:Rt(d),[R("input-padding-inline")]:Rt(f),paddingBlock:0,fontSize:s,lineHeight:A},"&-sm":{[R("input-padding-block")]:Rt(h),[R("input-padding-inline")]:Rt(u),paddingBlock:0,fontSize:i,borderRadius:C}}},{[e]:{[`${e}-prefix, ${e}-suffix`]:{display:"flex",flex:"none",alignItems:"center",alignSelf:"center",pointerEvents:"none"},[`${e}-prefix`]:{marginInlineEnd:T},[`${e}-suffix`]:{height:"100%",marginInlineStart:T,transition:`margin ${g}`},[`&:hover:not(${e}-without-controls)`]:{[`${e}-suffix`]:{marginInlineEnd:t.handleWidth}}}}]},"genInputNumberStyles"),Tlt=l(t=>{const{componentCls:e,antCls:r}=t;return{[`${e}-addon`]:{[`&:has(${r}-select)`]:{border:0,padding:0}}}},"genCompatibleStyles"),Elt=ea("InputNumber",t=>{const e=Wn(t,FS(t));return[wlt(e),Tlt(e),kx(e)]},xlt,{unitless:{handleOpacity:!0},resetFont:!1}),uue=G.forwardRef((t,e)=>{const r=G.useRef(null);G.useImperativeHandle(e,()=>r.current);const Q=t,{rootClassName:n,size:a,disabled:i,prefixCls:s,addonBefore:o,addonAfter:u,prefix:h,suffix:d,bordered:f,readOnly:p,status:g,controls:m=!0,variant:y,className:v,style:b,classNames:w,styles:x,mode:T}=Q,C=Xt(Q,["rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant","className","style","classNames","styles","mode"]),{direction:S,className:E,style:k,styles:A,classNames:I}=Aa("inputNumber"),L=G.useContext(xh),R=i!=null?i:L,O=G.useMemo(()=>!m||R||p?!1:m,[m,R,p]),{compactSize:M,compactItemClassnames:P}=A0(s,S);let z=T==="spinner"?G.createElement(Cce,null):G.createElement(olt,null),D=T==="spinner"?G.createElement(nlt,null):G.createElement(ID,null);const B=typeof O=="boolean"?O:void 0;typeof O=="object"&&(z=O.upIcon||z,D=O.downIcon||D);const{hasFeedback:W,isFormItemInput:U,feedbackIcon:j}=G.useContext(oc),V=Ll(te=>{var ee;return(ee=a!=null?a:M)!=null?ee:te}),[Y,H]=B6("inputNumber",y,f),q=W&&G.createElement(G.Fragment,null,j),Z=Ne(X({},t),{size:V,disabled:R,controls:O}),[K,re]=Qa([I,w],[A,x],{props:Z});return G.createElement(mlt,X({ref:r,mode:T,disabled:R,className:pt(v,n,K.root,E,P,Mg(s,g,W),{[`${s}-${Y}`]:H,[`${s}-lg`]:V==="large",[`${s}-sm`]:V==="small",[`${s}-rtl`]:S==="rtl",[`${s}-in-form-item`]:U,[`${s}-without-controls`]:!O}),style:X(X(X({},re.root),k),b),upHandler:z,downHandler:D,prefixCls:s,readOnly:p,controls:B,prefix:h,suffix:q||d,classNames:K,styles:re},C))}),hue=G.forwardRef((t,e)=>{const w=t,{addonBefore:r,addonAfter:n,prefixCls:a,className:i,status:s,rootClassName:o}=w,u=Xt(w,["addonBefore","addonAfter","prefixCls","className","status","rootClassName"]),{getPrefixCls:h}=Aa("inputNumber"),d=h("input-number",a),{status:f}=G.useContext(oc),p=NS(f,s),g=Cu(d),[m,y]=Elt(d,g),v=r||n;{const x=Tn("InputNumber");[["bordered","variant"],["addonAfter","Space.Compact"],["addonBefore","Space.Compact"]].forEach(([T,C])=>{x.deprecated(!(T in t),T,C)}),x(!(t.type==="number"&&t.changeOnWheel),"usage","When `type=number` is used together with `changeOnWheel`, changeOnWheel may not work properly. Please delete `type=number` if it is not necessary.")}const b=G.createElement(uue,Ne(X({ref:e},u),{prefixCls:d,status:p,className:pt(y,g,m,i),rootClassName:v?void 0:o}));if(v){const x=l(S=>S?G.createElement(cue,{className:pt(`${d}-addon`,y,m),variant:t.variant,disabled:t.disabled,status:p},G.createElement(Ig,{form:!0},S)):null,"renderAddon"),T=x(r),C=x(n);return G.createElement(SO,{rootClassName:o},T,b,C)}return b}),fF=hue,Clt=l(t=>G.createElement(y6,{theme:{components:{InputNumber:{handleVisible:!0}}}},G.createElement(hue,X({},t))),"PureInputNumber");uue.displayName="InternalInputNumber",fF.displayName="InputNumber",fF._InternalPanelDoNotUseOrYouWillBeFired=Clt;var due=fF,Slt=l(({prefixCls:t,min:e=0,max:r=100,value:n,onChange:a,className:i,formatter:s})=>{const o=`${t}-steppers`,[u,h]=N.useState(0),d=Number.isNaN(n)?u:n;return N.createElement(due,{className:pt(o,i),min:e,max:r,value:d,formatter:s,size:"small",onChange:l(f=>{h(f||0),a==null||a(f)},"onChange")})},"ColorSteppers"),Bg=Slt,_lt=l(({prefixCls:t,value:e,onChange:r})=>{const n=`${t}-alpha-input`,[a,i]=N.useState(()=>js(e||"#000")),s=e||a,o=l(u=>{const h=s.toHsb();h.a=(u||0)/100;const d=js(h);i(d),r==null||r(d)},"handleAlphaChange");return N.createElement(Bg,{value:MO(s),prefixCls:t,formatter:l(u=>`${u}%`,"formatter"),className:n,onChange:o})},"ColorAlphaInput"),klt=_lt;function Alt(t){return!!(t.addonBefore||t.addonAfter)}l(Alt,"hasAddon");function Nlt(t){return!!(t.prefix||t.suffix||t.allowClear)}l(Nlt,"hasPrefixSuffix");function fue(t,e,r){const n=e.cloneNode(!0),a=Object.create(t,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(n.selectionStart=e.selectionStart,n.selectionEnd=e.selectionEnd),n.setSelectionRange=(...i)=>{e.setSelectionRange(...i)},a}l(fue,"cloneEvent");function nA(t,e,r,n){if(!r)return;let a=e;if(e.type==="click"){a=fue(e,t,""),r(a);return}if(t.type!=="file"&&n!==void 0){a=fue(e,t,n),r(a);return}r(a)}l(nA,"resolveOnChange");function pF(){return pF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pF.apply(this,arguments)}l(pF,"_extends53");var Ilt=N.forwardRef((t,e)=>{var W,U,j;const{inputElement:r,children:n,prefixCls:a,prefix:i,suffix:s,addonBefore:o,addonAfter:u,className:h,style:d,disabled:f,readOnly:p,focused:g,triggerFocus:m,allowClear:y,value:v,handleReset:b,hidden:w,classes:x,classNames:T,dataAttrs:C,styles:S,components:E,onClear:k}=t,A=n!=null?n:r,I=(E==null?void 0:E.affixWrapper)||"span",L=(E==null?void 0:E.groupWrapper)||"span",R=(E==null?void 0:E.wrapper)||"span",O=(E==null?void 0:E.groupAddon)||"span",M=N.useRef(null),P=l(V=>{var Y;(Y=M.current)!=null&&Y.contains(V.target)&&(m==null||m())},"onInputClick"),z=Nlt(t);let D=N.cloneElement(A,{value:v,className:pt((W=A.props)==null?void 0:W.className,!z&&(T==null?void 0:T.variant))||null});const B=N.useRef(null);if(N.useImperativeHandle(e,()=>({nativeElement:B.current||M.current})),z){let V=null;if(y){const Z=!f&&!p&&v,K=`${a}-clear-icon`,re=typeof y=="object"&&(y!=null&&y.clearIcon)?y.clearIcon:"✖";V=N.createElement("button",{type:"button",tabIndex:-1,onClick:l(Q=>{b==null||b(Q),k==null||k()},"onClick"),onMouseDown:l(Q=>Q.preventDefault(),"onMouseDown"),className:pt(K,{[`${K}-hidden`]:!Z,[`${K}-has-suffix`]:!!s})},re)}const Y=`${a}-affix-wrapper`,H=pt(Y,{[`${a}-disabled`]:f,[`${Y}-disabled`]:f,[`${Y}-focused`]:g,[`${Y}-readonly`]:p,[`${Y}-input-with-clear-btn`]:s&&y&&v},x==null?void 0:x.affixWrapper,T==null?void 0:T.affixWrapper,T==null?void 0:T.variant),q=(s||y)&&N.createElement("span",{className:pt(`${a}-suffix`,T==null?void 0:T.suffix),style:S==null?void 0:S.suffix},V,s);D=N.createElement(I,pF({className:H,style:S==null?void 0:S.affixWrapper,onClick:P},C==null?void 0:C.affixWrapper,{ref:M}),i&&N.createElement("span",{className:pt(`${a}-prefix`,T==null?void 0:T.prefix),style:S==null?void 0:S.prefix},i),D,q)}if(Alt(t)){const V=`${a}-group`,Y=`${V}-addon`,H=`${V}-wrapper`,q=pt(`${a}-wrapper`,V,x==null?void 0:x.wrapper,T==null?void 0:T.wrapper),Z=pt(H,{[`${H}-disabled`]:f},x==null?void 0:x.group,T==null?void 0:T.groupWrapper);D=N.createElement(L,{className:Z,ref:B},N.createElement(R,{className:q},o&&N.createElement(O,{className:Y},o),D,u&&N.createElement(O,{className:Y},u)))}return N.cloneElement(D,{className:pt((U=D.props)==null?void 0:U.className,h)||null,style:X(X({},(j=D.props)==null?void 0:j.style),d),hidden:w})}),pue=Ilt;function gue(t,e){return G.useMemo(()=>{let r={};e&&(r.show=typeof e=="object"&&e.formatter?e.formatter:!!e),r=X(X({},r),t);const i=r,{show:n}=i,a=Xt(i,["show"]);return Ne(X({},a),{show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:a.strategy||(s=>s.length)})},[t,e])}l(gue,"useCount");function aA(){return aA=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},aA.apply(this,arguments)}l(aA,"_extends54");var Llt=N.forwardRef((t,e)=>{const fe=t,{autoComplete:r,onChange:n,onFocus:a,onBlur:i,onPressEnter:s,onKeyDown:o,onKeyUp:u,prefixCls:h="rc-input",disabled:d,htmlSize:f,className:p,maxLength:g,suffix:m,showCount:y,count:v,type:b="text",classes:w,classNames:x,styles:T,onCompositionStart:C,onCompositionEnd:S}=fe,E=Xt(fe,["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"]),[k,A]=N.useState(!1),I=N.useRef(!1),L=N.useRef(!1),R=N.useRef(null),O=N.useRef(null),M=l(ve=>{R.current&&DO(R.current,ve)},"focus"),[P,z]=Ta(t.defaultValue,t.value),D=P==null?"":String(P),[B,W]=N.useState(null),U=gue(v,y),j=U.max||g,V=U.strategy(D),Y=!!j&&V>j;N.useImperativeHandle(e,()=>{var ve;return{focus:M,blur:l(()=>{var de;(de=R.current)==null||de.blur()},"blur"),setSelectionRange:l((de,Ee,Ce)=>{var De;(De=R.current)==null||De.setSelectionRange(de,Ee,Ce)},"setSelectionRange"),select:l(()=>{var de;(de=R.current)==null||de.select()},"select"),input:R.current,nativeElement:((ve=O.current)==null?void 0:ve.nativeElement)||R.current}}),N.useEffect(()=>{L.current&&(L.current=!1),A(ve=>ve&&d?!1:ve)},[d]);const H=l((ve,de,Ee)=>{var De,ce;let Ce=de;if(!I.current&&U.exceedFormatter&&U.max&&U.strategy(de)>U.max)Ce=U.exceedFormatter(de,{max:U.max}),de!==Ce&&W([((De=R.current)==null?void 0:De.selectionStart)||0,((ce=R.current)==null?void 0:ce.selectionEnd)||0]);else if(Ee.source==="compositionEnd")return;z(Ce),R.current&&nA(R.current,ve,n,Ce)},"triggerChange");N.useEffect(()=>{var ve;B&&((ve=R.current)==null||ve.setSelectionRange(...B))},[B]);const q=l(ve=>{H(ve,ve.target.value,{source:"change"})},"onInternalChange"),Z=l(ve=>{I.current=!1,H(ve,ve.currentTarget.value,{source:"compositionEnd"}),S==null||S(ve)},"onInternalCompositionEnd"),K=l(ve=>{s&&ve.key==="Enter"&&!L.current&&!ve.nativeEvent.isComposing&&(L.current=!0,s(ve)),o==null||o(ve)},"handleKeyDown"),re=l(ve=>{ve.key==="Enter"&&(L.current=!1),u==null||u(ve)},"handleKeyUp"),Q=l(ve=>{A(!0),a==null||a(ve)},"handleFocus"),te=l(ve=>{L.current&&(L.current=!1),A(!1),i==null||i(ve)},"handleBlur"),ee=l(ve=>{z(""),M(),R.current&&nA(R.current,ve,n)},"handleReset"),J=Y&&`${h}-out-of-range`,ae=l(()=>{const ve=ws(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return N.createElement("input",aA({autoComplete:r},ve,{onChange:q,onFocus:Q,onBlur:te,onKeyDown:K,onKeyUp:re,className:pt(h,{[`${h}-disabled`]:d},x==null?void 0:x.input),style:T==null?void 0:T.input,ref:R,size:f,type:b,onCompositionStart:l(de=>{I.current=!0,C==null||C(de)},"onCompositionStart"),onCompositionEnd:Z}))},"getInputElement"),se=l(()=>{const ve=Number(j)>0;if(m||U.show){const de=U.showFormatter?U.showFormatter({value:D,count:V,maxLength:j}):`${V}${ve?` / ${j}`:""}`;return N.createElement(N.Fragment,null,U.show&&N.createElement("span",{className:pt(`${h}-show-count-suffix`,{[`${h}-show-count-has-suffix`]:!!m},x==null?void 0:x.count),style:X({},T==null?void 0:T.count)},de),m)}return null},"getSuffix");return N.createElement(pue,aA({},E,{prefixCls:h,className:pt(p,J),handleReset:ee,value:D,focused:k,triggerFocus:M,suffix:se(),disabled:d,classes:w,classNames:x,styles:T,ref:O}),ae())}),$lt=Llt,Mlt=$lt,Plt=l(t=>{let e;return typeof t=="object"&&(t!=null&&t.clearIcon)?e=t:t&&(e={clearIcon:N.createElement(cS,null)}),e},"getAllowClear"),mue=Plt;function yue(t,e){const r=N.useRef([]),n=l(()=>{r.current.push(setTimeout(()=>{var a,i,s,o;(a=t.current)!=null&&a.input&&((i=t.current)==null?void 0:i.input.getAttribute("type"))==="password"&&((s=t.current)!=null&&s.input.hasAttribute("value"))&&((o=t.current)==null||o.input.removeAttribute("value"))}))},"removePasswordTimeout");return N.useEffect(()=>(e&&n(),()=>r.current.forEach(a=>{a&&clearTimeout(a)})),[]),n}l(yue,"useRemovePasswordTimeout");function Rlt(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}l(Rlt,"hasPrefixSuffix2");var vue=N.forwardRef((t,e)=>{const De=t,{prefixCls:r,bordered:n=!0,status:a,size:i,disabled:s,onBlur:o,onFocus:u,suffix:h,allowClear:d,addonAfter:f,addonBefore:p,className:g,style:m,styles:y,rootClassName:v,onChange:b,classNames:w,variant:x}=De,T=Xt(De,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]);{const{deprecated:ce}=Tn("Input");[["bordered","variant"],["addonAfter","Space.Compact"],["addonBefore","Space.Compact"]].forEach(([Ie,ye])=>{ce(!(Ie in t),Ie,ye)})}const{getPrefixCls:C,direction:S,allowClear:E,autoComplete:k,className:A,style:I,classNames:L,styles:R}=Aa("input"),O=C("input",r),M=N.useRef(null),P=Cu(O),[z,D]=wce(O,v);Tce(O,P);const{compactSize:B,compactItemClassnames:W}=A0(O,S),U=Ll(ce=>{var Ie;return(Ie=i!=null?i:B)!=null?Ie:ce}),j=N.useContext(xh),V=s!=null?s:j,Y=Ne(X({},t),{size:U,disabled:V}),[H,q]=Qa([L,w],[R,y],{props:Y}),{status:Z,hasFeedback:K,feedbackIcon:re}=N.useContext(oc),Q=NS(Z,a),te=Rlt(t)||!!K,ee=N.useRef(te);{const ce=Tn("Input");N.useEffect(()=>{var Ie;te&&!ee.current&&ce(document.activeElement===((Ie=M.current)==null?void 0:Ie.input),"usage","When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ"),ee.current=te},[te])}const J=yue(M,!0),ae=l(ce=>{J(),o==null||o(ce)},"handleBlur"),se=l(ce=>{J(),u==null||u(ce)},"handleFocus"),fe=l(ce=>{J(),b==null||b(ce)},"handleChange"),ve=(K||h)&&N.createElement(N.Fragment,null,h,K&&re),de=mue(d!=null?d:E),[Ee,Ce]=B6("input",x,n);return N.createElement(Mlt,Ne(X({ref:xo(e,M),prefixCls:O,autoComplete:k},T),{disabled:V,onBlur:ae,onFocus:se,style:X(X(X({},q.root),I),m),styles:q,suffix:ve,allowClear:de,className:pt(g,v,D,P,W,A,H.root),onChange:fe,addonBefore:p&&N.createElement(Ig,{form:!0,space:!0},p),addonAfter:f&&N.createElement(Ig,{form:!0,space:!0},f),classNames:Ne(X({},H),{input:pt({[`${O}-sm`]:U==="small",[`${O}-lg`]:U==="large",[`${O}-rtl`]:S==="rtl"},H.input,z),variant:pt({[`${O}-${Ee}`]:Ce},Mg(O,Q)),affixWrapper:pt({[`${O}-affix-wrapper-sm`]:U==="small",[`${O}-affix-wrapper-lg`]:U==="large",[`${O}-affix-wrapper-rtl`]:S==="rtl"},z),wrapper:pt({[`${O}-group-rtl`]:S==="rtl"},z),groupWrapper:pt({[`${O}-group-wrapper-sm`]:U==="small",[`${O}-group-wrapper-lg`]:U==="large",[`${O}-group-wrapper-rtl`]:S==="rtl",[`${O}-group-wrapper-${Ee}`]:Ce},Mg(`${O}-group-wrapper`,Q,K),z)})}))});vue.displayName="Input";var WS=vue,Olt=/(^#[\da-f]{6}$)|(^#[\da-f]{8}$)/i,Dlt=l(t=>Olt.test(`#${t}`),"isHexString"),Flt=l(({prefixCls:t,value:e,onChange:r})=>{const n=`${t}-hex-input`,[a,i]=N.useState(()=>e?gS(e.toHexString()):void 0);N.useEffect(()=>{e&&i(gS(e.toHexString()))},[e]);const s=l(o=>{const u=o.target.value;i(gS(u)),Dlt(gS(u,!0))&&(r==null||r(js(u)))},"handleHexChange");return N.createElement(WS,{className:n,value:a,prefix:"#",onChange:s,size:"small"})},"ColorHexInput"),Blt=Flt,zlt=l(({prefixCls:t,value:e,onChange:r})=>{const n=`${t}-hsb-input`,[a,i]=N.useState(()=>js(e||"#000")),s=e||a,o=l((u,h)=>{const d=s.toHsb();d[h]=h==="h"?u:(u||0)/100;const f=js(d);i(f),r==null||r(f)},"handleHsbChange");return N.createElement("div",{className:n},N.createElement(Bg,{max:360,min:0,value:Number(s.toHsb().h),prefixCls:t,className:n,formatter:l(u=>S6(u||0).toString(),"formatter"),onChange:l(u=>o(Number(u),"h"),"onChange")}),N.createElement(Bg,{max:100,min:0,value:Number(s.toHsb().s)*100,prefixCls:t,className:n,formatter:l(u=>`${S6(u||0)}%`,"formatter"),onChange:l(u=>o(Number(u),"s"),"onChange")}),N.createElement(Bg,{max:100,min:0,value:Number(s.toHsb().b)*100,prefixCls:t,className:n,formatter:l(u=>`${S6(u||0)}%`,"formatter"),onChange:l(u=>o(Number(u),"b"),"onChange")}))},"ColorHsbInput"),Hlt=zlt,Wlt=l(({prefixCls:t,value:e,onChange:r})=>{const n=`${t}-rgb-input`,[a,i]=N.useState(()=>js(e||"#000")),s=e||a,o=l((u,h)=>{const d=s.toRgb();d[h]=u||0;const f=js(d);i(f),r==null||r(f)},"handleRgbChange");return N.createElement("div",{className:n},N.createElement(Bg,{max:255,min:0,value:Number(s.toRgb().r),prefixCls:t,className:n,onChange:l(u=>o(Number(u),"r"),"onChange")}),N.createElement(Bg,{max:255,min:0,value:Number(s.toRgb().g),prefixCls:t,className:n,onChange:l(u=>o(Number(u),"g"),"onChange")}),N.createElement(Bg,{max:255,min:0,value:Number(s.toRgb().b),prefixCls:t,className:n,onChange:l(u=>o(Number(u),"b"),"onChange")}))},"ColorRgbInput"),Vlt=Wlt,Glt=[Zce,Jce,Qce].map(t=>({value:t,label:t.toUpperCase()})),qlt=l(t=>{const{prefixCls:e,format:r,value:n,disabledAlpha:a,onFormatChange:i,onChange:s,disabledFormat:o}=t,[u,h]=Ta(Zce,r),d=`${e}-input`,f=l(g=>{h(g),i==null||i(g)},"triggerFormatChange"),p=N.useMemo(()=>{const g={value:n,prefixCls:e,onChange:s};switch(u){case Jce:return N.createElement(Hlt,X({},g));case Qce:return N.createElement(Vlt,X({},g));default:return N.createElement(Blt,X({},g))}},[u,e,n,s]);return N.createElement("div",{className:`${d}-container`},!o&&N.createElement(_le,{value:u,variant:"borderless",getPopupContainer:l(g=>g,"getPopupContainer"),popupMatchSelectWidth:68,placement:"bottomRight",onChange:f,className:`${e}-format-select`,size:"small",options:Glt}),N.createElement("div",{className:d},p),!a&&N.createElement(klt,{prefixCls:e,value:n,onChange:s}))},"ColorInput"),Ylt=qlt;function gF(t,e,r){return(t-e)/(r-e)}l(gF,"getOffset2");function mF(t,e,r,n){const a=gF(e,r,n),i={};switch(t){case"rtl":i.right=`${a*100}%`,i.transform="translateX(50%)";break;case"btt":i.bottom=`${a*100}%`,i.transform="translateY(50%)";break;case"ttb":i.top=`${a*100}%`,i.transform="translateY(-50%)";break;default:i.left=`${a*100}%`,i.transform="translateX(-50%)";break}return i}l(mF,"getDirectionStyle");function zg(t,e){return Array.isArray(t)?t[e]:t}l(zg,"getIndex");var Ult=G.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),Hg=Ult,bue=G.createContext({});function yF(){return yF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},yF.apply(this,arguments)}l(yF,"_extends55");var xue=G.forwardRef((t,e)=>{var Y;const V=t,{prefixCls:r,value:n,valueIndex:a,onStartMove:i,onDelete:s,style:o,render:u,dragging:h,draggingDelete:d,onOffsetChange:f,onChangeComplete:p,onFocus:g,onMouseEnter:m}=V,y=Xt(V,["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"]),{min:v,max:b,direction:w,disabled:x,keyboard:T,range:C,tabIndex:S,ariaLabelForHandle:E,ariaLabelledByForHandle:k,ariaRequired:A,ariaValueTextFormatterForHandle:I,styles:L,classNames:R}=G.useContext(Hg),O=`${r}-handle`,M=l(H=>{x||i(H,a)},"onInternalStartMove"),P=l(H=>{g==null||g(H,a)},"onInternalFocus"),z=l(H=>{m(H,a)},"onInternalMouseEnter"),D=l(H=>{if(!x&&T){let q=null;switch(H.which||H.keyCode){case gr.LEFT:q=w==="ltr"||w==="btt"?-1:1;break;case gr.RIGHT:q=w==="ltr"||w==="btt"?1:-1;break;case gr.UP:q=w!=="ttb"?1:-1;break;case gr.DOWN:q=w!=="ttb"?-1:1;break;case gr.HOME:q="min";break;case gr.END:q="max";break;case gr.PAGE_UP:q=2;break;case gr.PAGE_DOWN:q=-2;break;case gr.BACKSPACE:case gr.DELETE:s==null||s(a);break}q!==null&&(H.preventDefault(),f(q,a))}},"onKeyDown"),B=l(H=>{switch(H.which||H.keyCode){case gr.LEFT:case gr.RIGHT:case gr.UP:case gr.DOWN:case gr.HOME:case gr.END:case gr.PAGE_UP:case gr.PAGE_DOWN:p==null||p();break}},"handleKeyUp"),W=mF(w,n,v,b);let U={};a!==null&&(U={tabIndex:x?null:zg(S,a),role:"slider","aria-valuemin":v,"aria-valuemax":b,"aria-valuenow":n,"aria-disabled":x,"aria-label":zg(E,a),"aria-labelledby":zg(k,a),"aria-required":zg(A,a),"aria-valuetext":(Y=zg(I,a))==null?void 0:Y(n),"aria-orientation":w==="ltr"||w==="rtl"?"horizontal":"vertical",onMouseDown:M,onTouchStart:M,onFocus:P,onMouseEnter:z,onKeyDown:D,onKeyUp:B});let j=G.createElement("div",yF({ref:e,className:pt(O,{[`${O}-${a+1}`]:a!==null&&C,[`${O}-dragging`]:h,[`${O}-dragging-delete`]:d},R.handle),style:X(X(X({},W),o),L.handle)},U,y));return u&&(j=u(j,{index:a,prefixCls:r,value:n,dragging:h,draggingDelete:d})),j});xue.displayName="Handle";var wue=xue;function iA(){return iA=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},iA.apply(this,arguments)}l(iA,"_extends56");var Tue=G.forwardRef((t,e)=>{const S=t,{prefixCls:r,style:n,onStartMove:a,onOffsetChange:i,values:s,handleRender:o,activeHandleRender:u,draggingIndex:h,draggingDelete:d,onFocus:f}=S,p=Xt(S,["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"]),g=G.useRef({}),[m,y]=G.useState(!1),[v,b]=G.useState(-1),w=l(E=>{b(E),y(!0)},"onActive"),x=l((E,k)=>{w(k),f==null||f(E)},"onHandleFocus"),T=l((E,k)=>{w(k)},"onHandleMouseEnter");G.useImperativeHandle(e,()=>({focus:l(E=>{var k;(k=g.current[E])==null||k.focus()},"focus"),hideHelp:l(()=>{Rn.flushSync(()=>{y(!1)})},"hideHelp")}));const C=X({prefixCls:r,onStartMove:a,onOffsetChange:i,render:o,onFocus:x,onMouseEnter:T},p);return G.createElement(G.Fragment,null,s.map((E,k)=>{const A=h===k;return G.createElement(wue,iA({ref:l(I=>{I?g.current[k]=I:delete g.current[k]},"ref"),dragging:A,draggingDelete:A&&d,style:zg(n,k),key:k,value:E,valueIndex:k},C))}),u&&m&&G.createElement(wue,iA({key:"a11y"},C,{value:s[v],valueIndex:null,dragging:h!==-1,draggingDelete:d,render:u,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))});Tue.displayName="Handles";var jlt=Tue,Klt=l(t=>{const{prefixCls:e,style:r,children:n,value:a,onClick:i}=t,{min:s,max:o,direction:u,includedStart:h,includedEnd:d,included:f}=G.useContext(Hg),p=`${e}-text`,g=mF(u,a,s,o);return G.createElement("span",{className:pt(p,{[`${p}-active`]:f&&h<=a&&a<=d}),style:X(X({},g),r),onMouseDown:l(m=>{m.stopPropagation()},"onMouseDown"),onClick:l(()=>{i(a)},"onClick")},n)},"Mark"),Xlt=Klt,Zlt=l(t=>{const{prefixCls:e,marks:r,onClick:n}=t,a=`${e}-mark`;return r.length?G.createElement("div",{className:a},r.map(({value:i,style:s,label:o})=>G.createElement(Xlt,{key:i,prefixCls:a,style:s,value:i,onClick:n},o))):null},"Marks"),Qlt=Zlt,Jlt=l(t=>{const{prefixCls:e,value:r,style:n,activeStyle:a}=t,{min:i,max:s,direction:o,included:u,includedStart:h,includedEnd:d}=G.useContext(Hg),f=`${e}-dot`,p=u&&h<=r&&r<=d;let g=X(X({},mF(o,r,i,s)),typeof n=="function"?n(r):n);return p&&(g=X(X({},g),typeof a=="function"?a(r):a)),G.createElement("span",{className:pt(f,{[`${f}-active`]:p}),style:g})},"Dot"),ect=Jlt,tct=l(t=>{const{prefixCls:e,marks:r,dots:n,style:a,activeStyle:i}=t,{min:s,max:o,step:u}=G.useContext(Hg),h=G.useMemo(()=>{const d=new Set;if(r.forEach(f=>{d.add(f.value)}),n&&u!==null){let f=s;for(;f<=o;)d.add(f),f+=u}return Array.from(d)},[s,o,u,n,r]);return G.createElement("div",{className:`${e}-step`},h.map(d=>G.createElement(ect,{prefixCls:e,key:d,value:d,style:a,activeStyle:i})))},"Steps"),rct=tct,nct=l(t=>{const{prefixCls:e,style:r,start:n,end:a,index:i,onStartMove:s,replaceCls:o}=t,{direction:u,min:h,max:d,disabled:f,range:p,classNames:g}=G.useContext(Hg),m=`${e}-track`,y=gF(n,h,d),v=gF(a,h,d),b=l(T=>{!f&&s&&s(T,-1)},"onInternalStartMove"),w={};switch(u){case"rtl":w.right=`${y*100}%`,w.width=`${v*100-y*100}%`;break;case"btt":w.bottom=`${y*100}%`,w.height=`${v*100-y*100}%`;break;case"ttb":w.top=`${y*100}%`,w.height=`${v*100-y*100}%`;break;default:w.left=`${y*100}%`,w.width=`${v*100-y*100}%`}const x=o||pt(m,{[`${m}-${i+1}`]:i!==null&&p,[`${e}-track-draggable`]:s},g.track);return G.createElement("div",{className:x,style:X(X({},w),r),onMouseDown:b,onTouchStart:b})},"Track"),Eue=nct,act=l(t=>{const{prefixCls:e,style:r,values:n,startPoint:a,onStartMove:i}=t,{included:s,range:o,min:u,styles:h,classNames:d}=G.useContext(Hg),f=G.useMemo(()=>{if(!o){if(n.length===0)return[];const m=a!=null?a:u,y=n[0];return[{start:Math.min(m,y),end:Math.max(m,y)}]}const g=[];for(let m=0;m<n.length-1;m+=1)g.push({start:n[m],end:n[m+1]});return g},[n,o,a,u]);if(!s)return null;const p=f!=null&&f.length&&(d.tracks||h.tracks)?G.createElement(Eue,{index:null,prefixCls:e,start:f[0].start,end:f[f.length-1].end,replaceCls:pt(d.tracks,`${e}-tracks`),style:h.tracks}):null;return G.createElement(G.Fragment,null,p,f.map(({start:g,end:m},y)=>G.createElement(Eue,{index:y,prefixCls:e,style:X(X({},zg(r,y)),h.track),start:g,end:m,key:y,onStartMove:i})))},"Tracks"),ict=act,sct=130;function Cue(t){const e="targetTouches"in t?t.targetTouches[0]:t;return{pageX:e.pageX,pageY:e.pageY}}l(Cue,"getPosition2");function oct(t,e,r,n,a,i,s,o,u,h,d){const[f,p]=G.useState(null),[g,m]=G.useState(-1),[y,v]=G.useState(!1),[b,w]=G.useState(r),[x,T]=G.useState(r),C=G.useRef(null),S=G.useRef(null),E=G.useRef(null),{onDragStart:k,onDragChange:A}=G.useContext(bue);On(()=>{g===-1&&w(r)},[r,g]),G.useEffect(()=>()=>{document.removeEventListener("mousemove",C.current),document.removeEventListener("mouseup",S.current),E.current&&(E.current.removeEventListener("touchmove",C.current),E.current.removeEventListener("touchend",S.current))},[]);const I=l((M,P,z)=>{P!==void 0&&p(P),w(M);let D=M;z&&(D=M.filter((B,W)=>W!==g)),s(D),A&&A({rawValues:M,deleteIndex:z?g:-1,draggingIndex:g,draggingValue:P})},"flushValues"),L=Ur((M,P,z)=>{if(M===-1){const D=x[0],B=x[x.length-1],W=n-D,U=a-B;let j=P*(a-n);j=Math.max(j,W),j=Math.min(j,U),j=i(D+j)-D;const Y=x.map(H=>H+j);I(Y)}else{const D=(a-n)*P,B=[...b];B[M]=x[M];const W=u(B,D,M,"dist");I(W.values,W.value,z)}}),R=l((M,P,z)=>{M.stopPropagation();const D=z||r,B=D[P];m(P),p(B),T(D),w(D),v(!1);const{pageX:W,pageY:U}=Cue(M);let j=!1;k&&k({rawValues:D,draggingIndex:P,draggingValue:B});const V=l(H=>{H.preventDefault();const{pageX:q,pageY:Z}=Cue(H),K=q-W,re=Z-U,{width:Q,height:te}=t.current.getBoundingClientRect();let ee,J;switch(e){case"btt":ee=-re/te,J=K;break;case"ttb":ee=re/te,J=K;break;case"rtl":ee=-K/Q,J=re;break;default:ee=K/Q,J=re}j=h?Math.abs(J)>sct&&d<b.length:!1,v(j),L(P,ee,j)},"onMouseMove"),Y=l(H=>{H.preventDefault(),document.removeEventListener("mouseup",Y),document.removeEventListener("mousemove",V),E.current&&(E.current.removeEventListener("touchmove",C.current),E.current.removeEventListener("touchend",S.current)),C.current=null,S.current=null,E.current=null,o(j),m(-1),v(!1)},"onMouseUp");document.addEventListener("mouseup",Y),document.addEventListener("mousemove",V),M.currentTarget.addEventListener("touchend",Y),M.currentTarget.addEventListener("touchmove",V),C.current=V,S.current=Y,E.current=M.currentTarget},"onStartMove"),O=G.useMemo(()=>{const M=[...r].sort((W,U)=>W-U),P=[...b].sort((W,U)=>W-U),z={};P.forEach(W=>{z[W]=(z[W]||0)+1}),M.forEach(W=>{z[W]=(z[W]||0)-1});const D=h?1:0;return Object.values(z).reduce((W,U)=>W+Math.abs(U),0)<=D?b:r},[r,b,h]);return[g,f,y,O,R]}l(oct,"useDrag");var lct=oct;function cct(t,e,r,n,a,i){const s=G.useCallback(g=>Math.max(t,Math.min(e,g)),[t,e]),o=G.useCallback(g=>{if(r!==null){const m=t+Math.round((s(g)-t)/r)*r,y=l(w=>(String(w).split(".")[1]||"").length,"getDecimal"),v=Math.max(y(r),y(e),y(t)),b=Number(m.toFixed(v));return t<=b&&b<=e?b:null}return null},[r,t,e,s]),u=G.useCallback(g=>{const m=s(g),y=n.map(w=>w.value);r!==null&&y.push(o(g)),y.push(t,e);let v=y[0],b=e-t;return y.forEach(w=>{const x=Math.abs(m-w);x<=b&&(v=w,b=x)}),v},[t,e,n,r,s,o]),h=l((g,m,y,v="unit")=>{if(typeof m=="number"){let b;const w=g[y],x=w+m;let T=[];n.forEach(k=>{T.push(k.value)}),T.push(t,e),T.push(o(w));const C=m>0?1:-1;v==="unit"?T.push(o(w+C*r)):T.push(o(x)),T=T.filter(k=>k!==null).filter(k=>m<0?k<=w:k>=w),v==="unit"&&(T=T.filter(k=>k!==w));const S=v==="unit"?w:x;b=T[0];let E=Math.abs(b-S);if(T.forEach(k=>{const A=Math.abs(k-S);A<E&&(b=k,E=A)}),b===void 0)return m<0?t:e;if(v==="dist")return b;if(Math.abs(m)>1){const k=[...g];return k[y]=b,h(k,m-C,y,v)}return b}else{if(m==="min")return t;if(m==="max")return e}},"offsetValue"),d=l((g,m,y,v="unit")=>{const b=g[y],w=h(g,m,y,v);return{value:w,changed:w!==b}},"offsetChangedValue"),f=l(g=>i===null&&g===0||typeof i=="number"&&g<i,"needPush");return[u,l((g,m,y,v="unit")=>{const b=g.map(u),w=b[y],x=h(b,m,y,v);if(b[y]=x,a===!1){const T=i||0;y>0&&b[y-1]!==w&&(b[y]=Math.max(b[y],b[y-1]+T)),y<b.length-1&&b[y+1]!==w&&(b[y]=Math.min(b[y],b[y+1]-T))}else if(typeof i=="number"||i===null){for(let T=y+1;T<b.length;T+=1){let C=!0;for(;f(b[T]-b[T-1])&&C;)({value:b[T],changed:C}=d(b,1,T))}for(let T=y;T>0;T-=1){let C=!0;for(;f(b[T]-b[T-1])&&C;)({value:b[T-1],changed:C}=d(b,-1,T-1))}for(let T=b.length-1;T>0;T-=1){let C=!0;for(;f(b[T]-b[T-1])&&C;)({value:b[T-1],changed:C}=d(b,-1,T-1))}for(let T=0;T<b.length-1;T+=1){let C=!0;for(;f(b[T+1]-b[T])&&C;)({value:b[T+1],changed:C}=d(b,1,T+1))}}return{value:b[y],values:b}},"offsetValues")]}l(cct,"useOffset");function uct(t){return N.useMemo(()=>{if(t===!0||!t)return[!!t,!1,!1,0];const{editable:e,draggableTrack:r,minCount:n,maxCount:a}=t;return p0(!e||!r,"`editable` can not work with `draggableTrack`."),[!0,e,!e&&r,n||0,a]},[t])}l(uct,"useRange");var Sue=G.forwardRef((t,e)=>{const{prefixCls:r="rc-slider",className:n,style:a,classNames:i,styles:s,id:o,disabled:u=!1,keyboard:h=!0,autoFocus:d,onFocus:f,onBlur:p,min:g=0,max:m=100,step:y=1,value:v,defaultValue:b,range:w,count:x,onChange:T,onBeforeChange:C,onAfterChange:S,onChangeComplete:E,allowCross:k=!0,pushable:A=!1,reverse:I,vertical:L,included:R=!0,startPoint:O,trackStyle:M,handleStyle:P,railStyle:z,dotStyle:D,activeDotStyle:B,marks:W,dots:U,handleRender:j,activeHandleRender:V,track:Y,tabIndex:H=0,ariaLabelForHandle:q,ariaLabelledByForHandle:Z,ariaRequired:K,ariaValueTextFormatterForHandle:re}=t,Q=G.useRef(null),te=G.useRef(null),ee=G.useMemo(()=>L?I?"ttb":"btt":I?"rtl":"ltr",[I,L]),[J,ae,se,fe,ve]=uct(w),de=G.useMemo(()=>isFinite(g)?g:0,[g]),Ee=G.useMemo(()=>isFinite(m)?m:100,[m]),Ce=G.useMemo(()=>y!==null&&y<=0?1:y,[y]),De=G.useMemo(()=>typeof A=="boolean"?A?Ce:!1:A>=0?A:!1,[A,Ce]),ce=G.useMemo(()=>Object.keys(W||{}).map(vt=>{const qe=W[vt],Me={value:Number(vt)};return qe&&typeof qe=="object"&&!G.isValidElement(qe)&&("label"in qe||"style"in qe)?(Me.style=qe.style,Me.label=qe.label):Me.label=qe,Me}).filter(({label:vt})=>vt||typeof vt=="number").sort((vt,qe)=>vt.value-qe.value),[W]),[Ie,ye]=cct(de,Ee,Ce,ce,k,De),[pe,Ae]=Ta(b,v),Ve=G.useMemo(()=>{var lt;const vt=pe==null?[]:Array.isArray(pe)?pe:[pe],[qe=de]=vt;let Me=pe===null?[]:[qe];if(J){if(Me=[...vt],x||pe===void 0){const it=x>=0?x+1:2;for(Me=Me.slice(0,it);Me.length<it;)Me.push((lt=Me[Me.length-1])!=null?lt:de)}Me.sort((it,Ue)=>it-Ue)}return Me.forEach((it,Ue)=>{Me[Ue]=Ie(it)}),Me},[pe,J,de,x,Ie]),ze=l(vt=>J?vt:vt[0],"getTriggerValue"),We=Ur(vt=>{const qe=[...vt].sort((Me,lt)=>Me-lt);T&&!v0(qe,Ve,!0)&&T(ze(qe)),Ae(qe)}),me=Ur(vt=>{vt&&Q.current.hideHelp();const qe=ze(Ve);S==null||S(qe),an(!S,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),E==null||E(qe)}),Se=l(vt=>{if(u||!ae||Ve.length<=fe)return;const qe=[...Ve];qe.splice(vt,1),C==null||C(ze(qe)),We(qe);const Me=Math.max(0,vt-1);Q.current.hideHelp(),Q.current.focus(Me)},"onDelete"),[ne,xe,oe,_e,ue]=lct(te,ee,Ve,de,Ee,Ie,We,me,ye,ae,fe),tt=l((vt,qe)=>{var Me,lt;if(!u){const it=[...Ve];let Ue=0,we=0,gt=Ee-de;Ve.forEach((be,$e)=>{const le=Math.abs(vt-be);le<=gt&&(gt=le,Ue=$e),be<vt&&(we=$e)});let ge=Ue;ae&>!==0&&(!ve||Ve.length<ve)?(it.splice(we+1,0,vt),ge=we+1):it[Ue]=vt,J&&!Ve.length&&x===void 0&&it.push(vt);const ie=ze(it);C==null||C(ie),We(it),qe?((lt=(Me=document.activeElement)==null?void 0:Me.blur)==null||lt.call(Me),Q.current.focus(ge),ue(qe,ge,it)):(S==null||S(ie),an(!S,"[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."),E==null||E(ie))}},"changeToCloseValue"),Re=l(vt=>{vt.preventDefault();const{width:qe,height:Me,left:lt,top:it,bottom:Ue,right:we}=te.current.getBoundingClientRect(),{clientX:gt,clientY:ge}=vt;let ie;switch(ee){case"btt":ie=(Ue-ge)/Me;break;case"ttb":ie=(ge-it)/Me;break;case"rtl":ie=(we-gt)/qe;break;default:ie=(gt-lt)/qe}const be=de+ie*(Ee-de);tt(Ie(be),vt)},"onSliderMouseDown"),[et,Xe]=G.useState(null),ot=l((vt,qe)=>{if(!u){const Me=ye(Ve,vt,qe);C==null||C(ze(Ve)),We(Me.values),Xe(Me.value)}},"onHandleOffsetChange");G.useEffect(()=>{if(et!==null){const vt=Ve.indexOf(et);vt>=0&&Q.current.focus(vt)}Xe(null)},[et]);const Ge=G.useMemo(()=>se&&Ce===null?(an(!1,"`draggableTrack` is not supported when `step` is `null`."),!1):se,[se,Ce]),ht=Ur((vt,qe)=>{ue(vt,qe),C==null||C(ze(Ve))}),Je=ne!==-1;G.useEffect(()=>{if(!Je){const vt=Ve.lastIndexOf(xe);Q.current.focus(vt)}},[Je]);const St=G.useMemo(()=>[..._e].sort((vt,qe)=>vt-qe),[_e]),[He,dt]=G.useMemo(()=>J?[St[0],St[St.length-1]]:[de,St[0]],[St,J,de]);G.useImperativeHandle(e,()=>({focus:l(()=>{Q.current.focus(0)},"focus"),blur:l(()=>{var qe;const{activeElement:vt}=document;(qe=te.current)!=null&&qe.contains(vt)&&(vt==null||vt.blur())},"blur")})),G.useEffect(()=>{d&&Q.current.focus(0)},[]);const Oe=G.useMemo(()=>({min:de,max:Ee,direction:ee,disabled:u,keyboard:h,step:Ce,included:R,includedStart:He,includedEnd:dt,range:J,tabIndex:H,ariaLabelForHandle:q,ariaLabelledByForHandle:Z,ariaRequired:K,ariaValueTextFormatterForHandle:re,styles:s||{},classNames:i||{}}),[de,Ee,ee,u,h,Ce,R,He,dt,J,H,q,Z,K,re,s,i]);return G.createElement(Hg.Provider,{value:Oe},G.createElement("div",{ref:te,className:pt(r,n,{[`${r}-disabled`]:u,[`${r}-vertical`]:L,[`${r}-horizontal`]:!L,[`${r}-with-marks`]:ce.length}),style:a,onMouseDown:Re,id:o},G.createElement("div",{className:pt(`${r}-rail`,i==null?void 0:i.rail),style:X(X({},z),s==null?void 0:s.rail)}),Y!==!1&&G.createElement(ict,{prefixCls:r,style:M,values:Ve,startPoint:O,onStartMove:Ge?ht:void 0}),G.createElement(rct,{prefixCls:r,marks:ce,dots:U,style:D,activeStyle:B}),G.createElement(jlt,{ref:Q,prefixCls:r,style:P,values:_e,draggingIndex:ne,draggingDelete:oe,onStartMove:ht,onOffsetChange:ot,onFocus:f,onBlur:p,handleRender:j,activeHandleRender:V,onChangeComplete:me,onDelete:ae?Se:void 0}),G.createElement(Qlt,{prefixCls:r,marks:ce,onClick:tt})))});Sue.displayName="Slider";var hct=Sue,dct=hct,fct=N.createContext({}),_ue=fct,kue=G.forwardRef((t,e)=>{const{open:r,draggingDelete:n,value:a}=t,i=N.useRef(null),s=r&&!n,o=N.useRef(null);function u(){pn.cancel(o.current),o.current=null}l(u,"cancelKeepAlign");function h(){o.current=pn(()=>{var d;(d=i.current)==null||d.forceAlign(),o.current=null})}return l(h,"keepAlign"),G.useEffect(()=>(s?h():u(),u),[s,t.title,a]),G.createElement(Ml,Ne(X({ref:xo(i,e)},t),{open:s}))});kue.displayName="SliderTooltip";var Aue=kue,pct=l(t=>{const{componentCls:e,antCls:r,controlSize:n,dotSize:a,marginFull:i,marginPart:s,colorFillContentHover:o,handleColorDisabled:u,calc:h,handleSize:d,handleSizeHover:f,handleActiveColor:p,handleActiveOutlineColor:g,handleLineWidth:m,handleLineWidthHover:y,motionDurationMid:v}=t;return{[e]:Ne(X({},is(t)),{position:"relative",height:n,margin:`${Rt(s)} ${Rt(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${Rt(i)} ${Rt(s)}`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.railBg,borderRadius:t.borderRadiusXS,transition:`background-color ${v}`},[`${e}-track,${e}-tracks`]:{position:"absolute",transition:`background-color ${v}`},[`${e}-track`]:{backgroundColor:t.trackBg,borderRadius:t.borderRadiusXS},[`${e}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${e}-rail`]:{backgroundColor:t.railHoverBg},[`${e}-track`]:{backgroundColor:t.trackHoverBg},[`${e}-dot`]:{borderColor:o},[`${e}-handle::after`]:{boxShadow:`0 0 0 ${Rt(m)} ${t.colorPrimaryBorderHover}`},[`${e}-dot-active`]:{borderColor:t.dotActiveBorderColor}},[`${e}-handle`]:{position:"absolute",width:d,height:d,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:h(m).mul(-1).equal(),insetBlockStart:h(m).mul(-1).equal(),width:h(d).add(h(m).mul(2)).equal(),height:h(d).add(h(m).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:d,height:d,backgroundColor:t.colorBgElevated,boxShadow:`0 0 0 ${Rt(m)} ${t.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:["inset-inline-start","inset-block-start","width","height","box-shadow","outline"].map(b=>`${b} ${v}`).join(", ")},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:h(f).sub(d).div(2).add(y).mul(-1).equal(),insetBlockStart:h(f).sub(d).div(2).add(y).mul(-1).equal(),width:h(f).add(h(y).mul(2)).equal(),height:h(f).add(h(y).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${Rt(y)} ${p}`,outline:`6px solid ${g}`,width:f,height:f,insetInlineStart:t.calc(d).sub(f).div(2).equal(),insetBlockStart:t.calc(d).sub(f).div(2).equal()}}},[`&-lock ${e}-handle`]:{"&::before, &::after":{transition:"none"}},[`${e}-mark`]:{position:"absolute",fontSize:t.fontSize},[`${e}-mark-text`]:{position:"absolute",display:"inline-block",color:t.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:t.colorText}},[`${e}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${e}-dot`]:{position:"absolute",width:a,height:a,backgroundColor:t.colorBgElevated,border:`${Rt(m)} solid ${t.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:t.dotActiveBorderColor}},[`&${e}-disabled`]:{cursor:"not-allowed",[`${e}-rail`]:{backgroundColor:`${t.railBg} !important`},[`${e}-track`]:{backgroundColor:`${t.trackBgDisabled} !important`},[`
|
||
${e}-dot
|
||
`]:{backgroundColor:t.colorBgElevated,borderColor:t.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${e}-handle::after`]:{backgroundColor:t.colorBgElevated,cursor:"not-allowed",width:d,height:d,boxShadow:`0 0 0 ${Rt(m)} ${u}`,insetInlineStart:0,insetBlockStart:0},[`
|
||
${e}-mark-text,
|
||
${e}-dot
|
||
`]:{cursor:"not-allowed !important"}},[`&-tooltip ${r}-tooltip-container`]:{minWidth:"unset"}})}},"genBaseStyle6"),Nue=l((t,e)=>{const{componentCls:r,railSize:n,handleSize:a,dotSize:i,marginFull:s,calc:o}=t,u=e?"paddingBlock":"paddingInline",h=e?"width":"height",d=e?"height":"width",f=e?"insetBlockStart":"insetInlineStart",p=e?"top":"insetInlineStart",g=o(n).mul(3).sub(a).div(2).equal(),m=o(a).sub(n).div(2).equal(),y=e?{borderWidth:`${Rt(m)} 0`,transform:`translateY(${Rt(o(m).mul(-1).equal())})`}:{borderWidth:`0 ${Rt(m)}`,transform:`translateX(${Rt(t.calc(m).mul(-1).equal())})`};return{[u]:n,[d]:o(n).mul(3).equal(),[`${r}-rail`]:{[h]:"100%",[d]:n},[`${r}-track,${r}-tracks`]:{[d]:n},[`${r}-track-draggable`]:X({},y),[`${r}-handle`]:{[f]:g},[`${r}-mark`]:{insetInlineStart:0,top:0,[p]:o(n).mul(3).add(e?0:s).equal(),[h]:"100%"},[`${r}-step`]:{insetInlineStart:0,top:0,[p]:n,[h]:"100%",[d]:n},[`${r}-dot`]:{position:"absolute",[f]:o(n).sub(i).div(2).equal()}}},"genDirectionStyle"),gct=l(t=>{const{componentCls:e,marginPartWithMark:r}=t;return{[`${e}-horizontal`]:Ne(X({},Nue(t,!0)),{[`&${e}-with-marks`]:{marginBottom:r}})}},"genHorizontalStyle"),mct=l(t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:Ne(X({},Nue(t,!1)),{height:"100%"})}},"genVerticalStyle"),yct=l(t=>{const r=t.controlHeightLG/4,n=t.controlHeightSM/2,a=t.lineWidth+1,i=t.lineWidth+1*1.5,s=t.colorPrimary,o=new pa(s).setA(.2).toRgbString();return{controlSize:r,railSize:4,handleSize:r,handleSizeHover:n,dotSize:8,handleLineWidth:a,handleLineWidthHover:i,railBg:t.colorFillTertiary,railHoverBg:t.colorFillSecondary,trackBg:t.colorPrimaryBorder,trackHoverBg:t.colorPrimaryBorderHover,handleColor:t.colorPrimaryBorder,handleActiveColor:s,handleActiveOutlineColor:o,handleColorDisabled:new pa(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString(),dotBorderColor:t.colorBorderSecondary,dotActiveBorderColor:t.colorPrimaryBorder,trackBgDisabled:t.colorBgContainerDisabled}},"prepareComponentToken15"),vct=ea("Slider",t=>{const e=Wn(t,{marginPart:t.calc(t.controlHeight).sub(t.controlSize).div(2).equal(),marginFull:t.calc(t.controlSize).div(2).equal(),marginPartWithMark:t.calc(t.controlHeightLG).sub(t.controlSize).equal()});return[pct(e),gct(e),mct(e)]},yct);function vF(){const[t,e]=G.useState(!1),r=G.useRef(null),n=l(()=>{pn.cancel(r.current)},"cleanup2"),a=l(i=>{n(),i?e(i):r.current=pn(()=>{e(i)})},"setDelayState");return G.useEffect(()=>n,[]),[t,a]}l(vF,"useRafLock");function bct(t){return t||t===null?t:e=>typeof e=="number"?e.toString():""}l(bct,"getTipFormatter");var Iue=N.forwardRef((t,e)=>{const ce=t,{prefixCls:r,range:n,className:a,rootClassName:i,style:s,disabled:o,tooltip:u={},onChangeComplete:h,classNames:d,styles:f,vertical:p,orientation:g}=ce,m=Xt(ce,["prefixCls","range","className","rootClassName","style","disabled","tooltip","onChangeComplete","classNames","styles","vertical","orientation"]),[,y]=Ex(g,p),{getPrefixCls:v,direction:b,className:w,style:x,classNames:T,styles:C,getPopupContainer:S}=Aa("slider"),E=N.useContext(xh),k=o!=null?o:E,A=Ne(X({},t),{disabled:k,vertical:y}),[I,L]=Qa([T,d],[C,f],{props:A}),{handleRender:R,direction:O}=N.useContext(_ue),P=(O||b)==="rtl",[z,D]=vF(),[B,W]=vF(),U=X({},u),{open:j,placement:V,getPopupContainer:Y,prefixCls:H,formatter:q}=U,Z=j,K=(z||B)&&Z!==!1,re=bct(q),[Q,te]=vF(),ee=l(Ie=>{h==null||h(Ie),te(!1)},"onInternalChangeComplete"),J=l((Ie,ye)=>Ie||(ye?P?"left":"right":"top"),"getTooltipPlacement"),ae=v("slider",r),[se,fe]=vct(ae),ve=pt(a,w,I.root,i,{[`${ae}-rtl`]:P,[`${ae}-lock`]:Q},se,fe);P&&!y&&(m.reverse=!m.reverse);{const Ie=Tn("Slider");[["tooltipPrefixCls","prefixCls"],["getTooltipPopupContainer","getPopupContainer"],["tipFormatter","formatter"],["tooltipPlacement","placement"],["tooltipVisible","open"]].forEach(([ye,pe])=>{Ie.deprecated(!(ye in t),ye,`tooltip.${pe}`)})}N.useEffect(()=>{const Ie=l(()=>{pn(()=>{W(!1)},1)},"onMouseUp");return document.addEventListener("mouseup",Ie),()=>{document.removeEventListener("mouseup",Ie)}},[]);const de=n&&!Z,Ee=R||((Ie,ye)=>{const{index:pe}=ye,Ae=Ie.props;function Ve(Se,ne,xe){var oe,_e;xe&&((oe=m[Se])==null||oe.call(m,ne)),(_e=Ae[Se])==null||_e.call(Ae,ne)}l(Ve,"proxyEvent");const ze=Ne(X({},Ae),{onMouseEnter:l(Se=>{D(!0),Ve("onMouseEnter",Se)},"onMouseEnter"),onMouseLeave:l(Se=>{D(!1),Ve("onMouseLeave",Se)},"onMouseLeave"),onMouseDown:l(Se=>{W(!0),te(!0),Ve("onMouseDown",Se)},"onMouseDown"),onFocus:l(Se=>{var ne;W(!0),(ne=m.onFocus)==null||ne.call(m,Se),Ve("onFocus",Se,!0)},"onFocus"),onBlur:l(Se=>{var ne;W(!1),(ne=m.onBlur)==null||ne.call(m,Se),Ve("onBlur",Se,!0)},"onBlur")}),We=N.cloneElement(Ie,ze),me=(!!Z||K)&&re!==null;return de?We:N.createElement(Aue,Ne(X({},U),{prefixCls:v("tooltip",H),title:re?re(ye.value):"",value:ye.value,open:me,placement:J(V,y),key:pe,classNames:{root:`${ae}-tooltip`},getPopupContainer:Y||S}),We)}),Ce=de?(Ie,ye)=>{const pe=N.cloneElement(Ie,{style:Ne(X({},Ie.props.style),{visibility:"hidden"})});return N.createElement(Aue,Ne(X({},U),{prefixCls:v("tooltip",H),title:re?re(ye.value):"",open:re!==null&&K,placement:J(V,y),key:"tooltip",classNames:{root:`${ae}-tooltip`},getPopupContainer:Y||S,draggingDelete:ye.draggingDelete}),pe)}:void 0,De=X(X(X({},L.root),x),s);return N.createElement(dct,Ne(X({},m),{classNames:I,styles:L,step:m.step,range:n,className:ve,style:De,disabled:k,vertical:y,ref:e,prefixCls:ae,handleRender:Ee,activeHandleRender:Ce,onChangeComplete:ee}))});Iue.displayName="Slider";var xct=Iue,Lue=l(t=>{const C=t,{prefixCls:e,colors:r,type:n,color:a,range:i=!1,className:s,activeIndex:o,onActive:u,onDragStart:h,onDragChange:d,onKeyDelete:f}=C,p=Xt(C,["prefixCls","colors","type","color","range","className","activeIndex","onActive","onDragStart","onDragChange","onKeyDelete"]),g=Ne(X({},p),{track:!1}),m=G.useMemo(()=>`linear-gradient(90deg, ${r.map(E=>`${E.color} ${E.percent}%`).join(", ")})`,[r]),y=G.useMemo(()=>!a||!n?null:n==="alpha"?a.toRgbString():`hsl(${a.toHsb().h}, 100%, 50%)`,[a,n]),v=Ur(h),b=Ur(d),w=G.useMemo(()=>({onDragStart:v,onDragChange:b}),[]),x=Ur((S,E)=>{const{onFocus:k,style:A,className:I,onKeyDown:L}=S.props,R=X({},A);return n==="gradient"&&(R.background=Rse(r,E.value)),G.cloneElement(S,{onFocus:l(O=>{u==null||u(E.index),k==null||k(O)},"onFocus"),style:R,className:pt(I,{[`${e}-slider-handle-active`]:o===E.index}),onKeyDown:l(O=>{(O.key==="Delete"||O.key==="Backspace")&&f&&f(E.index),L==null||L(O)},"onKeyDown")})}),T=G.useMemo(()=>({direction:"ltr",handleRender:x}),[]);return G.createElement(_ue.Provider,{value:T},G.createElement(bue.Provider,{value:w},G.createElement(xct,Ne(X({},g),{className:pt(s,`${e}-slider`),tooltip:{open:!1},range:{editable:i,minCount:2},styles:{rail:{background:m},handle:y?{background:y}:{}},classNames:{rail:`${e}-slider-rail`,handle:`${e}-slider-handle`}}))))},"GradientColorSlider"),wct=l(t=>{const{value:e,onChange:r,onChangeComplete:n}=t,a=l(s=>r(s[0]),"singleOnChange"),i=l(s=>n(s[0]),"singleOnChangeComplete");return G.createElement(Lue,Ne(X({},t),{value:[e],onChange:a,onChangeComplete:i}))},"SingleColorSlider"),Tct=wct;function $ue(t){return Ea(t).sort((e,r)=>e.percent-r.percent)}l($ue,"sortColors");var Ect=l(t=>{const{prefixCls:e,mode:r,onChange:n,onChangeComplete:a,onActive:i,activeIndex:s,onGradientDragging:o,colors:u}=t,h=r==="gradient",d=G.useMemo(()=>u.map(b=>({percent:b.percent,color:b.color.toRgbString()})),[u]),f=G.useMemo(()=>d.map(b=>b.percent),[d]),p=G.useRef(d),g=l(({rawValues:b,draggingIndex:w,draggingValue:x})=>{if(b.length>d.length){const T=Rse(d,x),C=Ea(d);C.splice(w,0,{percent:x,color:T}),p.current=C}else p.current=d;o(!0),n(new ic($ue(p.current)),!0)},"onDragStart"),m=l(({deleteIndex:b,draggingIndex:w,draggingValue:x})=>{let T=Ea(p.current);b!==-1?T.splice(b,1):(T[w]=Ne(X({},T[w]),{percent:x}),T=$ue(T)),n(new ic(T),!0)},"onDragChange"),y=l(b=>{const w=Ea(d);w.splice(b,1);const x=new ic(w);n(x),a(x)},"onKeyDelete"),v=l(b=>{a(new ic(d)),s>=b.length&&i(b.length-1),o(!1)},"onInternalChangeComplete");return h?G.createElement(Lue,{min:0,max:100,prefixCls:e,className:`${e}-gradient-slider`,colors:d,color:null,value:f,range:!0,onChangeComplete:v,disabled:!1,type:"gradient",activeIndex:s,onActive:i,onDragStart:g,onDragChange:m,onKeyDelete:y}):null},"GradientColorBar"),Cct=G.memo(Ect),Sct={slider:Tct},_ct=l(()=>{const t=N.useContext(jce),M=t,{mode:e,onModeChange:r,modeOptions:n,prefixCls:a,allowClear:i,value:s,disabledAlpha:o,onChange:u,onClear:h,onChangeComplete:d,activeIndex:f,gradientDragging:p}=M,g=Xt(M,["mode","onModeChange","modeOptions","prefixCls","allowClear","value","disabledAlpha","onChange","onClear","onChangeComplete","activeIndex","gradientDragging"]),m=N.useMemo(()=>s.cleared?[{percent:0,color:new ic("")},{percent:100,color:new ic("")}]:s.getColors(),[s]),y=!s.isGradient(),[v,b]=N.useState(s);On(()=>{var P;y||b((P=m[f])==null?void 0:P.color)},[y,m,p,f]);const w=N.useMemo(()=>{var P;return y?s:p?v:(P=m[f])==null?void 0:P.color},[m,s,f,y,v,p]),[x,T]=N.useState(w),[C,S]=jKe(),E=x!=null&&x.equals(w)?w:x;On(()=>{T(w)},[C,w==null?void 0:w.toHexString()]);const k=l((P,z)=>{let D=js(P);if(s.cleared){const W=D.toRgb();if(!W.r&&!W.g&&!W.b&&z){const{type:U,value:j=0}=z;D=new ic({h:U==="hue"?j:0,s:1,b:1,a:U==="alpha"?j/100:1})}else D=_6(D)}if(e==="single")return D;const B=Ea(m);return B[f]=Ne(X({},B[f]),{color:D}),new ic(B)},"fillColor"),A=l((P,z,D)=>{const B=k(P,D);T(B.isGradient()?B.getColors()[f].color:B),u(B,z)},"onPickerChange"),I=l((P,z)=>{d(k(P,z)),S()},"onInternalChangeComplete"),L=l(P=>{u(k(P))},"onInputChange");let R=null;const O=n.length>1;return(i||O)&&(R=N.createElement("div",{className:`${a}-operation`},O&&N.createElement(eA,{size:"small",options:n,value:e,onChange:r}),N.createElement(Xce,X({prefixCls:a,value:s,onChange:l(P=>{u(P),h==null||h()},"onChange")},g)))),N.createElement(N.Fragment,null,R,N.createElement(Cct,Ne(X({},t),{colors:m})),N.createElement(mQe,{prefixCls:a,value:E==null?void 0:E.toHsb(),disabledAlpha:o,onChange:l((P,z)=>{A(P,!0,z)},"onChange"),onChangeComplete:l((P,z)=>{I(P,z)},"onChangeComplete"),components:Sct}),N.createElement(Ylt,X({value:w,onChange:L,prefixCls:a,disabledAlpha:o},g)))},"PanelPicker"),Mue=_ct,kct=l(()=>{const{prefixCls:t,value:e,presets:r,onChange:n}=N.useContext(Kce);return Array.isArray(r)?N.createElement(bJe,{value:e,presets:r,prefixCls:t,onChange:n}):null},"PanelPresets"),Pue=kct,Rue=l(t=>{const{prefixCls:e,presets:r,panelRender:n,value:a,onChange:i,onClear:s,allowClear:o,disabledAlpha:u,mode:h,onModeChange:d,modeOptions:f,onChangeComplete:p,activeIndex:g,onActive:m,format:y,onFormatChange:v,gradientDragging:b,onGradientDragging:w,disabledFormat:x}=t,T=`${e}-inner`,C=N.useMemo(()=>({prefixCls:e,value:a,onChange:i,onClear:s,allowClear:o,disabledAlpha:u,mode:h,onModeChange:d,modeOptions:f,onChangeComplete:p,activeIndex:g,onActive:m,format:y,onFormatChange:v,gradientDragging:b,onGradientDragging:w,disabledFormat:x}),[e,a,i,s,o,u,h,d,f,p,g,m,y,v,b,w,x]),S=N.useMemo(()=>({prefixCls:e,value:a,presets:r,onChange:i}),[e,a,r,i]),E=N.createElement("div",{className:`${T}-content`},N.createElement(Mue,null),Array.isArray(r)&&N.createElement(oF,null),N.createElement(Pue,null));return N.createElement(jce.Provider,{value:C},N.createElement(Kce.Provider,{value:S},N.createElement("div",{className:T},typeof n=="function"?n(E,{components:{Picker:Mue,Presets:Pue}}):E)))},"ColorPickerPanel");Rue.displayName="ColorPickerPanel";var Act=Rue,Nct=N.forwardRef((t,e)=>{const T=t,{color:r,prefixCls:n,open:a,disabled:i,format:s,className:o,style:u,classNames:h,styles:d,showText:f,activeIndex:p}=T,g=Xt(T,["color","prefixCls","open","disabled","format","className","style","classNames","styles","showText","activeIndex"]),m=`${n}-trigger`,y=`${m}-text`,v=`${y}-cell`,[b]=Tu("ColorPicker"),w=N.useMemo(()=>{if(!f)return"";if(typeof f=="function")return f(r);if(r.cleared)return b.transparent;if(r.isGradient())return r.getColors().map((E,k)=>{const A=p!==-1&&p!==k;return N.createElement("span",{key:k,className:pt(v,A&&`${v}-inactive`)},E.color.toRgbString()," ",E.percent,"%")});const C=r.toHexString().toUpperCase(),S=MO(r);switch(s){case"rgb":return r.toRgbString();case"hsb":return r.toHsbString();default:return S<100?`${C.slice(0,7)},${S}%`:C}},[r,s,f,p,b.transparent,v]),x=N.useMemo(()=>r.cleared?N.createElement(Xce,{prefixCls:n,className:h.body,style:d.body}):N.createElement(IO,{prefixCls:n,color:r.toCssString(),className:h.body,innerClassName:h.content,style:d.body,innerStyle:d.content}),[r,n,h.body,h.content,d.body,d.content]);return N.createElement("div",X({ref:e,className:pt(m,o,h.root,{[`${m}-active`]:a,[`${m}-disabled`]:i}),style:X(X({},d.root),u)},Hc(g)),x,f&&N.createElement("div",{className:pt(y,h.description),style:d.description},w))}),Ict=Nct;function Lct(t,e,r){const[n]=Tu("ColorPicker"),[a,i]=Ta(t,e),[s,o]=G.useState("single"),[u,h]=G.useMemo(()=>{const y=(Array.isArray(r)?r:[r]).filter(x=>x);y.length||y.push("single");const v=new Set(y),b=[],w=l((x,T)=>{v.has(x)&&b.push({label:T,value:x})},"pushOption");return w("single",n.singleColor),w("gradient",n.gradientColor),[b,v]},[r,n.singleColor,n.gradientColor]),[d,f]=G.useState(null),p=Ur(y=>{f(y),i(y)}),g=G.useMemo(()=>{const y=js(a||"");return y.equals(d)?d:y},[a,d]),m=G.useMemo(()=>{var y;return h.has(s)?s:(y=u[0])==null?void 0:y.value},[h,s,u]);return G.useEffect(()=>{o(g.isGradient()?"gradient":"single")},[g]),[g,p,m,o,u]}l(Lct,"useModeColor");var Oue=l((t,e)=>({backgroundImage:`conic-gradient(${e} 25%, transparent 25% 50%, ${e} 50% 75%, transparent 75% 100%)`,backgroundSize:`${t} ${t}`}),"getTransBg"),$ct=l((t,e)=>{const{componentCls:r,borderRadiusSM:n,colorPickerInsetShadow:a,lineWidth:i,colorFillSecondary:s}=t;return{[`${r}-color-block`]:Ne(X({position:"relative",borderRadius:n,width:e,height:e,boxShadow:a,flex:"none"},Oue("50%",t.colorFillSecondary)),{[`${r}-color-block-inner`]:{width:"100%",height:"100%",boxShadow:`inset 0 0 0 ${Rt(i)} ${s}`,borderRadius:"inherit"}})}},"genColorBlockStyle"),Due=$ct,Mct=l(t=>{const{componentCls:e,antCls:r,fontSizeSM:n,lineHeightSM:a,colorPickerAlphaInputWidth:i,marginXXS:s,paddingXXS:o,controlHeightSM:u,marginXS:h,fontSizeIcon:d,paddingXS:f,colorTextPlaceholder:p,colorPickerInputNumberHandleWidth:g,lineWidth:m}=t;return{[`${e}-input-container`]:{display:"flex",[`${e}-steppers${r}-input-number`]:{fontSize:n,lineHeight:a,padding:0,[`${r}-input-number-input`]:{paddingInlineStart:o,paddingInlineEnd:0},[`${r}-input-number-handler-wrap`]:{width:g}},[`${e}-steppers${e}-alpha-input`]:{flex:`0 0 ${Rt(i)}`,marginInlineStart:s},[`${e}-format-select${r}-select`]:{marginInlineEnd:h,width:"auto","&-single":{[`${r}-select-selector`]:{padding:0,border:0},[`${r}-select-arrow`]:{insetInlineEnd:0},[`${r}-select-selection-item`]:{paddingInlineEnd:t.calc(d).add(s).equal(),fontSize:n,lineHeight:Rt(u)},[`${r}-select-item-option-content`]:{fontSize:n,lineHeight:a},[`${r}-select-dropdown`]:{[`${r}-select-item`]:{minHeight:"auto"}}}},[`${e}-input`]:{gap:s,alignItems:"center",flex:1,width:0,[`${e}-hsb-input,${e}-rgb-input`]:{height:u,display:"flex",gap:s,alignItems:"center"},[`${e}-steppers`]:{flex:1},[`${e}-hex-input${r}-input-affix-wrapper`]:{flex:1,padding:`0 ${Rt(f)}`,[`${r}-input`]:{fontSize:n,textTransform:"uppercase",lineHeight:Rt(t.calc(u).sub(t.calc(m).mul(2)).equal())},[`${r}-input-prefix`]:{color:p}}}}}},"genInputStyle2"),Pct=Mct,Rct=l(t=>{const{componentCls:e,controlHeightLG:r,borderRadiusSM:n,colorPickerInsetShadow:a,marginSM:i,colorBgElevated:s,colorFillSecondary:o,lineWidthBold:u,colorPickerHandlerSize:h}=t;return{userSelect:"none",[`${e}-select`]:{[`${e}-palette`]:{minHeight:t.calc(r).mul(4).equal(),overflow:"hidden",borderRadius:n},[`${e}-saturation`]:{position:"absolute",borderRadius:"inherit",boxShadow:a,inset:0},marginBottom:i},[`${e}-handler`]:{width:h,height:h,border:`${Rt(u)} solid ${s}`,position:"relative",borderRadius:"50%",cursor:"pointer",boxShadow:`${a}, 0 0 0 1px ${o}`}}},"genPickerStyle"),Oct=Rct,Dct=l(t=>{const{componentCls:e,antCls:r,colorTextQuaternary:n,paddingXXS:a,colorPickerPresetColorSize:i,fontSizeSM:s,colorText:o,lineHeightSM:u,lineWidth:h,borderRadius:d,colorFill:f,colorWhite:p,marginXXS:g,paddingXS:m,fontHeightSM:y}=t;return{[`${e}-presets`]:{[`${r}-collapse-item > ${r}-collapse-header`]:{padding:0,[`${r}-collapse-expand-icon`]:{height:y,color:n,paddingInlineEnd:a}},[`${r}-collapse`]:{display:"flex",flexDirection:"column",gap:g},[`${r}-collapse-item > ${r}-collapse-panel > ${r}-collapse-body`]:{padding:`${Rt(m)} 0`},"&-label":{fontSize:s,color:o,lineHeight:u},"&-items":{display:"flex",flexWrap:"wrap",gap:t.calc(g).mul(1.5).equal(),[`${e}-presets-color`]:{position:"relative",cursor:"pointer",width:i,height:i,"&::before":{content:'""',pointerEvents:"none",width:t.calc(i).add(t.calc(h).mul(4)).equal(),height:t.calc(i).add(t.calc(h).mul(4)).equal(),position:"absolute",top:t.calc(h).mul(-2).equal(),insetInlineStart:t.calc(h).mul(-2).equal(),borderRadius:d,border:`${Rt(h)} solid transparent`,transition:`border-color ${t.motionDurationMid} ${t.motionEaseInBack}`},"&:hover::before":{borderColor:f},"&::after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:t.calc(i).div(13).mul(5).equal(),height:t.calc(i).div(13).mul(8).equal(),border:`${Rt(t.lineWidthBold)} solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`},[`&${e}-presets-color-checked`]:{"&::after":{opacity:1,borderColor:p,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`transform ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`},[`&${e}-presets-color-bright`]:{"&::after":{borderColor:"rgba(0, 0, 0, 0.45)"}}}}},"&-empty":{fontSize:s,color:n}}}},"genPresetsStyle"),Fct=Dct,Bct=l(t=>{const{componentCls:e,colorPickerInsetShadow:r,colorBgElevated:n,colorFillSecondary:a,lineWidthBold:i,colorPickerHandlerSizeSM:s,colorPickerSliderHeight:o,marginSM:u,marginXS:h}=t,d=t.calc(s).sub(t.calc(i).mul(2).equal()).equal(),f=t.calc(s).add(t.calc(i).mul(2).equal()).equal(),p={"&:after":{transform:"scale(1)",boxShadow:`${r}, 0 0 0 1px ${t.colorPrimaryActive}`}};return{[`${e}-slider`]:[Oue(Rt(o),t.colorFillSecondary),{margin:0,padding:0,height:o,borderRadius:t.calc(o).div(2).equal(),"&-rail":{height:o,borderRadius:t.calc(o).div(2).equal(),boxShadow:r},[`& ${e}-slider-handle`]:{width:d,height:d,top:0,borderRadius:"100%","&:before":{display:"block",position:"absolute",background:"transparent",left:{_skip_check_:!0,value:"50%"},top:"50%",transform:"translate(-50%, -50%)",width:f,height:f,borderRadius:"100%"},"&:after":{width:s,height:s,border:`${Rt(i)} solid ${n}`,boxShadow:`${r}, 0 0 0 1px ${a}`,outline:"none",insetInlineStart:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),background:"transparent",transition:"none"},"&:focus":p}}],[`${e}-slider-container`]:{display:"flex",gap:u,marginBottom:u,[`${e}-slider-group`]:{flex:1,flexDirection:"column",justifyContent:"space-between",display:"flex","&-disabled-alpha":{justifyContent:"center"}}},[`${e}-gradient-slider`]:{marginBottom:h,[`& ${e}-slider-handle`]:{"&:after":{transform:"scale(0.8)"},"&-active, &:focus":p}}}},"genSliderStyle"),zct=Bct,bF=l((t,e,r)=>({borderInlineEndWidth:t.lineWidth,borderColor:e,boxShadow:`0 0 0 ${Rt(t.controlOutlineWidth)} ${r}`,outline:0}),"genActiveStyle"),Hct=l(t=>{const{componentCls:e}=t;return{"&-rtl":{[`${e}-presets-color`]:{"&::after":{direction:"ltr"}},[`${e}-clear`]:{"&::after":{direction:"ltr"}}}}},"genRtlStyle2"),Fue=l((t,e,r)=>{const{componentCls:n,borderRadiusSM:a,lineWidth:i,colorSplit:s,colorBorder:o,red6:u}=t;return{[`${n}-clear`]:Ne(X({width:e,height:e,borderRadius:a,border:`${Rt(i)} solid ${s}`,position:"relative",overflow:"hidden",cursor:"inherit",transition:`all ${t.motionDurationFast}`},r),{"&::after":{content:'""',position:"absolute",insetInlineEnd:t.calc(i).mul(-1).equal(),top:t.calc(i).mul(-1).equal(),display:"block",width:40,height:2,transformOrigin:"calc(100% - 1px) 1px",transform:"rotate(-45deg)",backgroundColor:u},"&:hover":{borderColor:o}})}},"genClearStyle"),Wct=l(t=>{const{componentCls:e,colorError:r,colorWarning:n,colorErrorHover:a,colorWarningHover:i,colorErrorOutline:s,colorWarningOutline:o}=t;return{[`&${e}-status-error`]:{borderColor:r,"&:hover":{borderColor:a},[`&${e}-trigger-active`]:X({},bF(t,r,s))},[`&${e}-status-warning`]:{borderColor:n,"&:hover":{borderColor:i},[`&${e}-trigger-active`]:X({},bF(t,n,o))}}},"genStatusStyle"),Vct=l(t=>{const{componentCls:e,controlHeightLG:r,controlHeightSM:n,controlHeight:a,controlHeightXS:i,borderRadius:s,borderRadiusSM:o,borderRadiusXS:u,borderRadiusLG:h,fontSizeLG:d}=t;return{[`&${e}-lg`]:{minWidth:r,minHeight:r,borderRadius:h,[`${e}-color-block, ${e}-clear`]:{width:a,height:a,borderRadius:s},[`${e}-trigger-text`]:{fontSize:d}},[`&${e}-sm`]:{minWidth:n,minHeight:n,borderRadius:o,[`${e}-color-block, ${e}-clear`]:{width:i,height:i,borderRadius:u},[`${e}-trigger-text`]:{lineHeight:Rt(i)}}}},"genSizeStyle2"),Gct=l(t=>{const{antCls:e,componentCls:r,colorPickerWidth:n,colorPrimary:a,motionDurationMid:i,colorBgElevated:s,colorTextDisabled:o,colorText:u,colorBgContainerDisabled:h,borderRadius:d,marginXS:f,marginSM:p,controlHeight:g,controlHeightSM:m,colorBgTextActive:y,colorPickerPresetColorSize:v,colorPickerPreviewSize:b,lineWidth:w,colorBorder:x,paddingXXS:T,fontSize:C,colorPrimaryHover:S,controlOutline:E}=t;return[{[r]:X({[`${r}-inner`]:Ne(X(X(X(X(X({"&-content":{display:"flex",flexDirection:"column",width:n,[`& > ${e}-divider`]:{margin:`${Rt(p)} 0 ${Rt(f)}`}},[`${r}-panel`]:X({},Oct(t))},zct(t)),Due(t,b)),Pct(t)),Fct(t)),Fue(t,v,{marginInlineStart:"auto"})),{[`${r}-operation`]:{display:"flex",justifyContent:"space-between",marginBottom:f}}),"&-trigger":X(X(X(X({minWidth:g,minHeight:g,borderRadius:d,border:`${Rt(w)} solid ${x}`,cursor:"pointer",display:"inline-flex",alignItems:"flex-start",justifyContent:"center",transition:`all ${i}`,background:s,padding:t.calc(T).sub(w).equal(),[`${r}-trigger-text`]:{marginInlineStart:f,marginInlineEnd:t.calc(f).sub(t.calc(T).sub(w)).equal(),fontSize:C,color:u,alignSelf:"center","&-cell":{"&:not(:last-child):after":{content:'", "'},"&-inactive":{color:o}}},"&:hover":{borderColor:S},[`&${r}-trigger-active`]:X({},bF(t,a,E)),"&-disabled":{color:o,background:h,cursor:"not-allowed","&:hover":{borderColor:y},[`${r}-trigger-text`]:{color:o}}},Fue(t,m)),Due(t,m)),Wct(t)),Vct(t))},Hct(t))},kx(t,{focusElCls:`${r}-trigger-active`})]},"genColorPickerStyle"),qct=ea("ColorPicker",t=>{const{colorTextQuaternary:e,marginSM:r}=t,n=8,a=Wn(t,{colorPickerWidth:234,colorPickerHandlerSize:16,colorPickerHandlerSizeSM:12,colorPickerAlphaInputWidth:44,colorPickerInputNumberHandleWidth:16,colorPickerPresetColorSize:24,colorPickerInsetShadow:`inset 0 0 1px 0 ${e}`,colorPickerSliderHeight:n,colorPickerPreviewSize:t.calc(n).mul(2).add(r).equal()});return Gct(a)}),sA=l(t=>{var qe,Me;const vt=t,{mode:e,value:r,defaultValue:n,format:a,defaultFormat:i,allowClear:s=!1,presets:o,children:u,trigger:h="click",open:d,disabled:f,placement:p="bottomLeft",arrow:g,panelRender:m,showText:y,style:v,className:b,size:w,rootClassName:x,prefixCls:T,styles:C,classNames:S,disabledAlpha:E=!1,onFormatChange:k,onChange:A,onClear:I,onOpenChange:L,onChangeComplete:R,getPopupContainer:O,autoAdjustOverflow:M=!0,destroyTooltipOnHide:P,destroyOnHidden:z,disabledFormat:D}=vt,B=Xt(vt,["mode","value","defaultValue","format","defaultFormat","allowClear","presets","children","trigger","open","disabled","placement","arrow","panelRender","showText","style","className","size","rootClassName","prefixCls","styles","classNames","disabledAlpha","onFormatChange","onChange","onClear","onOpenChange","onChangeComplete","getPopupContainer","autoAdjustOverflow","destroyTooltipOnHide","destroyOnHidden","disabledFormat"]),{getPrefixCls:W,direction:U,className:j,style:V,classNames:Y,styles:H,arrow:q}=Aa("colorPicker"),Z=N.useContext(xh),K=f!=null?f:Z,re=W("color-picker",T),Q=RD(g,q),{compactSize:te,compactItemClassnames:ee}=A0(re,U),J=Ll(lt=>{var it;return(it=w!=null?w:te)!=null?it:lt}),ae=Ne(X({},t),{trigger:h,allowClear:s,autoAdjustOverflow:M,disabledAlpha:E,arrow:Q,placement:p,disabled:K,size:J}),[se,fe]=Qa([Y,S],[H,C],{props:ae},{popup:{_default:"root"}}),[ve,de]=Ta(!1,d),Ee=!K&&ve,[Ce,De]=Ta(i,a),ce=l(lt=>{De(lt),Ce!==lt&&(k==null||k(lt))},"triggerFormatChange"),Ie=l(lt=>{(!lt||!K)&&(de(lt),L==null||L(lt))},"triggerOpenChange"),[ye,pe,Ae,Ve,ze]=Lct(n,r,e),We=N.useMemo(()=>MO(ye)<100,[ye]),[me,Se]=N.useState(null),ne=l(lt=>{if(R){let it=js(lt);E&&We&&(it=_6(lt)),R(it)}},"onInternalChangeComplete"),xe=l((lt,it)=>{let Ue=js(lt);E&&We&&(Ue=_6(Ue)),pe(Ue),Se(null),A&&A(Ue,Ue.toCssString()),it||ne(Ue)},"onInternalChange"),[oe,_e]=N.useState(0),[ue,tt]=N.useState(!1),Re=l(lt=>{if(Ve(lt),lt==="single"&&ye.isGradient())_e(0),xe(new ic(ye.getColors()[0].color)),Se(ye);else if(lt==="gradient"&&!ye.isGradient()){const it=We?_6(ye):ye;xe(new ic(me||[{percent:0,color:it},{percent:100,color:it}]))}},"onInternalModeChange"),{status:et}=N.useContext(oc),Xe=Cu(re),[ot,Ge]=qct(re,Xe),ht={[`${re}-rtl`]:U},Je=pt(x,Ge,Xe,ht),St=pt(Mg(re,et),{[`${re}-sm`]:J==="small",[`${re}-lg`]:J==="large"},ee,j,Je,b,ot),He=pt(re,Je,(qe=se.popup)==null?void 0:qe.root);Tn("ColorPicker")(!(E&&We),"usage","`disabledAlpha` will make the alpha to be 100% when use alpha color.");const dt={open:Ee,trigger:h,placement:p,arrow:Q,rootClassName:x,getPopupContainer:O,autoAdjustOverflow:M,destroyOnHidden:z!=null?z:!!P},Oe=X(X({},V),v);return N.createElement(Dle,X({classNames:{root:He},styles:{root:(Me=fe.popup)==null?void 0:Me.root,container:C==null?void 0:C.popupOverlayInner},onOpenChange:Ie,content:N.createElement(Ig,{form:!0},N.createElement(Act,{mode:Ae,onModeChange:Re,modeOptions:ze,prefixCls:re,value:ye,allowClear:s,disabled:K,disabledAlpha:E,presets:o,panelRender:m,format:Ce,onFormatChange:ce,onChange:xe,onChangeComplete:ne,onClear:I,activeIndex:oe,onActive:_e,gradientDragging:ue,onGradientDragging:tt,disabledFormat:D}))},dt),u||N.createElement(Ict,Ne(X({activeIndex:Ee?oe:-1,open:Ee,className:St,style:Oe,classNames:se,styles:fe,prefixCls:re,disabled:K,showText:y,format:Ce},B),{color:ye})))},"ColorPicker2");sA.displayName="ColorPicker";var Yct=Loe(sA,void 0,t=>Ne(X({},t),{placement:"bottom",autoAdjustOverflow:!1}),"color-picker",t=>t);sA._InternalPanelDoNotUseOrYouWillBeFired=Yct;var Uct=sA,jct=Uct;function oA(t){return["small","middle","large"].includes(t)}l(oA,"isPresetSize");function Bue(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}l(Bue,"isValidGapNumber");var zue=N.createContext({latestIndex:0}),Kct=zue.Provider,Xct=l(t=>{const{className:e,prefix:r,index:n,children:a,separator:i,style:s,classNames:o,styles:u}=t,{latestIndex:h}=G.useContext(zue);return Eu(a)?G.createElement(G.Fragment,null,G.createElement("div",{className:e,style:s},a),n<h&&i&&G.createElement("span",{className:pt(`${r}-item-separator`,o==null?void 0:o.separator),style:u==null?void 0:u.separator},i)):null},"Item3"),Zct=Xct,Qct=l(t=>{const{componentCls:e,antCls:r}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},"genSpaceStyle"),Jct=l(t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},"genSpaceGapStyle"),eut=ea("Space",t=>{const e=Wn(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[Qct(e),Jct(e)]},()=>({}),{resetStyle:!1}),tut=G.forwardRef((t,e)=>{const{getPrefixCls:r,direction:n,size:a,className:i,style:s,classNames:o,styles:u}=Aa("space"),ee=t,{size:h=a!=null?a:"small",align:d,className:f,rootClassName:p,children:g,direction:m,orientation:y,prefixCls:v,split:b,separator:w,style:x,vertical:T,wrap:C=!1,classNames:S,styles:E}=ee,k=Xt(ee,["size","align","className","rootClassName","children","direction","orientation","prefixCls","split","separator","style","vertical","wrap","classNames","styles"]),[A,I]=Array.isArray(h)?h:[h,h],L=oA(I),R=oA(A),O=Bue(I),M=Bue(A),P=wo(g,{keepEmpty:!0}),[z,D]=Ex(y,T,m),B=d===void 0&&!D?"center":d,W=w!=null?w:b,U=r("space",v),[j,V]=eut(U),Y=Ne(X({},t),{size:h,orientation:z,align:B}),[H,q]=Qa([o,S],[u,E],{props:Y}),Z=pt(U,i,j,`${U}-${z}`,{[`${U}-rtl`]:n==="rtl",[`${U}-align-${B}`]:B,[`${U}-gap-row-${I}`]:L,[`${U}-gap-col-${A}`]:R},f,p,V,H.root),K=pt(`${U}-item`,H.item),re=P.map((J,ae)=>{const se=(J==null?void 0:J.key)||`${K}-${ae}`;return G.createElement(Zct,{prefix:U,classNames:H,styles:q,className:K,key:se,index:ae,separator:W,style:q.item},J)});{const J=Tn("Space");[["direction","orientation"],["split","separator"]].forEach(([ae,se])=>{J.deprecated(!(ae in t),ae,se)})}const Q=G.useMemo(()=>({latestIndex:P.reduce((ae,se,fe)=>Eu(se)?fe:ae,0)}),[P]);if(P.length===0)return null;const te={};return C&&(te.flexWrap="wrap"),!R&&M&&(te.columnGap=A),!L&&O&&(te.rowGap=I),G.createElement("div",X({ref:e,className:Z,style:X(X(X(X({},te),q.root),s),x)},k),G.createElement(Kct,{value:Q},re))}),lA=tut;lA.Compact=SO,lA.Addon=cue,lA.displayName="Space";var rut=lA,Hue=["wrap","nowrap","wrap-reverse"],Wue=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],Vue=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],nut=l((t,e)=>{const r=e.wrap===!0?"wrap":e.wrap;return{[`${t}-wrap-${r}`]:r&&Hue.includes(r)}},"genClsWrap"),aut=l((t,e)=>{const r={};return Vue.forEach(n=>{r[`${t}-align-${n}`]=e.align===n}),r[`${t}-align-stretch`]=!e.align&&!!e.vertical,r},"genClsAlign"),iut=l((t,e)=>{const r={};return Wue.forEach(n=>{r[`${t}-justify-${n}`]=e.justify===n}),r},"genClsJustify"),sut=l((t,e)=>pt(X(X(X({},nut(t,e)),aut(t,e)),iut(t,e))),"createFlexClassNames"),out=sut,lut=l(t=>{const{componentCls:e}=t;return{[e]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},"genFlexStyle"),cut=l(t=>{const{componentCls:e}=t;return{[e]:{"&-gap-small":{gap:t.flexGapSM},"&-gap-middle":{gap:t.flexGap},"&-gap-large":{gap:t.flexGapLG}}}},"genFlexGapStyle"),uut=l(t=>{const{componentCls:e}=t,r={};return Hue.forEach(n=>{r[`${e}-wrap-${n}`]={flexWrap:n}}),r},"genFlexWrapStyle"),hut=l(t=>{const{componentCls:e}=t,r={};return Vue.forEach(n=>{r[`${e}-align-${n}`]={alignItems:n}}),r},"genAlignItemsStyle"),dut=l(t=>{const{componentCls:e}=t,r={};return Wue.forEach(n=>{r[`${e}-justify-${n}`]={justifyContent:n}}),r},"genJustifyContentStyle"),fut=l(()=>({}),"prepareComponentToken16"),put=ea("Flex",t=>{const{paddingXS:e,padding:r,paddingLG:n}=t,a=Wn(t,{flexGapSM:e,flexGap:r,flexGapLG:n});return[lut(a),cut(a),uut(a),hut(a),dut(a)]},fut,{resetStyle:!1}),Gue=N.forwardRef((t,e)=>{const S=t,{prefixCls:r,rootClassName:n,className:a,style:i,flex:s,gap:o,vertical:u,orientation:h,component:d="div",children:f}=S,p=Xt(S,["prefixCls","rootClassName","className","style","flex","gap","vertical","orientation","component","children"]),{flex:g,direction:m,getPrefixCls:y}=N.useContext(vn),v=y("flex",r),[b,w]=put(v),[,x]=Ex(h,u!=null?u:g==null?void 0:g.vertical),T=pt(a,n,g==null?void 0:g.className,v,b,w,out(v,Ne(X({},t),{vertical:x})),{[`${v}-rtl`]:m==="rtl",[`${v}-gap-${o}`]:oA(o),[`${v}-vertical`]:x}),C=X(X({},g==null?void 0:g.style),i);return Eu(s)&&(C.flex=s),Eu(o)&&!oA(o)&&(C.gap=o),N.createElement(d,X({ref:e,className:T,style:C},ws(p,["justify","wrap","align"])),f)});Gue.displayName="Flex";var lc=Gue,gut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},mut=gut;function xF(){return xF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xF.apply(this,arguments)}l(xF,"_extends57");var yut=l((t,e)=>G.createElement(Vn,xF({},t,{ref:e,icon:mut})),"FileTextOutlined2"),que=G.forwardRef(yut);que.displayName="FileTextOutlined";var Yue=que,vut=l(t=>{const{getPrefixCls:e,direction:r}=N.useContext(vn),{prefixCls:n,className:a}=t,i=e("input-group",n),s=e("input"),[o,u]=Tce(s),h=pt(i,u,{[`${i}-lg`]:t.size==="large",[`${i}-sm`]:t.size==="small",[`${i}-compact`]:t.compact,[`${i}-rtl`]:r==="rtl"},o,a),d=N.useContext(oc),f=N.useMemo(()=>Ne(X({},d),{isFormItemInput:!1}),[d]);return Tn("Input.Group").deprecated(!1,"Input.Group","Space.Compact"),G.createElement(oc.Provider,{value:f},G.createElement(rut.Compact,{className:h,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},t.children))},"Group$1"),but=vut,xut=l(t=>{const{componentCls:e,paddingXS:r}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:r,[`${e}-input-wrapper`]:{position:"relative",[`${e}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${e}-mask-input`]:{color:"transparent",caretColor:t.colorText},[`${e}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${e}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},"genOTPStyle"),wut=ea(["Input","OTP"],t=>{const e=Wn(t,FS(t));return xut(e)},BS),Tut=G.forwardRef((t,e)=>{const w=t,{className:r,value:n,onChange:a,onActiveChange:i,index:s,mask:o,onFocus:u}=w,h=Xt(w,["className","value","onChange","onActiveChange","index","mask","onFocus"]),{getPrefixCls:d}=G.useContext(vn),f=d("otp"),p=typeof o=="string"?o:n,g=G.useRef(null);G.useImperativeHandle(e,()=>g.current);const m=l(x=>{a(s,x.target.value)},"onInternalChange"),y=l(()=>{pn(()=>{var T;const x=(T=g.current)==null?void 0:T.input;document.activeElement===x&&x&&x.select()})},"syncSelection"),v=l(x=>{u==null||u(x),y()},"onInternalFocus"),b=l(x=>{const{key:T,ctrlKey:C,metaKey:S}=x;T==="ArrowLeft"?i(s-1):T==="ArrowRight"?i(s+1):T==="z"&&(C||S)?x.preventDefault():T==="Backspace"&&!n&&i(s-1),y()},"onInternalKeyDown");return G.createElement("span",{className:`${f}-input-wrapper`,role:"presentation"},o&&n!==""&&n!==void 0&&G.createElement("span",{className:`${f}-mask-icon`,"aria-hidden":"true"},p),G.createElement(WS,Ne(X({"aria-label":`OTP Input ${s+1}`,type:o===!0?"password":"text"},h),{ref:g,value:n,onInput:m,onFocus:v,onKeyDown:b,onMouseDown:y,onMouseUp:y,className:pt(r,{[`${f}-mask-input`]:o})})))}),Eut=Tut;function cA(t){return(t||"").split("")}l(cA,"strToArr");var Cut=l(t=>{const{index:e,prefixCls:r,separator:n,className:a,style:i}=t,s=typeof n=="function"?n(e):n;return s?G.createElement("span",{className:pt(`${r}-separator`,a),style:i},s):null},"Separator"),Sut=G.forwardRef((t,e)=>{const de=t,{prefixCls:r,length:n=6,size:a,defaultValue:i,value:s,onChange:o,formatter:u,separator:h,variant:d,disabled:f,status:p,autoFocus:g,mask:m,type:y,autoComplete:v,onInput:b,onFocus:w,inputMode:x,classNames:T,styles:C,className:S,style:E}=de,k=Xt(de,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","autoComplete","onInput","onFocus","inputMode","classNames","styles","className","style"]);Tn("Input.OTP")(!(typeof m=="string"&&m.length>1),"usage","`mask` prop should be a single character.");const{classNames:A,styles:I,getPrefixCls:L,direction:R,style:O,className:M}=Aa("otp"),P=L("otp",r),z=Ne(X({},t),{length:n}),[D,B]=Qa([A,T],[I,C],{props:z}),W=Hc(k,{aria:!0,data:!0,attr:!0}),[U,j]=wut(P),V=Ll(Ee=>a!=null?a:Ee),Y=G.useContext(oc),H=NS(Y.status,p),q=G.useMemo(()=>Ne(X({},Y),{status:H,hasFeedback:!1,feedbackIcon:null}),[Y,H]),Z=G.useRef(null),K=G.useRef({});G.useImperativeHandle(e,()=>({focus:l(()=>{var Ee;(Ee=K.current[0])==null||Ee.focus()},"focus"),blur:l(()=>{var Ee;for(let Ce=0;Ce<n;Ce+=1)(Ee=K.current[Ce])==null||Ee.blur()},"blur"),nativeElement:Z.current}));const re=l(Ee=>u?u(Ee):Ee,"internalFormatter"),[Q,te]=G.useState(()=>cA(re(i||"")));G.useEffect(()=>{s!==void 0&&te(cA(s))},[s]);const ee=Ur(Ee=>{te(Ee),b&&b(Ee),o&&Ee.length===n&&Ee.every(Ce=>Ce)&&Ee.some((Ce,De)=>Q[De]!==Ce)&&o(Ee.join(""))}),J=Ur((Ee,Ce)=>{let De=Ea(Q);for(let Ie=0;Ie<Ee;Ie+=1)De[Ie]||(De[Ie]="");Ce.length<=1?De[Ee]=Ce:De=De.slice(0,Ee).concat(cA(Ce)),De=De.slice(0,n);for(let Ie=De.length-1;Ie>=0&&!De[Ie];Ie-=1)De.pop();const ce=re(De.map(Ie=>Ie||" ").join(""));return De=cA(ce).map((Ie,ye)=>Ie===" "&&!De[ye]?De[ye]:Ie),De}),ae=l((Ee,Ce)=>{var Ie;const De=J(Ee,Ce),ce=Math.min(Ee+Ce.length,n-1);ce!==Ee&&De[Ee]!==void 0&&((Ie=K.current[ce])==null||Ie.focus()),ee(De)},"onInputChange"),se=l(Ee=>{var Ce;(Ce=K.current[Ee])==null||Ce.focus()},"onInputActiveChange"),fe=l((Ee,Ce)=>{var De,ce,Ie;for(let ye=0;ye<Ce;ye+=1)if(!((ce=(De=K.current[ye])==null?void 0:De.input)!=null&&ce.value)){(Ie=K.current[ye])==null||Ie.focus();break}w==null||w(Ee)},"onInputFocus"),ve={variant:d,disabled:f,status:H,mask:m,type:y,inputMode:x,autoComplete:v};return G.createElement("div",Ne(X({},W),{ref:Z,className:pt(S,P,{[`${P}-sm`]:V==="small",[`${P}-lg`]:V==="large",[`${P}-rtl`]:R==="rtl"},j,U,M,D.root),style:X(X(X({},B.root),O),E),role:"group"}),G.createElement(oc.Provider,{value:q},Array.from({length:n}).map((Ee,Ce)=>{const De=`otp-${Ce}`,ce=Q[Ce]||"";return G.createElement(G.Fragment,{key:De},G.createElement(Eut,X({ref:l(Ie=>{K.current[Ce]=Ie},"ref"),index:Ce,size:V,htmlSize:1,className:pt(D.input,`${P}-input`),style:B.input,onChange:ae,value:ce,onActiveChange:se,autoFocus:Ce===0&&g,onFocus:l(Ie=>fe(Ie,Ce),"onFocus")},ve)),Ce<n-1&&G.createElement(Cut,{separator:h,index:Ce,prefixCls:P,className:pt(D.separator),style:B.separator}))})))}),_ut=Sut,kut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},Aut=kut;function wF(){return wF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},wF.apply(this,arguments)}l(wF,"_extends58");var Nut=l((t,e)=>G.createElement(Vn,wF({},t,{ref:e,icon:Aut})),"EyeInvisibleOutlined2"),Uue=G.forwardRef(Nut);Uue.displayName="EyeInvisibleOutlined";var Iut=Uue,Lut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},$ut=Lut;function TF(){return TF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},TF.apply(this,arguments)}l(TF,"_extends59");var Mut=l((t,e)=>G.createElement(Vn,TF({},t,{ref:e,icon:$ut})),"EyeOutlined2"),jue=G.forwardRef(Mut);jue.displayName="EyeOutlined";var Kue=jue,Put=l(t=>t?G.createElement(Kue,null):G.createElement(Iut,null),"defaultIconRender"),Rut={click:"onClick",hover:"onMouseOver"},Xue=G.forwardRef((t,e)=>{const{disabled:r,action:n="click",visibilityToggle:a=!0,iconRender:i=Put,suffix:s}=t,o=G.useContext(xh),u=r!=null?r:o,h=typeof a=="object"&&a.visible!==void 0,[d,f]=N.useState(()=>h?a.visible:!1),p=N.useRef(null);G.useEffect(()=>{h&&f(a.visible)},[h,a]);const g=yue(p),m=l(()=>{var O;if(u)return;d&&g();const R=!d;f(R),typeof a=="object"&&((O=a.onVisibleChange)==null||O.call(a,R))},"onVisibleChange"),y=l(R=>{const O=Rut[n]||"",M=i(d),P={[O]:m,className:`${R}-icon`,key:"passwordIcon",onMouseDown:l(z=>{z.preventDefault()},"onMouseDown"),onMouseUp:l(z=>{z.preventDefault()},"onMouseUp")};return G.cloneElement(G.isValidElement(M)?M:G.createElement("span",null,M),P)},"getIcon"),L=t,{className:v,prefixCls:b,inputPrefixCls:w,size:x}=L,T=Xt(L,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:C}=G.useContext(vn),S=C("input",w),E=C("input-password",b),k=a&&y(E),A=pt(E,v,{[`${E}-${x}`]:!!x}),I=Ne(X({},ws(T,["suffix","iconRender","visibilityToggle"])),{type:d?"text":"password",className:A,prefixCls:S,suffix:G.createElement(G.Fragment,null,k,s)});return x&&(I.size=x),G.createElement(WS,X({ref:xo(e,p)},I))});Xue.displayName="Input.Password";var Out=Xue,Dut=l(t=>{const{componentCls:e}=t,r=`${e}-btn`;return{[e]:{width:"100%",[r]:{"&-filled":{background:t.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:t.colorFillSecondary},"&:active":{background:t.colorFill}}}}}}},"genSearchStyle"),Fut=ea(["Input","Search"],t=>[Dut(t)]),Zue=G.forwardRef((t,e)=>{const fe=t,{prefixCls:r,inputPrefixCls:n,className:a,size:i,style:s,enterButton:o=!1,addonAfter:u,loading:h,disabled:d,onSearch:f,onChange:p,onCompositionStart:g,onCompositionEnd:m,variant:y,onPressEnter:v,classNames:b,styles:w,hidden:x}=fe,T=Xt(fe,["prefixCls","inputPrefixCls","className","size","style","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter","classNames","styles","hidden"]),{direction:C,getPrefixCls:S,classNames:E,styles:k}=Aa("inputSearch"),A=Ne(X({},t),{enterButton:o}),[I,L]=Qa([E,b],[k,w],{props:A},{button:{_default:"root"}}),R=G.useRef(!1),O=S("input-search",r),M=S("input",n),[P,z]=Fut(O),{compactSize:D}=A0(O,C),B=Ll(ve=>{var de;return(de=i!=null?i:D)!=null?de:ve}),W=G.useRef(null),U=l(ve=>{ve!=null&&ve.target&&ve.type==="click"&&f&&f(ve.target.value,ve,{source:"clear"}),p==null||p(ve)},"onChange"),j=l(ve=>{var de;document.activeElement===((de=W.current)==null?void 0:de.input)&&ve.preventDefault()},"onMouseDown"),V=l(ve=>{var de,Ee;f&&f((Ee=(de=W.current)==null?void 0:de.input)==null?void 0:Ee.value,ve,{source:"input"})},"onSearch"),Y=l(ve=>{R.current||h||(v==null||v(ve),V(ve))},"onPressEnter"),H=typeof o=="boolean"?G.createElement(Ele,null):null,q=`${O}-btn`,Z=pt(q,{[`${q}-${y}`]:y});let K;const re=o||{},Q=re.type&&re.type.__ANT_BUTTON===!0;Q||re.type==="button"?K=bh(re,X({onMouseDown:j,onClick:l(ve=>{var de,Ee;(Ee=(de=re==null?void 0:re.props)==null?void 0:de.onClick)==null||Ee.call(de,ve),V(ve)},"onClick"),key:"enterButton"},Q?{className:Z,size:B}:{})):K=G.createElement(mS,{classNames:I.button,styles:L.button,className:Z,color:o?"primary":"default",size:B,disabled:d,key:"enterButton",onMouseDown:j,onClick:V,loading:h,icon:H,variant:y==="borderless"||y==="filled"||y==="underlined"?"text":o?"solid":void 0},o),u&&(K=[K,bh(u,{key:"addonAfter"})]);const te=pt(O,z,{[`${O}-rtl`]:C==="rtl",[`${O}-${B}`]:!!B,[`${O}-with-button`]:!!o},a,P,I.root),ee=l(ve=>{R.current=!0,g==null||g(ve)},"handleOnCompositionStart"),J=l(ve=>{R.current=!1,m==null||m(ve)},"handleOnCompositionEnd"),ae=Hc(T,{data:!0}),se=ws(Ne(X({},T),{classNames:ws(I,["button","root"]),styles:ws(L,["button","root"]),prefixCls:M,type:"search",size:B,variant:y,onPressEnter:Y,onCompositionStart:ee,onCompositionEnd:J,onChange:U,disabled:d}),Object.keys(ae));return G.createElement(SO,Ne(X({className:te,style:X(X({},s),L.root)},ae),{hidden:x}),G.createElement(WS,X({ref:xo(W,e)},se)),K)});Zue.displayName="Search";var But=Zue,zut=`
|
||
min-height:0 !important;
|
||
max-height:none !important;
|
||
height:0 !important;
|
||
visibility:hidden !important;
|
||
overflow:hidden !important;
|
||
position:absolute !important;
|
||
z-index:-1000 !important;
|
||
top:0 !important;
|
||
right:0 !important;
|
||
pointer-events: none !important;
|
||
`,Hut=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],EF={},cc;function Wut(t,e=!1){const r=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&EF[r])return EF[r];const n=window.getComputedStyle(t),a=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),i=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),s=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),u={sizingStyle:Hut.map(h=>`${h}:${n.getPropertyValue(h)}`).join(";"),paddingSize:i,borderSize:s,boxSizing:a};return e&&r&&(EF[r]=u),u}l(Wut,"calculateNodeStyling");function Vut(t,e=!1,r=null,n=null){cc||(cc=document.createElement("textarea"),cc.setAttribute("tab-index","-1"),cc.setAttribute("aria-hidden","true"),cc.setAttribute("name","hiddenTextarea"),document.body.appendChild(cc)),t.getAttribute("wrap")?cc.setAttribute("wrap",t.getAttribute("wrap")):cc.removeAttribute("wrap");const{paddingSize:a,borderSize:i,boxSizing:s,sizingStyle:o}=Wut(t,e);cc.setAttribute("style",`${o};${zut}`),cc.value=t.value||t.placeholder||"";let u,h,d,f=cc.scrollHeight;if(s==="border-box"?f+=i:s==="content-box"&&(f-=a),r!==null||n!==null){cc.value=" ";const g=cc.scrollHeight-a;r!==null&&(u=g*r,s==="border-box"&&(u=u+a+i),f=Math.max(u,f)),n!==null&&(h=g*n,s==="border-box"&&(h=h+a+i),d=f>h?"":"hidden",f=Math.min(h,f))}const p={height:f,overflowY:d,resize:"none"};return u&&(p.minHeight=u),h&&(p.maxHeight=h),p}l(Vut,"calculateAutoSizeStyle");function CF(){return CF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},CF.apply(this,arguments)}l(CF,"_extends60");var SF=0,_F=1,kF=2,Gut=G.forwardRef((t,e)=>{const P=t,{prefixCls:r,defaultValue:n,value:a,autoSize:i,onResize:s,className:o,style:u,disabled:h,onChange:d,onInternalAutoSize:f}=P,p=Xt(P,["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"]),[g,m]=Ta(n,a),y=g!=null?g:"",v=l(z=>{m(z.target.value),d==null||d(z)},"onInternalChange"),b=G.useRef();G.useImperativeHandle(e,()=>({textArea:b.current}));const[w,x]=G.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),T=!!i,[C,S]=G.useState(kF),[E,k]=G.useState(),A=l(()=>{S(SF)},"startResize");On(()=>{T&&A()},[a,w,x,T]),On(()=>{if(C===SF)S(_F);else if(C===_F){const z=Vut(b.current,!1,w,x);S(kF),k(z)}},[C]);const I=G.useRef(),L=l(()=>{pn.cancel(I.current)},"cleanRaf"),R=l(z=>{C===kF&&(s==null||s(z),i&&(L(),I.current=pn(()=>{A()})))},"onInternalResize");G.useEffect(()=>L,[]);const O=T?E:null,M=X(X({},u),O);return(C===SF||C===_F)&&(M.overflowY="hidden",M.overflowX="hidden"),G.createElement(mh,{onResize:R,disabled:!(i||s)},G.createElement("textarea",CF({},p,{ref:b,style:M,className:pt(r,o,{[`${r}-disabled`]:h}),disabled:h,value:y,onChange:v})))}),qut=Gut;function AF(){return AF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},AF.apply(this,arguments)}l(AF,"_extends61");var Yut=N.forwardRef((L,I)=>{var R=L,{defaultValue:t,value:e,onFocus:r,onBlur:n,onChange:a,allowClear:i,maxLength:s,onCompositionStart:o,onCompositionEnd:u,suffix:h,prefixCls:d="rc-textarea",showCount:f,count:p,className:g,style:m,disabled:y,hidden:v,classNames:b,styles:w,onResize:x,onClear:T,onPressEnter:C,readOnly:S,autoSize:E,onKeyDown:k}=R,A=Xt(R,["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"]);var pe;const[O,M]=Ta(t,e),P=O==null?"":String(O),[z,D]=N.useState(!1),B=N.useRef(!1),[W,U]=N.useState(null),j=N.useRef(null),V=N.useRef(null),Y=l(()=>{var Ae;return(Ae=V.current)==null?void 0:Ae.textArea},"getTextArea"),H=l(()=>{Y().focus()},"focus");N.useImperativeHandle(I,()=>{var Ae;return{resizableTextArea:V.current,focus:H,blur:l(()=>{Y().blur()},"blur"),nativeElement:((Ae=j.current)==null?void 0:Ae.nativeElement)||Y()}}),N.useEffect(()=>{D(Ae=>!y&&Ae)},[y]);const[q,Z]=N.useState(null);N.useEffect(()=>{q&&Y().setSelectionRange(...q)},[q]);const K=gue(p,f),re=(pe=K.max)!=null?pe:s,Q=Number(re)>0,te=K.strategy(P),ee=!!re&&te>re,J=l((Ae,Ve)=>{let ze=Ve;!B.current&&K.exceedFormatter&&K.max&&K.strategy(Ve)>K.max&&(ze=K.exceedFormatter(Ve,{max:K.max}),Ve!==ze&&Z([Y().selectionStart||0,Y().selectionEnd||0])),M(ze),nA(Ae.currentTarget,Ae,a,ze)},"triggerChange"),ae=l(Ae=>{B.current=!0,o==null||o(Ae)},"onInternalCompositionStart"),se=l(Ae=>{B.current=!1,J(Ae,Ae.currentTarget.value),u==null||u(Ae)},"onInternalCompositionEnd"),fe=l(Ae=>{J(Ae,Ae.target.value)},"onInternalChange"),ve=l(Ae=>{Ae.key==="Enter"&&C&&!Ae.nativeEvent.isComposing&&C(Ae),k==null||k(Ae)},"handleKeyDown"),de=l(Ae=>{D(!0),r==null||r(Ae)},"handleFocus"),Ee=l(Ae=>{D(!1),n==null||n(Ae)},"handleBlur"),Ce=l(Ae=>{M(""),H(),nA(Y(),Ae,a)},"handleReset");let De=h,ce;K.show&&(K.showFormatter?ce=K.showFormatter({value:P,count:te,maxLength:re}):ce=`${te}${Q?` / ${re}`:""}`,De=N.createElement(N.Fragment,null,De,N.createElement("span",{className:pt(`${d}-data-count`,b==null?void 0:b.count),style:w==null?void 0:w.count},ce)));const Ie=l(Ae=>{var Ve;x==null||x(Ae),(Ve=Y())!=null&&Ve.style.height&&U(!0)},"handleResize"),ye=!E&&!f&&!i;return N.createElement(pue,{ref:j,value:P,allowClear:i,handleReset:Ce,suffix:De,prefixCls:d,classNames:Ne(X({},b),{affixWrapper:pt(b==null?void 0:b.affixWrapper,{[`${d}-show-count`]:f,[`${d}-textarea-allow-clear`]:i})}),disabled:y,focused:z,className:pt(g,ee&&`${d}-out-of-range`),style:X(X({},m),W&&!ye?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof ce=="string"?ce:void 0}},hidden:v,readOnly:S,onClear:T},N.createElement(qut,AF({},A,{autoSize:E,maxLength:s,onKeyDown:ve,onChange:fe,onFocus:de,onBlur:Ee,onCompositionStart:ae,onCompositionEnd:se,className:pt(b==null?void 0:b.textarea),style:X({resize:m==null?void 0:m.resize},w==null?void 0:w.textarea),disabled:y,prefixCls:d,onResize:Ie,ref:V,readOnly:S})))}),Uut=Yut,jut=Uut,Kut=l(t=>{const{componentCls:e,paddingLG:r}=t,n=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
||
&-allow-clear > ${e},
|
||
&-affix-wrapper${n}-has-feedback ${e}
|
||
`]:{paddingInlineEnd:r},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-rtl`]:{[`${e}-suffix`]:{[`${e}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},"genTextAreaStyle"),Xut=ea(["Input","TextArea"],t=>{const e=Wn(t,FS(t));return Kut(e)},BS,{resetFont:!1}),Zut=N.forwardRef((t,e)=>{var ve;const fe=t,{prefixCls:r,bordered:n=!0,size:a,disabled:i,status:s,allowClear:o,classNames:u,rootClassName:h,className:d,style:f,styles:p,variant:g,showCount:m,onMouseDown:y,onResize:v}=fe,b=Xt(fe,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);{const{deprecated:de}=Tn("TextArea");de(!("bordered"in t),"bordered","variant")}const{getPrefixCls:w,direction:x,allowClear:T,autoComplete:C,className:S,style:E,classNames:k,styles:A}=Aa("textArea"),I=G.useContext(xh),L=i!=null?i:I,{status:R,hasFeedback:O,feedbackIcon:M}=G.useContext(oc),P=NS(R,s),[z,D]=Qa([k,u],[A,p],{props:t}),B=G.useRef(null);G.useImperativeHandle(e,()=>{var de,Ee;return{resizableTextArea:(de=B.current)==null?void 0:de.resizableTextArea,focus:l(Ce=>{var De,ce;DO((ce=(De=B.current)==null?void 0:De.resizableTextArea)==null?void 0:ce.textArea,Ce)},"focus"),blur:l(()=>{var Ce;return(Ce=B.current)==null?void 0:Ce.blur()},"blur"),nativeElement:((Ee=B.current)==null?void 0:Ee.nativeElement)||null}});const W=w("input",r),U=Cu(W),[j,V]=wce(W,h);Xut(W,U);const{compactSize:Y,compactItemClassnames:H}=A0(W,x),q=Ll(de=>{var Ee;return(Ee=a!=null?a:Y)!=null?Ee:de}),[Z,K]=B6("textArea",g,n),re=mue(o!=null?o:T),[Q,te]=G.useState(!1),[ee,J]=G.useState(!1),ae=l(de=>{te(!0),y==null||y(de);const Ee=l(()=>{te(!1),document.removeEventListener("mouseup",Ee)},"onMouseUp");document.addEventListener("mouseup",Ee)},"onInternalMouseDown"),se=l(de=>{var Ee,Ce;if(v==null||v(de),Q&&typeof getComputedStyle=="function"){const De=(Ce=(Ee=B.current)==null?void 0:Ee.nativeElement)==null?void 0:Ce.querySelector("textarea");De&&getComputedStyle(De).resize==="both"&&J(!0)}},"onInternalResize");return G.createElement(jut,Ne(X({autoComplete:C},b),{style:X(X(X({},D.root),E),f),styles:D,disabled:L,allowClear:re,className:pt(V,U,d,h,H,S,z.root,{[`${W}-textarea-affix-wrapper-resize-dirty`]:ee}),classNames:Ne(X({},z),{textarea:pt({[`${W}-sm`]:q==="small",[`${W}-lg`]:q==="large"},j,z.textarea,Q&&`${W}-mouse-active`),variant:pt({[`${W}-${Z}`]:K},Mg(W,P)),affixWrapper:pt(`${W}-textarea-affix-wrapper`,{[`${W}-affix-wrapper-rtl`]:x==="rtl",[`${W}-affix-wrapper-sm`]:q==="small",[`${W}-affix-wrapper-lg`]:q==="large",[`${W}-textarea-show-count`]:m||((ve=t.count)==null?void 0:ve.show)},j)}),prefixCls:W,suffix:O&&G.createElement("span",{className:`${W}-textarea-suffix`},M),showCount:m,ref:B,onResize:se,onMouseDown:ae}))}),Que=Zut,Wx=WS;Wx.Group=but,Wx.Search=But,Wx.TextArea=Que,Wx.Password=Out,Wx.OTP=_ut;var Jue=Wx,Qut=l((t,e=!1)=>e&&!Eu(t)?[]:Array.isArray(t)?t:[t],"toList"),Jut=Qut;function NF(){return NF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},NF.apply(this,arguments)}l(NF,"_extends62");var ehe=G.forwardRef((y,m)=>{var v=y,{prefixCls:t="rc-switch",className:e,checked:r,defaultChecked:n,disabled:a,loadingIcon:i,checkedChildren:s,unCheckedChildren:o,onClick:u,onChange:h,onKeyDown:d,styles:f,classNames:p}=v,g=Xt(v,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown","styles","classNames"]);const[b,w]=Ta(n!=null?n:!1,r);function x(E,k){let A=b;return a||(A=E,w(A),h==null||h(A,k)),A}l(x,"triggerChange");function T(E){E.which===gr.LEFT?x(!1,E):E.which===gr.RIGHT&&x(!0,E),d==null||d(E)}l(T,"onInternalKeyDown");function C(E){const k=x(!b,E);u==null||u(k,E)}l(C,"onInternalClick");const S=pt(t,e,{[`${t}-checked`]:b,[`${t}-disabled`]:a});return G.createElement("button",NF({},g,{type:"button",role:"switch","aria-checked":b,disabled:a,className:S,ref:m,onKeyDown:T,onClick:C}),i,G.createElement("span",{className:`${t}-inner`},G.createElement("span",{className:pt(`${t}-inner-checked`,p==null?void 0:p.content),style:f==null?void 0:f.content},s),G.createElement("span",{className:pt(`${t}-inner-unchecked`,p==null?void 0:p.content),style:f==null?void 0:f.content},o)))});ehe.displayName="Switch";var eht=ehe,tht=l(t=>{const{componentCls:e,trackHeightSM:r,trackPadding:n,trackMinWidthSM:a,innerMinMarginSM:i,innerMaxMarginSM:s,handleSizeSM:o,calc:u}=t,h=`${e}-inner`,d=Rt(u(o).add(u(n).mul(2)).equal()),f=Rt(u(s).mul(2).equal());return{[e]:{[`&${e}-small`]:{minWidth:a,height:r,lineHeight:Rt(r),[`${e}-inner`]:{paddingInlineStart:s,paddingInlineEnd:i,[`${h}-checked, ${h}-unchecked`]:{minHeight:r},[`${h}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${h}-unchecked`]:{marginTop:u(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:o,height:o},[`${e}-loading-icon`]:{top:u(u(o).sub(t.switchLoadingIconSize)).div(2).equal(),fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:i,paddingInlineEnd:s,[`${h}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${h}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${Rt(u(o).add(n).equal())})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${h}`]:{[`${h}-unchecked`]:{marginInlineStart:u(t.marginXXS).div(2).equal(),marginInlineEnd:u(t.marginXXS).mul(-1).div(2).equal()}},[`&${e}-checked ${h}`]:{[`${h}-checked`]:{marginInlineStart:u(t.marginXXS).mul(-1).div(2).equal(),marginInlineEnd:u(t.marginXXS).div(2).equal()}}}}}}},"genSwitchSmallStyle"),rht=l(t=>{const{componentCls:e,handleSize:r,calc:n}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:n(n(r).sub(t.fontSize)).div(2).equal(),color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},"genSwitchLoadingStyle"),nht=l(t=>{const{componentCls:e,trackPadding:r,handleBg:n,handleShadow:a,handleSize:i,calc:s}=t,o=`${e}-handle`;return{[e]:{[o]:{position:"absolute",top:r,insetInlineStart:r,width:i,height:i,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:n,borderRadius:s(i).div(2).equal(),boxShadow:a,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${o}`]:{insetInlineStart:`calc(100% - ${Rt(s(i).add(r).equal())})`},[`&:not(${e}-disabled):active`]:{[`${o}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${o}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}}}},"genSwitchHandleStyle"),aht=l(t=>{const{componentCls:e,trackHeight:r,trackPadding:n,innerMinMargin:a,innerMaxMargin:i,handleSize:s,switchDuration:o,calc:u}=t,h=`${e}-inner`,d=Rt(u(s).add(u(n).mul(2)).equal()),f=Rt(u(i).mul(2).equal());return{[e]:{[h]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:i,paddingInlineEnd:a,transition:["padding-inline-start","padding-inline-end"].map(p=>`${p} ${o} ease-in-out`).join(", "),[`${h}-checked, ${h}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,pointerEvents:"none",minHeight:r,transition:["margin-inline-start","margin-inline-end"].map(p=>`${p} ${o} ease-in-out`).join(", ")},[`${h}-checked`]:{marginInlineStart:`calc(-100% + ${d} - ${f})`,marginInlineEnd:`calc(100% - ${d} + ${f})`},[`${h}-unchecked`]:{marginTop:u(r).mul(-1).equal(),marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${h}`]:{paddingInlineStart:a,paddingInlineEnd:i,[`${h}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${h}-unchecked`]:{marginInlineStart:`calc(100% - ${d} + ${f})`,marginInlineEnd:`calc(-100% + ${d} - ${f})`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${h}`]:{[`${h}-unchecked`]:{marginInlineStart:u(n).mul(2).equal(),marginInlineEnd:u(n).mul(-1).mul(2).equal()}},[`&${e}-checked ${h}`]:{[`${h}-checked`]:{marginInlineStart:u(n).mul(-1).mul(2).equal(),marginInlineEnd:u(n).mul(2).equal()}}}}}},"genSwitchInnerStyle"),iht=l(t=>{const{componentCls:e,trackHeight:r,trackMinWidth:n}=t;return{[e]:Ne(X(Ne(X({},is(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:n,height:r,lineHeight:Rt(r),verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),vh(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}},"genSwitchStyle"),sht=l(t=>{const{fontSize:e,lineHeight:r,controlHeight:n,colorWhite:a}=t,i=e*r,s=n/2,o=2,u=i-o*2,h=s-o*2;return{trackHeight:i,trackHeightSM:s,trackMinWidth:u*2+o*4,trackMinWidthSM:h*2+o*2,trackPadding:o,handleBg:a,handleSize:u,handleSizeSM:h,handleShadow:`0 2px 4px 0 ${new pa("#00230b").setA(.2).toRgbString()}`,innerMinMargin:u/2,innerMaxMargin:u+o+o*2,innerMinMarginSM:h/2,innerMaxMarginSM:h+o+o*2}},"prepareComponentToken17"),oht=ea("Switch",t=>{const e=Wn(t,{switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchLoadingIconSize:t.calc(t.fontSizeIcon).mul(.75).equal(),switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[iht(e),aht(e),nht(e),rht(e),tht(e)]},sht),lht=G.forwardRef((t,e)=>{var Y;const V=t,{prefixCls:r,size:n,disabled:a,loading:i,className:s,rootClassName:o,style:u,checked:h,value:d,defaultChecked:f,defaultValue:p,onChange:g,styles:m,classNames:y}=V,v=Xt(V,["prefixCls","size","disabled","loading","className","rootClassName","style","checked","value","defaultChecked","defaultValue","onChange","styles","classNames"]),[b,w]=Ta((Y=f!=null?f:p)!=null?Y:!1,h!=null?h:d),{getPrefixCls:x,direction:T,className:C,style:S,classNames:E,styles:k}=Aa("switch"),A=G.useContext(xh),I=(a!=null?a:A)||i,L=x("switch",r),[R,O]=oht(L),M=Ll(n),P=Ne(X({},t),{size:M,disabled:I}),[z,D]=Qa([E,y],[k,m],{props:P}),B=G.createElement("div",{className:pt(`${L}-handle`,z.indicator),style:D.indicator},i&&G.createElement(Sx,{className:`${L}-loading-icon`})),W=pt(C,{[`${L}-small`]:M==="small",[`${L}-loading`]:i,[`${L}-rtl`]:T==="rtl"},s,o,z.root,R,O),U=X(X(X({},D.root),S),u),j=l((...H)=>{w(H[0]),g==null||g(...H)},"changeHandler");return G.createElement(nse,{component:"Switch",disabled:I},G.createElement(eht,Ne(X({},v),{classNames:z,styles:D,checked:b,onChange:j,prefixCls:L,className:W,style:U,disabled:I,ref:e,loadingIcon:B})))}),IF=lht;IF.__ANT_SWITCH=!0,IF.displayName="Switch";var uA=IF,cht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},uht=cht;function LF(){return LF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},LF.apply(this,arguments)}l(LF,"_extends63");var hht=l((t,e)=>G.createElement(Vn,LF({},t,{ref:e,icon:uht})),"FileOutlined2"),the=G.forwardRef(hht);the.displayName="FileOutlined";var dht=the,fht=l(t=>{const e=t!=null&&t.algorithm?zk(t.algorithm):B9,r=X(X({},bx),t==null?void 0:t.token);return Mne(r,{override:t==null?void 0:t.token},e,xae)},"getDesignToken"),pht=fht;function ght(t){const{sizeUnit:e,sizeStep:r}=t,n=r-2;return{sizeXXL:e*(n+10),sizeXL:e*(n+6),sizeLG:e*(n+2),sizeMD:e*(n+2),sizeMS:e*(n+1),size:e*n,sizeSM:e*n,sizeXS:e*(n-1),sizeXXS:e*(n-1)}}l(ght,"genSizeMapToken2");var mht=l((t,e)=>{const r=e!=null?e:Jk(t),n=r.fontSizeSM,a=r.controlHeight-4;return X(Ne(X(X(X({},r),ght(e!=null?e:t)),bae(n)),{controlHeight:a}),vae(Ne(X({},r),{controlHeight:a})))},"derivative2"),yht=mht,Vc=l((t,e)=>new pa(t).setA(e).toRgbString(),"getAlphaColor3"),Wg=l((t,e)=>new pa(t).lighten(e).toHexString(),"getSolidColor2"),rhe=l(t=>{const e=nS(t,{theme:"dark"});return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[6],6:e[5],7:e[4],8:e[6],9:e[5],10:e[4]}},"generateColorPalettes2"),vht=l((t,e)=>{const r=t||"#000",n=e||"#fff";return{colorBgBase:r,colorTextBase:n,colorText:Vc(n,.85),colorTextSecondary:Vc(n,.65),colorTextTertiary:Vc(n,.45),colorTextQuaternary:Vc(n,.25),colorFill:Vc(n,.18),colorFillSecondary:Vc(n,.12),colorFillTertiary:Vc(n,.08),colorFillQuaternary:Vc(n,.04),colorBgSolid:Vc(n,.95),colorBgSolidHover:Vc(n,1),colorBgSolidActive:Vc(n,.9),colorBgElevated:Wg(r,12),colorBgContainer:Wg(r,8),colorBgLayout:Wg(r,0),colorBgSpotlight:Wg(r,26),colorBgBlur:Vc(n,.04),colorBorder:Wg(r,26),colorBorderDisabled:Wg(r,26),colorBorderSecondary:Wg(r,19)}},"generateNeutralColorPalettes2"),bht=l((t,e)=>{const r=Object.keys(C9).map(s=>{const o=nS(t[s],{theme:"dark"});return Array.from({length:10},()=>1).reduce((u,h,d)=>(u[`${s}-${d+1}`]=o[d],u[`${s}${d+1}`]=o[d],u),{})}).reduce((s,o)=>(s=X(X({},s),o),s),{}),n=e!=null?e:Jk(t),a=yae(t,{generateColorPalettes:rhe,generateNeutralColorPalettes:vht}),i=yh.reduce((s,o)=>{const u=t[o];if(u){const h=rhe(u);s[`${o}Hover`]=h[7],s[`${o}Active`]=h[5]}return s},{});return Ne(X(X(X(X({},n),r),a),i),{colorPrimaryBg:a.colorPrimaryBorder,colorPrimaryBgHover:a.colorPrimaryBorderHover})},"derivative3"),xht=bht;function wht(){const[t,e,r,n]=Il();return{theme:t,token:e,hashId:r,cssVar:n}}l(wht,"useToken2");var hA={defaultSeed:aS.token,useToken:wht,defaultAlgorithm:Jk,darkAlgorithm:xht,compactAlgorithm:yht,getDesignToken:pht,defaultConfig:aS,_internalContext:z9},Tht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},Eht=Tht;function $F(){return $F=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},$F.apply(this,arguments)}l($F,"_extends64");var Cht=l((t,e)=>G.createElement(Vn,$F({},t,{ref:e,icon:Eht})),"EditOutlined2"),nhe=G.forwardRef(Cht);nhe.displayName="EditOutlined";var Sht=nhe,_ht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},kht=_ht;function MF(){return MF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},MF.apply(this,arguments)}l(MF,"_extends65");var Aht=l((t,e)=>G.createElement(Vn,MF({},t,{ref:e,icon:kht})),"EnterOutlined2"),ahe=G.forwardRef(Aht);ahe.displayName="EnterOutlined";var Nht=ahe,Iht=l((t,e,r,n)=>{const{titleMarginBottom:a,fontWeightStrong:i}=n;return{marginBottom:a,color:r,fontWeight:i,fontSize:t,lineHeight:e}},"getTitleStyle"),Lht=l(t=>{const e=[1,2,3,4,5],r={};return e.forEach(n=>{r[`
|
||
h${n}&,
|
||
div&-h${n},
|
||
div&-h${n} > textarea,
|
||
h${n}
|
||
`]=Iht(t[`fontSizeHeading${n}`],t[`lineHeightHeading${n}`],t.colorTextHeading,t)}),r},"getTitleStyles"),$ht=l(t=>{const{componentCls:e}=t;return{[`&${`${e}-link`}`]:Ne(X({},Sae(t)),{userSelect:"text",[`&[disabled], &${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:t.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},"getLinkStyles"),Mht=l(t=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:t.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:Zk[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:t.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:t.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),"getResetStyles"),Pht=l(t=>{const{componentCls:e,paddingSM:r}=t,n=r;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:t.calc(t.paddingSM).mul(-1).equal(),insetBlockStart:t.calc(n).div(-2).add(1).equal(),marginBottom:t.calc(n).div(2).sub(2).equal()},[`${e}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:t.calc(t.marginXS).add(2).equal(),insetBlockEnd:t.marginXS,color:t.colorIcon,fontWeight:"normal",fontSize:t.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},"getEditableStyles"),Rht=l(t=>({[`${t.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:t.colorSuccess}},[`${t.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),"getCopyableStyles"),Oht=l(()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),"getEllipsisStyles"),Dht=l(t=>{const{componentCls:e,titleMarginTop:r}=t;return{[e]:Ne(X(X(X(Ne(X(X(Ne(X({color:t.colorText,wordBreak:"break-word",lineHeight:t.lineHeight,[`&${e}-secondary, &${e}-link${e}-secondary`]:{color:t.colorTextDescription},[`&${e}-success, &${e}-link${e}-success`]:{color:t.colorSuccessText},[`&${e}-warning, &${e}-link${e}-warning`]:{color:t.colorWarningText},[`&${e}-danger, &${e}-link${e}-danger`]:{color:t.colorErrorText,[`&${e}-link:active, &${e}-link:focus`]:{color:t.colorErrorTextActive},[`&${e}-link:hover`]:{color:t.colorErrorTextHover}},[`&${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},Lht(t)),{[`
|
||
& + h1${e},
|
||
& + h2${e},
|
||
& + h3${e},
|
||
& + h4${e},
|
||
& + h5${e}
|
||
`]:{marginTop:r},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:r}}}),Mht(t)),$ht(t)),{[`
|
||
${e}-expand,
|
||
${e}-collapse,
|
||
${e}-edit,
|
||
${e}-copy
|
||
`]:Ne(X({},Sae(t)),{marginInlineStart:t.marginXXS})}),Pht(t)),Rht(t)),Oht()),{"&-rtl":{direction:"rtl"}})}},"genTypographyStyle"),Fht=l(()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),"prepareComponentToken18"),ihe=ea("Typography",Dht,Fht),Bht=l(t=>{const{prefixCls:e,"aria-label":r,className:n,style:a,direction:i,maxLength:s,autoSize:o=!0,value:u,onSave:h,onCancel:d,onEnd:f,component:p,enterIcon:g=G.createElement(Nht,null)}=t,m=G.useRef(null),y=G.useRef(!1),v=G.useRef(null),[b,w]=G.useState(u);G.useEffect(()=>{w(u)},[u]),G.useEffect(()=>{var O;if((O=m.current)!=null&&O.resizableTextArea){const{textArea:M}=m.current.resizableTextArea;M.focus();const{length:P}=M.value;M.setSelectionRange(P,P)}},[]);const x=l(({target:O})=>{w(O.value.replace(/[\n\r]/g,""))},"onChange"),T=l(()=>{y.current=!0},"onCompositionStart"),C=l(()=>{y.current=!1},"onCompositionEnd"),S=l(({keyCode:O})=>{y.current||(v.current=O)},"onKeyDown"),E=l(()=>{h(b.trim())},"confirmChange"),k=l(({keyCode:O,ctrlKey:M,altKey:P,metaKey:z,shiftKey:D})=>{v.current!==O||y.current||M||P||z||D||(O===gr.ENTER?(E(),f==null||f()):O===gr.ESC&&d())},"onKeyUp"),A=l(()=>{E()},"onBlur"),[I,L]=ihe(e),R=pt(e,`${e}-edit-content`,{[`${e}-rtl`]:i==="rtl",[`${e}-${p}`]:!!p},n,I,L);return G.createElement("div",{className:R,style:a},G.createElement(Que,{ref:m,maxLength:s,value:b,onChange:x,onKeyDown:S,onKeyUp:k,onCompositionStart:T,onCompositionEnd:C,onBlur:A,"aria-label":r,rows:1,autoSize:o}),g!==null?bh(g,{className:`${e}-edit-content-confirm`}):null)},"Editable"),zht=Bht,Hht=l((t,e)=>{let r=!1;const n=l(a=>{var i,s,o;a.stopPropagation(),a.preventDefault(),(i=a.clipboardData)==null||i.clearData(),(s=a.clipboardData)==null||s.setData("text/plain",t),e&&((o=a.clipboardData)==null||o.setData("text/html",t)),r=!0},"onCopy");try{return document.addEventListener("copy",n,{capture:!0}),document.execCommand("copy"),r}catch(a){return!1}finally{document.removeEventListener("copy",n,{capture:!0})}},"execCopy"),Wht=l((t,e)=>nt(this,null,function*(){try{return e?yield navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([t],{type:"text/html"}),"text/plain":new Blob([t],{type:"text/plain"})})]):yield navigator.clipboard.writeText(t),!0}catch(r){return!1}}),"asyncCopy");function Vht(t,e){return nt(this,null,function*(){if(typeof t!="string")return VR(!1,"The clipboard content must be of string type",""),!1;const r=(e==null?void 0:e.format)==="text/html";return!!((yield Wht(t,r))||Hht(t,r))})}l(Vht,"copy2");var Ght=Vht,qht=l(({copyConfig:t,children:e})=>{const[r,n]=G.useState(!1),[a,i]=G.useState(!1),s=G.useRef(null),o=l(()=>{s.current&&clearTimeout(s.current)},"cleanCopyId"),u={};t.format&&(u.format=t.format),G.useEffect(()=>o,[]);const h=Ur(d=>nt(this,null,function*(){var f;d==null||d.preventDefault(),d==null||d.stopPropagation(),i(!0);try{const p=typeof t.text=="function"?yield t.text():t.text;yield Ght(p||Jut(e,!0).join("")||"",u),i(!1),n(!0),o(),s.current=setTimeout(()=>{n(!1)},3e3),(f=t.onCopy)==null||f.call(t,d)}catch(p){throw i(!1),p}}));return{copied:r,copyLoading:a,onClick:h}},"useCopyClick"),Yht=qht;function PF(t,e){return G.useMemo(()=>{const r=!!t;return[r,X(X({},e),r&&typeof t=="object"?t:null)]},[t])}l(PF,"useMergedConfig");var Uht=l(t=>{const e=N.useRef(void 0);return N.useEffect(()=>{e.current=t}),e.current},"usePrevious"),jht=Uht,Kht=l((t,e,r)=>N.useMemo(()=>t===!0?{title:e!=null?e:r}:N.isValidElement(t)?{title:t}:typeof t=="object"?X({title:e!=null?e:r},t):{title:t},[t,e,r]),"useTooltipProps"),Xht=Kht,she=G.forwardRef((t,e)=>{const T=t,{prefixCls:r,component:n="article",className:a,rootClassName:i,children:s,direction:o,style:u}=T,h=Xt(T,["prefixCls","component","className","rootClassName","children","direction","style"]),{getPrefixCls:d,direction:f,className:p,style:g}=Aa("typography"),m=o!=null?o:f,y=d("typography",r),[v,b]=ihe(y),w=pt(y,p,{[`${y}-rtl`]:m==="rtl"},a,i,v,b),x=X(X({},g),u);return G.createElement(n,X({className:w,style:x,ref:e},h),s)});she.displayName="Typography";var ohe=she,Zht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},Qht=Zht;function RF(){return RF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},RF.apply(this,arguments)}l(RF,"_extends66");var Jht=l((t,e)=>G.createElement(Vn,RF({},t,{ref:e,icon:Qht})),"CopyOutlined2"),lhe=G.forwardRef(Jht);lhe.displayName="CopyOutlined";var edt=lhe;function che(t){return t===!1?[!1,!1]:Array.isArray(t)?t:[t]}l(che,"toList2");function OF(t,e,r){return t===!0||t===void 0?e:t||r&&e}l(OF,"getNode$1");function tdt(t){const e=document.createElement("em");t.appendChild(e),e.className="ant-typography-css-ellipsis-content-measure";const r=t.getBoundingClientRect(),n=e.getBoundingClientRect();return t.removeChild(e),r.left>n.left||n.right>r.right||r.top>n.top||n.bottom>r.bottom}l(tdt,"isEleEllipsis");var DF=l(t=>["string","number"].includes(typeof t),"isValidText"),rdt=l(({prefixCls:t,copied:e,locale:r,iconOnly:n,tooltips:a,icon:i,tabIndex:s,onCopy:o,loading:u})=>{const h=che(a),d=che(i),{copied:f,copy:p}=r!=null?r:{},g=e?f:p,m=OF(h[e?1:0],g),y=typeof m=="string"?m:g;return G.createElement(Ml,{title:m},G.createElement("button",{type:"button",className:pt(`${t}-copy`,{[`${t}-copy-success`]:e,[`${t}-copy-icon-only`]:n}),onClick:o,"aria-label":y,tabIndex:s},e?OF(d[1],G.createElement(xle,null),!0):OF(d[0],u?G.createElement(Sx,null):G.createElement(edt,null),!0)))},"CopyBtn"),ndt=rdt,dA=G.forwardRef(({style:t,children:e},r)=>{const n=G.useRef(null);return G.useImperativeHandle(r,()=>({isExceed:l(()=>{const a=n.current;return a.scrollHeight>a.clientHeight},"isExceed"),getHeight:l(()=>n.current.clientHeight,"getHeight")})),G.createElement("span",{"aria-hidden":!0,ref:n,style:X({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},t)},e)}),adt=l(t=>t.reduce((e,r)=>e+(DF(r)?String(r).length:1),0),"getNodesLen");function uhe(t,e){let r=0;const n=[];for(let a=0;a<t.length;a+=1){if(r===e)return n;const i=t[a],o=DF(i)?String(i).length:1,u=r+o;if(u>e){const h=e-r;return n.push(String(i).slice(0,h)),n}n.push(i),r=u}return t}l(uhe,"sliceNodes");var FF=0,BF=1,zF=2,HF=3,hhe=4,fA={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function idt(t){const{enableMeasure:e,width:r,text:n,children:a,rows:i,expanded:s,miscDeps:o,onEllipsis:u}=t,h=G.useMemo(()=>wo(n),[n]),d=G.useMemo(()=>adt(h),[n]),f=G.useMemo(()=>a(h,!1),[n]),[p,g]=G.useState(null),m=G.useRef(null),y=G.useRef(null),v=G.useRef(null),b=G.useRef(null),w=G.useRef(null),[x,T]=G.useState(!1),[C,S]=G.useState(FF),[E,k]=G.useState(0),[A,I]=G.useState(null);On(()=>{S(e&&r&&d?BF:FF)},[r,n,i,e,h]),On(()=>{var M,P,z,D;if(C===BF){S(zF);const B=y.current&&getComputedStyle(y.current).whiteSpace;I(B)}else if(C===zF){const B=!!((M=v.current)!=null&&M.isExceed());S(B?HF:hhe),g(B?[0,d]:null),T(B);const W=((P=v.current)==null?void 0:P.getHeight())||0,U=i===1?0:((z=b.current)==null?void 0:z.getHeight())||0,j=((D=w.current)==null?void 0:D.getHeight())||0,V=Math.max(W,U+j);k(V+1),u(B)}},[C]);const L=p?Math.ceil((p[0]+p[1])/2):0;On(()=>{var z;const[M,P]=p||[0,0];if(M!==P){const B=(((z=m.current)==null?void 0:z.getHeight())||0)>E;let W=L;P-M===1&&(W=B?M:P),g(B?[M,W]:[W,P])}},[p,L]);const R=G.useMemo(()=>{if(!e)return a(h,!1);if(C!==HF||!p||p[0]!==p[1]){const M=a(h,!1);return[hhe,FF].includes(C)?M:G.createElement("span",{style:Ne(X({},fA),{WebkitLineClamp:i})},M)}return a(s?h:uhe(h,p[0]),x)},[s,C,p,h].concat(Ea(o))),O={width:r,margin:0,padding:0,whiteSpace:A==="nowrap"?"normal":"inherit"};return G.createElement(G.Fragment,null,R,C===zF&&G.createElement(G.Fragment,null,G.createElement(dA,{style:Ne(X(X({},O),fA),{WebkitLineClamp:i}),ref:v},f),G.createElement(dA,{style:Ne(X(X({},O),fA),{WebkitLineClamp:i-1}),ref:b},f),G.createElement(dA,{style:Ne(X(X({},O),fA),{WebkitLineClamp:1}),ref:w},a([],!0))),C===HF&&p&&p[0]!==p[1]&&G.createElement(dA,{style:Ne(X({},O),{top:400}),ref:m},a(uhe(h,L),!0)),C===BF&&G.createElement("span",{style:{whiteSpace:"inherit"},ref:y}))}l(idt,"EllipsisMeasure");var dhe=l(({enableEllipsis:t,isEllipsis:e,children:r,tooltipProps:n})=>!(n!=null&&n.title)||!t?r:G.createElement(Ml,X({open:e?void 0:!1},n),r),"EllipsisTooltip");dhe.displayName="EllipsisTooltip";var sdt=dhe;function odt({mark:t,code:e,underline:r,delete:n,strong:a,keyboard:i,italic:s},o){let u=o;function h(d,f){f&&(u=G.createElement(d,{},u))}return l(h,"wrap"),h("strong",a),h("u",r),h("del",n),h("code",e),h("mark",t),h("kbd",i),h("i",s),u}l(odt,"wrapperDecorations");var ldt="...",fhe=["delete","mark","code","underline","strong","keyboard","italic"],cdt=G.forwardRef((t,e)=>{var tt;const ue=t,{prefixCls:r,className:n,style:a,type:i,disabled:s,children:o,ellipsis:u,editable:h,copyable:d,component:f,title:p}=ue,g=Xt(ue,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:m,direction:y}=G.useContext(vn),[v]=Tu("Text"),b=G.useRef(null),w=G.useRef(null),x=m("typography",r),T=ws(g,fhe),[C,S]=PF(h),[E,k]=Ta(!1,S.editing),{triggerType:A=["icon"]}=S,I=l(Re=>{var et;Re&&((et=S.onStart)==null||et.call(S)),k(Re)},"triggerEdit"),L=jht(E);On(()=>{var Re;!E&&L&&((Re=w.current)==null||Re.focus())},[E]);const R=l(Re=>{Re==null||Re.preventDefault(),I(!0)},"onEditClick"),O=l(Re=>{var et;(et=S.onChange)==null||et.call(S,Re),I(!1)},"onEditChange"),M=l(()=>{var Re;(Re=S.onCancel)==null||Re.call(S),I(!1)},"onEditCancel"),[P,z]=PF(d),{copied:D,copyLoading:B,onClick:W}=Yht({copyConfig:z,children:o}),[U,j]=G.useState(!1),[V,Y]=G.useState(!1),[H,q]=G.useState(!1),[Z,K]=G.useState(!1),[re,Q]=G.useState(!0),[te,ee]=PF(u,{expandable:!1,symbol:l(Re=>Re?v==null?void 0:v.collapse:v==null?void 0:v.expand,"symbol")}),[J,ae]=Ta(ee.defaultExpanded||!1,ee.expanded),se=te&&(!J||ee.expandable==="collapsible"),{rows:fe=1}=ee,ve=G.useMemo(()=>se&&(ee.suffix!==void 0||ee.onEllipsis||ee.expandable||C||P),[se,ee,C,P]);On(()=>{te&&!ve&&(j(doe("webkitLineClamp")),Y(doe("textOverflow")))},[ve,te]);const[de,Ee]=G.useState(se),Ce=G.useMemo(()=>ve?!1:fe===1?V:U,[ve,V,U]);On(()=>{Ee(Ce&&se)},[Ce,se]);const De=se&&(de?Z:H),ce=se&&fe===1&&de,Ie=se&&fe>1&&de,ye=l((Re,et)=>{var Xe;ae(et.expanded),(Xe=ee.onExpand)==null||Xe.call(ee,Re,et)},"onExpandClick"),[pe,Ae]=G.useState(0),Ve=l(({offsetWidth:Re})=>{Ae(Re)},"onResize2"),ze=l(Re=>{var et;q(Re),H!==Re&&((et=ee.onEllipsis)==null||et.call(ee,Re))},"onJsEllipsis");G.useEffect(()=>{const Re=b.current;if(te&&de&&Re){const et=tdt(Re);Z!==et&&K(et)}},[te,de,o,Ie,re,pe]),G.useEffect(()=>{const Re=b.current;if(typeof IntersectionObserver=="undefined"||!Re||!de||!se)return;const et=new IntersectionObserver(()=>{Q(!!Re.offsetParent)});return et.observe(Re),()=>{et.disconnect()}},[de,se]);const We=Xht(ee.tooltip,S.text,o),me=G.useMemo(()=>{if(!(!te||de))return[S.text,o,p,We.title].find(DF)},[te,de,p,We.title,De]);if(E)return G.createElement(zht,{value:(tt=S.text)!=null?tt:typeof o=="string"?o:"",onSave:O,onCancel:M,onEnd:S.onEnd,prefixCls:x,className:n,style:a,direction:y,component:f,maxLength:S.maxLength,autoSize:S.autoSize,enterIcon:S.enterIcon});const Se=l(()=>{const{expandable:Re,symbol:et}=ee;return Re?G.createElement("button",{type:"button",key:"expand",className:`${x}-${J?"collapse":"expand"}`,onClick:l(Xe=>ye(Xe,{expanded:!J}),"onClick"),"aria-label":J?v.collapse:v==null?void 0:v.expand},typeof et=="function"?et(J):et):null},"renderExpand"),ne=l(()=>{if(!C)return;const{icon:Re,tooltip:et,tabIndex:Xe}=S,ot=wo(et)[0]||(v==null?void 0:v.edit),Ge=typeof ot=="string"?ot:"";return A.includes("icon")?G.createElement(Ml,{key:"edit",title:et===!1?"":ot},G.createElement("button",{type:"button",ref:w,className:`${x}-edit`,onClick:R,"aria-label":Ge,tabIndex:Xe},Re||G.createElement(Sht,{role:"button"}))):null},"renderEdit"),xe=l(()=>P?G.createElement(ndt,Ne(X({key:"copy"},z),{prefixCls:x,copied:D,locale:v,onCopy:W,loading:B,iconOnly:!Eu(o)})):null,"renderCopy"),oe=l(Re=>[Re&&Se(),ne(),xe()],"renderOperations"),_e=l(Re=>[Re&&!J&&G.createElement("span",{"aria-hidden":!0,key:"ellipsis"},ldt),ee.suffix,oe(Re)],"renderEllipsis");return G.createElement(mh,{onResize:Ve,disabled:!se},Re=>G.createElement(sdt,{tooltipProps:We,enableEllipsis:se,isEllipsis:De},G.createElement(ohe,X({className:pt({[`${x}-${i}`]:i,[`${x}-disabled`]:s,[`${x}-ellipsis`]:te,[`${x}-ellipsis-single-line`]:ce,[`${x}-ellipsis-multiple-line`]:Ie,[`${x}-link`]:f==="a"},n),prefixCls:r,style:Ne(X({},a),{WebkitLineClamp:Ie?fe:void 0}),component:f,ref:xo(Re,b,e),direction:y,onClick:A.includes("text")?R:void 0,"aria-label":me==null?void 0:me.toString(),title:p},T),G.createElement(idt,{enableMeasure:se&&!de,text:o,rows:fe,width:pe,onEllipsis:ze,expanded:J,miscDeps:[D,J,B,C,P,v].concat(Ea(fhe.map(et=>t[et])))},(et,Xe)=>odt(t,G.createElement(G.Fragment,null,et.length>0&&Xe&&!J&&me?G.createElement("span",{key:"show-content","aria-hidden":!0},et):et,_e(Xe)))))))}),pA=cdt,udt=G.forwardRef((t,e)=>{const u=t,{ellipsis:r,rel:n,children:a,navigate:i}=u,s=Xt(u,["ellipsis","rel","children","navigate"]);Tn("Typography.Link")(typeof r!="object","usage","`ellipsis` only supports boolean value.");const o=Ne(X({},s),{rel:n===void 0&&s.target==="_blank"?"noopener noreferrer":n});return G.createElement(pA,Ne(X({},o),{ref:e,ellipsis:!!r,component:"a"}),a)}),hdt=udt,ddt=G.forwardRef((t,e)=>{const a=t,{children:r}=a,n=Xt(a,["children"]);return G.createElement(pA,Ne(X({ref:e},n),{component:"div"}),r)}),fdt=ddt,pdt=l((t,e)=>{const s=t,{ellipsis:r,children:n}=s,a=Xt(s,["ellipsis","children"]),i=G.useMemo(()=>r&&typeof r=="object"?ws(r,["expandable","rows"]):r,[r]);return Tn("Typography.Text")(typeof r!="object"||!r||!("expandable"in r)&&!("rows"in r),"usage","`ellipsis` do not support `expandable` or `rows` props."),G.createElement(pA,Ne(X({ref:e},a),{ellipsis:i,component:"span"}),n)},"Text"),gdt=G.forwardRef(pdt),phe=[1,2,3,4,5],mdt=G.forwardRef((t,e)=>{const s=t,{level:r=1,children:n}=s,a=Xt(s,["level","children"]);Tn("Typography.Title")(phe.includes(r),"usage","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version.");const i=phe.includes(r)?`h${r}`:"h1";return G.createElement(pA,Ne(X({ref:e},a),{component:i}),n)}),ydt=mdt,VS=ohe;VS.Text=gdt,VS.Link=hdt,VS.Title=ydt,VS.Paragraph=fdt;var Hd=VS;{const t=Zqe();VR(t>=18,"version","antd v6 no longer supports React versions below 18. Please upgrade to React 18 or higher.")}var vdt=32,bdt=8;function WF(t,e){try{return t.querySelector(e)}catch(r){return null}}l(WF,"safeQuerySelector");function xdt(t,e){return t.replace(/\s+/g," ").trim().slice(0,e)}l(xdt,"normalizeText$1");function wdt(t){var s,o,u,h;const e=[],r=(o=(s=t.tagName)==null?void 0:s.toLowerCase())!=null?o:"unknown";e.push(r);const n=(u=t.id)==null?void 0:u.trim();n&&e.push(`id=${n}`);const a=Array.from(t.classList).slice(0,bdt);a.length>0&&e.push(`class=${a.join(".")}`);const i=xdt((h=t.textContent)!=null?h:"",vdt);return i&&e.push(`text=${i}`),e.join("|")}l(wdt,"computeFingerprint");function ghe(t,e){try{return t.querySelectorAll(e).length===1}catch(r){return!1}}l(ghe,"isSelectorUnique");function mhe(t,e){const r=wdt(t),n=e.split("|"),a=r.split("|");if(n[0]!==a[0])return!1;const i=n.find(o=>o.startsWith("id=")),s=a.find(o=>o.startsWith("id="));return!(i&&i!==s)}l(mhe,"verifyFingerprint");function yhe(t){var e;return Array.from((e=t.children)!=null?e:[])}l(yhe,"readElementChildren");function vhe(t){return!!(t&&typeof t=="object"&&typeof t.tagName=="string")}l(vhe,"isElementLike");function Tdt(t,e){let r=t;for(const n of e){const a=Number(n);if(!Number.isInteger(a)||a<0)return null;const i=yhe(r)[a];if(!i)return null;r=i}return vhe(r)?r:null}l(Tdt,"locateElementByNumericPath");function Edt(t,e){let r=t instanceof Document&&t.body?t.body:t;for(const n of e){if(!n||typeof n!="object")return null;const a=n,i=String(a.tag||"").trim().toLowerCase(),s=Number(a.index);if(!i||!Number.isInteger(s)||s<0)return null;const o=yhe(r).filter(u=>u.tagName.toLowerCase()===i)[s];if(!o)return null;r=o}return vhe(r)?r:null}l(Edt,"locateElementByTaggedPath");function Cdt(t,e){return!Array.isArray(e)||e.length===0?null:e.every(r=>typeof r=="number")?Tdt(t,e):Edt(t,e)}l(Cdt,"locateElementByPath");function Sdt(t,e=document){var i,s;let r=e;if((i=t.frameChain)!=null&&i.length)for(const o of t.frameChain){const u=WF(r,o);if(!(u instanceof HTMLIFrameElement))return null;const h=u.contentDocument;if(!h)return null;r=h}let n=r;if((s=t.shadowHostChain)!=null&&s.length)for(const o of t.shadowHostChain){if(!ghe(n,o))return null;const u=WF(n,o);if(!u)return null;const h=u.shadowRoot;if(!h)return null;n=h}for(const o of t.selectors){if(!ghe(n,o))continue;const u=WF(n,o);if(u&&!(t.fingerprint&&!mhe(u,t.fingerprint)))return u}const a=Cdt(n,t.path);return a&&(!t.fingerprint||mhe(a,t.fingerprint))?a:null}l(Sdt,"locateElement");function _dt(t){var a,i,s,o;const e=t.selectors.join("|"),r=(i=(a=t.shadowHostChain)==null?void 0:a.join(">"))!=null?i:"";return`frame:${(o=(s=t.frameChain)==null?void 0:s.join(">"))!=null?o:""}|shadow:${r}|sel:${e}`}l(_dt,"locatorKey");var bhe="[WebEditorV2]",xhe="__axhub_annotation_host__",whe="__axhub_annotation_overlay__",The="__axhub_annotation_ui__",kdt=2147483647,Pl={hover:"#008F5D",selected:"#008F5D",selectionBorder:"#008F5D",dragGhost:"rgba(0, 143, 93, 0.22)",insertionLine:"#008F5D",guideLine:"rgba(0, 143, 93, 0.72)",distanceLabelBg:"rgba(18, 18, 18, 0.94)",distanceLabelBorder:"rgba(0, 143, 93, 0.24)",distanceLabelText:"rgba(255, 255, 255, 0.98)"},Adt=3,Ndt=1,Idt=1,Ldt=4,$dt='600 11px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',Mdt=6,Pdt=3,Rdt=4,Odt=8,GS=(NC=class{constructor(){this.disposed=!1,this.disposers=[]}get isDisposed(){return this.disposed}add(e){if(this.disposed){try{e()}catch(r){}return}this.disposers.push(e)}listen(e,r,n,a){e.addEventListener(r,n,a),this.add(()=>e.removeEventListener(r,n,a))}observeResize(e,r,n){const a=new ResizeObserver(r);return a.observe(e,n),this.add(()=>a.disconnect()),a}observeMutation(e,r,n){const a=new MutationObserver(r);return a.observe(e,n),this.add(()=>a.disconnect()),a}requestAnimationFrame(e){const r=requestAnimationFrame(e);let n=!1;const a=l(()=>{n||(n=!0,cancelAnimationFrame(r))},"cancel");return this.add(a),a}dispose(){if(!this.disposed){this.disposed=!0;for(let e=this.disposers.length-1;e>=0;e--)try{this.disposers[e]()}catch(r){}this.disposers.length=0}}},l(NC,"Disposer"),NC),Ehe="data-mcp-canvas",Che="overlay",Ddt=100,Fdt=2600,VF={hover:{strokeColor:Pl.hover,fillColor:"transparent",lineWidth:1,dashPattern:[6,4]},selection:{strokeColor:Pl.selected,fillColor:"transparent",lineWidth:2,dashPattern:[]},dragGhost:{strokeColor:Pl.selectionBorder,fillColor:Pl.dragGhost,lineWidth:2,dashPattern:[8,6]}};function She(t){return Number.isFinite(t)&&t>0}l(She,"isFinitePositive");function Vx(t){return t?Number.isFinite(t.left)&&Number.isFinite(t.top)&&She(t.width)&&She(t.height):!1}l(Vx,"isValidRect");function gA(t){return t?Number.isFinite(t.x1)&&Number.isFinite(t.y1)&&Number.isFinite(t.x2)&&Number.isFinite(t.y2):!1}l(gA,"isValidLine");function mA(t,e,r){return Number.isFinite(t)?Math.min(r,Math.max(e,t)):e}l(mA,"clamp$1");function _he(t){return 1-Math.pow(1-t,3)}l(_he,"easeOutCubic");function yA(t,e,r){return t+(e-t)*r}l(yA,"lerp$1");function khe(t,e,r){return{left:yA(t.left,e.left,r),top:yA(t.top,e.top,r),width:yA(t.width,e.width,r),height:yA(t.height,e.height,r)}}l(khe,"lerpRect");function Ahe(t,e,r,n,a,i){const s=Math.max(0,Math.min(i,Math.min(n,a)/2));t.moveTo(e+s,r),t.arcTo(e+n,r,e+n,r+a,s),t.arcTo(e+n,r+a,e,r+a,s),t.arcTo(e,r+a,e,r,s),t.arcTo(e,r,e+n,r,s),t.closePath()}l(Ahe,"buildRoundedRectPath");function Bdt(t){const{container:e}=t,r=new GS,n=e.querySelector(`canvas[${Ehe}="${Che}"]`);n&&n.remove();const a=document.createElement("canvas");a.setAttribute(Ehe,Che),a.setAttribute("aria-hidden","true"),Object.assign(a.style,{position:"absolute",inset:"0",width:"100%",height:"100%",pointerEvents:"none",display:"block"}),e.append(a),r.add(()=>a.remove());const i=a.getContext("2d",{alpha:!0,desynchronized:!0});if(!i)throw r.dispose(),new Error(`${bhe} Failed to get canvas 2D context`);const s=i;let o=null,u=null,h=null,d="default",f=null,p=null,g=null,m=null,y=null,v=null,b=1,w=1,x=1,T=!0,C=null;function S(){const ee=document.createElement("div");ee.setAttribute("data-we-ai-selection-effect","true"),Object.assign(ee.style,{position:"absolute",pointerEvents:"none",display:"none",overflow:"hidden",borderRadius:"0",border:`2px solid ${Pl.selected}`,boxShadow:"none",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",background:"rgba(255, 255, 255, 0.22)",zIndex:"1"});const J=document.createElement("div");Object.assign(J.style,{position:"absolute",left:"0",top:"0",width:"100%",height:"72px",background:"linear-gradient(to bottom, rgba(0, 143, 93, 0), rgba(0, 143, 93, 0.08) 28%, rgba(0, 143, 93, 0.18) 50%, rgba(0, 143, 93, 0.08) 72%, rgba(0, 143, 93, 0))",display:"flex",alignItems:"center",justifyContent:"center",willChange:"transform"});const ae=document.createElement("div");return Object.assign(ae.style,{width:"100%",height:"1px",background:"rgba(0, 143, 93, 0.62)",boxShadow:"0 0 12px rgba(0, 143, 93, 0.58)"}),J.append(ae),ee.append(J),e.append(ee),{root:ee,sweep:J,animation:null,animationKey:""}}l(S,"createAiEditingEffectNode");const E=[];r.add(()=>{var ee;for(const J of E)(ee=J.animation)==null||ee.cancel(),J.root.remove()});function k(ee){var J;for(;E.length<ee;)E.push(S());for(;E.length>ee;){const ae=E.pop();if(!ae)break;(J=ae.animation)==null||J.cancel(),ae.root.remove()}}l(k,"ensureAiEditingEffectNodes");function A(){C!==null&&(cancelAnimationFrame(C),C=null)}l(A,"cancelRaf"),r.add(A);function I(){C!==null||r.isDisposed||(C=requestAnimationFrame(()=>{C=null,U()}))}l(I,"scheduleRaf");function L(){const ee=Math.max(1,window.devicePixelRatio||1),J=Math.max(1,b),ae=Math.max(1,w),se=Math.round(J*ee),fe=Math.round(ae*ee);return a.width!==se||a.height!==fe||Math.abs(x-ee)>.001?(x=ee,a.width=se,a.height=fe,s.setTransform(x,0,0,x,0,0),s.lineJoin="round",s.lineCap="round",!0):!1}l(L,"updateCanvasSize");function R(){L(),s.clearRect(0,0,b,w)}l(R,"clearCanvas");function O(ee,J){if(!Vx(ee))return;const ae=Math.round(ee.width),se=Math.round(ee.height);if(ae<=0||se<=0)return;const fe=Math.round(ee.left)+.5,ve=Math.round(ee.top)+.5;s.save(),s.lineWidth=J.lineWidth,s.strokeStyle=J.strokeColor,s.fillStyle=J.fillColor,s.setLineDash(J.dashPattern),s.beginPath(),s.rect(fe,ve,ae,se),s.fill(),s.stroke(),s.restore()}l(O,"drawBox");function M(){var J;const ee=[];if(d==="ai-editing"&&Vx(h)&&ee.push(h),f!=null&&f.length)for(const ae of f)Vx(ae)&&ee.push(ae);if(k(ee.length),ee.length===0){for(const ae of E)ae.root.style.display="none",(J=ae.animation)==null||J.pause();return}ee.forEach((ae,se)=>{var De;const fe=E[se],ve=Math.max(1,Math.round(ae.width)),de=Math.max(1,Math.round(ae.height)),Ee=Math.max(48,Math.min(88,Math.round(de*.28)));fe.root.style.display="block",fe.root.style.left=`${Math.round(ae.left)}px`,fe.root.style.top=`${Math.round(ae.top)}px`,fe.root.style.width=`${ve}px`,fe.root.style.height=`${de}px`,fe.sweep.style.height=`${Ee}px`;const Ce=`${de}:${Ee}`;(fe.animationKey!==Ce||!fe.animation)&&((De=fe.animation)==null||De.cancel(),fe.animationKey=Ce,fe.animation=fe.sweep.animate([{transform:`translateY(-${Ee}px)`},{transform:`translateY(${de}px)`}],{duration:Fdt,iterations:1/0,easing:"linear"})),fe.animation.play()})}l(M,"syncAiSelectionEffect");function P(ee){if(!gA(ee))return;s.save(),s.lineWidth=Adt,s.strokeStyle=Pl.insertionLine,s.setLineDash([]),s.lineCap="round";const J=Math.round(ee.x1)+.5,ae=Math.round(ee.y1)+.5,se=Math.round(ee.x2)+.5,fe=Math.round(ee.y2)+.5;s.beginPath(),s.moveTo(J,ae),s.lineTo(se,fe),s.stroke(),s.restore()}l(P,"drawInsertionLine");function z(ee){if(!(!ee||ee.length===0)){s.save(),s.lineWidth=Ndt,s.strokeStyle=Pl.guideLine,s.setLineDash([]),s.lineCap="round",s.beginPath();for(const J of ee){if(!gA(J))continue;const ae=Math.round(J.x1)+.5,se=Math.round(J.y1)+.5,fe=Math.round(J.x2)+.5,ve=Math.round(J.y2)+.5;s.moveTo(ae,se),s.lineTo(fe,ve)}s.stroke(),s.restore()}}l(z,"drawGuideLines");function D(ee){if(!ee||ee.length===0)return;s.save(),s.lineWidth=Idt,s.strokeStyle=Pl.guideLine,s.setLineDash([]),s.lineCap="round";const J=Ldt;s.beginPath();for(const ae of ee){const se=ae.line;if(!gA(se))continue;const fe=Math.round(se.x1)+.5,ve=Math.round(se.y1)+.5,de=Math.round(se.x2)+.5,Ee=Math.round(se.y2)+.5;s.moveTo(fe,ve),s.lineTo(de,Ee),ae.axis==="x"?(s.moveTo(fe,ve-J),s.lineTo(fe,ve+J),s.moveTo(de,Ee-J),s.lineTo(de,Ee+J)):(s.moveTo(fe-J,ve),s.lineTo(fe+J,ve),s.moveTo(de-J,Ee),s.lineTo(de+J,Ee))}s.stroke(),s.font=$dt,s.textAlign="center",s.textBaseline="middle";for(const ae of ee){const se=ae.line;if(!gA(se))continue;const fe=s.measureText(ae.text),ve=fe.width,de=Number.isFinite(fe.actualBoundingBoxAscent)?fe.actualBoundingBoxAscent:8,Ee=Number.isFinite(fe.actualBoundingBoxDescent)?fe.actualBoundingBoxDescent:3,Ce=de+Ee,De=Math.ceil(ve+Mdt*2),ce=Math.ceil(Ce+Pdt*2),Ie=(se.x1+se.x2)/2,ye=(se.y1+se.y2)/2,pe=Odt;let Ae=Ie-De/2,Ve=ye-ce/2;ae.axis==="x"?(Ve=ye-ce/2-pe,Ve<0&&(Ve=ye+pe-ce/2)):(Ae=Ie+pe-De/2,Ae+De>b&&(Ae=Ie-pe-De/2));const ze=Math.max(2,b-De-2),We=Math.max(2,w-ce-2);Ae=mA(Ae,2,ze),Ve=mA(Ve,2,We),s.save(),s.fillStyle=Pl.distanceLabelBg,s.strokeStyle=Pl.distanceLabelBorder,s.lineWidth=1,s.beginPath(),Ahe(s,Ae,Ve,De,ce,Rdt),s.fill(),s.stroke(),s.fillStyle=Pl.distanceLabelText,s.fillText(ae.text,Ae+De/2,Ve+ce/2),s.restore()}s.restore()}l(D,"drawDistanceLabels");function B(ee){if(!(!ee||ee.length===0)){s.save(),s.fillStyle=`${Pl.selected}25`,s.strokeStyle="transparent";for(const J of ee){if(!Vx(J))continue;const ae=Math.round(J.left),se=Math.round(J.top),fe=Math.round(J.width),ve=Math.round(J.height);s.beginPath(),Ahe(s,ae,se,fe,ve,2),s.fill()}s.restore()}}l(B,"drawTextHighlightRects");function W(){r.isDisposed||(T=!0,I())}l(W,"markDirty");function U(){if(r.isDisposed||!T)return;A(),T=!1;const ee=performance.now();let J=o;if(u){const ae=ee-u.startTime,se=mA(ae/u.durationMs,0,1),fe=_he(se);J=khe(u.start,u.end,fe),se>=1?u=null:T=!0}R(),B(v),O(J,VF.hover),d!=="ai-editing"&&O(h,VF.selection),O(p,VF.dragGhost),P(g),z(m),D(y),M(),T&&I()}l(U,"render2");function j(ee,J){if(!((J==null?void 0:J.animate)===!0)){u=null,o=ee,W();return}const se=performance.now();let fe=o;if(u){const ve=se-u.startTime,de=mA(ve/u.durationMs,0,1),Ee=_he(de);fe=khe(u.start,u.end,Ee)}if(!Vx(fe)||!Vx(ee)){u=null,o=ee,W();return}u={start:X({},fe),end:X({},ee),startTime:se,durationMs:Ddt},o=ee,W()}l(j,"setHoverRect");function V(ee){h=ee,M(),W()}l(V,"setSelectionRect");function Y(ee){d!==ee&&(d=ee,M(),W())}l(Y,"setSelectionEffect");function H(ee){f=ee&&ee.length>0?ee:null,M(),W()}l(H,"setEditingRects");function q(ee){p=ee,W()}l(q,"setDragGhostRect");function Z(ee){g=ee,W()}l(Z,"setInsertionLine");function K(ee){m=ee&&ee.length>0?ee:null,W()}l(K,"setGuideLines");function re(ee){y=ee&&ee.length>0?ee:null,W()}l(re,"setDistanceLabels");function Q(ee){v=ee&&ee.length>0?ee:null,W()}l(Q,"setTextHighlightRects");function te(){o=null,u=null,h=null,d="default",f=null,v=null,M(),p=null,g=null,m=null,y=null,W()}l(te,"clear");try{const ee=e.getBoundingClientRect();b=Math.max(1,ee.width),w=Math.max(1,ee.height)}catch(ee){console.warn(`${bhe} Initial size measurement failed:`,ee)}return r.observeResize(e,ee=>{const J=ee[0],ae=J==null?void 0:J.contentRect;if(!ae)return;const se=Math.max(1,ae.width),fe=Math.max(1,ae.height);Math.abs(se-b)<.5&&Math.abs(fe-w)<.5||(b=se,w=fe,W())}),W(),{canvas:a,markDirty:W,render:U,clear:te,setHoverRect:j,setSelectionRect:V,setSelectionEffect:Y,setEditingRects:H,setTextHighlightRects:Q,setDragGhostRect:q,setInsertionLine:Z,setGuideLines:K,setDistanceLabels:re,dispose:l(()=>r.dispose(),"dispose")}}l(Bdt,"createCanvasOverlay");var qS=null;function Nhe(){if(qS!==null)return qS;if(typeof window=="undefined"||typeof navigator=="undefined")return qS=!1,!1;const t="ontouchstart"in window||navigator.maxTouchPoints!=null&&navigator.maxTouchPoints>0,e=window.innerWidth<=768;return qS=t&&e,qS}l(Nhe,"isMobileDevice");var Gx="axhub-annotation-popover",zdt=`
|
||
:host {
|
||
all: initial;
|
||
|
||
/* Shared overlay tokens */
|
||
--we-surface-bg: #0a0a0a;
|
||
|
||
/* Border colors */
|
||
--we-border-subtle: rgba(255, 255, 255, 0.08);
|
||
|
||
/* Text colors */
|
||
--we-text-primary: rgba(255, 255, 255, 0.94);
|
||
--we-text-secondary: rgba(255, 255, 255, 0.72);
|
||
--we-text-muted: #a1a1aa;
|
||
|
||
/* Shared chrome */
|
||
--we-shadow-panel: 0 20px 54px rgba(0, 0, 0, 0.42), 0 6px 20px rgba(0, 0, 0, 0.28);
|
||
--we-shadow-glow: 0 0 22px rgba(0, 143, 93, 0.18);
|
||
--we-editor-surface-dark: #121212;
|
||
--we-editor-surface-elevated-dark: #161616;
|
||
--we-editor-surface-muted-dark: #18181b;
|
||
--we-editor-surface-interactive-dark: #1d1d1f;
|
||
--we-editor-border-dark: rgba(255, 255, 255, 0.08);
|
||
--we-editor-border-strong-dark: rgba(255, 255, 255, 0.12);
|
||
--we-editor-text-primary-dark: rgba(255, 255, 255, 0.94);
|
||
--we-editor-text-secondary-dark: rgba(255, 255, 255, 0.72);
|
||
--we-editor-text-muted-dark: #a1a1aa;
|
||
--we-brand-primary: #008f5d;
|
||
--we-brand-accent: #00d68f;
|
||
--we-brand-sleeping: #71717a;
|
||
|
||
--we-radius-panel: 16px;
|
||
--we-radius-control: 12px;
|
||
--we-radius-pill: 999px;
|
||
|
||
/* Focus ring */
|
||
--we-focus-ring: rgba(0, 214, 143, 0.24);
|
||
}
|
||
|
||
*,
|
||
*::before,
|
||
*::after {
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
/* Overlay container - for Canvas and visual feedback */
|
||
#${whe} {
|
||
position: fixed;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
contain: layout style;
|
||
}
|
||
|
||
/* ==========================================================================
|
||
* Resize Handles (Phase 4.9)
|
||
* ========================================================================== */
|
||
|
||
/* Handles layer - covers viewport, pass-through by default */
|
||
.we-handles-layer {
|
||
position: absolute;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
contain: layout style paint;
|
||
}
|
||
|
||
/* Selection frame - positioned by selection rect */
|
||
.we-selection-frame {
|
||
position: absolute;
|
||
top: 0;
|
||
left: 0;
|
||
width: 0;
|
||
height: 0;
|
||
transform: translate3d(0, 0, 0);
|
||
pointer-events: none;
|
||
will-change: transform, width, height;
|
||
}
|
||
|
||
.we-parent-corner {
|
||
position: absolute;
|
||
width: 7px;
|
||
height: 7px;
|
||
margin: 0;
|
||
padding: 0;
|
||
border: 0;
|
||
background: transparent;
|
||
pointer-events: auto;
|
||
display: block;
|
||
cursor: pointer;
|
||
user-select: none;
|
||
touch-action: manipulation;
|
||
z-index: 7;
|
||
}
|
||
|
||
.we-parent-corner[data-hidden="true"] {
|
||
display: none;
|
||
}
|
||
|
||
.we-parent-corner:focus-visible {
|
||
outline: none;
|
||
}
|
||
|
||
.we-parent-corner__chrome {
|
||
width: 100%;
|
||
height: 100%;
|
||
border-radius: 2px;
|
||
display: block;
|
||
opacity: 0.82;
|
||
transition: opacity 140ms ease, box-shadow 140ms ease;
|
||
}
|
||
|
||
/* Individual resize handle */
|
||
.we-resize-handle {
|
||
position: absolute;
|
||
width: 8px;
|
||
height: 8px;
|
||
border-radius: 2px;
|
||
background: #ffffff;
|
||
border: 1px solid ${Pl.selectionBorder};
|
||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9), 0 0 0 2px rgba(0, 214, 143, 0.18),
|
||
0 8px 20px rgba(0, 0, 0, 0.18);
|
||
pointer-events: auto;
|
||
touch-action: none;
|
||
user-select: none;
|
||
transition: background-color 0.1s ease, border-color 0.1s ease, transform 0.1s ease,
|
||
box-shadow 0.1s ease;
|
||
}
|
||
|
||
.we-resize-handle:hover {
|
||
background: #ffffff;
|
||
border-color: ${Pl.selectionBorder};
|
||
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.98), 0 0 0 3px rgba(0, 214, 143, 0.22),
|
||
0 10px 24px rgba(0, 0, 0, 0.2);
|
||
transform: translate(-50%, -50%) scale(1.15);
|
||
}
|
||
|
||
.we-resize-handle:active {
|
||
transform: translate(-50%, -50%) scale(1.0);
|
||
}
|
||
|
||
/* Handle positions - all use translate(-50%, -50%) as base */
|
||
.we-resize-handle[data-dir="n"] { left: 50%; top: 0; transform: translate(-50%, -50%); cursor: ns-resize; }
|
||
.we-resize-handle[data-dir="s"] { left: 50%; top: 100%; transform: translate(-50%, -50%); cursor: ns-resize; }
|
||
.we-resize-handle[data-dir="e"] { left: 100%; top: 50%; transform: translate(-50%, -50%); cursor: ew-resize; }
|
||
.we-resize-handle[data-dir="w"] { left: 0; top: 50%; transform: translate(-50%, -50%); cursor: ew-resize; }
|
||
.we-resize-handle[data-dir="nw"] { left: 0; top: 0; transform: translate(-50%, -50%); cursor: nwse-resize; }
|
||
.we-resize-handle[data-dir="ne"] { left: 100%; top: 0; transform: translate(-50%, -50%); cursor: nesw-resize; }
|
||
.we-resize-handle[data-dir="sw"] { left: 0; top: 100%; transform: translate(-50%, -50%); cursor: nesw-resize; }
|
||
.we-resize-handle[data-dir="se"] { left: 100%; top: 100%; transform: translate(-50%, -50%); cursor: nwse-resize; }
|
||
|
||
/* Size HUD - shows W×H while resizing */
|
||
.we-size-hud {
|
||
position: absolute;
|
||
left: 50%;
|
||
top: 0;
|
||
transform: translate(-50%, calc(-100% - 8px));
|
||
padding: 3px 8px;
|
||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
line-height: 1.2;
|
||
color: rgba(255, 255, 255, 0.98);
|
||
background: rgba(18, 18, 18, 0.94);
|
||
border: 1px solid rgba(0, 214, 143, 0.2);
|
||
border-radius: 999px;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
white-space: nowrap;
|
||
box-shadow: var(--we-shadow-glow), 0 8px 20px rgba(0, 0, 0, 0.24);
|
||
backdrop-filter: blur(4px);
|
||
-webkit-backdrop-filter: blur(4px);
|
||
}
|
||
|
||
/* ==========================================================================
|
||
* Performance HUD (Phase 5.3)
|
||
* ========================================================================== */
|
||
|
||
.we-perf-hud {
|
||
position: fixed;
|
||
left: 12px;
|
||
bottom: 12px;
|
||
padding: 8px 10px;
|
||
border-radius: 16px;
|
||
background: rgba(18, 18, 18, 0.86);
|
||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||
color: rgba(255, 255, 255, 0.96);
|
||
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||
font-size: 12px;
|
||
line-height: 1.25;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
white-space: nowrap;
|
||
z-index: 10;
|
||
box-shadow: var(--we-shadow-panel);
|
||
backdrop-filter: blur(6px);
|
||
-webkit-backdrop-filter: blur(6px);
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
.we-perf-hud-line + .we-perf-hud-line {
|
||
margin-top: 4px;
|
||
}
|
||
|
||
/* UI container - for panels and controls */
|
||
/* Position below toolbar: 16px (toolbar top) + 40px (toolbar height) + 8px (gap) = 64px */
|
||
#${The} {
|
||
position: fixed;
|
||
inset: 0;
|
||
top: 32px;
|
||
right: 16px;
|
||
pointer-events: none;
|
||
z-index: 10020;
|
||
font-family: "Inter", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||
font-size: 11px;
|
||
line-height: 1.4;
|
||
color: var(--we-text-primary);
|
||
-webkit-font-smoothing: antialiased;
|
||
}
|
||
|
||
/* ==========================================================================
|
||
Breadcrumbs (Phase 2.2) - Anchored to selection element
|
||
========================================================================== */
|
||
.we-breadcrumbs {
|
||
position: fixed;
|
||
/* left/top set dynamically via JS based on selection rect */
|
||
left: 16px;
|
||
top: 72px;
|
||
width: auto;
|
||
max-width: min(600px, calc(100vw - 400px));
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 2px;
|
||
padding: 4px 6px;
|
||
background: var(--we-surface-bg);
|
||
border: 1px solid var(--we-border-subtle);
|
||
border-radius: var(--we-radius-panel);
|
||
box-shadow: var(--we-shadow-panel);
|
||
pointer-events: auto;
|
||
user-select: none;
|
||
overflow-x: auto;
|
||
white-space: nowrap;
|
||
scrollbar-width: none;
|
||
z-index: 5;
|
||
color: var(--we-text-primary);
|
||
}
|
||
|
||
.we-breadcrumbs[data-hidden="true"] {
|
||
display: none;
|
||
}
|
||
|
||
.we-breadcrumbs[data-position="bottom"] {
|
||
top: auto;
|
||
bottom: 72px;
|
||
}
|
||
|
||
.we-breadcrumbs::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
|
||
.we-crumb {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
max-width: 220px;
|
||
padding: 4px 8px;
|
||
border-radius: var(--we-radius-control);
|
||
border: none;
|
||
background: transparent;
|
||
color: var(--we-text-secondary);
|
||
font-size: 12px;
|
||
font-weight: 500;
|
||
line-height: 1.2;
|
||
cursor: pointer;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
transition: all 0.15s ease;
|
||
}
|
||
|
||
.we-crumb-send-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 24px;
|
||
height: 24px;
|
||
border: none;
|
||
border-radius: var(--we-radius-control);
|
||
background: rgba(0, 143, 93, 0.1);
|
||
color: #008F5D;
|
||
cursor: pointer;
|
||
transition: background 0.15s ease, transform 0.15s ease;
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.we-crumb-send-btn svg {
|
||
width: 14px;
|
||
height: 14px;
|
||
display: block;
|
||
}
|
||
|
||
.we-crumb-send-btn:hover {
|
||
background: rgba(0, 143, 93, 0.16);
|
||
transform: translateY(-1px);
|
||
}
|
||
|
||
.we-crumb-send-btn:focus-visible {
|
||
outline: none;
|
||
box-shadow: 0 0 0 2px var(--we-focus-ring);
|
||
}
|
||
|
||
.we-crumb:hover {
|
||
background: rgba(0, 143, 93, 0.08);
|
||
color: var(--we-text-primary);
|
||
}
|
||
|
||
.we-crumb:active {
|
||
background: rgba(0, 143, 93, 0.12);
|
||
}
|
||
|
||
.we-crumb:focus-visible {
|
||
outline: none;
|
||
box-shadow: 0 0 0 2px var(--we-focus-ring);
|
||
}
|
||
|
||
.we-crumb--current {
|
||
background: rgba(0, 143, 93, 0.1);
|
||
color: #008F5D;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.we-crumb-sep {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 14px;
|
||
flex: 0 0 auto;
|
||
color: var(--we-text-muted);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.we-crumb-sep--shadow {
|
||
color: var(--we-text-secondary);
|
||
}
|
||
|
||
.we-change-markers {
|
||
position: fixed;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
z-index: 9996;
|
||
}
|
||
|
||
.we-change-marker {
|
||
position: fixed;
|
||
transform: translate(-50%, -50%);
|
||
width: 22px;
|
||
height: 22px;
|
||
border-radius: 999px;
|
||
background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
|
||
color: #ffffff;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
font-size: 11px;
|
||
font-weight: 700;
|
||
line-height: 1;
|
||
letter-spacing: -0.02em;
|
||
box-shadow:
|
||
0 8px 18px rgba(15, 23, 42, 0.22),
|
||
0 0 0 2px rgba(255, 255, 255, 0.95);
|
||
pointer-events: auto;
|
||
cursor: pointer;
|
||
transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
|
||
}
|
||
|
||
.we-change-marker:hover,
|
||
.we-change-marker:focus-visible {
|
||
transform: translate(-50%, -50%) scale(1.06);
|
||
box-shadow:
|
||
0 10px 22px rgba(15, 23, 42, 0.28),
|
||
0 0 0 2px rgba(255, 255, 255, 0.95),
|
||
0 0 0 5px rgba(0, 143, 93, 0.18);
|
||
outline: none;
|
||
}
|
||
|
||
.we-change-marker__tooltip {
|
||
position: absolute;
|
||
left: 50%;
|
||
top: calc(100% + 8px);
|
||
transform: translateX(-50%);
|
||
width: min(280px, calc(100vw - 32px));
|
||
max-width: min(280px, calc(100vw - 32px));
|
||
padding: 8px 10px;
|
||
border-radius: 10px;
|
||
background: rgba(15, 23, 42, 0.96);
|
||
color: rgba(255, 255, 255, 0.92);
|
||
box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
|
||
opacity: 0;
|
||
pointer-events: none;
|
||
transition: opacity 0.12s ease, transform 0.12s ease;
|
||
}
|
||
|
||
.we-change-marker:hover .we-change-marker__tooltip,
|
||
.we-change-marker:focus-visible .we-change-marker__tooltip {
|
||
opacity: 1;
|
||
transform: translateX(-50%) translateY(0);
|
||
}
|
||
|
||
.we-change-marker__details {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
margin-top: 4px;
|
||
}
|
||
|
||
.we-change-marker__label {
|
||
display: block;
|
||
font-size: 10px;
|
||
font-weight: 500;
|
||
line-height: 1.35;
|
||
color: rgba(255, 255, 255, 0.58);
|
||
}
|
||
|
||
.we-change-marker__note {
|
||
display: block;
|
||
font-size: 12px;
|
||
font-weight: 700;
|
||
line-height: 1.5;
|
||
color: rgba(255, 255, 255, 0.96);
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
/* ==========================================================================
|
||
* Global Hidden Rule
|
||
* Ensures [hidden] attribute always hides elements, even when they have
|
||
* explicit display values (flex, inline-flex, etc.)
|
||
* ========================================================================== */
|
||
.${Gx},
|
||
.${Gx} *,
|
||
.${Gx}.ant-popover,
|
||
.${Gx}.ant-popover * {
|
||
pointer-events: auto;
|
||
}
|
||
|
||
[hidden] {
|
||
display: none !important;
|
||
}
|
||
`;function L0(t,e,r){t.style.setProperty(e,r,"important")}l(L0,"setImportantStyle");function Hdt(t={}){var y;const e=new GS;let r=null;const n=document.getElementById(xhe);if(n)try{n.remove()}catch(v){}const a=document.createElement("div");a.id=xhe,a.setAttribute("data-mcp-web-editor","v2"),L0(a,"position","fixed"),L0(a,"inset","0"),L0(a,"z-index",String(kdt)),L0(a,"pointer-events","none"),L0(a,"background","transparent"),Nhe()?L0(a,"contain","none"):(L0(a,"contain","layout style paint"),L0(a,"isolation","isolate"));const i=a.attachShadow({mode:"open"}),s=document.createElement("style");s.textContent=zdt,i.append(s);const o=document.createElement("div");o.id=whe;const u=document.createElement("div");u.id=The,i.append(o,u),((y=document.documentElement)!=null?y:document.body).append(a),e.add(()=>a.remove()),r={host:a,shadowRoot:i,overlayRoot:o,uiRoot:u};const d=["pointerdown","pointerup","pointermove","pointerenter","pointerleave","mousedown","mouseup","mousemove","mouseenter","mouseleave","click","dblclick","contextmenu","keydown","keyup","keypress","wheel","touchstart","touchmove","touchend","touchcancel","focus","blur","input","change"],f=l(v=>{v.stopPropagation()},"stopPropagation");for(const v of d)e.listen(u,v,f),e.listen(o,v,f);const p=l(v=>{if(!(v instanceof Node))return!1;if(v===a)return!0;const b=typeof v.getRootNode=="function"?v.getRootNode():null;return b instanceof ShadowRoot&&b.host===a},"isOverlayElement"),g=l(v=>v instanceof Element?v.classList.contains(Gx)||!!v.closest(`.${Gx}`):!1,"isMarkedUiElement");return{getElements:l(()=>r,"getElements"),isOverlayElement:p,isEventFromUi:l(v=>{try{if(typeof v.composedPath=="function")return v.composedPath().some(b=>p(b)||g(b))}catch(b){}return p(v.target)||g(v.target)},"isEventFromUi"),dispose:l(()=>{r=null,e.dispose()},"dispose")}}l(Hdt,"mountShadowHost");var Ihe="axhub:page-zoom-update",Ja={enabled:!1,reservedLeftWidth:0,reservedRightWidth:0,bodySnapshots:new Map,htmlSnapshots:new Map,resizeHandler:null};function Lhe(t,e){return{value:t.getPropertyValue(e),priority:t.getPropertyPriority(e)}}l(Lhe,"readInlineStyle");function GF(t,e,r){if(!r){t.removeProperty(e);return}if(r.value){t.setProperty(e,r.value,r.priority);return}t.removeProperty(e)}l(GF,"restoreInlineStyle");function Wdt(){if(typeof document=="undefined"||!document.body||!document.documentElement||Ja.bodySnapshots.size>0||Ja.htmlSnapshots.size>0)return;const t=document.body.style,e=document.documentElement.style;["transform","transform-origin"].forEach(r=>{Ja.bodySnapshots.set(r,Lhe(t,r))}),["overflow-x"].forEach(r=>{Ja.htmlSnapshots.set(r,Lhe(e,r))})}l(Wdt,"captureSnapshots");function Vdt(t){if(typeof document=="undefined"||!document.body)return 0;const e=Array.from(document.body.querySelectorAll("*"));let r=Number.POSITIVE_INFINITY;for(const n of e){if(!n.isConnected)continue;const a=n.getBoundingClientRect();if(!Number.isFinite(a.left)||!Number.isFinite(a.width)||!Number.isFinite(a.height)||a.width<24||a.height<16||a.right<=0||a.left>=t)continue;const i=window.getComputedStyle(n);i.display==="none"||i.visibility==="hidden"||i.opacity==="0"||i.position==="fixed"||(r=Math.min(r,a.left))}return Number.isFinite(r)?Math.max(0,r):0}l(Vdt,"measureVisibleContentLeft");function $he(){if(typeof window=="undefined"||typeof document=="undefined"||!document.body||!document.documentElement)return;const t=document.body,e=document.documentElement,r=Math.max(0,Math.round(Ja.reservedLeftWidth)),n=Math.max(0,Math.round(Ja.reservedRightWidth)),a=Math.max(0,window.innerWidth||e.clientWidth||0),i=Math.max(t.scrollWidth||0,e.clientWidth||0,a),s=Math.max(0,a-r-n),o=i>0?Math.min(1,s/i):1,u=Number.isFinite(o)?Math.max(0,o):1,h=Vdt(a),d=r>0?r+16:16,f=h*u,p=r>0?`${Math.max(0,d-f)}px`:`-${Math.max(0,f-d)}px`;t.style.setProperty("transform-origin","top left","important"),t.style.setProperty("transform",`translateX(${p}) scale(${u})`,"important"),e.style.setProperty("overflow-x","hidden","important")}l($he,"applyPageZoom");function Gdt(){typeof window=="undefined"||Ja.resizeHandler||(Ja.resizeHandler=()=>{Ja.enabled&&$he()},window.addEventListener("resize",Ja.resizeHandler))}l(Gdt,"attachResizeHandler");function Mhe(){typeof window!="undefined"&&window.dispatchEvent(new CustomEvent(Ihe))}l(Mhe,"notifyPageZoomUpdated");function qdt(){typeof window=="undefined"||!Ja.resizeHandler||(window.removeEventListener("resize",Ja.resizeHandler),Ja.resizeHandler=null)}l(qdt,"detachResizeHandler");function Phe(t,e={}){var r,n;if(!(typeof document=="undefined"||typeof window=="undefined")&&!(!document.body||!document.documentElement)){if(!t){const a=document.body.style,i=document.documentElement.style;GF(a,"transform",Ja.bodySnapshots.get("transform")),GF(a,"transform-origin",Ja.bodySnapshots.get("transform-origin")),GF(i,"overflow-x",Ja.htmlSnapshots.get("overflow-x")),qdt(),Ja.enabled=!1,Ja.reservedLeftWidth=0,Ja.reservedRightWidth=0,Ja.bodySnapshots.clear(),Ja.htmlSnapshots.clear(),Mhe();return}Wdt(),Ja.enabled=!0,Ja.reservedLeftWidth=Math.max(0,(r=e.reservedLeftWidth)!=null?r:0),Ja.reservedRightWidth=Math.max(0,(n=e.reservedRightWidth)!=null?n:0),$he(),Gdt(),Mhe()}}l(Phe,"setPageZoomEnabled");var YS={passive:!0},Ydt=.5,Rhe={attributes:!0,attributeFilter:["class","style","hidden","open"],childList:!0,subtree:!0};function Udt(t){return t?t.parentNode?t.parentNode:t instanceof ShadowRoot?t.host:null:null}l(Udt,"getTraversalParent");function jdt(t){if(!t)return[window,document];const e=new Set;let r=t;for(;r;)(r instanceof Element||r instanceof ShadowRoot||r instanceof Document)&&e.add(r),r=Udt(r);return e.add(window),e.add(document),Array.from(e)}l(jdt,"collectScrollTargets");function Kdt(t){const{left:e,top:r,width:n,height:a}=t;return!Number.isFinite(e)||!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(a)?null:{left:e,top:r,width:Math.max(0,n),height:Math.max(0,a)}}l(Kdt,"toViewportRect");function vA(t,e){return Math.abs(t-e)<Ydt}l(vA,"approximatelyEqual");function Ohe(t,e){return t===e?!0:!t||!e?!1:vA(t.left,e.left)&&vA(t.top,e.top)&&vA(t.width,e.width)&&vA(t.height,e.height)}l(Ohe,"rectApproximatelyEqual");function Xdt(t,e){return Ohe(t.hover,e.hover)&&Ohe(t.selection,e.selection)}l(Xdt,"trackedRectsEqual");function Dhe(t){const{onPositionUpdate:e}=t,r=new GS;let n=null,a=null,i={hover:null,selection:null},s=null;function o(){s!==null&&(cancelAnimationFrame(s),s=null)}l(o,"cancelRaf"),r.add(o);function u(){r.isDisposed||s===null&&(s=requestAnimationFrame(()=>{s=null,m()}))}l(u,"scheduleUpdate");let h=new GS;r.add(()=>h.dispose());function d(){var E,k;h.dispose(),h=new GS;const x=a;if(!x)return;h.observeResize(x,()=>{r.isDisposed||a===x&&u()});const T=l(()=>{r.isDisposed||a===x&&u()},"mutationCallback"),C=(E=x.getRootNode)==null?void 0:E.call(x);C instanceof ShadowRoot&&h.observeMutation(C,T,Rhe);const S=(k=document.body)!=null?k:document.documentElement;S&&h.observeMutation(S,T,Rhe);for(const A of jdt(x))h.listen(A,"scroll",T,YS)}l(d,"resetSelectionObservers");function f(x){return x&&x.isConnected?x:null}l(f,"resolveConnected");function p(x){if(!x)return null;try{return Kdt(x.getBoundingClientRect())}catch(T){return null}}l(p,"readElementRect");function g(){const x=f(n),T=f(a);if(n&&!x&&(n=null),a&&!T&&(a=null,d()),x&&T&&x===T){const C=p(x);return{hover:C,selection:C}}return{hover:p(x),selection:p(T)}}l(g,"computeRects");function m(){if(r.isDisposed)return;const x=g();Xdt(x,i)||(i=x,e(x))}l(m,"updateIfChanged");function y(){!n&&!a&&!i.hover&&!i.selection||u()}l(y,"handleViewportChange"),r.listen(window,"scroll",y,YS),r.listen(document,"scroll",y,Ne(X({},YS),{capture:!0})),r.listen(window,"resize",y,YS),r.listen(window,Ihe,y,YS);function v(x){r.isDisposed||n!==x&&(n=x,u())}l(v,"setHoverElement");function b(x){r.isDisposed||a!==x&&(a=x,d(),u())}l(b,"setSelectionElement");function w(x){if(!r.isDisposed){if(o(),x){const T=g();i=T,e(T);return}m()}}return l(w,"forceUpdate"),{setHoverElement:v,setSelectionElement:b,forceUpdate:w,dispose:l(()=>r.dispose(),"dispose")}}l(Dhe,"createPositionTracker");var Fhe="__AXHUB_ANNOTATION_COMMENT_BRIDGE__",Bhe="data-axhub-annotation-marker",qF="data-axhub-annotation-node-id",zhe="data-axhub-annotation-panel-target",Hhe="data-axhub-annotation-panel-node-id",US="data-axhub-annotation-direct-action";function bA(t,e){var r;try{return(r=t.getAttribute(e))!=null?r:""}catch(n){return""}}l(bA,"readAttr");function Zdt(t){return bA(t,Bhe)==="true"}l(Zdt,"isAnnotationMarkerElement");function Whe(t){return bA(t,zhe)==="true"}l(Whe,"isAnnotationPanelTargetElement");function Qdt(t){const e=l(n=>nt(this,null,function*(){for(let a=0;a<8;a+=1){const i=t.getPanelTarget(n);if(i&&Whe(i)&&bA(i,Hhe)===n)return i;yield Promise.resolve()}return null}),"waitForPanelTarget");return{openMarkerTarget(n){return nt(this,null,function*(){if(!Zdt(n))return null;const a=bA(n,qF).trim();return a?(t.selectAnnotation(a,{source:"comment-bridge"}),e(a)):null})},closeTarget(n){Whe(n)&&t.selectAnnotation(null)}}}l(Qdt,"createAnnotationCommentBridge");function Jdt(t,e=typeof window=="undefined"?void 0:window){e&&(e[Fhe]=t)}l(Jdt,"installAnnotationCommentBridge");function eft(t,e=typeof window=="undefined"?void 0:window){if(!e)return;const r=Fhe,n=e;n[r]===t&&delete n[r]}l(eft,"uninstallAnnotationCommentBridge");var Vhe=[50,150,350,700],tft=120,rft=["aria-label","title","role","data-testid","data-test-id","data-test","data-qa","data-cy","name","alt"];function nft(t){return String(t||"").replace(/\s+/g," ").trim().slice(0,tft)}l(nft,"normalizeTargetText");function Ghe(t){const e={};for(const r of rft){const n=t.getAttribute(r);n&&n.trim()&&(e[r]=n.trim())}return{tagName:t.tagName.toLowerCase(),id:t.id.trim(),text:nft(t.textContent),attrs:e}}l(Ghe,"readTargetSignature");function aft(t,e){const r=Ghe(t);if(r.tagName!==e.tagName||e.id&&r.id!==e.id||e.text&&r.text!==e.text)return!1;for(const[n,a]of Object.entries(e.attrs))if(r.attrs[n]!==a)return!1;return!0}l(aft,"markerTargetMatchesSignature");function qhe(t,e=!1){var n;if(!e||t.nodes.length!==1)return"";const r=(n=t.nodes[0])==null?void 0:n.index;return typeof r=="number"&&Number.isFinite(r)?String(r):""}l(qhe,"resolveMarkerIndexLabel");function ift(t,e=!1){const r=t.nodes[0],n=String((r==null?void 0:r.title)||"").trim(),a=qhe(t,e),i=a?`,序号 ${a}`:"";return n?t.nodes.length>1?`标注 ${n},共 ${t.nodes.length} 个节点`:`标注 ${n}${i}`:t.nodes.length>1?`标注,共 ${t.nodes.length} 个节点`:`标注${i}`}l(ift,"resolveMarkerAriaLabel");function sft(t){const e=t.nodes.map(a=>String(a.color||"").trim()).filter(Boolean);if(e.length<=1)return e[0]||"#1890FF";const r=360/e.length;return`conic-gradient(${e.map((a,i)=>{const s=Math.round(i*r),o=Math.round((i+1)*r);return`${a} ${s}deg ${o}deg`}).join(", ")})`}l(sft,"resolveMarkerBackground");function Yhe(t,e){Object.assign(t.style,{position:"fixed",left:"0",top:"0",width:"20px",height:"20px",borderRadius:"999px",border:"1.5px solid rgba(255, 255, 255, 0.92)",background:sft(e),display:"none",alignItems:"center",justifyContent:"center",boxShadow:"0 10px 24px rgba(0, 0, 0, 0.22)",transform:"translate(-5px, -9px)",cursor:"pointer",pointerEvents:"auto",zIndex:"3",userSelect:"none",color:"#fff",fontSize:"11px",fontWeight:"700",lineHeight:"1",fontVariantNumeric:"tabular-nums",textShadow:"0 1px 2px rgba(0, 0, 0, 0.32)"})}l(Yhe,"applyMarkerStyle");function oft(t){const e=new Map;let r=null,n=null,a=0,i=!1;const s=l(()=>{n!==null&&(clearTimeout(n),n=null)},"clearRetry"),o=l(()=>(r==null?void 0:r.markersVisible)===!0&&r.groups.some(f=>!!f.nodes[0]),"hasRetryableVisibleTargets"),u=l(f=>{const p=e.get(f.id);if(p)return Yhe(p.button,f),p;const g=document.createElement("button");g.type="button",g.dataset.annotationMarker=f.id,Yhe(g,f),g.addEventListener("click",v=>{var b;v.preventDefault(),v.stopPropagation(),t.onSelect(((b=f.nodes[0])==null?void 0:b.id)||"")}),t.container.append(g);const m=Dhe({onPositionUpdate:l(v=>{const b=v.selection;if(!b){g.style.display="none",o()&&h();return}if(b.width<=0||b.height<=0){g.style.display="none";return}g.style.display="inline-flex",g.style.left=`${Math.round(b.left)}px`,g.style.top=`${Math.round(b.top)}px`},"onPositionUpdate")}),y={button:g,tracker:m,targetElement:null,targetSignature:null};return e.set(f.id,y),y},"ensureRecord"),h=l(()=>{if(i||n!==null)return;const f=Vhe[Math.min(a,Vhe.length-1)];typeof f=="number"&&(a+=1,n=setTimeout(()=>{n=null,!(i||!r)&&d(r.groups,r.markersVisible,r.markerIndexVisible,{preserveRetry:!0})},f))},"scheduleRetry"),d=l((f,p=!0,g=!1,m)=>{var w;if(i)return;const y=(m==null?void 0:m.preserveRetry)===!0;r={groups:f,markersVisible:p,markerIndexVisible:g},y||(a=0),s();const v=new Set(f.map(x=>x.id));let b=!1;for(const x of f){const T=u(x),C=(w=x.nodes[0])!=null?w:null,S=p&&!!C;T.button.textContent=qhe(x,g),T.button.setAttribute("aria-label",ift(x,g)),T.button.setAttribute(Bhe,"true"),C!=null&&C.id?T.button.setAttribute(qF,C.id):T.button.removeAttribute(qF),T.button.style.display=S?"inline-flex":"none",T.button.style.pointerEvents=S?"auto":"none";const E=C?t.resolveNodeElement(C):null,k=E&&(T.targetElement===E||!T.targetSignature||aft(E,T.targetSignature))?E:null;S&&!k&&(b=!0),S&&k?(T.targetElement=k,T.targetSignature=Ghe(k)):S||(T.targetElement=null),T.tracker.setSelectionElement(S?k:null),S&&T.tracker.forceUpdate(!0)}for(const[x,T]of e.entries())v.has(x)||(T.tracker.dispose(),T.button.remove(),e.delete(x));b?h():a=0},"applyUpdate");return{update(f,p=!0,g=!1){d(f,p,g)},dispose(){i=!0,r=null,s();for(const f of e.values())f.tracker.dispose(),f.button.remove();e.clear()}}}l(oft,"createAnnotationMarkers");var lft={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"}}]},name:"caret-right",theme:"outlined"},cft=lft;function YF(){return YF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},YF.apply(this,arguments)}l(YF,"_extends67");var uft=l((t,e)=>G.createElement(Vn,YF({},t,{ref:e,icon:cft})),"CaretRightOutlined2"),Uhe=G.forwardRef(uft);Uhe.displayName="CaretRightOutlined";var hft=Uhe,dft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M516 673c0 4.4 3.4 8 7.5 8h185c4.1 0 7.5-3.6 7.5-8v-48c0-4.4-3.4-8-7.5-8h-185c-4.1 0-7.5 3.6-7.5 8v48zm-194.9 6.1l192-161c3.8-3.2 3.8-9.1 0-12.3l-192-160.9A7.95 7.95 0 00308 351v62.7c0 2.4 1 4.6 2.9 6.1L420.7 512l-109.8 92.2a8.1 8.1 0 00-2.9 6.1V673c0 6.8 7.9 10.5 13.1 6.1zM880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"code",theme:"outlined"},fft=dft;function UF(){return UF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},UF.apply(this,arguments)}l(UF,"_extends68");var pft=l((t,e)=>G.createElement(Vn,UF({},t,{ref:e,icon:fft})),"CodeOutlined2"),jhe=G.forwardRef(pft);jhe.displayName="CodeOutlined";var gft=jhe,mft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"}}]},name:"column-width",theme:"outlined"},yft=mft;function jF(){return jF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jF.apply(this,arguments)}l(jF,"_extends69");var vft=l((t,e)=>G.createElement(Vn,jF({},t,{ref:e,icon:yft})),"ColumnWidthOutlined2"),Khe=G.forwardRef(vft);Khe.displayName="ColumnWidthOutlined";var Xhe=Khe,bft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M573 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40zm-280 0c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}},{tag:"path",attrs:{d:"M894 345a343.92 343.92 0 00-189-130v.1c-17.1-19-36.4-36.5-58-52.1-163.7-119-393.5-82.7-513 81-96.3 133-92.2 311.9 6 439l.8 132.6c0 3.2.5 6.4 1.5 9.4a31.95 31.95 0 0040.1 20.9L309 806c33.5 11.9 68.1 18.7 102.5 20.6l-.5.4c89.1 64.9 205.9 84.4 313 49l127.1 41.4c3.2 1 6.5 1.6 9.9 1.6 17.7 0 32-14.3 32-32V753c88.1-119.6 90.4-284.9 1-408zM323 735l-12-5-99 31-1-104-8-9c-84.6-103.2-90.2-251.9-11-361 96.4-132.2 281.2-161.4 413-66 132.2 96.1 161.5 280.6 66 412-80.1 109.9-223.5 150.5-348 102zm505-17l-8 10 1 104-98-33-12 5c-56 20.8-115.7 22.5-171 7l-.2-.1A367.31 367.31 0 00729 676c76.4-105.3 88.8-237.6 44.4-350.4l.6.4c23 16.5 44.1 37.1 62 62 72.6 99.6 68.5 235.2-8 330z"}},{tag:"path",attrs:{d:"M433 421c-23.1 0-41 17.9-41 40s17.9 40 41 40c21.1 0 39-17.9 39-40s-17.9-40-39-40z"}}]},name:"comment",theme:"outlined"},xft=bft;function KF(){return KF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},KF.apply(this,arguments)}l(KF,"_extends70");var wft=l((t,e)=>G.createElement(Vn,KF({},t,{ref:e,icon:xft})),"CommentOutlined2"),Zhe=G.forwardRef(wft);Zhe.displayName="CommentOutlined";var Tft=Zhe,Eft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832.6 191.4c-84.6-84.6-221.5-84.6-306 0l-96.9 96.9 51 51 96.9-96.9c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204l-96.9 96.9 51.1 51.1 96.9-96.9c84.4-84.6 84.4-221.5-.1-306.1zM446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l96.9-96.9-51.1-51.1-96.9 96.9c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l96.9-96.9-51-51-96.8 97zM260.3 209.4a8.03 8.03 0 00-11.3 0L209.4 249a8.03 8.03 0 000 11.3l554.4 554.4c3.1 3.1 8.2 3.1 11.3 0l39.6-39.6c3.1-3.1 3.1-8.2 0-11.3L260.3 209.4z"}}]},name:"disconnect",theme:"outlined"},Cft=Eft;function XF(){return XF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},XF.apply(this,arguments)}l(XF,"_extends71");var Sft=l((t,e)=>G.createElement(Vn,XF({},t,{ref:e,icon:Cft})),"DisconnectOutlined2"),Qhe=G.forwardRef(Sft);Qhe.displayName="DisconnectOutlined";var _ft=Qhe,kft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Aft=kft;function ZF(){return ZF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ZF.apply(this,arguments)}l(ZF,"_extends72");var Nft=l((t,e)=>G.createElement(Vn,ZF({},t,{ref:e,icon:Aft})),"InfoCircleOutlined2"),Jhe=G.forwardRef(Nft);Jhe.displayName="InfoCircleOutlined";var ede=Jhe,Ift={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"},Lft=Ift;function QF(){return QF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},QF.apply(this,arguments)}l(QF,"_extends73");var $ft=l((t,e)=>G.createElement(Vn,QF({},t,{ref:e,icon:Lft})),"LinkOutlined2"),tde=G.forwardRef($ft);tde.displayName="LinkOutlined";var Mft=tde,Pft={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01z"}}]},name:"moon",theme:"filled"},Rft=Pft;function JF(){return JF=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},JF.apply(this,arguments)}l(JF,"_extends74");var Oft=l((t,e)=>G.createElement(Vn,JF({},t,{ref:e,icon:Rft})),"MoonFilled2"),rde=G.forwardRef(Oft);rde.displayName="MoonFilled";var Dft=rde,Fft={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M489.5 111.66c30.65-1.8 45.98 36.44 22.58 56.33A243.35 243.35 0 00426 354c0 134.76 109.24 244 244 244 72.58 0 139.9-31.83 186.01-86.08 19.87-23.38 58.07-8.1 56.34 22.53C900.4 745.82 725.15 912 512.5 912 291.31 912 112 732.69 112 511.5c0-211.39 164.29-386.02 374.2-399.65l.2-.01zm-81.15 79.75l-4.11 1.36C271.1 237.94 176 364.09 176 511.5 176 697.34 326.66 848 512.5 848c148.28 0 274.94-96.2 319.45-230.41l.63-1.93-.11.07a307.06 307.06 0 01-159.73 46.26L670 662c-170.1 0-308-137.9-308-308 0-58.6 16.48-114.54 46.27-162.47z"}}]},name:"moon",theme:"outlined"},Bft=Fft;function eB(){return eB=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},eB.apply(this,arguments)}l(eB,"_extends75");var zft=l((t,e)=>G.createElement(Vn,eB({},t,{ref:e,icon:Bft})),"MoonOutlined2"),nde=G.forwardRef(zft);nde.displayName="MoonOutlined";var Hft=nde,Wft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656zM492 400h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zm0 144h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H492c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8zM340 368a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0zm0 144a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"profile",theme:"outlined"},Vft=Wft;function tB(){return tB=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},tB.apply(this,arguments)}l(tB,"_extends76");var Gft=l((t,e)=>G.createElement(Vn,tB({},t,{ref:e,icon:Vft})),"ProfileOutlined2"),ade=G.forwardRef(Gft);ade.displayName="ProfileOutlined";var qft=ade,Yft={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},Uft=Yft;function rB(){return rB=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rB.apply(this,arguments)}l(rB,"_extends77");var jft=l((t,e)=>G.createElement(Vn,rB({},t,{ref:e,icon:Uft})),"SettingOutlined2"),ide=G.forwardRef(jft);ide.displayName="SettingOutlined";var sde=ide,ode=[{label:"紫色",value:"#6252F3"},{label:"蓝色",value:"#1677FF"},{label:"青色",value:"#13B8C4"},{label:"绿色",value:"#34C759"},{label:"黄色",value:"#FFC400"},{label:"橙色",value:"#FF8A1F"},{label:"红色",value:"#FF3B3F"}],Kft="#1677FF",Xft=380,Zft=16,nB=10040,lde="data-we-popup-root",cde=15,Qft=1.8,ude=28,hde="#008F5D",dde="#00A36A",fde="#007A4F",pde="rgba(0, 143, 93, 0.16)",gde="rgba(0, 143, 93, 0.28)",mde="#00D68F",Jft="#A1A1AA",e0t="#71717A",t0t={accent:hde,accentBright:mde,accentHover:dde,accentActive:fde,accentSoft:pde,accentRing:gde,surface:"#FFFFFF",surfaceElevated:"#FFFFFF",surfaceMuted:"#FAFAFA",surfaceInteractive:"#F4F4F5",surfaceOverlay:"rgba(255, 255, 255, 0.96)",border:"rgba(39, 39, 42, 0.10)",borderStrong:"rgba(39, 39, 42, 0.16)",divider:"rgba(228, 228, 231, 0.95)",textPrimary:"#18181B",textSecondary:"#3F3F46",textMuted:"#A1A1AA",textSleeping:"#A1A1AA",textSleepingStrong:"#71717A",textDanger:"#DC2626",hoverSubtle:"rgba(244, 244, 245, 1)",hoverGhost:"rgba(15, 23, 42, 0.035)",toolbarShellBorder:"rgba(228, 228, 231, 0.80)",toolbarShellInset:"inset 0 1px 0 rgba(255, 255, 255, 0.88)",toolbarGlow:"0 0 20px -5px rgba(0, 143, 93, 0.20)",shadow:"0 24px 60px rgba(15, 23, 42, 0.14), 0 8px 24px rgba(15, 23, 42, 0.08)",shadowCompact:"0 18px 38px rgba(15, 23, 42, 0.14), 0 6px 16px rgba(15, 23, 42, 0.08)",overlayCloseBackground:"rgba(255, 255, 255, 0.94)"},r0t={accent:hde,accentBright:mde,accentHover:dde,accentActive:fde,accentSoft:pde,accentRing:gde,surface:"#121212",surfaceElevated:"#161616",surfaceMuted:"#18181B",surfaceInteractive:"#27272A",surfaceOverlay:"rgba(18, 18, 18, 0.96)",border:"rgba(255, 255, 255, 0.08)",borderStrong:"rgba(255, 255, 255, 0.12)",divider:"rgba(39, 39, 42, 0.95)",textPrimary:"rgba(255, 255, 255, 0.94)",textSecondary:"#D4D4D8",textMuted:"#A1A1AA",textSleeping:Jft,textSleepingStrong:e0t,textDanger:"#ff7875",hoverSubtle:"rgba(39, 39, 42, 0.80)",hoverGhost:"rgba(255, 255, 255, 0.04)",toolbarShellBorder:"rgba(39, 39, 42, 0.82)",toolbarShellInset:"inset 0 1px 0 rgba(255, 255, 255, 0.02)",toolbarGlow:"0 0 20px -5px rgba(0, 143, 93, 0.15)",shadow:"0 18px 48px rgba(0, 0, 0, 0.42), 0 4px 18px rgba(0, 0, 0, 0.28)",shadowCompact:"0 16px 32px rgba(0, 0, 0, 0.36), 0 4px 14px rgba(0, 0, 0, 0.22)",overlayCloseBackground:"rgba(18, 18, 18, 0.92)"};function Es(t){return`var(${t})`}l(Es,"cssVar");var Kt={accent:Es("--we-editor-accent"),accentHover:Es("--we-editor-accent-hover"),accentSoft:Es("--we-editor-accent-soft"),accentRing:Es("--we-editor-accent-ring"),surface:Es("--we-editor-surface"),surfaceMuted:Es("--we-editor-surface-muted"),surfaceInteractive:Es("--we-editor-surface-interactive"),surfaceOverlay:Es("--we-editor-surface-overlay"),border:Es("--we-editor-border"),borderStrong:Es("--we-editor-border-strong"),divider:Es("--we-editor-divider"),textPrimary:Es("--we-editor-text-primary"),textSecondary:Es("--we-editor-text-secondary"),textMuted:Es("--we-editor-text-muted"),textDanger:Es("--we-editor-text-danger"),hoverSubtle:Es("--we-editor-hover-subtle"),hoverGhost:Es("--we-editor-hover-ghost"),shadow:Es("--we-editor-shadow")};function yde(t){return t==="dark"?r0t:t0t}l(yde,"getEditorChromeValues");function n0t(t){const e=yde(t);return{"--we-editor-accent":e.accent,"--we-editor-accent-bright":e.accentBright,"--we-editor-accent-hover":e.accentHover,"--we-editor-accent-active":e.accentActive,"--we-editor-accent-soft":e.accentSoft,"--we-editor-accent-ring":e.accentRing,"--we-editor-surface":e.surface,"--we-editor-surface-elevated":e.surfaceElevated,"--we-editor-surface-muted":e.surfaceMuted,"--we-editor-surface-interactive":e.surfaceInteractive,"--we-editor-surface-overlay":e.surfaceOverlay,"--we-editor-border":e.border,"--we-editor-border-strong":e.borderStrong,"--we-editor-divider":e.divider,"--we-editor-text-primary":e.textPrimary,"--we-editor-text-secondary":e.textSecondary,"--we-editor-text-muted":e.textMuted,"--we-editor-text-sleeping":e.textSleeping,"--we-editor-text-sleeping-strong":e.textSleepingStrong,"--we-editor-text-danger":e.textDanger,"--we-editor-hover-subtle":e.hoverSubtle,"--we-editor-hover-ghost":e.hoverGhost,"--we-editor-toolbar-shell-border":e.toolbarShellBorder,"--we-editor-toolbar-shell-inset":e.toolbarShellInset,"--we-editor-toolbar-glow":e.toolbarGlow,"--we-editor-shadow":e.shadow,"--we-editor-shadow-compact":e.shadowCompact,"--we-editor-overlay-close-background":e.overlayCloseBackground}}l(n0t,"createEditorChromeCssVars");function a0t(t){const e=yde(t);return{token:{colorPrimary:e.accent,colorInfo:e.accent,colorSuccess:e.accent,colorLink:e.accent,colorPrimaryHover:e.accentHover,colorPrimaryActive:e.accentActive,colorPrimaryBorder:e.accent,colorPrimaryBorderHover:e.accentHover,colorPrimaryBg:e.accentSoft,colorPrimaryBgHover:"rgba(0, 143, 93, 0.22)",borderRadius:8,fontSize:11,fontSizeSM:11,colorBgBase:e.surface,colorBgContainer:e.surfaceElevated,colorBgElevated:e.surfaceElevated,colorFill:t==="dark"?"rgba(255, 255, 255, 0.08)":"rgba(15, 23, 42, 0.06)",colorFillSecondary:e.surfaceMuted,colorFillTertiary:e.surfaceInteractive,colorText:e.textPrimary,colorTextSecondary:e.textSecondary,colorTextTertiary:e.textMuted,colorBorder:e.border,colorBorderSecondary:e.borderStrong,colorTextPlaceholder:e.textMuted,colorSplit:e.border,boxShadowSecondary:e.shadow,colorIcon:e.textSecondary,colorIconHover:e.textPrimary,controlOutline:e.accentSoft,controlOutlineWidth:2,controlHeight:32,controlHeightSM:28},components:{Button:{borderRadius:12,paddingInlineSM:8,controlHeightSM:28,defaultShadow:"none",primaryShadow:"none",dangerShadow:"none",textTextColor:e.textPrimary,textHoverBg:e.hoverSubtle,defaultBg:e.surfaceMuted,defaultColor:e.textPrimary,defaultBorderColor:e.border,defaultHoverBg:e.surfaceInteractive,defaultHoverColor:e.textPrimary,defaultHoverBorderColor:e.borderStrong},Collapse:{contentBg:"transparent",headerBg:"transparent",borderlessContentBg:"transparent",contentPadding:"0 0 8px",borderlessContentPadding:"0 0 8px"},Input:{colorBgContainer:e.surfaceMuted,activeBg:e.surfaceInteractive,hoverBg:e.surfaceInteractive,activeBorderColor:e.accent,hoverBorderColor:e.borderStrong,activeShadow:`0 0 0 2px ${e.accentSoft}`},InputNumber:{colorBgContainer:e.surfaceMuted,activeBg:e.surfaceInteractive,hoverBg:e.surfaceInteractive,activeBorderColor:e.accent,hoverBorderColor:e.borderStrong,activeShadow:`0 0 0 2px ${e.accentSoft}`},Select:{optionSelectedBg:e.accentSoft,optionActiveBg:e.hoverSubtle,selectorBg:e.surfaceMuted,activeBorderColor:e.accent,hoverBorderColor:e.borderStrong},Segmented:{trackBg:e.surfaceMuted,itemSelectedBg:e.surfaceInteractive,itemSelectedColor:e.textPrimary},Slider:{colorPrimary:e.accent,handleSize:8,railBg:t==="dark"?"rgba(255, 255, 255, 0.12)":"rgba(15, 23, 42, 0.12)",railHoverBg:t==="dark"?"rgba(255, 255, 255, 0.18)":"rgba(15, 23, 42, 0.18)",trackBg:e.accent,trackHoverBg:e.accentHover},ColorPicker:{colorPrimary:e.accent},Dropdown:{colorBgElevated:e.surfaceElevated,colorText:e.textPrimary,colorTextDescription:e.textSecondary,controlItemBgHover:e.hoverSubtle,controlItemBgActive:e.accentSoft,borderRadiusLG:16},Modal:{contentBg:e.surfaceElevated,headerBg:e.surfaceElevated,titleColor:e.textPrimary,titleFontSize:14,borderRadiusLG:18},Tooltip:{colorBgSpotlight:t==="dark"?"#050608":"#0F172A",colorTextLightSolid:"#FFFFFF"},Popover:{colorBgElevated:e.surfaceElevated,colorText:e.textPrimary}}}}l(a0t,"createRuntimeAntdTheme");function i0t(t){return{position:"fixed",left:0,top:0,width:0,height:0,overflow:"visible",pointerEvents:"auto",zIndex:t}}l(i0t,"createPopupRootStyle");var s0t=`
|
||
@keyframes we-runtime-genie-spin {
|
||
from { transform: rotate(0deg); }
|
||
to { transform: rotate(360deg); }
|
||
}
|
||
|
||
@keyframes we-runtime-genie-task-scan {
|
||
0% {
|
||
top: calc(-1 * var(--we-runtime-genie-task-scan-size, 88px));
|
||
opacity: 0;
|
||
}
|
||
12% {
|
||
opacity: 1;
|
||
}
|
||
100% {
|
||
top: 100%;
|
||
opacity: 0;
|
||
}
|
||
}
|
||
|
||
.we-runtime-prop-panel__body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
color: ${Kt.textPrimary};
|
||
}
|
||
|
||
.we-runtime-config-panel {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0;
|
||
width: 100%;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.we-runtime-config-panel__attr-component {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 6px;
|
||
margin: 3px 0;
|
||
}
|
||
|
||
.we-runtime-config-panel__attr-component[data-multiline="true"] {
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
gap: 4px;
|
||
}
|
||
|
||
.we-runtime-config-panel__attr-component[data-multiline="true"] .we-runtime-config-panel__attr-label {
|
||
flex: 0 0 auto;
|
||
width: 100%;
|
||
}
|
||
|
||
.we-runtime-config-panel__attr-label {
|
||
display: flex;
|
||
align-items: center;
|
||
flex: 1 1 88px;
|
||
min-width: 88px;
|
||
color: ${Kt.textSecondary};
|
||
font-size: 12px;
|
||
}
|
||
|
||
.we-runtime-config-panel__label-main {
|
||
display: flex;
|
||
align-items: center;
|
||
flex: 1 1 auto;
|
||
min-width: 0;
|
||
}
|
||
|
||
.we-runtime-config-panel__label-inline {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
max-width: 100%;
|
||
min-width: 0;
|
||
}
|
||
|
||
.we-runtime-config-panel__label-text {
|
||
flex: 0 1 auto;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: normal;
|
||
}
|
||
|
||
.we-runtime-config-panel__collapse-icon {
|
||
margin-right: 5px;
|
||
}
|
||
|
||
.we-runtime-config-panel__collapse-icon svg {
|
||
transition: all 0.3s ease;
|
||
}
|
||
|
||
.we-runtime-config-panel__info-icon {
|
||
margin-left: 2px;
|
||
color: rgba(0, 0, 0, 0.45);
|
||
}
|
||
|
||
.we-runtime-config-panel__control {
|
||
width: 44%;
|
||
min-width: 96px;
|
||
flex: 0 0 44%;
|
||
}
|
||
|
||
.we-runtime-config-panel__control--auto {
|
||
width: auto;
|
||
min-width: auto;
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.we-runtime-config-panel__control--full {
|
||
width: 100%;
|
||
min-width: 0;
|
||
flex: 1 1 100%;
|
||
}
|
||
|
||
.we-runtime-config-panel__attr-component[data-multiline="true"] .we-runtime-config-panel__control--full {
|
||
width: 100%;
|
||
flex: 1 1 auto;
|
||
}
|
||
|
||
.we-runtime-config-panel__group {
|
||
margin: 2px 0;
|
||
}
|
||
|
||
.we-runtime-config-panel__group-content {
|
||
border-radius: 2px;
|
||
padding: 2px 4px;
|
||
}
|
||
|
||
.we-runtime-config-panel__group-content--collapsed {
|
||
display: none;
|
||
}
|
||
|
||
.we-runtime-config-panel__group--inline .we-runtime-config-panel__group-content {
|
||
padding: 0;
|
||
background: transparent;
|
||
}
|
||
|
||
.we-runtime-config-panel__text-row {
|
||
display: flex;
|
||
align-items: flex-start;
|
||
gap: 8px;
|
||
margin: 4px 0;
|
||
}
|
||
|
||
.we-runtime-config-panel__text {
|
||
flex: 1 1 auto;
|
||
min-width: 0;
|
||
margin-bottom: 0;
|
||
font-size: 12px;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
.we-runtime-config-panel__hint {
|
||
margin: 4px 0 8px;
|
||
padding: 8px 10px;
|
||
border-radius: 10px;
|
||
background: ${Kt.surfaceMuted};
|
||
border: 1px solid ${Kt.border};
|
||
}
|
||
|
||
.we-runtime-config-panel__hint-text {
|
||
display: block;
|
||
margin-bottom: 0;
|
||
font-size: 12px;
|
||
line-height: 1.6;
|
||
color: ${Kt.textSecondary};
|
||
white-space: pre-wrap;
|
||
}
|
||
|
||
.we-runtime-config-panel__card-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
width: 100%;
|
||
}
|
||
|
||
.we-runtime-config-panel__card-option {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
gap: 3px;
|
||
width: 100%;
|
||
padding: 8px 10px;
|
||
border: 1px solid ${Kt.border};
|
||
border-radius: 10px;
|
||
background: ${Kt.surfaceMuted};
|
||
color: ${Kt.textPrimary};
|
||
text-align: left;
|
||
cursor: pointer;
|
||
transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
|
||
}
|
||
|
||
.we-runtime-config-panel__card-option:hover:not(:disabled) {
|
||
border-color: rgba(37, 99, 235, 0.34);
|
||
background: #fff;
|
||
}
|
||
|
||
.we-runtime-config-panel__card-option--selected {
|
||
border-color: ${Kt.accent};
|
||
background: rgba(37, 99, 235, 0.08);
|
||
box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
|
||
}
|
||
|
||
.we-runtime-config-panel__card-option:disabled {
|
||
cursor: not-allowed;
|
||
opacity: 0.62;
|
||
}
|
||
|
||
.we-runtime-config-panel__card-option-title {
|
||
font-size: 12px;
|
||
font-weight: 700;
|
||
line-height: 1.35;
|
||
}
|
||
|
||
.we-runtime-config-panel__card-option-description {
|
||
color: ${Kt.textSecondary};
|
||
font-size: 11px;
|
||
line-height: 1.45;
|
||
}
|
||
|
||
.we-runtime-prop-panel__collapse {
|
||
background: transparent;
|
||
}
|
||
|
||
.we-runtime-prop-panel__collapse > [class*="collapse-item"] {
|
||
border-bottom: 1px solid ${Kt.divider};
|
||
}
|
||
|
||
.we-runtime-page-tweak-panel__header-label {
|
||
max-width: 100%;
|
||
min-width: 0;
|
||
}
|
||
|
||
.we-runtime-page-tweak-panel__header-color {
|
||
display: inline-block;
|
||
width: 10px;
|
||
height: 10px;
|
||
border-radius: 999px;
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.we-runtime-page-tweak-panel__header-label-text {
|
||
min-width: 0;
|
||
white-space: normal;
|
||
overflow-wrap: anywhere;
|
||
line-height: 1.45;
|
||
}
|
||
|
||
.we-runtime-page-tweak-panel__header-label--active .we-runtime-page-tweak-panel__header-label-text {
|
||
color: ${Kt.accent};
|
||
}
|
||
|
||
.we-runtime-page-tweak-panel__header-actions {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 2px;
|
||
flex: 0 0 auto;
|
||
margin-left: auto;
|
||
}
|
||
|
||
.we-runtime-page-tweak-panel__header-action.ant-btn.ant-btn-text {
|
||
width: 22px;
|
||
min-width: 22px;
|
||
height: 22px;
|
||
padding: 0;
|
||
border-radius: 999px;
|
||
color: ${Kt.textMuted};
|
||
}
|
||
|
||
.we-runtime-page-tweak-panel__header-action.ant-btn.ant-btn-text:not(:disabled):hover {
|
||
color: ${Kt.textPrimary};
|
||
background: ${Kt.hoverSubtle};
|
||
}
|
||
|
||
.we-runtime-prop-panel__collapse > [class*="collapse-item"] > [class*="collapse-content"] {
|
||
background: transparent;
|
||
border-top: 0;
|
||
}
|
||
|
||
.we-runtime-prop-panel__collapse
|
||
> [class*="collapse-item"]
|
||
> [class*="collapse-content"]
|
||
> [class*="collapse-content-box"] {
|
||
padding: 0 0 4px;
|
||
}
|
||
|
||
.we-runtime-prop-panel__header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 8px;
|
||
padding: 10px 10px 8px;
|
||
border-bottom: 1px solid ${Kt.divider};
|
||
}
|
||
|
||
.we-runtime-prop-panel__header-title {
|
||
font-size: 13px;
|
||
line-height: 1.4;
|
||
font-weight: 700;
|
||
color: ${Kt.textPrimary};
|
||
min-width: 0;
|
||
}
|
||
|
||
.we-runtime-prop-panel__header-title-group {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.we-runtime-prop-panel__header-actions {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.we-runtime-prop-panel__header-action.ant-btn.ant-btn-text {
|
||
width: 28px;
|
||
min-width: 28px;
|
||
height: 28px;
|
||
padding: 0;
|
||
border-radius: 999px;
|
||
}
|
||
|
||
.we-runtime-prop-panel__header-help.ant-btn.ant-btn-text {
|
||
color: ${Kt.textMuted};
|
||
}
|
||
|
||
.we-runtime-prop-panel__header-help.ant-btn.ant-btn-text:hover,
|
||
.we-runtime-prop-panel__header-help.ant-btn.ant-btn-text:focus-visible {
|
||
color: ${Kt.textSecondary};
|
||
background: ${Kt.hoverSubtle};
|
||
}
|
||
|
||
.we-runtime-prop-panel__header-action.ant-btn.ant-btn-text.we-runtime-prop-panel__header-action--active {
|
||
color: ${Kt.accent};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-input-filled,
|
||
.we-runtime-prop-panel__body .ant-input-number-filled,
|
||
.we-runtime-prop-panel__body .ant-select-filled:not(.ant-select-customize-input) .ant-select-selector {
|
||
background: ${Kt.surfaceMuted};
|
||
border: none;
|
||
box-shadow: none;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-input-filled:hover,
|
||
.we-runtime-prop-panel__body .ant-input-number-filled:hover,
|
||
.we-runtime-prop-panel__body .ant-select-filled:not(.ant-select-customize-input):hover .ant-select-selector {
|
||
background: ${Kt.surfaceInteractive};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-input-filled:focus,
|
||
.we-runtime-prop-panel__body .ant-input-filled.ant-input-focused,
|
||
.we-runtime-prop-panel__body .ant-input-number-filled.ant-input-number-focused,
|
||
.we-runtime-prop-panel__body .ant-select-filled.ant-select-focused .ant-select-selector {
|
||
background: ${Kt.surfaceInteractive};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-segmented {
|
||
background: ${Kt.surfaceMuted};
|
||
padding: 2px;
|
||
border-radius: 10px;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-segmented-item {
|
||
min-height: 28px;
|
||
display: flex;
|
||
align-items: stretch;
|
||
justify-content: center;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-segmented-item-selected {
|
||
box-shadow: inset 0 0 0 1px ${Kt.borderStrong};
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-segmented-item-label {
|
||
width: 100%;
|
||
min-height: 28px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
line-height: 1.2;
|
||
text-align: center;
|
||
}
|
||
|
||
.we-runtime-config-panel__segmented-option {
|
||
display: inline-flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 1px;
|
||
min-width: 0;
|
||
width: 100%;
|
||
padding: 2px 4px;
|
||
}
|
||
|
||
.we-runtime-config-panel__segmented-option-label {
|
||
display: block;
|
||
max-width: 100%;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
color: ${Kt.textPrimary};
|
||
font-size: 12px;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.we-runtime-config-panel__segmented-option-description {
|
||
display: block;
|
||
max-width: 100%;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
color: ${Kt.textMuted};
|
||
font-size: 10px;
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-slider {
|
||
margin-block: 4px;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-btn.ant-btn-text {
|
||
padding-inline: 6px;
|
||
color: ${Kt.textSecondary};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-btn.ant-btn-text:hover {
|
||
color: ${Kt.textPrimary};
|
||
background: ${Kt.hoverGhost};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-empty-description {
|
||
color: ${Kt.textSecondary};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-color-picker-trigger {
|
||
align-items: center;
|
||
border: 1px solid ${Kt.borderStrong};
|
||
background: ${Kt.surfaceMuted};
|
||
box-shadow: none;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-color-picker-trigger:hover {
|
||
border-color: ${Kt.borderStrong};
|
||
background: ${Kt.surfaceInteractive};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .we-runtime-prop-panel__unit-input {
|
||
width: 100%;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .we-runtime-prop-panel__unit-input-amount {
|
||
text-align: left;
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .we-runtime-prop-panel__unit-input .ant-select.ant-select-sm,
|
||
.we-runtime-prop-panel__body .we-runtime-prop-panel__unit-input .ant-input.ant-input-sm {
|
||
min-width: 0;
|
||
}
|
||
|
||
.we-runtime-prop-panel__unit-select-popup {
|
||
min-width: 76px !important;
|
||
}
|
||
|
||
.we-runtime-prop-panel__unit-select-popup .ant-select-item-option-content,
|
||
.we-runtime-prop-panel__unit-select-popup .ant-select-item {
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-input-number-input,
|
||
.we-runtime-prop-panel__body .ant-select-selection-item,
|
||
.we-runtime-prop-panel__body .ant-select-selection-placeholder,
|
||
.we-runtime-prop-panel__body .ant-input,
|
||
.we-runtime-prop-panel__body textarea {
|
||
color: ${Kt.textPrimary};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-select,
|
||
.we-runtime-prop-panel__body .ant-input-number,
|
||
.we-runtime-prop-panel__body .ant-input,
|
||
.we-runtime-prop-panel__body .ant-input-affix-wrapper {
|
||
width: 100%;
|
||
min-width: 0;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-select .ant-select-arrow {
|
||
color: ${Kt.textMuted};
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-switch {
|
||
background: ${Kt.borderStrong};
|
||
flex: 0 0 auto;
|
||
}
|
||
|
||
.we-runtime-prop-panel__body .ant-switch.ant-switch-checked {
|
||
background: ${Kt.accent};
|
||
}
|
||
|
||
.we-runtime-prop-panel__drag-handle {
|
||
cursor: grab;
|
||
}
|
||
|
||
.we-runtime-prop-panel__drag-handle[data-dragging="true"] {
|
||
cursor: grabbing !important;
|
||
}
|
||
|
||
.we-runtime-prop-panel__resize-handle {
|
||
position: absolute;
|
||
top: 0;
|
||
bottom: 0;
|
||
left: 0;
|
||
width: 12px;
|
||
z-index: 2;
|
||
cursor: ew-resize;
|
||
touch-action: none;
|
||
pointer-events: auto;
|
||
}
|
||
|
||
.we-runtime-prop-panel__resize-handle[data-edge="left"] {
|
||
left: auto;
|
||
right: 0;
|
||
}
|
||
|
||
.we-runtime-prop-panel__resize-handle::after {
|
||
content: "";
|
||
position: absolute;
|
||
top: 18px;
|
||
bottom: 18px;
|
||
left: 4px;
|
||
width: 2px;
|
||
border-radius: 999px;
|
||
background: transparent;
|
||
transition: background-color 160ms ease, box-shadow 160ms ease;
|
||
}
|
||
|
||
.we-runtime-prop-panel__resize-handle[data-edge="left"]::after {
|
||
left: auto;
|
||
right: 4px;
|
||
}
|
||
|
||
.we-runtime-prop-panel__resize-handle:hover::after,
|
||
.we-runtime-prop-panel__resize-handle[data-resizing="true"]::after {
|
||
background: ${Kt.accentSoft};
|
||
box-shadow: 0 0 0 1px ${Kt.accentRing};
|
||
}
|
||
|
||
.we-runtime-toolbar__spinner {
|
||
position: absolute;
|
||
inset: -150%;
|
||
animation: we-runtime-genie-spin linear infinite;
|
||
}
|
||
|
||
.we-runtime-genie-task__scanner {
|
||
position: absolute;
|
||
left: 0;
|
||
right: 0;
|
||
height: var(--we-runtime-genie-task-scan-size, 88px);
|
||
top: calc(-1 * var(--we-runtime-genie-task-scan-size, 88px));
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: linear-gradient(
|
||
180deg,
|
||
transparent 0%,
|
||
color-mix(in srgb, var(--we-runtime-genie-task-accent) 14%, transparent) 38%,
|
||
color-mix(in srgb, var(--we-runtime-genie-task-accent) 20%, transparent) 50%,
|
||
color-mix(in srgb, var(--we-runtime-genie-task-accent) 14%, transparent) 62%,
|
||
transparent 100%
|
||
);
|
||
animation: we-runtime-genie-task-scan 2.8s linear infinite;
|
||
}
|
||
|
||
.we-runtime-genie-task__scanner::after {
|
||
content: "";
|
||
width: 100%;
|
||
height: 1px;
|
||
background: color-mix(in srgb, var(--we-runtime-genie-task-accent) 72%, white);
|
||
box-shadow: 0 0 14px color-mix(in srgb, var(--we-runtime-genie-task-accent) 64%, transparent);
|
||
}
|
||
|
||
.axhub-annotation-directory-tree {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 1px;
|
||
padding: 4px 0;
|
||
}
|
||
|
||
.axhub-annotation-directory-node-wrap {
|
||
min-width: 0;
|
||
}
|
||
|
||
.axhub-annotation-directory-node {
|
||
appearance: none;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 7px;
|
||
width: 100%;
|
||
min-height: 28px;
|
||
padding-top: 0;
|
||
padding-right: 8px;
|
||
padding-bottom: 0;
|
||
border: 0;
|
||
border-radius: 7px;
|
||
background: transparent;
|
||
color: ${Kt.textSecondary};
|
||
cursor: pointer;
|
||
font-family: inherit;
|
||
font-size: 12px;
|
||
line-height: 1.35;
|
||
text-align: left;
|
||
transition: background 140ms ease, color 140ms ease;
|
||
}
|
||
|
||
.axhub-annotation-directory-node:hover {
|
||
background: ${Kt.hoverSubtle};
|
||
color: ${Kt.textPrimary};
|
||
}
|
||
|
||
.axhub-annotation-directory-node--active {
|
||
background: ${Kt.accentSoft};
|
||
color: ${Kt.textPrimary};
|
||
font-weight: 600;
|
||
}
|
||
|
||
.axhub-annotation-directory-node__icon {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 14px;
|
||
height: 14px;
|
||
flex: 0 0 14px;
|
||
color: ${Kt.textMuted};
|
||
font-size: 11px;
|
||
}
|
||
|
||
.axhub-annotation-directory-node__title {
|
||
min-width: 0;
|
||
flex: 1 1 auto;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.axhub-annotation-directory-empty {
|
||
display: flex;
|
||
align-items: center;
|
||
min-height: 80px;
|
||
padding: 0 8px;
|
||
color: ${Kt.textMuted};
|
||
font-size: 12px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__body {
|
||
scrollbar-width: none;
|
||
-ms-overflow-style: none;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__body::-webkit-scrollbar {
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__layout {
|
||
width: 100%;
|
||
min-width: 0;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__layout--compact {
|
||
display: block;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__article {
|
||
min-width: 0;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__toc {
|
||
position: sticky;
|
||
top: 0;
|
||
align-self: flex-start;
|
||
min-width: 0;
|
||
padding: 2px 0 2px 30px;
|
||
border-left: 1px solid ${Kt.divider};
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__toc-list {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__toc-item {
|
||
display: block;
|
||
width: 100%;
|
||
padding: 6px 0;
|
||
border: 0;
|
||
background: transparent;
|
||
color: ${Kt.textSecondary};
|
||
font-size: 12px;
|
||
line-height: 1.5;
|
||
text-align: left;
|
||
border-radius: 8px;
|
||
cursor: pointer;
|
||
transition: color 140ms ease, background 140ms ease;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__toc-item:hover {
|
||
color: ${Kt.textPrimary};
|
||
background: ${Kt.hoverSubtle};
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__toc-item[data-active="true"] {
|
||
color: ${Kt.accent};
|
||
background: transparent;
|
||
font-weight: 700;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader__surface {
|
||
margin: 0 auto;
|
||
min-height: calc(100vh - 60px);
|
||
padding: clamp(26px, 4vw, 54px);
|
||
border: 1px solid ${Kt.border};
|
||
border-radius: 0;
|
||
background: ${Kt.surface};
|
||
box-shadow: none;
|
||
}
|
||
|
||
.axhub-annotation-edge-toolbar {
|
||
backdrop-filter: blur(14px);
|
||
}
|
||
|
||
.axhub-annotation-toolbar-action-slot,
|
||
.axhub-annotation-toolbar-action-tooltip,
|
||
.axhub-annotation-toolbar-action-element {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.axhub-annotation-edge-button.ant-btn.ant-btn-text {
|
||
width: 30px;
|
||
min-width: 30px;
|
||
height: 30px;
|
||
padding: 0;
|
||
border-radius: 8px;
|
||
color: ${Kt.textSecondary};
|
||
transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
|
||
}
|
||
|
||
.axhub-annotation-edge-button.ant-btn.ant-btn-text:not(:disabled):hover,
|
||
.axhub-annotation-edge-button.ant-btn.ant-btn-text:not(:disabled):focus-visible {
|
||
color: ${Kt.textPrimary};
|
||
background: ${Kt.hoverSubtle};
|
||
}
|
||
|
||
.axhub-annotation-edge-button.ant-btn.ant-btn-text .anticon {
|
||
font-size: 16px;
|
||
}
|
||
|
||
.axhub-annotation-edge-button.ant-btn.ant-btn-text .anticon svg {
|
||
width: 16px;
|
||
height: 16px;
|
||
}
|
||
|
||
.axhub-annotation-toolbar-surface {
|
||
padding: 8px;
|
||
border-radius: 6px;
|
||
background: ${Kt.surfaceOverlay};
|
||
border: 1px solid ${Kt.borderStrong};
|
||
box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
|
||
color: ${Kt.textPrimary};
|
||
pointer-events: none;
|
||
}
|
||
|
||
.axhub-annotation-toolbar-surface--annotation,
|
||
.axhub-annotation-toolbar-surface--settings {
|
||
opacity: 0;
|
||
visibility: hidden;
|
||
transform: translateY(-50%) translateX(4px);
|
||
transition: opacity 120ms ease, visibility 120ms ease, transform 120ms ease;
|
||
}
|
||
|
||
.axhub-annotation-toolbar-surface[data-edge="left"] {
|
||
transform: translateY(-50%) translateX(-4px);
|
||
}
|
||
|
||
.axhub-annotation-toolbar-surface--annotation[data-open="true"],
|
||
.axhub-annotation-toolbar-surface--settings[data-open="true"] {
|
||
opacity: 1;
|
||
visibility: visible;
|
||
pointer-events: auto;
|
||
transform: translateY(-50%) translateX(0);
|
||
}
|
||
|
||
.axhub-annotation-skill-install-link.ant-btn.ant-btn-link {
|
||
height: auto;
|
||
min-width: 0;
|
||
padding: 0;
|
||
color: ${Kt.accent};
|
||
font-size: 12px;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.axhub-annotation-skill-install-link.ant-btn.ant-btn-link:not(:disabled):hover,
|
||
.axhub-annotation-skill-install-link.ant-btn.ant-btn-link:not(:disabled):focus-visible {
|
||
color: ${Kt.accentHover};
|
||
}
|
||
|
||
.axhub-annotation-markdown {
|
||
color: ${Kt.textPrimary};
|
||
font-size: 12px;
|
||
line-height: 1.62;
|
||
}
|
||
|
||
.axhub-annotation-markdown h1,
|
||
.axhub-annotation-markdown h2,
|
||
.axhub-annotation-markdown h3,
|
||
.axhub-annotation-markdown h4,
|
||
.axhub-annotation-markdown h5,
|
||
.axhub-annotation-markdown h6 {
|
||
margin: 0 0 8px;
|
||
color: ${Kt.textPrimary};
|
||
font-weight: 700;
|
||
line-height: 1.35;
|
||
}
|
||
|
||
.axhub-annotation-markdown h1 {
|
||
font-size: 16px;
|
||
}
|
||
|
||
.axhub-annotation-markdown h2 {
|
||
font-size: 14px;
|
||
}
|
||
|
||
.axhub-annotation-markdown h3 {
|
||
font-size: 13px;
|
||
}
|
||
|
||
.axhub-annotation-markdown h4,
|
||
.axhub-annotation-markdown h5,
|
||
.axhub-annotation-markdown h6 {
|
||
font-size: 12.5px;
|
||
}
|
||
|
||
.axhub-annotation-markdown p {
|
||
margin: 0 0 8px;
|
||
}
|
||
|
||
.axhub-annotation-markdown p:last-child,
|
||
.axhub-annotation-markdown ul:last-child,
|
||
.axhub-annotation-markdown ol:last-child,
|
||
.axhub-annotation-markdown blockquote:last-child,
|
||
.axhub-annotation-markdown pre:last-child,
|
||
.axhub-annotation-markdown table:last-child {
|
||
margin-bottom: 0;
|
||
}
|
||
|
||
.axhub-annotation-markdown ul,
|
||
.axhub-annotation-markdown ol {
|
||
margin: 0 0 8px;
|
||
padding-left: 20px;
|
||
}
|
||
|
||
.axhub-annotation-markdown li {
|
||
margin: 0;
|
||
}
|
||
|
||
.axhub-annotation-markdown li + li {
|
||
margin-top: 2px;
|
||
}
|
||
|
||
.axhub-annotation-markdown table {
|
||
display: block;
|
||
width: 100%;
|
||
max-width: 100%;
|
||
margin: 0 0 8px;
|
||
border-collapse: collapse;
|
||
border-spacing: 0;
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.axhub-annotation-markdown th,
|
||
.axhub-annotation-markdown td {
|
||
padding: 6px 8px;
|
||
border: 1px solid ${Kt.divider};
|
||
text-align: left;
|
||
vertical-align: top;
|
||
}
|
||
|
||
.axhub-annotation-markdown th {
|
||
background: ${Kt.surfaceMuted};
|
||
font-weight: 700;
|
||
}
|
||
|
||
.axhub-annotation-markdown code {
|
||
padding: 1px 4px;
|
||
border-radius: 4px;
|
||
background: ${Kt.surfaceMuted};
|
||
font-size: 11px;
|
||
}
|
||
|
||
.axhub-annotation-markdown pre {
|
||
margin: 0 0 8px;
|
||
padding: 8px 10px;
|
||
border-radius: 8px;
|
||
background: ${Kt.surfaceMuted};
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.axhub-annotation-markdown pre code {
|
||
padding: 0;
|
||
background: transparent;
|
||
}
|
||
|
||
.axhub-annotation-markdown blockquote {
|
||
margin: 0 0 8px;
|
||
padding: 6px 8px;
|
||
border-left: 3px solid ${Kt.accentSoft};
|
||
color: ${Kt.textSecondary};
|
||
background: ${Kt.surfaceMuted};
|
||
border-radius: 0 8px 8px 0;
|
||
}
|
||
|
||
.axhub-annotation-markdown img {
|
||
display: block;
|
||
max-width: 100%;
|
||
height: auto;
|
||
margin: 8px 0;
|
||
border-radius: 8px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown {
|
||
font-size: 15px;
|
||
line-height: 1.8;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h1,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h2,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h3,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h4,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h5,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h6 {
|
||
scroll-margin-top: 18px;
|
||
margin-bottom: 12px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h1 {
|
||
font-size: 28px;
|
||
line-height: 1.22;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h2 {
|
||
font-size: 22px;
|
||
line-height: 1.28;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h3 {
|
||
font-size: 18px;
|
||
line-height: 1.34;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h4,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h5,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown h6 {
|
||
font-size: 16px;
|
||
line-height: 1.4;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown p,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown ul,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown ol,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown blockquote,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown pre,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown table {
|
||
margin-bottom: 14px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown ul,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown ol {
|
||
padding-left: 24px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown li + li {
|
||
margin-top: 6px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown th,
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown td {
|
||
padding: 8px 10px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown code {
|
||
font-size: 13px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown pre {
|
||
padding: 12px 14px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown blockquote {
|
||
padding: 10px 12px;
|
||
}
|
||
|
||
.axhub-annotation-directory-reader .axhub-annotation-markdown img {
|
||
margin: 14px 0;
|
||
}
|
||
`,o0t={position:"fixed",zIndex:nB+10,width:Xft,maxWidth:"calc(100vw - 24px)",padding:10,borderRadius:14,background:Kt.surfaceOverlay,border:`1px solid ${Kt.border}`,color:Kt.textPrimary,boxShadow:Kt.shadow,pointerEvents:"auto",isolation:"isolate",display:"flex",flexDirection:"column",gap:8},l0t='[data-we-selection-lock-root="true"]',vde=`[${lde}="true"]`;function qx(t){var r;if(!t||typeof t!="object"||!("querySelector"in t))return null;const e=(r=t.querySelector)==null?void 0:r.call(t,vde);return e instanceof HTMLElement?e:null}l(qx,"queryPopupRoot");function Gc(t){var n,a,i,s,o,u,h;const e=(n=t==null?void 0:t.ownerDocument)!=null?n:typeof document!="undefined"?document:null;if(!e)return t;if(!t)return(a=qx(e))!=null?a:e.body;const r=(s=(i=t.closest(vde))!=null?i:qx(typeof t.getRootNode=="function"?t.getRootNode():null))!=null?s:qx(e);return r instanceof HTMLElement?r:(h=(u=(o=t.closest(l0t))!=null?o:t.parentElement)!=null?u:e.body)!=null?h:t}l(Gc,"resolveRuntimePopupContainer");function c0t(t,e){var r,n,a;return t?Gc(t):(a=(n=(r=qx(e))!=null?r:qx(typeof e.getRootNode=="function"?e.getRootNode():null))!=null?n:qx(e.ownerDocument))!=null?a:e}l(c0t,"resolveRuntimePopupContainerFromTrigger");var u0t={neutral:{color:Kt.textPrimary},accent:{color:Kt.accent,background:"rgba(0, 143, 93, 0.14)"},danger:{color:Kt.textDanger,background:"rgba(255, 120, 117, 0.12)"},dark:{color:Kt.textPrimary}};function h0t(t){const{children:e,size:r=cde,strokeWidth:n=Qft}=t;return bt.jsx("svg",{width:r,height:r,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",style:{display:"block"},children:bt.jsx("g",{stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",children:e})})}l(h0t,"SvgIcon");function d0t(){return bt.jsxs(h0t,{children:[bt.jsx("path",{d:"M4.5 4.5l7 7"}),bt.jsx("path",{d:"M11.5 4.5l-7 7"})]})}l(d0t,"CloseToolIcon");function f0t(t){const{title:e,children:r,disabled:n}=t;return bt.jsx(Ml,{title:e,getPopupContainer:Gc,children:bt.jsx("span",{style:{display:"inline-flex"},children:N.cloneElement(r,{disabled:n})})})}l(f0t,"TooltipButton");function p0t(t){var m,y;const{title:e,icon:r,onClick:n,disabled:a,loading:i,tone:s="neutral",style:o,directAction:u}=t,[h,d]=N.useState(!1),f=u0t[s],g=Nhe()?Math.max(ude,36):ude;return bt.jsx(f0t,{title:e,disabled:a,children:bt.jsx(wh,Ne(X({size:"small",type:"text","aria-label":e},u?{[US]:"true"}:void 0),{icon:i?bt.jsx(Sx,{spin:!0}):r,disabled:a,onClick:n,onMouseEnter:l(()=>d(!0),"onMouseEnter"),onMouseLeave:l(()=>d(!1),"onMouseLeave"),danger:s==="danger",style:X({width:g,minWidth:g,height:g,padding:0,fontSize:cde,borderRadius:999,display:"inline-flex",alignItems:"center",justifyContent:"center",border:"none",boxShadow:"none",touchAction:"manipulation",color:a?Kt.textMuted:(m=f.color)!=null?m:Kt.textPrimary,background:a?"transparent":h?(y=f.background)!=null?y:Kt.hoverSubtle:"transparent",transition:"background-color 220ms ease, color 220ms ease, transform 220ms ease"},o)}))})}l(p0t,"IconActionButton");var aB=750,bde=220,iB=30,g0t=aB+bde+iB;function m0t(t){return String(t||"").trim().toLowerCase().replace(/[^\w\u4e00-\u9fa5]+/g,"-").replace(/^-+|-+$/g,"")||"section"}l(m0t,"normalizeHeadingSlug");function xde(t,e){const r=`heading-${m0t(t)}`,n=(e.get(r)||0)+1;return e.set(r,n),n>1?`${r}-${n}`:r}l(xde,"buildDirectoryArticleHeadingId");function y0t(t){const e=new Map,r=[];for(const n of String(t||"").split(`
|
||
`)){const a=n.match(/^(#{1,6})\s+(.+)$/);if(!a)continue;const i=a[2].trim();i&&r.push({id:xde(i,e),level:a[1].length,title:i})}return r}l(y0t,"extractDirectoryArticleHeadings");function wde(t,e){const r=String(e||"").trim();if(!t||!r||typeof t.querySelectorAll!="function")return null;const n=t.querySelectorAll("h1,h2,h3,h4,h5,h6");for(const a of Array.from(n))if(a.id===r)return a;return null}l(wde,"findDirectoryArticleHeadingElement");function v0t(t){const e=Math.max(0,Math.round(t)),r=e>=g0t;return{articleWidth:e,contentWidth:r?aB:Math.min(aB,e),showToc:r,tocWidth:r?bde:0}}l(v0t,"buildDirectoryArticleLayout");function b0t(t,e,r,n=24){var s,o;if(t.length===0)return null;const a=Math.max(0,r)+Math.max(0,n);let i=(o=(s=t[0])==null?void 0:s.id)!=null?o:null;for(const u of t){const h=e[u.id];if(typeof h=="number"){if(h<=a){i=u.id;continue}break}}return i}l(b0t,"resolveActiveDirectoryArticleHeadingId");function xA(t){return t.trim().length===0}l(xA,"isBlankLine");function sB(t){return/^```/.test(t.trim())}l(sB,"isCodeFence");function x0t(t){return/^#{1,6}\s+/.test(t.trim())}l(x0t,"isHeading");function Tde(t){return/^(?:-{3,}|\*{3,}|_{3,})\s*$/.test(t.trim())}l(Tde,"isHorizontalRule");function oB(t){return/^>\s?/.test(t.trim())}l(oB,"isBlockquote");function w0t(t){return t.split("").reduce((e,r)=>e+(r===" "?4:1),0)}l(w0t,"countMarkdownIndent");function wA(t){var a,i;const e=String(t||"").match(/^(\s*)(([-*+])|(\d+\.))\s+(.*)$/);if(!e)return null;const r=e[4],n=!!r;return{indent:w0t((a=e[1])!=null?a:""),ordered:n,start:n?Number.parseInt(r,10):void 0,content:((i=e[5])!=null?i:"").trim()}}l(wA,"parseListItemLine");function T0t(t){return wA(t)!==null}l(T0t,"isListItem");function lB(t){const e=String(t||"").trim();if(!e.includes("|"))return null;let r=e;r.startsWith("|")&&(r=r.slice(1)),r.endsWith("|")&&(r=r.slice(0,-1));const n=[];let a="",i=!1;for(const s of r){if(i){a+=s==="|"?"|":`\\${s}`,i=!1;continue}if(s==="\\"){i=!0;continue}if(s==="|"){n.push(a.trim()),a="";continue}a+=s}return i&&(a+="\\"),n.push(a.trim()),n.length>0?n:null}l(lB,"splitTableRow");function E0t(t){const e=lB(t);if(!e)return null;const r=[];for(const n of e){const a=n.replace(/\s+/g,"");if(!/^:?-{3,}:?$/.test(a))return null;a.startsWith(":")&&a.endsWith(":")?r.push("center"):a.endsWith(":")?r.push("right"):a.startsWith(":")?r.push("left"):r.push(void 0)}return r}l(E0t,"parseTableDelimiter");function C0t(t,e){const r=t.slice(0,e);for(;r.length<e;)r.push("");return r}l(C0t,"normalizeTableRow");function Ede(t,e){var s,o,u,h;const r=lB((s=t[e])!=null?s:""),n=E0t((o=t[e+1])!=null?o:"");if(!r||!n||r.length!==n.length)return null;const a=[];let i=e+2;for(;i<t.length&&!xA((u=t[i])!=null?u:"");){const d=lB((h=t[i])!=null?h:"");if(!d)break;a.push(C0t(d,r.length)),i+=1}return{block:{type:"table",header:r,alignments:n,rows:a},nextIndex:i}}l(Ede,"parseTableBlock");function S0t(t,e){return Ede(t,e)!==null}l(S0t,"isTableStart");function Cde(t,e){var o,u,h,d;const r=wA((o=t[e])!=null?o:"");if(!r)return null;const n=r.indent,a=r.ordered,i=[];let s=e;for(;s<t.length;){const f=wA((u=t[s])!=null?u:"");if(!f||f.indent<n||f.indent>n||f.ordered!==a)break;const p=[];for(s+=1;s<t.length&&!xA((h=t[s])!=null?h:"");){const g=wA((d=t[s])!=null?d:"");if(!g||g.indent<=n)break;const m=Cde(t,s);if(!m)break;p.push(m.block),s=m.nextIndex}i.push({content:f.content,children:p})}return{block:{type:"list",ordered:a,start:a?r.start:void 0,items:i},nextIndex:s}}l(Cde,"parseListBlock");function _0t(t){return xA(t)||sB(t)||x0t(t)||Tde(t)||oB(t)||T0t(t)}l(_0t,"isBlockBoundary");function Sde(t){var n,a,i,s,o,u,h;const e=String(t||"").replace(/\r\n/g,`
|
||
`).split(`
|
||
`),r=[];for(let d=0;d<e.length;){const f=(n=e[d])!=null?n:"";if(xA(f)){d+=1;continue}if(sB(f)){const v=f.trim().slice(3).trim(),b=[];for(d+=1;d<e.length&&!sB((a=e[d])!=null?a:"");)b.push((i=e[d])!=null?i:""),d+=1;d<e.length&&(d+=1),r.push({type:"code",code:b.join(`
|
||
`),language:v});continue}const p=f.trim().match(/^(#{1,6})\s+(.*)$/);if(p){r.push({type:"heading",depth:p[1].length,text:p[2].trim()}),d+=1;continue}if(Tde(f)){r.push({type:"hr"}),d+=1;continue}if(oB(f)){const v=[];for(;d<e.length&&oB((s=e[d])!=null?s:"");)v.push(((o=e[d])!=null?o:"").trim().replace(/^>\s?/,"")),d+=1;r.push({type:"blockquote",content:Sde(v.join(`
|
||
`))});continue}const g=Cde(e,d);if(g){r.push(g.block),d=g.nextIndex;continue}const m=Ede(e,d);if(m){r.push(m.block),d=m.nextIndex;continue}const y=[];for(;d<e.length&&!_0t((u=e[d])!=null?u:"")&&!S0t(e,d);)y.push(((h=e[d])!=null?h:"").trim()),d+=1;r.push({type:"paragraph",text:y.join(" ").trim()})}return r}l(Sde,"parseMarkdownBlocks");function _de(t,e=!1){const r=String(t||"").trim();return!(!r||/^javascript:/i.test(r)||/^data:/i.test(r)&&!e)}l(_de,"isSafeUrl");function $0(t,e){var o,u,h,d,f;const r=String(t||""),n=[],a=/!\[([^\]]*)\]\(([^)\s]+(?:\s+"[^"]*")?)\)|\[([^\]]+)\]\(([^)\s]+(?:\s+"[^"]*")?)\)|`([^`]+)`|\*\*([^*]+)\*\*|__([^_]+)__|\*([^*]+)\*|_([^_]+)_/g;let i=0,s=0;for(const p of r.matchAll(a)){const g=(o=p.index)!=null?o:0;if(g>i&&n.push(r.slice(i,g)),p[1]!==void 0&&p[2]!==void 0){const m=p[1],y=p[2].trim().replace(/\s+"[^"]*"$/,"");_de(y,!0)?n.push(bt.jsx("img",{src:y,alt:m},`${e}-img-${s}`)):n.push(p[0])}else if(p[3]!==void 0&&p[4]!==void 0){const m=p[3],y=p[4].trim().replace(/\s+"[^"]*"$/,"");_de(y)?n.push(bt.jsx("a",{href:y,target:"_blank",rel:"noreferrer",children:$0(m,`${e}-link-text-${s}`)},`${e}-link-${s}`)):n.push(p[0])}else if(p[5]!==void 0)n.push(bt.jsx("code",{children:p[5]},`${e}-code-${s}`));else if(p[6]!==void 0||p[7]!==void 0){const m=(h=(u=p[6])!=null?u:p[7])!=null?h:"";n.push(bt.jsx("strong",{children:$0(m,`${e}-strong-text-${s}`)},`${e}-strong-${s}`))}else if(p[8]!==void 0||p[9]!==void 0){const m=(f=(d=p[8])!=null?d:p[9])!=null?f:"";n.push(bt.jsx("em",{children:$0(m,`${e}-em-text-${s}`)},`${e}-em-${s}`))}i=g+p[0].length,s+=1}return i<r.length&&n.push(r.slice(i)),n}l($0,"renderInlineMarkdown");function TA(t,e,r){return t?X({"data-axhub-annotation-comment-target":"true","data-axhub-annotation-comment-target-id":`${t}-${e}`},r?{"data-axhub-annotation-directory-markdown-id":r,"data-axhub-annotation-directory-markdown-block":"true"}:{}):r?{"data-axhub-annotation-directory-markdown-id":r}:{}}l(TA,"buildCommentTargetProps");function cB(t,e,r,n,a){return t.map((i,s)=>{const o=`${e}-${s}`,u=TA(n,o,a);if(i.type==="heading"){const h=$0(i.text,o),d=xde(i.text,r);switch(i.depth){case 1:return bt.jsx("h1",Ne(X({},u),{id:d,children:h}),o);case 2:return bt.jsx("h2",Ne(X({},u),{id:d,children:h}),o);case 3:return bt.jsx("h3",Ne(X({},u),{id:d,children:h}),o);case 4:return bt.jsx("h4",Ne(X({},u),{id:d,children:h}),o);case 5:return bt.jsx("h5",Ne(X({},u),{id:d,children:h}),o);default:return bt.jsx("h6",Ne(X({},u),{id:d,children:h}),o)}}if(i.type==="paragraph")return bt.jsx("p",Ne(X({},u),{children:$0(i.text,o)}),o);if(i.type==="code")return bt.jsx("pre",Ne(X({},u),{children:bt.jsx("code",{className:i.language?`language-${i.language}`:void 0,children:i.code})}),o);if(i.type==="blockquote")return bt.jsx("blockquote",Ne(X({},u),{children:cB(i.content,`${o}-blockquote`,r,n,a)}),o);if(i.type==="list"){const h=i.items.map((d,f)=>bt.jsxs("li",Ne(X({},TA(n,`${o}-item-${f}`,a)),{children:[$0(d.content,`${o}-item-${f}`),d.children.length>0?cB(d.children,`${o}-item-${f}-children`,r,n,a):null]}),`${o}-item-${f}`));return i.ordered?bt.jsx("ol",Ne(X({start:i.start},u),{children:h}),o):bt.jsx("ul",Ne(X({},u),{children:h}),o)}if(i.type==="table"){const h=l(d=>{const f=i.alignments[d];return f?{textAlign:f}:void 0},"getCellStyle");return bt.jsxs("table",Ne(X({},u),{children:[bt.jsx("thead",{children:bt.jsx("tr",{children:i.header.map((d,f)=>bt.jsx("th",Ne(X({style:h(f)},TA(n,`${o}-header-${f}`,a)),{children:$0(d,`${o}-header-${f}`)}),`${o}-header-${f}`))})}),bt.jsx("tbody",{children:i.rows.map((d,f)=>bt.jsx("tr",{children:d.map((p,g)=>bt.jsx("td",Ne(X({style:h(g)},TA(n,`${o}-row-${f}-${g}`,a)),{children:$0(p,`${o}-row-${f}-${g}`)}),`${o}-row-${f}-${g}`))},`${o}-row-${f}`))})]}),o)}return bt.jsx("hr",X({},u),o)})}l(cB,"renderMarkdownBlocks");function kde(t){const{content:e,className:r,style:n,commentTarget:a,commentTargetId:i,directoryMarkdownId:s}=t,o=N.useMemo(()=>Sde(e),[e]),u=new Map,h=a&&i?i:void 0;return bt.jsx("div",{className:r,"data-axhub-annotation-comment-target":a?"true":void 0,"data-axhub-annotation-comment-target-id":a?i:void 0,"data-axhub-annotation-directory-markdown-id":s||void 0,style:n,children:cB(o,"markdown",u,h,s)})}l(kde,"ReadonlyMarkdown");function Ade(t,e){return String(t!=null?t:"").trim()||e}l(Ade,"normalizeText2");function Nde(t){return typeof t=="number"&&Number.isFinite(t)?t:String(t!=null?t:"")}l(Nde,"normalizeOptionValue");function Ide(t){return Array.isArray(t)?t.map(e=>{var r;return{label:Ade(e==null?void 0:e.label,String((r=e==null?void 0:e.value)!=null?r:"")),value:Nde(e==null?void 0:e.value)}}):[]}l(Ide,"normalizeOptions2");function Ch(t){var e,r,n;if(t.type==="inputNumber")return typeof t.initialValue=="number"&&Number.isFinite(t.initialValue)?t.initialValue:0;if(t.type==="switch"||t.type==="checkbox")return typeof t.initialValue=="boolean"?t.initialValue:!1;if(t.type==="select"||t.type==="segmented"){const a=Ide(t.options);return t.initialValue!==void 0?Nde(t.initialValue):(r=(e=a[0])==null?void 0:e.value)!=null?r:""}return t.type==="slider"?typeof t.initialValue=="number"&&Number.isFinite(t.initialValue)?t.initialValue:0:typeof t.initialValue=="string"?t.initialValue:String((n=t.initialValue)!=null?n:"")}l(Ch,"getDefaultInitialValue");function k0t(t){var a;const e=String((a=t==null?void 0:t.attributeId)!=null?a:"").trim(),r=Ade(t==null?void 0:t.displayName,e),n=t!=null&&t.info?String(t.info):void 0;if(!e||!r)return null;if(t.type==="select"||t.type==="segmented"){const i=t,{type:y,attributeId:v,displayName:b,info:w,options:x,initialValue:T}=i,C=Xt(i,["type","attributeId","displayName","info","options","initialValue"]),S=Ide(t.options);return Ne(X({type:t.type,attributeId:e,displayName:r,info:n},C),{options:S,initialValue:Ch(Ne(X({},t),{options:S}))})}if(t.type==="inputNumber"){const s=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=s,T=Xt(s,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"inputNumber",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}if(t.type==="switch"){const o=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=o,T=Xt(o,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"switch",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}if(t.type==="input"){const u=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=u,T=Xt(u,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"input",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}if(t.type==="checkbox"){const h=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=h,T=Xt(h,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"checkbox",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}if(t.type==="slider"){const d=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=d,T=Xt(d,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"slider",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}if(t.type==="textarea"){const f=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=f,T=Xt(f,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"textarea",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}if(t.type==="text"){const p=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=p,T=Xt(p,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"text",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}if(t.type==="button"){const g=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=g,T=Xt(g,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"button",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}if(t.type==="colorPicker"){const m=t,{type:y,attributeId:v,displayName:b,info:w,initialValue:x}=m,T=Xt(m,["type","attributeId","displayName","info","initialValue"]);return Ne(X({type:"colorPicker",attributeId:e,displayName:r,info:n},T),{initialValue:Ch(t)})}return null}l(k0t,"normalizeControl");function Lde(t){const e=[],r=new Map;for(const n of t){const a=k0t(n);a&&(r.has(a.attributeId)||e.push(a.attributeId),r.set(a.attributeId,a))}return e.map(n=>r.get(n)||null).filter(n=>n!==null)}l(Lde,"normalizeProtoDevControls");var Rl={controls:[],defaults:{},state:{},open:!1,ownerId:null},uB=new Set,A0t=new Set,hB={};function $de(){hB=X({},Rl.state),[...Rl.controls],Rl.open,Rl.ownerId}l($de,"refreshSnapshots");function N0t(){return typeof window!="undefined"}l(N0t,"isBrowser");function I0t(){N0t()&&(window.__AXHUB_PROTO_DEV__={getState:l(()=>X({},Rl.state),"getState"),getControls:l(()=>[...Rl.controls],"getControls"),setState:l(t=>{Pde(t)},"setState"),subscribe:l(t=>Rde(t),"subscribe")})}l(I0t,"syncWindowState");function Mde(){I0t();const t=dB();uB.forEach(e=>e()),A0t.forEach(e=>e(t))}l(Mde,"emitRuntime");function L0t(t){const e=Rl.defaults[t.attributeId],r=t.initialValue,n=Rl.state[t.attributeId];(!Object.prototype.hasOwnProperty.call(Rl.state,t.attributeId)||Object.is(n,e))&&(Rl.state[t.attributeId]=r),Rl.defaults[t.attributeId]=r}l(L0t,"seedDefaultValue");function $0t(t){var a;const e=Lde(t),r=new Set,n=new Set;for(const i of t){const s=String((a=i==null?void 0:i.attributeId)!=null?a:"").trim();s&&(n.has(s)&&r.add(s),n.add(s))}return r.forEach(i=>{console.warn(`[ProtoDevPanel] Duplicate control attributeId "${i}" detected. Using the last definition.`)}),Rl.controls=e,e.forEach(L0t),$de(),Mde(),e}l($0t,"registerProtoDevControls");function dB(){return hB}l(dB,"getProtoDevStateSnapshot");function Pde(t){let e=!1;for(const[r,n]of Object.entries(t||{}))Object.is(Rl.state[r],n)||(Rl.state[r]=n,e=!0);e&&($de(),Mde())}l(Pde,"setProtoDevState");function Rde(t){return uB.add(t),()=>{uB.delete(t)}}l(Rde,"subscribeProtoDevRuntime");function M0t(){return N.useSyncExternalStore(Rde,()=>dB(),()=>dB())}l(M0t,"useProtoDevState");function P0t(t){const{title:e}=t;return bt.jsx(Ml,{title:e,placement:"left",arrow:{pointAtCenter:!0},getPopupContainer:Gc,children:bt.jsx(ede,{className:"we-runtime-config-panel__info-icon"})})}l(P0t,"InfoTooltipIcon");function R0t(t){const e=t.replace(/[-_\s]+(.)?/g,(r,n)=>n?n.toUpperCase():"");return e&&`${e[0].toUpperCase()}${e.slice(1)}`}l(R0t,"titleCase");function Wd(t,e){if(!e.attributeId)return e.initialValue;const r=t[e.attributeId];return r===void 0?e.initialValue:r}l(Wd,"readValue");function EA(t){return Array.isArray(t)?t.map(e=>String(e!=null?e:"")).join(", "):t==null?"":String(t)}l(EA,"asStringValue");function O0t(t){return typeof t=="number"&&Number.isFinite(t)?t:null}l(O0t,"asNumberValue");function D0t(t){return t===!0}l(D0t,"asBooleanValue");function Yx(t){t.stopPropagation()}l(Yx,"stopPopupInteraction");function fB(t){const{config:e,canCollapse:r=!1,collapsed:n=!1,onClick:a}=t;return e.displayName?bt.jsxs("div",{className:"we-runtime-config-panel__attr-label",style:{cursor:a?"pointer":"default"},onClick:a,children:[r?bt.jsx(hft,{rotate:n?0:90,className:"we-runtime-config-panel__collapse-icon"}):null,bt.jsx("div",{className:"we-runtime-config-panel__label-main",children:bt.jsxs("span",{className:"we-runtime-config-panel__label-inline",children:[bt.jsx("span",{className:"we-runtime-config-panel__label-text",children:e.displayName}),e.info?bt.jsx(P0t,{title:e.info}):null]})})]}):null}l(fB,"AttrLabel");function M0(t){const{config:e,multiline:r=!1,controlClassName:n,children:a}=t;return bt.jsxs("div",{className:"we-runtime-config-panel__attr-component","data-multiline":r?"true":"false",children:[bt.jsx(fB,{config:e}),bt.jsx("div",{className:["we-runtime-config-panel__control",n].filter(Boolean).join(" "),children:a})]})}l(M0,"BaseComponent");function F0t(t){const{config:e,attributes:r}=t,n=EA(Wd(r,e));return e.hint?bt.jsx("div",{className:"we-runtime-config-panel__hint",children:bt.jsx(Hd.Text,{className:"we-runtime-config-panel__hint-text",type:e.textType==="secondary"?"secondary":void 0,children:n})}):bt.jsxs("div",{className:"we-runtime-config-panel__text-row",children:[e.displayName?bt.jsx(fB,{config:e}):null,bt.jsx(Hd.Text,{className:"we-runtime-config-panel__text",type:e.textType==="secondary"?"secondary":void 0,children:n})]})}l(F0t,"TextComponent");function B0t(t){const{config:e,attributes:r,onChange:n}=t;return bt.jsx(M0,{config:e,children:bt.jsx(Jue,{variant:"filled",value:EA(Wd(r,e)),placeholder:e.placeholder,disabled:e.disabled,size:"small",onChange:l(a=>{e.attributeId&&n({[e.attributeId]:a.target.value})},"onChange")})})}l(B0t,"InputComponent");function z0t(t){var a,i;const{config:e,attributes:r,onChange:n}=t;return bt.jsx(M0,{config:e,multiline:!0,controlClassName:"we-runtime-config-panel__control--full",children:bt.jsx(Jue.TextArea,{variant:"filled",value:EA(Wd(r,e)),placeholder:e.placeholder,disabled:e.disabled,autoSize:{minRows:(a=e.rows)!=null?a:3,maxRows:Math.max((i=e.rows)!=null?i:3,8)},onChange:l(s=>{e.attributeId&&n({[e.attributeId]:s.target.value})},"onChange")})})}l(z0t,"CustomTextAreaComponent");function H0t(t){const{config:e,attributes:r,onChange:n}=t;return bt.jsx(M0,{config:e,children:bt.jsx(due,{variant:"filled",value:O0t(Wd(r,e)),min:e.min,max:e.max,step:e.step,placeholder:e.placeholder,disabled:e.disabled,size:"small",onChange:l(a=>{e.attributeId&&n({[e.attributeId]:typeof a=="number"?a:null})},"onChange")})})}l(H0t,"InputNumberComponent");function W0t(t){var a,i,s;const{config:e,attributes:r,onChange:n}=t;return bt.jsx(M0,{config:e,children:bt.jsx(_le,{allowClear:!0,variant:"filled",size:"small",value:(a=Wd(r,e))!=null?a:void 0,options:((i=e.options)!=null?i:[]).map(o=>({label:o.label,value:o.value})),placeholder:(s=e.placeholder)!=null?s:"请选择",disabled:e.disabled,getPopupContainer:Gc,popupRender:l(o=>bt.jsx("div",{[US]:"true",onPointerDown:Yx,onMouseDown:Yx,onClick:Yx,children:o}),"popupRender"),onChange:l(o=>{e.attributeId&&n({[e.attributeId]:o})},"onChange")})})}l(W0t,"SelectComponent");function V0t(t){var a;const{config:e,attributes:r,onChange:n}=t;return bt.jsx(M0,{config:e,multiline:!0,controlClassName:"we-runtime-config-panel__control--full",children:bt.jsx(eA,{block:!0,size:"small",className:"we-runtime-config-panel__segmented-control",value:Wd(r,e),options:((a=e.options)!=null?a:[]).map(i=>({value:i.value,label:bt.jsxs("span",{className:"we-runtime-config-panel__segmented-option",children:[bt.jsx("span",{className:"we-runtime-config-panel__segmented-option-label",children:i.label}),i.description?bt.jsx("span",{className:"we-runtime-config-panel__segmented-option-description",children:i.description}):null]})})),disabled:e.disabled,onChange:l(i=>{e.attributeId&&n({[e.attributeId]:i})},"onChange")})})}l(V0t,"SegmentedComponent");function G0t(t){var i,s;const{config:e,attributes:r,onChange:n}=t,a=Wd(r,e);return bt.jsx(M0,{config:e,multiline:!0,controlClassName:"we-runtime-config-panel__control--full",children:bt.jsx("div",{className:"we-runtime-config-panel__card-list",role:"radiogroup","aria-label":(i=e.displayName)!=null?i:"卡片选择",children:((s=e.options)!=null?s:[]).map(o=>{const u=a===o.value;return bt.jsxs("button",{type:"button",role:"radio","aria-checked":u,"aria-disabled":e.disabled?"true":"false",className:["we-runtime-config-panel__card-option",u?"we-runtime-config-panel__card-option--selected":""].filter(Boolean).join(" "),disabled:e.disabled,onClick:l(()=>{!e.attributeId||e.disabled||n({[e.attributeId]:o.value})},"onClick"),children:[bt.jsx("span",{className:"we-runtime-config-panel__card-option-title",children:o.label}),o.description?bt.jsx("span",{className:"we-runtime-config-panel__card-option-description",children:o.description}):null]},String(o.value))})})})}l(G0t,"CardSelectComponent");function q0t(t){const{config:e,attributes:r,onChange:n}=t;return bt.jsx(M0,{config:e,controlClassName:"we-runtime-config-panel__control--auto",children:bt.jsx(uA,{size:"small",checked:D0t(Wd(r,e)),disabled:e.disabled,onChange:l(a=>{e.attributeId&&n({[e.attributeId]:a})},"onChange")})})}l(q0t,"SwitchComponent");function Y0t(t){var i;const{config:e,attributes:r,onChange:n}=t,a=EA(Wd(r,e))||void 0;return bt.jsx(M0,{config:e,controlClassName:"we-runtime-config-panel__control--auto",children:bt.jsx(jct,{size:"small",value:a,disabled:e.disabled,showText:(i=e.colorText)!=null?i:!1,getPopupContainer:Gc,panelRender:l(s=>bt.jsx("div",{[US]:"true",onPointerDown:Yx,onMouseDown:Yx,onClick:Yx,children:s}),"panelRender"),onChange:l((s,o)=>{e.attributeId&&n({[e.attributeId]:o})},"onChange")})})}l(Y0t,"ColorPickerComponent");function U0t(t){var s;const{config:e,attributes:r,onChange:n}=t,[a,i]=N.useState(e.defaultExpanded===!1);return bt.jsxs("div",{className:["we-runtime-config-panel__group",e.displayType==="inline"?"we-runtime-config-panel__group--inline":""].filter(Boolean).join(" "),children:[bt.jsx(fB,{config:e,canCollapse:!0,collapsed:a,onClick:l(()=>i(o=>!o),"onClick")}),bt.jsx("div",{className:["we-runtime-config-panel__group-content",a?"we-runtime-config-panel__group-content--collapsed":""].filter(Boolean).join(" "),children:((s=e.children)!=null?s:[]).map((o,u)=>{var h,d;return bt.jsx(Ode,{attributes:r,config:o,onChange:n},`${(d=(h=o.attributeId)!=null?h:o.displayName)!=null?d:o.type}-${u}`)})})]})}l(U0t,"GroupComponent");var j0t={Text:F0t,Input:B0t,CustomTextArea:z0t,InputNumber:H0t,Select:W0t,Segmented:V0t,CardSelect:G0t,Switch:q0t,ColorPicker:Y0t,Group:U0t};function Ode(t){const{config:e}=t;if(e.show===!1)return null;const r=j0t[R0t(e.type)];return r?bt.jsx(r,X({},t)):null}l(Ode,"AttributeTree");function K0t(t,e,r){var a,i,s;const n={attributeId:t.key,displayName:t.label,info:t.description,placeholder:t.placeholder,disabled:r,initialValue:e==null?void 0:e[t.key]};switch(t.type){case"number":return Ne(X({},n),{type:"inputNumber",min:t.min,max:t.max,step:t.step});case"select":return Ne(X({},n),{type:"select",options:(a=t.options)!=null?a:[]});case"segmented":return Ne(X({},n),{type:"segmented",options:(i=t.options)!=null?i:[]});case"card":return Ne(X({},n),{type:"cardSelect",options:(s=t.options)!=null?s:[]});case"switch":return Ne(X({},n),{type:"switch"});case"color":return Ne(X({},n),{type:"colorPicker"});case"text":default:return Ne(X({},n),{type:"input"})}}l(K0t,"convertFieldToConfig");function X0t(t,e,r){const n=t.fields.map(a=>K0t(a,e,r));return t.title?[{type:"group",displayName:t.title,info:t.description,defaultExpanded:!0,children:n}]:[...t.description?[{type:"text",initialValue:t.description,textType:"secondary",hint:!0}]:[],...n]}l(X0t,"buildConfigNodes");function Z0t(t){var o;const{schema:e,values:r,disabled:n=!1,onChange:a}=t;if(!((o=e==null?void 0:e.fields)!=null&&o.length))return bt.jsx(Pg,{image:Pg.PRESENTED_IMAGE_SIMPLE,description:"当前元素没有可调整项。",style:{marginTop:8,padding:"12px 0 4px"}});const i=r!=null?r:{},s=X0t(e,r,n);return bt.jsx("div",{className:"we-runtime-prop-panel__body we-runtime-config-panel",[US]:"true",children:s.map((u,h)=>{var d,f;return bt.jsx(Ode,{attributes:i,config:u,onChange:l(p=>{a==null||a(p)},"onChange")},`${(f=(d=u.attributeId)!=null?d:u.displayName)!=null?f:u.type}-${h}`)})})}l(Z0t,"ReactTweakPanel");function Q0t(t){switch(t){case"inputNumber":return"number";case"select":return"select";case"segmented":return"segmented";case"switch":return"switch";case"colorPicker":return"color";case"textarea":return"text";case"input":default:return"text"}}l(Q0t,"mapControlType");function J0t(t){return{key:t.attributeId,label:t.displayName||t.attributeId,type:Q0t(t.type),description:t.info,placeholder:typeof t.placeholder=="string"?t.placeholder:void 0,min:typeof t.min=="number"?t.min:void 0,max:typeof t.max=="number"?t.max:void 0,step:typeof t.step=="number"?t.step:void 0,options:Array.isArray(t.options)?t.options.map(e=>{var r;return{label:String((r=e.label)!=null?r:e.value),value:typeof e.value=="number"?e.value:String(e.value)}}):void 0}}l(J0t,"controlToTweakField");function ept(t){return{fields:t.map(J0t)}}l(ept,"controlsToTweakSchema");function tpt(t){const{controls:e,state:r,onValueChange:n}=t;if(!e.length)return null;const a=N.useMemo(()=>ept(e),[e]),i=r;return bt.jsx("div",{"data-proto-dev-inline-controls":"true",children:bt.jsx(Z0t,{schema:a,values:i,onChange:l(s=>{for(const[o,u]of Object.entries(s))n(o,u)},"onChange")})})}l(tpt,"ProtoDevControlsContent");var Ux=24,rpt=.8;function npt(t){var r;const e=(r=t==null?void 0:t.ownerDocument)==null?void 0:r.defaultView;return e?{width:e.innerWidth,height:e.innerHeight}:typeof window!="undefined"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}}l(npt,"getViewportSize");function apt(t){return Number.isFinite(t.left)&&Number.isFinite(t.top)&&Number.isFinite(t.right)&&Number.isFinite(t.bottom)&&Number.isFinite(t.width)&&Number.isFinite(t.height)}l(apt,"isFiniteRect");function ipt(t,e){if(!apt(t)||e.width<=0||e.height<=0)return null;const r=Math.min(220,e.width*.24),n=Math.max(r,Math.min(720,e.width*.68)),a=t.height>=e.height*rpt,i=t.top<=Ux&&t.bottom>=e.height-Ux,s=t.width>=r&&t.width<=n;return!a||!i||!s?null:t.right>=e.width-Ux&&t.left>Ux?"right":t.left<=Ux&&t.right<e.width-Ux?"left":null}l(ipt,"resolveSideDrawerEdge");function spt(t,e=npt(t)){let r=t!=null?t:null;for(;r;){const n=ipt(r.getBoundingClientRect(),e);if(n==="right")return"left";if(n==="left")return"right";r=r.parentElement}return"bottom"}l(spt,"resolveAnnotationBubblePlacement");var Dde=240,Fde=220,Bde=320,opt=1e3,lpt="https://github.com/lintendo/Axhub-Skills/blob/main/skills/axhub-prototype-context/SKILL.md",cpt="安装后可以让本地开发 Agent 读取原型上下文、标注数据和源码交接信息,辅助开发。",upt="源码已随发布包提供。开发者可通过 $axhub-prototype-context 技能读取。",Ni={[US]:"true"};function hpt(t){const e=String(t||"").trim();return[`请把下面这个技能安装到当前项目:${lpt}`,e?`安装到当前项目后,请用 $axhub-prototype-context 读取这个 URL 的 Axhub 原型上下文,并把 PRD、目录、全部标注节点上下文和可用源码入口返回给我:${e}`:"安装到当前项目后,请用 $axhub-prototype-context 读取当前 URL 的 Axhub 原型上下文,并把 PRD、目录、全部标注节点上下文和可用源码入口返回给我。"].join(`
|
||
`)}l(hpt,"buildAnnotationSourceSkillPrompt");function dpt(t,e){return nt(this,null,function*(){var i,s;const r=hpt(t),n=typeof navigator!="undefined"?(s=(i=navigator.clipboard)==null?void 0:i.writeText)==null?void 0:s.bind(navigator.clipboard):void 0;if(n)try{yield n(r);return}catch(o){}if(typeof document=="undefined"||!document.body)throw new Error("Clipboard copy is unavailable");const a=document.createElement("textarea");a.value=r,a.setAttribute("readonly","true"),a.style.position="fixed",a.style.top="-9999px",a.style.left="-9999px",document.body.appendChild(a),a.select();try{document.execCommand("copy")}finally{document.body.removeChild(a)}})}l(dpt,"copyAnnotationSourceSkillPrompt");function jx(t){return String(t||"").trim().toLowerCase()}l(jx,"normalizeColorToken");function fpt(t){const e=jx(t);return{"#1890ff":"#1677FF","#7b68ee":"#6252F3","#00ced1":"#13B8C4","#00c853":"#34C759","#ffd700":"#FFC400","#ff8c00":"#FF8A1F","#ff4757":"#FF3B3F","#d97706":"#FF8A1F","#059669":"#34C759","#e11d48":"#FF3B3F"}[e]||t}l(fpt,"resolveDisplayColorToken");function ppt(t){const e=new Map(ode.map(n=>[jx(n.value),n.label])),r=new Set;return t.map(n=>String(n||"").trim()).filter(Boolean).filter(n=>{const a=jx(n);return!a||r.has(a)?!1:(r.add(a),!0)}).map(n=>({label:e.get(jx(n))||n,value:n,displayColor:fpt(n)}))}l(ppt,"buildColorSwatchOptions");function gpt(t,e,r){if(!Number.isFinite(t))return e;const n=Math.min(e,r),a=Math.max(e,r);return Math.min(a,Math.max(n,t))}l(gpt,"clampNumber");function mpt(t){const e=Math.max(1,t-Zft*2),r=Math.min(Bde,e);return{min:Math.min(Fde,r),max:r}}l(mpt,"resolvePanelWidthBounds");function ypt(t,e){var r;return e&&(r=t.find(n=>n.nodes.some(a=>a.id===e)))!=null?r:null}l(ypt,"findAnnotationNodeGroupByNodeId");function zde(t){const e=[],r=l(n=>{for(const a of n||[])a.type==="folder"&&(a.defaultExpanded&&e.push(a.id),r(a.children))},"walk");return r(t==null?void 0:t.nodes),e}l(zde,"collectDefaultExpandedDirectoryFolderIds");function pB(t,e){if(!e)return null;for(const r of t||[]){if(r.type==="markdown"&&r.id===e)return r;if(r.type==="folder"){const n=pB(r.children,e);if(n)return n}}return null}l(pB,"findDirectoryMarkdownNode");function vpt(t){const e=[],r=l(n=>{for(const a of n||[])a.type==="markdown"?e.push(a):a.type==="folder"&&r(a.children)},"walk");return r(t),e}l(vpt,"collectDirectoryMarkdownNodes");function Hde(t){return String(t||"").trim()}l(Hde,"normalizeDirectoryRouteToken");function Wde(t,e){if(t.type!=="route")return!1;const r=Hde(t.route),n=Hde(e);return!!(r&&n&&r===n)}l(Wde,"resolveDirectoryRouteNodeMatchesPage");function Vde(t,e){for(const r of t||[])if(Wde(r,e)||r.type==="folder"&&Vde(r.children,e))return!0;return!1}l(Vde,"hasDirectoryRouteNodeMatchingPage");function Gde(t,e){if(Vde(t==null?void 0:t.nodes,e))return null;const r=vpt(t==null?void 0:t.nodes);return r.length===1?r[0].id:null}l(Gde,"resolveDefaultDirectoryMarkdownNodeId");function bpt(t){var n,a;const e=(n=t==null?void 0:t.nodes)!=null?n:[],r=e[0];return e.length===1&&(r==null?void 0:r.type)==="folder"&&((a=r.children)!=null&&a.length)?r.children:e}l(bpt,"resolveVisibleDirectoryNodes");function qde(t){return String(t.title||"").trim()||"未命名标注"}l(qde,"resolveAnnotationNodeLabel");function xpt(t){return typeof Element!="undefined"&&t instanceof Element}l(xpt,"isElementLikeToolbarAction");function wpt(t){return t.content==null||typeof t.content=="boolean"?[]:xpt(t.content)?[{kind:"element",element:t.content,title:t.title}]:[{kind:"react",content:t.content,title:t.title}]}l(wpt,"normalizeToolbarActionItem");function Tpt(t){return t==null?[]:(Array.isArray(t)?t:[t]).flatMap(r=>wpt(r))}l(Tpt,"normalizeToolbarActionEntries");function Ept(t){return t!=null&&typeof t!="boolean"&&t!==""}l(Ept,"hasToolbarActionTitle");function Cpt(t){const{element:e}=t,r=N.useRef(null);return N.useEffect(()=>{const n=r.current;if(n)return n.replaceChildren(e),()=>{e.parentNode===n&&n.removeChild(e)}},[e]),bt.jsx("span",{ref:r,className:"axhub-annotation-toolbar-action-element"})}l(Cpt,"ElementToolbarAction");function Spt(t){const{entry:e,toolbarEdge:r,index:n}=t,a=e.kind==="element"?bt.jsx(Cpt,{element:e.element}):bt.jsx(N.Fragment,{children:e.content});return Ept(e.title)?bt.jsx(Ml,{title:e.title,placement:r==="right"?"left":"right",getPopupContainer:Gc,children:bt.jsx("span",{className:"axhub-annotation-toolbar-action-tooltip",children:a})},`toolbar-action-${n}`):bt.jsx(N.Fragment,{children:a},`toolbar-action-${n}`)}l(Spt,"ToolbarActionEntryView");function _pt(t){const{value:e,allowAll:r=!1,options:n=ode,onChange:a}=t,{token:i}=hA.useToken(),s=18,o=1.5,u=1.5,h=s-o*2,d=h+(o+u)*2,f=e!=null?e:[];return bt.jsxs("div",{onMouseDown:l(p=>{p.preventDefault()},"onMouseDown"),style:{display:"flex",alignItems:"center",gap:i.marginSM,flexWrap:"wrap",paddingBlock:o+u},children:[r?bt.jsx("button",Ne(X({type:"button",title:"全部颜色","aria-label":"全部颜色"},Ni),{onClick:l(p=>{p.preventDefault(),a(null)},"onClick"),style:{position:"relative",width:f.length===0?d:s,height:f.length===0?d:s,padding:0,borderRadius:999,background:"transparent",border:"none",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:bt.jsx("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:f.length===0?h:s,height:f.length===0?h:s,borderRadius:999,background:Kt.surface,boxShadow:f.length===0?`0 0 0 ${o}px ${i.colorBgElevated}, 0 0 0 ${o+u}px ${i.colorTextQuaternary}`:"none"},children:bt.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{width:"100%",height:"100%"},children:[bt.jsx("circle",{cx:"10",cy:"10",r:"9",stroke:Kt.borderStrong,strokeWidth:"1.2",fill:Kt.surface}),bt.jsx("line",{x1:"4.5",y1:"15.5",x2:"15.5",y2:"4.5",stroke:Kt.textMuted,strokeWidth:"1.6",strokeLinecap:"round"})]})})})):null,n.map(p=>{const g=f.some(y=>jx(y)===jx(p.value)),m="displayColor"in p&&p.displayColor?p.displayColor:p.value;return bt.jsx("button",Ne(X({type:"button",title:p.label,"aria-label":p.label},Ni),{onClick:l(y=>{y.preventDefault(),a(p.value)},"onClick"),style:{width:g?d:s,height:g?d:s,padding:0,borderRadius:999,border:"none",background:"transparent",cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"center"},children:bt.jsx("span",{"aria-hidden":"true",style:{width:g?h:s,height:g?h:s,borderRadius:999,background:m,boxShadow:g?`0 0 0 ${o}px ${i.colorBgElevated}, 0 0 0 ${o+u}px ${m}`:"none"}})}),p.value)})]})}l(_pt,"ColorSwatchGrid");function CA(t){const{label:e,control:r,icon:n,help:a}=t,{token:i}=hA.useToken();return bt.jsxs(lc,{align:"center",justify:"space-between",gap:i.marginXS,style:{minHeight:i.controlHeightSM},children:[bt.jsxs(lc,{align:"center",gap:6,style:{minWidth:0},children:[n?bt.jsx("span",{style:{color:Kt.textMuted,display:"inline-flex",fontSize:13},children:n}):null,bt.jsxs(lc,{align:"center",gap:4,style:{minWidth:0},children:[bt.jsx(Hd.Text,{type:"secondary",style:{fontSize:12,whiteSpace:"nowrap"},children:e}),a?bt.jsx(Ml,{title:a,getPopupContainer:Gc,children:bt.jsx(ede,{"aria-label":`${e}说明`,style:{color:Kt.textMuted,cursor:"help",fontSize:12}})}):null]})]}),r]})}l(CA,"SettingsRow");function kpt(t){const{label:e,icon:r,onClick:n}=t,{token:a}=hA.useToken();return bt.jsx(wh,Ne(X({type:"text",block:!0,"aria-label":e},Ni),{style:{height:a.controlHeightSM,paddingInline:0,color:Kt.textMuted},onClick:n,children:bt.jsxs(lc,{align:"center",gap:6,style:{width:"100%",minWidth:0},children:[bt.jsx("span",{style:{color:Kt.textMuted,display:"inline-flex",fontSize:13},children:r}),bt.jsx(Hd.Text,{type:"secondary",style:{fontSize:12,whiteSpace:"nowrap"},children:e})]})}))}l(kpt,"SettingsMenuItem");function Apt(t){const{nodes:e,activeNodeId:r,onSelectNode:n,stopPropagation:a=!1}=t;return e.length===0?null:bt.jsx("div",{className:"axhub-annotation-node-chip-list",style:{display:"inline-flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:e.map(i=>{const s=i.id===r,o=String(i.color||"#1890FF").trim()||"#1890FF";return bt.jsx("button",Ne(X({type:"button",className:["axhub-annotation-node-chip",s?"axhub-annotation-node-chip--active":""].filter(Boolean).join(" "),"aria-label":qde(i),title:qde(i)},Ni),{onClick:l(u=>{u.preventDefault(),a&&u.stopPropagation(),n==null||n(i.id)},"onClick"),onPointerDown:l(u=>{a&&(u.preventDefault(),u.stopPropagation())},"onPointerDown"),style:{position:"relative",width:s?14:10,height:s?14:10,padding:0,borderRadius:999,border:s?"1.5px solid rgba(255, 255, 255, 0.92)":`1.5px solid ${Kt.surface}`,background:o,boxShadow:"none",opacity:s?1:.58,cursor:n?"pointer":"default",flex:"0 0 auto",transition:"width 120ms ease, height 120ms ease, opacity 120ms ease"}}),i.id)})})}l(Apt,"AnnotationNodeChipList");function Npt(t){var $r,xn,ka,di,cr,ct,$t;const{anchorRect:e,selectedNode:r,currentTarget:n,annotationText:a,images:i,colorFilter:s,availableFilterColors:o,annotationCount:u,annotationNodeGroups:h,selectedNodeGroup:d,directory:f=null,sourceReference:p=null,currentPageId:g=null,markersVisible:m,directoryPanelOpen:y,toolbarEdge:v,toolbarAutoHide:b,markerIndexVisible:w,onSelectAnnotation:x,onPreviewAnnotation:T,onDirectoryPanelOpenChange:C,onToolbarEdgeChange:S,onRequestExit:E,onDirectoryRoute:k,toolbarActions:A,themeMode:I,protoState:L,showToolbar:R,showThemeToggle:O,showColorFilter:M,showBrandLink:P,zIndex:z,onThemeModeChange:D,onColorFilterChange:B,onMarkersVisibleChange:W,onMarkerIndexVisibleChange:U,onToolbarAutoHideChange:j,onProtoValueChange:V,onCloseCard:Y}=t,{token:H}=hA.useToken(),q=N.useMemo(()=>{var Et;return d!=null?d:ypt(h!=null?h:[],(Et=r==null?void 0:r.id)!=null?Et:null)},[h,r==null?void 0:r.id,d]),Z=($r=q==null?void 0:q.nodes)!=null?$r:r?[r]:[],K=N.useRef(null),re=N.useRef(null),Q=N.useRef(null),te=N.useRef(null),ee=N.useRef(null),J=N.useRef(null),ae=N.useRef(null),se=N.useRef(null),fe=N.useRef(null),ve=N.useRef(null),de=N.useRef(null),Ee=N.useRef(Dde),Ce=N.useRef(null),[De,ce]=N.useState(!1),[Ie,ye]=N.useState(!1),[pe,Ae]=N.useState("idle"),[Ve,ze]=N.useState(!1),[We,me]=N.useState(!1),[Se,ne]=N.useState(()=>new Set(zde(f))),[xe,oe]=N.useState(()=>Gde(f,g)),[_e,ue]=N.useState(null),[tt,Re]=N.useState(!1),[et,Xe]=N.useState(Dde),ot=!!(n&&e),Ge=N.useMemo(()=>spt(n),[n,e==null?void 0:e.left,e==null?void 0:e.top,e==null?void 0:e.width,e==null?void 0:e.height]),ht=(xn=r==null?void 0:r.annotationText)!=null?xn:a,Je=(r==null?void 0:r.controls)||[],St=ht.trim().length>0||i.length>0,He=Je.length>0,dt=St&&He,Oe=w&&r&&Number.isFinite(r.index)?String(r.index):"",vt=N.useMemo(()=>ppt(o),[o]);((ka=s==null?void 0:s.length)!=null?ka:0)>0;const qe=R,Me=u>0,lt=!!xe,it=N.useMemo(()=>Tpt(A!=null?A:null),[A]),Ue=it.length>0,we=!!(String((p==null?void 0:p.root)||"").trim()||String((p==null?void 0:p.manifest)||"").trim()),gt=[upt,p!=null&&p.manifest?`清单:${p.manifest}`:""].filter(Boolean).join(`
|
||
`),ge=typeof z=="number"?z+1:10060,ie=opt;N.useEffect(()=>{var Et;ot&&((Et=K.current)==null||Et.forceAlign())},[ot,n,e==null?void 0:e.left,e==null?void 0:e.top,e==null?void 0:e.width,e==null?void 0:e.height,r==null?void 0:r.id]);const be=N.useMemo(()=>pB(f==null?void 0:f.nodes,xe),[xe,f]),$e=N.useMemo(()=>y0t((be==null?void 0:be.markdown)||""),[be==null?void 0:be.id,be==null?void 0:be.markdown]),le=v0t(Number.POSITIVE_INFINITY),ke=$e.length>0,je=N.useMemo(()=>bpt(f),[f]),ut=je.length>0,Qe=Me&&Ie,Ze=De,st=qe&&ut&&y;N.useEffect(()=>{ne(new Set(zde(f))),oe(Et=>pB(f==null?void 0:f.nodes,Et)?Et:Gde(f,g))},[g,f]),N.useEffect(()=>{var Et,jt;ue((jt=(Et=$e[0])==null?void 0:Et.id)!=null?jt:null)},[be==null?void 0:be.id,$e]),N.useEffect(()=>{!ut&&y&&(C==null||C(!1))},[y,ut,C]),N.useEffect(()=>{!Me&&Ie&&ye(!1)},[Ie,Me]),N.useEffect(()=>{if(!st||$e.length===0)return;const Et=ee.current;if(!Et||typeof document=="undefined")return;const jt=l(()=>{const ir=Et.getBoundingClientRect().top,br={};for(const Gr of $e){const Dr=wde(te.current,Gr.id);Dr&&(br[Gr.id]=Dr.getBoundingClientRect().top-ir+Et.scrollTop)}const tn=b0t($e,br,Et.scrollTop);ue(Gr=>Gr===tn?Gr:tn)},"updateActiveDirectoryArticleHeading");return jt(),Et.addEventListener("scroll",jt,{passive:!0}),window.addEventListener("resize",jt),()=>{Et.removeEventListener("scroll",jt),window.removeEventListener("resize",jt)}},[be==null?void 0:be.id,$e,st]);const Ct=N.useCallback(Et=>{ne(jt=>{const ir=new Set(jt);return ir.has(Et)?ir.delete(Et):ir.add(Et),ir})},[]),Mt=N.useCallback(Et=>{if(Et.type==="folder"){Ct(Et.id);return}if(Et.type==="markdown"){oe(Et.id);return}if(oe(null),Et.type==="route"){k==null||k(Et);return}if(Et.type==="link"){if(!Et.href)return;if((Et.target||"blank")==="self"){window.location.assign(Et.href);return}window.open(Et.href,"_blank","noopener,noreferrer")}},[Ct,k]);N.useEffect(()=>{Ee.current=et},[et]),N.useEffect(()=>(Phe(We&&st,{reservedLeftWidth:v==="left"?et:0,reservedRightWidth:v==="right"?et:0}),()=>Phe(!1)),[st,We,et,v]),N.useEffect(()=>{const Et=J.current;if(!Et||!y)return;const jt=l(()=>{const Dr=Ce.current;if(Dr)try{Et.releasePointerCapture(Dr.pointerId)}catch(Rr){}Ce.current=null,Re(!1),document.documentElement.style.cursor="",document.body.style.cursor="",window.removeEventListener("pointermove",ir,!0),window.removeEventListener("pointerup",br,!0),window.removeEventListener("pointercancel",tn,!0)},"endResize"),ir=l(Dr=>{const Rr=Ce.current;if(!Rr||Dr.pointerId!==Rr.pointerId)return;Dr.cancelable&&Dr.preventDefault();const sa=mpt(window.innerWidth),In=v==="right"?Rr.startClientX-Dr.clientX:Dr.clientX-Rr.startClientX;Xe(gpt(Rr.startWidth+In,sa.min,sa.max))},"onWindowPointerMove"),br=l(Dr=>{const Rr=Ce.current;!Rr||Dr.pointerId!==Rr.pointerId||jt()},"onWindowPointerUp"),tn=l(Dr=>{const Rr=Ce.current;!Rr||Dr.pointerId!==Rr.pointerId||jt()},"onWindowPointerCancel"),Gr=l(Dr=>{var Rr;if(Dr.button===0){Ce.current={pointerId:Dr.pointerId,startClientX:Dr.clientX,startWidth:Math.round(((Rr=Q.current)==null?void 0:Rr.getBoundingClientRect().width)||Ee.current)},Re(!0),document.documentElement.style.cursor="ew-resize",document.body.style.cursor="ew-resize";try{Et.setPointerCapture(Dr.pointerId)}catch(sa){}window.addEventListener("pointermove",ir,!0),window.addEventListener("pointerup",br,!0),window.addEventListener("pointercancel",tn,!0),Dr.cancelable&&Dr.preventDefault(),Dr.stopPropagation()}},"onHandlePointerDown");return Et.addEventListener("pointerdown",Gr),()=>{Et.removeEventListener("pointerdown",Gr),jt()}},[y,v]),N.useEffect(()=>{if(!Ze&&!Qe||typeof document=="undefined")return;const Et=l(ir=>{const br=[Ze?[ae.current,se.current]:null,Qe?[fe.current,ve.current]:null].filter(Boolean);if(br.length===0){ce(!1),ye(!1);return}const tn=typeof ir.composedPath=="function"?ir.composedPath():[];for(const[Gr,Dr]of br)if(!(!Gr||!Dr)&&(Gr.contains(ir.target)||Dr.contains(ir.target)||tn.includes(Gr)||tn.includes(Dr)))return;ce(!1),ye(!1)},"handleDocumentPointerDown"),jt=l(ir=>{ir.key==="Escape"&&(ce(!1),ye(!1))},"handleDocumentKeyDown");return document.addEventListener("pointerdown",Et,!0),document.addEventListener("keydown",jt,!0),()=>{document.removeEventListener("pointerdown",Et,!0),document.removeEventListener("keydown",jt,!0)}},[Qe,Ze]),N.useEffect(()=>{if(!b||Ze||Qe||typeof window=="undefined")return;const Et=l(jt=>{var Rr;const ir=(Rr=de.current)==null?void 0:Rr.getBoundingClientRect(),br=8,tn=ir?jt.clientX>=ir.left-br&&jt.clientX<=ir.right+br&&jt.clientY>=ir.top-br&&jt.clientY<=ir.bottom+br:!1,Gr=76,Dr=jt.clientY>=window.innerHeight/2-Gr&&jt.clientY<=window.innerHeight/2+Gr&&(v==="right"?jt.clientX>=window.innerWidth-54:jt.clientX<=54);ze(tn||Dr)},"handleToolbarAutoHidePointerMove");return window.addEventListener("pointermove",Et,!0),()=>{window.removeEventListener("pointermove",Et,!0)}},[Qe,Ze,b,v]);const Bt=N.useCallback(Et=>{const jt=ee.current,ir=wde(te.current,Et);if(!jt||!ir)return;ue(Et);const br=jt.getBoundingClientRect().top,tn=ir.getBoundingClientRect().top,Gr=Math.max(0,tn-br+jt.scrollTop-16);jt.scrollTo({top:Gr,behavior:"smooth"})},[]),Pt=46,Pe=!b||Ve||Ze||Qe,yt=Pe?"translateY(-50%)":v==="right"?"translateY(-50%) translateX(calc(100% - 2px))":"translateY(-50%) translateX(calc(-100% + 2px))",Tt=b&&!Pe,Nt=N.useCallback(()=>{b&&ze(!0)},[b]),zt=N.useCallback(()=>{b&&ze(!1)},[b]),Jt=N.useCallback(()=>{const Et=typeof window=="undefined"?"":window.location.href;dpt(Et).then(()=>{Ae("copied"),window.setTimeout(()=>Ae("idle"),1600)}).catch(()=>{Ae("failed"),window.setTimeout(()=>Ae("idle"),2200)})},[]),Ht=bt.jsx("div",{ref:se,className:"axhub-annotation-toolbar-surface axhub-annotation-toolbar-surface--settings","data-edge":v,"data-open":De?"true":"false","aria-hidden":!De,onMouseEnter:Nt,onMouseLeave:zt,onPointerDownCapture:l(Et=>Et.stopPropagation(),"onPointerDownCapture"),style:{position:"fixed",top:"50%",[v]:Pt,zIndex:ge,width:168},children:bt.jsxs(lc,{vertical:!0,gap:7,children:[bt.jsxs(lc,{vertical:!0,gap:5,children:[O?bt.jsx(CA,{label:"暗色模式",icon:I==="dark"?bt.jsx(Dft,{}):bt.jsx(Hft,{}),control:bt.jsx(eA,Ne(X({size:"small",value:I},Ni),{options:[{label:"关",value:"light"},{label:"开",value:"dark"}],onChange:l(Et=>D(Et),"onChange")}))}):null,bt.jsx(CA,{label:"工具栏位置",icon:bt.jsx(sde,{}),control:bt.jsx(eA,Ne(X({size:"small",value:v},Ni),{options:[{label:"左",value:"left"},{label:"右",value:"right"}],onChange:l(Et=>S(Et),"onChange")}))}),bt.jsx(CA,{label:"自动隐藏",icon:bt.jsx(Xhe,{}),control:bt.jsx(uA,Ne(X({size:"small",checked:b},Ni),{onChange:l(Et=>j(Et),"onChange")}))}),bt.jsx(CA,{label:"开发 skills",icon:bt.jsx(Yue,{}),help:cpt,control:bt.jsx(wh,Ne(X({type:"link",className:"axhub-annotation-skill-install-link"},Ni),{onClick:Jt,"aria-live":"polite",children:pe==="copied"?"已复制":pe==="failed"?"复制失败":"安装"}))}),bt.jsx(kpt,{label:"完全退出",icon:bt.jsx(_ft,{}),onClick:l(()=>{ce(!1),E()},"onClick")})]}),bt.jsx(oF,{style:{margin:0,borderColor:Kt.divider}}),P?bt.jsx(wh,Ne(X({type:"link",block:!0,href:"https://axhub.im/",target:"_blank",rel:"noopener noreferrer"},Ni),{style:{height:H.controlHeightSM,paddingInline:H.paddingXXS},children:bt.jsx(Hd.Text,{type:"secondary",style:{fontSize:12},children:"由 Axhub 提供服务"})})):null]})}),wt=bt.jsx("div",{ref:ve,className:"axhub-annotation-toolbar-surface axhub-annotation-toolbar-surface--annotation","data-edge":v,"data-open":Ie?"true":"false","aria-hidden":!Ie,onMouseEnter:Nt,onMouseLeave:zt,onPointerDownCapture:l(Et=>Et.stopPropagation(),"onPointerDownCapture"),style:{position:"fixed",top:"50%",[v]:Pt,zIndex:ge,width:188},children:bt.jsxs(lc,{vertical:!0,gap:9,children:[bt.jsxs(lc,{justify:"space-between",align:"center",gap:10,children:[bt.jsxs(lc,{align:"center",gap:6,style:{minWidth:0},children:[bt.jsx(Kue,{style:{color:Kt.textMuted,fontSize:13}}),bt.jsx(Hd.Text,{type:"secondary",style:{fontSize:12,whiteSpace:"nowrap"},children:"是否显示"})]}),bt.jsx(uA,Ne(X({size:"small",checked:m},Ni),{onChange:l(Et=>W(Et),"onChange")}))]}),bt.jsxs(lc,{justify:"space-between",align:"center",gap:10,children:[bt.jsxs(lc,{align:"center",gap:6,style:{minWidth:0},children:[bt.jsx(Hd.Text,{"aria-hidden":"true",type:"secondary",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:13,color:Kt.textMuted,fontSize:13,fontWeight:700,lineHeight:1},children:"#"}),bt.jsx(Hd.Text,{type:"secondary",style:{fontSize:12,whiteSpace:"nowrap"},children:"显示序号"})]}),bt.jsx(uA,Ne(X({size:"small",checked:w},Ni),{onChange:l(Et=>U(Et),"onChange")}))]}),M?bt.jsxs(bt.Fragment,{children:[bt.jsx(oF,{style:{margin:0,borderColor:Kt.divider}}),bt.jsx(lc,{vertical:!0,gap:0,children:bt.jsx(_pt,{value:s,allowAll:!0,options:vt,onChange:l(Et=>{B(Et)},"onChange")})})]}):null]})}),_t=bt.jsxs("div",{className:"axhub-annotation-bubble-meta",style:{display:"inline-flex",alignItems:"center",gap:8},children:[bt.jsx(Apt,{nodes:Z,activeNodeId:(ct=(cr=r==null?void 0:r.id)!=null?cr:(di=Z[0])==null?void 0:di.id)!=null?ct:null,onSelectNode:x}),Oe?bt.jsx("span",{className:"axhub-annotation-bubble-index","aria-label":`当前标注序号 ${Oe}`,title:`当前标注序号 ${Oe}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",color:Kt.textMuted,fontSize:12,fontWeight:700,lineHeight:1,fontVariantNumeric:"tabular-nums"},children:`#${Oe}`}):null,bt.jsx(p0t,{title:"关闭",icon:bt.jsx(d0t,{}),tone:"dark",onClick:Y,directAction:!0})]}),Ot={minWidth:0,padding:"14px 16px 16px"},er=bt.jsx("div",{style:{minWidth:0},children:ht.trim()?bt.jsxs("div",{className:"axhub-annotation-bubble-scroll",style:{maxHeight:360,overflowY:"auto"},children:[bt.jsx("div",{className:"axhub-annotation-bubble-md",children:bt.jsx(kde,{className:"axhub-annotation-markdown",commentTarget:!0,commentTargetId:r!=null&&r.id?`bubble-markdown-${r.id}`:"bubble-markdown",content:ht},`bubble-${($t=r==null?void 0:r.id)!=null?$t:"none"}`)}),i.length>0?bt.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginTop:10},children:i.map(Et=>bt.jsx("img",{src:Et.url,alt:Et.filename,style:{width:56,height:56,objectFit:"cover",borderRadius:10,border:`1px solid ${Kt.border}`}},Et.filename))}):null]}):bt.jsx("div",{style:{color:Kt.textMuted,fontSize:12.5,lineHeight:1.6},children:"暂无标注内容"})}),Ye=bt.jsx("div",{style:{minWidth:0},children:Je.length>0?bt.jsx(tpt,{controls:Je,state:L,compact:!0,onValueChange:V}):bt.jsx("div",{style:{color:Kt.textMuted,fontSize:12.5,lineHeight:1.6},children:"当前标注没有状态项"})}),Ut=l((Et,jt=0)=>(Et||[]).map(ir=>{const br=ir.type==="folder",tn=br&&Se.has(ir.id),Gr=ir.type==="markdown"&&ir.id===xe,Dr=!lt&&Wde(ir,g),Rr=Gr||Dr,sa=br?tn?bt.jsx(ID,{}):bt.jsx(bse,{}):ir.type==="markdown"?bt.jsx(Yue,{}):ir.type==="route"?bt.jsx(dht,{}):bt.jsx(Mft,{});return bt.jsxs("div",{className:"axhub-annotation-directory-node-wrap",children:[bt.jsxs("button",Ne(X({type:"button",className:["axhub-annotation-directory-node",Rr?"axhub-annotation-directory-node--active":""].filter(Boolean).join(" "),"data-directory-node-type":ir.type,"data-directory-node-id":ir.id},Ni),{title:ir.title,onClick:l(()=>Mt(ir),"onClick"),style:{paddingLeft:jt*14+4},children:[bt.jsx("span",{className:"axhub-annotation-directory-node__icon","aria-hidden":"true",children:sa}),bt.jsx("span",{className:"axhub-annotation-directory-node__title",children:ir.title})]})),br&&tn?bt.jsx("div",{className:"axhub-annotation-directory-children",children:Ut(ir.children,jt+1)}):null]},ir.id)}),"renderDirectoryNodes"),rt=0,vr=v==="right"?"translateX(16px)":"translateX(-16px)",en=v==="right"?"left":"right",Pn=et,ia=v==="right"?"translateX(12px)":"translateX(-12px)",Us=be?bt.jsx("div",{ref:te,className:"axhub-annotation-directory-reader",onPointerDownCapture:l(Et=>Et.stopPropagation(),"onPointerDownCapture"),style:{position:"fixed",zIndex:ge,top:0,bottom:0,[v]:Pn,[en]:0,display:"flex",flexDirection:"column",borderRadius:rt,background:Kt.surfaceMuted,borderTop:`1px solid ${Kt.borderStrong}`,borderRight:v==="left"?`1px solid ${Kt.borderStrong}`:0,borderBottom:`1px solid ${Kt.borderStrong}`,borderLeft:v==="right"?`1px solid ${Kt.borderStrong}`:0,boxShadow:"none",pointerEvents:st?"auto":"none",overflow:"hidden",opacity:st?1:0,transform:st?"translateX(0)":ia,transition:"opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1)"},children:bt.jsx("div",{ref:ee,className:"axhub-annotation-directory-reader__body","data-axhub-annotation-comment-target":"true","data-axhub-annotation-comment-target-id":be!=null&&be.id?`directory-reader-${be.id}`:"directory-reader",style:{flex:1,minHeight:0,overflowY:"auto",padding:"30px clamp(28px, 5vw, 72px)"},children:bt.jsxs("div",{className:["axhub-annotation-directory-reader__surface","axhub-annotation-directory-reader__layout",ke?"":"axhub-annotation-directory-reader__layout--compact"].filter(Boolean).join(" "),style:{display:"flex",alignItems:"flex-start",gap:iB,maxWidth:ke?le.contentWidth+le.tocWidth+iB:le.contentWidth},children:[bt.jsx("div",{className:"axhub-annotation-directory-reader__article",style:{position:"relative",width:`${le.contentWidth}px`,maxWidth:"100%",minWidth:0,flex:"1 1 auto"},children:bt.jsx(kde,{className:"axhub-annotation-markdown",commentTarget:!0,commentTargetId:`directory-markdown-${be.id}`,directoryMarkdownId:be.id,content:be.markdown||"暂无文档内容"},`directory-markdown-${be.id}`)}),ke?bt.jsx("aside",{className:"axhub-annotation-directory-reader__toc",style:{width:`${le.tocWidth}px`,flex:`0 0 ${le.tocWidth}px`},children:bt.jsx("div",{className:"axhub-annotation-directory-reader__toc-list",children:$e.map(Et=>{const jt=Et.id===_e;return bt.jsx("button",Ne(X({type:"button",className:["axhub-annotation-directory-reader__toc-item",jt?"axhub-annotation-directory-reader__toc-item--active":""].filter(Boolean).join(" "),"aria-current":jt?"location":void 0,"data-active":jt?"true":"false","data-directory-heading-id":Et.id},Ni),{onClick:l(()=>Bt(Et.id),"onClick"),style:{appearance:"none",display:"block",width:"100%",paddingTop:6,paddingRight:0,paddingBottom:6,paddingLeft:`${Math.max(0,Et.level-1)*12}px`,border:0,borderRadius:8,background:"transparent",color:jt?Kt.accent:Kt.textSecondary,cursor:"pointer",fontFamily:"inherit",fontSize:12,fontWeight:jt?700:400,lineHeight:1.5,textAlign:"left"},children:Et.title}),Et.id)})})}):null]})})}):null,lr=bt.jsx("div",{ref:re,"data-axhub-annotation-panel-target":"true","data-axhub-annotation-panel-node-id":r==null?void 0:r.id,style:Ne(X({},o0t),{position:"relative",zIndex:"auto",padding:0}),children:dt?bt.jsx(Pot,Ne(X({className:"axhub-annotation-bubble-tabs",size:"small",defaultActiveKey:"annotation"},Ni),{tabBarStyle:{margin:0,minHeight:42,padding:"0 16px"},tabBarExtraContent:{right:_t},items:[{key:"annotation",label:"内容",forceRender:!0,children:bt.jsx("div",{style:Ot,children:er})},{key:"debug",label:"状态",forceRender:!0,children:bt.jsx("div",{style:Ot,children:Ye})}]})):bt.jsxs(bt.Fragment,{children:[bt.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",minHeight:42,padding:"0 16px",borderBottom:`1px solid ${Kt.divider}`},children:_t}),bt.jsx("div",{style:Ot,children:He&&!St?Ye:er})]})});return bt.jsxs(bt.Fragment,{children:[bt.jsx("style",{children:s0t}),st?Us:null,qe?bt.jsxs("div",{className:"axhub-annotation-toolbar-root","data-edge":v,"data-auto-hide":b?"true":"false",style:{display:"contents"},children:[Me?wt:null,Ht,Tt?bt.jsx("div",{className:"axhub-annotation-edge-toolbar-hover-zone","data-edge":v,"aria-label":"显示标注工具栏",onMouseEnter:Nt,style:{position:"fixed",top:"50%",[v]:0,zIndex:ge,width:18,height:132,transform:"translateY(-50%)",pointerEvents:"auto",background:"transparent"}}):null,bt.jsxs("div",{ref:de,className:"axhub-annotation-edge-toolbar","data-auto-hide-visible":Pe?"true":"false",onMouseEnter:Nt,onMouseLeave:zt,style:{position:"fixed",top:"50%",[v]:0,zIndex:ge,display:"inline-flex",flexDirection:"column",alignItems:"center",gap:4,padding:"6px 4px",borderRadius:v==="right"?"12px 0 0 12px":"0 12px 12px 0",background:Kt.surfaceOverlay,borderTop:`1px solid ${Kt.borderStrong}`,borderRight:v==="left"?`1px solid ${Kt.borderStrong}`:0,borderBottom:`1px solid ${Kt.borderStrong}`,borderLeft:v==="right"?`1px solid ${Kt.borderStrong}`:0,boxShadow:"none",pointerEvents:"auto",transform:yt,transition:"transform 160ms ease"},children:[ut?bt.jsx(Ml,{title:"原型目录",placement:v==="right"?"left":"right",getPopupContainer:Gc,children:bt.jsx(wh,Ne(X({type:"text",size:"small",className:"axhub-annotation-edge-button","aria-label":"原型目录",title:"原型目录"},Ni),{icon:bt.jsx(qft,{}),onClick:l(()=>{C==null||C(!0),ye(!1),ce(!1),T==null||T(null)},"onClick")}))}):null,Me?bt.jsx("div",{ref:fe,className:"axhub-annotation-config-trigger","data-open":Qe?"true":"false",style:{position:"relative",display:"inline-flex"},children:bt.jsx(Ml,{title:"标注配置",placement:v==="right"?"left":"right",getPopupContainer:Gc,children:bt.jsx(wh,Ne(X({type:"text",size:"small",className:"axhub-annotation-edge-button","aria-label":"标注配置","aria-expanded":Qe,title:"标注配置"},Ni),{icon:bt.jsx(Tft,{}),onPointerDown:l(Et=>Et.stopPropagation(),"onPointerDown"),onClick:l(()=>{ye(Et=>!Et),ce(!1)},"onClick")}))})}):null,Ue?bt.jsx("div",Ne(X({className:"axhub-annotation-toolbar-action-slot"},Ni),{onPointerDown:l(Et=>Et.stopPropagation(),"onPointerDown"),children:it.map((Et,jt)=>bt.jsx(Spt,{entry:Et,toolbarEdge:v,index:jt},`toolbar-action-${jt}`))})):null,we?bt.jsx(Ml,{title:gt,placement:v==="right"?"left":"right",getPopupContainer:Gc,children:bt.jsx(wh,Ne(X({type:"text",size:"small",className:"axhub-annotation-edge-button axhub-annotation-source-trigger","aria-label":"源码能力",title:gt},Ni),{icon:bt.jsx(gft,{})}))}):null,bt.jsx("div",{ref:ae,className:"axhub-annotation-settings-trigger","data-open":Ze?"true":"false",style:{position:"relative",display:"inline-flex"},children:bt.jsx(Ml,{title:"设置",placement:v==="right"?"left":"right",getPopupContainer:Gc,children:bt.jsx(wh,Ne(X({type:"text",size:"small",className:"axhub-annotation-edge-button","aria-label":"设置","aria-expanded":Ze,title:"设置"},Ni),{icon:bt.jsx(sde,{}),onPointerDown:l(Et=>Et.stopPropagation(),"onPointerDown"),onClick:l(()=>{ce(Et=>!Et),ye(!1)},"onClick")}))})})]})]}):null,st?bt.jsxs("div",{ref:Q,className:"axhub-play-client-global-panel","data-axhub-annotation-comment-target":"true","data-axhub-annotation-comment-target-id":"directory-panel",style:{position:"fixed",zIndex:ge,top:0,bottom:0,[v]:0,width:et,minWidth:Fde,maxWidth:Bde,display:"flex",flexDirection:"column",borderRadius:rt,background:Kt.surface,borderTop:`1px solid ${Kt.borderStrong}`,borderRight:v==="left"?`1px solid ${Kt.borderStrong}`:0,borderBottom:`1px solid ${Kt.borderStrong}`,borderLeft:v==="right"?`1px solid ${Kt.borderStrong}`:0,boxShadow:"none",pointerEvents:st?"auto":"none",overflow:"hidden",opacity:st?1:0,transform:st?"translateX(0)":vr,transformOrigin:`top ${v}`,transition:tt?"none":"width 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1)"},children:[bt.jsx("div",{ref:J,className:"we-runtime-prop-panel__resize-handle","data-edge":v,"data-we-no-drag":"true","data-resizing":tt?"true":"false","aria-label":"调整全局属性面板宽度",role:"separator","aria-orientation":"vertical"}),bt.jsxs("div",{className:"we-runtime-prop-panel__drag-handle axhub-play-client-global-panel__header",style:{minHeight:40,padding:"0 14px 0 16px",display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,borderBottom:`1px solid ${Kt.divider}`},children:[bt.jsx(Hd.Text,{strong:!0,style:{color:Kt.textPrimary},children:"原型目录"}),bt.jsxs(lc,{align:"center",gap:4,onPointerDownCapture:l(Et=>Et.stopPropagation(),"onPointerDownCapture"),children:[bt.jsx(wh,Ne(X({type:"text",size:"small",className:["we-runtime-prop-panel__header-action",We?"we-runtime-prop-panel__header-action--active":""].filter(Boolean).join(" "),"aria-label":"页面缩放模式",title:"页面缩放模式"},Ni),{icon:bt.jsx(Xhe,{}),onClick:l(()=>me(Et=>!Et),"onClick")})),bt.jsx(wh,Ne(X({type:"text",size:"small",className:"we-runtime-prop-panel__header-action","aria-label":"关闭",title:"关闭"},Ni),{icon:bt.jsx(T0,{}),onClick:l(()=>{C==null||C(!1),ye(!1),ce(!1),T==null||T(null)},"onClick")}))]})]}),bt.jsx("div",{className:"we-runtime-prop-panel__drag-handle",style:{position:"relative",flex:1,minHeight:0,overflowY:"auto",overflowX:"hidden",padding:"2px 14px 10px",display:"flex",flexDirection:"column",gap:2,scrollbarWidth:"none",msOverflowStyle:"none"},children:bt.jsx("div",{onPointerDownCapture:l(Et=>Et.stopPropagation(),"onPointerDownCapture"),children:bt.jsx("div",{className:"we-runtime-prop-panel__body",style:{gap:8,minHeight:12},children:je.length?bt.jsx("div",{className:"axhub-annotation-directory-tree","data-axhub-annotation-comment-target":"true","data-axhub-annotation-comment-target-id":"directory-tree",children:Ut(je)}):bt.jsx("div",{className:"axhub-annotation-directory-empty","data-axhub-annotation-comment-target":"true","data-axhub-annotation-comment-target-id":"directory-empty",children:"暂无目录内容"})})})})]}):null,e?bt.jsx(Dle,{ref:K,open:ot,trigger:[],placement:Ge,autoAdjustOverflow:!0,arrow:!1,destroyOnHidden:!0,getPopupContainer:Gc,classNames:{root:"axhub-annotation-bubble-popover",content:"axhub-annotation-bubble-popover__content"},styles:{root:{zIndex:ie},container:{padding:0,background:"transparent",boxShadow:"none"},content:{padding:0}},content:lr,children:bt.jsx("div",{"aria-hidden":"true",className:"axhub-annotation-bubble-trigger",style:{position:"fixed",left:e.left,top:e.top,width:e.width,height:e.height,pointerEvents:"none",opacity:0,background:"transparent"}})}):null]})}l(Npt,"AnnotationShell");function SA(t){return String(t||"").trim().toLowerCase()}l(SA,"normalizeColorToken2");function Yde(t){return String(t||"").trim()}l(Yde,"normalizePageToken");function Ude(t,e){return t.updatedAt!==e.updatedAt?e.updatedAt-t.updatedAt:t.createdAt!==e.createdAt?e.createdAt-t.createdAt:String(e.id).localeCompare(String(t.id))}l(Ude,"compareAnnotationNodeRecency");function jS(t){const e=new Map;for(const r of t){const n=_dt(r.locator),a=e.get(n);a?a.push(r):e.set(n,[r])}return Array.from(e.entries()).map(([r,n])=>({id:r,nodes:[...n].sort(Ude)})).sort((r,n)=>Ude(r.nodes[0],n.nodes[0]))}l(jS,"buildAnnotationNodeGroups");function Ipt(t,e){const r=Yde(e);if(!r)return!0;const a=(Array.isArray(t.pageId)?t.pageId:[t.pageId]).map(Yde).filter(Boolean);return a.length===0?!0:a.includes(r)}l(Ipt,"annotationNodeMatchesPage");function gB(t,e){return t.filter(r=>Ipt(r,e))}l(gB,"filterAnnotationNodesByPage");function Lpt(t,e){if(!e)return[];const r=SA(e),n=[...t],a=n.findIndex(i=>SA(i)===r);return a>=0?(n.splice(a,1),n):(n.push(e),n)}l(Lpt,"toggleAnnotationColorFilter");function jde(t,e){if(e.length===0)return!0;const r=SA(t);return e.some(n=>SA(n)===r)}l(jde,"matchesAnnotationColorFilter");function KS(t,e){return e?t:[]}l(KS,"resolveEffectiveAnnotationColorFilter");function $pt(t,e){return{selectedId:e?null:t.selectedId,previewedId:e}}l($pt,"applyAnnotationPreviewRequest");function Mpt(t,e){return{selectedId:e,previewedId:null}}l(Mpt,"applyAnnotationSelectionRequest");function Ppt(t,e){return{selectedId:t.selectedId===e?null:e,previewedId:null}}l(Ppt,"applyAnnotationMarkerClickRequest");var Kde="## 标注 ";function Rpt(t){return`→ [详细标注](annotations/${t}.md)`}l(Rpt,"buildDetailLink");function Opt(t,e){const n=Rpt(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return e.replace(new RegExp(`\\n?${n}\\s*$`),"").trim()}l(Opt,"stripDetailLink");function Dpt(t){const e=String(t||"").replace(/\r\n/g,`
|
||
`);if(!e.trim())return{};const r={},n=e.split(/\n(?=## 标注 )/g).map(a=>a.trim()).filter(Boolean);for(const a of n){const i=a.split(`
|
||
`),s=i.shift()||"";if(!s.startsWith(Kde))continue;const o=s.slice(Kde.length).trim();if(!o)continue;const u=i.join(`
|
||
`).replace(/\n---\s*$/u,"").trim();r[o]=Opt(o,u)}return r}l(Dpt,"parseAnnotationsMarkdown");function Xde(t){if(!t||typeof t!="object")return!1;const e=t;return e.documentVersion===1&&e.format==="axhub-annotation-source"}l(Xde,"isAnnotationSourceDocument");function Zde(t){if(t.type==="folder")return Ne(X({},t),{children:Array.isArray(t.children)?t.children.map(Zde):void 0});if(t.type==="markdown"){const e=t,{markdownRef:r}=e;return Xt(e,["markdownRef"])}return t}l(Zde,"normalizeDirectoryNode");function Fpt(t){if(t)return Ne(X({},t),{nodes:Array.isArray(t.nodes)?t.nodes.map(Zde):[]})}l(Fpt,"normalizeDirectory");function Qde(t){return(t||[]).some(e=>e.type==="folder"?Qde(e.children):e.type==="markdown"&&"markdownRef"in e)}l(Qde,"hasRemovedDirectoryMarkdownRefs");function Jde(t){return nt(this,null,function*(){var r;if(!t)return null;if(!Xde(t)&&!("markdownRefs"in t)&&!Qde((r=t.directory)==null?void 0:r.nodes))return t;const e=Xde(t)?{data:t.data,markdownMap:t.markdownMap,assetMap:t.assetMap,directory:t.directory}:{data:t.data,markdownMap:t.markdownMap,assetMap:t.assetMap,directory:t.directory};return Ne(X({},e),{directory:Fpt(e.directory)})})}l(Jde,"normalizeLoadedSource");function efe(t){return nt(this,null,function*(){try{return typeof t=="function"?Jde(yield t()):!t||typeof t!="object"?null:Jde(t)}catch(e){return null}})}l(efe,"loadAnnotationSource");function mB(){return typeof window=="undefined"?void 0:window}l(mB,"resolveWindow");function Kx(t,e=new WeakMap){if(!t||typeof t!="object")return t;if(e.has(t))return e.get(t);if(Array.isArray(t)){const n=[];return e.set(t,n),t.forEach(a=>{n.push(Kx(a,e))}),n}const r={};return e.set(t,r),Object.entries(t).forEach(([n,a])=>{r[n]=Kx(a,e)}),r}l(Kx,"clonePlainValue");function tfe(t){return t.type==="folder"?Ne(X({},t),{children:Array.isArray(t.children)?t.children.map(tfe):void 0}):t.type==="route"?Ne(X({},t),{payload:Kx(t.payload)}):X({},t)}l(tfe,"cloneDirectoryNode");function Bpt(t){return t?Ne(X({},t),{nodes:Array.isArray(t.nodes)?t.nodes.map(tfe):[]}):null}l(Bpt,"cloneDirectory");function zpt(t){return Ne(X({},t),{pageId:Array.isArray(t.pageId)?[...t.pageId]:t.pageId,locator:Kx(t.locator),images:Array.isArray(t.images)?[...t.images]:[],controls:Array.isArray(t.controls)?t.controls.map(e=>Kx(e)):t.controls})}l(zpt,"cloneAnnotationNode");function Hpt(t){const e=String((t==null?void 0:t.root)||"").trim(),r=String((t==null?void 0:t.manifest)||"").trim();if(!(!e&&!r))return X(X({},e?{root:e}:{}),r?{manifest:r}:{})}l(Hpt,"cloneSourceReference");function Wpt(t,e,r){const n={directory:Bpt(t),nodes:e.map(zpt)},a=Hpt(r);return a&&(n.source=a),n}l(Wpt,"createAnnotationSourceRuntimeSnapshot");function Vpt(t,e,r,n=mB()){n&&(n.__AXHUB_ANNOTATION_SOURCE__=Wpt(t,e,r))}l(Vpt,"publishAnnotationSourceRuntimeSnapshot");function Gpt(t,e=mB()){if(e){if(!t){delete e.__AXHUB_ANNOTATION_SOURCE_DOCUMENT__;return}e.__AXHUB_ANNOTATION_SOURCE_DOCUMENT__=Kx(t)}}l(Gpt,"publishAnnotationSourceRuntimeDocument");function rfe(t=mB()){t&&(delete t.__AXHUB_ANNOTATION_SOURCE__,delete t.__AXHUB_ANNOTATION_SOURCE_DOCUMENT__)}l(rfe,"clearAnnotationSourceRuntimeSnapshot");var yB="__AXHUB_ANNOTATION_RUNTIME__",qpt=["toolbar-actions","runtime-config","runtime-metadata"];function nfe(){return typeof window=="undefined"?void 0:window}l(nfe,"resolveWindow2");function Ypt(t){return{packageName:"@axhub/annotation",runtimeVersion:1,currentPageId:t.currentPageId,annotationCount:t.annotationCount,toolbarVisible:t.toolbarVisible,toolbarAutoHide:t.toolbarAutoHide,toolbarActionsRegistered:t.toolbarActionsRegistered,features:[...qpt]}}l(Ypt,"createMetadata");function Upt(t){const e={get metadata(){return e.getMetadata()},getMetadata(){return Ypt(t.getMetadata())},replaceSource(r){return t.replaceSource(r)},refresh(){return t.refresh()},configure(r){typeof r.toolbarAutoHide=="boolean"&&t.setToolbarAutoHide(r.toolbarAutoHide),"toolbarActions"in r&&(r.toolbarActions==null?t.clearToolbarActions():t.setToolbarActions(r.toolbarActions)),"renderToolbarActions"in r&&(r.renderToolbarActions==null?t.clearToolbarActions():t.setToolbarActionsRenderer(r.renderToolbarActions))},setToolbarAutoHide(r){t.setToolbarAutoHide(r)},setToolbarActions(r){t.setToolbarActions(r)},clearToolbarActions(){t.clearToolbarActions()}};return e}l(Upt,"createAnnotationRuntimeController");function jpt(t,e=nfe()){e&&(e[yB]=t)}l(jpt,"installAnnotationRuntimeController");function Kpt(t,e=nfe()){e&&e[yB]===t&&delete e[yB]}l(Kpt,"uninstallAnnotationRuntimeController");var afe="axhub-annotation-theme-mode",ife="axhub-annotation-toolbar-edge",sfe="axhub-annotation-toolbar-auto-hide",Xpt={showToolbar:!0,showThemeToggle:!0,showColorFilter:!0,showBrandLink:!0,emptyWhenNoData:!1};function Zpt(){if(typeof window=="undefined")return"light";try{return window.localStorage.getItem(afe)==="dark"?"dark":"light"}catch(t){return"light"}}l(Zpt,"readInitialThemeMode");function ofe(t){return t==="left"||t==="right"?t:null}l(ofe,"normalizeToolbarEdge");function Qpt(t){var r;const e=ofe(t);if(e)return e;if(typeof window=="undefined")return"right";try{return(r=ofe(window.localStorage.getItem(ife)))!=null?r:"right"}catch(n){return"right"}}l(Qpt,"readInitialToolbarEdge");function Jpt(t){if(typeof t=="boolean")return t;if(typeof window=="undefined")return!1;try{return window.localStorage.getItem(sfe)==="true"}catch(e){return!1}}l(Jpt,"readInitialToolbarAutoHide");function lfe(){return{version:2,prototypeName:"",pageId:"",nodes:[],updatedAt:Date.now()}}l(lfe,"createEmptyData");function vB(){return{selectedNode:null,previewedNodeId:null,currentTarget:null,anchorRect:null,annotationText:"",images:[]}}l(vB,"createEmptyUiState");function cfe(t){return Ne(X({},t),{nodes:t.nodes.map(e=>Ne(X({},e),{images:[...e.images],controls:Array.isArray(e.controls)?[...e.controls]:[]}))})}l(cfe,"cloneData");function ufe(t){return Ne(X({},t),{images:t.images.map(e=>X({},e))})}l(ufe,"cloneUiState");function egt(t){return String(t||"").trim().toLowerCase()}l(egt,"normalizeColorToken3");function _A(t,e){return e.length===0?t.map(r=>({id:r.id,nodes:[...r.nodes]})):t.map(r=>({id:r.id,nodes:r.nodes.filter(n=>jde(n.color,e))})).filter(r=>r.nodes.length>0)}l(_A,"filterAnnotationNodeGroups");function hfe(t,e){var r;return e&&(r=t.find(n=>n.nodes.some(a=>a.id===e)))!=null?r:null}l(hfe,"findGroupByNodeId");function dfe(t,e,r){var i,s;const n=hfe(t,e);if(!n)return null;const a=n.nodes.filter(o=>jde(o.color,r));return a.length===0?null:a.some(o=>o.id===e)?e:(s=(i=a[0])==null?void 0:i.id)!=null?s:null}l(dfe,"resolveVisibleNodeIdWithinGroup");function tgt(t){return t.map((e,r)=>Ne(X({},e),{index:r+1}))}l(tgt,"reindexNodes");function rgt(t){if(Array.isArray(t)){const r=t.map(n=>String(n||"").trim()).filter(Boolean);return r.length>0?r:void 0}return String(t||"").trim()||void 0}l(rgt,"normalizeAnnotationNodePageId");function ngt(t){return!t||t.version!==2?lfe():Ne(X({},t),{nodes:tgt((Array.isArray(t.nodes)?t.nodes:[]).map((e,r)=>Ne(X({},e),{index:r+1,title:String(e.title||"").trim()||void 0,pageId:rgt(e.pageId),aiPrompt:String(e.aiPrompt||"").trim(),annotationText:String(e.annotationText||"").trim(),hasMarkdown:!!e.hasMarkdown,color:e.color||Kft,images:Array.isArray(e.images)?[...e.images]:[],controls:Lde(Array.isArray(e.controls)?e.controls:[])}))),updatedAt:typeof t.updatedAt=="number"?t.updatedAt:Date.now()})}l(ngt,"normalizeLoadedData");function agt(t,e={}){return Ne(X({},t),{nodes:t.nodes.map(r=>r.hasMarkdown?Ne(X({},r),{annotationText:String(e[r.id]||"").trim(),images:[]}):r)})}l(agt,"resolveAnnotationDataContent");function igt(t){return"storage"in t}l(igt,"isLegacyConfig");function sgt(t){return()=>nt(this,null,function*(){const[e,r]=yield Promise.all([t.storage.load(),t.storage.loadAnnotationsMd()]),n=Dpt(r),a=e?Ne(X({},e),{prototypeName:t.prototypeName,pageId:t.pageId,nodes:Array.isArray(e.nodes)?e.nodes.map((u,h)=>Ne(X({},u),{index:h+1,title:String(u.title||"").trim()||void 0,annotationText:String(u.annotationText||"").trim()||n[u.id]||""})):[]}):null,i=Array.isArray(a==null?void 0:a.nodes)?a.nodes.filter(u=>u.hasMarkdown).map(u=>u.id):[],s=yield Promise.all(i.map(u=>nt(this,null,function*(){return[u,yield t.storage.loadMarkdown(u)]}))),o=Object.fromEntries(Array.from(new Set(Array.isArray(a==null?void 0:a.nodes)?a.nodes.flatMap(u=>Array.isArray(u.images)?u.images:[]):[])).map(u=>[u,t.storage.getAssetUrl(u)]));return{data:a,markdownMap:Object.fromEntries(s.filter(u=>typeof u[1]=="string").map(([u,h])=>[u,h])),assetMap:o}})}l(sgt,"createLegacySourceLoader");function ogt(t){var Ae,Ve,ze;const e=new Set,r=new Set,n=X(X({},Xpt),t.options),a=igt(t)?sgt(t):t.source;let i=null,s=null,o=null,u=null,h=null,d=null,f=null,p=null,g=null,m={},y=null,v=0,b=null,w=!0,x=!!((Ae=t.options)!=null&&Ae.defaultMarkerIndexVisible),T=!1,C=null,S=Qpt((Ve=t.options)==null?void 0:Ve.toolbarEdge),E=Jpt((ze=t.options)==null?void 0:ze.toolbarAutoHide),k=null,A=null,I=0;const L=l(me=>!!(String((me==null?void 0:me.root)||"").trim()||String((me==null?void 0:me.manifest)||"").trim()),"hasSourceReference"),R=l(()=>{const me=typeof window!="undefined"?window.__AXHUB_ANNOTATION_SOURCE_REFERENCE__:void 0;return L(me)?me:L(n.sourceReference)?n.sourceReference:null},"resolveSourceReference");let O=vB(),M=Zpt(),P={active:!1,data:lfe(),selectedId:null,colorFilter:[],colorFilterEnabled:!1,loading:!1},z={state:D(),uiState:ufe(O),currentPageId:null,themeMode:M,markersVisible:w,directoryPanelOpen:T,toolbarEdge:S,toolbarAutoHide:E,markerIndexVisible:x,shadowRoot:null,uiContainer:null,directory:y,sourceReference:R()};function D(){return Ne(X({},P),{data:cfe(P.data)})}l(D,"getStateSnapshotPlaceholder");const B=l(()=>Ne(X({},P),{data:cfe(P.data)}),"getStateSnapshot"),W=l(()=>{var me,Se;z={state:B(),uiState:ufe(O),currentPageId:q(),themeMode:M,markersVisible:w,directoryPanelOpen:T,toolbarEdge:S,toolbarAutoHide:E,markerIndexVisible:x,shadowRoot:(me=s==null?void 0:s.shadowRoot)!=null?me:null,uiContainer:(Se=s==null?void 0:s.uiRoot)!=null?Se:null,directory:y,sourceReference:R()}},"refreshRuntimeSnapshot"),U=l(()=>z,"getRuntimeSnapshot"),j=l(()=>{const me=B();e.forEach(Se=>Se(me))},"emitState"),V=l(()=>{W(),r.forEach(me=>me())},"emitUi"),Y=l(()=>{j(),V()},"emitAll"),H=l(me=>{var Se;return me&&(Se=P.data.nodes.find(ne=>ne.id===me))!=null?Se:null},"getNodeById"),q=l(()=>{const me=typeof n.currentPageId=="string"&&n.currentPageId.trim()?n.currentPageId.trim():null;if(typeof n.getCurrentPageId=="function"){const Se=n.getCurrentPageId();return typeof Se=="string"&&Se.trim()?Se.trim():me}return me},"resolveCurrentPageId"),Z=l(()=>gB(P.data.nodes,q()),"getVisibleNodesForCurrentPage"),K=l(me=>{if(!me)return null;try{return t.resolveElement?t.resolveElement(me.locator):Sdt(me.locator)}catch(Se){return null}},"resolveElement"),re=l(()=>nt(this,null,function*(){var Xe,ot;const me=++v,Se=Z(),ne=new Set(Se.map(Ge=>Ge.id));P.selectedId&&!ne.has(P.selectedId)&&(P=Ne(X({},P),{selectedId:null}),j()),b&&!ne.has(b)&&(b=null);const xe=H(P.selectedId),oe=xe?null:H(b),_e=KS(P.colorFilter,P.colorFilterEnabled),ue=_A(jS(Se),_e),tt=xe?K(xe):null,Re=oe?K(oe):null,et=C==="comment-bridge"?null:tt;if(u==null||u.setHoverElement(Re!=null?Re:null),u==null||u.setSelectionElement(et!=null?et:null),u==null||u.forceUpdate(!0),xe){if(me!==v)return;O={selectedNode:xe,previewedNodeId:null,currentTarget:tt,anchorRect:(Xe=tt==null?void 0:tt.getBoundingClientRect())!=null?Xe:null,annotationText:xe.annotationText,images:xe.images.map(Ge=>({filename:Ge,url:m[Ge]||""}))}}else O=Ne(X({},vB()),{previewedNodeId:(ot=oe==null?void 0:oe.id)!=null?ot:null});h==null||h.update(ue,w,x),o==null||o.markDirty(),V()}),"syncUiState"),Q=l(me=>{const Se=Lpt(P.colorFilter,me),ne=!!me,xe=KS(Se,ne),oe=jS(Z());P=Ne(X({},P),{colorFilter:Se,colorFilterEnabled:ne,selectedId:dfe(oe,P.selectedId,xe)}),P.selectedId?b=null:b=dfe(oe,b,xe),j(),re()},"handleColorFilterChange"),te=l(me=>{w!==me&&(w=me,h==null||h.update(_A(jS(Z()),KS(P.colorFilter,P.colorFilterEnabled)),w,x),o==null||o.markDirty(),V())},"handleMarkersVisibleChange"),ee=l(me=>{x!==me&&(x=me,h==null||h.update(_A(jS(Z()),KS(P.colorFilter,P.colorFilterEnabled)),w,x),o==null||o.markDirty(),V())},"handleMarkerIndexVisibleChange"),J=l(me=>{if(E!==me){E=me;try{window.localStorage.setItem(sfe,me?"true":"false")}catch(Se){}V()}},"setRuntimeToolbarAutoHide"),ae=l(me=>{k=me,A=null,V()},"setRuntimeToolbarActions"),se=l(me=>{k=null,A=me,V()},"setRuntimeToolbarActionsRenderer"),fe=l(()=>{k=null,A=null,V()},"clearRuntimeToolbarActions"),ve=l(me=>{if(M!==me){M=me;try{window.localStorage.setItem(afe,me)}catch(Se){}V()}},"handleThemeModeChange"),de=l(me=>{const Se=Ppt({selectedId:P.selectedId},me),ne=P.selectedId!==Se.selectedId;P=Ne(X({},P),{selectedId:Se.selectedId}),b=Se.previewedId,ne&&j(),re()},"handleAnnotationMarkerActivate"),Ee=l(me=>{var xe;const Se=(xe=s==null?void 0:s.shadowRoot)!=null?xe:null;if(!Se)return null;const ne=typeof CSS!="undefined"&&typeof CSS.escape=="function"?CSS.escape(me):me.replace(/["\\]/g,"\\$&");return Se.querySelector(`[${zhe}="true"][${Hhe}="${ne}"]`)},"getCommentBridgePanelTarget"),Ce=l(me=>(r.add(me),()=>{r.delete(me)}),"subscribeUi"),De=l((me,Se)=>{var _e;const ne=agt(ngt((_e=me==null?void 0:me.data)!=null?_e:null),(me==null?void 0:me.markdownMap)||{}),xe=ne.nodes.flatMap(ue=>Array.isArray(ue.controls)?ue.controls:[]);xe.length>0&&$0t(xe);const oe=ne.nodes.length>0||Object.keys((me==null?void 0:me.markdownMap)||{}).length>0||(Se==null?void 0:Se.activateEmpty)===!0;return m=X({},(me==null?void 0:me.assetMap)||{}),y=(me==null?void 0:me.directory)||null,Vpt(y,ne.nodes,R()),Gpt(me),P=Ne(X({},P),{active:oe,loading:!1,data:ne,selectedId:ne.nodes.some(ue=>ue.id===P.selectedId)?P.selectedId:null}),P.selectedId||(b=ne.nodes.some(ue=>ue.id===b)?b:null),{normalizedData:ne,hasContent:oe}},"applyLoadedSource"),ce=l(()=>Upt({getMetadata:l(()=>{const me=q();return{currentPageId:me,annotationCount:gB(P.data.nodes,me).length,toolbarVisible:n.showToolbar,toolbarAutoHide:E,toolbarActionsRegistered:k!=null||typeof A=="function"||typeof n.renderToolbarActions=="function"}},"getMetadata"),setToolbarAutoHide:J,setToolbarActions:ae,setToolbarActionsRenderer:se,clearToolbarActions:fe,replaceSource:l(me=>nt(this,null,function*(){yield pe.replaceSource(me)}),"replaceSource"),refresh:l(()=>{pe.refresh()},"refresh")}),"createRuntimeController"),Ie=l(()=>{var ot,Ge,ht,Je,St;const me=N.useSyncExternalStore(Ce,U,U),Se=M0t(),ne=N.useMemo(()=>r9(),[]),xe=N.useRef(null),oe=N.useMemo(()=>gB(me.state.data.nodes,me.currentPageId),[me.currentPageId,me.state.data.nodes]),_e=N.useMemo(()=>{const He=new Set;return oe.map(dt=>String(dt.color||"").trim()).filter(dt=>{const Oe=egt(dt);return!Oe||He.has(Oe)?!1:(He.add(Oe),!0)})},[oe]),ue=N.useMemo(()=>_A(jS(oe),KS(me.state.colorFilter,me.state.colorFilterEnabled)),[oe,me.state.colorFilter,me.state.colorFilterEnabled]),tt=N.useMemo(()=>{var He,dt;return hfe(ue,(dt=(He=me.uiState.selectedNode)==null?void 0:He.id)!=null?dt:null)},[ue,me.uiState.selectedNode]),Re=typeof((ot=t.options)==null?void 0:ot.zIndex)=="number"?Math.max(t.options.zIndex+80,nB+20):nB+20,et={currentPageId:me.currentPageId,annotationCount:oe.length,toolbarEdge:me.toolbarEdge},Xe=(Je=(ht=k!=null?k:A==null?void 0:A(et))!=null?ht:(Ge=n.renderToolbarActions)==null?void 0:Ge.call(n,{currentPageId:me.currentPageId,annotationCount:oe.length,toolbarEdge:me.toolbarEdge}))!=null?Je:null;return me.shadowRoot?bt.jsx(PYe,{cache:ne,container:me.shadowRoot,children:bt.jsx(y6,{componentSize:"small",getPopupContainer:l(He=>{var dt,Oe;return c0t(He,(Oe=(dt=xe.current)!=null?dt:me.uiContainer)!=null?Oe:document.body)},"getPopupContainer"),theme:a0t(me.themeMode),children:bt.jsx(wnt,{children:bt.jsxs("div",{style:X({position:"fixed",inset:0,pointerEvents:"none","--we-runtime-popup-layer-z-index":String(Re),"--we-runtime-popup-layer-z-index-strong":String(Re+20)},n0t(me.themeMode)),children:[bt.jsx(Npt,{anchorRect:me.uiState.anchorRect,selectedNode:me.uiState.selectedNode,previewedNodeId:me.uiState.previewedNodeId,currentTarget:me.uiState.currentTarget,annotationText:me.uiState.annotationText,images:me.uiState.images,colorFilter:me.state.colorFilter,availableFilterColors:_e,annotationCount:oe.length,annotationNodeGroups:ue,selectedNodeGroup:tt,markersVisible:me.markersVisible,markerIndexVisible:me.markerIndexVisible,directoryPanelOpen:me.directoryPanelOpen,toolbarEdge:me.toolbarEdge,toolbarAutoHide:me.toolbarAutoHide,directory:me.directory,sourceReference:me.sourceReference,currentPageId:me.currentPageId,themeMode:me.themeMode,protoState:Se,toolbarActions:Xe,showToolbar:n.showToolbar,showThemeToggle:n.showThemeToggle,showColorFilter:n.showColorFilter,showBrandLink:n.showBrandLink,zIndex:(St=t.options)==null?void 0:St.zIndex,onThemeModeChange:ve,onColorFilterChange:Q,onMarkersVisibleChange:te,onMarkerIndexVisibleChange:ee,onSelectAnnotation:l(He=>{pe.selectAnnotation(He)},"onSelectAnnotation"),onDirectoryPanelOpenChange:l(He=>{T!==He&&(T=He,He||(b=null),V())},"onDirectoryPanelOpenChange"),onToolbarEdgeChange:l(He=>{if(S!==He){S=He;try{window.localStorage.setItem(ife,He)}catch(dt){}V()}},"onToolbarEdgeChange"),onToolbarAutoHideChange:l(He=>{J(He)},"onToolbarAutoHideChange"),onPreviewAnnotation:l(He=>{const dt=$pt({selectedId:P.selectedId},He),Oe=P.selectedId!==dt.selectedId;P=Ne(X({},P),{selectedId:dt.selectedId}),b=dt.previewedId,Oe&&j(),re()},"onPreviewAnnotation"),onRequestExit:l(()=>{queueMicrotask(()=>{pe.stop()})},"onRequestExit"),onDirectoryRoute:n.onDirectoryRoute,onProtoValueChange:l((He,dt)=>{Pde({[He]:dt})},"onProtoValueChange"),onCloseCard:l(()=>{pe.selectAnnotation(null)},"onCloseCard")}),bt.jsx("div",{ref:xe,style:i0t(Re),[lde]:"true"})]})})})}):null},"RuntimeApp"),ye=l(me=>{P.active&&me.key==="Escape"&&pe.selectAnnotation(null)},"handleKeyDown"),pe={start(){return nt(this,null,function*(){var oe;if(P.active)return;const me=++I;P=Ne(X({},P),{loading:!0}),Y();const Se=yield efe(a);if(me!==I){P=Ne(X({},P),{loading:!1,active:!1}),Y();return}const{normalizedData:ne,hasContent:xe}=De(Se,{activateEmpty:n.emptyWhenNoData});if(!xe&&!n.emptyWhenNoData){rfe(),P=Ne(X({},P),{loading:!1,active:!1,data:ne}),Y();return}if(w=!0,x=!!((oe=t.options)!=null&&oe.defaultMarkerIndexVisible),P=Ne(X({},P),{active:!0,loading:!1,data:ne}),i=Hdt(),s=i.getElements(),!s)throw new Error("annotation-shadow-host-mount-failed");o=Bdt({container:s.overlayRoot}),u=Dhe({onPositionUpdate:l(_e=>{o==null||o.setHoverRect(_e.hover),o==null||o.setSelectionRect(_e.selection),O=Ne(X({},O),{anchorRect:_e.selection}),V()},"onPositionUpdate")}),h=oft({container:s.overlayRoot,resolveNodeElement:K,onSelect:de}),d=Qdt({selectAnnotation:l((_e,ue)=>{pe.selectAnnotation(_e,ue)},"selectAnnotation"),getPanelTarget:Ee}),Jdt(d),f=ce(),jpt(f),g=document.createElement("div"),g.style.position="fixed",g.style.inset="0",g.style.pointerEvents="none",g.style.background="transparent",s.uiRoot.append(g),p=yg(g),p.render(bt.jsx(Ie,{})),window.addEventListener("keydown",ye,!0),yield re(),j()})},stop(){var me;I+=1,!(!P.active&&!p&&!i)&&(window.removeEventListener("keydown",ye,!0),p==null||p.unmount(),g==null||g.remove(),d&&eft(d),f&&Kpt(f),h==null||h.dispose(),u==null||u.dispose(),o==null||o.dispose(),i==null||i.dispose(),p=null,g=null,h=null,d=null,f=null,u=null,o=null,i=null,s=null,m={},w=!0,x=!!((me=t.options)!=null&&me.defaultMarkerIndexVisible),T=!1,C=null,k=null,A=null,rfe(),P=Ne(X({},P),{active:!1,selectedId:null,colorFilter:[],colorFilterEnabled:!1}),b=null,O=vB(),Y())},getState(){return B()},subscribe(me){return e.add(me),me(pe.getState()),()=>{e.delete(me)}},refresh(){re()},replaceSource(me){return nt(this,null,function*(){const Se=yield efe(me);if(P.active||(P=Ne(X({},P),{loading:!1})),De(Se,{activateEmpty:!0}),!p||!i){Y();return}yield re(),j()})},selectAnnotation(me,Se){const ne=Mpt({selectedId:P.selectedId},me);P=Ne(X({},P),{selectedId:ne.selectedId}),b=ne.previewedId,C=ne.selectedId&&(Se==null?void 0:Se.source)==="comment-bridge"?"comment-bridge":null,j(),re()}};return pe}l(ogt,"createAnnotationViewer");function lgt(t){var e,r,n,a,i,s,o,u,h,d,f;return JSON.stringify({showToolbar:(e=t==null?void 0:t.showToolbar)!=null?e:null,showThemeToggle:(r=t==null?void 0:t.showThemeToggle)!=null?r:null,showColorFilter:(n=t==null?void 0:t.showColorFilter)!=null?n:null,showBrandLink:(a=t==null?void 0:t.showBrandLink)!=null?a:null,defaultMarkerIndexVisible:(i=t==null?void 0:t.defaultMarkerIndexVisible)!=null?i:null,toolbarEdge:(s=t==null?void 0:t.toolbarEdge)!=null?s:null,toolbarAutoHide:(o=t==null?void 0:t.toolbarAutoHide)!=null?o:null,zIndex:(u=t==null?void 0:t.zIndex)!=null?u:null,emptyWhenNoData:(h=t==null?void 0:t.emptyWhenNoData)!=null?h:null,sourceReference:t!=null&&t.sourceReference?{root:(d=t.sourceReference.root)!=null?d:null,manifest:(f=t.sourceReference.manifest)!=null?f:null}:null,hasGetCurrentPageId:typeof(t==null?void 0:t.getCurrentPageId)=="function",hasOnDirectoryRoute:typeof(t==null?void 0:t.onDirectoryRoute)=="function",hasRenderToolbarActions:typeof(t==null?void 0:t.renderToolbarActions)=="function"})}l(lgt,"getAnnotationViewerRestartKey");function cgt(t,e,r,n,a){if(t)return Ne(X({},t),{currentPageId:r?r():t.currentPageId,getCurrentPageId:l(()=>{var s;const i=(s=n==null?void 0:n())==null?void 0:s();return typeof i=="string"&&i.trim()?i:r?r():t.currentPageId},"getCurrentPageId"),onDirectoryRoute:l(i=>{var s;(s=e())==null||s(i)},"onDirectoryRoute"),renderToolbarActions:t.renderToolbarActions?i=>{var s,o;return(o=(s=a==null?void 0:a())==null?void 0:s(i))!=null?o:null}:void 0})}l(cgt,"wrapAnnotationViewerOptions");function ugt(t){const{source:e,defaultVisible:r=!0,resolveElement:n,options:a}=t,i=N.useRef(null),s=N.useRef(a==null?void 0:a.onDirectoryRoute),o=N.useRef(a==null?void 0:a.currentPageId),u=N.useRef(a==null?void 0:a.getCurrentPageId),h=N.useRef(a==null?void 0:a.renderToolbarActions);s.current=a==null?void 0:a.onDirectoryRoute,o.current=a==null?void 0:a.currentPageId,u.current=a==null?void 0:a.getCurrentPageId,h.current=a==null?void 0:a.renderToolbarActions;const d=lgt(a),f=N.useMemo(()=>cgt(a,()=>s.current,()=>o.current,()=>u.current,()=>h.current),[d]);return N.useEffect(()=>{if(!r)return;const p=ogt({source:e,resolveElement:n,options:f});return i.current=p,p.start(),()=>{i.current===p&&(i.current=null),p.stop()}},[r,n,e,f]),N.useEffect(()=>{var p;(p=i.current)==null||p.refresh()},[a==null?void 0:a.currentPageId]),null}l(ugt,"AnnotationViewer");var hgt=l((t,e,r)=>new Promise((n,a)=>{var i=l(u=>{try{o(r.next(u))}catch(h){a(h)}},"fulfilled"),s=l(u=>{try{o(r.throw(u))}catch(h){a(h)}},"rejected"),o=l(u=>u.done?n(u.value):Promise.resolve(u.value).then(i,s),"step");o((r=r.apply(t,e)).next())}),"__async");const dgt="pre code.language-mermaid";let ffe=!1,pfe=Promise.resolve();function bB(t){const e=[];return t.querySelectorAll("*").forEach(r=>{r.shadowRoot&&(e.push(r.shadowRoot),e.push(...bB(r.shadowRoot)))}),e}l(bB,"collectShadowRoots");function gfe(t,e=document){const r=[];return e.querySelectorAll(t).forEach(n=>{n instanceof HTMLElement&&r.push(n)}),bB(e).forEach(n=>{r.push(...gfe(t,n))}),r}l(gfe,"queryAllIncludingShadowRoots");function fgt(t){const e=new WeakSet,r=l(n=>{if(!(n instanceof Element)||e.has(n))return;e.add(n),new MutationObserver(t).observe(n,{childList:!0,subtree:!0}),bB(n).forEach(i=>r(i)),n.querySelectorAll("*").forEach(i=>{i.shadowRoot&&r(i.shadowRoot)})},"observeNode");return r(document.body),()=>{}}l(fgt,"observeDeepMutations");function mfe(){pfe=pfe.then(()=>hgt(this,null,function*(){var t,e;const r=gfe(dgt);if(r.length===0)return;const n=(yield Promise.resolve().then(function(){return X$t})).default;ffe||(n.initialize({startOnLoad:!1,theme:"neutral",securityLevel:"strict",fontFamily:'system-ui, -apple-system, "Segoe UI", sans-serif'}),ffe=!0);for(const a of r){const i=a.parentElement;if(!i||i.dataset.mermaidRendered==="true")continue;const s=(t=a.textContent)==null?void 0:t.trim();if(!s)continue;i.dataset.mermaidRendered="pending";const o=`axhub-mermaid-${Math.random().toString(36).slice(2,10)}`;try{const{svg:u}=yield n.render(o,s),d=((e=i.ownerDocument)!=null?e:document).createElement("div");d.className="axhub-mermaid-diagram",d.setAttribute("role","img"),d.setAttribute("aria-label","流程图"),d.innerHTML=u,i.replaceWith(d)}catch(u){i.dataset.mermaidRendered="error",console.warn("[axhub-mermaid] render failed:",u)}}}))}l(mfe,"scheduleMermaidRender");function pgt(){N.useEffect(()=>{mfe();const t=l(()=>{mfe()},"onMutate"),e=new MutationObserver(t);return e.observe(document.body,{childList:!0,subtree:!0}),fgt(t),()=>e.disconnect()},[])}l(pgt,"useAnnotationMermaidRenderer");var ggt=Object.defineProperty,mgt=Object.defineProperties,ygt=Object.getOwnPropertyDescriptors,yfe=Object.getOwnPropertySymbols,vgt=Object.prototype.hasOwnProperty,bgt=Object.prototype.propertyIsEnumerable,vfe=l((t,e,r)=>e in t?ggt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp$4"),bfe=l((t,e)=>{for(var r in e||(e={}))vgt.call(e,r)&&vfe(t,r,e[r]);if(yfe)for(var r of yfe(e))bgt.call(e,r)&&vfe(t,r,e[r]);return t},"__spreadValues$4"),xfe=l((t,e)=>mgt(t,ygt(e)),"__spreadProps$4");const xgt="oneos-project-nav";function wgt(t){return(t==null?void 0:t.type)==="folder"&&t.id===xgt}l(wgt,"isNavFolder");function Tgt(t){return(t==null?void 0:t.type)==="link"||(t==null?void 0:t.type)==="route"}l(Tgt,"isDirectoryJumpNode");function Egt(t){const e=[],r=l(n=>{var a;for(const i of n||[]){if(i.type==="route"){const s=String(((a=i.payload)==null?void 0:a.pageId)||"").trim();s&&e.push(s)}i.type==="folder"&&Array.isArray(i.children)&&r(i.children)}},"walk");return r(t),e}l(Egt,"collectRoutePageIds");function Cgt(t,e){if(!e)return!0;const r=Egt(t.children);return r.length?r.includes(e):!0}l(Cgt,"folderMatchesPage");function wfe(t,e){const r=[];for(const n of t||[])if(!(wgt(n)||Tgt(n))){if(n.type==="markdown"){r.push(n);continue}if(n.type==="folder"){if(!Cgt(n,e))continue;const a=wfe(n.children,e);if(!a.length)continue;r.push(xfe(bfe({},n),{children:a}))}}return r}l(wfe,"filterDirectoryNodesForAnnotationPanel");function Sgt(t,e){var r;const n=wfe((r=t.directory)==null?void 0:r.nodes,e);return xfe(bfe({},t),{directory:{nodes:n}})}l(Sgt,"buildAnnotationViewerSource");function _gt(t){const{source:e,options:r,children:n}=t;pgt();const a=N.useMemo(()=>Sgt(e,r.currentPageId),[e,r.currentPageId]);return N.createElement(N.Fragment,null,n,N.createElement(ugt,{source:a,options:r}))}l(_gt,"PrototypeAnnotationHost");function kgt(){typeof window=="undefined"||window.parent===window||window.parent.postMessage({type:"AXHUB_PROTOTYPE_ROUTE_INFO",pages:[],defaultPageId:"",activePageId:""},"*")}l(kgt,"clearHostPrototypeRouteInfo");const Agt=new Set(["prototype.lnoneos.com","prototype.inoneos.com"]);function Ngt(t){const e=typeof window!="undefined"?window.location.hostname:"";return e?Agt.has(e.toLowerCase()):!1}l(Ngt,"shouldEnforceOssAccessGate");function Igt(t){if(!Ngt())return!0;try{return sessionStorage.getItem(t)==="1"}catch(e){return!1}}l(Igt,"isOssGateSessionAuthed");const Lgt="lingniu",Tfe="energy-h2-bi-board-auth-v1";function $gt(){return Igt(Tfe)}l($gt,"isEnergyBiAuthed");function Mgt(t){try{t&&sessionStorage.setItem(Tfe,"1")}catch(e){}}l(Mgt,"setEnergyBiAuthed");const Pgt=l(({onOk:t})=>{const[e,r]=N.useState(""),[n,a]=N.useState(""),i=l(s=>{if(s.preventDefault(),e.trim()===Lgt){Mgt(!0),a(""),t();return}a("口令不对,请重试")},"submit");return N.createElement("div",{className:"ehb-gate"},N.createElement("form",{className:"ehb-gate-card",onSubmit:i},N.createElement("p",{className:"ehb-gate-kicker"},"ONEOS · 能源 BI"),N.createElement("h1",{className:"ehb-gate-title"},"氢能经营看板"),N.createElement("p",{className:"ehb-gate-sub"},"我司成本 · 按日 / 总览 · 单站日报"),N.createElement("label",{className:"ehb-gate-label",htmlFor:"ehb-pwd"},"访问口令"),N.createElement("input",{id:"ehb-pwd",className:"ehb-gate-input",type:"password",autoComplete:"current-password",autoFocus:!0,value:e,onChange:l(s=>{r(s.target.value),n&&a("")},"onChange"),placeholder:"请输入口令"}),N.createElement("p",{className:"ehb-gate-error",role:"alert"},n),N.createElement("button",{type:"submit",className:"ehb-gate-btn"},"进入看板"),N.createElement("p",{className:"ehb-gate-foot"},"内部文件 · 请勿外传")))},"EnergyBiAccessGate");const Rgt=l(t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),"toKebabCase"),Ogt=l(t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,n)=>n?n.toUpperCase():r.toLowerCase()),"toCamelCase"),Efe=l(t=>{const e=Ogt(t);return e.charAt(0).toUpperCase()+e.slice(1)},"toPascalCase"),Cfe=l((...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim(),"mergeClasses"),Dgt=l(t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0},"hasA11yProp");var Fgt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Bgt=N.forwardRef((h,u)=>{var d=h,{color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:a="",children:i,iconNode:s}=d,o=Xt(d,["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"]);return N.createElement("svg",X(X(Ne(X({ref:u},Fgt),{width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:Cfe("lucide",a)}),!i&&!Dgt(o)&&{"aria-hidden":"true"}),o),[...s.map(([f,p])=>N.createElement(f,p)),...Array.isArray(i)?i:[i]])});const Ii=l((t,e)=>{const r=N.forwardRef((s,i)=>{var o=s,{className:n}=o,a=Xt(o,["className"]);return N.createElement(Bgt,X({ref:i,iconNode:e,className:Cfe(`lucide-${Rgt(Efe(t))}`,`lucide-${t}`,n)},a))});return r.displayName=Efe(t),r},"createLucideIcon");const Sfe=Ii("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);const zgt=Ii("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const Hgt=Ii("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);const _fe=Ii("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Wgt=Ii("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const XS=Ii("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const ZS=Ii("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const kfe=Ii("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Vgt=Ii("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const P0=Ii("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);const kA=Ii("fuel",[["path",{d:"M14 13h2a2 2 0 0 1 2 2v2a2 2 0 0 0 4 0v-6.998a2 2 0 0 0-.59-1.42L18 5",key:"1wtuz0"}],["path",{d:"M14 21V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v16",key:"e09ifn"}],["path",{d:"M2 21h13",key:"1x0fut"}],["path",{d:"M3 9h11",key:"1p7c0w"}]]);const Ggt=Ii("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);const xB=Ii("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const AA=Ii("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const qgt=Ii("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const Ygt=Ii("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]);const Ugt=Ii("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);const ku=Ii("truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);const Afe=Ii("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);const Vg=Ii("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const wB=Ii("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var NA={};NA.version="0.18.5";var Nfe=1252,jgt=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Ife=l(function(t){jgt.indexOf(t)!=-1&&(Nfe=t)},"set_ansi");function Kgt(){Ife(1252)}l(Kgt,"reset_ansi");var QS=l(function(t){Ife(t)},"set_cp");function Xgt(){QS(1200),Kgt()}l(Xgt,"reset_cp");var IA=l(function(e){return String.fromCharCode(e)},"_gc1"),Lfe=l(function(e){return String.fromCharCode(e)},"_ga1"),LA,R0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function JS(t){for(var e="",r=0,n=0,a=0,i=0,s=0,o=0,u=0,h=0;h<t.length;)r=t.charCodeAt(h++),i=r>>2,n=t.charCodeAt(h++),s=(r&3)<<4|n>>4,a=t.charCodeAt(h++),o=(n&15)<<2|a>>6,u=a&63,isNaN(n)?o=u=64:isNaN(a)&&(u=64),e+=R0.charAt(i)+R0.charAt(s)+R0.charAt(o)+R0.charAt(u);return e}l(JS,"Base64_encode");function Vd(t){var e="",r=0,n=0,a=0,i=0,s=0,o=0,u=0;t=t.replace(/[^\w\+\/\=]/g,"");for(var h=0;h<t.length;)i=R0.indexOf(t.charAt(h++)),s=R0.indexOf(t.charAt(h++)),r=i<<2|s>>4,e+=String.fromCharCode(r),o=R0.indexOf(t.charAt(h++)),n=(s&15)<<4|o>>2,o!==64&&(e+=String.fromCharCode(n)),u=R0.indexOf(t.charAt(h++)),a=(o&3)<<6|u,u!==64&&(e+=String.fromCharCode(a));return e}l(Vd,"Base64_decode");var Xn=function(){return typeof Buffer!="undefined"&&typeof process!="undefined"&&typeof process.versions!="undefined"&&!!process.versions.node}(),Gd=function(){if(typeof Buffer!="undefined"){var t=!Buffer.from;if(!t)try{Buffer.from("foo","utf8")}catch(e){t=!0}return t?function(e,r){return r?new Buffer(e,r):new Buffer(e)}:Buffer.from.bind(Buffer)}return function(){}}();function Gg(t){return Xn?Buffer.alloc?Buffer.alloc(t):new Buffer(t):typeof Uint8Array!="undefined"?new Uint8Array(t):new Array(t)}l(Gg,"new_raw_buf");function $fe(t){return Xn?Buffer.allocUnsafe?Buffer.allocUnsafe(t):new Buffer(t):typeof Uint8Array!="undefined"?new Uint8Array(t):new Array(t)}l($fe,"new_unsafe_buf");var Au=l(function(e){return Xn?Gd(e,"binary"):e.split("").map(function(r){return r.charCodeAt(0)&255})},"s2a");function $A(t){if(typeof ArrayBuffer=="undefined")return Au(t);for(var e=new ArrayBuffer(t.length),r=new Uint8Array(e),n=0;n!=t.length;++n)r[n]=t.charCodeAt(n)&255;return e}l($A,"s2ab");function e4(t){if(Array.isArray(t))return t.map(function(n){return String.fromCharCode(n)}).join("");for(var e=[],r=0;r<t.length;++r)e[r]=String.fromCharCode(t[r]);return e.join("")}l(e4,"a2s");function Zgt(t){if(typeof Uint8Array=="undefined")throw new Error("Unsupported");return new Uint8Array(t)}l(Zgt,"a2u");var Ks=Xn?function(t){return Buffer.concat(t.map(function(e){return Buffer.isBuffer(e)?e:Gd(e)}))}:function(t){if(typeof Uint8Array!="undefined"){var e=0,r=0;for(e=0;e<t.length;++e)r+=t[e].length;var n=new Uint8Array(r),a=0;for(e=0,r=0;e<t.length;r+=a,++e)if(a=t[e].length,t[e]instanceof Uint8Array)n.set(t[e],r);else{if(typeof t[e]=="string")throw"wtf";n.set(new Uint8Array(t[e]),r)}return n}return[].concat.apply([],t.map(function(i){return Array.isArray(i)?i:[].slice.call(i)}))};function Qgt(t){for(var e=[],r=0,n=t.length+250,a=Gg(t.length+255),i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s<128)a[r++]=s;else if(s<2048)a[r++]=192|s>>6&31,a[r++]=128|s&63;else if(s>=55296&&s<57344){s=(s&1023)+64;var o=t.charCodeAt(++i)&1023;a[r++]=240|s>>8&7,a[r++]=128|s>>2&63,a[r++]=128|o>>6&15|(s&3)<<4,a[r++]=128|o&63}else a[r++]=224|s>>12&15,a[r++]=128|s>>6&63,a[r++]=128|s&63;r>n&&(e.push(a.slice(0,r)),r=0,a=Gg(65535),n=65530)}return e.push(a.slice(0,r)),Ks(e)}l(Qgt,"utf8decode");var t4=/\u0000/g,MA=/[\u0001-\u0006]/g;function Xx(t){for(var e="",r=t.length-1;r>=0;)e+=t.charAt(r--);return e}l(Xx,"_strrev");function Nu(t,e){var r=""+t;return r.length>=e?r:mi("0",e-r.length)+r}l(Nu,"pad0");function TB(t,e){var r=""+t;return r.length>=e?r:mi(" ",e-r.length)+r}l(TB,"pad_");function PA(t,e){var r=""+t;return r.length>=e?r:r+mi(" ",e-r.length)}l(PA,"rpad_");function Jgt(t,e){var r=""+Math.round(t);return r.length>=e?r:mi("0",e-r.length)+r}l(Jgt,"pad0r1");function emt(t,e){var r=""+t;return r.length>=e?r:mi("0",e-r.length)+r}l(emt,"pad0r2");var Mfe=Math.pow(2,32);function Zx(t,e){if(t>Mfe||t<-Mfe)return Jgt(t,e);var r=Math.round(t);return emt(r,e)}l(Zx,"pad0r");function RA(t,e){return e=e||0,t.length>=7+e&&(t.charCodeAt(e)|32)===103&&(t.charCodeAt(e+1)|32)===101&&(t.charCodeAt(e+2)|32)===110&&(t.charCodeAt(e+3)|32)===101&&(t.charCodeAt(e+4)|32)===114&&(t.charCodeAt(e+5)|32)===97&&(t.charCodeAt(e+6)|32)===108}l(RA,"SSF_isgeneral");var Pfe=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],EB=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function tmt(t){return t||(t={}),t[0]="General",t[1]="0",t[2]="0.00",t[3]="#,##0",t[4]="#,##0.00",t[9]="0%",t[10]="0.00%",t[11]="0.00E+00",t[12]="# ?/?",t[13]="# ??/??",t[14]="m/d/yy",t[15]="d-mmm-yy",t[16]="d-mmm",t[17]="mmm-yy",t[18]="h:mm AM/PM",t[19]="h:mm:ss AM/PM",t[20]="h:mm",t[21]="h:mm:ss",t[22]="m/d/yy h:mm",t[37]="#,##0 ;(#,##0)",t[38]="#,##0 ;[Red](#,##0)",t[39]="#,##0.00;(#,##0.00)",t[40]="#,##0.00;[Red](#,##0.00)",t[45]="mm:ss",t[46]="[h]:mm:ss",t[47]="mmss.0",t[48]="##0.0E+0",t[49]="@",t[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',t}l(tmt,"SSF_init_table");var gi={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},Rfe={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},rmt={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function OA(t,e,r){for(var n=t<0?-1:1,a=t*n,i=0,s=1,o=0,u=1,h=0,d=0,f=Math.floor(a);h<e&&(f=Math.floor(a),o=f*s+i,d=f*h+u,!(a-f<5e-8));)a=1/(a-f),i=s,s=o,u=h,h=d;if(d>e&&(h>e?(d=u,o=i):(d=h,o=s)),!r)return[0,n*o,d];var p=Math.floor(n*o/d);return[p,n*o-p*d,d]}l(OA,"SSF_frac");function DA(t,e,r){if(t>2958465||t<0)return null;var n=t|0,a=Math.floor(86400*(t-n)),i=0,s=[],o={D:n,T:a,u:86400*(t-n)-a,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(o.u)<1e-6&&(o.u=0),e&&e.date1904&&(n+=1462),o.u>.9999&&(o.u=0,++a==86400&&(o.T=a=0,++n,++o.D)),n===60)s=r?[1317,10,29]:[1900,2,29],i=3;else if(n===0)s=r?[1317,8,29]:[1900,1,0],i=6;else{n>60&&--n;var u=new Date(1900,0,1);u.setDate(u.getDate()+n-1),s=[u.getFullYear(),u.getMonth()+1,u.getDate()],i=u.getDay(),n<60&&(i=(i+6)%7),r&&(i=cmt(u,s))}return o.y=s[0],o.m=s[1],o.d=s[2],o.S=a%60,a=Math.floor(a/60),o.M=a%60,a=Math.floor(a/60),o.H=a,o.q=i,o}l(DA,"SSF_parse_date_code");var Ofe=new Date(1899,11,31,0,0,0),nmt=Ofe.getTime(),amt=new Date(1900,2,1,0,0,0);function Dfe(t,e){var r=t.getTime();return e?r-=1262304e5:t>=amt&&(r+=864e5),(r-(nmt+(t.getTimezoneOffset()-Ofe.getTimezoneOffset())*6e4))/864e5}l(Dfe,"datenum_local");function CB(t){return t.indexOf(".")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}l(CB,"SSF_strip_decimal");function imt(t){return t.indexOf("E")==-1?t:t.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}l(imt,"SSF_normalize_exp");function smt(t){var e=t<0?12:11,r=CB(t.toFixed(12));return r.length<=e||(r=t.toPrecision(10),r.length<=e)?r:t.toExponential(5)}l(smt,"SSF_small_exp");function omt(t){var e=CB(t.toFixed(11));return e.length>(t<0?12:11)||e==="0"||e==="-0"?t.toPrecision(6):e}l(omt,"SSF_large_exp");function lmt(t){var e=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),r;return e>=-4&&e<=-1?r=t.toPrecision(10+e):Math.abs(e)<=9?r=smt(t):e===10?r=t.toFixed(10).substr(0,12):r=omt(t),CB(imt(r.toUpperCase()))}l(lmt,"SSF_general_num");function SB(t,e){switch(typeof t){case"string":return t;case"boolean":return t?"TRUE":"FALSE";case"number":return(t|0)===t?t.toString(10):lmt(t);case"undefined":return"";case"object":if(t==null)return"";if(t instanceof Date)return D0(14,Dfe(t,e&&e.date1904),e)}throw new Error("unsupported value in General format: "+t)}l(SB,"SSF_general");function cmt(t,e){e[0]-=581;var r=t.getDay();return t<60&&(r=(r+6)%7),r}l(cmt,"SSF_fix_hijri");function umt(t,e,r,n){var a="",i=0,s=0,o=r.y,u,h=0;switch(t){case 98:o=r.y+543;case 121:switch(e.length){case 1:case 2:u=o%100,h=2;break;default:u=o%1e4,h=4;break}break;case 109:switch(e.length){case 1:case 2:u=r.m,h=e.length;break;case 3:return EB[r.m-1][1];case 5:return EB[r.m-1][0];default:return EB[r.m-1][2]}break;case 100:switch(e.length){case 1:case 2:u=r.d,h=e.length;break;case 3:return Pfe[r.q][0];default:return Pfe[r.q][1]}break;case 104:switch(e.length){case 1:case 2:u=1+(r.H+11)%12,h=e.length;break;default:throw"bad hour format: "+e}break;case 72:switch(e.length){case 1:case 2:u=r.H,h=e.length;break;default:throw"bad hour format: "+e}break;case 77:switch(e.length){case 1:case 2:u=r.M,h=e.length;break;default:throw"bad minute format: "+e}break;case 115:if(e!="s"&&e!="ss"&&e!=".0"&&e!=".00"&&e!=".000")throw"bad second format: "+e;return r.u===0&&(e=="s"||e=="ss")?Nu(r.S,e.length):(n>=2?s=n===3?1e3:100:s=n===1?10:1,i=Math.round(s*(r.S+r.u)),i>=60*s&&(i=0),e==="s"?i===0?"0":""+i/s:(a=Nu(i,2+n),e==="ss"?a.substr(0,2):"."+a.substr(2,e.length-1)));case 90:switch(e){case"[h]":case"[hh]":u=r.D*24+r.H;break;case"[m]":case"[mm]":u=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":u=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+e}h=e.length===3?1:2;break;case 101:u=o,h=1;break}var d=h>0?Nu(u,h):"";return d}l(umt,"SSF_write_date");function O0(t){var e=3;if(t.length<=e)return t;for(var r=t.length%e,n=t.substr(0,r);r!=t.length;r+=e)n+=(n.length>0?",":"")+t.substr(r,e);return n}l(O0,"commaify");var Ffe=/%/g;function hmt(t,e,r){var n=e.replace(Ffe,""),a=e.length-n.length;return qd(t,n,r*Math.pow(10,2*a))+mi("%",a)}l(hmt,"write_num_pct");function dmt(t,e,r){for(var n=e.length-1;e.charCodeAt(n-1)===44;)--n;return qd(t,e.substr(0,n),r/Math.pow(10,3*(e.length-n)))}l(dmt,"write_num_cm");function Bfe(t,e){var r,n=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(e==0)return"0.0E+0";if(e<0)return"-"+Bfe(t,-e);var a=t.indexOf(".");a===-1&&(a=t.indexOf("E"));var i=Math.floor(Math.log(e)*Math.LOG10E)%a;if(i<0&&(i+=a),r=(e/Math.pow(10,i)).toPrecision(n+1+(a+i)%a),r.indexOf("e")===-1){var s=Math.floor(Math.log(e)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,a)+"."+r.substr(2+a),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,u,h,d){return u+h+d.substr(0,(a+i)%a)+"."+d.substr(i)+"E"})}else r=e.toExponential(n);return t.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),t.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}l(Bfe,"write_num_exp");var zfe=/# (\?+)( ?)\/( ?)(\d+)/;function fmt(t,e,r){var n=parseInt(t[4],10),a=Math.round(e*n),i=Math.floor(a/n),s=a-i*n,o=n;return r+(i===0?"":""+i)+" "+(s===0?mi(" ",t[1].length+1+t[4].length):TB(s,t[1].length)+t[2]+"/"+t[3]+Nu(o,t[4].length))}l(fmt,"write_num_f1");function pmt(t,e,r){return r+(e===0?"":""+e)+mi(" ",t[1].length+2+t[4].length)}l(pmt,"write_num_f2");var Hfe=/^#*0*\.([0#]+)/,Wfe=/\).*[0#]/,Vfe=/\(###\) ###\\?-####/;function Yo(t){for(var e="",r,n=0;n!=t.length;++n)switch(r=t.charCodeAt(n)){case 35:break;case 63:e+=" ";break;case 48:e+="0";break;default:e+=String.fromCharCode(r)}return e}l(Yo,"hashq");function Gfe(t,e){var r=Math.pow(10,e);return""+Math.round(t*r)/r}l(Gfe,"rnd");function qfe(t,e){var r=t-Math.floor(t),n=Math.pow(10,e);return e<(""+Math.round(r*n)).length?0:Math.round(r*n)}l(qfe,"dec");function gmt(t,e){return e<(""+Math.round((t-Math.floor(t))*Math.pow(10,e))).length?1:0}l(gmt,"carry");function mmt(t){return t<2147483647&&t>-2147483648?""+(t>=0?t|0:t-1|0):""+Math.floor(t)}l(mmt,"flr");function qc(t,e,r){if(t.charCodeAt(0)===40&&!e.match(Wfe)){var n=e.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?qc("n",n,r):"("+qc("n",n,-r)+")"}if(e.charCodeAt(e.length-1)===44)return dmt(t,e,r);if(e.indexOf("%")!==-1)return hmt(t,e,r);if(e.indexOf("E")!==-1)return Bfe(e,r);if(e.charCodeAt(0)===36)return"$"+qc(t,e.substr(e.charAt(1)==" "?2:1),r);var a,i,s,o,u=Math.abs(r),h=r<0?"-":"";if(e.match(/^00+$/))return h+Zx(u,e.length);if(e.match(/^[#?]+$/))return a=Zx(r,0),a==="0"&&(a=""),a.length>e.length?a:Yo(e.substr(0,e.length-a.length))+a;if(i=e.match(zfe))return fmt(i,u,h);if(e.match(/^#+0+$/))return h+Zx(u,e.length-e.indexOf("0"));if(i=e.match(Hfe))return a=Gfe(r,i[1].length).replace(/^([^\.]+)$/,"$1."+Yo(i[1])).replace(/\.$/,"."+Yo(i[1])).replace(/\.(\d*)$/,function(m,y){return"."+y+mi("0",Yo(i[1]).length-y.length)}),e.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(e=e.replace(/^#+([0.])/,"$1"),i=e.match(/^(0*)\.(#*)$/))return h+Gfe(u,i[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=e.match(/^#{1,3},##0(\.?)$/))return h+O0(Zx(u,0));if(i=e.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+qc(t,e,-r):O0(""+(Math.floor(r)+gmt(r,i[1].length)))+"."+Nu(qfe(r,i[1].length),i[1].length);if(i=e.match(/^#,#*,#0/))return qc(t,e.replace(/^#,#*,/,""),r);if(i=e.match(/^([0#]+)(\\?-([0#]+))+$/))return a=Xx(qc(t,e.replace(/[\\-]/g,""),r)),s=0,Xx(Xx(e.replace(/\\/g,"")).replace(/[0#]/g,function(m){return s<a.length?a.charAt(s++):m==="0"?"0":""}));if(e.match(Vfe))return a=qc(t,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var d="";if(i=e.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),o=OA(u,Math.pow(10,s)-1,!1),a=""+h,d=qd("n",i[1],o[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),a+=d+i[2]+"/"+i[3],d=PA(o[2],s),d.length<i[4].length&&(d=Yo(i[4].substr(i[4].length-d.length))+d),a+=d,a;if(i=e.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),o=OA(u,Math.pow(10,s)-1,!0),h+(o[0]||(o[1]?"":"0"))+" "+(o[1]?TB(o[1],s)+i[2]+"/"+i[3]+PA(o[2],s):mi(" ",2*s+1+i[2].length+i[3].length));if(i=e.match(/^[#0?]+$/))return a=Zx(r,0),e.length<=a.length?a:Yo(e.substr(0,e.length-a.length))+a;if(i=e.match(/^([#0?]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=a.indexOf(".");var f=e.indexOf(".")-s,p=e.length-a.length-f;return Yo(e.substr(0,f)+a+e.substr(e.length-p))}if(i=e.match(/^00,000\.([#0]*0)$/))return s=qfe(r,i[1].length),r<0?"-"+qc(t,e,-r):O0(mmt(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(m){return"00,"+(m.length<3?Nu(0,3-m.length):"")+m})+"."+Nu(s,i[1].length);switch(e){case"###,##0.00":return qc(t,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var g=O0(Zx(u,0));return g!=="0"?h+g:"";case"###,###.00":return qc(t,"###,##0.00",r).replace(/^0\./,".");case"#,###.00":return qc(t,"#,##0.00",r).replace(/^0\./,".")}throw new Error("unsupported format |"+e+"|")}l(qc,"write_num_flt");function ymt(t,e,r){for(var n=e.length-1;e.charCodeAt(n-1)===44;)--n;return qd(t,e.substr(0,n),r/Math.pow(10,3*(e.length-n)))}l(ymt,"write_num_cm2");function vmt(t,e,r){var n=e.replace(Ffe,""),a=e.length-n.length;return qd(t,n,r*Math.pow(10,2*a))+mi("%",a)}l(vmt,"write_num_pct2");function Yfe(t,e){var r,n=t.indexOf("E")-t.indexOf(".")-1;if(t.match(/^#+0.0E\+0$/)){if(e==0)return"0.0E+0";if(e<0)return"-"+Yfe(t,-e);var a=t.indexOf(".");a===-1&&(a=t.indexOf("E"));var i=Math.floor(Math.log(e)*Math.LOG10E)%a;if(i<0&&(i+=a),r=(e/Math.pow(10,i)).toPrecision(n+1+(a+i)%a),!r.match(/[Ee]/)){var s=Math.floor(Math.log(e)*Math.LOG10E);r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(s-r.length+i):r+="E+"+(s-i),r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(o,u,h,d){return u+h+d.substr(0,(a+i)%a)+"."+d.substr(i)+"E"})}else r=e.toExponential(n);return t.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),t.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}l(Yfe,"write_num_exp2");function Sh(t,e,r){if(t.charCodeAt(0)===40&&!e.match(Wfe)){var n=e.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?Sh("n",n,r):"("+Sh("n",n,-r)+")"}if(e.charCodeAt(e.length-1)===44)return ymt(t,e,r);if(e.indexOf("%")!==-1)return vmt(t,e,r);if(e.indexOf("E")!==-1)return Yfe(e,r);if(e.charCodeAt(0)===36)return"$"+Sh(t,e.substr(e.charAt(1)==" "?2:1),r);var a,i,s,o,u=Math.abs(r),h=r<0?"-":"";if(e.match(/^00+$/))return h+Nu(u,e.length);if(e.match(/^[#?]+$/))return a=""+r,r===0&&(a=""),a.length>e.length?a:Yo(e.substr(0,e.length-a.length))+a;if(i=e.match(zfe))return pmt(i,u,h);if(e.match(/^#+0+$/))return h+Nu(u,e.length-e.indexOf("0"));if(i=e.match(Hfe))return a=(""+r).replace(/^([^\.]+)$/,"$1."+Yo(i[1])).replace(/\.$/,"."+Yo(i[1])),a=a.replace(/\.(\d*)$/,function(m,y){return"."+y+mi("0",Yo(i[1]).length-y.length)}),e.indexOf("0.")!==-1?a:a.replace(/^0\./,".");if(e=e.replace(/^#+([0.])/,"$1"),i=e.match(/^(0*)\.(#*)$/))return h+(""+u).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,i[1].length?"0.":".");if(i=e.match(/^#{1,3},##0(\.?)$/))return h+O0(""+u);if(i=e.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+Sh(t,e,-r):O0(""+r)+"."+mi("0",i[1].length);if(i=e.match(/^#,#*,#0/))return Sh(t,e.replace(/^#,#*,/,""),r);if(i=e.match(/^([0#]+)(\\?-([0#]+))+$/))return a=Xx(Sh(t,e.replace(/[\\-]/g,""),r)),s=0,Xx(Xx(e.replace(/\\/g,"")).replace(/[0#]/g,function(m){return s<a.length?a.charAt(s++):m==="0"?"0":""}));if(e.match(Vfe))return a=Sh(t,"##########",r),"("+a.substr(0,3)+") "+a.substr(3,3)+"-"+a.substr(6);var d="";if(i=e.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(i[4].length,7),o=OA(u,Math.pow(10,s)-1,!1),a=""+h,d=qd("n",i[1],o[1]),d.charAt(d.length-1)==" "&&(d=d.substr(0,d.length-1)+"0"),a+=d+i[2]+"/"+i[3],d=PA(o[2],s),d.length<i[4].length&&(d=Yo(i[4].substr(i[4].length-d.length))+d),a+=d,a;if(i=e.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return s=Math.min(Math.max(i[1].length,i[4].length),7),o=OA(u,Math.pow(10,s)-1,!0),h+(o[0]||(o[1]?"":"0"))+" "+(o[1]?TB(o[1],s)+i[2]+"/"+i[3]+PA(o[2],s):mi(" ",2*s+1+i[2].length+i[3].length));if(i=e.match(/^[#0?]+$/))return a=""+r,e.length<=a.length?a:Yo(e.substr(0,e.length-a.length))+a;if(i=e.match(/^([#0]+)\.([#0]+)$/)){a=""+r.toFixed(Math.min(i[2].length,10)).replace(/([^0])0+$/,"$1"),s=a.indexOf(".");var f=e.indexOf(".")-s,p=e.length-a.length-f;return Yo(e.substr(0,f)+a+e.substr(e.length-p))}if(i=e.match(/^00,000\.([#0]*0)$/))return r<0?"-"+Sh(t,e,-r):O0(""+r).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(m){return"00,"+(m.length<3?Nu(0,3-m.length):"")+m})+"."+Nu(0,i[1].length);switch(e){case"###,###":case"##,###":case"#,###":var g=O0(""+u);return g!=="0"?h+g:"";default:if(e.match(/\.[0#?]*$/))return Sh(t,e.slice(0,e.lastIndexOf(".")),r)+Yo(e.slice(e.lastIndexOf(".")))}throw new Error("unsupported format |"+e+"|")}l(Sh,"write_num_int");function qd(t,e,r){return(r|0)===r?Sh(t,e,r):qc(t,e,r)}l(qd,"write_num");function bmt(t){for(var e=[],r=!1,n=0,a=0;n<t.length;++n)switch(t.charCodeAt(n)){case 34:r=!r;break;case 95:case 42:case 92:++n;break;case 59:e[e.length]=t.substr(a,n-a),a=n+1}if(e[e.length]=t.substr(a),r===!0)throw new Error("Format |"+t+"| unterminated string ");return e}l(bmt,"SSF_split_fmt");var Ufe=/\[[HhMmSs\u0E0A\u0E19\u0E17]*\]/;function jfe(t){for(var e=0,r="",n="";e<t.length;)switch(r=t.charAt(e)){case"G":RA(t,e)&&(e+=6),e++;break;case'"':for(;t.charCodeAt(++e)!==34&&e<t.length;);++e;break;case"\\":e+=2;break;case"_":e+=2;break;case"@":++e;break;case"B":case"b":if(t.charAt(e+1)==="1"||t.charAt(e+1)==="2")return!0;case"M":case"D":case"Y":case"H":case"S":case"E":case"m":case"d":case"y":case"h":case"s":case"e":case"g":return!0;case"A":case"a":case"上":if(t.substr(e,3).toUpperCase()==="A/P"||t.substr(e,5).toUpperCase()==="AM/PM"||t.substr(e,5).toUpperCase()==="上午/下午")return!0;++e;break;case"[":for(n=r;t.charAt(e++)!=="]"&&e<t.length;)n+=t.charAt(e);if(n.match(Ufe))return!0;break;case".":case"0":case"#":for(;e<t.length&&("0#?.,E+-%".indexOf(r=t.charAt(++e))>-1||r=="\\"&&t.charAt(e+1)=="-"&&"0#".indexOf(t.charAt(e+2))>-1););break;case"?":for(;t.charAt(++e)===r;);break;case"*":++e,(t.charAt(e)==" "||t.charAt(e)=="*")&&++e;break;case"(":case")":++e;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(;e<t.length&&"0123456789".indexOf(t.charAt(++e))>-1;);break;case" ":++e;break;default:++e;break}return!1}l(jfe,"fmt_is_date");function xmt(t,e,r,n){for(var a=[],i="",s=0,o="",u="t",h,d,f,p="H";s<t.length;)switch(o=t.charAt(s)){case"G":if(!RA(t,s))throw new Error("unrecognized character "+o+" in "+t);a[a.length]={t:"G",v:"General"},s+=7;break;case'"':for(i="";(f=t.charCodeAt(++s))!==34&&s<t.length;)i+=String.fromCharCode(f);a[a.length]={t:"t",v:i},++s;break;case"\\":var g=t.charAt(++s),m=g==="("||g===")"?g:"t";a[a.length]={t:m,v:g},++s;break;case"_":a[a.length]={t:"t",v:" "},s+=2;break;case"@":a[a.length]={t:"T",v:e},++s;break;case"B":case"b":if(t.charAt(s+1)==="1"||t.charAt(s+1)==="2"){if(h==null&&(h=DA(e,r,t.charAt(s+1)==="2"),h==null))return"";a[a.length]={t:"X",v:t.substr(s,2)},u=o,s+=2;break}case"M":case"D":case"Y":case"H":case"S":case"E":o=o.toLowerCase();case"m":case"d":case"y":case"h":case"s":case"e":case"g":if(e<0||h==null&&(h=DA(e,r),h==null))return"";for(i=o;++s<t.length&&t.charAt(s).toLowerCase()===o;)i+=o;o==="m"&&u.toLowerCase()==="h"&&(o="M"),o==="h"&&(o=p),a[a.length]={t:o,v:i},u=o;break;case"A":case"a":case"上":var y={t:o,v:o};if(h==null&&(h=DA(e,r)),t.substr(s,3).toUpperCase()==="A/P"?(h!=null&&(y.v=h.H>=12?"P":"A"),y.t="T",p="h",s+=3):t.substr(s,5).toUpperCase()==="AM/PM"?(h!=null&&(y.v=h.H>=12?"PM":"AM"),y.t="T",s+=5,p="h"):t.substr(s,5).toUpperCase()==="上午/下午"?(h!=null&&(y.v=h.H>=12?"下午":"上午"),y.t="T",s+=5,p="h"):(y.t="t",++s),h==null&&y.t==="T")return"";a[a.length]=y,u=o;break;case"[":for(i=o;t.charAt(s++)!=="]"&&s<t.length;)i+=t.charAt(s);if(i.slice(-1)!=="]")throw'unterminated "[" block: |'+i+"|";if(i.match(Ufe)){if(h==null&&(h=DA(e,r),h==null))return"";a[a.length]={t:"Z",v:i.toLowerCase()},u=i.charAt(1)}else i.indexOf("$")>-1&&(i=(i.match(/\$([^-\[\]]*)/)||[])[1]||"$",jfe(t)||(a[a.length]={t:"t",v:i}));break;case".":if(h!=null){for(i=o;++s<t.length&&(o=t.charAt(s))==="0";)i+=o;a[a.length]={t:"s",v:i};break}case"0":case"#":for(i=o;++s<t.length&&"0#?.,E+-%".indexOf(o=t.charAt(s))>-1;)i+=o;a[a.length]={t:"n",v:i};break;case"?":for(i=o;t.charAt(++s)===o;)i+=o;a[a.length]={t:o,v:i},u=o;break;case"*":++s,(t.charAt(s)==" "||t.charAt(s)=="*")&&++s;break;case"(":case")":a[a.length]={t:n===1?"t":o,v:o},++s;break;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":for(i=o;s<t.length&&"0123456789".indexOf(t.charAt(++s))>-1;)i+=t.charAt(s);a[a.length]={t:"D",v:i};break;case" ":a[a.length]={t:o,v:o},++s;break;case"$":a[a.length]={t:"t",v:"$"},++s;break;default:if(",$-+/():!^&'~{}<>=€acfijklopqrtuvwxzP".indexOf(o)===-1)throw new Error("unrecognized character "+o+" in "+t);a[a.length]={t:"t",v:o},++s;break}var v=0,b=0,w;for(s=a.length-1,u="t";s>=0;--s)switch(a[s].t){case"h":case"H":a[s].t=p,u="h",v<1&&(v=1);break;case"s":(w=a[s].v.match(/\.0+$/))&&(b=Math.max(b,w[0].length-1)),v<3&&(v=3);case"d":case"y":case"M":case"e":u=a[s].t;break;case"m":u==="s"&&(a[s].t="M",v<2&&(v=2));break;case"X":break;case"Z":v<1&&a[s].v.match(/[Hh]/)&&(v=1),v<2&&a[s].v.match(/[Mm]/)&&(v=2),v<3&&a[s].v.match(/[Ss]/)&&(v=3)}switch(v){case 0:break;case 1:h.u>=.5&&(h.u=0,++h.S),h.S>=60&&(h.S=0,++h.M),h.M>=60&&(h.M=0,++h.H);break;case 2:h.u>=.5&&(h.u=0,++h.S),h.S>=60&&(h.S=0,++h.M);break}var x="",T;for(s=0;s<a.length;++s)switch(a[s].t){case"t":case"T":case" ":case"D":break;case"X":a[s].v="",a[s].t=";";break;case"d":case"m":case"y":case"h":case"H":case"M":case"s":case"e":case"b":case"Z":a[s].v=umt(a[s].t.charCodeAt(0),a[s].v,h,b),a[s].t="t";break;case"n":case"?":for(T=s+1;a[T]!=null&&((o=a[T].t)==="?"||o==="D"||(o===" "||o==="t")&&a[T+1]!=null&&(a[T+1].t==="?"||a[T+1].t==="t"&&a[T+1].v==="/")||a[s].t==="("&&(o===" "||o==="n"||o===")")||o==="t"&&(a[T].v==="/"||a[T].v===" "&&a[T+1]!=null&&a[T+1].t=="?"));)a[s].v+=a[T].v,a[T]={v:"",t:";"},++T;x+=a[s].v,s=T-1;break;case"G":a[s].t="t",a[s].v=SB(e,r);break}var C="",S,E;if(x.length>0){x.charCodeAt(0)==40?(S=e<0&&x.charCodeAt(0)===45?-e:e,E=qd("n",x,S)):(S=e<0&&n>1?-e:e,E=qd("n",x,S),S<0&&a[0]&&a[0].t=="t"&&(E=E.substr(1),a[0].v="-"+a[0].v)),T=E.length-1;var k=a.length;for(s=0;s<a.length;++s)if(a[s]!=null&&a[s].t!="t"&&a[s].v.indexOf(".")>-1){k=s;break}var A=a.length;if(k===a.length&&E.indexOf("E")===-1){for(s=a.length-1;s>=0;--s)a[s]==null||"n?".indexOf(a[s].t)===-1||(T>=a[s].v.length-1?(T-=a[s].v.length,a[s].v=E.substr(T+1,a[s].v.length)):T<0?a[s].v="":(a[s].v=E.substr(0,T+1),T=-1),a[s].t="t",A=s);T>=0&&A<a.length&&(a[A].v=E.substr(0,T+1)+a[A].v)}else if(k!==a.length&&E.indexOf("E")===-1){for(T=E.indexOf(".")-1,s=k;s>=0;--s)if(!(a[s]==null||"n?".indexOf(a[s].t)===-1)){for(d=a[s].v.indexOf(".")>-1&&s===k?a[s].v.indexOf(".")-1:a[s].v.length-1,C=a[s].v.substr(d+1);d>=0;--d)T>=0&&(a[s].v.charAt(d)==="0"||a[s].v.charAt(d)==="#")&&(C=E.charAt(T--)+C);a[s].v=C,a[s].t="t",A=s}for(T>=0&&A<a.length&&(a[A].v=E.substr(0,T+1)+a[A].v),T=E.indexOf(".")+1,s=k;s<a.length;++s)if(!(a[s]==null||"n?(".indexOf(a[s].t)===-1&&s!==k)){for(d=a[s].v.indexOf(".")>-1&&s===k?a[s].v.indexOf(".")+1:0,C=a[s].v.substr(0,d);d<a[s].v.length;++d)T<E.length&&(C+=E.charAt(T++));a[s].v=C,a[s].t="t",A=s}}}for(s=0;s<a.length;++s)a[s]!=null&&"n?".indexOf(a[s].t)>-1&&(S=n>1&&e<0&&s>0&&a[s-1].v==="-"?-e:e,a[s].v=qd(a[s].t,a[s].v,S),a[s].t="t");var I="";for(s=0;s!==a.length;++s)a[s]!=null&&(I+=a[s].v);return I}l(xmt,"eval_fmt");var Kfe=/\[(=|>[=]?|<[>=]?)(-?\d+(?:\.\d*)?)\]/;function Xfe(t,e){if(e==null)return!1;var r=parseFloat(e[2]);switch(e[1]){case"=":if(t==r)return!0;break;case">":if(t>r)return!0;break;case"<":if(t<r)return!0;break;case"<>":if(t!=r)return!0;break;case">=":if(t>=r)return!0;break;case"<=":if(t<=r)return!0;break}return!1}l(Xfe,"chkcond");function wmt(t,e){var r=bmt(t),n=r.length,a=r[n-1].indexOf("@");if(n<4&&a>-1&&--n,r.length>4)throw new Error("cannot find right format for |"+r.join("|")+"|");if(typeof e!="number")return[4,r.length===4||a>-1?r[r.length-1]:"@"];switch(r.length){case 1:r=a>-1?["General","General","General",r[0]]:[r[0],r[0],r[0],"@"];break;case 2:r=a>-1?[r[0],r[0],r[0],r[1]]:[r[0],r[1],r[0],"@"];break;case 3:r=a>-1?[r[0],r[1],r[0],r[2]]:[r[0],r[1],r[2],"@"];break}var i=e>0?r[0]:e<0?r[1]:r[2];if(r[0].indexOf("[")===-1&&r[1].indexOf("[")===-1)return[n,i];if(r[0].match(/\[[=<>]/)!=null||r[1].match(/\[[=<>]/)!=null){var s=r[0].match(Kfe),o=r[1].match(Kfe);return Xfe(e,s)?[n,r[0]]:Xfe(e,o)?[n,r[1]]:[n,r[s!=null&&o!=null?2:1]]}return[n,i]}l(wmt,"choose_fmt");function D0(t,e,r){r==null&&(r={});var n="";switch(typeof t){case"string":t=="m/d/yy"&&r.dateNF?n=r.dateNF:n=t;break;case"number":t==14&&r.dateNF?n=r.dateNF:n=(r.table!=null?r.table:gi)[t],n==null&&(n=r.table&&r.table[Rfe[t]]||gi[Rfe[t]]),n==null&&(n=rmt[t]||"General");break}if(RA(n,0))return SB(e,r);e instanceof Date&&(e=Dfe(e,r.date1904));var a=wmt(n,e);if(RA(a[1]))return SB(e,r);if(e===!0)e="TRUE";else if(e===!1)e="FALSE";else if(e===""||e==null)return"";return xmt(a[1],e,r,a[0])}l(D0,"SSF_format");function Zfe(t,e){if(typeof e!="number"){e=+e||-1;for(var r=0;r<392;++r){if(gi[r]==null){e<0&&(e=r);continue}if(gi[r]==t){e=r;break}}e<0&&(e=391)}return gi[e]=t,e}l(Zfe,"SSF_load");function FA(t){for(var e=0;e!=392;++e)t[e]!==void 0&&Zfe(t[e],e)}l(FA,"SSF_load_table");function BA(){gi=tmt()}l(BA,"make_ssf");var Qfe=/[dD]+|[mM]+|[yYeE]+|[Hh]+|[Ss]+/g;function Tmt(t){var e=typeof t=="number"?gi[t]:t;return e=e.replace(Qfe,"(\\d+)"),new RegExp("^"+e+"$")}l(Tmt,"dateNF_regex");function Emt(t,e,r){var n=-1,a=-1,i=-1,s=-1,o=-1,u=-1;(e.match(Qfe)||[]).forEach(function(f,p){var g=parseInt(r[p+1],10);switch(f.toLowerCase().charAt(0)){case"y":n=g;break;case"d":i=g;break;case"h":s=g;break;case"s":u=g;break;case"m":s>=0?o=g:a=g;break}}),u>=0&&o==-1&&a>=0&&(o=a,a=-1);var h=(""+(n>=0?n:new Date().getFullYear())).slice(-4)+"-"+("00"+(a>=1?a:1)).slice(-2)+"-"+("00"+(i>=1?i:1)).slice(-2);h.length==7&&(h="0"+h),h.length==8&&(h="20"+h);var d=("00"+(s>=0?s:0)).slice(-2)+":"+("00"+(o>=0?o:0)).slice(-2)+":"+("00"+(u>=0?u:0)).slice(-2);return s==-1&&o==-1&&u==-1?h:n==-1&&a==-1&&i==-1?d:h+"T"+d}l(Emt,"dateNF_fix");var Cmt=function(){var t={};t.version="1.2.0";function e(){for(var E=0,k=new Array(256),A=0;A!=256;++A)E=A,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,E=E&1?-306674912^E>>>1:E>>>1,k[A]=E;return typeof Int32Array!="undefined"?new Int32Array(k):k}l(e,"signed_crc_table");var r=e();function n(E){var k=0,A=0,I=0,L=typeof Int32Array!="undefined"?new Int32Array(4096):new Array(4096);for(I=0;I!=256;++I)L[I]=E[I];for(I=0;I!=256;++I)for(A=E[I],k=256+I;k<4096;k+=256)A=L[k]=A>>>8^E[A&255];var R=[];for(I=1;I!=16;++I)R[I-1]=typeof Int32Array!="undefined"?L.subarray(I*256,I*256+256):L.slice(I*256,I*256+256);return R}l(n,"slice_by_16_tables");var a=n(r),i=a[0],s=a[1],o=a[2],u=a[3],h=a[4],d=a[5],f=a[6],p=a[7],g=a[8],m=a[9],y=a[10],v=a[11],b=a[12],w=a[13],x=a[14];function T(E,k){for(var A=k^-1,I=0,L=E.length;I<L;)A=A>>>8^r[(A^E.charCodeAt(I++))&255];return~A}l(T,"crc32_bstr");function C(E,k){for(var A=k^-1,I=E.length-15,L=0;L<I;)A=x[E[L++]^A&255]^w[E[L++]^A>>8&255]^b[E[L++]^A>>16&255]^v[E[L++]^A>>>24]^y[E[L++]]^m[E[L++]]^g[E[L++]]^p[E[L++]]^f[E[L++]]^d[E[L++]]^h[E[L++]]^u[E[L++]]^o[E[L++]]^s[E[L++]]^i[E[L++]]^r[E[L++]];for(I+=15;L<I;)A=A>>>8^r[(A^E[L++])&255];return~A}l(C,"crc32_buf");function S(E,k){for(var A=k^-1,I=0,L=E.length,R=0,O=0;I<L;)R=E.charCodeAt(I++),R<128?A=A>>>8^r[(A^R)&255]:R<2048?(A=A>>>8^r[(A^(192|R>>6&31))&255],A=A>>>8^r[(A^(128|R&63))&255]):R>=55296&&R<57344?(R=(R&1023)+64,O=E.charCodeAt(I++)&1023,A=A>>>8^r[(A^(240|R>>8&7))&255],A=A>>>8^r[(A^(128|R>>2&63))&255],A=A>>>8^r[(A^(128|O>>6&15|(R&3)<<4))&255],A=A>>>8^r[(A^(128|O&63))&255]):(A=A>>>8^r[(A^(224|R>>12&15))&255],A=A>>>8^r[(A^(128|R>>6&63))&255],A=A>>>8^r[(A^(128|R&63))&255]);return~A}return l(S,"crc32_str"),t.table=r,t.bstr=T,t.buf=C,t.str=S,t}(),ma=l(function(){var e={};e.version="1.2.1";function r(ge,ie){for(var be=ge.split("/"),$e=ie.split("/"),le=0,ke=0,je=Math.min(be.length,$e.length);le<je;++le){if(ke=be[le].length-$e[le].length)return ke;if(be[le]!=$e[le])return be[le]<$e[le]?-1:1}return be.length-$e.length}l(r,"namecmp");function n(ge){if(ge.charAt(ge.length-1)=="/")return ge.slice(0,-1).indexOf("/")===-1?ge:n(ge.slice(0,-1));var ie=ge.lastIndexOf("/");return ie===-1?ge:ge.slice(0,ie+1)}l(n,"dirname");function a(ge){if(ge.charAt(ge.length-1)=="/")return a(ge.slice(0,-1));var ie=ge.lastIndexOf("/");return ie===-1?ge:ge.slice(ie+1)}l(a,"filename");function i(ge,ie){typeof ie=="string"&&(ie=new Date(ie));var be=ie.getHours();be=be<<6|ie.getMinutes(),be=be<<5|ie.getSeconds()>>>1,ge.write_shift(2,be);var $e=ie.getFullYear()-1980;$e=$e<<4|ie.getMonth()+1,$e=$e<<5|ie.getDate(),ge.write_shift(2,$e)}l(i,"write_dos_date");function s(ge){var ie=ge.read_shift(2)&65535,be=ge.read_shift(2)&65535,$e=new Date,le=be&31;be>>>=5;var ke=be&15;be>>>=4,$e.setMilliseconds(0),$e.setFullYear(be+1980),$e.setMonth(ke-1),$e.setDate(le);var je=ie&31;ie>>>=5;var ut=ie&63;return ie>>>=6,$e.setHours(ie),$e.setMinutes(ut),$e.setSeconds(je<<1),$e}l(s,"parse_dos_date");function o(ge){dc(ge,0);for(var ie={},be=0;ge.l<=ge.length-4;){var $e=ge.read_shift(2),le=ge.read_shift(2),ke=ge.l+le,je={};switch($e){case 21589:be=ge.read_shift(1),be&1&&(je.mtime=ge.read_shift(4)),le>5&&(be&2&&(je.atime=ge.read_shift(4)),be&4&&(je.ctime=ge.read_shift(4))),je.mtime&&(je.mt=new Date(je.mtime*1e3));break}ge.l=ke,ie[$e]=je}return ie}l(o,"parse_extra_field");var u;function h(){return u||(u={})}l(h,"get_fs");function d(ge,ie){if(ge[0]==80&&ge[1]==75)return ot(ge,ie);if((ge[0]|32)==109&&(ge[1]|32)==105)return qe(ge,ie);if(ge.length<512)throw new Error("CFB file size "+ge.length+" < 512");var be=3,$e=512,le=0,ke=0,je=0,ut=0,Qe=0,Ze=[],st=ge.slice(0,512);dc(st,0);var Ct=f(st);switch(be=Ct[0],be){case 3:$e=512;break;case 4:$e=4096;break;case 0:if(Ct[1]==0)return ot(ge,ie);default:throw new Error("Major Version: Expected 3 or 4 saw "+be)}$e!==512&&(st=ge.slice(0,$e),dc(st,28));var Mt=ge.slice(0,$e);p(st,be);var Bt=st.read_shift(4,"i");if(be===3&&Bt!==0)throw new Error("# Directory Sectors: Expected 0 saw "+Bt);st.l+=4,je=st.read_shift(4,"i"),st.l+=4,st.chk("00100000","Mini Stream Cutoff Size: "),ut=st.read_shift(4,"i"),le=st.read_shift(4,"i"),Qe=st.read_shift(4,"i"),ke=st.read_shift(4,"i");for(var Pt=-1,Pe=0;Pe<109&&(Pt=st.read_shift(4,"i"),!(Pt<0));++Pe)Ze[Pe]=Pt;var at=g(ge,$e);v(Qe,ke,at,$e,Ze);var yt=w(at,je,Ze,$e);yt[je].name="!Directory",le>0&&ut!==O&&(yt[ut].name="!MiniFAT"),yt[Ze[0]].name="!FAT",yt.fat_addrs=Ze,yt.ssz=$e;var Tt={},Nt=[],zt=[],Jt=[];x(je,yt,at,Nt,le,Tt,zt,ut),m(zt,Jt,Nt),Nt.shift();var Ht={FileIndex:zt,FullPaths:Jt};return ie&&ie.raw&&(Ht.raw={header:Mt,sectors:at}),Ht}l(d,"parse");function f(ge){if(ge[ge.l]==80&&ge[ge.l+1]==75)return[0,0];ge.chk(M,"Header Signature: "),ge.l+=16;var ie=ge.read_shift(2,"u");return[ge.read_shift(2,"u"),ie]}l(f,"check_get_mver");function p(ge,ie){var be=9;switch(ge.l+=2,be=ge.read_shift(2)){case 9:if(ie!=3)throw new Error("Sector Shift: Expected 9 saw "+be);break;case 12:if(ie!=4)throw new Error("Sector Shift: Expected 12 saw "+be);break;default:throw new Error("Sector Shift: Expected 9 or 12 saw "+be)}ge.chk("0600","Mini Sector Shift: "),ge.chk("000000000000","Reserved: ")}l(p,"check_shifts");function g(ge,ie){for(var be=Math.ceil(ge.length/ie)-1,$e=[],le=1;le<be;++le)$e[le-1]=ge.slice(le*ie,(le+1)*ie);return $e[be-1]=ge.slice(be*ie),$e}l(g,"sectorify");function m(ge,ie,be){for(var $e=0,le=0,ke=0,je=0,ut=0,Qe=be.length,Ze=[],st=[];$e<Qe;++$e)Ze[$e]=st[$e]=$e,ie[$e]=be[$e];for(;ut<st.length;++ut)$e=st[ut],le=ge[$e].L,ke=ge[$e].R,je=ge[$e].C,Ze[$e]===$e&&(le!==-1&&Ze[le]!==le&&(Ze[$e]=Ze[le]),ke!==-1&&Ze[ke]!==ke&&(Ze[$e]=Ze[ke])),je!==-1&&(Ze[je]=$e),le!==-1&&$e!=Ze[$e]&&(Ze[le]=Ze[$e],st.lastIndexOf(le)<ut&&st.push(le)),ke!==-1&&$e!=Ze[$e]&&(Ze[ke]=Ze[$e],st.lastIndexOf(ke)<ut&&st.push(ke));for($e=1;$e<Qe;++$e)Ze[$e]===$e&&(ke!==-1&&Ze[ke]!==ke?Ze[$e]=Ze[ke]:le!==-1&&Ze[le]!==le&&(Ze[$e]=Ze[le]));for($e=1;$e<Qe;++$e)if(ge[$e].type!==0){if(ut=$e,ut!=Ze[ut])do ut=Ze[ut],ie[$e]=ie[ut]+"/"+ie[$e];while(ut!==0&&Ze[ut]!==-1&&ut!=Ze[ut]);Ze[$e]=-1}for(ie[0]+="/",$e=1;$e<Qe;++$e)ge[$e].type!==2&&(ie[$e]+="/")}l(m,"build_full_paths");function y(ge,ie,be){for(var $e=ge.start,le=ge.size,ke=[],je=$e;be&&le>0&&je>=0;)ke.push(ie.slice(je*R,je*R+R)),le-=R,je=qg(be,je*4);return ke.length===0?Gt(0):Ks(ke).slice(0,ge.size)}l(y,"get_mfat_entry");function v(ge,ie,be,$e,le){var ke=O;if(ge===O){if(ie!==0)throw new Error("DIFAT chain shorter than expected")}else if(ge!==-1){var je=be[ge],ut=($e>>>2)-1;if(!je)return;for(var Qe=0;Qe<ut&&(ke=qg(je,Qe*4))!==O;++Qe)le.push(ke);v(qg(je,$e-4),ie-1,be,$e,le)}}l(v,"sleuth_fat");function b(ge,ie,be,$e,le){var ke=[],je=[];le||(le=[]);var ut=$e-1,Qe=0,Ze=0;for(Qe=ie;Qe>=0;){le[Qe]=!0,ke[ke.length]=Qe,je.push(ge[Qe]);var st=be[Math.floor(Qe*4/$e)];if(Ze=Qe*4&ut,$e<4+Ze)throw new Error("FAT boundary crossed: "+Qe+" 4 "+$e);if(!ge[st])break;Qe=qg(ge[st],Ze)}return{nodes:ke,data:h0e([je])}}l(b,"get_sector_list");function w(ge,ie,be,$e){var le=ge.length,ke=[],je=[],ut=[],Qe=[],Ze=$e-1,st=0,Ct=0,Mt=0,Bt=0;for(st=0;st<le;++st)if(ut=[],Mt=st+ie,Mt>=le&&(Mt-=le),!je[Mt]){Qe=[];var Pt=[];for(Ct=Mt;Ct>=0;){Pt[Ct]=!0,je[Ct]=!0,ut[ut.length]=Ct,Qe.push(ge[Ct]);var Pe=be[Math.floor(Ct*4/$e)];if(Bt=Ct*4&Ze,$e<4+Bt)throw new Error("FAT boundary crossed: "+Ct+" 4 "+$e);if(!ge[Pe]||(Ct=qg(ge[Pe],Bt),Pt[Ct]))break}ke[Mt]={nodes:ut,data:h0e([Qe])}}return ke}l(w,"make_sector_list");function x(ge,ie,be,$e,le,ke,je,ut){for(var Qe=0,Ze=$e.length?2:0,st=ie[ge].data,Ct=0,Mt=0,Bt;Ct<st.length;Ct+=128){var Pt=st.slice(Ct,Ct+128);dc(Pt,64),Mt=Pt.read_shift(2),Bt=$B(Pt,0,Mt-Ze),$e.push(Bt);var Pe={name:Bt,type:Pt.read_shift(1),color:Pt.read_shift(1),L:Pt.read_shift(4,"i"),R:Pt.read_shift(4,"i"),C:Pt.read_shift(4,"i"),clsid:Pt.read_shift(16),state:Pt.read_shift(4,"i"),start:0,size:0},at=Pt.read_shift(2)+Pt.read_shift(2)+Pt.read_shift(2)+Pt.read_shift(2);at!==0&&(Pe.ct=T(Pt,Pt.l-8));var yt=Pt.read_shift(2)+Pt.read_shift(2)+Pt.read_shift(2)+Pt.read_shift(2);yt!==0&&(Pe.mt=T(Pt,Pt.l-8)),Pe.start=Pt.read_shift(4,"i"),Pe.size=Pt.read_shift(4,"i"),Pe.size<0&&Pe.start<0&&(Pe.size=Pe.type=0,Pe.start=O,Pe.name=""),Pe.type===5?(Qe=Pe.start,le>0&&Qe!==O&&(ie[Qe].name="!StreamData")):Pe.size>=4096?(Pe.storage="fat",ie[Pe.start]===void 0&&(ie[Pe.start]=b(be,Pe.start,ie.fat_addrs,ie.ssz)),ie[Pe.start].name=Pe.name,Pe.content=ie[Pe.start].data.slice(0,Pe.size)):(Pe.storage="minifat",Pe.size<0?Pe.size=0:Qe!==O&&Pe.start!==O&&ie[Qe]&&(Pe.content=y(Pe,ie[Qe].data,(ie[ut]||{}).data))),Pe.content&&dc(Pe.content,0),ke[Bt]=Pe,je.push(Pe)}}l(x,"read_directory");function T(ge,ie){return new Date((hc(ge,ie+4)/1e7*Math.pow(2,32)+hc(ge,ie)/1e7-11644473600)*1e3)}l(T,"read_date");function C(ge,ie){return h(),d(u.readFileSync(ge),ie)}l(C,"read_file");function S(ge,ie){var be=ie&&ie.type;switch(be||Xn&&Buffer.isBuffer(ge)&&(be="buffer"),be||"base64"){case"file":return C(ge,ie);case"base64":return d(Au(Vd(ge)),ie);case"binary":return d(Au(ge),ie)}return d(ge,ie)}l(S,"read");function E(ge,ie){var be=ie||{},$e=be.root||"Root Entry";if(ge.FullPaths||(ge.FullPaths=[]),ge.FileIndex||(ge.FileIndex=[]),ge.FullPaths.length!==ge.FileIndex.length)throw new Error("inconsistent CFB structure");ge.FullPaths.length===0&&(ge.FullPaths[0]=$e+"/",ge.FileIndex[0]={name:$e,type:5}),be.CLSID&&(ge.FileIndex[0].clsid=be.CLSID),k(ge)}l(E,"init_cfb");function k(ge){var ie="Sh33tJ5";if(!ma.find(ge,"/"+ie)){var be=Gt(4);be[0]=55,be[1]=be[3]=50,be[2]=54,ge.FileIndex.push({name:ie,type:2,content:be,size:4,L:69,R:69,C:69}),ge.FullPaths.push(ge.FullPaths[0]+ie),A(ge)}}l(k,"seed_cfb");function A(ge,ie){E(ge);for(var be=!1,$e=!1,le=ge.FullPaths.length-1;le>=0;--le){var ke=ge.FileIndex[le];switch(ke.type){case 0:$e?be=!0:(ge.FileIndex.pop(),ge.FullPaths.pop());break;case 1:case 2:case 5:$e=!0,isNaN(ke.R*ke.L*ke.C)&&(be=!0),ke.R>-1&&ke.L>-1&&ke.R==ke.L&&(be=!0);break;default:be=!0;break}}if(!(!be&&!ie)){var je=new Date(1987,1,19),ut=0,Qe=Object.create?Object.create(null):{},Ze=[];for(le=0;le<ge.FullPaths.length;++le)Qe[ge.FullPaths[le]]=!0,ge.FileIndex[le].type!==0&&Ze.push([ge.FullPaths[le],ge.FileIndex[le]]);for(le=0;le<Ze.length;++le){var st=n(Ze[le][0]);$e=Qe[st],$e||(Ze.push([st,{name:a(st).replace("/",""),type:1,clsid:z,ct:je,mt:je,content:null}]),Qe[st]=!0)}for(Ze.sort(function(Bt,Pt){return r(Bt[0],Pt[0])}),ge.FullPaths=[],ge.FileIndex=[],le=0;le<Ze.length;++le)ge.FullPaths[le]=Ze[le][0],ge.FileIndex[le]=Ze[le][1];for(le=0;le<Ze.length;++le){var Ct=ge.FileIndex[le],Mt=ge.FullPaths[le];if(Ct.name=a(Mt).replace("/",""),Ct.L=Ct.R=Ct.C=-(Ct.color=1),Ct.size=Ct.content?Ct.content.length:0,Ct.start=0,Ct.clsid=Ct.clsid||z,le===0)Ct.C=Ze.length>1?1:-1,Ct.size=0,Ct.type=5;else if(Mt.slice(-1)=="/"){for(ut=le+1;ut<Ze.length&&n(ge.FullPaths[ut])!=Mt;++ut);for(Ct.C=ut>=Ze.length?-1:ut,ut=le+1;ut<Ze.length&&n(ge.FullPaths[ut])!=n(Mt);++ut);Ct.R=ut>=Ze.length?-1:ut,Ct.type=1}else n(ge.FullPaths[le+1]||"")==n(Mt)&&(Ct.R=le+1),Ct.type=2}}}l(A,"rebuild_cfb");function I(ge,ie){var be=ie||{};if(be.fileType=="mad")return Me(ge,be);switch(A(ge),be.fileType){case"zip":return ht(ge,be)}var $e=function(Bt){for(var Pt=0,Pe=0,at=0;at<Bt.FileIndex.length;++at){var yt=Bt.FileIndex[at];if(yt.content){var Tt=yt.content.length;Tt>0&&(Tt<4096?Pt+=Tt+63>>6:Pe+=Tt+511>>9)}}for(var Nt=Bt.FullPaths.length+3>>2,zt=Pt+7>>3,Jt=Pt+127>>7,Ht=zt+Pe+Nt+Jt,wt=Ht+127>>7,_t=wt<=109?0:Math.ceil((wt-109)/127);Ht+wt+_t+127>>7>wt;)_t=++wt<=109?0:Math.ceil((wt-109)/127);var Ot=[1,_t,wt,Jt,Nt,Pe,Pt,0];return Bt.FileIndex[0].size=Pt<<6,Ot[7]=(Bt.FileIndex[0].start=Ot[0]+Ot[1]+Ot[2]+Ot[3]+Ot[4]+Ot[5])+(Ot[6]+7>>3),Ot}(ge),le=Gt($e[7]<<9),ke=0,je=0;{for(ke=0;ke<8;++ke)le.write_shift(1,P[ke]);for(ke=0;ke<8;++ke)le.write_shift(2,0);for(le.write_shift(2,62),le.write_shift(2,3),le.write_shift(2,65534),le.write_shift(2,9),le.write_shift(2,6),ke=0;ke<3;++ke)le.write_shift(2,0);for(le.write_shift(4,0),le.write_shift(4,$e[2]),le.write_shift(4,$e[0]+$e[1]+$e[2]+$e[3]-1),le.write_shift(4,0),le.write_shift(4,4096),le.write_shift(4,$e[3]?$e[0]+$e[1]+$e[2]-1:O),le.write_shift(4,$e[3]),le.write_shift(-4,$e[1]?$e[0]-1:O),le.write_shift(4,$e[1]),ke=0;ke<109;++ke)le.write_shift(-4,ke<$e[2]?$e[1]+ke:-1)}if($e[1])for(je=0;je<$e[1];++je){for(;ke<236+je*127;++ke)le.write_shift(-4,ke<$e[2]?$e[1]+ke:-1);le.write_shift(-4,je===$e[1]-1?O:je+1)}var ut=l(function(Bt){for(je+=Bt;ke<je-1;++ke)le.write_shift(-4,ke+1);Bt&&(++ke,le.write_shift(-4,O))},"chainit");for(je=ke=0,je+=$e[1];ke<je;++ke)le.write_shift(-4,D.DIFSECT);for(je+=$e[2];ke<je;++ke)le.write_shift(-4,D.FATSECT);ut($e[3]),ut($e[4]);for(var Qe=0,Ze=0,st=ge.FileIndex[0];Qe<ge.FileIndex.length;++Qe)st=ge.FileIndex[Qe],st.content&&(Ze=st.content.length,!(Ze<4096)&&(st.start=je,ut(Ze+511>>9)));for(ut($e[6]+7>>3);le.l&511;)le.write_shift(-4,D.ENDOFCHAIN);for(je=ke=0,Qe=0;Qe<ge.FileIndex.length;++Qe)st=ge.FileIndex[Qe],st.content&&(Ze=st.content.length,!(!Ze||Ze>=4096)&&(st.start=je,ut(Ze+63>>6)));for(;le.l&511;)le.write_shift(-4,D.ENDOFCHAIN);for(ke=0;ke<$e[4]<<2;++ke){var Ct=ge.FullPaths[ke];if(!Ct||Ct.length===0){for(Qe=0;Qe<17;++Qe)le.write_shift(4,0);for(Qe=0;Qe<3;++Qe)le.write_shift(4,-1);for(Qe=0;Qe<12;++Qe)le.write_shift(4,0);continue}st=ge.FileIndex[ke],ke===0&&(st.start=st.size?st.start-1:O);var Mt=ke===0&&be.root||st.name;if(Ze=2*(Mt.length+1),le.write_shift(64,Mt,"utf16le"),le.write_shift(2,Ze),le.write_shift(1,st.type),le.write_shift(1,st.color),le.write_shift(-4,st.L),le.write_shift(-4,st.R),le.write_shift(-4,st.C),st.clsid)le.write_shift(16,st.clsid,"hex");else for(Qe=0;Qe<4;++Qe)le.write_shift(4,0);le.write_shift(4,st.state||0),le.write_shift(4,0),le.write_shift(4,0),le.write_shift(4,0),le.write_shift(4,0),le.write_shift(4,st.start),le.write_shift(4,st.size),le.write_shift(4,0)}for(ke=1;ke<ge.FileIndex.length;++ke)if(st=ge.FileIndex[ke],st.size>=4096)if(le.l=st.start+1<<9,Xn&&Buffer.isBuffer(st.content))st.content.copy(le,le.l,0,st.size),le.l+=st.size+511&-512;else{for(Qe=0;Qe<st.size;++Qe)le.write_shift(1,st.content[Qe]);for(;Qe&511;++Qe)le.write_shift(1,0)}for(ke=1;ke<ge.FileIndex.length;++ke)if(st=ge.FileIndex[ke],st.size>0&&st.size<4096)if(Xn&&Buffer.isBuffer(st.content))st.content.copy(le,le.l,0,st.size),le.l+=st.size+63&-64;else{for(Qe=0;Qe<st.size;++Qe)le.write_shift(1,st.content[Qe]);for(;Qe&63;++Qe)le.write_shift(1,0)}if(Xn)le.l=le.length;else for(;le.l<le.length;)le.write_shift(1,0);return le}l(I,"_write");function L(ge,ie){var be=ge.FullPaths.map(function(Qe){return Qe.toUpperCase()}),$e=be.map(function(Qe){var Ze=Qe.split("/");return Ze[Ze.length-(Qe.slice(-1)=="/"?2:1)]}),le=!1;ie.charCodeAt(0)===47?(le=!0,ie=be[0].slice(0,-1)+ie):le=ie.indexOf("/")!==-1;var ke=ie.toUpperCase(),je=le===!0?be.indexOf(ke):$e.indexOf(ke);if(je!==-1)return ge.FileIndex[je];var ut=!ke.match(MA);for(ke=ke.replace(t4,""),ut&&(ke=ke.replace(MA,"!")),je=0;je<be.length;++je)if((ut?be[je].replace(MA,"!"):be[je]).replace(t4,"")==ke||(ut?$e[je].replace(MA,"!"):$e[je]).replace(t4,"")==ke)return ge.FileIndex[je];return null}l(L,"find");var R=64,O=-2,M="d0cf11e0a1b11ae1",P=[208,207,17,224,161,177,26,225],z="00000000000000000000000000000000",D={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:O,FREESECT:-1,HEADER_SIGNATURE:M,HEADER_MINOR_VERSION:"3e00",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:z,EntryTypes:["unknown","storage","stream","lockbytes","property","root"]};function B(ge,ie,be){h();var $e=I(ge,be);u.writeFileSync(ie,$e)}l(B,"write_file");function W(ge){for(var ie=new Array(ge.length),be=0;be<ge.length;++be)ie[be]=String.fromCharCode(ge[be]);return ie.join("")}l(W,"a2s");function U(ge,ie){var be=I(ge,ie);switch(ie&&ie.type||"buffer"){case"file":return h(),u.writeFileSync(ie.filename,be),be;case"binary":return typeof be=="string"?be:W(be);case"base64":return JS(typeof be=="string"?be:W(be));case"buffer":if(Xn)return Buffer.isBuffer(be)?be:Gd(be);case"array":return typeof be=="string"?Au(be):be}return be}l(U,"write");var j;function V(ge){try{var ie=ge.InflateRaw,be=new ie;if(be._processChunk(new Uint8Array([3,0]),be._finishFlushFlag),be.bytesRead)j=ge;else throw new Error("zlib does not expose bytesRead")}catch($e){console.error("cannot use native zlib: "+($e.message||$e))}}l(V,"use_zlib");function Y(ge,ie){if(!j)return et(ge,ie);var be=j.InflateRaw,$e=new be,le=$e._processChunk(ge.slice(ge.l),$e._finishFlushFlag);return ge.l+=$e.bytesRead,le}l(Y,"_inflateRawSync");function H(ge){return j?j.deflateRawSync(ge):Se(ge)}l(H,"_deflateRawSync");var q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Z=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258],K=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];function re(ge){var ie=(ge<<1|ge<<11)&139536|(ge<<5|ge<<15)&558144;return(ie>>16|ie>>8|ie)&255}l(re,"bit_swap_8");for(var Q=typeof Uint8Array!="undefined",te=Q?new Uint8Array(256):[],ee=0;ee<256;++ee)te[ee]=re(ee);function J(ge,ie){var be=te[ge&255];return ie<=8?be>>>8-ie:(be=be<<8|te[ge>>8&255],ie<=16?be>>>16-ie:(be=be<<8|te[ge>>16&255],be>>>24-ie))}l(J,"bit_swap_n");function ae(ge,ie){var be=ie&7,$e=ie>>>3;return(ge[$e]|(be<=6?0:ge[$e+1]<<8))>>>be&3}l(ae,"read_bits_2");function se(ge,ie){var be=ie&7,$e=ie>>>3;return(ge[$e]|(be<=5?0:ge[$e+1]<<8))>>>be&7}l(se,"read_bits_3");function fe(ge,ie){var be=ie&7,$e=ie>>>3;return(ge[$e]|(be<=4?0:ge[$e+1]<<8))>>>be&15}l(fe,"read_bits_4");function ve(ge,ie){var be=ie&7,$e=ie>>>3;return(ge[$e]|(be<=3?0:ge[$e+1]<<8))>>>be&31}l(ve,"read_bits_5");function de(ge,ie){var be=ie&7,$e=ie>>>3;return(ge[$e]|(be<=1?0:ge[$e+1]<<8))>>>be&127}l(de,"read_bits_7");function Ee(ge,ie,be){var $e=ie&7,le=ie>>>3,ke=(1<<be)-1,je=ge[le]>>>$e;return be<8-$e||(je|=ge[le+1]<<8-$e,be<16-$e)||(je|=ge[le+2]<<16-$e,be<24-$e)||(je|=ge[le+3]<<24-$e),je&ke}l(Ee,"read_bits_n");function Ce(ge,ie,be){var $e=ie&7,le=ie>>>3;return $e<=5?ge[le]|=(be&7)<<$e:(ge[le]|=be<<$e&255,ge[le+1]=(be&7)>>8-$e),ie+3}l(Ce,"write_bits_3");function De(ge,ie,be){var $e=ie&7,le=ie>>>3;return be=(be&1)<<$e,ge[le]|=be,ie+1}l(De,"write_bits_1");function ce(ge,ie,be){var $e=ie&7,le=ie>>>3;return be<<=$e,ge[le]|=be&255,be>>>=8,ge[le+1]=be,ie+8}l(ce,"write_bits_8");function Ie(ge,ie,be){var $e=ie&7,le=ie>>>3;return be<<=$e,ge[le]|=be&255,be>>>=8,ge[le+1]=be&255,ge[le+2]=be>>>8,ie+16}l(Ie,"write_bits_16");function ye(ge,ie){var be=ge.length,$e=2*be>ie?2*be:ie+5,le=0;if(be>=ie)return ge;if(Xn){var ke=$fe($e);if(ge.copy)ge.copy(ke);else for(;le<ge.length;++le)ke[le]=ge[le];return ke}else if(Q){var je=new Uint8Array($e);if(je.set)je.set(ge);else for(;le<be;++le)je[le]=ge[le];return je}return ge.length=$e,ge}l(ye,"realloc");function pe(ge){for(var ie=new Array(ge),be=0;be<ge;++be)ie[be]=0;return ie}l(pe,"zero_fill_array");function Ae(ge,ie,be){var $e=1,le=0,ke=0,je=0,ut=0,Qe=ge.length,Ze=Q?new Uint16Array(32):pe(32);for(ke=0;ke<32;++ke)Ze[ke]=0;for(ke=Qe;ke<be;++ke)ge[ke]=0;Qe=ge.length;var st=Q?new Uint16Array(Qe):pe(Qe);for(ke=0;ke<Qe;++ke)Ze[le=ge[ke]]++,$e<le&&($e=le),st[ke]=0;for(Ze[0]=0,ke=1;ke<=$e;++ke)Ze[ke+16]=ut=ut+Ze[ke-1]<<1;for(ke=0;ke<Qe;++ke)ut=ge[ke],ut!=0&&(st[ke]=Ze[ut+16]++);var Ct=0;for(ke=0;ke<Qe;++ke)if(Ct=ge[ke],Ct!=0)for(ut=J(st[ke],$e)>>$e-Ct,je=(1<<$e+4-Ct)-1;je>=0;--je)ie[ut|je<<Ct]=Ct&15|ke<<4;return $e}l(Ae,"build_tree");var Ve=Q?new Uint16Array(512):pe(512),ze=Q?new Uint16Array(32):pe(32);if(!Q){for(var We=0;We<512;++We)Ve[We]=0;for(We=0;We<32;++We)ze[We]=0}(function(){for(var ge=[],ie=0;ie<32;ie++)ge.push(5);Ae(ge,ze,32);var be=[];for(ie=0;ie<=143;ie++)be.push(8);for(;ie<=255;ie++)be.push(9);for(;ie<=279;ie++)be.push(7);for(;ie<=287;ie++)be.push(8);Ae(be,Ve,288)})();var me=l(function(){for(var ie=Q?new Uint8Array(32768):[],be=0,$e=0;be<K.length-1;++be)for(;$e<K[be+1];++$e)ie[$e]=be;for(;$e<32768;++$e)ie[$e]=29;var le=Q?new Uint8Array(259):[];for(be=0,$e=0;be<Z.length-1;++be)for(;$e<Z[be+1];++$e)le[$e]=be;function ke(ut,Qe){for(var Ze=0;Ze<ut.length;){var st=Math.min(65535,ut.length-Ze),Ct=Ze+st==ut.length;for(Qe.write_shift(1,+Ct),Qe.write_shift(2,st),Qe.write_shift(2,~st&65535);st-- >0;)Qe[Qe.l++]=ut[Ze++]}return Qe.l}l(ke,"write_stored");function je(ut,Qe){for(var Ze=0,st=0,Ct=Q?new Uint16Array(32768):[];st<ut.length;){var Mt=Math.min(65535,ut.length-st);if(Mt<10){for(Ze=Ce(Qe,Ze,+(st+Mt==ut.length)),Ze&7&&(Ze+=8-(Ze&7)),Qe.l=Ze/8|0,Qe.write_shift(2,Mt),Qe.write_shift(2,~Mt&65535);Mt-- >0;)Qe[Qe.l++]=ut[st++];Ze=Qe.l*8;continue}Ze=Ce(Qe,Ze,+(st+Mt==ut.length)+2);for(var Bt=0;Mt-- >0;){var Pt=ut[st];Bt=(Bt<<5^Pt)&32767;var Pe=-1,at=0;if((Pe=Ct[Bt])&&(Pe|=st&-32768,Pe>st&&(Pe-=32768),Pe<st))for(;ut[Pe+at]==ut[st+at]&&at<250;)++at;if(at>2){Pt=le[at],Pt<=22?Ze=ce(Qe,Ze,te[Pt+1]>>1)-1:(ce(Qe,Ze,3),Ze+=5,ce(Qe,Ze,te[Pt-23]>>5),Ze+=3);var yt=Pt<8?0:Pt-4>>2;yt>0&&(Ie(Qe,Ze,at-Z[Pt]),Ze+=yt),Pt=ie[st-Pe],Ze=ce(Qe,Ze,te[Pt]>>3),Ze-=3;var Tt=Pt<4?0:Pt-2>>1;Tt>0&&(Ie(Qe,Ze,st-Pe-K[Pt]),Ze+=Tt);for(var Nt=0;Nt<at;++Nt)Ct[Bt]=st&32767,Bt=(Bt<<5^ut[st])&32767,++st;Mt-=at-1}else Pt<=143?Pt=Pt+48:Ze=De(Qe,Ze,1),Ze=ce(Qe,Ze,te[Pt]),Ct[Bt]=st&32767,++st}Ze=ce(Qe,Ze,0)-1}return Qe.l=(Ze+7)/8|0,Qe.l}return l(je,"write_huff_fixed"),l(function(Qe,Ze){return Qe.length<8?ke(Qe,Ze):je(Qe,Ze)},"_deflateRaw")},"_deflateRawIIFE")();function Se(ge){var ie=Gt(50+Math.floor(ge.length*1.1)),be=me(ge,ie);return ie.slice(0,be)}l(Se,"_deflate");var ne=Q?new Uint16Array(32768):pe(32768),xe=Q?new Uint16Array(32768):pe(32768),oe=Q?new Uint16Array(128):pe(128),_e=1,ue=1;function tt(ge,ie){var be=ve(ge,ie)+257;ie+=5;var $e=ve(ge,ie)+1;ie+=5;var le=fe(ge,ie)+4;ie+=4;for(var ke=0,je=Q?new Uint8Array(19):pe(19),ut=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Qe=1,Ze=Q?new Uint8Array(8):pe(8),st=Q?new Uint8Array(8):pe(8),Ct=je.length,Mt=0;Mt<le;++Mt)je[q[Mt]]=ke=se(ge,ie),Qe<ke&&(Qe=ke),Ze[ke]++,ie+=3;var Bt=0;for(Ze[0]=0,Mt=1;Mt<=Qe;++Mt)st[Mt]=Bt=Bt+Ze[Mt-1]<<1;for(Mt=0;Mt<Ct;++Mt)(Bt=je[Mt])!=0&&(ut[Mt]=st[Bt]++);var Pt=0;for(Mt=0;Mt<Ct;++Mt)if(Pt=je[Mt],Pt!=0){Bt=te[ut[Mt]]>>8-Pt;for(var Pe=(1<<7-Pt)-1;Pe>=0;--Pe)oe[Bt|Pe<<Pt]=Pt&7|Mt<<3}var at=[];for(Qe=1;at.length<be+$e;)switch(Bt=oe[de(ge,ie)],ie+=Bt&7,Bt>>>=3){case 16:for(ke=3+ae(ge,ie),ie+=2,Bt=at[at.length-1];ke-- >0;)at.push(Bt);break;case 17:for(ke=3+se(ge,ie),ie+=3;ke-- >0;)at.push(0);break;case 18:for(ke=11+de(ge,ie),ie+=7;ke-- >0;)at.push(0);break;default:at.push(Bt),Qe<Bt&&(Qe=Bt);break}var yt=at.slice(0,be),Tt=at.slice(be);for(Mt=be;Mt<286;++Mt)yt[Mt]=0;for(Mt=$e;Mt<30;++Mt)Tt[Mt]=0;return _e=Ae(yt,ne,286),ue=Ae(Tt,xe,30),ie}l(tt,"dyn");function Re(ge,ie){if(ge[0]==3&&!(ge[1]&3))return[Gg(ie),2];for(var be=0,$e=0,le=$fe(ie||1<<18),ke=0,je=le.length>>>0,ut=0,Qe=0;!($e&1);){if($e=se(ge,be),be+=3,$e>>>1)$e>>1==1?(ut=9,Qe=5):(be=tt(ge,be),ut=_e,Qe=ue);else{be&7&&(be+=8-(be&7));var Ze=ge[be>>>3]|ge[(be>>>3)+1]<<8;if(be+=32,Ze>0)for(!ie&&je<ke+Ze&&(le=ye(le,ke+Ze),je=le.length);Ze-- >0;)le[ke++]=ge[be>>>3],be+=8;continue}for(;;){!ie&&je<ke+32767&&(le=ye(le,ke+32767),je=le.length);var st=Ee(ge,be,ut),Ct=$e>>>1==1?Ve[st]:ne[st];if(be+=Ct&15,Ct>>>=4,!(Ct>>>8&255))le[ke++]=Ct;else{if(Ct==256)break;Ct-=257;var Mt=Ct<8?0:Ct-4>>2;Mt>5&&(Mt=0);var Bt=ke+Z[Ct];Mt>0&&(Bt+=Ee(ge,be,Mt),be+=Mt),st=Ee(ge,be,Qe),Ct=$e>>>1==1?ze[st]:xe[st],be+=Ct&15,Ct>>>=4;var Pt=Ct<4?0:Ct-2>>1,Pe=K[Ct];for(Pt>0&&(Pe+=Ee(ge,be,Pt),be+=Pt),!ie&&je<Bt&&(le=ye(le,Bt+100),je=le.length);ke<Bt;)le[ke]=le[ke-Pe],++ke}}}return ie?[le,be+7>>>3]:[le.slice(0,ke),be+7>>>3]}l(Re,"inflate");function et(ge,ie){var be=ge.slice(ge.l||0),$e=Re(be,ie);return ge.l+=$e[1],$e[0]}l(et,"_inflate");function Xe(ge,ie){if(ge)typeof console!="undefined"&&console.error(ie);else throw new Error(ie)}l(Xe,"warn_or_throw");function ot(ge,ie){var be=ge;dc(be,0);var $e=[],le=[],ke={FileIndex:$e,FullPaths:le};E(ke,{root:ie.root});for(var je=be.length-4;(be[je]!=80||be[je+1]!=75||be[je+2]!=5||be[je+3]!=6)&&je>=0;)--je;be.l=je+4,be.l+=4;var ut=be.read_shift(2);be.l+=6;var Qe=be.read_shift(4);for(be.l=Qe,je=0;je<ut;++je){be.l+=20;var Ze=be.read_shift(4),st=be.read_shift(4),Ct=be.read_shift(2),Mt=be.read_shift(2),Bt=be.read_shift(2);be.l+=8;var Pt=be.read_shift(4),Pe=o(be.slice(be.l+Ct,be.l+Ct+Mt));be.l+=Ct+Mt+Bt;var at=be.l;be.l=Pt+4,Ge(be,Ze,st,ke,Pe),be.l=at}return ke}l(ot,"parse_zip");function Ge(ge,ie,be,$e,le){ge.l+=2;var ke=ge.read_shift(2),je=ge.read_shift(2),ut=s(ge);if(ke&8257)throw new Error("Unsupported ZIP encryption");for(var Qe=ge.read_shift(4),Ze=ge.read_shift(4),st=ge.read_shift(4),Ct=ge.read_shift(2),Mt=ge.read_shift(2),Bt="",Pt=0;Pt<Ct;++Pt)Bt+=String.fromCharCode(ge[ge.l++]);if(Mt){var Pe=o(ge.slice(ge.l,ge.l+Mt));(Pe[21589]||{}).mt&&(ut=Pe[21589].mt),((le||{})[21589]||{}).mt&&(ut=le[21589].mt)}ge.l+=Mt;var at=ge.slice(ge.l,ge.l+Ze);switch(je){case 8:at=Y(ge,st);break;case 0:break;default:throw new Error("Unsupported ZIP Compression method "+je)}var yt=!1;ke&8&&(Qe=ge.read_shift(4),Qe==134695760&&(Qe=ge.read_shift(4),yt=!0),Ze=ge.read_shift(4),st=ge.read_shift(4)),Ze!=ie&&Xe(yt,"Bad compressed size: "+ie+" != "+Ze),st!=be&&Xe(yt,"Bad uncompressed size: "+be+" != "+st),it($e,Bt,at,{unsafe:!0,mt:ut})}l(Ge,"parse_local_file");function ht(ge,ie){var be=ie||{},$e=[],le=[],ke=Gt(1),je=be.compression?8:0,ut=0,Qe=0,Ze=0,st=0,Ct=0,Mt=ge.FullPaths[0],Bt=Mt,Pt=ge.FileIndex[0],Pe=[],at=0;for(Qe=1;Qe<ge.FullPaths.length;++Qe)if(Bt=ge.FullPaths[Qe].slice(Mt.length),Pt=ge.FileIndex[Qe],!(!Pt.size||!Pt.content||Bt=="Sh33tJ5")){var yt=st,Tt=Gt(Bt.length);for(Ze=0;Ze<Bt.length;++Ze)Tt.write_shift(1,Bt.charCodeAt(Ze)&127);Tt=Tt.slice(0,Tt.l),Pe[Ct]=Cmt.buf(Pt.content,0);var Nt=Pt.content;je==8&&(Nt=H(Nt)),ke=Gt(30),ke.write_shift(4,67324752),ke.write_shift(2,20),ke.write_shift(2,ut),ke.write_shift(2,je),Pt.mt?i(ke,Pt.mt):ke.write_shift(4,0),ke.write_shift(-4,Pe[Ct]),ke.write_shift(4,Nt.length),ke.write_shift(4,Pt.content.length),ke.write_shift(2,Tt.length),ke.write_shift(2,0),st+=ke.length,$e.push(ke),st+=Tt.length,$e.push(Tt),st+=Nt.length,$e.push(Nt),ke=Gt(46),ke.write_shift(4,33639248),ke.write_shift(2,0),ke.write_shift(2,20),ke.write_shift(2,ut),ke.write_shift(2,je),ke.write_shift(4,0),ke.write_shift(-4,Pe[Ct]),ke.write_shift(4,Nt.length),ke.write_shift(4,Pt.content.length),ke.write_shift(2,Tt.length),ke.write_shift(2,0),ke.write_shift(2,0),ke.write_shift(2,0),ke.write_shift(2,0),ke.write_shift(4,0),ke.write_shift(4,yt),at+=ke.l,le.push(ke),at+=Tt.length,le.push(Tt),++Ct}return ke=Gt(22),ke.write_shift(4,101010256),ke.write_shift(2,0),ke.write_shift(2,0),ke.write_shift(2,Ct),ke.write_shift(2,Ct),ke.write_shift(4,at),ke.write_shift(4,st),ke.write_shift(2,0),Ks([Ks($e),Ks(le),ke])}l(ht,"write_zip");var Je={htm:"text/html",xml:"text/xml",gif:"image/gif",jpg:"image/jpeg",png:"image/png",mso:"application/x-mso",thmx:"application/vnd.ms-officetheme",sh33tj5:"application/octet-stream"};function St(ge,ie){if(ge.ctype)return ge.ctype;var be=ge.name||"",$e=be.match(/\.([^\.]+)$/);return $e&&Je[$e[1]]||ie&&($e=(be=ie).match(/[\.\\]([^\.\\])+$/),$e&&Je[$e[1]])?Je[$e[1]]:"application/octet-stream"}l(St,"get_content_type");function He(ge){for(var ie=JS(ge),be=[],$e=0;$e<ie.length;$e+=76)be.push(ie.slice($e,$e+76));return be.join(`\r
|
||
`)+`\r
|
||
`}l(He,"write_base64_76");function dt(ge){var ie=ge.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g,function(Ze){var st=Ze.charCodeAt(0).toString(16).toUpperCase();return"="+(st.length==1?"0"+st:st)});ie=ie.replace(/ $/mg,"=20").replace(/\t$/mg,"=09"),ie.charAt(0)==`
|
||
`&&(ie="=0D"+ie.slice(1)),ie=ie.replace(/\r(?!\n)/mg,"=0D").replace(/\n\n/mg,`
|
||
=0A`).replace(/([^\r\n])\n/mg,"$1=0A");for(var be=[],$e=ie.split(`\r
|
||
`),le=0;le<$e.length;++le){var ke=$e[le];if(ke.length==0){be.push("");continue}for(var je=0;je<ke.length;){var ut=76,Qe=ke.slice(je,je+ut);Qe.charAt(ut-1)=="="?ut--:Qe.charAt(ut-2)=="="?ut-=2:Qe.charAt(ut-3)=="="&&(ut-=3),Qe=ke.slice(je,je+ut),je+=ut,je<ke.length&&(Qe+="="),be.push(Qe)}}return be.join(`\r
|
||
`)}l(dt,"write_quoted_printable");function Oe(ge){for(var ie=[],be=0;be<ge.length;++be){for(var $e=ge[be];be<=ge.length&&$e.charAt($e.length-1)=="=";)$e=$e.slice(0,$e.length-1)+ge[++be];ie.push($e)}for(var le=0;le<ie.length;++le)ie[le]=ie[le].replace(/[=][0-9A-Fa-f]{2}/g,function(ke){return String.fromCharCode(parseInt(ke.slice(1),16))});return Au(ie.join(`\r
|
||
`))}l(Oe,"parse_quoted_printable");function vt(ge,ie,be){for(var $e="",le="",ke="",je,ut=0;ut<10;++ut){var Qe=ie[ut];if(!Qe||Qe.match(/^\s*$/))break;var Ze=Qe.match(/^(.*?):\s*([^\s].*)$/);if(Ze)switch(Ze[1].toLowerCase()){case"content-location":$e=Ze[2].trim();break;case"content-type":ke=Ze[2].trim();break;case"content-transfer-encoding":le=Ze[2].trim();break}}switch(++ut,le.toLowerCase()){case"base64":je=Au(Vd(ie.slice(ut).join("")));break;case"quoted-printable":je=Oe(ie.slice(ut));break;default:throw new Error("Unsupported Content-Transfer-Encoding "+le)}var st=it(ge,$e.slice(be.length),je,{unsafe:!0});ke&&(st.ctype=ke)}l(vt,"parse_mime");function qe(ge,ie){if(W(ge.slice(0,13)).toLowerCase()!="mime-version:")throw new Error("Unsupported MAD header");var be=ie&&ie.root||"",$e=(Xn&&Buffer.isBuffer(ge)?ge.toString("binary"):W(ge)).split(`\r
|
||
`),le=0,ke="";for(le=0;le<$e.length;++le)if(ke=$e[le],!!/^Content-Location:/i.test(ke)&&(ke=ke.slice(ke.indexOf("file")),be||(be=ke.slice(0,ke.lastIndexOf("/")+1)),ke.slice(0,be.length)!=be))for(;be.length>0&&(be=be.slice(0,be.length-1),be=be.slice(0,be.lastIndexOf("/")+1),ke.slice(0,be.length)!=be););var je=($e[1]||"").match(/boundary="(.*?)"/);if(!je)throw new Error("MAD cannot find boundary");var ut="--"+(je[1]||""),Qe=[],Ze=[],st={FileIndex:Qe,FullPaths:Ze};E(st);var Ct,Mt=0;for(le=0;le<$e.length;++le){var Bt=$e[le];Bt!==ut&&Bt!==ut+"--"||(Mt++&&vt(st,$e.slice(Ct,le),be),Ct=le)}return st}l(qe,"parse_mad");function Me(ge,ie){var be=ie||{},$e=be.boundary||"SheetJS";$e="------="+$e;for(var le=["MIME-Version: 1.0",'Content-Type: multipart/related; boundary="'+$e.slice(2)+'"',"","",""],ke=ge.FullPaths[0],je=ke,ut=ge.FileIndex[0],Qe=1;Qe<ge.FullPaths.length;++Qe)if(je=ge.FullPaths[Qe].slice(ke.length),ut=ge.FileIndex[Qe],!(!ut.size||!ut.content||je=="Sh33tJ5")){je=je.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g,function(at){return"_x"+at.charCodeAt(0).toString(16)+"_"}).replace(/[\u0080-\uFFFF]/g,function(at){return"_u"+at.charCodeAt(0).toString(16)+"_"});for(var Ze=ut.content,st=Xn&&Buffer.isBuffer(Ze)?Ze.toString("binary"):W(Ze),Ct=0,Mt=Math.min(1024,st.length),Bt=0,Pt=0;Pt<=Mt;++Pt)(Bt=st.charCodeAt(Pt))>=32&&Bt<128&&++Ct;var Pe=Ct>=Mt*4/5;le.push($e),le.push("Content-Location: "+(be.root||"file:///C:/SheetJS/")+je),le.push("Content-Transfer-Encoding: "+(Pe?"quoted-printable":"base64")),le.push("Content-Type: "+St(ut,je)),le.push(""),le.push(Pe?dt(st):He(st))}return le.push($e+`--\r
|
||
`),le.join(`\r
|
||
`)}l(Me,"write_mad");function lt(ge){var ie={};return E(ie,ge),ie}l(lt,"cfb_new");function it(ge,ie,be,$e){var le=$e&&$e.unsafe;le||E(ge);var ke=!le&&ma.find(ge,ie);if(!ke){var je=ge.FullPaths[0];ie.slice(0,je.length)==je?je=ie:(je.slice(-1)!="/"&&(je+="/"),je=(je+ie).replace("//","/")),ke={name:a(ie),type:2},ge.FileIndex.push(ke),ge.FullPaths.push(je),le||ma.utils.cfb_gc(ge)}return ke.content=be,ke.size=be?be.length:0,$e&&($e.CLSID&&(ke.clsid=$e.CLSID),$e.mt&&(ke.mt=$e.mt),$e.ct&&(ke.ct=$e.ct)),ke}l(it,"cfb_add");function Ue(ge,ie){E(ge);var be=ma.find(ge,ie);if(be){for(var $e=0;$e<ge.FileIndex.length;++$e)if(ge.FileIndex[$e]==be)return ge.FileIndex.splice($e,1),ge.FullPaths.splice($e,1),!0}return!1}l(Ue,"cfb_del");function we(ge,ie,be){E(ge);var $e=ma.find(ge,ie);if($e){for(var le=0;le<ge.FileIndex.length;++le)if(ge.FileIndex[le]==$e)return ge.FileIndex[le].name=a(be),ge.FullPaths[le]=be,!0}return!1}l(we,"cfb_mov");function gt(ge){A(ge,!0)}return l(gt,"cfb_gc"),e.find=L,e.read=S,e.parse=d,e.write=U,e.writeFile=B,e.utils={cfb_new:lt,cfb_add:it,cfb_del:Ue,cfb_mov:we,cfb_gc:gt,ReadShift:c4,CheckField:k0e,prep_blob:dc,bconcat:Ks,use_zlib:V,_deflateRaw:Se,_inflateRaw:et,consts:D},e},"_CFB")();function Smt(t){return typeof t=="string"?$A(t):Array.isArray(t)?Zgt(t):t}l(Smt,"blobify");function r4(t,e,r){if(typeof Deno!="undefined"){if(r&&typeof e=="string")switch(r){case"utf8":e=new TextEncoder(r).encode(e);break;case"binary":e=$A(e);break;default:throw new Error("Unsupported encoding "+r)}return Deno.writeFileSync(t,e)}var n=r=="utf8"?i4(e):e;if(typeof IE_SaveFile!="undefined")return IE_SaveFile(n,t);if(typeof Blob!="undefined"){var a=new Blob([Smt(n)],{type:"application/octet-stream"});if(typeof navigator!="undefined"&&navigator.msSaveBlob)return navigator.msSaveBlob(a,t);if(typeof saveAs!="undefined")return saveAs(a,t);if(typeof URL!="undefined"&&typeof document!="undefined"&&document.createElement&&URL.createObjectURL){var i=URL.createObjectURL(a);if(typeof chrome=="object"&&typeof(chrome.downloads||{}).download=="function")return URL.revokeObjectURL&&typeof setTimeout!="undefined"&&setTimeout(function(){URL.revokeObjectURL(i)},6e4),chrome.downloads.download({url:i,filename:t,saveAs:!0});var s=document.createElement("a");if(s.download!=null)return s.download=t,s.href=i,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL&&typeof setTimeout!="undefined"&&setTimeout(function(){URL.revokeObjectURL(i)},6e4),i}}if(typeof $!="undefined"&&typeof File!="undefined"&&typeof Folder!="undefined")try{var o=File(t);return o.open("w"),o.encoding="binary",Array.isArray(e)&&(e=e4(e)),o.write(e),o.close(),e}catch(u){if(!u.message||!u.message.match(/onstruct/))throw u}throw new Error("cannot save file "+t)}l(r4,"write_dl");function Xs(t){for(var e=Object.keys(t),r=[],n=0;n<e.length;++n)Object.prototype.hasOwnProperty.call(t,e[n])&&r.push(e[n]);return r}l(Xs,"keys$2");function Jfe(t,e){for(var r=[],n=Xs(t),a=0;a!==n.length;++a)r[t[n[a]][e]]==null&&(r[t[n[a]][e]]=n[a]);return r}l(Jfe,"evert_key");function _B(t){for(var e=[],r=Xs(t),n=0;n!==r.length;++n)e[t[r[n]]]=r[n];return e}l(_B,"evert");function zA(t){for(var e=[],r=Xs(t),n=0;n!==r.length;++n)e[t[r[n]]]=parseInt(r[n],10);return e}l(zA,"evert_num");function _mt(t){for(var e=[],r=Xs(t),n=0;n!==r.length;++n)e[t[r[n]]]==null&&(e[t[r[n]]]=[]),e[t[r[n]]].push(r[n]);return e}l(_mt,"evert_arr");var HA=new Date(1899,11,30,0,0,0);function Ol(t,e){var r=t.getTime(),n=HA.getTime()+(t.getTimezoneOffset()-HA.getTimezoneOffset())*6e4;return(r-n)/864e5}l(Ol,"datenum");var e0e=new Date,kmt=HA.getTime()+(e0e.getTimezoneOffset()-HA.getTimezoneOffset())*6e4,t0e=e0e.getTimezoneOffset();function r0e(t){var e=new Date;return e.setTime(t*24*60*60*1e3+kmt),e.getTimezoneOffset()!==t0e&&e.setTime(e.getTime()+(e.getTimezoneOffset()-t0e)*6e4),e}l(r0e,"numdate");var n0e=new Date("2017-02-19T19:06:09.000Z"),a0e=isNaN(n0e.getFullYear())?new Date("2/19/17"):n0e,Amt=a0e.getFullYear()==2017;function Uo(t,e){var r=new Date(t);if(Amt)return e>0?r.setTime(r.getTime()+r.getTimezoneOffset()*60*1e3):e<0&&r.setTime(r.getTime()-r.getTimezoneOffset()*60*1e3),r;if(t instanceof Date)return t;if(a0e.getFullYear()==1917&&!isNaN(r.getFullYear())){var n=r.getFullYear();return t.indexOf(""+n)>-1||r.setFullYear(r.getFullYear()+100),r}var a=t.match(/\d+/g)||["2017","2","19","0","0","0"],i=new Date(+a[0],+a[1]-1,+a[2],+a[3]||0,+a[4]||0,+a[5]||0);return t.indexOf("Z")>-1&&(i=new Date(i.getTime()-i.getTimezoneOffset()*60*1e3)),i}l(Uo,"parseDate");function WA(t,e){if(Xn&&Buffer.isBuffer(t))return t.toString("binary");if(typeof TextDecoder!="undefined")try{var r={"€":"","‚":"",ƒ:"","„":"","…":"
","†":"","‡":"","ˆ":"","‰":"",Š:"","‹":"",Œ:"",Ž:"","‘":"","’":"","“":"","”":"","•":"","–":"","—":"","˜":"","™":"",š:"","›":"",œ:"",ž:"",Ÿ:""};return Array.isArray(t)&&(t=new Uint8Array(t)),new TextDecoder("latin1").decode(t).replace(/[€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ]/g,function(i){return r[i]||i})}catch(i){}for(var n=[],a=0;a!=t.length;++a)n.push(String.fromCharCode(t[a]));return n.join("")}l(WA,"cc2str");function Dl(t){if(typeof JSON!="undefined"&&!Array.isArray(t))return JSON.parse(JSON.stringify(t));if(typeof t!="object"||t==null)return t;if(t instanceof Date)return new Date(t.getTime());var e={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=Dl(t[r]));return e}l(Dl,"dup");function mi(t,e){for(var r="";r.length<e;)r+=t;return r}l(mi,"fill");function Yd(t){var e=Number(t);if(!isNaN(e))return isFinite(e)?e:NaN;if(!/\d/.test(t))return e;var r=1,n=t.replace(/([\d]),([\d])/g,"$1$2").replace(/[$]/g,"").replace(/[%]/g,function(){return r*=100,""});return!isNaN(e=Number(n))||(n=n.replace(/[(](.*)[)]/,function(a,i){return r=-r,i}),!isNaN(e=Number(n)))?e/r:e}l(Yd,"fuzzynum");var Nmt=["january","february","march","april","may","june","july","august","september","october","november","december"];function n4(t){var e=new Date(t),r=new Date(NaN),n=e.getYear(),a=e.getMonth(),i=e.getDate();if(isNaN(i))return r;var s=t.toLowerCase();if(s.match(/jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec/)){if(s=s.replace(/[^a-z]/g,"").replace(/([^a-z]|^)[ap]m?([^a-z]|$)/,""),s.length>3&&Nmt.indexOf(s)==-1)return r}else if(s.match(/[a-z]/))return r;return n<0||n>8099?r:(a>0||i>1)&&n!=101?e:t.match(/[^-0-9:,\/\\]/)?r:e}l(n4,"fuzzydate");function un(t,e,r){if(t.FullPaths){if(typeof r=="string"){var n;return Xn?n=Gd(r):n=Qgt(r),ma.utils.cfb_add(t,e,n)}ma.utils.cfb_add(t,e,r)}else t.file(e,r)}l(un,"zip_add_file");function kB(){return ma.utils.cfb_new()}l(kB,"zip_new");var Gi=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
|
||
`,Imt={""":'"',"'":"'",">":">","<":"<","&":"&"},AB=_B(Imt),NB=/[&<>'"]/g,Lmt=/[\u0000-\u0008\u000b-\u001f]/g;function la(t){var e=t+"";return e.replace(NB,function(r){return AB[r]}).replace(Lmt,function(r){return"_x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+"_"})}l(la,"escapexml");function i0e(t){return la(t).replace(/ /g,"_x0020_")}l(i0e,"escapexmltag");var s0e=/[\u0000-\u001f]/g;function $mt(t){var e=t+"";return e.replace(NB,function(r){return AB[r]}).replace(/\n/g,"<br/>").replace(s0e,function(r){return"&#x"+("000"+r.charCodeAt(0).toString(16)).slice(-4)+";"})}l($mt,"escapehtml");function Mmt(t){var e=t+"";return e.replace(NB,function(r){return AB[r]}).replace(s0e,function(r){return"&#x"+r.charCodeAt(0).toString(16).toUpperCase()+";"})}l(Mmt,"escapexlml");function Pmt(t){return t.replace(/(\r\n|[\r\n])/g," ")}l(Pmt,"xlml_unfixstr");function Rmt(t){switch(t){case 1:case!0:case"1":case"true":case"TRUE":return!0;default:return!1}}l(Rmt,"parsexmlbool");function IB(t){for(var e="",r=0,n=0,a=0,i=0,s=0,o=0;r<t.length;){if(n=t.charCodeAt(r++),n<128){e+=String.fromCharCode(n);continue}if(a=t.charCodeAt(r++),n>191&&n<224){s=(n&31)<<6,s|=a&63,e+=String.fromCharCode(s);continue}if(i=t.charCodeAt(r++),n<240){e+=String.fromCharCode((n&15)<<12|(a&63)<<6|i&63);continue}s=t.charCodeAt(r++),o=((n&7)<<18|(a&63)<<12|(i&63)<<6|s&63)-65536,e+=String.fromCharCode(55296+(o>>>10&1023)),e+=String.fromCharCode(56320+(o&1023))}return e}l(IB,"utf8reada");function o0e(t){var e=Gg(2*t.length),r,n,a=1,i=0,s=0,o;for(n=0;n<t.length;n+=a)a=1,(o=t.charCodeAt(n))<128?r=o:o<224?(r=(o&31)*64+(t.charCodeAt(n+1)&63),a=2):o<240?(r=(o&15)*4096+(t.charCodeAt(n+1)&63)*64+(t.charCodeAt(n+2)&63),a=3):(a=4,r=(o&7)*262144+(t.charCodeAt(n+1)&63)*4096+(t.charCodeAt(n+2)&63)*64+(t.charCodeAt(n+3)&63),r-=65536,s=55296+(r>>>10&1023),r=56320+(r&1023)),s!==0&&(e[i++]=s&255,e[i++]=s>>>8,s=0),e[i++]=r%256,e[i++]=r>>>8;return e.slice(0,i).toString("ucs2")}l(o0e,"utf8readb");function l0e(t){return Gd(t,"binary").toString("utf8")}l(l0e,"utf8readc");var VA="foo bar bazâð£",a4=Xn&&(l0e(VA)==IB(VA)&&l0e||o0e(VA)==IB(VA)&&o0e)||IB,i4=Xn?function(t){return Gd(t,"utf8").toString("binary")}:function(t){for(var e=[],r=0,n=0,a=0;r<t.length;)switch(n=t.charCodeAt(r++),!0){case n<128:e.push(String.fromCharCode(n));break;case n<2048:e.push(String.fromCharCode(192+(n>>6))),e.push(String.fromCharCode(128+(n&63)));break;case(n>=55296&&n<57344):n-=55296,a=t.charCodeAt(r++)-56320+(n<<10),e.push(String.fromCharCode(240+(a>>18&7))),e.push(String.fromCharCode(144+(a>>12&63))),e.push(String.fromCharCode(128+(a>>6&63))),e.push(String.fromCharCode(128+(a&63)));break;default:e.push(String.fromCharCode(224+(n>>12))),e.push(String.fromCharCode(128+(n>>6&63))),e.push(String.fromCharCode(128+(n&63)))}return e.join("")},Omt=function(){var t=[["nbsp"," "],["middot","·"],["quot",'"'],["apos","'"],["gt",">"],["lt","<"],["amp","&"]].map(function(e){return[new RegExp("&"+e[0]+";","ig"),e[1]]});return l(function(r){for(var n=r.replace(/^[\t\n\r ]+/,"").replace(/[\t\n\r ]+$/,"").replace(/>\s+/g,">").replace(/\s+</g,"<").replace(/[\t\n\r ]+/g," ").replace(/<\s*[bB][rR]\s*\/?>/g,`
|
||
`).replace(/<[^>]*>/g,""),a=0;a<t.length;++a)n=n.replace(t[a][0],t[a][1]);return n},"htmldecode")}(),c0e=/(^\s|\s$|\n)/;function Zs(t,e){return"<"+t+(e.match(c0e)?' xml:space="preserve"':"")+">"+e+"</"+t+">"}l(Zs,"writetag");function s4(t){return Xs(t).map(function(e){return" "+e+'="'+t[e]+'"'}).join("")}l(s4,"wxt_helper");function fr(t,e,r){return"<"+t+(r!=null?s4(r):"")+(e!=null?(e.match(c0e)?' xml:space="preserve"':"")+">"+e+"</"+t:"/")+">"}l(fr,"writextag");function LB(t,e){try{return t.toISOString().replace(/\.\d*/,"")}catch(r){if(e)throw r}return""}l(LB,"write_w3cdtf");function Dmt(t,e){switch(typeof t){case"string":var r=fr("vt:lpwstr",la(t));return r=r.replace(/"/g,"_x0022_"),r;case"number":return fr((t|0)==t?"vt:i4":"vt:r8",la(String(t)));case"boolean":return fr("vt:bool",t?"true":"false")}if(t instanceof Date)return fr("vt:filetime",LB(t));throw new Error("Unable to serialize "+t)}l(Dmt,"write_vt");var Cs={CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",CT:"http://schemas.openxmlformats.org/package/2006/content-types",RELS:"http://schemas.openxmlformats.org/package/2006/relationships",TCMNT:"http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes",xsi:"http://www.w3.org/2001/XMLSchema-instance",xsd:"http://www.w3.org/2001/XMLSchema"},Qx=["http://schemas.openxmlformats.org/spreadsheetml/2006/main","http://purl.oclc.org/ooxml/spreadsheetml/main","http://schemas.microsoft.com/office/excel/2006/main","http://schemas.microsoft.com/office/excel/2006/2"],uc={o:"urn:schemas-microsoft-com:office:office",x:"urn:schemas-microsoft-com:office:excel",ss:"urn:schemas-microsoft-com:office:spreadsheet",dt:"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882",mv:"http://macVmlSchemaUri",v:"urn:schemas-microsoft-com:vml",html:"http://www.w3.org/TR/REC-html40"};function Fmt(t,e){for(var r=1-2*(t[e+7]>>>7),n=((t[e+7]&127)<<4)+(t[e+6]>>>4&15),a=t[e+6]&15,i=5;i>=0;--i)a=a*256+t[e+i];return n==2047?a==0?r*(1/0):NaN:(n==0?n=-1022:(n-=1023,a+=Math.pow(2,52)),r*Math.pow(2,n-52)*a)}l(Fmt,"read_double_le");function Bmt(t,e,r){var n=(e<0||1/e==-1/0?1:0)<<7,a=0,i=0,s=n?-e:e;isFinite(s)?s==0?a=i=0:(a=Math.floor(Math.log(s)/Math.LN2),i=s*Math.pow(2,52-a),a<=-1023&&(!isFinite(i)||i<Math.pow(2,52))?a=-1022:(i-=Math.pow(2,52),a+=1023)):(a=2047,i=isNaN(e)?26985:0);for(var o=0;o<=5;++o,i/=256)t[r+o]=i&255;t[r+6]=(a&15)<<4|i&15,t[r+7]=a>>4|n}l(Bmt,"write_double_le");var u0e=l(function(t){for(var e=[],r=10240,n=0;n<t[0].length;++n)if(t[0][n])for(var a=0,i=t[0][n].length;a<i;a+=r)e.push.apply(e,t[0][n].slice(a,a+r));return e},"___toBuffer"),h0e=Xn?function(t){return t[0].length>0&&Buffer.isBuffer(t[0][0])?Buffer.concat(t[0].map(function(e){return Buffer.isBuffer(e)?e:Gd(e)})):u0e(t)}:u0e,d0e=l(function(t,e,r){for(var n=[],a=e;a<r;a+=2)n.push(String.fromCharCode(l4(t,a)));return n.join("").replace(t4,"")},"___utf16le"),$B=Xn?function(t,e,r){return Buffer.isBuffer(t)?t.toString("utf16le",e,r).replace(t4,""):d0e(t,e,r)}:d0e,f0e=l(function(t,e,r){for(var n=[],a=e;a<e+r;++a)n.push(("0"+t[a].toString(16)).slice(-2));return n.join("")},"___hexlify"),p0e=Xn?function(t,e,r){return Buffer.isBuffer(t)?t.toString("hex",e,e+r):f0e(t,e,r)}:f0e,g0e=l(function(t,e,r){for(var n=[],a=e;a<r;a++)n.push(String.fromCharCode(Jx(t,a)));return n.join("")},"___utf8"),o4=Xn?l(function(e,r,n){return Buffer.isBuffer(e)?e.toString("utf8",r,n):g0e(e,r,n)},"utf8_b"):g0e,m0e=l(function(t,e){var r=hc(t,e);return r>0?o4(t,e+4,e+4+r-1):""},"___lpstr"),y0e=m0e,v0e=l(function(t,e){var r=hc(t,e);return r>0?o4(t,e+4,e+4+r-1):""},"___cpstr"),b0e=v0e,x0e=l(function(t,e){var r=2*hc(t,e);return r>0?o4(t,e+4,e+4+r-1):""},"___lpwstr"),w0e=x0e,T0e=l(function(e,r){var n=hc(e,r);return n>0?$B(e,r+4,r+4+n):""},"lpp4_"),E0e=T0e,C0e=l(function(t,e){var r=hc(t,e);return r>0?o4(t,e+4,e+4+r):""},"___8lpp4"),S0e=C0e,_0e=l(function(t,e){return Fmt(t,e)},"___double"),GA=_0e,MB=l(function(e){return Array.isArray(e)||typeof Uint8Array!="undefined"&&e instanceof Uint8Array},"is_buf_a");Xn&&(y0e=l(function(e,r){if(!Buffer.isBuffer(e))return m0e(e,r);var n=e.readUInt32LE(r);return n>0?e.toString("utf8",r+4,r+4+n-1):""},"lpstr_b"),b0e=l(function(e,r){if(!Buffer.isBuffer(e))return v0e(e,r);var n=e.readUInt32LE(r);return n>0?e.toString("utf8",r+4,r+4+n-1):""},"cpstr_b"),w0e=l(function(e,r){if(!Buffer.isBuffer(e))return x0e(e,r);var n=2*e.readUInt32LE(r);return e.toString("utf16le",r+4,r+4+n-1)},"lpwstr_b"),E0e=l(function(e,r){if(!Buffer.isBuffer(e))return T0e(e,r);var n=e.readUInt32LE(r);return e.toString("utf16le",r+4,r+4+n)},"lpp4_b"),S0e=l(function(e,r){if(!Buffer.isBuffer(e))return C0e(e,r);var n=e.readUInt32LE(r);return e.toString("utf8",r+4,r+4+n)},"lpp4_8b"),GA=l(function(e,r){return Buffer.isBuffer(e)?e.readDoubleLE(r):_0e(e,r)},"double_"),MB=l(function(e){return Buffer.isBuffer(e)||Array.isArray(e)||typeof Uint8Array!="undefined"&&e instanceof Uint8Array},"is_buf_b"));var Jx=l(function(t,e){return t[e]},"__readUInt8"),l4=l(function(t,e){return t[e+1]*256+t[e]},"__readUInt16LE"),zmt=l(function(t,e){var r=t[e+1]*256+t[e];return r<32768?r:(65535-r+1)*-1},"__readInt16LE"),hc=l(function(t,e){return t[e+3]*(1<<24)+(t[e+2]<<16)+(t[e+1]<<8)+t[e]},"__readUInt32LE"),qg=l(function(t,e){return t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]},"__readInt32LE"),Hmt=l(function(t,e){return t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]},"__readInt32BE");function c4(t,e){var r="",n,a,i=[],s,o,u,h;switch(e){case"dbcs":if(h=this.l,Xn&&Buffer.isBuffer(this))r=this.slice(this.l,this.l+2*t).toString("utf16le");else for(u=0;u<t;++u)r+=String.fromCharCode(l4(this,h)),h+=2;t*=2;break;case"utf8":r=o4(this,this.l,this.l+t);break;case"utf16le":t*=2,r=$B(this,this.l,this.l+t);break;case"wstr":return c4.call(this,t,"dbcs");case"lpstr-ansi":r=y0e(this,this.l),t=4+hc(this,this.l);break;case"lpstr-cp":r=b0e(this,this.l),t=4+hc(this,this.l);break;case"lpwstr":r=w0e(this,this.l),t=4+2*hc(this,this.l);break;case"lpp4":t=4+hc(this,this.l),r=E0e(this,this.l),t&2&&(t+=2);break;case"8lpp4":t=4+hc(this,this.l),r=S0e(this,this.l),t&3&&(t+=4-(t&3));break;case"cstr":for(t=0,r="";(s=Jx(this,this.l+t++))!==0;)i.push(IA(s));r=i.join("");break;case"_wstr":for(t=0,r="";(s=l4(this,this.l+t))!==0;)i.push(IA(s)),t+=2;t+=2,r=i.join("");break;case"dbcs-cont":for(r="",h=this.l,u=0;u<t;++u){if(this.lens&&this.lens.indexOf(h)!==-1)return s=Jx(this,h),this.l=h+1,o=c4.call(this,t-u,s?"dbcs-cont":"sbcs-cont"),i.join("")+o;i.push(IA(l4(this,h))),h+=2}r=i.join(""),t*=2;break;case"cpstr":case"sbcs-cont":for(r="",h=this.l,u=0;u!=t;++u){if(this.lens&&this.lens.indexOf(h)!==-1)return s=Jx(this,h),this.l=h+1,o=c4.call(this,t-u,s?"dbcs-cont":"sbcs-cont"),i.join("")+o;i.push(IA(Jx(this,h))),h+=1}r=i.join("");break;default:switch(t){case 1:return n=Jx(this,this.l),this.l++,n;case 2:return n=(e==="i"?zmt:l4)(this,this.l),this.l+=2,n;case 4:case-4:return e==="i"||!(this[this.l+3]&128)?(n=(t>0?qg:Hmt)(this,this.l),this.l+=4,n):(a=hc(this,this.l),this.l+=4,a);case 8:case-8:if(e==="f")return t==8?a=GA(this,this.l):a=GA([this[this.l+7],this[this.l+6],this[this.l+5],this[this.l+4],this[this.l+3],this[this.l+2],this[this.l+1],this[this.l+0]],0),this.l+=8,a;t=8;case 16:r=p0e(this,this.l,t);break}}return this.l+=t,r}l(c4,"ReadShift");var Wmt=l(function(t,e,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24&255},"__writeUInt32LE"),Vmt=l(function(t,e,r){t[r]=e&255,t[r+1]=e>>8&255,t[r+2]=e>>16&255,t[r+3]=e>>24&255},"__writeInt32LE"),Gmt=l(function(t,e,r){t[r]=e&255,t[r+1]=e>>>8&255},"__writeUInt16LE");function qmt(t,e,r){var n=0,a=0;if(r==="dbcs"){for(a=0;a!=e.length;++a)Gmt(this,e.charCodeAt(a),this.l+2*a);n=2*e.length}else if(r==="sbcs"){for(e=e.replace(/[^\x00-\x7F]/g,"_"),a=0;a!=e.length;++a)this[this.l+a]=e.charCodeAt(a)&255;n=e.length}else if(r==="hex"){for(;a<t;++a)this[this.l++]=parseInt(e.slice(2*a,2*a+2),16)||0;return this}else if(r==="utf16le"){var i=Math.min(this.l+t,this.length);for(a=0;a<Math.min(e.length,t);++a){var s=e.charCodeAt(a);this[this.l++]=s&255,this[this.l++]=s>>8}for(;this.l<i;)this[this.l++]=0;return this}else switch(t){case 1:n=1,this[this.l]=e&255;break;case 2:n=2,this[this.l]=e&255,e>>>=8,this[this.l+1]=e&255;break;case 3:n=3,this[this.l]=e&255,e>>>=8,this[this.l+1]=e&255,e>>>=8,this[this.l+2]=e&255;break;case 4:n=4,Wmt(this,e,this.l);break;case 8:if(n=8,r==="f"){Bmt(this,e,this.l);break}case 16:break;case-4:n=4,Vmt(this,e,this.l);break}return this.l+=n,this}l(qmt,"WriteShift");function k0e(t,e){var r=p0e(this,this.l,t.length>>1);if(r!==t)throw new Error(e+"Expected "+t+" saw "+r);this.l+=t.length>>1}l(k0e,"CheckField");function dc(t,e){t.l=e,t.read_shift=c4,t.chk=k0e,t.write_shift=qmt}l(dc,"prep_blob");function _h(t,e){t.l+=e}l(_h,"parsenoop");function Gt(t){var e=Gg(t);return dc(e,0),e}l(Gt,"new_buf");function Fl(){var t=[],e=Xn?256:2048,r=l(function(h){var d=Gt(h);return dc(d,0),d},"ba_newblk"),n=r(e),a=l(function(){n&&(n.length>n.l&&(n=n.slice(0,n.l),n.l=n.length),n.length>0&&t.push(n),n=null)},"ba_endbuf"),i=l(function(h){return n&&h<n.length-n.l?n:(a(),n=r(Math.max(h+1,e)))},"ba_next"),s=l(function(){return a(),Ks(t)},"ba_end"),o=l(function(h){a(),n=h,n.l==null&&(n.l=n.length),i(e)},"ba_push");return{next:i,push:o,end:s,_bufs:t}}l(Fl,"buf_array");function tr(t,e,r,n){var a=+e,i;if(!isNaN(a)){n||(n=Fxt[a].p||(r||[]).length||0),i=1+(a>=128?1:0)+1,n>=128&&++i,n>=16384&&++i,n>=2097152&&++i;var s=t.next(i);a<=127?s.write_shift(1,a):(s.write_shift(1,(a&127)+128),s.write_shift(1,a>>7));for(var o=0;o!=4;++o)if(n>=128)s.write_shift(1,(n&127)+128),n>>=7;else{s.write_shift(1,n);break}n>0&&MB(r)&&t.push(r)}}l(tr,"write_record");function u4(t,e,r){var n=Dl(t);if(e.s?(n.cRel&&(n.c+=e.s.c),n.rRel&&(n.r+=e.s.r)):(n.cRel&&(n.c+=e.c),n.rRel&&(n.r+=e.r)),!r||r.biff<12){for(;n.c>=256;)n.c-=256;for(;n.r>=65536;)n.r-=65536}return n}l(u4,"shift_cell_xls");function A0e(t,e,r){var n=Dl(t);return n.s=u4(n.s,e.s,r),n.e=u4(n.e,e.s,r),n}l(A0e,"shift_range_xls");function h4(t,e){if(t.cRel&&t.c<0)for(t=Dl(t);t.c<0;)t.c+=e>8?16384:256;if(t.rRel&&t.r<0)for(t=Dl(t);t.r<0;)t.r+=e>8?1048576:e>5?65536:16384;var r=ca(t);return!t.cRel&&t.cRel!=null&&(r=jmt(r)),!t.rRel&&t.rRel!=null&&(r=Ymt(r)),r}l(h4,"encode_cell_xls");function PB(t,e){return t.s.r==0&&!t.s.rRel&&t.e.r==(e.biff>=12?1048575:e.biff>=8?65536:16384)&&!t.e.rRel?(t.s.cRel?"":"$")+Co(t.s.c)+":"+(t.e.cRel?"":"$")+Co(t.e.c):t.s.c==0&&!t.s.cRel&&t.e.c==(e.biff>=12?16383:255)&&!t.e.cRel?(t.s.rRel?"":"$")+Qs(t.s.r)+":"+(t.e.rRel?"":"$")+Qs(t.e.r):h4(t.s,e.biff)+":"+h4(t.e,e.biff)}l(PB,"encode_range_xls");function RB(t){return parseInt(Umt(t),10)-1}l(RB,"decode_row");function Qs(t){return""+(t+1)}l(Qs,"encode_row");function Ymt(t){return t.replace(/([A-Z]|^)(\d+)$/,"$1$$$2")}l(Ymt,"fix_row");function Umt(t){return t.replace(/\$(\d+)$/,"$1")}l(Umt,"unfix_row");function OB(t){for(var e=Kmt(t),r=0,n=0;n!==e.length;++n)r=26*r+e.charCodeAt(n)-64;return r-1}l(OB,"decode_col");function Co(t){if(t<0)throw new Error("invalid column "+t);var e="";for(++t;t;t=Math.floor((t-1)/26))e=String.fromCharCode((t-1)%26+65)+e;return e}l(Co,"encode_col");function jmt(t){return t.replace(/^([A-Z])/,"$$$1")}l(jmt,"fix_col");function Kmt(t){return t.replace(/^\$([A-Z])/,"$1")}l(Kmt,"unfix_col");function Xmt(t){return t.replace(/(\$?[A-Z]*)(\$?\d*)/,"$1,$2").split(",")}l(Xmt,"split_cell");function Ss(t){for(var e=0,r=0,n=0;n<t.length;++n){var a=t.charCodeAt(n);a>=48&&a<=57?e=10*e+(a-48):a>=65&&a<=90&&(r=26*r+(a-64))}return{c:r-1,r:e-1}}l(Ss,"decode_cell");function ca(t){for(var e=t.c+1,r="";e;e=(e-1)/26|0)r=String.fromCharCode((e-1)%26+65)+r;return r+(t.r+1)}l(ca,"encode_cell");function fc(t){var e=t.indexOf(":");return e==-1?{s:Ss(t),e:Ss(t)}:{s:Ss(t.slice(0,e)),e:Ss(t.slice(e+1))}}l(fc,"decode_range");function qi(t,e){return typeof e=="undefined"||typeof e=="number"?qi(t.s,t.e):(typeof t!="string"&&(t=ca(t)),typeof e!="string"&&(e=ca(e)),t==e?t:t+":"+e)}l(qi,"encode_range");function Ba(t){var e={s:{c:0,r:0},e:{c:0,r:0}},r=0,n=0,a=0,i=t.length;for(r=0;n<i&&!((a=t.charCodeAt(n)-64)<1||a>26);++n)r=26*r+a;for(e.s.c=--r,r=0;n<i&&!((a=t.charCodeAt(n)-48)<0||a>9);++n)r=10*r+a;if(e.s.r=--r,n===i||a!=10)return e.e.c=e.s.c,e.e.r=e.s.r,e;for(++n,r=0;n!=i&&!((a=t.charCodeAt(n)-64)<1||a>26);++n)r=26*r+a;for(e.e.c=--r,r=0;n!=i&&!((a=t.charCodeAt(n)-48)<0||a>9);++n)r=10*r+a;return e.e.r=--r,e}l(Ba,"safe_decode_range");function N0e(t,e){var r=t.t=="d"&&e instanceof Date;if(t.z!=null)try{return t.w=D0(t.z,r?Ol(e):e)}catch(n){}try{return t.w=D0((t.XF||{}).numFmtId||(r?14:0),r?Ol(e):e)}catch(n){return""+e}}l(N0e,"safe_format_cell");function Ud(t,e,r){return t==null||t.t==null||t.t=="z"?"":t.w!==void 0?t.w:(t.t=="d"&&!t.z&&r&&r.dateNF&&(t.z=r.dateNF),t.t=="e"?d4[t.v]||t.v:e==null?N0e(t,t.v):N0e(t,e))}l(Ud,"format_cell");function Yg(t,e){var r=e&&e.sheet?e.sheet:"Sheet1",n={};return n[r]=t,{SheetNames:[r],Sheets:n}}l(Yg,"sheet_to_workbook");function I0e(t,e,r){var n=r||{},a=t?Array.isArray(t):n.dense,i=t||(a?[]:{}),s=0,o=0;if(i&&n.origin!=null){if(typeof n.origin=="number")s=n.origin;else{var u=typeof n.origin=="string"?Ss(n.origin):n.origin;s=u.r,o=u.c}i["!ref"]||(i["!ref"]="A1:A1")}var h={s:{c:1e7,r:1e7},e:{c:0,r:0}};if(i["!ref"]){var d=Ba(i["!ref"]);h.s.c=d.s.c,h.s.r=d.s.r,h.e.c=Math.max(h.e.c,d.e.c),h.e.r=Math.max(h.e.r,d.e.r),s==-1&&(h.e.r=s=d.e.r+1)}for(var f=0;f!=e.length;++f)if(e[f]){if(!Array.isArray(e[f]))throw new Error("aoa_to_sheet expects an array of arrays");for(var p=0;p!=e[f].length;++p)if(typeof e[f][p]!="undefined"){var g={v:e[f][p]},m=s+f,y=o+p;if(h.s.r>m&&(h.s.r=m),h.s.c>y&&(h.s.c=y),h.e.r<m&&(h.e.r=m),h.e.c<y&&(h.e.c=y),e[f][p]&&typeof e[f][p]=="object"&&!Array.isArray(e[f][p])&&!(e[f][p]instanceof Date))g=e[f][p];else if(Array.isArray(g.v)&&(g.f=e[f][p][1],g.v=g.v[0]),g.v===null)if(g.f)g.t="n";else if(n.nullError)g.t="e",g.v=0;else if(n.sheetStubs)g.t="z";else continue;else typeof g.v=="number"?g.t="n":typeof g.v=="boolean"?g.t="b":g.v instanceof Date?(g.z=n.dateNF||gi[14],n.cellDates?(g.t="d",g.w=D0(g.z,Ol(g.v))):(g.t="n",g.v=Ol(g.v),g.w=D0(g.z,g.v))):g.t="s";if(a)i[m]||(i[m]=[]),i[m][y]&&i[m][y].z&&(g.z=i[m][y].z),i[m][y]=g;else{var v=ca({c:y,r:m});i[v]&&i[v].z&&(g.z=i[v].z),i[v]=g}}}return h.s.c<1e7&&(i["!ref"]=qi(h)),i}l(I0e,"sheet_add_aoa");function ew(t,e){return I0e(null,t,e)}l(ew,"aoa_to_sheet");function Zmt(t){return t.read_shift(4,"i")}l(Zmt,"parse_Int32LE");function Iu(t,e){return e||(e=Gt(4)),e.write_shift(4,t),e}l(Iu,"write_UInt32LE");function So(t){var e=t.read_shift(4);return e===0?"":t.read_shift(e,"dbcs")}l(So,"parse_XLWideString");function _s(t,e){var r=!1;return e==null&&(r=!0,e=Gt(4+2*t.length)),e.write_shift(4,t.length),t.length>0&&e.write_shift(0,t,"dbcs"),r?e.slice(0,e.l):e}l(_s,"write_XLWideString");function Qmt(t){return{ich:t.read_shift(2),ifnt:t.read_shift(2)}}l(Qmt,"parse_StrRun");function Jmt(t,e){return e||(e=Gt(4)),e.write_shift(2,0),e.write_shift(2,0),e}l(Jmt,"write_StrRun");function DB(t,e){var r=t.l,n=t.read_shift(1),a=So(t),i=[],s={t:a,h:a};if(n&1){for(var o=t.read_shift(4),u=0;u!=o;++u)i.push(Qmt(t));s.r=i}else s.r=[{ich:0,ifnt:0}];return t.l=r+e,s}l(DB,"parse_RichStr");function e1t(t,e){var r=!1;return e==null&&(r=!0,e=Gt(15+4*t.t.length)),e.write_shift(1,0),_s(t.t,e),r?e.slice(0,e.l):e}l(e1t,"write_RichStr");var t1t=DB;function r1t(t,e){var r=!1;return e==null&&(r=!0,e=Gt(23+4*t.t.length)),e.write_shift(1,1),_s(t.t,e),e.write_shift(4,1),Jmt({},e),r?e.slice(0,e.l):e}l(r1t,"write_BrtCommentText");function Yc(t){var e=t.read_shift(4),r=t.read_shift(2);return r+=t.read_shift(1)<<16,t.l++,{c:e,iStyleRef:r}}l(Yc,"parse_XLSBCell");function Ug(t,e){return e==null&&(e=Gt(8)),e.write_shift(-4,t.c),e.write_shift(3,t.iStyleRef||t.s),e.write_shift(1,0),e}l(Ug,"write_XLSBCell");function jg(t){var e=t.read_shift(2);return e+=t.read_shift(1)<<16,t.l++,{c:-1,iStyleRef:e}}l(jg,"parse_XLSBShortCell");function Kg(t,e){return e==null&&(e=Gt(4)),e.write_shift(3,t.iStyleRef||t.s),e.write_shift(1,0),e}l(Kg,"write_XLSBShortCell");var n1t=So,L0e=_s;function FB(t){var e=t.read_shift(4);return e===0||e===4294967295?"":t.read_shift(e,"dbcs")}l(FB,"parse_XLNullableWideString");function qA(t,e){var r=!1;return e==null&&(r=!0,e=Gt(127)),e.write_shift(4,t.length>0?t.length:4294967295),t.length>0&&e.write_shift(0,t,"dbcs"),r?e.slice(0,e.l):e}l(qA,"write_XLNullableWideString");var a1t=So,BB=FB,zB=qA;function $0e(t){var e=t.slice(t.l,t.l+4),r=e[0]&1,n=e[0]&2;t.l+=4;var a=n===0?GA([0,0,0,0,e[0]&252,e[1],e[2],e[3]],0):qg(e,0)>>2;return r?a/100:a}l($0e,"parse_RkNumber");function M0e(t,e){e==null&&(e=Gt(4));var r=0,n=0,a=t*100;if(t==(t|0)&&t>=-536870912&&t<536870912?n=1:a==(a|0)&&a>=-536870912&&a<536870912&&(n=1,r=1),n)e.write_shift(-4,((r?a:t)<<2)+(r+2));else throw new Error("unsupported RkNumber "+t)}l(M0e,"write_RkNumber");function P0e(t){var e={s:{},e:{}};return e.s.r=t.read_shift(4),e.e.r=t.read_shift(4),e.s.c=t.read_shift(4),e.e.c=t.read_shift(4),e}l(P0e,"parse_RfX");function i1t(t,e){return e||(e=Gt(16)),e.write_shift(4,t.s.r),e.write_shift(4,t.e.r),e.write_shift(4,t.s.c),e.write_shift(4,t.e.c),e}l(i1t,"write_RfX");var Xg=P0e,tw=i1t;function rw(t){if(t.length-t.l<8)throw"XLS Xnum Buffer underflow";return t.read_shift(8,"f")}l(rw,"parse_Xnum");function Zg(t,e){return(e||Gt(8)).write_shift(8,t,"f")}l(Zg,"write_Xnum");function s1t(t){var e={},r=t.read_shift(1),n=r>>>1,a=t.read_shift(1),i=t.read_shift(2,"i"),s=t.read_shift(1),o=t.read_shift(1),u=t.read_shift(1);switch(t.l++,n){case 0:e.auto=1;break;case 1:e.index=a;var h=g1t[a];h&&(e.rgb=cpe(h));break;case 2:e.rgb=cpe([s,o,u]);break;case 3:e.theme=a;break}return i!=0&&(e.tint=i>0?i/32767:i/32768),e}l(s1t,"parse_BrtColor");function YA(t,e){if(e||(e=Gt(8)),!t||t.auto)return e.write_shift(4,0),e.write_shift(4,0),e;t.index!=null?(e.write_shift(1,2),e.write_shift(1,t.index)):t.theme!=null?(e.write_shift(1,6),e.write_shift(1,t.theme)):(e.write_shift(1,5),e.write_shift(1,0));var r=t.tint||0;if(r>0?r*=32767:r<0&&(r*=32768),e.write_shift(2,r),!t.rgb||t.theme!=null)e.write_shift(2,0),e.write_shift(1,0),e.write_shift(1,0);else{var n=t.rgb||"FFFFFF";typeof n=="number"&&(n=("000000"+n.toString(16)).slice(-6)),e.write_shift(1,parseInt(n.slice(0,2),16)),e.write_shift(1,parseInt(n.slice(2,4),16)),e.write_shift(1,parseInt(n.slice(4,6),16)),e.write_shift(1,255)}return e}l(YA,"write_BrtColor");function o1t(t){var e=t.read_shift(1);t.l++;var r={fBold:e&1,fItalic:e&2,fUnderline:e&4,fStrikeout:e&8,fOutline:e&16,fShadow:e&32,fCondense:e&64,fExtend:e&128};return r}l(o1t,"parse_FontFlags");function l1t(t,e){e||(e=Gt(2));var r=(t.italic?2:0)|(t.strike?8:0)|(t.outline?16:0)|(t.shadow?32:0)|(t.condense?64:0)|(t.extend?128:0);return e.write_shift(1,r),e.write_shift(1,0),e}l(l1t,"write_FontFlags");var R0e=2,pc=3,UA=11,jA=19,KA=64,c1t=65,u1t=71,h1t=4108,d1t=4126,Js=80,O0e={1:{n:"CodePage",t:R0e},2:{n:"Category",t:Js},3:{n:"PresentationFormat",t:Js},4:{n:"ByteCount",t:pc},5:{n:"LineCount",t:pc},6:{n:"ParagraphCount",t:pc},7:{n:"SlideCount",t:pc},8:{n:"NoteCount",t:pc},9:{n:"HiddenCount",t:pc},10:{n:"MultimediaClipCount",t:pc},11:{n:"ScaleCrop",t:UA},12:{n:"HeadingPairs",t:h1t},13:{n:"TitlesOfParts",t:d1t},14:{n:"Manager",t:Js},15:{n:"Company",t:Js},16:{n:"LinksUpToDate",t:UA},17:{n:"CharacterCount",t:pc},19:{n:"SharedDoc",t:UA},22:{n:"HyperlinksChanged",t:UA},23:{n:"AppVersion",t:pc,p:"version"},24:{n:"DigSig",t:c1t},26:{n:"ContentType",t:Js},27:{n:"ContentStatus",t:Js},28:{n:"Language",t:Js},29:{n:"Version",t:Js},255:{},2147483648:{n:"Locale",t:jA},2147483651:{n:"Behavior",t:jA},1919054434:{}},D0e={1:{n:"CodePage",t:R0e},2:{n:"Title",t:Js},3:{n:"Subject",t:Js},4:{n:"Author",t:Js},5:{n:"Keywords",t:Js},6:{n:"Comments",t:Js},7:{n:"Template",t:Js},8:{n:"LastAuthor",t:Js},9:{n:"RevNumber",t:Js},10:{n:"EditTime",t:KA},11:{n:"LastPrinted",t:KA},12:{n:"CreatedDate",t:KA},13:{n:"ModifiedDate",t:KA},14:{n:"PageCount",t:pc},15:{n:"WordCount",t:pc},16:{n:"CharCount",t:pc},17:{n:"Thumbnail",t:u1t},18:{n:"Application",t:Js},19:{n:"DocSecurity",t:pc},255:{},2147483648:{n:"Locale",t:jA},2147483651:{n:"Behavior",t:jA},1919054434:{}};function f1t(t){return t.map(function(e){return[e>>16&255,e>>8&255,e&255]})}l(f1t,"rgbify");var p1t=f1t([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),g1t=Dl(p1t),d4={0:"#NULL!",7:"#DIV/0!",15:"#VALUE!",23:"#REF!",29:"#NAME?",36:"#NUM!",42:"#N/A",43:"#GETTING_DATA",255:"#WTF?"},m1t={"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":"workbooks","application/vnd.ms-excel.sheet.macroEnabled.main+xml":"workbooks","application/vnd.ms-excel.sheet.binary.macroEnabled.main":"workbooks","application/vnd.ms-excel.addin.macroEnabled.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":"workbooks","application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":"sheets","application/vnd.ms-excel.worksheet":"sheets","application/vnd.ms-excel.binIndexWs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":"charts","application/vnd.ms-excel.chartsheet":"charts","application/vnd.ms-excel.macrosheet+xml":"macros","application/vnd.ms-excel.macrosheet":"macros","application/vnd.ms-excel.intlmacrosheet":"TODO","application/vnd.ms-excel.binIndexMs":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":"dialogs","application/vnd.ms-excel.dialogsheet":"dialogs","application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml":"strs","application/vnd.ms-excel.sharedStrings":"strs","application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":"styles","application/vnd.ms-excel.styles":"styles","application/vnd.openxmlformats-package.core-properties+xml":"coreprops","application/vnd.openxmlformats-officedocument.custom-properties+xml":"custprops","application/vnd.openxmlformats-officedocument.extended-properties+xml":"extprops","application/vnd.openxmlformats-officedocument.customXmlProperties+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":"comments","application/vnd.ms-excel.comments":"comments","application/vnd.ms-excel.threadedcomments+xml":"threadedcomments","application/vnd.ms-excel.person+xml":"people","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml":"metadata","application/vnd.ms-excel.sheetMetadata":"metadata","application/vnd.ms-excel.pivotTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.chart+xml":"TODO","application/vnd.ms-office.chartcolorstyle+xml":"TODO","application/vnd.ms-office.chartstyle+xml":"TODO","application/vnd.ms-office.chartex+xml":"TODO","application/vnd.ms-excel.calcChain":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml":"calcchains","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings":"TODO","application/vnd.ms-office.activeX":"TODO","application/vnd.ms-office.activeX+xml":"TODO","application/vnd.ms-excel.attachedToolbars":"TODO","application/vnd.ms-excel.connections":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":"TODO","application/vnd.ms-excel.externalLink":"links","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml":"links","application/vnd.ms-excel.pivotCacheDefinition":"TODO","application/vnd.ms-excel.pivotCacheRecords":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml":"TODO","application/vnd.ms-excel.queryTable":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml":"TODO","application/vnd.ms-excel.userNames":"TODO","application/vnd.ms-excel.revisionHeaders":"TODO","application/vnd.ms-excel.revisionLog":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml":"TODO","application/vnd.ms-excel.tableSingleCells":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml":"TODO","application/vnd.ms-excel.slicer":"TODO","application/vnd.ms-excel.slicerCache":"TODO","application/vnd.ms-excel.slicer+xml":"TODO","application/vnd.ms-excel.slicerCache+xml":"TODO","application/vnd.ms-excel.wsSortMap":"TODO","application/vnd.ms-excel.table":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":"TODO","application/vnd.openxmlformats-officedocument.theme+xml":"themes","application/vnd.openxmlformats-officedocument.themeOverride+xml":"TODO","application/vnd.ms-excel.Timeline+xml":"TODO","application/vnd.ms-excel.TimelineCache+xml":"TODO","application/vnd.ms-office.vbaProject":"vba","application/vnd.ms-office.vbaProjectSignature":"TODO","application/vnd.ms-office.volatileDependencies":"TODO","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml":"TODO","application/vnd.ms-excel.controlproperties+xml":"TODO","application/vnd.openxmlformats-officedocument.model+data":"TODO","application/vnd.ms-excel.Survey+xml":"TODO","application/vnd.openxmlformats-officedocument.drawing+xml":"drawings","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml":"TODO","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml":"TODO","application/vnd.openxmlformats-officedocument.vmlDrawing":"TODO","application/vnd.openxmlformats-package.relationships+xml":"rels","application/vnd.openxmlformats-officedocument.oleObject":"TODO","image/png":"TODO",sheet:"js"},XA={workbooks:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",xlsm:"application/vnd.ms-excel.sheet.macroEnabled.main+xml",xlsb:"application/vnd.ms-excel.sheet.binary.macroEnabled.main",xlam:"application/vnd.ms-excel.addin.macroEnabled.main+xml",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml"},strs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",xlsb:"application/vnd.ms-excel.sharedStrings"},comments:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",xlsb:"application/vnd.ms-excel.comments"},sheets:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",xlsb:"application/vnd.ms-excel.worksheet"},charts:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml",xlsb:"application/vnd.ms-excel.chartsheet"},dialogs:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml",xlsb:"application/vnd.ms-excel.dialogsheet"},macros:{xlsx:"application/vnd.ms-excel.macrosheet+xml",xlsb:"application/vnd.ms-excel.macrosheet"},metadata:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",xlsb:"application/vnd.ms-excel.sheetMetadata"},styles:{xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",xlsb:"application/vnd.ms-excel.styles"}};function F0e(){return{workbooks:[],sheets:[],charts:[],dialogs:[],macros:[],rels:[],strs:[],comments:[],threadedcomments:[],links:[],coreprops:[],extprops:[],custprops:[],themes:[],styles:[],calcchains:[],vba:[],drawings:[],metadata:[],people:[],TODO:[],xmlns:""}}l(F0e,"new_ct");function B0e(t,e){var r=_mt(m1t),n=[],a;n[n.length]=Gi,n[n.length]=fr("Types",null,{xmlns:Cs.CT,"xmlns:xsd":Cs.xsd,"xmlns:xsi":Cs.xsi}),n=n.concat([["xml","application/xml"],["bin","application/vnd.ms-excel.sheet.binary.macroEnabled.main"],["vml","application/vnd.openxmlformats-officedocument.vmlDrawing"],["data","application/vnd.openxmlformats-officedocument.model+data"],["bmp","image/bmp"],["png","image/png"],["gif","image/gif"],["emf","image/x-emf"],["wmf","image/x-wmf"],["jpg","image/jpeg"],["jpeg","image/jpeg"],["tif","image/tiff"],["tiff","image/tiff"],["pdf","application/pdf"],["rels","application/vnd.openxmlformats-package.relationships+xml"]].map(function(u){return fr("Default",null,{Extension:u[0],ContentType:u[1]})}));var i=l(function(u){t[u]&&t[u].length>0&&(a=t[u][0],n[n.length]=fr("Override",null,{PartName:(a[0]=="/"?"":"/")+a,ContentType:XA[u][e.bookType]||XA[u].xlsx}))},"f1"),s=l(function(u){(t[u]||[]).forEach(function(h){n[n.length]=fr("Override",null,{PartName:(h[0]=="/"?"":"/")+h,ContentType:XA[u][e.bookType]||XA[u].xlsx})})},"f2"),o=l(function(u){(t[u]||[]).forEach(function(h){n[n.length]=fr("Override",null,{PartName:(h[0]=="/"?"":"/")+h,ContentType:r[u][0]})})},"f3");return i("workbooks"),s("sheets"),s("charts"),o("themes"),["strs","styles"].forEach(i),["coreprops","extprops","custprops"].forEach(o),o("vba"),o("comments"),o("threadedcomments"),o("drawings"),s("metadata"),o("people"),n.length>2&&(n[n.length]="</Types>",n[1]=n[1].replace("/>",">")),n.join("")}l(B0e,"write_ct");var Gn={WB:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",HLINK:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",VML:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",XPATH:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath",XMISS:"http://schemas.microsoft.com/office/2006/relationships/xlExternalLinkPath/xlPathMissing",CMNT:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",CORE_PROPS:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",EXT_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",CUST_PROPS:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties",SST:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",STY:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",THEME:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",WS:["http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet","http://purl.oclc.org/ooxml/officeDocument/relationships/worksheet"],DRAW:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",XLMETA:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",TCMNT:"http://schemas.microsoft.com/office/2017/10/relationships/threadedComment",PEOPLE:"http://schemas.microsoft.com/office/2017/10/relationships/person",VBA:"http://schemas.microsoft.com/office/2006/relationships/vbaProject"};function z0e(t){var e=t.lastIndexOf("/");return t.slice(0,e+1)+"_rels/"+t.slice(e+1)+".rels"}l(z0e,"get_rels_path");function nw(t){var e=[Gi,fr("Relationships",null,{xmlns:Cs.RELS})];return Xs(t["!id"]).forEach(function(r){e[e.length]=fr("Relationship",null,t["!id"][r])}),e.length>2&&(e[e.length]="</Relationships>",e[1]=e[1].replace("/>",">")),e.join("")}l(nw,"write_rels");function ua(t,e,r,n,a,i){if(a||(a={}),t["!id"]||(t["!id"]={}),t["!idx"]||(t["!idx"]=1),e<0)for(e=t["!idx"];t["!id"]["rId"+e];++e);if(t["!idx"]=e+1,a.Id="rId"+e,a.Type=n,a.Target=r,[Gn.HLINK,Gn.XPATH,Gn.XMISS].indexOf(a.Type)>-1&&(a.TargetMode="External"),t["!id"][a.Id])throw new Error("Cannot rewrite rId "+e);return t["!id"][a.Id]=a,t[("/"+a.Target).replace("//","/")]=a,e}l(ua,"add_rels");function y1t(t){var e=[Gi];e.push(`<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2">
|
||
`),e.push(` <manifest:file-entry manifest:full-path="/" manifest:version="1.2" manifest:media-type="application/vnd.oasis.opendocument.spreadsheet"/>
|
||
`);for(var r=0;r<t.length;++r)e.push(' <manifest:file-entry manifest:full-path="'+t[r][0]+'" manifest:media-type="'+t[r][1]+`"/>
|
||
`);return e.push("</manifest:manifest>"),e.join("")}l(y1t,"write_manifest");function H0e(t,e,r){return[' <rdf:Description rdf:about="'+t+`">
|
||
`,' <rdf:type rdf:resource="http://docs.oasis-open.org/ns/office/1.2/meta/'+(r||"odf")+"#"+e+`"/>
|
||
`,` </rdf:Description>
|
||
`].join("")}l(H0e,"write_rdf_type");function v1t(t,e){return[' <rdf:Description rdf:about="'+t+`">
|
||
`,' <ns0:hasPart xmlns:ns0="http://docs.oasis-open.org/ns/office/1.2/meta/pkg#" rdf:resource="'+e+`"/>
|
||
`,` </rdf:Description>
|
||
`].join("")}l(v1t,"write_rdf_has");function b1t(t){var e=[Gi];e.push(`<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||
`);for(var r=0;r!=t.length;++r)e.push(H0e(t[r][0],t[r][1])),e.push(v1t("",t[r][0]));return e.push(H0e("","Document","pkg")),e.push("</rdf:RDF>"),e.join("")}l(b1t,"write_rdf");function W0e(){return'<office:document-meta xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.2"><office:meta><meta:generator>SheetJS '+NA.version+"</meta:generator></office:meta></office:document-meta>"}l(W0e,"write_meta_ods");var Qg=[["cp:category","Category"],["cp:contentStatus","ContentStatus"],["cp:keywords","Keywords"],["cp:lastModifiedBy","LastAuthor"],["cp:lastPrinted","LastPrinted"],["cp:revision","RevNumber"],["cp:version","Version"],["dc:creator","Author"],["dc:description","Comments"],["dc:identifier","Identifier"],["dc:language","Language"],["dc:subject","Subject"],["dc:title","Title"],["dcterms:created","CreatedDate","date"],["dcterms:modified","ModifiedDate","date"]];function HB(t,e,r,n,a){a[t]!=null||e==null||e===""||(a[t]=e,e=la(e),n[n.length]=r?fr(t,e,r):Zs(t,e))}l(HB,"cp_doit");function V0e(t,e){var r=e||{},n=[Gi,fr("cp:coreProperties",null,{"xmlns:cp":Cs.CORE_PROPS,"xmlns:dc":Cs.dc,"xmlns:dcterms":Cs.dcterms,"xmlns:dcmitype":Cs.dcmitype,"xmlns:xsi":Cs.xsi})],a={};if(!t&&!r.Props)return n.join("");t&&(t.CreatedDate!=null&&HB("dcterms:created",typeof t.CreatedDate=="string"?t.CreatedDate:LB(t.CreatedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,a),t.ModifiedDate!=null&&HB("dcterms:modified",typeof t.ModifiedDate=="string"?t.ModifiedDate:LB(t.ModifiedDate,r.WTF),{"xsi:type":"dcterms:W3CDTF"},n,a));for(var i=0;i!=Qg.length;++i){var s=Qg[i],o=r.Props&&r.Props[s[1]]!=null?r.Props[s[1]]:t?t[s[1]]:null;o===!0?o="1":o===!1?o="0":typeof o=="number"&&(o=String(o)),o!=null&&HB(s[0],o,null,n,a)}return n.length>2&&(n[n.length]="</cp:coreProperties>",n[1]=n[1].replace("/>",">")),n.join("")}l(V0e,"write_core_props");var aw=[["Application","Application","string"],["AppVersion","AppVersion","string"],["Company","Company","string"],["DocSecurity","DocSecurity","string"],["Manager","Manager","string"],["HyperlinksChanged","HyperlinksChanged","bool"],["SharedDoc","SharedDoc","bool"],["LinksUpToDate","LinksUpToDate","bool"],["ScaleCrop","ScaleCrop","bool"],["HeadingPairs","HeadingPairs","raw"],["TitlesOfParts","TitlesOfParts","raw"]],G0e=["Worksheets","SheetNames","NamedRanges","DefinedNames","Chartsheets","ChartNames"];function q0e(t){var e=[],r=fr;return t||(t={}),t.Application="SheetJS",e[e.length]=Gi,e[e.length]=fr("Properties",null,{xmlns:Cs.EXT_PROPS,"xmlns:vt":Cs.vt}),aw.forEach(function(n){if(t[n[1]]!==void 0){var a;switch(n[2]){case"string":a=la(String(t[n[1]]));break;case"bool":a=t[n[1]]?"true":"false";break}a!==void 0&&(e[e.length]=r(n[0],a))}}),e[e.length]=r("HeadingPairs",r("vt:vector",r("vt:variant","<vt:lpstr>Worksheets</vt:lpstr>")+r("vt:variant",r("vt:i4",String(t.Worksheets))),{size:2,baseType:"variant"})),e[e.length]=r("TitlesOfParts",r("vt:vector",t.SheetNames.map(function(n){return"<vt:lpstr>"+la(n)+"</vt:lpstr>"}).join(""),{size:t.Worksheets,baseType:"lpstr"})),e.length>2&&(e[e.length]="</Properties>",e[1]=e[1].replace("/>",">")),e.join("")}l(q0e,"write_ext_props");function Y0e(t){var e=[Gi,fr("Properties",null,{xmlns:Cs.CUST_PROPS,"xmlns:vt":Cs.vt})];if(!t)return e.join("");var r=1;return Xs(t).forEach(l(function(a){++r,e[e.length]=fr("property",Dmt(t[a]),{fmtid:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:r,name:la(a)})},"custprop")),e.length>2&&(e[e.length]="</Properties>",e[1]=e[1].replace("/>",">")),e.join("")}l(Y0e,"write_cust_props");var U0e={Title:"Title",Subject:"Subject",Author:"Author",Keywords:"Keywords",Comments:"Description",LastAuthor:"LastAuthor",RevNumber:"Revision",Application:"AppName",LastPrinted:"LastPrinted",CreatedDate:"Created",ModifiedDate:"LastSaved",Category:"Category",Manager:"Manager",Company:"Company",AppVersion:"Version",ContentStatus:"ContentStatus",Identifier:"Identifier",Language:"Language"};function x1t(t,e){var r=[];return Xs(U0e).map(function(n){for(var a=0;a<Qg.length;++a)if(Qg[a][1]==n)return Qg[a];for(a=0;a<aw.length;++a)if(aw[a][1]==n)return aw[a];throw n}).forEach(function(n){if(t[n[1]]!=null){var a=e&&e.Props&&e.Props[n[1]]!=null?e.Props[n[1]]:t[n[1]];switch(n[2]){case"date":a=new Date(a).toISOString().replace(/\.\d*Z/,"Z");break}typeof a=="number"?a=String(a):a===!0||a===!1?a=a?"1":"0":a instanceof Date&&(a=new Date(a).toISOString().replace(/\.\d*Z/,"")),r.push(Zs(U0e[n[1]]||n[1],a))}}),fr("DocumentProperties",r.join(""),{xmlns:uc.o})}l(x1t,"xlml_write_docprops");function w1t(t,e){var r=["Worksheets","SheetNames"],n="CustomDocumentProperties",a=[];return t&&Xs(t).forEach(function(i){if(Object.prototype.hasOwnProperty.call(t,i)){for(var s=0;s<Qg.length;++s)if(i==Qg[s][1])return;for(s=0;s<aw.length;++s)if(i==aw[s][1])return;for(s=0;s<r.length;++s)if(i==r[s])return;var o=t[i],u="string";typeof o=="number"?(u="float",o=String(o)):o===!0||o===!1?(u="boolean",o=o?"1":"0"):o=String(o),a.push(fr(i0e(i),o,{"dt:dt":u}))}}),e&&Xs(e).forEach(function(i){if(Object.prototype.hasOwnProperty.call(e,i)&&!(t&&Object.prototype.hasOwnProperty.call(t,i))){var s=e[i],o="string";typeof s=="number"?(o="float",s=String(s)):s===!0||s===!1?(o="boolean",s=s?"1":"0"):s instanceof Date?(o="dateTime.tz",s=s.toISOString()):s=String(s),a.push(fr(i0e(i),s,{"dt:dt":o}))}}),"<"+n+' xmlns="'+uc.o+'">'+a.join("")+"</"+n+">"}l(w1t,"xlml_write_custprops");function T1t(t){var e=typeof t=="string"?new Date(Date.parse(t)):t,r=e.getTime()/1e3+11644473600,n=r%Math.pow(2,32),a=(r-n)/Math.pow(2,32);n*=1e7,a*=1e7;var i=n/Math.pow(2,32)|0;i>0&&(n=n%Math.pow(2,32),a+=i);var s=Gt(8);return s.write_shift(4,n),s.write_shift(4,a),s}l(T1t,"write_FILETIME");function j0e(t,e){var r=Gt(4),n=Gt(4);switch(r.write_shift(4,t==80?31:t),t){case 3:n.write_shift(-4,e);break;case 5:n=Gt(8),n.write_shift(8,e,"f");break;case 11:n.write_shift(4,e?1:0);break;case 64:n=T1t(e);break;case 31:case 80:for(n=Gt(4+2*(e.length+1)+(e.length%2?0:2)),n.write_shift(4,e.length+1),n.write_shift(0,e,"dbcs");n.l!=n.length;)n.write_shift(1,0);break;default:throw new Error("TypedPropertyValue unrecognized type "+t+" "+e)}return Ks([r,n])}l(j0e,"write_TypedPropertyValue");var K0e=["CodePage","Thumbnail","_PID_LINKBASE","_PID_HLINKS","SystemIdentifier","FMTID"];function E1t(t){switch(typeof t){case"boolean":return 11;case"number":return(t|0)==t?3:5;case"string":return 31;case"object":if(t instanceof Date)return 64;break}return-1}l(E1t,"guess_property_type");function X0e(t,e,r){var n=Gt(8),a=[],i=[],s=8,o=0,u=Gt(8),h=Gt(8);if(u.write_shift(4,2),u.write_shift(4,1200),h.write_shift(4,1),i.push(u),a.push(h),s+=8+u.length,!e){h=Gt(8),h.write_shift(4,0),a.unshift(h);var d=[Gt(4)];for(d[0].write_shift(4,t.length),o=0;o<t.length;++o){var f=t[o][0];for(u=Gt(8+2*(f.length+1)+(f.length%2?0:2)),u.write_shift(4,o+2),u.write_shift(4,f.length+1),u.write_shift(0,f,"dbcs");u.l!=u.length;)u.write_shift(1,0);d.push(u)}u=Ks(d),i.unshift(u),s+=8+u.length}for(o=0;o<t.length;++o)if(!(e&&!e[t[o][0]])&&!(K0e.indexOf(t[o][0])>-1||G0e.indexOf(t[o][0])>-1)&&t[o][1]!=null){var p=t[o][1],g=0;if(e){g=+e[t[o][0]];var m=r[g];if(m.p=="version"&&typeof p=="string"){var y=p.split(".");p=(+y[0]<<16)+(+y[1]||0)}u=j0e(m.t,p)}else{var v=E1t(p);v==-1&&(v=31,p=String(p)),u=j0e(v,p)}i.push(u),h=Gt(8),h.write_shift(4,e?g:2+o),a.push(h),s+=8+u.length}var b=8*(i.length+1);for(o=0;o<i.length;++o)a[o].write_shift(4,b),b+=i[o].length;return n.write_shift(4,s),n.write_shift(4,i.length),Ks([n].concat(a).concat(i))}l(X0e,"write_PropertySet");function Z0e(t,e,r,n,a,i){var s=Gt(a?68:48),o=[s];s.write_shift(2,65534),s.write_shift(2,0),s.write_shift(4,842412599),s.write_shift(16,ma.utils.consts.HEADER_CLSID,"hex"),s.write_shift(4,a?2:1),s.write_shift(16,e,"hex"),s.write_shift(4,a?68:48);var u=X0e(t,r,n);if(o.push(u),a){var h=X0e(a,null,null);s.write_shift(16,i,"hex"),s.write_shift(4,68+u.length),o.push(h)}return Ks(o)}l(Z0e,"write_PropertySetStream");function C1t(t,e){e||(e=Gt(t));for(var r=0;r<t;++r)e.write_shift(1,0);return e}l(C1t,"writezeroes");function S1t(t,e){return t.read_shift(e)===1}l(S1t,"parsebool");function jo(t,e){return e||(e=Gt(2)),e.write_shift(2,+!!t),e}l(jo,"writebool");function Q0e(t){return t.read_shift(2,"u")}l(Q0e,"parseuint16");function Uc(t,e){return e||(e=Gt(2)),e.write_shift(2,t),e}l(Uc,"writeuint16");function J0e(t,e,r){return r||(r=Gt(2)),r.write_shift(1,e=="e"?+t:+!!t),r.write_shift(1,e=="e"?1:0),r}l(J0e,"write_Bes");function epe(t,e,r){var n=t.read_shift(r&&r.biff>=12?2:1),a="sbcs-cont";if(r&&r.biff>=8,!r||r.biff==8){var i=t.read_shift(1);i&&(a="dbcs-cont")}else r.biff==12&&(a="wstr");r.biff>=2&&r.biff<=5&&(a="cpstr");var s=n?t.read_shift(n,a):"";return s}l(epe,"parse_ShortXLUnicodeString");function _1t(t){var e=t.t||"",r=Gt(3);r.write_shift(2,e.length),r.write_shift(1,1);var n=Gt(2*e.length);n.write_shift(2*e.length,e,"utf16le");var a=[r,n];return Ks(a)}l(_1t,"write_XLUnicodeRichExtendedString");function k1t(t,e,r){var n;if(r){if(r.biff>=2&&r.biff<=5)return t.read_shift(e,"cpstr");if(r.biff>=12)return t.read_shift(e,"dbcs-cont")}var a=t.read_shift(1);return a===0?n=t.read_shift(e,"sbcs-cont"):n=t.read_shift(e,"dbcs-cont"),n}l(k1t,"parse_XLUnicodeStringNoCch");function A1t(t,e,r){var n=t.read_shift(r&&r.biff==2?1:2);return n===0?(t.l++,""):k1t(t,n,r)}l(A1t,"parse_XLUnicodeString");function N1t(t,e,r){if(r.biff>5)return A1t(t,e,r);var n=t.read_shift(1);return n===0?(t.l++,""):t.read_shift(n,r.biff<=4||!t.lens?"cpstr":"sbcs-cont")}l(N1t,"parse_XLUnicodeString2");function tpe(t,e,r){return r||(r=Gt(3+2*t.length)),r.write_shift(2,t.length),r.write_shift(1,1),r.write_shift(31,t,"utf16le"),r}l(tpe,"write_XLUnicodeString");function rpe(t,e){e||(e=Gt(6+t.length*2)),e.write_shift(4,1+t.length);for(var r=0;r<t.length;++r)e.write_shift(2,t.charCodeAt(r));return e.write_shift(2,0),e}l(rpe,"write_HyperlinkString");function I1t(t){var e=Gt(512),r=0,n=t.Target;n.slice(0,7)=="file://"&&(n=n.slice(7));var a=n.indexOf("#"),i=a>-1?31:23;switch(n.charAt(0)){case"#":i=28;break;case".":i&=-3;break}e.write_shift(4,2),e.write_shift(4,i);var s=[8,6815827,6619237,4849780,83];for(r=0;r<s.length;++r)e.write_shift(4,s[r]);if(i==28)n=n.slice(1),rpe(n,e);else if(i&2){for(s="e0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),r=0;r<s.length;++r)e.write_shift(1,parseInt(s[r],16));var o=a>-1?n.slice(0,a):n;for(e.write_shift(4,2*(o.length+1)),r=0;r<o.length;++r)e.write_shift(2,o.charCodeAt(r));e.write_shift(2,0),i&8&&rpe(a>-1?n.slice(a+1):"",e)}else{for(s="03 03 00 00 00 00 00 00 c0 00 00 00 00 00 00 46".split(" "),r=0;r<s.length;++r)e.write_shift(1,parseInt(s[r],16));for(var u=0;n.slice(u*3,u*3+3)=="../"||n.slice(u*3,u*3+3)=="..\\";)++u;for(e.write_shift(2,u),e.write_shift(4,n.length-3*u+1),r=0;r<n.length-3*u;++r)e.write_shift(1,n.charCodeAt(r+3*u)&255);for(e.write_shift(1,0),e.write_shift(2,65535),e.write_shift(2,57005),r=0;r<6;++r)e.write_shift(4,0)}return e.slice(0,e.l)}l(I1t,"write_Hyperlink");function Jg(t,e,r,n){return n||(n=Gt(6)),n.write_shift(2,t),n.write_shift(2,e),n.write_shift(2,r||0),n}l(Jg,"write_XLSCell");function L1t(t,e,r){var n=r.biff>8?4:2,a=t.read_shift(n),i=t.read_shift(n,"i"),s=t.read_shift(n,"i");return[a,i,s]}l(L1t,"parse_XTI");function $1t(t){var e=t.read_shift(2),r=t.read_shift(2),n=t.read_shift(2),a=t.read_shift(2);return{s:{c:n,r:e},e:{c:a,r}}}l($1t,"parse_Ref8U");function npe(t,e){return e||(e=Gt(8)),e.write_shift(2,t.s.r),e.write_shift(2,t.e.r),e.write_shift(2,t.s.c),e.write_shift(2,t.e.c),e}l(npe,"write_Ref8U");function WB(t,e,r){var n=1536,a=16;switch(r.bookType){case"biff8":break;case"biff5":n=1280,a=8;break;case"biff4":n=4,a=6;break;case"biff3":n=3,a=6;break;case"biff2":n=2,a=4;break;case"xla":break;default:throw new Error("unsupported BIFF version")}var i=Gt(a);return i.write_shift(2,n),i.write_shift(2,e),a>4&&i.write_shift(2,29282),a>6&&i.write_shift(2,1997),a>8&&(i.write_shift(2,49161),i.write_shift(2,1),i.write_shift(2,1798),i.write_shift(2,0)),i}l(WB,"write_BOF");function M1t(t,e){var r=!e||e.biff==8,n=Gt(r?112:54);for(n.write_shift(e.biff==8?2:1,7),r&&n.write_shift(1,0),n.write_shift(4,859007059),n.write_shift(4,5458548|(r?0:536870912));n.l<n.length;)n.write_shift(1,r?0:32);return n}l(M1t,"write_WriteAccess");function P1t(t,e){var r=!e||e.biff>=8?2:1,n=Gt(8+r*t.name.length);n.write_shift(4,t.pos),n.write_shift(1,t.hs||0),n.write_shift(1,t.dt),n.write_shift(1,t.name.length),e.biff>=8&&n.write_shift(1,1),n.write_shift(r*t.name.length,t.name,e.biff<8?"sbcs":"utf16le");var a=n.slice(0,n.l);return a.l=n.l,a}l(P1t,"write_BoundSheet8");function R1t(t,e){var r=Gt(8);r.write_shift(4,t.Count),r.write_shift(4,t.Unique);for(var n=[],a=0;a<t.length;++a)n[a]=_1t(t[a]);var i=Ks([r].concat(n));return i.parts=[r.length].concat(n.map(function(s){return s.length})),i}l(R1t,"write_SST");function O1t(){var t=Gt(18);return t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,29280),t.write_shift(2,17600),t.write_shift(2,56),t.write_shift(2,0),t.write_shift(2,0),t.write_shift(2,1),t.write_shift(2,500),t}l(O1t,"write_Window1");function D1t(t){var e=Gt(18),r=1718;return t&&t.RTL&&(r|=64),e.write_shift(2,r),e.write_shift(4,0),e.write_shift(4,64),e.write_shift(4,0),e.write_shift(4,0),e}l(D1t,"write_Window2");function F1t(t,e){var r=t.name||"Arial",n=e&&e.biff==5,a=n?15+r.length:16+2*r.length,i=Gt(a);return i.write_shift(2,t.sz*20),i.write_shift(4,0),i.write_shift(2,400),i.write_shift(4,0),i.write_shift(2,0),i.write_shift(1,r.length),n||i.write_shift(1,1),i.write_shift((n?1:2)*r.length,r,n?"sbcs":"utf16le"),i}l(F1t,"write_Font");function B1t(t,e,r,n){var a=Gt(10);return Jg(t,e,n,a),a.write_shift(4,r),a}l(B1t,"write_LabelSst");function z1t(t,e,r,n,a){var i=!a||a.biff==8,s=Gt(8+ +i+(1+i)*r.length);return Jg(t,e,n,s),s.write_shift(2,r.length),i&&s.write_shift(1,1),s.write_shift((1+i)*r.length,r,i?"utf16le":"sbcs"),s}l(z1t,"write_Label");function H1t(t,e,r,n){var a=r&&r.biff==5;n||(n=Gt(a?3+e.length:5+2*e.length)),n.write_shift(2,t),n.write_shift(a?1:2,e.length),a||n.write_shift(1,1),n.write_shift((a?1:2)*e.length,e,a?"sbcs":"utf16le");var i=n.length>n.l?n.slice(0,n.l):n;return i.l==null&&(i.l=i.length),i}l(H1t,"write_Format");function W1t(t,e){var r=e.biff==8||!e.biff?4:2,n=Gt(2*r+6);return n.write_shift(r,t.s.r),n.write_shift(r,t.e.r+1),n.write_shift(2,t.s.c),n.write_shift(2,t.e.c+1),n.write_shift(2,0),n}l(W1t,"write_Dimensions");function ape(t,e,r,n){var a=r&&r.biff==5;n||(n=Gt(a?16:20)),n.write_shift(2,0),t.style?(n.write_shift(2,t.numFmtId||0),n.write_shift(2,65524)):(n.write_shift(2,t.numFmtId||0),n.write_shift(2,e<<4));var i=0;return t.numFmtId>0&&a&&(i|=1024),n.write_shift(4,i),n.write_shift(4,0),a||n.write_shift(4,0),n.write_shift(2,0),n}l(ape,"write_XF");function V1t(t){var e=Gt(8);return e.write_shift(4,0),e.write_shift(2,0),e.write_shift(2,0),e}l(V1t,"write_Guts");function G1t(t,e,r,n,a,i){var s=Gt(8);return Jg(t,e,n,s),J0e(r,i,s),s}l(G1t,"write_BoolErr");function q1t(t,e,r,n){var a=Gt(14);return Jg(t,e,n,a),Zg(r,a),a}l(q1t,"write_Number");function Y1t(t,e,r){if(r.biff<8)return U1t(t,e,r);for(var n=[],a=t.l+e,i=t.read_shift(r.biff>8?4:2);i--!==0;)n.push(L1t(t,r.biff>8?12:6,r));if(t.l!=a)throw new Error("Bad ExternSheet: "+t.l+" != "+a);return n}l(Y1t,"parse_ExternSheet");function U1t(t,e,r){t[t.l+1]==3&&t[t.l]++;var n=epe(t,e,r);return n.charCodeAt(0)==3?n.slice(1):n}l(U1t,"parse_BIFF5ExternSheet");function j1t(t){var e=Gt(2+t.length*8);e.write_shift(2,t.length);for(var r=0;r<t.length;++r)npe(t[r],e);return e}l(j1t,"write_MergeCells");function K1t(t){var e=Gt(24),r=Ss(t[0]);e.write_shift(2,r.r),e.write_shift(2,r.r),e.write_shift(2,r.c),e.write_shift(2,r.c);for(var n="d0 c9 ea 79 f9 ba ce 11 8c 82 00 aa 00 4b a9 0b".split(" "),a=0;a<16;++a)e.write_shift(1,parseInt(n[a],16));return Ks([e,I1t(t[1])])}l(K1t,"write_HLink");function X1t(t){var e=t[1].Tooltip,r=Gt(10+2*(e.length+1));r.write_shift(2,2048);var n=Ss(t[0]);r.write_shift(2,n.r),r.write_shift(2,n.r),r.write_shift(2,n.c),r.write_shift(2,n.c);for(var a=0;a<e.length;++a)r.write_shift(2,e.charCodeAt(a));return r.write_shift(2,0),r}l(X1t,"write_HLinkTooltip");function Z1t(t){return t||(t=Gt(4)),t.write_shift(2,1),t.write_shift(2,1),t}l(Z1t,"write_Country");function Q1t(t,e,r){if(!r.cellStyles)return _h(t,e);var n=r&&r.biff>=12?4:2,a=t.read_shift(n),i=t.read_shift(n),s=t.read_shift(n),o=t.read_shift(n),u=t.read_shift(2);n==2&&(t.l+=2);var h={s:a,e:i,w:s,ixfe:o,flags:u};return(r.biff>=5||!r.biff)&&(h.level=u>>8&7),h}l(Q1t,"parse_ColInfo");function J1t(t,e){var r=Gt(12);r.write_shift(2,e),r.write_shift(2,e),r.write_shift(2,t.width*256),r.write_shift(2,0);var n=0;return t.hidden&&(n|=1),r.write_shift(1,n),n=t.level||0,r.write_shift(1,n),r.write_shift(2,0),r}l(J1t,"write_ColInfo");function eyt(t){for(var e=Gt(2*t),r=0;r<t;++r)e.write_shift(2,r+1);return e}l(eyt,"write_RRTabId");function tyt(t,e,r){var n=Gt(15);return m4(n,t,e),n.write_shift(8,r,"f"),n}l(tyt,"write_BIFF2NUM");function ryt(t,e,r){var n=Gt(9);return m4(n,t,e),n.write_shift(2,r),n}l(ryt,"write_BIFF2INT");var nyt=function(){var t={1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127,8:865,9:437,10:850,11:437,13:437,14:850,15:437,16:850,17:437,18:850,19:932,20:850,21:437,22:850,23:865,24:437,25:437,26:850,27:437,28:863,29:850,31:852,34:852,35:852,36:860,37:850,38:866,55:850,64:852,77:936,78:949,79:950,80:874,87:1252,88:1252,89:1252,108:863,134:737,135:852,136:857,204:1257,255:16969},e=_B({1:437,2:850,3:1252,4:1e4,100:852,101:866,102:865,103:861,104:895,105:620,106:737,107:857,120:950,121:949,122:936,123:932,124:874,125:1255,126:1256,150:10007,151:10029,152:10006,200:1250,201:1251,202:1254,203:1253,0:20127});function r(o,u){var h=[],d=Gg(1);switch(u.type){case"base64":d=Au(Vd(o));break;case"binary":d=Au(o);break;case"buffer":case"array":d=o;break}dc(d,0);var f=d.read_shift(1),p=!!(f&136),g=!1,m=!1;switch(f){case 2:break;case 3:break;case 48:g=!0,p=!0;break;case 49:g=!0,p=!0;break;case 131:break;case 139:break;case 140:m=!0;break;case 245:break;default:throw new Error("DBF Unsupported Version: "+f.toString(16))}var y=0,v=521;f==2&&(y=d.read_shift(2)),d.l+=3,f!=2&&(y=d.read_shift(4)),y>1048576&&(y=1e6),f!=2&&(v=d.read_shift(2));var b=d.read_shift(2),w=u.codepage||1252;f!=2&&(d.l+=16,d.read_shift(1),d[d.l]!==0&&(w=t[d[d.l]]),d.l+=1,d.l+=2),m&&(d.l+=36);for(var x=[],T={},C=Math.min(d.length,f==2?521:v-10-(g?264:0)),S=m?32:11;d.l<C&&d[d.l]!=13;)switch(T={},T.name=LA.utils.decode(w,d.slice(d.l,d.l+S)).replace(/[\u0000\r\n].*$/g,""),d.l+=S,T.type=String.fromCharCode(d.read_shift(1)),f!=2&&!m&&(T.offset=d.read_shift(4)),T.len=d.read_shift(1),f==2&&(T.offset=d.read_shift(2)),T.dec=d.read_shift(1),T.name.length&&x.push(T),f!=2&&(d.l+=m?13:14),T.type){case"B":(!g||T.len!=8)&&u.WTF&&console.log("Skipping "+T.name+":"+T.type);break;case"G":case"P":u.WTF&&console.log("Skipping "+T.name+":"+T.type);break;case"+":case"0":case"@":case"C":case"D":case"F":case"I":case"L":case"M":case"N":case"O":case"T":case"Y":break;default:throw new Error("Unknown Field Type: "+T.type)}if(d[d.l]!==13&&(d.l=v-1),d.read_shift(1)!==13)throw new Error("DBF Terminator not found "+d.l+" "+d[d.l]);d.l=v;var E=0,k=0;for(h[0]=[],k=0;k!=x.length;++k)h[0][k]=x[k].name;for(;y-- >0;){if(d[d.l]===42){d.l+=b;continue}for(++d.l,h[++E]=[],k=0,k=0;k!=x.length;++k){var A=d.slice(d.l,d.l+x[k].len);d.l+=x[k].len,dc(A,0);var I=LA.utils.decode(w,A);switch(x[k].type){case"C":I.trim().length&&(h[E][k]=I.replace(/\s+$/,""));break;case"D":I.length===8?h[E][k]=new Date(+I.slice(0,4),+I.slice(4,6)-1,+I.slice(6,8)):h[E][k]=I;break;case"F":h[E][k]=parseFloat(I.trim());break;case"+":case"I":h[E][k]=m?A.read_shift(-4,"i")^2147483648:A.read_shift(4,"i");break;case"L":switch(I.trim().toUpperCase()){case"Y":case"T":h[E][k]=!0;break;case"N":case"F":h[E][k]=!1;break;case"":case"?":break;default:throw new Error("DBF Unrecognized L:|"+I+"|")}break;case"M":if(!p)throw new Error("DBF Unexpected MEMO for type "+f.toString(16));h[E][k]="##MEMO##"+(m?parseInt(I.trim(),10):A.read_shift(4));break;case"N":I=I.replace(/\u0000/g,"").trim(),I&&I!="."&&(h[E][k]=+I||0);break;case"@":h[E][k]=new Date(A.read_shift(-8,"f")-621356832e5);break;case"T":h[E][k]=new Date((A.read_shift(4)-2440588)*864e5+A.read_shift(4));break;case"Y":h[E][k]=A.read_shift(4,"i")/1e4+A.read_shift(4,"i")/1e4*Math.pow(2,32);break;case"O":h[E][k]=-A.read_shift(-8,"f");break;case"B":if(g&&x[k].len==8){h[E][k]=A.read_shift(8,"f");break}case"G":case"P":A.l+=x[k].len;break;case"0":if(x[k].name==="_NullFlags")break;default:throw new Error("DBF Unsupported data type "+x[k].type)}}}if(f!=2&&d.l<d.length&&d[d.l++]!=26)throw new Error("DBF EOF Marker missing "+(d.l-1)+" of "+d.length+" "+d[d.l-1].toString(16));return u&&u.sheetRows&&(h=h.slice(0,u.sheetRows)),u.DBF=x,h}l(r,"dbf_to_aoa");function n(o,u){var h=u||{};h.dateNF||(h.dateNF="yyyymmdd");var d=ew(r(o,h),h);return d["!cols"]=h.DBF.map(function(f){return{wch:f.len,DBF:f}}),delete h.DBF,d}l(n,"dbf_to_sheet");function a(o,u){try{return Yg(n(o,u),u)}catch(h){if(u&&u.WTF)throw h}return{SheetNames:[],Sheets:{}}}l(a,"dbf_to_workbook");var i={B:8,C:250,L:1,D:8,"?":0,"":0};function s(o,u){var h=u||{};if(+h.codepage>=0&&QS(+h.codepage),h.type=="string")throw new Error("Cannot write DBF to JS string");var d=Fl(),f=i8(o,{header:1,raw:!0,cellDates:!0}),p=f[0],g=f.slice(1),m=o["!cols"]||[],y=0,v=0,b=0,w=1;for(y=0;y<p.length;++y){if(((m[y]||{}).DBF||{}).name){p[y]=m[y].DBF.name,++b;continue}if(p[y]!=null){if(++b,typeof p[y]=="number"&&(p[y]=p[y].toString(10)),typeof p[y]!="string")throw new Error("DBF Invalid column name "+p[y]+" |"+typeof p[y]+"|");if(p.indexOf(p[y])!==y){for(v=0;v<1024;++v)if(p.indexOf(p[y]+"_"+v)==-1){p[y]+="_"+v;break}}}}var x=Ba(o["!ref"]),T=[],C=[],S=[];for(y=0;y<=x.e.c-x.s.c;++y){var E="",k="",A=0,I=[];for(v=0;v<g.length;++v)g[v][y]!=null&&I.push(g[v][y]);if(I.length==0||p[y]==null){T[y]="?";continue}for(v=0;v<I.length;++v){switch(typeof I[v]){case"number":k="B";break;case"string":k="C";break;case"boolean":k="L";break;case"object":k=I[v]instanceof Date?"D":"C";break;default:k="C"}A=Math.max(A,String(I[v]).length),E=E&&E!=k?"C":k}A>250&&(A=250),k=((m[y]||{}).DBF||{}).type,k=="C"&&m[y].DBF.len>A&&(A=m[y].DBF.len),E=="B"&&k=="N"&&(E="N",S[y]=m[y].DBF.dec,A=m[y].DBF.len),C[y]=E=="C"||k=="N"?A:i[E]||0,w+=C[y],T[y]=E}var L=d.next(32);for(L.write_shift(4,318902576),L.write_shift(4,g.length),L.write_shift(2,296+32*b),L.write_shift(2,w),y=0;y<4;++y)L.write_shift(4,0);for(L.write_shift(4,0|(+e[Nfe]||3)<<8),y=0,v=0;y<p.length;++y)if(p[y]!=null){var R=d.next(32),O=(p[y].slice(-10)+"\0\0\0\0\0\0\0\0\0\0\0").slice(0,11);R.write_shift(1,O,"sbcs"),R.write_shift(1,T[y]=="?"?"C":T[y],"sbcs"),R.write_shift(4,v),R.write_shift(1,C[y]||i[T[y]]||0),R.write_shift(1,S[y]||0),R.write_shift(1,2),R.write_shift(4,0),R.write_shift(1,0),R.write_shift(4,0),R.write_shift(4,0),v+=C[y]||i[T[y]]||0}var M=d.next(264);for(M.write_shift(4,13),y=0;y<65;++y)M.write_shift(4,0);for(y=0;y<g.length;++y){var P=d.next(w);for(P.write_shift(1,0),v=0;v<p.length;++v)if(p[v]!=null)switch(T[v]){case"L":P.write_shift(1,g[y][v]==null?63:g[y][v]?84:70);break;case"B":P.write_shift(8,g[y][v]||0,"f");break;case"N":var z="0";for(typeof g[y][v]=="number"&&(z=g[y][v].toFixed(S[v]||0)),b=0;b<C[v]-z.length;++b)P.write_shift(1,32);P.write_shift(1,z,"sbcs");break;case"D":g[y][v]?(P.write_shift(4,("0000"+g[y][v].getFullYear()).slice(-4),"sbcs"),P.write_shift(2,("00"+(g[y][v].getMonth()+1)).slice(-2),"sbcs"),P.write_shift(2,("00"+g[y][v].getDate()).slice(-2),"sbcs")):P.write_shift(8,"00000000","sbcs");break;case"C":var D=String(g[y][v]!=null?g[y][v]:"").slice(0,C[v]);for(P.write_shift(1,D,"sbcs"),b=0;b<C[v]-D.length;++b)P.write_shift(1,32);break}}return d.next(1).write_shift(1,26),d.end()}return l(s,"sheet_to_dbf"),{to_workbook:a,to_sheet:n,from_sheet:s}}(),ayt=function(){var t={AA:"À",BA:"Á",CA:"Â",DA:195,HA:"Ä",JA:197,AE:"È",BE:"É",CE:"Ê",HE:"Ë",AI:"Ì",BI:"Í",CI:"Î",HI:"Ï",AO:"Ò",BO:"Ó",CO:"Ô",DO:213,HO:"Ö",AU:"Ù",BU:"Ú",CU:"Û",HU:"Ü",Aa:"à",Ba:"á",Ca:"â",Da:227,Ha:"ä",Ja:229,Ae:"è",Be:"é",Ce:"ê",He:"ë",Ai:"ì",Bi:"í",Ci:"î",Hi:"ï",Ao:"ò",Bo:"ó",Co:"ô",Do:245,Ho:"ö",Au:"ù",Bu:"ú",Cu:"û",Hu:"ü",KC:"Ç",Kc:"ç",q:"æ",z:"œ",a:"Æ",j:"Œ",DN:209,Dn:241,Hy:255,S:169,c:170,R:174,"B ":180,0:176,1:177,2:178,3:179,5:181,6:182,7:183,Q:185,k:186,b:208,i:216,l:222,s:240,y:248,"!":161,'"':162,"#":163,"(":164,"%":165,"'":167,"H ":168,"+":171,";":187,"<":188,"=":189,">":190,"?":191,"{":223},e=new RegExp("\x1BN("+Xs(t).join("|").replace(/\|\|\|/,"|\\||").replace(/([?()+])/g,"\\$1")+"|\\|)","gm"),r=l(function(p,g){var m=t[g];return typeof m=="number"?Lfe(m):m},"sylk_char_fn"),n=l(function(p,g,m){var y=g.charCodeAt(0)-32<<4|m.charCodeAt(0)-48;return y==59?p:Lfe(y)},"decode_sylk_char");t["|"]=254;function a(p,g){switch(g.type){case"base64":return i(Vd(p),g);case"binary":return i(p,g);case"buffer":return i(Xn&&Buffer.isBuffer(p)?p.toString("binary"):e4(p),g);case"array":return i(WA(p),g)}throw new Error("Unrecognized type "+g.type)}l(a,"sylk_to_aoa");function i(p,g){var m=p.split(/[\n\r]+/),y=-1,v=-1,b=0,w=0,x=[],T=[],C=null,S={},E=[],k=[],A=[],I=0,L;for(+g.codepage>=0&&QS(+g.codepage);b!==m.length;++b){I=0;var R=m[b].trim().replace(/\x1B([\x20-\x2F])([\x30-\x3F])/g,n).replace(e,r),O=R.replace(/;;/g,"\0").split(";").map(function(q){return q.replace(/\u0000/g,";")}),M=O[0],P;if(R.length>0)switch(M){case"ID":break;case"E":break;case"B":break;case"O":break;case"W":break;case"P":O[1].charAt(0)=="P"&&T.push(R.slice(3).replace(/;;/g,";"));break;case"C":var z=!1,D=!1,B=!1,W=!1,U=-1,j=-1;for(w=1;w<O.length;++w)switch(O[w].charAt(0)){case"A":break;case"X":v=parseInt(O[w].slice(1))-1,D=!0;break;case"Y":for(y=parseInt(O[w].slice(1))-1,D||(v=0),L=x.length;L<=y;++L)x[L]=[];break;case"K":P=O[w].slice(1),P.charAt(0)==='"'?P=P.slice(1,P.length-1):P==="TRUE"?P=!0:P==="FALSE"?P=!1:isNaN(Yd(P))?isNaN(n4(P).getDate())||(P=Uo(P)):(P=Yd(P),C!==null&&jfe(C)&&(P=r0e(P))),z=!0;break;case"E":W=!0;var V=rvt(O[w].slice(1),{r:y,c:v});x[y][v]=[x[y][v],V];break;case"S":B=!0,x[y][v]=[x[y][v],"S5S"];break;case"G":break;case"R":U=parseInt(O[w].slice(1))-1;break;case"C":j=parseInt(O[w].slice(1))-1;break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+R)}if(z&&(x[y][v]&&x[y][v].length==2?x[y][v][0]=P:x[y][v]=P,C=null),B){if(W)throw new Error("SYLK shared formula cannot have own formula");var Y=U>-1&&x[U][j];if(!Y||!Y[1])throw new Error("SYLK shared formula cannot find base");x[y][v][1]=nvt(Y[1],{r:y-U,c:v-j})}break;case"F":var H=0;for(w=1;w<O.length;++w)switch(O[w].charAt(0)){case"X":v=parseInt(O[w].slice(1))-1,++H;break;case"Y":for(y=parseInt(O[w].slice(1))-1,L=x.length;L<=y;++L)x[L]=[];break;case"M":I=parseInt(O[w].slice(1))/20;break;case"F":break;case"G":break;case"P":C=T[parseInt(O[w].slice(1))];break;case"S":break;case"D":break;case"N":break;case"W":for(A=O[w].slice(1).split(" "),L=parseInt(A[0],10);L<=parseInt(A[1],10);++L)I=parseInt(A[2],10),k[L-1]=I===0?{hidden:!0}:{wch:I},GB(k[L-1]);break;case"C":v=parseInt(O[w].slice(1))-1,k[v]||(k[v]={});break;case"R":y=parseInt(O[w].slice(1))-1,E[y]||(E[y]={}),I>0?(E[y].hpt=I,E[y].hpx=hpe(I)):I===0&&(E[y].hidden=!0);break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+R)}H<1&&(C=null);break;default:if(g&&g.WTF)throw new Error("SYLK bad record "+R)}}return E.length>0&&(S["!rows"]=E),k.length>0&&(S["!cols"]=k),g&&g.sheetRows&&(x=x.slice(0,g.sheetRows)),[x,S]}l(i,"sylk_to_aoa_str");function s(p,g){var m=a(p,g),y=m[0],v=m[1],b=ew(y,g);return Xs(v).forEach(function(w){b[w]=v[w]}),b}l(s,"sylk_to_sheet");function o(p,g){return Yg(s(p,g),g)}l(o,"sylk_to_workbook");function u(p,g,m,y){var v="C;Y"+(m+1)+";X"+(y+1)+";K";switch(p.t){case"n":v+=p.v||0,p.f&&!p.F&&(v+=";E"+UB(p.f,{r:m,c:y}));break;case"b":v+=p.v?"TRUE":"FALSE";break;case"e":v+=p.w||p.v;break;case"d":v+='"'+(p.w||p.v)+'"';break;case"s":v+='"'+p.v.replace(/"/g,"").replace(/;/g,";;")+'"';break}return v}l(u,"write_ws_cell_sylk");function h(p,g){g.forEach(function(m,y){var v="F;W"+(y+1)+" "+(y+1)+" ";m.hidden?v+="0":(typeof m.width=="number"&&!m.wpx&&(m.wpx=ZA(m.width)),typeof m.wpx=="number"&&!m.wch&&(m.wch=QA(m.wpx)),typeof m.wch=="number"&&(v+=Math.round(m.wch))),v.charAt(v.length-1)!=" "&&p.push(v)})}l(h,"write_ws_cols_sylk");function d(p,g){g.forEach(function(m,y){var v="F;";m.hidden?v+="M0;":m.hpt?v+="M"+20*m.hpt+";":m.hpx&&(v+="M"+20*JA(m.hpx)+";"),v.length>2&&p.push(v+"R"+(y+1))})}l(d,"write_ws_rows_sylk");function f(p,g){var m=["ID;PWXL;N;E"],y=[],v=Ba(p["!ref"]),b,w=Array.isArray(p),x=`\r
|
||
`;m.push("P;PGeneral"),m.push("F;P0;DG0G8;M255"),p["!cols"]&&h(m,p["!cols"]),p["!rows"]&&d(m,p["!rows"]),m.push("B;Y"+(v.e.r-v.s.r+1)+";X"+(v.e.c-v.s.c+1)+";D"+[v.s.c,v.s.r,v.e.c,v.e.r].join(" "));for(var T=v.s.r;T<=v.e.r;++T)for(var C=v.s.c;C<=v.e.c;++C){var S=ca({r:T,c:C});b=w?(p[T]||[])[C]:p[S],!(!b||b.v==null&&(!b.f||b.F))&&y.push(u(b,p,T,C))}return m.join(x)+x+y.join(x)+x+"E"+x}return l(f,"sheet_to_sylk"),{to_workbook:o,to_sheet:s,from_sheet:f}}(),iyt=function(){function t(i,s){switch(s.type){case"base64":return e(Vd(i),s);case"binary":return e(i,s);case"buffer":return e(Xn&&Buffer.isBuffer(i)?i.toString("binary"):e4(i),s);case"array":return e(WA(i),s)}throw new Error("Unrecognized type "+s.type)}l(t,"dif_to_aoa");function e(i,s){for(var o=i.split(`
|
||
`),u=-1,h=-1,d=0,f=[];d!==o.length;++d){if(o[d].trim()==="BOT"){f[++u]=[],h=0;continue}if(!(u<0)){var p=o[d].trim().split(","),g=p[0],m=p[1];++d;for(var y=o[d]||"";(y.match(/["]/g)||[]).length&1&&d<o.length-1;)y+=`
|
||
`+o[++d];switch(y=y.trim(),+g){case-1:if(y==="BOT"){f[++u]=[],h=0;continue}else if(y!=="EOD")throw new Error("Unrecognized DIF special command "+y);break;case 0:y==="TRUE"?f[u][h]=!0:y==="FALSE"?f[u][h]=!1:isNaN(Yd(m))?isNaN(n4(m).getDate())?f[u][h]=m:f[u][h]=Uo(m):f[u][h]=Yd(m),++h;break;case 1:y=y.slice(1,y.length-1),y=y.replace(/""/g,'"'),y&&y.match(/^=".*"$/)&&(y=y.slice(2,-1)),f[u][h++]=y!==""?y:null;break}if(y==="EOD")break}}return s&&s.sheetRows&&(f=f.slice(0,s.sheetRows)),f}l(e,"dif_to_aoa_str");function r(i,s){return ew(t(i,s),s)}l(r,"dif_to_sheet");function n(i,s){return Yg(r(i,s),s)}l(n,"dif_to_workbook");var a=function(){var i=l(function(u,h,d,f,p){u.push(h),u.push(d+","+f),u.push('"'+p.replace(/"/g,'""')+'"')},"pf"),s=l(function(u,h,d,f){u.push(h+","+d),u.push(h==1?'"'+f.replace(/"/g,'""')+'"':f)},"po");return l(function(u){var h=[],d=Ba(u["!ref"]),f,p=Array.isArray(u);i(h,"TABLE",0,1,"sheetjs"),i(h,"VECTORS",0,d.e.r-d.s.r+1,""),i(h,"TUPLES",0,d.e.c-d.s.c+1,""),i(h,"DATA",0,0,"");for(var g=d.s.r;g<=d.e.r;++g){s(h,-1,0,"BOT");for(var m=d.s.c;m<=d.e.c;++m){var y=ca({r:g,c:m});if(f=p?(u[g]||[])[m]:u[y],!f){s(h,1,0,"");continue}switch(f.t){case"n":var v=f.w;!v&&f.v!=null&&(v=f.v),v==null?f.f&&!f.F?s(h,1,0,"="+f.f):s(h,1,0,""):s(h,0,v,"V");break;case"b":s(h,0,f.v?1:0,f.v?"TRUE":"FALSE");break;case"s":s(h,1,0,isNaN(f.v)?f.v:'="'+f.v+'"');break;case"d":f.w||(f.w=D0(f.z||gi[14],Ol(Uo(f.v)))),s(h,0,f.w,"V");break;default:s(h,1,0,"")}}}s(h,-1,0,"EOD");var b=`\r
|
||
`,w=h.join(b);return w},"sheet_to_dif")}();return{to_workbook:n,to_sheet:r,from_sheet:a}}(),ipe=function(){function t(f){return f.replace(/\\b/g,"\\").replace(/\\c/g,":").replace(/\\n/g,`
|
||
`)}l(t,"decode");function e(f){return f.replace(/\\/g,"\\b").replace(/:/g,"\\c").replace(/\n/g,"\\n")}l(e,"encode");function r(f,p){for(var g=f.split(`
|
||
`),m=-1,y=-1,v=0,b=[];v!==g.length;++v){var w=g[v].trim().split(":");if(w[0]==="cell"){var x=Ss(w[1]);if(b.length<=x.r)for(m=b.length;m<=x.r;++m)b[m]||(b[m]=[]);switch(m=x.r,y=x.c,w[2]){case"t":b[m][y]=t(w[3]);break;case"v":b[m][y]=+w[3];break;case"vtf":var T=w[w.length-1];case"vtc":switch(w[3]){case"nl":b[m][y]=!!+w[4];break;default:b[m][y]=+w[4];break}w[2]=="vtf"&&(b[m][y]=[b[m][y],T])}}}return p&&p.sheetRows&&(b=b.slice(0,p.sheetRows)),b}l(r,"eth_to_aoa");function n(f,p){return ew(r(f,p),p)}l(n,"eth_to_sheet");function a(f,p){return Yg(n(f,p),p)}l(a,"eth_to_workbook");var i=["socialcalc:version:1.5","MIME-Version: 1.0","Content-Type: multipart/mixed; boundary=SocialCalcSpreadsheetControlSave"].join(`
|
||
`),s=["--SocialCalcSpreadsheetControlSave","Content-type: text/plain; charset=UTF-8"].join(`
|
||
`)+`
|
||
`,o=["# SocialCalc Spreadsheet Control Save","part:sheet"].join(`
|
||
`),u="--SocialCalcSpreadsheetControlSave--";function h(f){if(!f||!f["!ref"])return"";for(var p=[],g=[],m,y="",v=fc(f["!ref"]),b=Array.isArray(f),w=v.s.r;w<=v.e.r;++w)for(var x=v.s.c;x<=v.e.c;++x)if(y=ca({r:w,c:x}),m=b?(f[w]||[])[x]:f[y],!(!m||m.v==null||m.t==="z")){switch(g=["cell",y,"t"],m.t){case"s":case"str":g.push(e(m.v));break;case"n":m.f?(g[2]="vtf",g[3]="n",g[4]=m.v,g[5]=e(m.f)):(g[2]="v",g[3]=m.v);break;case"b":g[2]="vt"+(m.f?"f":"c"),g[3]="nl",g[4]=m.v?"1":"0",g[5]=e(m.f||(m.v?"TRUE":"FALSE"));break;case"d":var T=Ol(Uo(m.v));g[2]="vtc",g[3]="nd",g[4]=""+T,g[5]=m.w||D0(m.z||gi[14],T);break;case"e":continue}p.push(g.join(":"))}return p.push("sheet:c:"+(v.e.c-v.s.c+1)+":r:"+(v.e.r-v.s.r+1)+":tvf:1"),p.push("valueformat:1:text-wiki"),p.join(`
|
||
`)}l(h,"sheet_to_eth_data");function d(f){return[i,s,o,s,h(f),u].join(`
|
||
`)}return l(d,"sheet_to_eth"),{to_workbook:a,to_sheet:n,from_sheet:d}}(),syt=function(){function t(d,f,p,g,m){m.raw?f[p][g]=d:d===""||(d==="TRUE"?f[p][g]=!0:d==="FALSE"?f[p][g]=!1:isNaN(Yd(d))?isNaN(n4(d).getDate())?f[p][g]=d:f[p][g]=Uo(d):f[p][g]=Yd(d))}l(t,"set_text_arr");function e(d,f){var p=f||{},g=[];if(!d||d.length===0)return g;for(var m=d.split(/[\r\n]/),y=m.length-1;y>=0&&m[y].length===0;)--y;for(var v=10,b=0,w=0;w<=y;++w)b=m[w].indexOf(" "),b==-1?b=m[w].length:b++,v=Math.max(v,b);for(w=0;w<=y;++w){g[w]=[];var x=0;for(t(m[w].slice(0,v).trim(),g,w,x,p),x=1;x<=(m[w].length-v)/10+1;++x)t(m[w].slice(v+(x-1)*10,v+x*10).trim(),g,w,x,p)}return p.sheetRows&&(g=g.slice(0,p.sheetRows)),g}l(e,"prn_to_aoa_str");var r={44:",",9:" ",59:";",124:"|"},n={44:3,9:2,59:1,124:0};function a(d){for(var f={},p=!1,g=0,m=0;g<d.length;++g)(m=d.charCodeAt(g))==34?p=!p:!p&&m in r&&(f[m]=(f[m]||0)+1);m=[];for(g in f)Object.prototype.hasOwnProperty.call(f,g)&&m.push([f[g],g]);if(!m.length){f=n;for(g in f)Object.prototype.hasOwnProperty.call(f,g)&&m.push([f[g],g])}return m.sort(function(y,v){return y[0]-v[0]||n[y[1]]-n[v[1]]}),r[m.pop()[1]]||44}l(a,"guess_sep");function i(d,f){var p=f||{},g="",m=p.dense?[]:{},y={s:{c:0,r:0},e:{c:0,r:0}};d.slice(0,4)=="sep="?d.charCodeAt(5)==13&&d.charCodeAt(6)==10?(g=d.charAt(4),d=d.slice(7)):d.charCodeAt(5)==13||d.charCodeAt(5)==10?(g=d.charAt(4),d=d.slice(6)):g=a(d.slice(0,1024)):p&&p.FS?g=p.FS:g=a(d.slice(0,1024));var v=0,b=0,w=0,x=0,T=0,C=g.charCodeAt(0),S=!1,E=0,k=d.charCodeAt(0);d=d.replace(/\r\n/mg,`
|
||
`);var A=p.dateNF!=null?Tmt(p.dateNF):null;function I(){var L=d.slice(x,T),R={};if(L.charAt(0)=='"'&&L.charAt(L.length-1)=='"'&&(L=L.slice(1,-1).replace(/""/g,'"')),L.length===0)R.t="z";else if(p.raw)R.t="s",R.v=L;else if(L.trim().length===0)R.t="s",R.v=L;else if(L.charCodeAt(0)==61)L.charCodeAt(1)==34&&L.charCodeAt(L.length-1)==34?(R.t="s",R.v=L.slice(2,-1).replace(/""/g,'"')):avt(L)?(R.t="n",R.f=L.slice(1)):(R.t="s",R.v=L);else if(L=="TRUE")R.t="b",R.v=!0;else if(L=="FALSE")R.t="b",R.v=!1;else if(!isNaN(w=Yd(L)))R.t="n",p.cellText!==!1&&(R.w=L),R.v=w;else if(!isNaN(n4(L).getDate())||A&&L.match(A)){R.z=p.dateNF||gi[14];var O=0;A&&L.match(A)&&(L=Emt(L,p.dateNF,L.match(A)||[]),O=1),p.cellDates?(R.t="d",R.v=Uo(L,O)):(R.t="n",R.v=Ol(Uo(L,O))),p.cellText!==!1&&(R.w=D0(R.z,R.v instanceof Date?Ol(R.v):R.v)),p.cellNF||delete R.z}else R.t="s",R.v=L;if(R.t=="z"||(p.dense?(m[v]||(m[v]=[]),m[v][b]=R):m[ca({c:b,r:v})]=R),x=T+1,k=d.charCodeAt(x),y.e.c<b&&(y.e.c=b),y.e.r<v&&(y.e.r=v),E==C)++b;else if(b=0,++v,p.sheetRows&&p.sheetRows<=v)return!0}l(I,"finish_cell");e:for(;T<d.length;++T)switch(E=d.charCodeAt(T)){case 34:k===34&&(S=!S);break;case C:case 10:case 13:if(!S&&I())break e;break}return T-x>0&&I(),m["!ref"]=qi(y),m}l(i,"dsv_to_sheet_str");function s(d,f){return!(f&&f.PRN)||f.FS||d.slice(0,4)=="sep="||d.indexOf(" ")>=0||d.indexOf(",")>=0||d.indexOf(";")>=0?i(d,f):ew(e(d,f),f)}l(s,"prn_to_sheet_str");function o(d,f){var p="",g=f.type=="string"?[0,0,0,0]:vwt(d,f);switch(f.type){case"base64":p=Vd(d);break;case"binary":p=d;break;case"buffer":f.codepage==65001?p=d.toString("utf8"):f.codepage&&typeof LA!="undefined"||(p=Xn&&Buffer.isBuffer(d)?d.toString("binary"):e4(d));break;case"array":p=WA(d);break;case"string":p=d;break;default:throw new Error("Unrecognized type "+f.type)}return g[0]==239&&g[1]==187&&g[2]==191?p=a4(p.slice(3)):f.type!="string"&&f.type!="buffer"&&f.codepage==65001?p=a4(p):f.type=="binary",p.slice(0,19)=="socialcalc:version:"?ipe.to_sheet(f.type=="string"?p:a4(p),f):s(p,f)}l(o,"prn_to_sheet");function u(d,f){return Yg(o(d,f),f)}l(u,"prn_to_workbook");function h(d){for(var f=[],p=Ba(d["!ref"]),g,m=Array.isArray(d),y=p.s.r;y<=p.e.r;++y){for(var v=[],b=p.s.c;b<=p.e.c;++b){var w=ca({r:y,c:b});if(g=m?(d[y]||[])[b]:d[w],!g||g.v==null){v.push(" ");continue}for(var x=(g.w||(Ud(g),g.w)||"").slice(0,10);x.length<10;)x+=" ";v.push(x+(b===0?" ":""))}f.push(v.join(""))}return f.join(`
|
||
`)}return l(h,"sheet_to_prn"),{to_workbook:u,to_sheet:o,from_sheet:h}}(),spe=function(){function t(V,Y,H){if(V){dc(V,V.l||0);for(var q=H.Enum||U;V.l<V.length;){var Z=V.read_shift(2),K=q[Z]||q[65535],re=V.read_shift(2),Q=V.l+re,te=K.f&&K.f(V,re,H);if(V.l=Q,Y(te,K,Z))return}}}l(t,"lotushopper");function e(V,Y){switch(Y.type){case"base64":return r(Au(Vd(V)),Y);case"binary":return r(Au(V),Y);case"buffer":case"array":return r(V,Y)}throw"Unsupported type "+Y.type}l(e,"lotus_to_workbook");function r(V,Y){if(!V)return V;var H=Y||{},q=H.dense?[]:{},Z="Sheet1",K="",re=0,Q={},te=[],ee=[],J={s:{r:0,c:0},e:{r:0,c:0}},ae=H.sheetRows||0;if(V[2]==0&&(V[3]==8||V[3]==9)&&V.length>=16&&V[14]==5&&V[15]===108)throw new Error("Unsupported Works 3 for Mac file");if(V[2]==2)H.Enum=U,t(V,function(de,Ee,Ce){switch(Ce){case 0:H.vers=de,de>=4096&&(H.qpro=!0);break;case 6:J=de;break;case 204:de&&(K=de);break;case 222:K=de;break;case 15:case 51:H.qpro||(de[1].v=de[1].v.slice(1));case 13:case 14:case 16:Ce==14&&(de[2]&112)==112&&(de[2]&15)>1&&(de[2]&15)<15&&(de[1].z=H.dateNF||gi[14],H.cellDates&&(de[1].t="d",de[1].v=r0e(de[1].v))),H.qpro&&de[3]>re&&(q["!ref"]=qi(J),Q[Z]=q,te.push(Z),q=H.dense?[]:{},J={s:{r:0,c:0},e:{r:0,c:0}},re=de[3],Z=K||"Sheet"+(re+1),K="");var De=H.dense?(q[de[0].r]||[])[de[0].c]:q[ca(de[0])];if(De){De.t=de[1].t,De.v=de[1].v,de[1].z!=null&&(De.z=de[1].z),de[1].f!=null&&(De.f=de[1].f);break}H.dense?(q[de[0].r]||(q[de[0].r]=[]),q[de[0].r][de[0].c]=de[1]):q[ca(de[0])]=de[1];break}},H);else if(V[2]==26||V[2]==14)H.Enum=j,V[2]==14&&(H.qpro=!0,V.l=0),t(V,function(de,Ee,Ce){switch(Ce){case 204:Z=de;break;case 22:de[1].v=de[1].v.slice(1);case 23:case 24:case 25:case 37:case 39:case 40:if(de[3]>re&&(q["!ref"]=qi(J),Q[Z]=q,te.push(Z),q=H.dense?[]:{},J={s:{r:0,c:0},e:{r:0,c:0}},re=de[3],Z="Sheet"+(re+1)),ae>0&&de[0].r>=ae)break;H.dense?(q[de[0].r]||(q[de[0].r]=[]),q[de[0].r][de[0].c]=de[1]):q[ca(de[0])]=de[1],J.e.c<de[0].c&&(J.e.c=de[0].c),J.e.r<de[0].r&&(J.e.r=de[0].r);break;case 27:de[14e3]&&(ee[de[14e3][0]]=de[14e3][1]);break;case 1537:ee[de[0]]=de[1],de[0]==re&&(Z=de[1]);break}},H);else throw new Error("Unrecognized LOTUS BOF "+V[2]);if(q["!ref"]=qi(J),Q[K||Z]=q,te.push(K||Z),!ee.length)return{SheetNames:te,Sheets:Q};for(var se={},fe=[],ve=0;ve<ee.length;++ve)Q[te[ve]]?(fe.push(ee[ve]||te[ve]),se[ee[ve]]=Q[ee[ve]]||Q[te[ve]]):(fe.push(ee[ve]),se[ee[ve]]={"!ref":"A1"});return{SheetNames:fe,Sheets:se}}l(r,"lotus_to_workbook_buf");function n(V,Y){var H=Y||{};if(+H.codepage>=0&&QS(+H.codepage),H.type=="string")throw new Error("Cannot write WK1 to JS string");var q=Fl(),Z=Ba(V["!ref"]),K=Array.isArray(V),re=[];pr(q,0,i(1030)),pr(q,6,u(Z));for(var Q=Math.min(Z.e.r,8191),te=Z.s.r;te<=Q;++te)for(var ee=Qs(te),J=Z.s.c;J<=Z.e.c;++J){te===Z.s.r&&(re[J]=Co(J));var ae=re[J]+ee,se=K?(V[te]||[])[J]:V[ae];if(!(!se||se.t=="z"))if(se.t=="n")(se.v|0)==se.v&&se.v>=-32768&&se.v<=32767?pr(q,13,g(te,J,se.v)):pr(q,14,y(te,J,se.v));else{var fe=Ud(se);pr(q,15,f(te,J,fe.slice(0,239)))}}return pr(q,1),q.end()}l(n,"sheet_to_wk1");function a(V,Y){var H=Y||{};if(+H.codepage>=0&&QS(+H.codepage),H.type=="string")throw new Error("Cannot write WK3 to JS string");var q=Fl();pr(q,0,s(V));for(var Z=0,K=0;Z<V.SheetNames.length;++Z)(V.Sheets[V.SheetNames[Z]]||{})["!ref"]&&pr(q,27,W(V.SheetNames[Z],K++));var re=0;for(Z=0;Z<V.SheetNames.length;++Z){var Q=V.Sheets[V.SheetNames[Z]];if(!(!Q||!Q["!ref"])){for(var te=Ba(Q["!ref"]),ee=Array.isArray(Q),J=[],ae=Math.min(te.e.r,8191),se=te.s.r;se<=ae;++se)for(var fe=Qs(se),ve=te.s.c;ve<=te.e.c;++ve){se===te.s.r&&(J[ve]=Co(ve));var de=J[ve]+fe,Ee=ee?(Q[se]||[])[ve]:Q[de];if(!(!Ee||Ee.t=="z"))if(Ee.t=="n")pr(q,23,I(se,ve,re,Ee.v));else{var Ce=Ud(Ee);pr(q,22,E(se,ve,re,Ce.slice(0,239)))}}++re}}return pr(q,1),q.end()}l(a,"book_to_wk3");function i(V){var Y=Gt(2);return Y.write_shift(2,V),Y}l(i,"write_BOF_WK1");function s(V){var Y=Gt(26);Y.write_shift(2,4096),Y.write_shift(2,4),Y.write_shift(4,0);for(var H=0,q=0,Z=0,K=0;K<V.SheetNames.length;++K){var re=V.SheetNames[K],Q=V.Sheets[re];if(!(!Q||!Q["!ref"])){++Z;var te=fc(Q["!ref"]);H<te.e.r&&(H=te.e.r),q<te.e.c&&(q=te.e.c)}}return H>8191&&(H=8191),Y.write_shift(2,H),Y.write_shift(1,Z),Y.write_shift(1,q),Y.write_shift(2,0),Y.write_shift(2,0),Y.write_shift(1,1),Y.write_shift(1,2),Y.write_shift(4,0),Y.write_shift(4,0),Y}l(s,"write_BOF_WK3");function o(V,Y,H){var q={s:{c:0,r:0},e:{c:0,r:0}};return Y==8&&H.qpro?(q.s.c=V.read_shift(1),V.l++,q.s.r=V.read_shift(2),q.e.c=V.read_shift(1),V.l++,q.e.r=V.read_shift(2),q):(q.s.c=V.read_shift(2),q.s.r=V.read_shift(2),Y==12&&H.qpro&&(V.l+=2),q.e.c=V.read_shift(2),q.e.r=V.read_shift(2),Y==12&&H.qpro&&(V.l+=2),q.s.c==65535&&(q.s.c=q.e.c=q.s.r=q.e.r=0),q)}l(o,"parse_RANGE");function u(V){var Y=Gt(8);return Y.write_shift(2,V.s.c),Y.write_shift(2,V.s.r),Y.write_shift(2,V.e.c),Y.write_shift(2,V.e.r),Y}l(u,"write_RANGE");function h(V,Y,H){var q=[{c:0,r:0},{t:"n",v:0},0,0];return H.qpro&&H.vers!=20768?(q[0].c=V.read_shift(1),q[3]=V.read_shift(1),q[0].r=V.read_shift(2),V.l+=2):(q[2]=V.read_shift(1),q[0].c=V.read_shift(2),q[0].r=V.read_shift(2)),q}l(h,"parse_cell");function d(V,Y,H){var q=V.l+Y,Z=h(V,Y,H);if(Z[1].t="s",H.vers==20768){V.l++;var K=V.read_shift(1);return Z[1].v=V.read_shift(K,"utf8"),Z}return H.qpro&&V.l++,Z[1].v=V.read_shift(q-V.l,"cstr"),Z}l(d,"parse_LABEL");function f(V,Y,H){var q=Gt(7+H.length);q.write_shift(1,255),q.write_shift(2,Y),q.write_shift(2,V),q.write_shift(1,39);for(var Z=0;Z<q.length;++Z){var K=H.charCodeAt(Z);q.write_shift(1,K>=128?95:K)}return q.write_shift(1,0),q}l(f,"write_LABEL");function p(V,Y,H){var q=h(V,Y,H);return q[1].v=V.read_shift(2,"i"),q}l(p,"parse_INTEGER");function g(V,Y,H){var q=Gt(7);return q.write_shift(1,255),q.write_shift(2,Y),q.write_shift(2,V),q.write_shift(2,H,"i"),q}l(g,"write_INTEGER");function m(V,Y,H){var q=h(V,Y,H);return q[1].v=V.read_shift(8,"f"),q}l(m,"parse_NUMBER");function y(V,Y,H){var q=Gt(13);return q.write_shift(1,255),q.write_shift(2,Y),q.write_shift(2,V),q.write_shift(8,H,"f"),q}l(y,"write_NUMBER");function v(V,Y,H){var q=V.l+Y,Z=h(V,Y,H);if(Z[1].v=V.read_shift(8,"f"),H.qpro)V.l=q;else{var K=V.read_shift(2);T(V.slice(V.l,V.l+K),Z),V.l+=K}return Z}l(v,"parse_FORMULA");function b(V,Y,H){var q=Y&32768;return Y&=-32769,Y=(q?V:0)+(Y>=8192?Y-16384:Y),(q?"":"$")+(H?Co(Y):Qs(Y))}l(b,"wk1_parse_rc");var w={51:["FALSE",0],52:["TRUE",0],70:["LEN",1],80:["SUM",69],81:["AVERAGEA",69],82:["COUNTA",69],83:["MINA",69],84:["MAXA",69],111:["T",1]},x=["","","","","","","","","","+","-","*","/","^","=","<>","<=",">=","<",">","","","","","&","","","","","","",""];function T(V,Y){dc(V,0);for(var H=[],q=0,Z="",K="",re="",Q="";V.l<V.length;){var te=V[V.l++];switch(te){case 0:H.push(V.read_shift(8,"f"));break;case 1:K=b(Y[0].c,V.read_shift(2),!0),Z=b(Y[0].r,V.read_shift(2),!1),H.push(K+Z);break;case 2:{var ee=b(Y[0].c,V.read_shift(2),!0),J=b(Y[0].r,V.read_shift(2),!1);K=b(Y[0].c,V.read_shift(2),!0),Z=b(Y[0].r,V.read_shift(2),!1),H.push(ee+J+":"+K+Z)}break;case 3:if(V.l<V.length){console.error("WK1 premature formula end");return}break;case 4:H.push("("+H.pop()+")");break;case 5:H.push(V.read_shift(2));break;case 6:{for(var ae="";te=V[V.l++];)ae+=String.fromCharCode(te);H.push('"'+ae.replace(/"/g,'""')+'"')}break;case 8:H.push("-"+H.pop());break;case 23:H.push("+"+H.pop());break;case 22:H.push("NOT("+H.pop()+")");break;case 20:case 21:Q=H.pop(),re=H.pop(),H.push(["AND","OR"][te-20]+"("+re+","+Q+")");break;default:if(te<32&&x[te])Q=H.pop(),re=H.pop(),H.push(re+x[te]+Q);else if(w[te]){if(q=w[te][1],q==69&&(q=V[V.l++]),q>H.length){console.error("WK1 bad formula parse 0x"+te.toString(16)+":|"+H.join("|")+"|");return}var se=H.slice(-q);H.length-=q,H.push(w[te][0]+"("+se.join(",")+")")}else return te<=7?console.error("WK1 invalid opcode "+te.toString(16)):te<=24?console.error("WK1 unsupported op "+te.toString(16)):te<=30?console.error("WK1 invalid opcode "+te.toString(16)):te<=115?console.error("WK1 unsupported function opcode "+te.toString(16)):console.error("WK1 unrecognized opcode "+te.toString(16))}}H.length==1?Y[1].f=""+H[0]:console.error("WK1 bad formula parse |"+H.join("|")+"|")}l(T,"wk1_fmla_to_csf");function C(V){var Y=[{c:0,r:0},{t:"n",v:0},0];return Y[0].r=V.read_shift(2),Y[3]=V[V.l++],Y[0].c=V[V.l++],Y}l(C,"parse_cell_3");function S(V,Y){var H=C(V);return H[1].t="s",H[1].v=V.read_shift(Y-4,"cstr"),H}l(S,"parse_LABEL_16");function E(V,Y,H,q){var Z=Gt(6+q.length);Z.write_shift(2,V),Z.write_shift(1,H),Z.write_shift(1,Y),Z.write_shift(1,39);for(var K=0;K<q.length;++K){var re=q.charCodeAt(K);Z.write_shift(1,re>=128?95:re)}return Z.write_shift(1,0),Z}l(E,"write_LABEL_16");function k(V,Y){var H=C(V);H[1].v=V.read_shift(2);var q=H[1].v>>1;if(H[1].v&1)switch(q&7){case 0:q=(q>>3)*5e3;break;case 1:q=(q>>3)*500;break;case 2:q=(q>>3)/20;break;case 3:q=(q>>3)/200;break;case 4:q=(q>>3)/2e3;break;case 5:q=(q>>3)/2e4;break;case 6:q=(q>>3)/16;break;case 7:q=(q>>3)/64;break}return H[1].v=q,H}l(k,"parse_NUMBER_18");function A(V,Y){var H=C(V),q=V.read_shift(4),Z=V.read_shift(4),K=V.read_shift(2);if(K==65535)return q===0&&Z===3221225472?(H[1].t="e",H[1].v=15):q===0&&Z===3489660928?(H[1].t="e",H[1].v=42):H[1].v=0,H;var re=K&32768;return K=(K&32767)-16446,H[1].v=(1-re*2)*(Z*Math.pow(2,K+32)+q*Math.pow(2,K)),H}l(A,"parse_NUMBER_17");function I(V,Y,H,q){var Z=Gt(14);if(Z.write_shift(2,V),Z.write_shift(1,H),Z.write_shift(1,Y),q==0)return Z.write_shift(4,0),Z.write_shift(4,0),Z.write_shift(2,65535),Z;var K=0,re=0,Q=0,te=0;return q<0&&(K=1,q=-q),re=Math.log2(q)|0,q/=Math.pow(2,re-31),te=q>>>0,te&2147483648||(q/=2,++re,te=q>>>0),q-=te,te|=2147483648,te>>>=0,q*=Math.pow(2,32),Q=q>>>0,Z.write_shift(4,Q),Z.write_shift(4,te),re+=16383+(K?32768:0),Z.write_shift(2,re),Z}l(I,"write_NUMBER_17");function L(V,Y){var H=A(V);return V.l+=Y-14,H}l(L,"parse_FORMULA_19");function R(V,Y){var H=C(V),q=V.read_shift(4);return H[1].v=q>>6,H}l(R,"parse_NUMBER_25");function O(V,Y){var H=C(V),q=V.read_shift(8,"f");return H[1].v=q,H}l(O,"parse_NUMBER_27");function M(V,Y){var H=O(V);return V.l+=Y-10,H}l(M,"parse_FORMULA_28");function P(V,Y){return V[V.l+Y-1]==0?V.read_shift(Y,"cstr"):""}l(P,"parse_SHEETNAMECS");function z(V,Y){var H=V[V.l++];H>Y-1&&(H=Y-1);for(var q="";q.length<H;)q+=String.fromCharCode(V[V.l++]);return q}l(z,"parse_SHEETNAMELP");function D(V,Y,H){if(!(!H.qpro||Y<21)){var q=V.read_shift(1);V.l+=17,V.l+=1,V.l+=2;var Z=V.read_shift(Y-21,"cstr");return[q,Z]}}l(D,"parse_SHEETINFOQP");function B(V,Y){for(var H={},q=V.l+Y;V.l<q;){var Z=V.read_shift(2);if(Z==14e3){for(H[Z]=[0,""],H[Z][0]=V.read_shift(2);V[V.l];)H[Z][1]+=String.fromCharCode(V[V.l]),V.l++;V.l++}}return H}l(B,"parse_XFORMAT");function W(V,Y){var H=Gt(5+V.length);H.write_shift(2,14e3),H.write_shift(2,Y);for(var q=0;q<V.length;++q){var Z=V.charCodeAt(q);H[H.l++]=Z>127?95:Z}return H[H.l++]=0,H}l(W,"write_XFORMAT_SHEETNAME");var U={0:{n:"BOF",f:Q0e},1:{n:"EOF"},2:{n:"CALCMODE"},3:{n:"CALCORDER"},4:{n:"SPLIT"},5:{n:"SYNC"},6:{n:"RANGE",f:o},7:{n:"WINDOW1"},8:{n:"COLW1"},9:{n:"WINTWO"},10:{n:"COLW2"},11:{n:"NAME"},12:{n:"BLANK"},13:{n:"INTEGER",f:p},14:{n:"NUMBER",f:m},15:{n:"LABEL",f:d},16:{n:"FORMULA",f:v},24:{n:"TABLE"},25:{n:"ORANGE"},26:{n:"PRANGE"},27:{n:"SRANGE"},28:{n:"FRANGE"},29:{n:"KRANGE1"},32:{n:"HRANGE"},35:{n:"KRANGE2"},36:{n:"PROTEC"},37:{n:"FOOTER"},38:{n:"HEADER"},39:{n:"SETUP"},40:{n:"MARGINS"},41:{n:"LABELFMT"},42:{n:"TITLES"},43:{n:"SHEETJS"},45:{n:"GRAPH"},46:{n:"NGRAPH"},47:{n:"CALCCOUNT"},48:{n:"UNFORMATTED"},49:{n:"CURSORW12"},50:{n:"WINDOW"},51:{n:"STRING",f:d},55:{n:"PASSWORD"},56:{n:"LOCKED"},60:{n:"QUERY"},61:{n:"QUERYNAME"},62:{n:"PRINT"},63:{n:"PRINTNAME"},64:{n:"GRAPH2"},65:{n:"GRAPHNAME"},66:{n:"ZOOM"},67:{n:"SYMSPLIT"},68:{n:"NSROWS"},69:{n:"NSCOLS"},70:{n:"RULER"},71:{n:"NNAME"},72:{n:"ACOMM"},73:{n:"AMACRO"},74:{n:"PARSE"},102:{n:"PRANGES??"},103:{n:"RRANGES??"},104:{n:"FNAME??"},105:{n:"MRANGES??"},204:{n:"SHEETNAMECS",f:P},222:{n:"SHEETNAMELP",f:z},65535:{n:""}},j={0:{n:"BOF"},1:{n:"EOF"},2:{n:"PASSWORD"},3:{n:"CALCSET"},4:{n:"WINDOWSET"},5:{n:"SHEETCELLPTR"},6:{n:"SHEETLAYOUT"},7:{n:"COLUMNWIDTH"},8:{n:"HIDDENCOLUMN"},9:{n:"USERRANGE"},10:{n:"SYSTEMRANGE"},11:{n:"ZEROFORCE"},12:{n:"SORTKEYDIR"},13:{n:"FILESEAL"},14:{n:"DATAFILLNUMS"},15:{n:"PRINTMAIN"},16:{n:"PRINTSTRING"},17:{n:"GRAPHMAIN"},18:{n:"GRAPHSTRING"},19:{n:"??"},20:{n:"ERRCELL"},21:{n:"NACELL"},22:{n:"LABEL16",f:S},23:{n:"NUMBER17",f:A},24:{n:"NUMBER18",f:k},25:{n:"FORMULA19",f:L},26:{n:"FORMULA1A"},27:{n:"XFORMAT",f:B},28:{n:"DTLABELMISC"},29:{n:"DTLABELCELL"},30:{n:"GRAPHWINDOW"},31:{n:"CPA"},32:{n:"LPLAUTO"},33:{n:"QUERY"},34:{n:"HIDDENSHEET"},35:{n:"??"},37:{n:"NUMBER25",f:R},38:{n:"??"},39:{n:"NUMBER27",f:O},40:{n:"FORMULA28",f:M},142:{n:"??"},147:{n:"??"},150:{n:"??"},151:{n:"??"},152:{n:"??"},153:{n:"??"},154:{n:"??"},155:{n:"??"},156:{n:"??"},163:{n:"??"},174:{n:"??"},175:{n:"??"},176:{n:"??"},177:{n:"??"},184:{n:"??"},185:{n:"??"},186:{n:"??"},187:{n:"??"},188:{n:"??"},195:{n:"??"},201:{n:"??"},204:{n:"SHEETNAMECS",f:P},205:{n:"??"},206:{n:"??"},207:{n:"??"},208:{n:"??"},256:{n:"??"},259:{n:"??"},260:{n:"??"},261:{n:"??"},262:{n:"??"},263:{n:"??"},265:{n:"??"},266:{n:"??"},267:{n:"??"},268:{n:"??"},270:{n:"??"},271:{n:"??"},384:{n:"??"},389:{n:"??"},390:{n:"??"},393:{n:"??"},396:{n:"??"},512:{n:"??"},514:{n:"??"},513:{n:"??"},516:{n:"??"},517:{n:"??"},640:{n:"??"},641:{n:"??"},642:{n:"??"},643:{n:"??"},644:{n:"??"},645:{n:"??"},646:{n:"??"},647:{n:"??"},648:{n:"??"},658:{n:"??"},659:{n:"??"},660:{n:"??"},661:{n:"??"},662:{n:"??"},665:{n:"??"},666:{n:"??"},768:{n:"??"},772:{n:"??"},1537:{n:"SHEETINFOQP",f:D},1600:{n:"??"},1602:{n:"??"},1793:{n:"??"},1794:{n:"??"},1795:{n:"??"},1796:{n:"??"},1920:{n:"??"},2048:{n:"??"},2049:{n:"??"},2052:{n:"??"},2688:{n:"??"},10998:{n:"??"},12849:{n:"??"},28233:{n:"??"},28484:{n:"??"},65535:{n:""}};return{sheet_to_wk1:n,book_to_wk3:a,to_workbook:e}}(),oyt=/^\s|\s$|[\t\n\r]/;function ope(t,e){if(!e.bookSST)return"";var r=[Gi];r[r.length]=fr("sst",null,{xmlns:Qx[0],count:t.Count,uniqueCount:t.Unique});for(var n=0;n!=t.length;++n)if(t[n]!=null){var a=t[n],i="<si>";a.r?i+=a.r:(i+="<t",a.t||(a.t=""),a.t.match(oyt)&&(i+=' xml:space="preserve"'),i+=">"+la(a.t)+"</t>"),i+="</si>",r[r.length]=i}return r.length>2&&(r[r.length]="</sst>",r[1]=r[1].replace("/>",">")),r.join("")}l(ope,"write_sst_xml");function lyt(t){return[t.read_shift(4),t.read_shift(4)]}l(lyt,"parse_BrtBeginSst");function cyt(t,e){return e||(e=Gt(8)),e.write_shift(4,t.Count),e.write_shift(4,t.Unique),e}l(cyt,"write_BrtBeginSst");var uyt=e1t;function hyt(t){var e=Fl();tr(e,159,cyt(t));for(var r=0;r<t.length;++r)tr(e,19,uyt(t[r]));return tr(e,160),e.end()}l(hyt,"write_sst_bin");function dyt(t){for(var e=[],r=t.split(""),n=0;n<r.length;++n)e[n]=r[n].charCodeAt(0);return e}l(dyt,"_JS2ANSI");function lpe(t){var e=0,r,n=dyt(t),a=n.length+1,i,s,o,u,h;for(r=Gg(a),r[0]=n.length,i=1;i!=a;++i)r[i]=n[i-1];for(i=a-1;i>=0;--i)s=r[i],o=e&16384?1:0,u=e<<1&32767,h=o|u,e=h^s;return e^52811}l(lpe,"crypto_CreatePasswordVerifier_Method1");var fyt=function(){function t(a,i){switch(i.type){case"base64":return e(Vd(a),i);case"binary":return e(a,i);case"buffer":return e(Xn&&Buffer.isBuffer(a)?a.toString("binary"):e4(a),i);case"array":return e(WA(a),i)}throw new Error("Unrecognized type "+i.type)}l(t,"rtf_to_sheet");function e(a,i){var s=i||{},o=s.dense?[]:{},u=a.match(/\\trowd.*?\\row\b/g);if(!u.length)throw new Error("RTF missing table");var h={s:{c:0,r:0},e:{c:0,r:u.length-1}};return u.forEach(function(d,f){Array.isArray(o)&&(o[f]=[]);for(var p=/\\\w+\b/g,g=0,m,y=-1;m=p.exec(d);){switch(m[0]){case"\\cell":var v=d.slice(g,p.lastIndex-m[0].length);if(v[0]==" "&&(v=v.slice(1)),++y,v.length){var b={v,t:"s"};Array.isArray(o)?o[f][y]=b:o[ca({r:f,c:y})]=b}break}g=p.lastIndex}y>h.e.c&&(h.e.c=y)}),o["!ref"]=qi(h),o}l(e,"rtf_to_sheet_str");function r(a,i){return Yg(t(a,i),i)}l(r,"rtf_to_workbook");function n(a){for(var i=["{\\rtf1\\ansi"],s=Ba(a["!ref"]),o,u=Array.isArray(a),h=s.s.r;h<=s.e.r;++h){i.push("\\trowd\\trautofit1");for(var d=s.s.c;d<=s.e.c;++d)i.push("\\cellx"+(d+1));for(i.push("\\pard\\intbl"),d=s.s.c;d<=s.e.c;++d){var f=ca({r:h,c:d});o=u?(a[h]||[])[d]:a[f],!(!o||o.v==null&&(!o.f||o.F))&&(i.push(" "+(o.w||(Ud(o),o.w))),i.push("\\cell"))}i.push("\\pard\\intbl\\row")}return i.join("")+"}"}return l(n,"sheet_to_rtf"),{to_workbook:r,to_sheet:t,from_sheet:n}}();function cpe(t){for(var e=0,r=1;e!=3;++e)r=r*256+(t[e]>255?255:t[e]<0?0:t[e]);return r.toString(16).toUpperCase().slice(1)}l(cpe,"rgb2Hex");var pyt=6,jd=pyt;function ZA(t){return Math.floor((t+Math.round(128/jd)/256)*jd)}l(ZA,"width2px");function QA(t){return Math.floor((t-5)/jd*100+.5)/100}l(QA,"px2char");function VB(t){return Math.round((t*jd+5)/jd*256)/256}l(VB,"char2width");function GB(t){t.width?(t.wpx=ZA(t.width),t.wch=QA(t.wpx),t.MDW=jd):t.wpx?(t.wch=QA(t.wpx),t.width=VB(t.wch),t.MDW=jd):typeof t.wch=="number"&&(t.width=VB(t.wch),t.wpx=ZA(t.width),t.MDW=jd),t.customWidth&&delete t.customWidth}l(GB,"process_col");var gyt=96,upe=gyt;function JA(t){return t*96/upe}l(JA,"px2pt");function hpe(t){return t*upe/96}l(hpe,"pt2px");function myt(t){var e=["<numFmts>"];return[[5,8],[23,26],[41,44],[50,392]].forEach(function(r){for(var n=r[0];n<=r[1];++n)t[n]!=null&&(e[e.length]=fr("numFmt",null,{numFmtId:n,formatCode:la(t[n])}))}),e.length===1?"":(e[e.length]="</numFmts>",e[0]=fr("numFmts",null,{count:e.length-2}).replace("/>",">"),e.join(""))}l(myt,"write_numFmts");function yyt(t){var e=[];return e[e.length]=fr("cellXfs",null),t.forEach(function(r){e[e.length]=fr("xf",null,r)}),e[e.length]="</cellXfs>",e.length===2?"":(e[0]=fr("cellXfs",null,{count:e.length-2}).replace("/>",">"),e.join(""))}l(yyt,"write_cellXfs");function dpe(t,e){var r=[Gi,fr("styleSheet",null,{xmlns:Qx[0],"xmlns:vt":Cs.vt})],n;return t.SSF&&(n=myt(t.SSF))!=null&&(r[r.length]=n),r[r.length]='<fonts count="1"><font><sz val="12"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts>',r[r.length]='<fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills>',r[r.length]='<borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders>',r[r.length]='<cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>',(n=yyt(e.cellXfs))&&(r[r.length]=n),r[r.length]='<cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles>',r[r.length]='<dxfs count="0"/>',r[r.length]='<tableStyles count="0" defaultTableStyle="TableStyleMedium9" defaultPivotStyle="PivotStyleMedium4"/>',r.length>2&&(r[r.length]="</styleSheet>",r[1]=r[1].replace("/>",">")),r.join("")}l(dpe,"write_sty_xml");function vyt(t,e){var r=t.read_shift(2),n=So(t);return[r,n]}l(vyt,"parse_BrtFmt");function byt(t,e,r){r||(r=Gt(6+4*e.length)),r.write_shift(2,t),_s(e,r);var n=r.length>r.l?r.slice(0,r.l):r;return r.l==null&&(r.l=r.length),n}l(byt,"write_BrtFmt");function xyt(t,e,r){var n={};n.sz=t.read_shift(2)/20;var a=o1t(t);a.fItalic&&(n.italic=1),a.fCondense&&(n.condense=1),a.fExtend&&(n.extend=1),a.fShadow&&(n.shadow=1),a.fOutline&&(n.outline=1),a.fStrikeout&&(n.strike=1);var i=t.read_shift(2);switch(i===700&&(n.bold=1),t.read_shift(2)){case 1:n.vertAlign="superscript";break;case 2:n.vertAlign="subscript";break}var s=t.read_shift(1);s!=0&&(n.underline=s);var o=t.read_shift(1);o>0&&(n.family=o);var u=t.read_shift(1);switch(u>0&&(n.charset=u),t.l++,n.color=s1t(t),t.read_shift(1)){case 1:n.scheme="major";break;case 2:n.scheme="minor";break}return n.name=So(t),n}l(xyt,"parse_BrtFont");function wyt(t,e){e||(e=Gt(153)),e.write_shift(2,t.sz*20),l1t(t,e),e.write_shift(2,t.bold?700:400);var r=0;t.vertAlign=="superscript"?r=1:t.vertAlign=="subscript"&&(r=2),e.write_shift(2,r),e.write_shift(1,t.underline||0),e.write_shift(1,t.family||0),e.write_shift(1,t.charset||0),e.write_shift(1,0),YA(t.color,e);var n=0;return n=2,e.write_shift(1,n),_s(t.name,e),e.length>e.l?e.slice(0,e.l):e}l(wyt,"write_BrtFont");var Tyt=["none","solid","mediumGray","darkGray","lightGray","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","gray125","gray0625"],qB,Eyt=_h;function fpe(t,e){e||(e=Gt(84)),qB||(qB=_B(Tyt));var r=qB[t.patternType];r==null&&(r=40),e.write_shift(4,r);var n=0;if(r!=40)for(YA({auto:1},e),YA({auto:1},e);n<12;++n)e.write_shift(4,0);else{for(;n<4;++n)e.write_shift(4,0);for(;n<12;++n)e.write_shift(4,0)}return e.length>e.l?e.slice(0,e.l):e}l(fpe,"write_BrtFill");function Cyt(t,e){var r=t.l+e,n=t.read_shift(2),a=t.read_shift(2);return t.l=r,{ixfe:n,numFmtId:a}}l(Cyt,"parse_BrtXF");function ppe(t,e,r){r||(r=Gt(16)),r.write_shift(2,e||0),r.write_shift(2,t.numFmtId||0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(1,0),r.write_shift(1,0);var n=0;return r.write_shift(1,n),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(1,0),r}l(ppe,"write_BrtXF");function f4(t,e){return e||(e=Gt(10)),e.write_shift(1,0),e.write_shift(1,0),e.write_shift(4,0),e.write_shift(4,0),e}l(f4,"write_Blxf");var Syt=_h;function _yt(t,e){return e||(e=Gt(51)),e.write_shift(1,0),f4(null,e),f4(null,e),f4(null,e),f4(null,e),f4(null,e),e.length>e.l?e.slice(0,e.l):e}l(_yt,"write_BrtBorder");function kyt(t,e){return e||(e=Gt(52)),e.write_shift(4,t.xfId),e.write_shift(2,1),e.write_shift(1,0),e.write_shift(1,0),qA(t.name||"",e),e.length>e.l?e.slice(0,e.l):e}l(kyt,"write_BrtStyle");function Ayt(t,e,r){var n=Gt(2052);return n.write_shift(4,t),qA(e,n),qA(r,n),n.length>n.l?n.slice(0,n.l):n}l(Ayt,"write_BrtBeginTableStyles");function Nyt(t,e){if(e){var r=0;[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var a=n[0];a<=n[1];++a)e[a]!=null&&++r}),r!=0&&(tr(t,615,Iu(r)),[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var a=n[0];a<=n[1];++a)e[a]!=null&&tr(t,44,byt(a,e[a]))}),tr(t,616))}}l(Nyt,"write_FMTS_bin");function Iyt(t){var e=1;tr(t,611,Iu(e)),tr(t,43,wyt({sz:12,color:{theme:1},name:"Calibri",family:2})),tr(t,612)}l(Iyt,"write_FONTS_bin");function Lyt(t){var e=2;tr(t,603,Iu(e)),tr(t,45,fpe({patternType:"none"})),tr(t,45,fpe({patternType:"gray125"})),tr(t,604)}l(Lyt,"write_FILLS_bin");function $yt(t){var e=1;tr(t,613,Iu(e)),tr(t,46,_yt()),tr(t,614)}l($yt,"write_BORDERS_bin");function Myt(t){var e=1;tr(t,626,Iu(e)),tr(t,47,ppe({numFmtId:0},65535)),tr(t,627)}l(Myt,"write_CELLSTYLEXFS_bin");function Pyt(t,e){tr(t,617,Iu(e.length)),e.forEach(function(r){tr(t,47,ppe(r,0))}),tr(t,618)}l(Pyt,"write_CELLXFS_bin");function Ryt(t){var e=1;tr(t,619,Iu(e)),tr(t,48,kyt({xfId:0,name:"Normal"})),tr(t,620)}l(Ryt,"write_STYLES_bin");function Oyt(t){var e=0;tr(t,505,Iu(e)),tr(t,506)}l(Oyt,"write_DXFS_bin");function Dyt(t){var e=0;tr(t,508,Ayt(e,"TableStyleMedium9","PivotStyleMedium4")),tr(t,509)}l(Dyt,"write_TABLESTYLES_bin");function Fyt(t,e){var r=Fl();return tr(r,278),Nyt(r,t.SSF),Iyt(r),Lyt(r),$yt(r),Myt(r),Pyt(r,e.cellXfs),Ryt(r),Oyt(r),Dyt(r),tr(r,279),r.end()}l(Fyt,"write_sty_bin");function gpe(t,e){if(e&&e.themeXLSX)return e.themeXLSX;if(t&&typeof t.raw=="string")return t.raw;var r=[Gi];return r[r.length]='<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">',r[r.length]="<a:themeElements>",r[r.length]='<a:clrScheme name="Office">',r[r.length]='<a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1>',r[r.length]='<a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1>',r[r.length]='<a:dk2><a:srgbClr val="1F497D"/></a:dk2>',r[r.length]='<a:lt2><a:srgbClr val="EEECE1"/></a:lt2>',r[r.length]='<a:accent1><a:srgbClr val="4F81BD"/></a:accent1>',r[r.length]='<a:accent2><a:srgbClr val="C0504D"/></a:accent2>',r[r.length]='<a:accent3><a:srgbClr val="9BBB59"/></a:accent3>',r[r.length]='<a:accent4><a:srgbClr val="8064A2"/></a:accent4>',r[r.length]='<a:accent5><a:srgbClr val="4BACC6"/></a:accent5>',r[r.length]='<a:accent6><a:srgbClr val="F79646"/></a:accent6>',r[r.length]='<a:hlink><a:srgbClr val="0000FF"/></a:hlink>',r[r.length]='<a:folHlink><a:srgbClr val="800080"/></a:folHlink>',r[r.length]="</a:clrScheme>",r[r.length]='<a:fontScheme name="Office">',r[r.length]="<a:majorFont>",r[r.length]='<a:latin typeface="Cambria"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Times New Roman"/>',r[r.length]='<a:font script="Hebr" typeface="Times New Roman"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="MoolBoran"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Times New Roman"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:majorFont>",r[r.length]="<a:minorFont>",r[r.length]='<a:latin typeface="Calibri"/>',r[r.length]='<a:ea typeface=""/>',r[r.length]='<a:cs typeface=""/>',r[r.length]='<a:font script="Jpan" typeface="MS Pゴシック"/>',r[r.length]='<a:font script="Hang" typeface="맑은 고딕"/>',r[r.length]='<a:font script="Hans" typeface="宋体"/>',r[r.length]='<a:font script="Hant" typeface="新細明體"/>',r[r.length]='<a:font script="Arab" typeface="Arial"/>',r[r.length]='<a:font script="Hebr" typeface="Arial"/>',r[r.length]='<a:font script="Thai" typeface="Tahoma"/>',r[r.length]='<a:font script="Ethi" typeface="Nyala"/>',r[r.length]='<a:font script="Beng" typeface="Vrinda"/>',r[r.length]='<a:font script="Gujr" typeface="Shruti"/>',r[r.length]='<a:font script="Khmr" typeface="DaunPenh"/>',r[r.length]='<a:font script="Knda" typeface="Tunga"/>',r[r.length]='<a:font script="Guru" typeface="Raavi"/>',r[r.length]='<a:font script="Cans" typeface="Euphemia"/>',r[r.length]='<a:font script="Cher" typeface="Plantagenet Cherokee"/>',r[r.length]='<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>',r[r.length]='<a:font script="Tibt" typeface="Microsoft Himalaya"/>',r[r.length]='<a:font script="Thaa" typeface="MV Boli"/>',r[r.length]='<a:font script="Deva" typeface="Mangal"/>',r[r.length]='<a:font script="Telu" typeface="Gautami"/>',r[r.length]='<a:font script="Taml" typeface="Latha"/>',r[r.length]='<a:font script="Syrc" typeface="Estrangelo Edessa"/>',r[r.length]='<a:font script="Orya" typeface="Kalinga"/>',r[r.length]='<a:font script="Mlym" typeface="Kartika"/>',r[r.length]='<a:font script="Laoo" typeface="DokChampa"/>',r[r.length]='<a:font script="Sinh" typeface="Iskoola Pota"/>',r[r.length]='<a:font script="Mong" typeface="Mongolian Baiti"/>',r[r.length]='<a:font script="Viet" typeface="Arial"/>',r[r.length]='<a:font script="Uigh" typeface="Microsoft Uighur"/>',r[r.length]='<a:font script="Geor" typeface="Sylfaen"/>',r[r.length]="</a:minorFont>",r[r.length]="</a:fontScheme>",r[r.length]='<a:fmtScheme name="Office">',r[r.length]="<a:fillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="1"/>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="100000"/><a:shade val="100000"/><a:satMod val="130000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="50000"/><a:shade val="100000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:lin ang="16200000" scaled="0"/>',r[r.length]="</a:gradFill>",r[r.length]="</a:fillStyleLst>",r[r.length]="<a:lnStyleLst>",r[r.length]='<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]='<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln>',r[r.length]="</a:lnStyleLst>",r[r.length]="<a:effectStyleLst>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]="</a:effectStyle>",r[r.length]="<a:effectStyle>",r[r.length]="<a:effectLst>",r[r.length]='<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw>',r[r.length]="</a:effectLst>",r[r.length]='<a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d>',r[r.length]='<a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d>',r[r.length]="</a:effectStyle>",r[r.length]="</a:effectStyleLst>",r[r.length]="<a:bgFillStyleLst>",r[r.length]='<a:solidFill><a:schemeClr val="phClr"/></a:solidFill>',r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]='<a:gradFill rotWithShape="1">',r[r.length]="<a:gsLst>",r[r.length]='<a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs>',r[r.length]='<a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs>',r[r.length]="</a:gsLst>",r[r.length]='<a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path>',r[r.length]="</a:gradFill>",r[r.length]="</a:bgFillStyleLst>",r[r.length]="</a:fmtScheme>",r[r.length]="</a:themeElements>",r[r.length]="<a:objectDefaults>",r[r.length]="<a:spDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="1"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="3"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="2"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="lt1"/></a:fontRef></a:style>',r[r.length]="</a:spDef>",r[r.length]="<a:lnDef>",r[r.length]='<a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style>',r[r.length]="</a:lnDef>",r[r.length]="</a:objectDefaults>",r[r.length]="<a:extraClrSchemeLst/>",r[r.length]="</a:theme>",r.join("")}l(gpe,"write_theme");function Byt(t,e){return{flags:t.read_shift(4),version:t.read_shift(4),name:So(t)}}l(Byt,"parse_BrtMdtinfo");function zyt(t){var e=Gt(12+2*t.name.length);return e.write_shift(4,t.flags),e.write_shift(4,t.version),_s(t.name,e),e.slice(0,e.l)}l(zyt,"write_BrtMdtinfo");function Hyt(t){for(var e=[],r=t.read_shift(4);r-- >0;)e.push([t.read_shift(4),t.read_shift(4)]);return e}l(Hyt,"parse_BrtMdb");function Wyt(t){var e=Gt(4+8*t.length);e.write_shift(4,t.length);for(var r=0;r<t.length;++r)e.write_shift(4,t[r][0]),e.write_shift(4,t[r][1]);return e}l(Wyt,"write_BrtMdb");function Vyt(t,e){var r=Gt(8+2*e.length);return r.write_shift(4,t),_s(e,r),r.slice(0,r.l)}l(Vyt,"write_BrtBeginEsfmd");function Gyt(t){return t.l+=4,t.read_shift(4)!=0}l(Gyt,"parse_BrtBeginEsmdb");function qyt(t,e){var r=Gt(8);return r.write_shift(4,t),r.write_shift(4,1),r}l(qyt,"write_BrtBeginEsmdb");function Yyt(){var t=Fl();return tr(t,332),tr(t,334,Iu(1)),tr(t,335,zyt({name:"XLDAPR",version:12e4,flags:3496657072})),tr(t,336),tr(t,339,Vyt(1,"XLDAPR")),tr(t,52),tr(t,35,Iu(514)),tr(t,4096,Iu(0)),tr(t,4097,Uc(1)),tr(t,36),tr(t,53),tr(t,340),tr(t,337,qyt(1)),tr(t,51,Wyt([[1,0]])),tr(t,338),tr(t,333),t.end()}l(Yyt,"write_xlmeta_bin");function mpe(){var t=[Gi];return t.push(`<metadata xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xlrd="http://schemas.microsoft.com/office/spreadsheetml/2017/richdata" xmlns:xda="http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray">
|
||
<metadataTypes count="1">
|
||
<metadataType name="XLDAPR" minSupportedVersion="120000" copy="1" pasteAll="1" pasteValues="1" merge="1" splitFirst="1" rowColShift="1" clearFormats="1" clearComments="1" assign="1" coerce="1" cellMeta="1"/>
|
||
</metadataTypes>
|
||
<futureMetadata name="XLDAPR" count="1">
|
||
<bk>
|
||
<extLst>
|
||
<ext uri="{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}">
|
||
<xda:dynamicArrayProperties fDynamic="1" fCollapsed="0"/>
|
||
</ext>
|
||
</extLst>
|
||
</bk>
|
||
</futureMetadata>
|
||
<cellMetadata count="1">
|
||
<bk>
|
||
<rc t="1" v="0"/>
|
||
</bk>
|
||
</cellMetadata>
|
||
</metadata>`),t.join("")}l(mpe,"write_xlmeta_xml");function Uyt(t){var e={};e.i=t.read_shift(4);var r={};r.r=t.read_shift(4),r.c=t.read_shift(4),e.r=ca(r);var n=t.read_shift(1);return n&2&&(e.l="1"),n&8&&(e.a="1"),e}l(Uyt,"parse_BrtCalcChainItem$");var iw=1024;function ype(t,e){for(var r=[21600,21600],n=["m0,0l0",r[1],r[0],r[1],r[0],"0xe"].join(","),a=[fr("xml",null,{"xmlns:v":uc.v,"xmlns:o":uc.o,"xmlns:x":uc.x,"xmlns:mv":uc.mv}).replace(/\/>/,">"),fr("o:shapelayout",fr("o:idmap",null,{"v:ext":"edit",data:t}),{"v:ext":"edit"}),fr("v:shapetype",[fr("v:stroke",null,{joinstyle:"miter"}),fr("v:path",null,{gradientshapeok:"t","o:connecttype":"rect"})].join(""),{id:"_x0000_t202","o:spt":202,coordsize:r.join(","),path:n})];iw<t*1e3;)iw+=1e3;return e.forEach(function(i){var s=Ss(i[0]),o={color2:"#BEFF82",type:"gradient"};o.type=="gradient"&&(o.angle="-180");var u=o.type=="gradient"?fr("o:fill",null,{type:"gradientUnscaled","v:ext":"view"}):null,h=fr("v:fill",u,o),d={on:"t",obscured:"t"};++iw,a=a.concat(["<v:shape"+s4({id:"_x0000_s"+iw,type:"#_x0000_t202",style:"position:absolute; margin-left:80pt;margin-top:5pt;width:104pt;height:64pt;z-index:10"+(i[1].hidden?";visibility:hidden":""),fillcolor:"#ECFAD4",strokecolor:"#edeaa1"})+">",h,fr("v:shadow",null,d),fr("v:path",null,{"o:connecttype":"none"}),'<v:textbox><div style="text-align:left"></div></v:textbox>','<x:ClientData ObjectType="Note">',"<x:MoveWithCells/>","<x:SizeWithCells/>",Zs("x:Anchor",[s.c+1,0,s.r+1,0,s.c+3,20,s.r+5,20].join(",")),Zs("x:AutoFill","False"),Zs("x:Row",String(s.r)),Zs("x:Column",String(s.c)),i[1].hidden?"":"<x:Visible/>","</x:ClientData>","</v:shape>"])}),a.push("</xml>"),a.join("")}l(ype,"write_comments_vml");function vpe(t){var e=[Gi,fr("comments",null,{xmlns:Qx[0]})],r=[];return e.push("<authors>"),t.forEach(function(n){n[1].forEach(function(a){var i=la(a.a);r.indexOf(i)==-1&&(r.push(i),e.push("<author>"+i+"</author>")),a.T&&a.ID&&r.indexOf("tc="+a.ID)==-1&&(r.push("tc="+a.ID),e.push("<author>tc="+a.ID+"</author>"))})}),r.length==0&&(r.push("SheetJ5"),e.push("<author>SheetJ5</author>")),e.push("</authors>"),e.push("<commentList>"),t.forEach(function(n){var a=0,i=[];if(n[1][0]&&n[1][0].T&&n[1][0].ID?a=r.indexOf("tc="+n[1][0].ID):n[1].forEach(function(u){u.a&&(a=r.indexOf(la(u.a))),i.push(u.t||"")}),e.push('<comment ref="'+n[0]+'" authorId="'+a+'"><text>'),i.length<=1)e.push(Zs("t",la(i[0]||"")));else{for(var s=`Comment:
|
||
`+i[0]+`
|
||
`,o=1;o<i.length;++o)s+=`Reply:
|
||
`+i[o]+`
|
||
`;e.push(Zs("t",la(s)))}e.push("</text></comment>")}),e.push("</commentList>"),e.length>2&&(e[e.length]="</comments>",e[1]=e[1].replace("/>",">")),e.join("")}l(vpe,"write_comments_xml");function jyt(t,e,r){var n=[Gi,fr("ThreadedComments",null,{xmlns:Cs.TCMNT}).replace(/[\/]>/,">")];return t.forEach(function(a){var i="";(a[1]||[]).forEach(function(s,o){if(!s.T){delete s.ID;return}s.a&&e.indexOf(s.a)==-1&&e.push(s.a);var u={ref:a[0],id:"{54EE7951-7262-4200-6969-"+("000000000000"+r.tcid++).slice(-12)+"}"};o==0?i=u.id:u.parentId=i,s.ID=u.id,s.a&&(u.personId="{54EE7950-7262-4200-6969-"+("000000000000"+e.indexOf(s.a)).slice(-12)+"}"),n.push(fr("threadedComment",Zs("text",s.t||""),u))})}),n.push("</ThreadedComments>"),n.join("")}l(jyt,"write_tcmnt_xml");function Kyt(t){var e=[Gi,fr("personList",null,{xmlns:Cs.TCMNT,"xmlns:x":Qx[0]}).replace(/[\/]>/,">")];return t.forEach(function(r,n){e.push(fr("person",null,{displayName:r,id:"{54EE7950-7262-4200-6969-"+("000000000000"+n).slice(-12)+"}",userId:r,providerId:"None"}))}),e.push("</personList>"),e.join("")}l(Kyt,"write_people_xml");function Xyt(t){var e={};e.iauthor=t.read_shift(4);var r=Xg(t);return e.rfx=r.s,e.ref=ca(r.s),t.l+=16,e}l(Xyt,"parse_BrtBeginComment");function Zyt(t,e){return e==null&&(e=Gt(36)),e.write_shift(4,t[1].iauthor),tw(t[0],e),e.write_shift(4,0),e.write_shift(4,0),e.write_shift(4,0),e.write_shift(4,0),e}l(Zyt,"write_BrtBeginComment");var Qyt=So;function Jyt(t){return _s(t.slice(0,54))}l(Jyt,"write_BrtCommentAuthor");function evt(t){var e=Fl(),r=[];return tr(e,628),tr(e,630),t.forEach(function(n){n[1].forEach(function(a){r.indexOf(a.a)>-1||(r.push(a.a.slice(0,54)),tr(e,632,Jyt(a.a)))})}),tr(e,631),tr(e,633),t.forEach(function(n){n[1].forEach(function(a){a.iauthor=r.indexOf(a.a);var i={s:Ss(n[0]),e:Ss(n[0])};tr(e,635,Zyt([i,a])),a.t&&a.t.length>0&&tr(e,637,r1t(a)),tr(e,636),delete a.iauthor})}),tr(e,634),tr(e,629),e.end()}l(evt,"write_comments_bin");function tvt(t,e){e.FullPaths.forEach(function(r,n){if(n!=0){var a=r.replace(/[^\/]*[\/]/,"/_VBA_PROJECT_CUR/");a.slice(-1)!=="/"&&ma.utils.cfb_add(t,a,e.FileIndex[n].content)}})}l(tvt,"fill_vba_xls");var bpe=["xlsb","xlsm","xlam","biff8","xla"],rvt=function(){var t=/(^|[^A-Za-z_])R(\[?-?\d+\]|[1-9]\d*|)C(\[?-?\d+\]|[1-9]\d*|)(?![A-Za-z0-9_])/g,e={r:0,c:0};function r(n,a,i,s){var o=!1,u=!1;i.length==0?u=!0:i.charAt(0)=="["&&(u=!0,i=i.slice(1,-1)),s.length==0?o=!0:s.charAt(0)=="["&&(o=!0,s=s.slice(1,-1));var h=i.length>0?parseInt(i,10)|0:0,d=s.length>0?parseInt(s,10)|0:0;return o?d+=e.c:--d,u?h+=e.r:--h,a+(o?"":"$")+Co(d)+(u?"":"$")+Qs(h)}return l(r,"rcfunc"),l(function(a,i){return e=i,a.replace(t,r)},"rc_to_a1")}(),YB=/(^|[^._A-Z0-9])([$]?)([A-Z]{1,2}|[A-W][A-Z]{2}|X[A-E][A-Z]|XF[A-D])([$]?)(10[0-3]\d{4}|104[0-7]\d{3}|1048[0-4]\d{2}|10485[0-6]\d|104857[0-6]|[1-9]\d{0,5})(?![_.\(A-Za-z0-9])/g,UB=function(){return l(function(e,r){return e.replace(YB,function(n,a,i,s,o,u){var h=OB(s)-(i?0:r.c),d=RB(u)-(o?0:r.r),f=d==0?"":o?d+1:"["+d+"]",p=h==0?"":i?h+1:"["+h+"]";return a+"R"+f+"C"+p})},"a1_to_rc")}();function nvt(t,e){return t.replace(YB,function(r,n,a,i,s,o){return n+(a=="$"?a+i:Co(OB(i)+e.c))+(s=="$"?s+o:Qs(RB(o)+e.r))})}l(nvt,"shift_formula_str");function avt(t){return t.length!=1}l(avt,"fuzzyfmla");function Yi(t){t.l+=1}l(Yi,"parseread1");function F0(t,e){var r=t.read_shift(2);return[r&16383,r>>14&1,r>>15&1]}l(F0,"parse_ColRelU");function xpe(t,e,r){var n=2;if(r){if(r.biff>=2&&r.biff<=5)return wpe(t);r.biff==12&&(n=4)}var a=t.read_shift(n),i=t.read_shift(n),s=F0(t),o=F0(t);return{s:{r:a,c:s[0],cRel:s[1],rRel:s[2]},e:{r:i,c:o[0],cRel:o[1],rRel:o[2]}}}l(xpe,"parse_RgceArea");function wpe(t){var e=F0(t),r=F0(t),n=t.read_shift(1),a=t.read_shift(1);return{s:{r:e[0],c:n,cRel:e[1],rRel:e[2]},e:{r:r[0],c:a,cRel:r[1],rRel:r[2]}}}l(wpe,"parse_RgceArea_BIFF2");function ivt(t,e,r){if(r.biff<8)return wpe(t);var n=t.read_shift(r.biff==12?4:2),a=t.read_shift(r.biff==12?4:2),i=F0(t),s=F0(t);return{s:{r:n,c:i[0],cRel:i[1],rRel:i[2]},e:{r:a,c:s[0],cRel:s[1],rRel:s[2]}}}l(ivt,"parse_RgceAreaRel");function Tpe(t,e,r){if(r&&r.biff>=2&&r.biff<=5)return svt(t);var n=t.read_shift(r&&r.biff==12?4:2),a=F0(t);return{r:n,c:a[0],cRel:a[1],rRel:a[2]}}l(Tpe,"parse_RgceLoc");function svt(t){var e=F0(t),r=t.read_shift(1);return{r:e[0],c:r,cRel:e[1],rRel:e[2]}}l(svt,"parse_RgceLoc_BIFF2");function ovt(t){var e=t.read_shift(2),r=t.read_shift(2);return{r:e,c:r&255,fQuoted:!!(r&16384),cRel:r>>15,rRel:r>>15}}l(ovt,"parse_RgceElfLoc");function lvt(t,e,r){var n=r&&r.biff?r.biff:8;if(n>=2&&n<=5)return cvt(t);var a=t.read_shift(n>=12?4:2),i=t.read_shift(2),s=(i&16384)>>14,o=(i&32768)>>15;if(i&=16383,o==1)for(;a>524287;)a-=1048576;if(s==1)for(;i>8191;)i=i-16384;return{r:a,c:i,cRel:s,rRel:o}}l(lvt,"parse_RgceLocRel");function cvt(t){var e=t.read_shift(2),r=t.read_shift(1),n=(e&32768)>>15,a=(e&16384)>>14;return e&=16383,n==1&&e>=8192&&(e=e-16384),a==1&&r>=128&&(r=r-256),{r:e,c:r,cRel:a,rRel:n}}l(cvt,"parse_RgceLocRel_BIFF2");function uvt(t,e,r){var n=(t[t.l++]&96)>>5,a=xpe(t,r.biff>=2&&r.biff<=5?6:8,r);return[n,a]}l(uvt,"parse_PtgArea");function hvt(t,e,r){var n=(t[t.l++]&96)>>5,a=t.read_shift(2,"i"),i=8;if(r)switch(r.biff){case 5:t.l+=12,i=6;break;case 12:i=12;break}var s=xpe(t,i,r);return[n,a,s]}l(hvt,"parse_PtgArea3d");function dvt(t,e,r){var n=(t[t.l++]&96)>>5;return t.l+=r&&r.biff>8?12:r.biff<8?6:8,[n]}l(dvt,"parse_PtgAreaErr");function fvt(t,e,r){var n=(t[t.l++]&96)>>5,a=t.read_shift(2),i=8;if(r)switch(r.biff){case 5:t.l+=12,i=6;break;case 12:i=12;break}return t.l+=i,[n,a]}l(fvt,"parse_PtgAreaErr3d");function pvt(t,e,r){var n=(t[t.l++]&96)>>5,a=ivt(t,e-1,r);return[n,a]}l(pvt,"parse_PtgAreaN");function gvt(t,e,r){var n=(t[t.l++]&96)>>5;return t.l+=r.biff==2?6:r.biff==12?14:7,[n]}l(gvt,"parse_PtgArray");function Epe(t){var e=t[t.l+1]&1,r=1;return t.l+=4,[e,r]}l(Epe,"parse_PtgAttrBaxcel");function mvt(t,e,r){t.l+=2;for(var n=t.read_shift(r&&r.biff==2?1:2),a=[],i=0;i<=n;++i)a.push(t.read_shift(r&&r.biff==2?1:2));return a}l(mvt,"parse_PtgAttrChoose");function yvt(t,e,r){var n=t[t.l+1]&255?1:0;return t.l+=2,[n,t.read_shift(r&&r.biff==2?1:2)]}l(yvt,"parse_PtgAttrGoto");function vvt(t,e,r){var n=t[t.l+1]&255?1:0;return t.l+=2,[n,t.read_shift(r&&r.biff==2?1:2)]}l(vvt,"parse_PtgAttrIf");function bvt(t){var e=t[t.l+1]&255?1:0;return t.l+=2,[e,t.read_shift(2)]}l(bvt,"parse_PtgAttrIfError");function xvt(t,e,r){var n=t[t.l+1]&255?1:0;return t.l+=r&&r.biff==2?3:4,[n]}l(xvt,"parse_PtgAttrSemi");function Cpe(t){var e=t.read_shift(1),r=t.read_shift(1);return[e,r]}l(Cpe,"parse_PtgAttrSpaceType");function wvt(t){return t.read_shift(2),Cpe(t)}l(wvt,"parse_PtgAttrSpace");function Tvt(t){return t.read_shift(2),Cpe(t)}l(Tvt,"parse_PtgAttrSpaceSemi");function Evt(t,e,r){var n=(t[t.l]&96)>>5;t.l+=1;var a=Tpe(t,0,r);return[n,a]}l(Evt,"parse_PtgRef");function Cvt(t,e,r){var n=(t[t.l]&96)>>5;t.l+=1;var a=lvt(t,0,r);return[n,a]}l(Cvt,"parse_PtgRefN");function Svt(t,e,r){var n=(t[t.l]&96)>>5;t.l+=1;var a=t.read_shift(2);r&&r.biff==5&&(t.l+=12);var i=Tpe(t,0,r);return[n,a,i]}l(Svt,"parse_PtgRef3d");function _vt(t,e,r){var n=(t[t.l]&96)>>5;t.l+=1;var a=t.read_shift(r&&r.biff<=3?1:2);return[_2t[a],Npe[a],n]}l(_vt,"parse_PtgFunc");function kvt(t,e,r){var n=t[t.l++],a=t.read_shift(1),i=r&&r.biff<=3?[n==88?-1:0,t.read_shift(1)]:Avt(t);return[a,(i[0]===0?Npe:S2t)[i[1]]]}l(kvt,"parse_PtgFuncVar");function Avt(t){return[t[t.l+1]>>7,t.read_shift(2)&32767]}l(Avt,"parsetab");function Nvt(t,e,r){t.l+=r&&r.biff==2?3:4}l(Nvt,"parse_PtgAttrSum");function Ivt(t,e,r){if(t.l++,r&&r.biff==12)return[t.read_shift(4,"i"),0];var n=t.read_shift(2),a=t.read_shift(r&&r.biff==2?1:2);return[n,a]}l(Ivt,"parse_PtgExp");function Lvt(t){return t.l++,d4[t.read_shift(1)]}l(Lvt,"parse_PtgErr");function $vt(t){return t.l++,t.read_shift(2)}l($vt,"parse_PtgInt");function Mvt(t){return t.l++,t.read_shift(1)!==0}l(Mvt,"parse_PtgBool");function Pvt(t){return t.l++,rw(t)}l(Pvt,"parse_PtgNum");function Rvt(t,e,r){return t.l++,epe(t,e-1,r)}l(Rvt,"parse_PtgStr");function Ovt(t,e){var r=[t.read_shift(1)];if(e==12)switch(r[0]){case 2:r[0]=4;break;case 4:r[0]=16;break;case 0:r[0]=1;break;case 1:r[0]=2;break}switch(r[0]){case 4:r[1]=S1t(t,1)?"TRUE":"FALSE",e!=12&&(t.l+=7);break;case 37:case 16:r[1]=d4[t[t.l]],t.l+=e==12?4:8;break;case 0:t.l+=8;break;case 1:r[1]=rw(t);break;case 2:r[1]=N1t(t,0,{biff:e>0&&e<8?2:e});break;default:throw new Error("Bad SerAr: "+r[0])}return r}l(Ovt,"parse_SerAr");function Dvt(t,e,r){for(var n=t.read_shift(r.biff==12?4:2),a=[],i=0;i!=n;++i)a.push((r.biff==12?Xg:$1t)(t));return a}l(Dvt,"parse_PtgExtraMem");function Fvt(t,e,r){var n=0,a=0;r.biff==12?(n=t.read_shift(4),a=t.read_shift(4)):(a=1+t.read_shift(1),n=1+t.read_shift(2)),r.biff>=2&&r.biff<8&&(--n,--a==0&&(a=256));for(var i=0,s=[];i!=n&&(s[i]=[]);++i)for(var o=0;o!=a;++o)s[i][o]=Ovt(t,r.biff);return s}l(Fvt,"parse_PtgExtraArray");function Bvt(t,e,r){var n=t.read_shift(1)>>>5&3,a=!r||r.biff>=8?4:2,i=t.read_shift(a);switch(r.biff){case 2:t.l+=5;break;case 3:case 4:t.l+=8;break;case 5:t.l+=12;break}return[n,0,i]}l(Bvt,"parse_PtgName");function zvt(t,e,r){if(r.biff==5)return Hvt(t);var n=t.read_shift(1)>>>5&3,a=t.read_shift(2),i=t.read_shift(4);return[n,a,i]}l(zvt,"parse_PtgNameX");function Hvt(t){var e=t.read_shift(1)>>>5&3,r=t.read_shift(2,"i");t.l+=8;var n=t.read_shift(2);return t.l+=12,[e,r,n]}l(Hvt,"parse_PtgNameX_BIFF5");function Wvt(t,e,r){var n=t.read_shift(1)>>>5&3;t.l+=r&&r.biff==2?3:4;var a=t.read_shift(r&&r.biff==2?1:2);return[n,a]}l(Wvt,"parse_PtgMemArea");function Vvt(t,e,r){var n=t.read_shift(1)>>>5&3,a=t.read_shift(r&&r.biff==2?1:2);return[n,a]}l(Vvt,"parse_PtgMemFunc");function Gvt(t,e,r){var n=t.read_shift(1)>>>5&3;return t.l+=4,r.biff<8&&t.l--,r.biff==12&&(t.l+=2),[n]}l(Gvt,"parse_PtgRefErr");function qvt(t,e,r){var n=(t[t.l++]&96)>>5,a=t.read_shift(2),i=4;if(r)switch(r.biff){case 5:i=15;break;case 12:i=6;break}return t.l+=i,[n,a]}l(qvt,"parse_PtgRefErr3d");var Yvt=_h,Uvt=_h,jvt=_h;function p4(t,e,r){return t.l+=2,[ovt(t)]}l(p4,"parse_PtgElfLoc");function jB(t){return t.l+=6,[]}l(jB,"parse_PtgElfNoop");var Kvt=p4,Xvt=jB,Zvt=jB,Qvt=p4;function Spe(t){return t.l+=2,[Q0e(t),t.read_shift(2)&1]}l(Spe,"parse_PtgElfLel");var Jvt=p4,e2t=Spe,t2t=jB,r2t=p4,n2t=p4,a2t=["Data","All","Headers","??","?Data2","??","?DataHeaders","??","Totals","??","??","??","?DataTotals","??","??","??","?Current"];function i2t(t){t.l+=2;var e=t.read_shift(2),r=t.read_shift(2),n=t.read_shift(4),a=t.read_shift(2),i=t.read_shift(2),s=a2t[r>>2&31];return{ixti:e,coltype:r&3,rt:s,idx:n,c:a,C:i}}l(i2t,"parse_PtgList");function s2t(t){return t.l+=2,[t.read_shift(4)]}l(s2t,"parse_PtgSxName");function o2t(t,e,r){return t.l+=5,t.l+=2,t.l+=r.biff==2?1:4,["PTGSHEET"]}l(o2t,"parse_PtgSheet");function l2t(t,e,r){return t.l+=r.biff==2?4:5,["PTGENDSHEET"]}l(l2t,"parse_PtgEndSheet");function c2t(t){var e=t.read_shift(1)>>>5&3,r=t.read_shift(2);return[e,r]}l(c2t,"parse_PtgMemAreaN");function u2t(t){var e=t.read_shift(1)>>>5&3,r=t.read_shift(2);return[e,r]}l(u2t,"parse_PtgMemNoMemN");function h2t(t){return t.l+=4,[0,0]}l(h2t,"parse_PtgAttrNoop");var _pe={1:{n:"PtgExp",f:Ivt},2:{n:"PtgTbl",f:jvt},3:{n:"PtgAdd",f:Yi},4:{n:"PtgSub",f:Yi},5:{n:"PtgMul",f:Yi},6:{n:"PtgDiv",f:Yi},7:{n:"PtgPower",f:Yi},8:{n:"PtgConcat",f:Yi},9:{n:"PtgLt",f:Yi},10:{n:"PtgLe",f:Yi},11:{n:"PtgEq",f:Yi},12:{n:"PtgGe",f:Yi},13:{n:"PtgGt",f:Yi},14:{n:"PtgNe",f:Yi},15:{n:"PtgIsect",f:Yi},16:{n:"PtgUnion",f:Yi},17:{n:"PtgRange",f:Yi},18:{n:"PtgUplus",f:Yi},19:{n:"PtgUminus",f:Yi},20:{n:"PtgPercent",f:Yi},21:{n:"PtgParen",f:Yi},22:{n:"PtgMissArg",f:Yi},23:{n:"PtgStr",f:Rvt},26:{n:"PtgSheet",f:o2t},27:{n:"PtgEndSheet",f:l2t},28:{n:"PtgErr",f:Lvt},29:{n:"PtgBool",f:Mvt},30:{n:"PtgInt",f:$vt},31:{n:"PtgNum",f:Pvt},32:{n:"PtgArray",f:gvt},33:{n:"PtgFunc",f:_vt},34:{n:"PtgFuncVar",f:kvt},35:{n:"PtgName",f:Bvt},36:{n:"PtgRef",f:Evt},37:{n:"PtgArea",f:uvt},38:{n:"PtgMemArea",f:Wvt},39:{n:"PtgMemErr",f:Yvt},40:{n:"PtgMemNoMem",f:Uvt},41:{n:"PtgMemFunc",f:Vvt},42:{n:"PtgRefErr",f:Gvt},43:{n:"PtgAreaErr",f:dvt},44:{n:"PtgRefN",f:Cvt},45:{n:"PtgAreaN",f:pvt},46:{n:"PtgMemAreaN",f:c2t},47:{n:"PtgMemNoMemN",f:u2t},57:{n:"PtgNameX",f:zvt},58:{n:"PtgRef3d",f:Svt},59:{n:"PtgArea3d",f:hvt},60:{n:"PtgRefErr3d",f:qvt},61:{n:"PtgAreaErr3d",f:fvt},255:{}},d2t={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,78:46,110:46,79:47,111:47,88:34,120:34,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61},f2t={1:{n:"PtgElfLel",f:Spe},2:{n:"PtgElfRw",f:r2t},3:{n:"PtgElfCol",f:Kvt},6:{n:"PtgElfRwV",f:n2t},7:{n:"PtgElfColV",f:Qvt},10:{n:"PtgElfRadical",f:Jvt},11:{n:"PtgElfRadicalS",f:t2t},13:{n:"PtgElfColS",f:Xvt},15:{n:"PtgElfColSV",f:Zvt},16:{n:"PtgElfRadicalLel",f:e2t},25:{n:"PtgList",f:i2t},29:{n:"PtgSxName",f:s2t},255:{}},p2t={0:{n:"PtgAttrNoop",f:h2t},1:{n:"PtgAttrSemi",f:xvt},2:{n:"PtgAttrIf",f:vvt},4:{n:"PtgAttrChoose",f:mvt},8:{n:"PtgAttrGoto",f:yvt},16:{n:"PtgAttrSum",f:Nvt},32:{n:"PtgAttrBaxcel",f:Epe},33:{n:"PtgAttrBaxcel",f:Epe},64:{n:"PtgAttrSpace",f:wvt},65:{n:"PtgAttrSpaceSemi",f:Tvt},128:{n:"PtgAttrIfError",f:bvt},255:{}};function g2t(t,e,r,n){if(n.biff<8)return _h(t,e);for(var a=t.l+e,i=[],s=0;s!==r.length;++s)switch(r[s][0]){case"PtgArray":r[s][1]=Fvt(t,0,n),i.push(r[s][1]);break;case"PtgMemArea":r[s][2]=Dvt(t,r[s][1],n),i.push(r[s][2]);break;case"PtgExp":n&&n.biff==12&&(r[s][1][1]=t.read_shift(4),i.push(r[s][1]));break;case"PtgList":case"PtgElfRadicalS":case"PtgElfColS":case"PtgElfColSV":throw"Unsupported "+r[s][0]}return e=a-t.l,e!==0&&i.push(_h(t,e)),i}l(g2t,"parse_RgbExtra");function m2t(t,e,r){for(var n=t.l+e,a,i,s=[];n!=t.l;)e=n-t.l,i=t[t.l],a=_pe[i]||_pe[d2t[i]],(i===24||i===25)&&(a=(i===24?f2t:p2t)[t[t.l+1]]),!a||!a.f?_h(t,e):s.push([a.n,a.f(t,e,r)]);return s}l(m2t,"parse_Rgce");function y2t(t){for(var e=[],r=0;r<t.length;++r){for(var n=t[r],a=[],i=0;i<n.length;++i){var s=n[i];if(s)switch(s[0]){case 2:a.push('"'+s[1].replace(/"/g,'""')+'"');break;default:a.push(s[1])}else a.push("")}e.push(a.join(","))}return e.join(";")}l(y2t,"stringify_array");var v2t={PtgAdd:"+",PtgConcat:"&",PtgDiv:"/",PtgEq:"=",PtgGe:">=",PtgGt:">",PtgLe:"<=",PtgLt:"<",PtgMul:"*",PtgNe:"<>",PtgPower:"^",PtgSub:"-"};function b2t(t,e){if(!t&&!(e&&e.biff<=5&&e.biff>=2))throw new Error("empty sheet name");return/[^\w\u4E00-\u9FFF\u3040-\u30FF]/.test(t)?"'"+t+"'":t}l(b2t,"formula_quote_sheet_name");function kpe(t,e,r){if(!t)return"SH33TJSERR0";if(r.biff>8&&(!t.XTI||!t.XTI[e]))return t.SheetNames[e];if(!t.XTI)return"SH33TJSERR6";var n=t.XTI[e];if(r.biff<8)return e>1e4&&(e-=65536),e<0&&(e=-e),e==0?"":t.XTI[e-1];if(!n)return"SH33TJSERR1";var a="";if(r.biff>8)switch(t[n[0]][0]){case 357:return a=n[1]==-1?"#REF":t.SheetNames[n[1]],n[1]==n[2]?a:a+":"+t.SheetNames[n[2]];case 358:return r.SID!=null?t.SheetNames[r.SID]:"SH33TJSSAME"+t[n[0]][0];case 355:default:return"SH33TJSSRC"+t[n[0]][0]}switch(t[n[0]][0][0]){case 1025:return a=n[1]==-1?"#REF":t.SheetNames[n[1]]||"SH33TJSERR3",n[1]==n[2]?a:a+":"+t.SheetNames[n[2]];case 14849:return t[n[0]].slice(1).map(function(i){return i.Name}).join(";;");default:return t[n[0]][0][3]?(a=n[1]==-1?"#REF":t[n[0]][0][3][n[1]]||"SH33TJSERR4",n[1]==n[2]?a:a+":"+t[n[0]][0][3][n[2]]):"SH33TJSERR2"}}l(kpe,"get_ixti_raw");function Ape(t,e,r){var n=kpe(t,e,r);return n=="#REF"?n:b2t(n,r)}l(Ape,"get_ixti");function sw(t,e,r,n,a){var i=a&&a.biff||8,s={s:{c:0,r:0}},o=[],u,h,d,f=0,p=0,g,m="";if(!t[0]||!t[0][0])return"";for(var y=-1,v="",b=0,w=t[0].length;b<w;++b){var x=t[0][b];switch(x[0]){case"PtgUminus":o.push("-"+o.pop());break;case"PtgUplus":o.push("+"+o.pop());break;case"PtgPercent":o.push(o.pop()+"%");break;case"PtgAdd":case"PtgConcat":case"PtgDiv":case"PtgEq":case"PtgGe":case"PtgGt":case"PtgLe":case"PtgLt":case"PtgMul":case"PtgNe":case"PtgPower":case"PtgSub":if(u=o.pop(),h=o.pop(),y>=0){switch(t[0][y][1][0]){case 0:v=mi(" ",t[0][y][1][1]);break;case 1:v=mi("\r",t[0][y][1][1]);break;default:if(v="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+t[0][y][1][0])}h=h+v,y=-1}o.push(h+v2t[x[0]]+u);break;case"PtgIsect":u=o.pop(),h=o.pop(),o.push(h+" "+u);break;case"PtgUnion":u=o.pop(),h=o.pop(),o.push(h+","+u);break;case"PtgRange":u=o.pop(),h=o.pop(),o.push(h+":"+u);break;case"PtgAttrChoose":break;case"PtgAttrGoto":break;case"PtgAttrIf":break;case"PtgAttrIfError":break;case"PtgRef":d=u4(x[1][1],s,a),o.push(h4(d,i));break;case"PtgRefN":d=r?u4(x[1][1],r,a):x[1][1],o.push(h4(d,i));break;case"PtgRef3d":f=x[1][1],d=u4(x[1][2],s,a),m=Ape(n,f,a),o.push(m+"!"+h4(d,i));break;case"PtgFunc":case"PtgFuncVar":var T=x[1][0],C=x[1][1];T||(T=0),T&=127;var S=T==0?[]:o.slice(-T);o.length-=T,C==="User"&&(C=S.shift()),o.push(C+"("+S.join(",")+")");break;case"PtgBool":o.push(x[1]?"TRUE":"FALSE");break;case"PtgInt":o.push(x[1]);break;case"PtgNum":o.push(String(x[1]));break;case"PtgStr":o.push('"'+x[1].replace(/"/g,'""')+'"');break;case"PtgErr":o.push(x[1]);break;case"PtgAreaN":g=A0e(x[1][1],r?{s:r}:s,a),o.push(PB(g,a));break;case"PtgArea":g=A0e(x[1][1],s,a),o.push(PB(g,a));break;case"PtgArea3d":f=x[1][1],g=x[1][2],m=Ape(n,f,a),o.push(m+"!"+PB(g,a));break;case"PtgAttrSum":o.push("SUM("+o.pop()+")");break;case"PtgAttrBaxcel":case"PtgAttrSemi":break;case"PtgName":p=x[1][2];var E=(n.names||[])[p-1]||(n[0]||[])[p],k=E?E.Name:"SH33TJSNAME"+String(p);k&&k.slice(0,6)=="_xlfn."&&!a.xlfn&&(k=k.slice(6)),o.push(k);break;case"PtgNameX":var A=x[1][1];p=x[1][2];var I;if(a.biff<=5)A<0&&(A=-A),n[A]&&(I=n[A][p]);else{var L="";if(((n[A]||[])[0]||[])[0]==14849||(((n[A]||[])[0]||[])[0]==1025?n[A][p]&&n[A][p].itab>0&&(L=n.SheetNames[n[A][p].itab-1]+"!"):L=n.SheetNames[p-1]+"!"),n[A]&&n[A][p])L+=n[A][p].Name;else if(n[0]&&n[0][p])L+=n[0][p].Name;else{var R=(kpe(n,A,a)||"").split(";;");R[p-1]?L=R[p-1]:L+="SH33TJSERRX"}o.push(L);break}I||(I={Name:"SH33TJSERRY"}),o.push(I.Name);break;case"PtgParen":var O="(",M=")";if(y>=0){switch(v="",t[0][y][1][0]){case 2:O=mi(" ",t[0][y][1][1])+O;break;case 3:O=mi("\r",t[0][y][1][1])+O;break;case 4:M=mi(" ",t[0][y][1][1])+M;break;case 5:M=mi("\r",t[0][y][1][1])+M;break;default:if(a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+t[0][y][1][0])}y=-1}o.push(O+o.pop()+M);break;case"PtgRefErr":o.push("#REF!");break;case"PtgRefErr3d":o.push("#REF!");break;case"PtgExp":d={c:x[1][1],r:x[1][0]};var P={c:r.c,r:r.r};if(n.sharedf[ca(d)]){var z=n.sharedf[ca(d)];o.push(sw(z,s,P,n,a))}else{var D=!1;for(u=0;u!=n.arrayf.length;++u)if(h=n.arrayf[u],!(d.c<h[0].s.c||d.c>h[0].e.c)&&!(d.r<h[0].s.r||d.r>h[0].e.r)){o.push(sw(h[1],s,P,n,a)),D=!0;break}D||o.push(x[1])}break;case"PtgArray":o.push("{"+y2t(x[1])+"}");break;case"PtgMemArea":break;case"PtgAttrSpace":case"PtgAttrSpaceSemi":y=b;break;case"PtgTbl":break;case"PtgMemErr":break;case"PtgMissArg":o.push("");break;case"PtgAreaErr":o.push("#REF!");break;case"PtgAreaErr3d":o.push("#REF!");break;case"PtgList":o.push("Table"+x[1].idx+"[#"+x[1].rt+"]");break;case"PtgMemAreaN":case"PtgMemNoMemN":case"PtgAttrNoop":case"PtgSheet":case"PtgEndSheet":break;case"PtgMemFunc":break;case"PtgMemNoMem":break;case"PtgElfCol":case"PtgElfColS":case"PtgElfColSV":case"PtgElfColV":case"PtgElfLel":case"PtgElfRadical":case"PtgElfRadicalLel":case"PtgElfRadicalS":case"PtgElfRw":case"PtgElfRwV":throw new Error("Unsupported ELFs");case"PtgSxName":throw new Error("Unrecognized Formula Token: "+String(x));default:throw new Error("Unrecognized Formula Token: "+String(x))}var B=["PtgAttrSpace","PtgAttrSpaceSemi","PtgAttrGoto"];if(a.biff!=3&&y>=0&&B.indexOf(t[0][b][0])==-1){x=t[0][y];var W=!0;switch(x[1][0]){case 4:W=!1;case 0:v=mi(" ",x[1][1]);break;case 5:W=!1;case 1:v=mi("\r",x[1][1]);break;default:if(v="",a.WTF)throw new Error("Unexpected PtgAttrSpaceType "+x[1][0])}o.push((W?v:"")+o.pop()+(W?"":v)),y=-1}}if(o.length>1&&a.WTF)throw new Error("bad formula stack");return o[0]}l(sw,"stringify_formula");function x2t(t){if(t==null){var e=Gt(8);return e.write_shift(1,3),e.write_shift(1,0),e.write_shift(2,0),e.write_shift(2,0),e.write_shift(2,65535),e}else if(typeof t=="number")return Zg(t);return Zg(0)}l(x2t,"write_FormulaValue");function w2t(t,e,r,n,a){var i=Jg(e,r,a),s=x2t(t.v),o=Gt(6),u=33;o.write_shift(2,u),o.write_shift(4,0);for(var h=Gt(t.bf.length),d=0;d<t.bf.length;++d)h[d]=t.bf[d];var f=Ks([i,s,o,h]);return f}l(w2t,"write_Formula");function e8(t,e,r){var n=t.read_shift(4),a=m2t(t,n,r),i=t.read_shift(4),s=i>0?g2t(t,i,a,r):null;return[a,s]}l(e8,"parse_XLSBParsedFormula");var T2t=e8,t8=e8,E2t=e8,C2t=e8,S2t={0:"BEEP",1:"OPEN",2:"OPEN.LINKS",3:"CLOSE.ALL",4:"SAVE",5:"SAVE.AS",6:"FILE.DELETE",7:"PAGE.SETUP",8:"PRINT",9:"PRINTER.SETUP",10:"QUIT",11:"NEW.WINDOW",12:"ARRANGE.ALL",13:"WINDOW.SIZE",14:"WINDOW.MOVE",15:"FULL",16:"CLOSE",17:"RUN",22:"SET.PRINT.AREA",23:"SET.PRINT.TITLES",24:"SET.PAGE.BREAK",25:"REMOVE.PAGE.BREAK",26:"FONT",27:"DISPLAY",28:"PROTECT.DOCUMENT",29:"PRECISION",30:"A1.R1C1",31:"CALCULATE.NOW",32:"CALCULATION",34:"DATA.FIND",35:"EXTRACT",36:"DATA.DELETE",37:"SET.DATABASE",38:"SET.CRITERIA",39:"SORT",40:"DATA.SERIES",41:"TABLE",42:"FORMAT.NUMBER",43:"ALIGNMENT",44:"STYLE",45:"BORDER",46:"CELL.PROTECTION",47:"COLUMN.WIDTH",48:"UNDO",49:"CUT",50:"COPY",51:"PASTE",52:"CLEAR",53:"PASTE.SPECIAL",54:"EDIT.DELETE",55:"INSERT",56:"FILL.RIGHT",57:"FILL.DOWN",61:"DEFINE.NAME",62:"CREATE.NAMES",63:"FORMULA.GOTO",64:"FORMULA.FIND",65:"SELECT.LAST.CELL",66:"SHOW.ACTIVE.CELL",67:"GALLERY.AREA",68:"GALLERY.BAR",69:"GALLERY.COLUMN",70:"GALLERY.LINE",71:"GALLERY.PIE",72:"GALLERY.SCATTER",73:"COMBINATION",74:"PREFERRED",75:"ADD.OVERLAY",76:"GRIDLINES",77:"SET.PREFERRED",78:"AXES",79:"LEGEND",80:"ATTACH.TEXT",81:"ADD.ARROW",82:"SELECT.CHART",83:"SELECT.PLOT.AREA",84:"PATTERNS",85:"MAIN.CHART",86:"OVERLAY",87:"SCALE",88:"FORMAT.LEGEND",89:"FORMAT.TEXT",90:"EDIT.REPEAT",91:"PARSE",92:"JUSTIFY",93:"HIDE",94:"UNHIDE",95:"WORKSPACE",96:"FORMULA",97:"FORMULA.FILL",98:"FORMULA.ARRAY",99:"DATA.FIND.NEXT",100:"DATA.FIND.PREV",101:"FORMULA.FIND.NEXT",102:"FORMULA.FIND.PREV",103:"ACTIVATE",104:"ACTIVATE.NEXT",105:"ACTIVATE.PREV",106:"UNLOCKED.NEXT",107:"UNLOCKED.PREV",108:"COPY.PICTURE",109:"SELECT",110:"DELETE.NAME",111:"DELETE.FORMAT",112:"VLINE",113:"HLINE",114:"VPAGE",115:"HPAGE",116:"VSCROLL",117:"HSCROLL",118:"ALERT",119:"NEW",120:"CANCEL.COPY",121:"SHOW.CLIPBOARD",122:"MESSAGE",124:"PASTE.LINK",125:"APP.ACTIVATE",126:"DELETE.ARROW",127:"ROW.HEIGHT",128:"FORMAT.MOVE",129:"FORMAT.SIZE",130:"FORMULA.REPLACE",131:"SEND.KEYS",132:"SELECT.SPECIAL",133:"APPLY.NAMES",134:"REPLACE.FONT",135:"FREEZE.PANES",136:"SHOW.INFO",137:"SPLIT",138:"ON.WINDOW",139:"ON.DATA",140:"DISABLE.INPUT",142:"OUTLINE",143:"LIST.NAMES",144:"FILE.CLOSE",145:"SAVE.WORKBOOK",146:"DATA.FORM",147:"COPY.CHART",148:"ON.TIME",149:"WAIT",150:"FORMAT.FONT",151:"FILL.UP",152:"FILL.LEFT",153:"DELETE.OVERLAY",155:"SHORT.MENUS",159:"SET.UPDATE.STATUS",161:"COLOR.PALETTE",162:"DELETE.STYLE",163:"WINDOW.RESTORE",164:"WINDOW.MAXIMIZE",166:"CHANGE.LINK",167:"CALCULATE.DOCUMENT",168:"ON.KEY",169:"APP.RESTORE",170:"APP.MOVE",171:"APP.SIZE",172:"APP.MINIMIZE",173:"APP.MAXIMIZE",174:"BRING.TO.FRONT",175:"SEND.TO.BACK",185:"MAIN.CHART.TYPE",186:"OVERLAY.CHART.TYPE",187:"SELECT.END",188:"OPEN.MAIL",189:"SEND.MAIL",190:"STANDARD.FONT",191:"CONSOLIDATE",192:"SORT.SPECIAL",193:"GALLERY.3D.AREA",194:"GALLERY.3D.COLUMN",195:"GALLERY.3D.LINE",196:"GALLERY.3D.PIE",197:"VIEW.3D",198:"GOAL.SEEK",199:"WORKGROUP",200:"FILL.GROUP",201:"UPDATE.LINK",202:"PROMOTE",203:"DEMOTE",204:"SHOW.DETAIL",206:"UNGROUP",207:"OBJECT.PROPERTIES",208:"SAVE.NEW.OBJECT",209:"SHARE",210:"SHARE.NAME",211:"DUPLICATE",212:"APPLY.STYLE",213:"ASSIGN.TO.OBJECT",214:"OBJECT.PROTECTION",215:"HIDE.OBJECT",216:"SET.EXTRACT",217:"CREATE.PUBLISHER",218:"SUBSCRIBE.TO",219:"ATTRIBUTES",220:"SHOW.TOOLBAR",222:"PRINT.PREVIEW",223:"EDIT.COLOR",224:"SHOW.LEVELS",225:"FORMAT.MAIN",226:"FORMAT.OVERLAY",227:"ON.RECALC",228:"EDIT.SERIES",229:"DEFINE.STYLE",240:"LINE.PRINT",243:"ENTER.DATA",249:"GALLERY.RADAR",250:"MERGE.STYLES",251:"EDITION.OPTIONS",252:"PASTE.PICTURE",253:"PASTE.PICTURE.LINK",254:"SPELLING",256:"ZOOM",259:"INSERT.OBJECT",260:"WINDOW.MINIMIZE",265:"SOUND.NOTE",266:"SOUND.PLAY",267:"FORMAT.SHAPE",268:"EXTEND.POLYGON",269:"FORMAT.AUTO",272:"GALLERY.3D.BAR",273:"GALLERY.3D.SURFACE",274:"FILL.AUTO",276:"CUSTOMIZE.TOOLBAR",277:"ADD.TOOL",278:"EDIT.OBJECT",279:"ON.DOUBLECLICK",280:"ON.ENTRY",281:"WORKBOOK.ADD",282:"WORKBOOK.MOVE",283:"WORKBOOK.COPY",284:"WORKBOOK.OPTIONS",285:"SAVE.WORKSPACE",288:"CHART.WIZARD",289:"DELETE.TOOL",290:"MOVE.TOOL",291:"WORKBOOK.SELECT",292:"WORKBOOK.ACTIVATE",293:"ASSIGN.TO.TOOL",295:"COPY.TOOL",296:"RESET.TOOL",297:"CONSTRAIN.NUMERIC",298:"PASTE.TOOL",302:"WORKBOOK.NEW",305:"SCENARIO.CELLS",306:"SCENARIO.DELETE",307:"SCENARIO.ADD",308:"SCENARIO.EDIT",309:"SCENARIO.SHOW",310:"SCENARIO.SHOW.NEXT",311:"SCENARIO.SUMMARY",312:"PIVOT.TABLE.WIZARD",313:"PIVOT.FIELD.PROPERTIES",314:"PIVOT.FIELD",315:"PIVOT.ITEM",316:"PIVOT.ADD.FIELDS",318:"OPTIONS.CALCULATION",319:"OPTIONS.EDIT",320:"OPTIONS.VIEW",321:"ADDIN.MANAGER",322:"MENU.EDITOR",323:"ATTACH.TOOLBARS",324:"VBAActivate",325:"OPTIONS.CHART",328:"VBA.INSERT.FILE",330:"VBA.PROCEDURE.DEFINITION",336:"ROUTING.SLIP",338:"ROUTE.DOCUMENT",339:"MAIL.LOGON",342:"INSERT.PICTURE",343:"EDIT.TOOL",344:"GALLERY.DOUGHNUT",350:"CHART.TREND",352:"PIVOT.ITEM.PROPERTIES",354:"WORKBOOK.INSERT",355:"OPTIONS.TRANSITION",356:"OPTIONS.GENERAL",370:"FILTER.ADVANCED",373:"MAIL.ADD.MAILER",374:"MAIL.DELETE.MAILER",375:"MAIL.REPLY",376:"MAIL.REPLY.ALL",377:"MAIL.FORWARD",378:"MAIL.NEXT.LETTER",379:"DATA.LABEL",380:"INSERT.TITLE",381:"FONT.PROPERTIES",382:"MACRO.OPTIONS",383:"WORKBOOK.HIDE",384:"WORKBOOK.UNHIDE",385:"WORKBOOK.DELETE",386:"WORKBOOK.NAME",388:"GALLERY.CUSTOM",390:"ADD.CHART.AUTOFORMAT",391:"DELETE.CHART.AUTOFORMAT",392:"CHART.ADD.DATA",393:"AUTO.OUTLINE",394:"TAB.ORDER",395:"SHOW.DIALOG",396:"SELECT.ALL",397:"UNGROUP.SHEETS",398:"SUBTOTAL.CREATE",399:"SUBTOTAL.REMOVE",400:"RENAME.OBJECT",412:"WORKBOOK.SCROLL",413:"WORKBOOK.NEXT",414:"WORKBOOK.PREV",415:"WORKBOOK.TAB.SPLIT",416:"FULL.SCREEN",417:"WORKBOOK.PROTECT",420:"SCROLLBAR.PROPERTIES",421:"PIVOT.SHOW.PAGES",422:"TEXT.TO.COLUMNS",423:"FORMAT.CHARTTYPE",424:"LINK.FORMAT",425:"TRACER.DISPLAY",430:"TRACER.NAVIGATE",431:"TRACER.CLEAR",432:"TRACER.ERROR",433:"PIVOT.FIELD.GROUP",434:"PIVOT.FIELD.UNGROUP",435:"CHECKBOX.PROPERTIES",436:"LABEL.PROPERTIES",437:"LISTBOX.PROPERTIES",438:"EDITBOX.PROPERTIES",439:"PIVOT.REFRESH",440:"LINK.COMBO",441:"OPEN.TEXT",442:"HIDE.DIALOG",443:"SET.DIALOG.FOCUS",444:"ENABLE.OBJECT",445:"PUSHBUTTON.PROPERTIES",446:"SET.DIALOG.DEFAULT",447:"FILTER",448:"FILTER.SHOW.ALL",449:"CLEAR.OUTLINE",450:"FUNCTION.WIZARD",451:"ADD.LIST.ITEM",452:"SET.LIST.ITEM",453:"REMOVE.LIST.ITEM",454:"SELECT.LIST.ITEM",455:"SET.CONTROL.VALUE",456:"SAVE.COPY.AS",458:"OPTIONS.LISTS.ADD",459:"OPTIONS.LISTS.DELETE",460:"SERIES.AXES",461:"SERIES.X",462:"SERIES.Y",463:"ERRORBAR.X",464:"ERRORBAR.Y",465:"FORMAT.CHART",466:"SERIES.ORDER",467:"MAIL.LOGOFF",468:"CLEAR.ROUTING.SLIP",469:"APP.ACTIVATE.MICROSOFT",470:"MAIL.EDIT.MAILER",471:"ON.SHEET",472:"STANDARD.WIDTH",473:"SCENARIO.MERGE",474:"SUMMARY.INFO",475:"FIND.FILE",476:"ACTIVE.CELL.FONT",477:"ENABLE.TIPWIZARD",478:"VBA.MAKE.ADDIN",480:"INSERTDATATABLE",481:"WORKGROUP.OPTIONS",482:"MAIL.SEND.MAILER",485:"AUTOCORRECT",489:"POST.DOCUMENT",491:"PICKLIST",493:"VIEW.SHOW",494:"VIEW.DEFINE",495:"VIEW.DELETE",509:"SHEET.BACKGROUND",510:"INSERT.MAP.OBJECT",511:"OPTIONS.MENONO",517:"MSOCHECKS",518:"NORMAL",519:"LAYOUT",520:"RM.PRINT.AREA",521:"CLEAR.PRINT.AREA",522:"ADD.PRINT.AREA",523:"MOVE.BRK",545:"HIDECURR.NOTE",546:"HIDEALL.NOTES",547:"DELETE.NOTE",548:"TRAVERSE.NOTES",549:"ACTIVATE.NOTES",620:"PROTECT.REVISIONS",621:"UNPROTECT.REVISIONS",647:"OPTIONS.ME",653:"WEB.PUBLISH",667:"NEWWEBQUERY",673:"PIVOT.TABLE.CHART",753:"OPTIONS.SAVE",755:"OPTIONS.SPELL",808:"HIDEALL.INKANNOTS"},Npe={0:"COUNT",1:"IF",2:"ISNA",3:"ISERROR",4:"SUM",5:"AVERAGE",6:"MIN",7:"MAX",8:"ROW",9:"COLUMN",10:"NA",11:"NPV",12:"STDEV",13:"DOLLAR",14:"FIXED",15:"SIN",16:"COS",17:"TAN",18:"ATAN",19:"PI",20:"SQRT",21:"EXP",22:"LN",23:"LOG10",24:"ABS",25:"INT",26:"SIGN",27:"ROUND",28:"LOOKUP",29:"INDEX",30:"REPT",31:"MID",32:"LEN",33:"VALUE",34:"TRUE",35:"FALSE",36:"AND",37:"OR",38:"NOT",39:"MOD",40:"DCOUNT",41:"DSUM",42:"DAVERAGE",43:"DMIN",44:"DMAX",45:"DSTDEV",46:"VAR",47:"DVAR",48:"TEXT",49:"LINEST",50:"TREND",51:"LOGEST",52:"GROWTH",53:"GOTO",54:"HALT",55:"RETURN",56:"PV",57:"FV",58:"NPER",59:"PMT",60:"RATE",61:"MIRR",62:"IRR",63:"RAND",64:"MATCH",65:"DATE",66:"TIME",67:"DAY",68:"MONTH",69:"YEAR",70:"WEEKDAY",71:"HOUR",72:"MINUTE",73:"SECOND",74:"NOW",75:"AREAS",76:"ROWS",77:"COLUMNS",78:"OFFSET",79:"ABSREF",80:"RELREF",81:"ARGUMENT",82:"SEARCH",83:"TRANSPOSE",84:"ERROR",85:"STEP",86:"TYPE",87:"ECHO",88:"SET.NAME",89:"CALLER",90:"DEREF",91:"WINDOWS",92:"SERIES",93:"DOCUMENTS",94:"ACTIVE.CELL",95:"SELECTION",96:"RESULT",97:"ATAN2",98:"ASIN",99:"ACOS",100:"CHOOSE",101:"HLOOKUP",102:"VLOOKUP",103:"LINKS",104:"INPUT",105:"ISREF",106:"GET.FORMULA",107:"GET.NAME",108:"SET.VALUE",109:"LOG",110:"EXEC",111:"CHAR",112:"LOWER",113:"UPPER",114:"PROPER",115:"LEFT",116:"RIGHT",117:"EXACT",118:"TRIM",119:"REPLACE",120:"SUBSTITUTE",121:"CODE",122:"NAMES",123:"DIRECTORY",124:"FIND",125:"CELL",126:"ISERR",127:"ISTEXT",128:"ISNUMBER",129:"ISBLANK",130:"T",131:"N",132:"FOPEN",133:"FCLOSE",134:"FSIZE",135:"FREADLN",136:"FREAD",137:"FWRITELN",138:"FWRITE",139:"FPOS",140:"DATEVALUE",141:"TIMEVALUE",142:"SLN",143:"SYD",144:"DDB",145:"GET.DEF",146:"REFTEXT",147:"TEXTREF",148:"INDIRECT",149:"REGISTER",150:"CALL",151:"ADD.BAR",152:"ADD.MENU",153:"ADD.COMMAND",154:"ENABLE.COMMAND",155:"CHECK.COMMAND",156:"RENAME.COMMAND",157:"SHOW.BAR",158:"DELETE.MENU",159:"DELETE.COMMAND",160:"GET.CHART.ITEM",161:"DIALOG.BOX",162:"CLEAN",163:"MDETERM",164:"MINVERSE",165:"MMULT",166:"FILES",167:"IPMT",168:"PPMT",169:"COUNTA",170:"CANCEL.KEY",171:"FOR",172:"WHILE",173:"BREAK",174:"NEXT",175:"INITIATE",176:"REQUEST",177:"POKE",178:"EXECUTE",179:"TERMINATE",180:"RESTART",181:"HELP",182:"GET.BAR",183:"PRODUCT",184:"FACT",185:"GET.CELL",186:"GET.WORKSPACE",187:"GET.WINDOW",188:"GET.DOCUMENT",189:"DPRODUCT",190:"ISNONTEXT",191:"GET.NOTE",192:"NOTE",193:"STDEVP",194:"VARP",195:"DSTDEVP",196:"DVARP",197:"TRUNC",198:"ISLOGICAL",199:"DCOUNTA",200:"DELETE.BAR",201:"UNREGISTER",204:"USDOLLAR",205:"FINDB",206:"SEARCHB",207:"REPLACEB",208:"LEFTB",209:"RIGHTB",210:"MIDB",211:"LENB",212:"ROUNDUP",213:"ROUNDDOWN",214:"ASC",215:"DBCS",216:"RANK",219:"ADDRESS",220:"DAYS360",221:"TODAY",222:"VDB",223:"ELSE",224:"ELSE.IF",225:"END.IF",226:"FOR.CELL",227:"MEDIAN",228:"SUMPRODUCT",229:"SINH",230:"COSH",231:"TANH",232:"ASINH",233:"ACOSH",234:"ATANH",235:"DGET",236:"CREATE.OBJECT",237:"VOLATILE",238:"LAST.ERROR",239:"CUSTOM.UNDO",240:"CUSTOM.REPEAT",241:"FORMULA.CONVERT",242:"GET.LINK.INFO",243:"TEXT.BOX",244:"INFO",245:"GROUP",246:"GET.OBJECT",247:"DB",248:"PAUSE",251:"RESUME",252:"FREQUENCY",253:"ADD.TOOLBAR",254:"DELETE.TOOLBAR",255:"User",256:"RESET.TOOLBAR",257:"EVALUATE",258:"GET.TOOLBAR",259:"GET.TOOL",260:"SPELLING.CHECK",261:"ERROR.TYPE",262:"APP.TITLE",263:"WINDOW.TITLE",264:"SAVE.TOOLBAR",265:"ENABLE.TOOL",266:"PRESS.TOOL",267:"REGISTER.ID",268:"GET.WORKBOOK",269:"AVEDEV",270:"BETADIST",271:"GAMMALN",272:"BETAINV",273:"BINOMDIST",274:"CHIDIST",275:"CHIINV",276:"COMBIN",277:"CONFIDENCE",278:"CRITBINOM",279:"EVEN",280:"EXPONDIST",281:"FDIST",282:"FINV",283:"FISHER",284:"FISHERINV",285:"FLOOR",286:"GAMMADIST",287:"GAMMAINV",288:"CEILING",289:"HYPGEOMDIST",290:"LOGNORMDIST",291:"LOGINV",292:"NEGBINOMDIST",293:"NORMDIST",294:"NORMSDIST",295:"NORMINV",296:"NORMSINV",297:"STANDARDIZE",298:"ODD",299:"PERMUT",300:"POISSON",301:"TDIST",302:"WEIBULL",303:"SUMXMY2",304:"SUMX2MY2",305:"SUMX2PY2",306:"CHITEST",307:"CORREL",308:"COVAR",309:"FORECAST",310:"FTEST",311:"INTERCEPT",312:"PEARSON",313:"RSQ",314:"STEYX",315:"SLOPE",316:"TTEST",317:"PROB",318:"DEVSQ",319:"GEOMEAN",320:"HARMEAN",321:"SUMSQ",322:"KURT",323:"SKEW",324:"ZTEST",325:"LARGE",326:"SMALL",327:"QUARTILE",328:"PERCENTILE",329:"PERCENTRANK",330:"MODE",331:"TRIMMEAN",332:"TINV",334:"MOVIE.COMMAND",335:"GET.MOVIE",336:"CONCATENATE",337:"POWER",338:"PIVOT.ADD.DATA",339:"GET.PIVOT.TABLE",340:"GET.PIVOT.FIELD",341:"GET.PIVOT.ITEM",342:"RADIANS",343:"DEGREES",344:"SUBTOTAL",345:"SUMIF",346:"COUNTIF",347:"COUNTBLANK",348:"SCENARIO.GET",349:"OPTIONS.LISTS.GET",350:"ISPMT",351:"DATEDIF",352:"DATESTRING",353:"NUMBERSTRING",354:"ROMAN",355:"OPEN.DIALOG",356:"SAVE.DIALOG",357:"VIEW.GET",358:"GETPIVOTDATA",359:"HYPERLINK",360:"PHONETIC",361:"AVERAGEA",362:"MAXA",363:"MINA",364:"STDEVPA",365:"VARPA",366:"STDEVA",367:"VARA",368:"BAHTTEXT",369:"THAIDAYOFWEEK",370:"THAIDIGIT",371:"THAIMONTHOFYEAR",372:"THAINUMSOUND",373:"THAINUMSTRING",374:"THAISTRINGLENGTH",375:"ISTHAIDIGIT",376:"ROUNDBAHTDOWN",377:"ROUNDBAHTUP",378:"THAIYEAR",379:"RTD",380:"CUBEVALUE",381:"CUBEMEMBER",382:"CUBEMEMBERPROPERTY",383:"CUBERANKEDMEMBER",384:"HEX2BIN",385:"HEX2DEC",386:"HEX2OCT",387:"DEC2BIN",388:"DEC2HEX",389:"DEC2OCT",390:"OCT2BIN",391:"OCT2HEX",392:"OCT2DEC",393:"BIN2DEC",394:"BIN2OCT",395:"BIN2HEX",396:"IMSUB",397:"IMDIV",398:"IMPOWER",399:"IMABS",400:"IMSQRT",401:"IMLN",402:"IMLOG2",403:"IMLOG10",404:"IMSIN",405:"IMCOS",406:"IMEXP",407:"IMARGUMENT",408:"IMCONJUGATE",409:"IMAGINARY",410:"IMREAL",411:"COMPLEX",412:"IMSUM",413:"IMPRODUCT",414:"SERIESSUM",415:"FACTDOUBLE",416:"SQRTPI",417:"QUOTIENT",418:"DELTA",419:"GESTEP",420:"ISEVEN",421:"ISODD",422:"MROUND",423:"ERF",424:"ERFC",425:"BESSELJ",426:"BESSELK",427:"BESSELY",428:"BESSELI",429:"XIRR",430:"XNPV",431:"PRICEMAT",432:"YIELDMAT",433:"INTRATE",434:"RECEIVED",435:"DISC",436:"PRICEDISC",437:"YIELDDISC",438:"TBILLEQ",439:"TBILLPRICE",440:"TBILLYIELD",441:"PRICE",442:"YIELD",443:"DOLLARDE",444:"DOLLARFR",445:"NOMINAL",446:"EFFECT",447:"CUMPRINC",448:"CUMIPMT",449:"EDATE",450:"EOMONTH",451:"YEARFRAC",452:"COUPDAYBS",453:"COUPDAYS",454:"COUPDAYSNC",455:"COUPNCD",456:"COUPNUM",457:"COUPPCD",458:"DURATION",459:"MDURATION",460:"ODDLPRICE",461:"ODDLYIELD",462:"ODDFPRICE",463:"ODDFYIELD",464:"RANDBETWEEN",465:"WEEKNUM",466:"AMORDEGRC",467:"AMORLINC",468:"CONVERT",724:"SHEETJS",469:"ACCRINT",470:"ACCRINTM",471:"WORKDAY",472:"NETWORKDAYS",473:"GCD",474:"MULTINOMIAL",475:"LCM",476:"FVSCHEDULE",477:"CUBEKPIMEMBER",478:"CUBESET",479:"CUBESETCOUNT",480:"IFERROR",481:"COUNTIFS",482:"SUMIFS",483:"AVERAGEIF",484:"AVERAGEIFS"},_2t={2:1,3:1,10:0,15:1,16:1,17:1,18:1,19:0,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,34:0,35:0,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,63:0,65:3,66:3,67:1,68:1,69:1,70:1,71:1,72:1,73:1,74:0,75:1,76:1,77:1,79:2,80:2,83:1,85:0,86:1,89:0,90:1,94:0,95:0,97:2,98:1,99:1,101:3,102:3,105:1,106:1,108:2,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,144:4,161:1,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,186:1,189:3,190:1,195:3,196:3,197:1,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,225:0,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,247:4,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,382:3,385:1,392:1,393:1,396:2,397:2,398:2,399:1,400:1,401:1,402:1,403:1,404:1,405:1,406:1,407:1,408:1,409:1,410:1,414:4,415:1,416:1,417:2,420:1,421:1,422:2,424:1,425:2,426:2,427:2,428:2,430:3,438:3,439:3,440:3,443:2,444:2,445:2,446:2,447:6,448:6,449:2,450:2,464:2,468:3,476:2,479:1,480:2,65535:0};function k2t(t){var e="of:="+t.replace(YB,"$1[.$2$3$4$5]").replace(/\]:\[/g,":");return e.replace(/;/g,"|").replace(/,/g,";")}l(k2t,"csf_to_ods_formula");function A2t(t){return t.replace(/\./,"!")}l(A2t,"csf_to_ods_3D");var g4=typeof Map!="undefined";function KB(t,e,r){var n=0,a=t.length;if(r){if(g4?r.has(e):Object.prototype.hasOwnProperty.call(r,e)){for(var i=g4?r.get(e):r[e];n<i.length;++n)if(t[i[n]].t===e)return t.Count++,i[n]}}else for(;n<a;++n)if(t[n].t===e)return t.Count++,n;return t[a]={t:e},t.Count++,t.Unique++,r&&(g4?(r.has(e)||r.set(e,[]),r.get(e).push(a)):(Object.prototype.hasOwnProperty.call(r,e)||(r[e]=[]),r[e].push(a))),a}l(KB,"get_sst_id");function r8(t,e){var r={min:t+1,max:t+1},n=-1;return e.MDW&&(jd=e.MDW),e.width!=null?r.customWidth=1:e.wpx!=null?n=QA(e.wpx):e.wch!=null&&(n=e.wch),n>-1?(r.width=VB(n),r.customWidth=1):e.width!=null&&(r.width=e.width),e.hidden&&(r.hidden=!0),e.level!=null&&(r.outlineLevel=r.level=e.level),r}l(r8,"col_obj_w");function Ipe(t,e){if(t){var r=[.7,.7,.75,.75,.3,.3];t.left==null&&(t.left=r[0]),t.right==null&&(t.right=r[1]),t.top==null&&(t.top=r[2]),t.bottom==null&&(t.bottom=r[3]),t.header==null&&(t.header=r[4]),t.footer==null&&(t.footer=r[5])}}l(Ipe,"default_margins");function B0(t,e,r){var n=r.revssf[e.z!=null?e.z:"General"],a=60,i=t.length;if(n==null&&r.ssf){for(;a<392;++a)if(r.ssf[a]==null){Zfe(e.z,a),r.ssf[a]=e.z,r.revssf[e.z]=n=a;break}}for(a=0;a!=i;++a)if(t[a].numFmtId===n)return a;return t[i]={numFmtId:n,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1},i}l(B0,"get_cell_style");function N2t(t,e,r){if(t&&t["!ref"]){var n=Ba(t["!ref"]);if(n.e.c<n.s.c||n.e.r<n.s.r)throw new Error("Bad range ("+r+"): "+t["!ref"])}}l(N2t,"check_ws");function I2t(t){if(t.length===0)return"";for(var e='<mergeCells count="'+t.length+'">',r=0;r!=t.length;++r)e+='<mergeCell ref="'+qi(t[r])+'"/>';return e+"</mergeCells>"}l(I2t,"write_ws_xml_merges");function L2t(t,e,r,n,a){var i=!1,s={},o=null;if(n.bookType!=="xlsx"&&e.vbaraw){var u=e.SheetNames[r];try{e.Workbook&&(u=e.Workbook.Sheets[r].CodeName||u)}catch(d){}i=!0,s.codeName=i4(la(u))}if(t&&t["!outline"]){var h={summaryBelow:1,summaryRight:1};t["!outline"].above&&(h.summaryBelow=0),t["!outline"].left&&(h.summaryRight=0),o=(o||"")+fr("outlinePr",null,h)}!i&&!o||(a[a.length]=fr("sheetPr",o,s))}l(L2t,"write_ws_xml_sheetpr");var $2t=["objects","scenarios","selectLockedCells","selectUnlockedCells"],M2t=["formatColumns","formatRows","formatCells","insertColumns","insertRows","insertHyperlinks","deleteColumns","deleteRows","sort","autoFilter","pivotTables"];function P2t(t){var e={sheet:1};return $2t.forEach(function(r){t[r]!=null&&t[r]&&(e[r]="1")}),M2t.forEach(function(r){t[r]!=null&&!t[r]&&(e[r]="0")}),t.password&&(e.password=lpe(t.password).toString(16).toUpperCase()),fr("sheetProtection",null,e)}l(P2t,"write_ws_xml_protection");function R2t(t){return Ipe(t),fr("pageMargins",null,t)}l(R2t,"write_ws_xml_margins");function O2t(t,e){for(var r=["<cols>"],n,a=0;a!=e.length;++a)(n=e[a])&&(r[r.length]=fr("col",null,r8(a,n)));return r[r.length]="</cols>",r.join("")}l(O2t,"write_ws_xml_cols");function D2t(t,e,r,n){var a=typeof t.ref=="string"?t.ref:qi(t.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var i=r.Workbook.Names,s=fc(a);s.s.r==s.e.r&&(s.e.r=fc(e["!ref"]).e.r,a=qi(s));for(var o=0;o<i.length;++o){var u=i[o];if(u.Name=="_xlnm._FilterDatabase"&&u.Sheet==n){u.Ref="'"+r.SheetNames[n]+"'!"+a;break}}return o==i.length&&i.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+a}),fr("autoFilter",null,{ref:a})}l(D2t,"write_ws_xml_autofilter");function F2t(t,e,r,n){var a={workbookViewId:"0"};return(((n||{}).Workbook||{}).Views||[])[0]&&(a.rightToLeft=n.Workbook.Views[0].RTL?"1":"0"),fr("sheetViews",fr("sheetView",null,a),{})}l(F2t,"write_ws_xml_sheetviews");function B2t(t,e,r,n){if(t.c&&r["!comments"].push([e,t.c]),t.v===void 0&&typeof t.f!="string"||t.t==="z"&&!t.f)return"";var a="",i=t.t,s=t.v;if(t.t!=="z")switch(t.t){case"b":a=t.v?"1":"0";break;case"n":a=""+t.v;break;case"e":a=d4[t.v];break;case"d":n&&n.cellDates?a=Uo(t.v,-1).toISOString():(t=Dl(t),t.t="n",a=""+(t.v=Ol(Uo(t.v)))),typeof t.z=="undefined"&&(t.z=gi[14]);break;default:a=t.v;break}var o=Zs("v",la(a)),u={r:e},h=B0(n.cellXfs,t,n);switch(h!==0&&(u.s=h),t.t){case"n":break;case"d":u.t="d";break;case"b":u.t="b";break;case"e":u.t="e";break;case"z":break;default:if(t.v==null){delete t.t;break}if(t.v.length>32767)throw new Error("Text length must not exceed 32767 characters");if(n&&n.bookSST){o=Zs("v",""+KB(n.Strings,t.v,n.revStrings)),u.t="s";break}u.t="str";break}if(t.t!=i&&(t.t=i,t.v=s),typeof t.f=="string"&&t.f){var d=t.F&&t.F.slice(0,e.length)==e?{t:"array",ref:t.F}:null;o=fr("f",la(t.f),d)+(t.v!=null?o:"")}return t.l&&r["!links"].push([e,t.l]),t.D&&(u.cm=1),fr("c",o,u)}l(B2t,"write_ws_xml_cell");function z2t(t,e,r,n){var a=[],i=[],s=Ba(t["!ref"]),o="",u,h="",d=[],f=0,p=0,g=t["!rows"],m=Array.isArray(t),y={r:h},v,b=-1;for(p=s.s.c;p<=s.e.c;++p)d[p]=Co(p);for(f=s.s.r;f<=s.e.r;++f){for(i=[],h=Qs(f),p=s.s.c;p<=s.e.c;++p){u=d[p]+h;var w=m?(t[f]||[])[p]:t[u];w!==void 0&&(o=B2t(w,u,t,e))!=null&&i.push(o)}(i.length>0||g&&g[f])&&(y={r:h},g&&g[f]&&(v=g[f],v.hidden&&(y.hidden=1),b=-1,v.hpx?b=JA(v.hpx):v.hpt&&(b=v.hpt),b>-1&&(y.ht=b,y.customHeight=1),v.level&&(y.outlineLevel=v.level)),a[a.length]=fr("row",i.join(""),y))}if(g)for(;f<g.length;++f)g&&g[f]&&(y={r:f+1},v=g[f],v.hidden&&(y.hidden=1),b=-1,v.hpx?b=JA(v.hpx):v.hpt&&(b=v.hpt),b>-1&&(y.ht=b,y.customHeight=1),v.level&&(y.outlineLevel=v.level),a[a.length]=fr("row","",y));return a.join("")}l(z2t,"write_ws_xml_data");function Lpe(t,e,r,n){var a=[Gi,fr("worksheet",null,{xmlns:Qx[0],"xmlns:r":Cs.r})],i=r.SheetNames[t],s=0,o="",u=r.Sheets[i];u==null&&(u={});var h=u["!ref"]||"A1",d=Ba(h);if(d.e.c>16383||d.e.r>1048575){if(e.WTF)throw new Error("Range "+h+" exceeds format limit A1:XFD1048576");d.e.c=Math.min(d.e.c,16383),d.e.r=Math.min(d.e.c,1048575),h=qi(d)}n||(n={}),u["!comments"]=[];var f=[];L2t(u,r,t,e,a),a[a.length]=fr("dimension",null,{ref:h}),a[a.length]=F2t(u,e,t,r),e.sheetFormat&&(a[a.length]=fr("sheetFormatPr",null,{defaultRowHeight:e.sheetFormat.defaultRowHeight||"16",baseColWidth:e.sheetFormat.baseColWidth||"10",outlineLevelRow:e.sheetFormat.outlineLevelRow||"7"})),u["!cols"]!=null&&u["!cols"].length>0&&(a[a.length]=O2t(u,u["!cols"])),a[s=a.length]="<sheetData/>",u["!links"]=[],u["!ref"]!=null&&(o=z2t(u,e),o.length>0&&(a[a.length]=o)),a.length>s+1&&(a[a.length]="</sheetData>",a[s]=a[s].replace("/>",">")),u["!protect"]&&(a[a.length]=P2t(u["!protect"])),u["!autofilter"]!=null&&(a[a.length]=D2t(u["!autofilter"],u,r,t)),u["!merges"]!=null&&u["!merges"].length>0&&(a[a.length]=I2t(u["!merges"]));var p=-1,g,m=-1;return u["!links"].length>0&&(a[a.length]="<hyperlinks>",u["!links"].forEach(function(y){y[1].Target&&(g={ref:y[0]},y[1].Target.charAt(0)!="#"&&(m=ua(n,-1,la(y[1].Target).replace(/#.*$/,""),Gn.HLINK),g["r:id"]="rId"+m),(p=y[1].Target.indexOf("#"))>-1&&(g.location=la(y[1].Target.slice(p+1))),y[1].Tooltip&&(g.tooltip=la(y[1].Tooltip)),a[a.length]=fr("hyperlink",null,g))}),a[a.length]="</hyperlinks>"),delete u["!links"],u["!margins"]!=null&&(a[a.length]=R2t(u["!margins"])),(!e||e.ignoreEC||e.ignoreEC==null)&&(a[a.length]=Zs("ignoredErrors",fr("ignoredError",null,{numberStoredAsText:1,sqref:h}))),f.length>0&&(m=ua(n,-1,"../drawings/drawing"+(t+1)+".xml",Gn.DRAW),a[a.length]=fr("drawing",null,{"r:id":"rId"+m}),u["!drawing"]=f),u["!comments"].length>0&&(m=ua(n,-1,"../drawings/vmlDrawing"+(t+1)+".vml",Gn.VML),a[a.length]=fr("legacyDrawing",null,{"r:id":"rId"+m}),u["!legacy"]=m),a.length>1&&(a[a.length]="</worksheet>",a[1]=a[1].replace("/>",">")),a.join("")}l(Lpe,"write_ws_xml");function H2t(t,e){var r={},n=t.l+e;r.r=t.read_shift(4),t.l+=4;var a=t.read_shift(2);t.l+=1;var i=t.read_shift(1);return t.l=n,i&7&&(r.level=i&7),i&16&&(r.hidden=!0),i&32&&(r.hpt=a/20),r}l(H2t,"parse_BrtRowHdr");function W2t(t,e,r){var n=Gt(145),a=(r["!rows"]||[])[t]||{};n.write_shift(4,t),n.write_shift(4,0);var i=320;a.hpx?i=JA(a.hpx)*20:a.hpt&&(i=a.hpt*20),n.write_shift(2,i),n.write_shift(1,0);var s=0;a.level&&(s|=a.level),a.hidden&&(s|=16),(a.hpx||a.hpt)&&(s|=32),n.write_shift(1,s),n.write_shift(1,0);var o=0,u=n.l;n.l+=4;for(var h={r:t,c:0},d=0;d<16;++d)if(!(e.s.c>d+1<<10||e.e.c<d<<10)){for(var f=-1,p=-1,g=d<<10;g<d+1<<10;++g){h.c=g;var m=Array.isArray(r)?(r[h.r]||[])[h.c]:r[ca(h)];m&&(f<0&&(f=g),p=g)}f<0||(++o,n.write_shift(4,f),n.write_shift(4,p))}var y=n.l;return n.l=u,n.write_shift(4,o),n.l=y,n.length>n.l?n.slice(0,n.l):n}l(W2t,"write_BrtRowHdr");function V2t(t,e,r,n){var a=W2t(n,r,e);(a.length>17||(e["!rows"]||[])[n])&&tr(t,0,a)}l(V2t,"write_row_header");var G2t=Xg,q2t=tw;function Y2t(){}l(Y2t,"parse_BrtWsFmtInfo");function U2t(t,e){var r={},n=t[t.l];return++t.l,r.above=!(n&64),r.left=!(n&128),t.l+=18,r.name=n1t(t),r}l(U2t,"parse_BrtWsProp");function j2t(t,e,r){r==null&&(r=Gt(84+4*t.length));var n=192;e&&(e.above&&(n&=-65),e.left&&(n&=-129)),r.write_shift(1,n);for(var a=1;a<3;++a)r.write_shift(1,0);return YA({auto:1},r),r.write_shift(-4,-1),r.write_shift(-4,-1),L0e(t,r),r.slice(0,r.l)}l(j2t,"write_BrtWsProp");function K2t(t){var e=Yc(t);return[e]}l(K2t,"parse_BrtCellBlank");function X2t(t,e,r){return r==null&&(r=Gt(8)),Ug(e,r)}l(X2t,"write_BrtCellBlank");function Z2t(t){var e=jg(t);return[e]}l(Z2t,"parse_BrtShortBlank");function Q2t(t,e,r){return r==null&&(r=Gt(4)),Kg(e,r)}l(Q2t,"write_BrtShortBlank");function J2t(t){var e=Yc(t),r=t.read_shift(1);return[e,r,"b"]}l(J2t,"parse_BrtCellBool");function ebt(t,e,r){return r==null&&(r=Gt(9)),Ug(e,r),r.write_shift(1,t.v?1:0),r}l(ebt,"write_BrtCellBool");function tbt(t){var e=jg(t),r=t.read_shift(1);return[e,r,"b"]}l(tbt,"parse_BrtShortBool");function rbt(t,e,r){return r==null&&(r=Gt(5)),Kg(e,r),r.write_shift(1,t.v?1:0),r}l(rbt,"write_BrtShortBool");function nbt(t){var e=Yc(t),r=t.read_shift(1);return[e,r,"e"]}l(nbt,"parse_BrtCellError");function abt(t,e,r){return r==null&&(r=Gt(9)),Ug(e,r),r.write_shift(1,t.v),r}l(abt,"write_BrtCellError");function ibt(t){var e=jg(t),r=t.read_shift(1);return[e,r,"e"]}l(ibt,"parse_BrtShortError");function sbt(t,e,r){return r==null&&(r=Gt(8)),Kg(e,r),r.write_shift(1,t.v),r.write_shift(2,0),r.write_shift(1,0),r}l(sbt,"write_BrtShortError");function obt(t){var e=Yc(t),r=t.read_shift(4);return[e,r,"s"]}l(obt,"parse_BrtCellIsst");function lbt(t,e,r){return r==null&&(r=Gt(12)),Ug(e,r),r.write_shift(4,e.v),r}l(lbt,"write_BrtCellIsst");function cbt(t){var e=jg(t),r=t.read_shift(4);return[e,r,"s"]}l(cbt,"parse_BrtShortIsst");function ubt(t,e,r){return r==null&&(r=Gt(8)),Kg(e,r),r.write_shift(4,e.v),r}l(ubt,"write_BrtShortIsst");function hbt(t){var e=Yc(t),r=rw(t);return[e,r,"n"]}l(hbt,"parse_BrtCellReal");function dbt(t,e,r){return r==null&&(r=Gt(16)),Ug(e,r),Zg(t.v,r),r}l(dbt,"write_BrtCellReal");function fbt(t){var e=jg(t),r=rw(t);return[e,r,"n"]}l(fbt,"parse_BrtShortReal");function pbt(t,e,r){return r==null&&(r=Gt(12)),Kg(e,r),Zg(t.v,r),r}l(pbt,"write_BrtShortReal");function gbt(t){var e=Yc(t),r=$0e(t);return[e,r,"n"]}l(gbt,"parse_BrtCellRk");function mbt(t,e,r){return r==null&&(r=Gt(12)),Ug(e,r),M0e(t.v,r),r}l(mbt,"write_BrtCellRk");function ybt(t){var e=jg(t),r=$0e(t);return[e,r,"n"]}l(ybt,"parse_BrtShortRk");function vbt(t,e,r){return r==null&&(r=Gt(8)),Kg(e,r),M0e(t.v,r),r}l(vbt,"write_BrtShortRk");function bbt(t){var e=Yc(t),r=DB(t);return[e,r,"is"]}l(bbt,"parse_BrtCellRString");function xbt(t){var e=Yc(t),r=So(t);return[e,r,"str"]}l(xbt,"parse_BrtCellSt");function wbt(t,e,r){return r==null&&(r=Gt(12+4*t.v.length)),Ug(e,r),_s(t.v,r),r.length>r.l?r.slice(0,r.l):r}l(wbt,"write_BrtCellSt");function Tbt(t){var e=jg(t),r=So(t);return[e,r,"str"]}l(Tbt,"parse_BrtShortSt");function Ebt(t,e,r){return r==null&&(r=Gt(8+4*t.v.length)),Kg(e,r),_s(t.v,r),r.length>r.l?r.slice(0,r.l):r}l(Ebt,"write_BrtShortSt");function Cbt(t,e,r){var n=t.l+e,a=Yc(t);a.r=r["!row"];var i=t.read_shift(1),s=[a,i,"b"];if(r.cellFormula){t.l+=2;var o=t8(t,n-t.l,r);s[3]=sw(o,null,a,r.supbooks,r)}else t.l=n;return s}l(Cbt,"parse_BrtFmlaBool");function Sbt(t,e,r){var n=t.l+e,a=Yc(t);a.r=r["!row"];var i=t.read_shift(1),s=[a,i,"e"];if(r.cellFormula){t.l+=2;var o=t8(t,n-t.l,r);s[3]=sw(o,null,a,r.supbooks,r)}else t.l=n;return s}l(Sbt,"parse_BrtFmlaError");function _bt(t,e,r){var n=t.l+e,a=Yc(t);a.r=r["!row"];var i=rw(t),s=[a,i,"n"];if(r.cellFormula){t.l+=2;var o=t8(t,n-t.l,r);s[3]=sw(o,null,a,r.supbooks,r)}else t.l=n;return s}l(_bt,"parse_BrtFmlaNum");function kbt(t,e,r){var n=t.l+e,a=Yc(t);a.r=r["!row"];var i=So(t),s=[a,i,"str"];if(r.cellFormula){t.l+=2;var o=t8(t,n-t.l,r);s[3]=sw(o,null,a,r.supbooks,r)}else t.l=n;return s}l(kbt,"parse_BrtFmlaString");var Abt=Xg,Nbt=tw;function Ibt(t,e){return e==null&&(e=Gt(4)),e.write_shift(4,t),e}l(Ibt,"write_BrtBeginMergeCells");function Lbt(t,e){var r=t.l+e,n=Xg(t),a=FB(t),i=So(t),s=So(t),o=So(t);t.l=r;var u={rfx:n,relId:a,loc:i,display:o};return s&&(u.Tooltip=s),u}l(Lbt,"parse_BrtHLink");function $bt(t,e){var r=Gt(50+4*(t[1].Target.length+(t[1].Tooltip||"").length));tw({s:Ss(t[0]),e:Ss(t[0])},r),zB("rId"+e,r);var n=t[1].Target.indexOf("#"),a=n==-1?"":t[1].Target.slice(n+1);return _s(a||"",r),_s(t[1].Tooltip||"",r),_s("",r),r.slice(0,r.l)}l($bt,"write_BrtHLink");function Mbt(){}l(Mbt,"parse_BrtPane");function Pbt(t,e,r){var n=t.l+e,a=P0e(t),i=t.read_shift(1),s=[a];if(s[2]=i,r.cellFormula){var o=T2t(t,n-t.l,r);s[1]=o}else t.l=n;return s}l(Pbt,"parse_BrtArrFmla");function Rbt(t,e,r){var n=t.l+e,a=Xg(t),i=[a];if(r.cellFormula){var s=C2t(t,n-t.l,r);i[1]=s,t.l=n}else t.l=n;return i}l(Rbt,"parse_BrtShrFmla");function Obt(t,e,r){r==null&&(r=Gt(18));var n=r8(t,e);r.write_shift(-4,t),r.write_shift(-4,t),r.write_shift(4,(n.width||10)*256),r.write_shift(4,0);var a=0;return e.hidden&&(a|=1),typeof n.width=="number"&&(a|=2),e.level&&(a|=e.level<<8),r.write_shift(2,a),r}l(Obt,"write_BrtColInfo");var $pe=["left","right","top","bottom","header","footer"];function Dbt(t){var e={};return $pe.forEach(function(r){e[r]=rw(t)}),e}l(Dbt,"parse_BrtMargins");function Fbt(t,e){return e==null&&(e=Gt(48)),Ipe(t),$pe.forEach(function(r){Zg(t[r],e)}),e}l(Fbt,"write_BrtMargins");function Bbt(t){var e=t.read_shift(2);return t.l+=28,{RTL:e&32}}l(Bbt,"parse_BrtBeginWsView");function zbt(t,e,r){r==null&&(r=Gt(30));var n=924;return(((e||{}).Views||[])[0]||{}).RTL&&(n|=32),r.write_shift(2,n),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(1,0),r.write_shift(1,0),r.write_shift(2,0),r.write_shift(2,100),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(2,0),r.write_shift(4,0),r}l(zbt,"write_BrtBeginWsView");function Hbt(t){var e=Gt(24);return e.write_shift(4,4),e.write_shift(4,1),tw(t,e),e}l(Hbt,"write_BrtCellIgnoreEC");function Wbt(t,e){return e==null&&(e=Gt(66)),e.write_shift(2,t.password?lpe(t.password):0),e.write_shift(4,1),[["objects",!1],["scenarios",!1],["formatCells",!0],["formatColumns",!0],["formatRows",!0],["insertColumns",!0],["insertRows",!0],["insertHyperlinks",!0],["deleteColumns",!0],["deleteRows",!0],["selectLockedCells",!1],["sort",!0],["autoFilter",!0],["pivotTables",!0],["selectUnlockedCells",!1]].forEach(function(r){r[1]?e.write_shift(4,t[r[0]]!=null&&!t[r[0]]?1:0):e.write_shift(4,t[r[0]]!=null&&t[r[0]]?0:1)}),e}l(Wbt,"write_BrtSheetProtection");function Vbt(){}l(Vbt,"parse_BrtDVal");function Gbt(){}l(Gbt,"parse_BrtDVal14");function qbt(t,e,r,n,a,i,s){if(e.v===void 0)return!1;var o="";switch(e.t){case"b":o=e.v?"1":"0";break;case"d":e=Dl(e),e.z=e.z||gi[14],e.v=Ol(Uo(e.v)),e.t="n";break;case"n":case"e":o=""+e.v;break;default:o=e.v;break}var u={r,c:n};switch(u.s=B0(a.cellXfs,e,a),e.l&&i["!links"].push([ca(u),e.l]),e.c&&i["!comments"].push([ca(u),e.c]),e.t){case"s":case"str":return a.bookSST?(o=KB(a.Strings,e.v,a.revStrings),u.t="s",u.v=o,s?tr(t,18,ubt(e,u)):tr(t,7,lbt(e,u))):(u.t="str",s?tr(t,17,Ebt(e,u)):tr(t,6,wbt(e,u))),!0;case"n":return e.v==(e.v|0)&&e.v>-1e3&&e.v<1e3?s?tr(t,13,vbt(e,u)):tr(t,2,mbt(e,u)):s?tr(t,16,pbt(e,u)):tr(t,5,dbt(e,u)),!0;case"b":return u.t="b",s?tr(t,15,rbt(e,u)):tr(t,4,ebt(e,u)),!0;case"e":return u.t="e",s?tr(t,14,sbt(e,u)):tr(t,3,abt(e,u)),!0}return s?tr(t,12,Q2t(e,u)):tr(t,1,X2t(e,u)),!0}l(qbt,"write_ws_bin_cell");function Ybt(t,e,r,n){var a=Ba(e["!ref"]||"A1"),i,s="",o=[];tr(t,145);var u=Array.isArray(e),h=a.e.r;e["!rows"]&&(h=Math.max(a.e.r,e["!rows"].length-1));for(var d=a.s.r;d<=h;++d){s=Qs(d),V2t(t,e,a,d);var f=!1;if(d<=a.e.r)for(var p=a.s.c;p<=a.e.c;++p){d===a.s.r&&(o[p]=Co(p)),i=o[p]+s;var g=u?(e[d]||[])[p]:e[i];if(!g){f=!1;continue}f=qbt(t,g,d,p,n,e,f)}}tr(t,146)}l(Ybt,"write_CELLTABLE");function Ubt(t,e){!e||!e["!merges"]||(tr(t,177,Ibt(e["!merges"].length)),e["!merges"].forEach(function(r){tr(t,176,Nbt(r))}),tr(t,178))}l(Ubt,"write_MERGECELLS");function jbt(t,e){!e||!e["!cols"]||(tr(t,390),e["!cols"].forEach(function(r,n){r&&tr(t,60,Obt(n,r))}),tr(t,391))}l(jbt,"write_COLINFOS");function Kbt(t,e){!e||!e["!ref"]||(tr(t,648),tr(t,649,Hbt(Ba(e["!ref"]))),tr(t,650))}l(Kbt,"write_IGNOREECS");function Xbt(t,e,r){e["!links"].forEach(function(n){if(n[1].Target){var a=ua(r,-1,n[1].Target.replace(/#.*$/,""),Gn.HLINK);tr(t,494,$bt(n,a))}}),delete e["!links"]}l(Xbt,"write_HLINKS");function Zbt(t,e,r,n){if(e["!comments"].length>0){var a=ua(n,-1,"../drawings/vmlDrawing"+(r+1)+".vml",Gn.VML);tr(t,551,zB("rId"+a)),e["!legacy"]=a}}l(Zbt,"write_LEGACYDRAWING");function Qbt(t,e,r,n){if(e["!autofilter"]){var a=e["!autofilter"],i=typeof a.ref=="string"?a.ref:qi(a.ref);r.Workbook||(r.Workbook={Sheets:[]}),r.Workbook.Names||(r.Workbook.Names=[]);var s=r.Workbook.Names,o=fc(i);o.s.r==o.e.r&&(o.e.r=fc(e["!ref"]).e.r,i=qi(o));for(var u=0;u<s.length;++u){var h=s[u];if(h.Name=="_xlnm._FilterDatabase"&&h.Sheet==n){h.Ref="'"+r.SheetNames[n]+"'!"+i;break}}u==s.length&&s.push({Name:"_xlnm._FilterDatabase",Sheet:n,Ref:"'"+r.SheetNames[n]+"'!"+i}),tr(t,161,tw(Ba(i))),tr(t,162)}}l(Qbt,"write_AUTOFILTER");function Jbt(t,e,r){tr(t,133),tr(t,137,zbt(e,r)),tr(t,138),tr(t,134)}l(Jbt,"write_WSVIEWS2");function ext(t,e){e["!protect"]&&tr(t,535,Wbt(e["!protect"]))}l(ext,"write_SHEETPROTECT");function txt(t,e,r,n){var a=Fl(),i=r.SheetNames[t],s=r.Sheets[i]||{},o=i;try{r&&r.Workbook&&(o=r.Workbook.Sheets[t].CodeName||o)}catch(h){}var u=Ba(s["!ref"]||"A1");if(u.e.c>16383||u.e.r>1048575){if(e.WTF)throw new Error("Range "+(s["!ref"]||"A1")+" exceeds format limit A1:XFD1048576");u.e.c=Math.min(u.e.c,16383),u.e.r=Math.min(u.e.c,1048575)}return s["!links"]=[],s["!comments"]=[],tr(a,129),(r.vbaraw||s["!outline"])&&tr(a,147,j2t(o,s["!outline"])),tr(a,148,q2t(u)),Jbt(a,s,r.Workbook),jbt(a,s),Ybt(a,s,t,e),ext(a,s),Qbt(a,s,r,t),Ubt(a,s),Xbt(a,s,n),s["!margins"]&&tr(a,476,Fbt(s["!margins"])),(!e||e.ignoreEC||e.ignoreEC==null)&&Kbt(a,s),Zbt(a,s,t,n),tr(a,130),a.end()}l(txt,"write_ws_bin");function rxt(t,e){t.l+=10;var r=So(t);return{name:r}}l(rxt,"parse_BrtCsProp");var nxt=[["allowRefreshQuery",!1,"bool"],["autoCompressPictures",!0,"bool"],["backupFile",!1,"bool"],["checkCompatibility",!1,"bool"],["CodeName",""],["date1904",!1,"bool"],["defaultThemeVersion",0,"int"],["filterPrivacy",!1,"bool"],["hidePivotFieldList",!1,"bool"],["promptedSolutions",!1,"bool"],["publishItems",!1,"bool"],["refreshAllConnections",!1,"bool"],["saveExternalLinkValues",!0,"bool"],["showBorderUnselectedTables",!0,"bool"],["showInkAnnotation",!0,"bool"],["showObjects","all"],["showPivotChartFilter",!1,"bool"],["updateLinks","userSet"]];function axt(t){return!t.Workbook||!t.Workbook.WBProps?"false":Rmt(t.Workbook.WBProps.date1904)?"true":"false"}l(axt,"safe1904");var ixt="][*?/\\".split("");function Mpe(t,e){if(t.length>31)throw new Error("Sheet names cannot exceed 31 chars");var r=!0;return ixt.forEach(function(n){if(t.indexOf(n)!=-1)throw new Error("Sheet name cannot contain : \\ / ? * [ ]")}),r}l(Mpe,"check_ws_name");function sxt(t,e,r){t.forEach(function(n,a){Mpe(n);for(var i=0;i<a;++i)if(n==t[i])throw new Error("Duplicate Sheet Name: "+n);if(r){var s=e&&e[a]&&e[a].CodeName||n;if(s.charCodeAt(0)==95&&s.length>22)throw new Error("Bad Code Name: Worksheet"+s)}})}l(sxt,"check_wb_names");function oxt(t){if(!t||!t.SheetNames||!t.Sheets)throw new Error("Invalid Workbook");if(!t.SheetNames.length)throw new Error("Workbook is empty");var e=t.Workbook&&t.Workbook.Sheets||[];sxt(t.SheetNames,e,!!t.vbaraw);for(var r=0;r<t.SheetNames.length;++r)N2t(t.Sheets[t.SheetNames[r]],t.SheetNames[r],r)}l(oxt,"check_wb");function Ppe(t){var e=[Gi];e[e.length]=fr("workbook",null,{xmlns:Qx[0],"xmlns:r":Cs.r});var r=t.Workbook&&(t.Workbook.Names||[]).length>0,n={codeName:"ThisWorkbook"};t.Workbook&&t.Workbook.WBProps&&(nxt.forEach(function(o){t.Workbook.WBProps[o[0]]!=null&&t.Workbook.WBProps[o[0]]!=o[1]&&(n[o[0]]=t.Workbook.WBProps[o[0]])}),t.Workbook.WBProps.CodeName&&(n.codeName=t.Workbook.WBProps.CodeName,delete n.CodeName)),e[e.length]=fr("workbookPr",null,n);var a=t.Workbook&&t.Workbook.Sheets||[],i=0;if(a&&a[0]&&a[0].Hidden){for(e[e.length]="<bookViews>",i=0;i!=t.SheetNames.length&&!(!a[i]||!a[i].Hidden);++i);i==t.SheetNames.length&&(i=0),e[e.length]='<workbookView firstSheet="'+i+'" activeTab="'+i+'"/>',e[e.length]="</bookViews>"}for(e[e.length]="<sheets>",i=0;i!=t.SheetNames.length;++i){var s={name:la(t.SheetNames[i].slice(0,31))};if(s.sheetId=""+(i+1),s["r:id"]="rId"+(i+1),a[i])switch(a[i].Hidden){case 1:s.state="hidden";break;case 2:s.state="veryHidden";break}e[e.length]=fr("sheet",null,s)}return e[e.length]="</sheets>",r&&(e[e.length]="<definedNames>",t.Workbook&&t.Workbook.Names&&t.Workbook.Names.forEach(function(o){var u={name:o.Name};o.Comment&&(u.comment=o.Comment),o.Sheet!=null&&(u.localSheetId=""+o.Sheet),o.Hidden&&(u.hidden="1"),o.Ref&&(e[e.length]=fr("definedName",la(o.Ref),u))}),e[e.length]="</definedNames>"),e.length>2&&(e[e.length]="</workbook>",e[1]=e[1].replace("/>",">")),e.join("")}l(Ppe,"write_wb_xml");function lxt(t,e){var r={};return r.Hidden=t.read_shift(4),r.iTabID=t.read_shift(4),r.strRelID=BB(t),r.name=So(t),r}l(lxt,"parse_BrtBundleSh");function cxt(t,e){return e||(e=Gt(127)),e.write_shift(4,t.Hidden),e.write_shift(4,t.iTabID),zB(t.strRelID,e),_s(t.name.slice(0,31),e),e.length>e.l?e.slice(0,e.l):e}l(cxt,"write_BrtBundleSh");function uxt(t,e){var r={},n=t.read_shift(4);r.defaultThemeVersion=t.read_shift(4);var a=e>8?So(t):"";return a.length>0&&(r.CodeName=a),r.autoCompressPictures=!!(n&65536),r.backupFile=!!(n&64),r.checkCompatibility=!!(n&4096),r.date1904=!!(n&1),r.filterPrivacy=!!(n&8),r.hidePivotFieldList=!!(n&1024),r.promptedSolutions=!!(n&16),r.publishItems=!!(n&2048),r.refreshAllConnections=!!(n&262144),r.saveExternalLinkValues=!!(n&128),r.showBorderUnselectedTables=!!(n&4),r.showInkAnnotation=!!(n&32),r.showObjects=["all","placeholders","none"][n>>13&3],r.showPivotChartFilter=!!(n&32768),r.updateLinks=["userSet","never","always"][n>>8&3],r}l(uxt,"parse_BrtWbProp");function hxt(t,e){e||(e=Gt(72));var r=0;return t&&t.filterPrivacy&&(r|=8),e.write_shift(4,r),e.write_shift(4,0),L0e(t&&t.CodeName||"ThisWorkbook",e),e.slice(0,e.l)}l(hxt,"write_BrtWbProp");function dxt(t,e,r){var n=t.l+e;t.l+=4,t.l+=1;var a=t.read_shift(4),i=a1t(t),s=E2t(t,0,r),o=FB(t);t.l=n;var u={Name:i,Ptg:s};return a<268435455&&(u.Sheet=a),o&&(u.Comment=o),u}l(dxt,"parse_BrtName");function fxt(t,e){tr(t,143);for(var r=0;r!=e.SheetNames.length;++r){var n=e.Workbook&&e.Workbook.Sheets&&e.Workbook.Sheets[r]&&e.Workbook.Sheets[r].Hidden||0,a={Hidden:n,iTabID:r+1,strRelID:"rId"+(r+1),name:e.SheetNames[r]};tr(t,156,cxt(a))}tr(t,144)}l(fxt,"write_BUNDLESHS");function pxt(t,e){e||(e=Gt(127));for(var r=0;r!=4;++r)e.write_shift(4,0);return _s("SheetJS",e),_s(NA.version,e),_s(NA.version,e),_s("7262",e),e.length>e.l?e.slice(0,e.l):e}l(pxt,"write_BrtFileVersion");function gxt(t,e){e||(e=Gt(29)),e.write_shift(-4,0),e.write_shift(-4,460),e.write_shift(4,28800),e.write_shift(4,17600),e.write_shift(4,500),e.write_shift(4,t),e.write_shift(4,t);var r=120;return e.write_shift(1,r),e.length>e.l?e.slice(0,e.l):e}l(gxt,"write_BrtBookView");function mxt(t,e){if(!(!e.Workbook||!e.Workbook.Sheets)){for(var r=e.Workbook.Sheets,n=0,a=-1,i=-1;n<r.length;++n)!r[n]||!r[n].Hidden&&a==-1?a=n:r[n].Hidden==1&&i==-1&&(i=n);i>a||(tr(t,135),tr(t,158,gxt(a)),tr(t,136))}}l(mxt,"write_BOOKVIEWS");function yxt(t,e){var r=Fl();return tr(r,131),tr(r,128,pxt()),tr(r,153,hxt(t.Workbook&&t.Workbook.WBProps||null)),mxt(r,t),fxt(r,t),tr(r,132),r.end()}l(yxt,"write_wb_bin");function vxt(t,e,r){return(e.slice(-4)===".bin"?yxt:Ppe)(t)}l(vxt,"write_wb");function bxt(t,e,r,n,a){return(e.slice(-4)===".bin"?txt:Lpe)(t,r,n,a)}l(bxt,"write_ws");function xxt(t,e,r){return(e.slice(-4)===".bin"?Fyt:dpe)(t,r)}l(xxt,"write_sty");function wxt(t,e,r){return(e.slice(-4)===".bin"?hyt:ope)(t,r)}l(wxt,"write_sst");function Txt(t,e,r){return(e.slice(-4)===".bin"?evt:vpe)(t)}l(Txt,"write_cmnt");function Ext(t){return(t.slice(-4)===".bin"?Yyt:mpe)()}l(Ext,"write_xlmeta");function Cxt(t,e){var r=[];return t.Props&&r.push(x1t(t.Props,e)),t.Custprops&&r.push(w1t(t.Props,t.Custprops)),r.join("")}l(Cxt,"write_props_xlml");function Sxt(){return""}l(Sxt,"write_wb_xlml");function _xt(t,e){var r=['<Style ss:ID="Default" ss:Name="Normal"><NumberFormat/></Style>'];return e.cellXfs.forEach(function(n,a){var i=[];i.push(fr("NumberFormat",null,{"ss:Format":la(gi[n.numFmtId])}));var s={"ss:ID":"s"+(21+a)};r.push(fr("Style",i.join(""),s))}),fr("Styles",r.join(""))}l(_xt,"write_sty_xlml");function Rpe(t){return fr("NamedRange",null,{"ss:Name":t.Name,"ss:RefersTo":"="+UB(t.Ref,{r:0,c:0})})}l(Rpe,"write_name_xlml");function kxt(t){if(!((t||{}).Workbook||{}).Names)return"";for(var e=t.Workbook.Names,r=[],n=0;n<e.length;++n){var a=e[n];a.Sheet==null&&(a.Name.match(/^_xlfn\./)||r.push(Rpe(a)))}return fr("Names",r.join(""))}l(kxt,"write_names_xlml");function Axt(t,e,r,n){if(!t||!((n||{}).Workbook||{}).Names)return"";for(var a=n.Workbook.Names,i=[],s=0;s<a.length;++s){var o=a[s];o.Sheet==r&&(o.Name.match(/^_xlfn\./)||i.push(Rpe(o)))}return i.join("")}l(Axt,"write_ws_xlml_names");function Nxt(t,e,r,n){if(!t)return"";var a=[];if(t["!margins"]&&(a.push("<PageSetup>"),t["!margins"].header&&a.push(fr("Header",null,{"x:Margin":t["!margins"].header})),t["!margins"].footer&&a.push(fr("Footer",null,{"x:Margin":t["!margins"].footer})),a.push(fr("PageMargins",null,{"x:Bottom":t["!margins"].bottom||"0.75","x:Left":t["!margins"].left||"0.7","x:Right":t["!margins"].right||"0.7","x:Top":t["!margins"].top||"0.75"})),a.push("</PageSetup>")),n&&n.Workbook&&n.Workbook.Sheets&&n.Workbook.Sheets[r])if(n.Workbook.Sheets[r].Hidden)a.push(fr("Visible",n.Workbook.Sheets[r].Hidden==1?"SheetHidden":"SheetVeryHidden",{}));else{for(var i=0;i<r&&!(n.Workbook.Sheets[i]&&!n.Workbook.Sheets[i].Hidden);++i);i==r&&a.push("<Selected/>")}return((((n||{}).Workbook||{}).Views||[])[0]||{}).RTL&&a.push("<DisplayRightToLeft/>"),t["!protect"]&&(a.push(Zs("ProtectContents","True")),t["!protect"].objects&&a.push(Zs("ProtectObjects","True")),t["!protect"].scenarios&&a.push(Zs("ProtectScenarios","True")),t["!protect"].selectLockedCells!=null&&!t["!protect"].selectLockedCells?a.push(Zs("EnableSelection","NoSelection")):t["!protect"].selectUnlockedCells!=null&&!t["!protect"].selectUnlockedCells&&a.push(Zs("EnableSelection","UnlockedCells")),[["formatCells","AllowFormatCells"],["formatColumns","AllowSizeCols"],["formatRows","AllowSizeRows"],["insertColumns","AllowInsertCols"],["insertRows","AllowInsertRows"],["insertHyperlinks","AllowInsertHyperlinks"],["deleteColumns","AllowDeleteCols"],["deleteRows","AllowDeleteRows"],["sort","AllowSort"],["autoFilter","AllowFilter"],["pivotTables","AllowUsePivotTables"]].forEach(function(s){t["!protect"][s[0]]&&a.push("<"+s[1]+"/>")})),a.length==0?"":fr("WorksheetOptions",a.join(""),{xmlns:uc.x})}l(Nxt,"write_ws_xlml_wsopts");function Ixt(t){return t.map(function(e){var r=Pmt(e.t||""),n=fr("ss:Data",r,{xmlns:"http://www.w3.org/TR/REC-html40"});return fr("Comment",n,{"ss:Author":e.a})}).join("")}l(Ixt,"write_ws_xlml_comment");function Lxt(t,e,r,n,a,i,s){if(!t||t.v==null&&t.f==null)return"";var o={};if(t.f&&(o["ss:Formula"]="="+la(UB(t.f,s))),t.F&&t.F.slice(0,e.length)==e){var u=Ss(t.F.slice(e.length+1));o["ss:ArrayRange"]="RC:R"+(u.r==s.r?"":"["+(u.r-s.r)+"]")+"C"+(u.c==s.c?"":"["+(u.c-s.c)+"]")}if(t.l&&t.l.Target&&(o["ss:HRef"]=la(t.l.Target),t.l.Tooltip&&(o["x:HRefScreenTip"]=la(t.l.Tooltip))),r["!merges"])for(var h=r["!merges"],d=0;d!=h.length;++d)h[d].s.c!=s.c||h[d].s.r!=s.r||(h[d].e.c>h[d].s.c&&(o["ss:MergeAcross"]=h[d].e.c-h[d].s.c),h[d].e.r>h[d].s.r&&(o["ss:MergeDown"]=h[d].e.r-h[d].s.r));var f="",p="";switch(t.t){case"z":if(!n.sheetStubs)return"";break;case"n":f="Number",p=String(t.v);break;case"b":f="Boolean",p=t.v?"1":"0";break;case"e":f="Error",p=d4[t.v];break;case"d":f="DateTime",p=new Date(t.v).toISOString(),t.z==null&&(t.z=t.z||gi[14]);break;case"s":f="String",p=Mmt(t.v||"");break}var g=B0(n.cellXfs,t,n);o["ss:StyleID"]="s"+(21+g),o["ss:Index"]=s.c+1;var m=t.v!=null?p:"",y=t.t=="z"?"":'<Data ss:Type="'+f+'">'+m+"</Data>";return(t.c||[]).length>0&&(y+=Ixt(t.c)),fr("Cell",y,o)}l(Lxt,"write_ws_xlml_cell");function $xt(t,e){var r='<Row ss:Index="'+(t+1)+'"';return e&&(e.hpt&&!e.hpx&&(e.hpx=hpe(e.hpt)),e.hpx&&(r+=' ss:AutoFitHeight="0" ss:Height="'+e.hpx+'"'),e.hidden&&(r+=' ss:Hidden="1"')),r+">"}l($xt,"write_ws_xlml_row");function Mxt(t,e,r,n){if(!t["!ref"])return"";var a=Ba(t["!ref"]),i=t["!merges"]||[],s=0,o=[];t["!cols"]&&t["!cols"].forEach(function(v,b){GB(v);var w=!!v.width,x=r8(b,v),T={"ss:Index":b+1};w&&(T["ss:Width"]=ZA(x.width)),v.hidden&&(T["ss:Hidden"]="1"),o.push(fr("Column",null,T))});for(var u=Array.isArray(t),h=a.s.r;h<=a.e.r;++h){for(var d=[$xt(h,(t["!rows"]||[])[h])],f=a.s.c;f<=a.e.c;++f){var p=!1;for(s=0;s!=i.length;++s)if(!(i[s].s.c>f)&&!(i[s].s.r>h)&&!(i[s].e.c<f)&&!(i[s].e.r<h)){(i[s].s.c!=f||i[s].s.r!=h)&&(p=!0);break}if(!p){var g={r:h,c:f},m=ca(g),y=u?(t[h]||[])[f]:t[m];d.push(Lxt(y,m,t,e,r,n,g))}}d.push("</Row>"),d.length>2&&o.push(d.join(""))}return o.join("")}l(Mxt,"write_ws_xlml_table");function Pxt(t,e,r){var n=[],a=r.SheetNames[t],i=r.Sheets[a],s=i?Axt(i,e,t,r):"";return s.length>0&&n.push("<Names>"+s+"</Names>"),s=i?Mxt(i,e,t,r):"",s.length>0&&n.push("<Table>"+s+"</Table>"),n.push(Nxt(i,e,t,r)),n.join("")}l(Pxt,"write_ws_xlml");function Rxt(t,e){e||(e={}),t.SSF||(t.SSF=Dl(gi)),t.SSF&&(BA(),FA(t.SSF),e.revssf=zA(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF,e.cellXfs=[],B0(e.cellXfs,{},{revssf:{General:0}}));var r=[];r.push(Cxt(t,e)),r.push(Sxt()),r.push(""),r.push("");for(var n=0;n<t.SheetNames.length;++n)r.push(fr("Worksheet",Pxt(n,e,t),{"ss:Name":la(t.SheetNames[n])}));return r[2]=_xt(t,e),r[3]=kxt(t),Gi+fr("Workbook",r.join(""),{xmlns:uc.ss,"xmlns:o":uc.o,"xmlns:x":uc.x,"xmlns:ss":uc.ss,"xmlns:dt":uc.dt,"xmlns:html":uc.html})}l(Rxt,"write_xlml");var XB={SI:"e0859ff2f94f6810ab9108002b27b3d9",DSI:"02d5cdd59c2e1b10939708002b2cf9ae",UDI:"05d5cdd59c2e1b10939708002b2cf9ae"};function Oxt(t,e){var r=[],n=[],a=[],i=0,s,o=Jfe(O0e,"n"),u=Jfe(D0e,"n");if(t.Props)for(s=Xs(t.Props),i=0;i<s.length;++i)(Object.prototype.hasOwnProperty.call(o,s[i])?r:Object.prototype.hasOwnProperty.call(u,s[i])?n:a).push([s[i],t.Props[s[i]]]);if(t.Custprops)for(s=Xs(t.Custprops),i=0;i<s.length;++i)Object.prototype.hasOwnProperty.call(t.Props||{},s[i])||(Object.prototype.hasOwnProperty.call(o,s[i])?r:Object.prototype.hasOwnProperty.call(u,s[i])?n:a).push([s[i],t.Custprops[s[i]]]);var h=[];for(i=0;i<a.length;++i)K0e.indexOf(a[i][0])>-1||G0e.indexOf(a[i][0])>-1||a[i][1]!=null&&h.push(a[i]);n.length&&ma.utils.cfb_add(e,"/SummaryInformation",Z0e(n,XB.SI,u,D0e)),(r.length||h.length)&&ma.utils.cfb_add(e,"/DocumentSummaryInformation",Z0e(r,XB.DSI,o,O0e,h.length?h:null,XB.UDI))}l(Oxt,"write_xls_props");function Dxt(t,e){var r=e||{},n=ma.utils.cfb_new({root:"R"}),a="/Workbook";switch(r.bookType||"xls"){case"xls":r.bookType="biff8";case"xla":r.bookType||(r.bookType="xla");case"biff8":a="/Workbook",r.biff=8;break;case"biff5":a="/Book",r.biff=5;break;default:throw new Error("invalid type "+r.bookType+" for XLS CFB")}return ma.utils.cfb_add(n,a,Ope(t,r)),r.biff==8&&(t.Props||t.Custprops)&&Oxt(t,n),r.biff==8&&t.vbaraw&&tvt(n,ma.read(t.vbaraw,{type:typeof t.vbaraw=="string"?"binary":"buffer"})),n}l(Dxt,"write_xlscfb");var Fxt={0:{f:H2t},1:{f:K2t},2:{f:gbt},3:{f:nbt},4:{f:J2t},5:{f:hbt},6:{f:xbt},7:{f:obt},8:{f:kbt},9:{f:_bt},10:{f:Cbt},11:{f:Sbt},12:{f:Z2t},13:{f:ybt},14:{f:ibt},15:{f:tbt},16:{f:fbt},17:{f:Tbt},18:{f:cbt},19:{f:DB},20:{},21:{},22:{},23:{},24:{},25:{},26:{},27:{},28:{},29:{},30:{},31:{},32:{},33:{},34:{},35:{T:1},36:{T:-1},37:{T:1},38:{T:-1},39:{f:dxt},40:{},42:{},43:{f:xyt},44:{f:vyt},45:{f:Eyt},46:{f:Syt},47:{f:Cyt},48:{},49:{f:Zmt},50:{},51:{f:Hyt},52:{T:1},53:{T:-1},54:{T:1},55:{T:-1},56:{T:1},57:{T:-1},58:{},59:{},60:{f:Q1t},62:{f:bbt},63:{f:Uyt},64:{f:Vbt},65:{},66:{},67:{},68:{},69:{},70:{},128:{},129:{T:1},130:{T:-1},131:{T:1,f:_h,p:0},132:{T:-1},133:{T:1},134:{T:-1},135:{T:1},136:{T:-1},137:{T:1,f:Bbt},138:{T:-1},139:{T:1},140:{T:-1},141:{T:1},142:{T:-1},143:{T:1},144:{T:-1},145:{T:1},146:{T:-1},147:{f:U2t},148:{f:G2t,p:16},151:{f:Mbt},152:{},153:{f:uxt},154:{},155:{},156:{f:lxt},157:{},158:{},159:{T:1,f:lyt},160:{T:-1},161:{T:1,f:Xg},162:{T:-1},163:{T:1},164:{T:-1},165:{T:1},166:{T:-1},167:{},168:{},169:{},170:{},171:{},172:{T:1},173:{T:-1},174:{},175:{},176:{f:Abt},177:{T:1},178:{T:-1},179:{T:1},180:{T:-1},181:{T:1},182:{T:-1},183:{T:1},184:{T:-1},185:{T:1},186:{T:-1},187:{T:1},188:{T:-1},189:{T:1},190:{T:-1},191:{T:1},192:{T:-1},193:{T:1},194:{T:-1},195:{T:1},196:{T:-1},197:{T:1},198:{T:-1},199:{T:1},200:{T:-1},201:{T:1},202:{T:-1},203:{T:1},204:{T:-1},205:{T:1},206:{T:-1},207:{T:1},208:{T:-1},209:{T:1},210:{T:-1},211:{T:1},212:{T:-1},213:{T:1},214:{T:-1},215:{T:1},216:{T:-1},217:{T:1},218:{T:-1},219:{T:1},220:{T:-1},221:{T:1},222:{T:-1},223:{T:1},224:{T:-1},225:{T:1},226:{T:-1},227:{T:1},228:{T:-1},229:{T:1},230:{T:-1},231:{T:1},232:{T:-1},233:{T:1},234:{T:-1},235:{T:1},236:{T:-1},237:{T:1},238:{T:-1},239:{T:1},240:{T:-1},241:{T:1},242:{T:-1},243:{T:1},244:{T:-1},245:{T:1},246:{T:-1},247:{T:1},248:{T:-1},249:{T:1},250:{T:-1},251:{T:1},252:{T:-1},253:{T:1},254:{T:-1},255:{T:1},256:{T:-1},257:{T:1},258:{T:-1},259:{T:1},260:{T:-1},261:{T:1},262:{T:-1},263:{T:1},264:{T:-1},265:{T:1},266:{T:-1},267:{T:1},268:{T:-1},269:{T:1},270:{T:-1},271:{T:1},272:{T:-1},273:{T:1},274:{T:-1},275:{T:1},276:{T:-1},277:{},278:{T:1},279:{T:-1},280:{T:1},281:{T:-1},282:{T:1},283:{T:1},284:{T:-1},285:{T:1},286:{T:-1},287:{T:1},288:{T:-1},289:{T:1},290:{T:-1},291:{T:1},292:{T:-1},293:{T:1},294:{T:-1},295:{T:1},296:{T:-1},297:{T:1},298:{T:-1},299:{T:1},300:{T:-1},301:{T:1},302:{T:-1},303:{T:1},304:{T:-1},305:{T:1},306:{T:-1},307:{T:1},308:{T:-1},309:{T:1},310:{T:-1},311:{T:1},312:{T:-1},313:{T:-1},314:{T:1},315:{T:-1},316:{T:1},317:{T:-1},318:{T:1},319:{T:-1},320:{T:1},321:{T:-1},322:{T:1},323:{T:-1},324:{T:1},325:{T:-1},326:{T:1},327:{T:-1},328:{T:1},329:{T:-1},330:{T:1},331:{T:-1},332:{T:1},333:{T:-1},334:{T:1},335:{f:Byt},336:{T:-1},337:{f:Gyt,T:1},338:{T:-1},339:{T:1},340:{T:-1},341:{T:1},342:{T:-1},343:{T:1},344:{T:-1},345:{T:1},346:{T:-1},347:{T:1},348:{T:-1},349:{T:1},350:{T:-1},351:{},352:{},353:{T:1},354:{T:-1},355:{f:BB},357:{},358:{},359:{},360:{T:1},361:{},362:{f:Y1t},363:{},364:{},366:{},367:{},368:{},369:{},370:{},371:{},372:{T:1},373:{T:-1},374:{T:1},375:{T:-1},376:{T:1},377:{T:-1},378:{T:1},379:{T:-1},380:{T:1},381:{T:-1},382:{T:1},383:{T:-1},384:{T:1},385:{T:-1},386:{T:1},387:{T:-1},388:{T:1},389:{T:-1},390:{T:1},391:{T:-1},392:{T:1},393:{T:-1},394:{T:1},395:{T:-1},396:{},397:{},398:{},399:{},400:{},401:{T:1},403:{},404:{},405:{},406:{},407:{},408:{},409:{},410:{},411:{},412:{},413:{},414:{},415:{},416:{},417:{},418:{},419:{},420:{},421:{},422:{T:1},423:{T:1},424:{T:-1},425:{T:-1},426:{f:Pbt},427:{f:Rbt},428:{},429:{T:1},430:{T:-1},431:{T:1},432:{T:-1},433:{T:1},434:{T:-1},435:{T:1},436:{T:-1},437:{T:1},438:{T:-1},439:{T:1},440:{T:-1},441:{T:1},442:{T:-1},443:{T:1},444:{T:-1},445:{T:1},446:{T:-1},447:{T:1},448:{T:-1},449:{T:1},450:{T:-1},451:{T:1},452:{T:-1},453:{T:1},454:{T:-1},455:{T:1},456:{T:-1},457:{T:1},458:{T:-1},459:{T:1},460:{T:-1},461:{T:1},462:{T:-1},463:{T:1},464:{T:-1},465:{T:1},466:{T:-1},467:{T:1},468:{T:-1},469:{T:1},470:{T:-1},471:{},472:{},473:{T:1},474:{T:-1},475:{},476:{f:Dbt},477:{},478:{},479:{T:1},480:{T:-1},481:{T:1},482:{T:-1},483:{T:1},484:{T:-1},485:{f:Y2t},486:{T:1},487:{T:-1},488:{T:1},489:{T:-1},490:{T:1},491:{T:-1},492:{T:1},493:{T:-1},494:{f:Lbt},495:{T:1},496:{T:-1},497:{T:1},498:{T:-1},499:{},500:{T:1},501:{T:-1},502:{T:1},503:{T:-1},504:{},505:{T:1},506:{T:-1},507:{},508:{T:1},509:{T:-1},510:{T:1},511:{T:-1},512:{},513:{},514:{T:1},515:{T:-1},516:{T:1},517:{T:-1},518:{T:1},519:{T:-1},520:{T:1},521:{T:-1},522:{},523:{},524:{},525:{},526:{},527:{},528:{T:1},529:{T:-1},530:{T:1},531:{T:-1},532:{T:1},533:{T:-1},534:{},535:{},536:{},537:{},538:{T:1},539:{T:-1},540:{T:1},541:{T:-1},542:{T:1},548:{},549:{},550:{f:BB},551:{},552:{},553:{},554:{T:1},555:{T:-1},556:{T:1},557:{T:-1},558:{T:1},559:{T:-1},560:{T:1},561:{T:-1},562:{},564:{},565:{T:1},566:{T:-1},569:{T:1},570:{T:-1},572:{},573:{T:1},574:{T:-1},577:{},578:{},579:{},580:{},581:{},582:{},583:{},584:{},585:{},586:{},587:{},588:{T:-1},589:{},590:{T:1},591:{T:-1},592:{T:1},593:{T:-1},594:{T:1},595:{T:-1},596:{},597:{T:1},598:{T:-1},599:{T:1},600:{T:-1},601:{T:1},602:{T:-1},603:{T:1},604:{T:-1},605:{T:1},606:{T:-1},607:{},608:{T:1},609:{T:-1},610:{},611:{T:1},612:{T:-1},613:{T:1},614:{T:-1},615:{T:1},616:{T:-1},617:{T:1},618:{T:-1},619:{T:1},620:{T:-1},625:{},626:{T:1},627:{T:-1},628:{T:1},629:{T:-1},630:{T:1},631:{T:-1},632:{f:Qyt},633:{T:1},634:{T:-1},635:{T:1,f:Xyt},636:{T:-1},637:{f:t1t},638:{T:1},639:{},640:{T:-1},641:{T:1},642:{T:-1},643:{T:1},644:{},645:{T:-1},646:{T:1},648:{T:1},649:{},650:{T:-1},651:{f:rxt},652:{},653:{T:1},654:{T:-1},655:{T:1},656:{T:-1},657:{T:1},658:{T:-1},659:{},660:{T:1},661:{},662:{T:-1},663:{},664:{T:1},665:{},666:{T:-1},667:{},668:{},669:{},671:{T:1},672:{T:-1},673:{T:1},674:{T:-1},675:{},676:{},677:{},678:{},679:{},680:{},681:{},1024:{},1025:{},1026:{T:1},1027:{T:-1},1028:{T:1},1029:{T:-1},1030:{},1031:{T:1},1032:{T:-1},1033:{T:1},1034:{T:-1},1035:{},1036:{},1037:{},1038:{T:1},1039:{T:-1},1040:{},1041:{T:1},1042:{T:-1},1043:{},1044:{},1045:{},1046:{T:1},1047:{T:-1},1048:{T:1},1049:{T:-1},1050:{},1051:{T:1},1052:{T:1},1053:{f:Gbt},1054:{T:1},1055:{},1056:{T:1},1057:{T:-1},1058:{T:1},1059:{T:-1},1061:{},1062:{T:1},1063:{T:-1},1064:{T:1},1065:{T:-1},1066:{T:1},1067:{T:-1},1068:{T:1},1069:{T:-1},1070:{T:1},1071:{T:-1},1072:{T:1},1073:{T:-1},1075:{T:1},1076:{T:-1},1077:{T:1},1078:{T:-1},1079:{T:1},1080:{T:-1},1081:{T:1},1082:{T:-1},1083:{T:1},1084:{T:-1},1085:{},1086:{T:1},1087:{T:-1},1088:{T:1},1089:{T:-1},1090:{T:1},1091:{T:-1},1092:{T:1},1093:{T:-1},1094:{T:1},1095:{T:-1},1096:{},1097:{T:1},1098:{},1099:{T:-1},1100:{T:1},1101:{T:-1},1102:{},1103:{},1104:{},1105:{},1111:{},1112:{},1113:{T:1},1114:{T:-1},1115:{T:1},1116:{T:-1},1117:{},1118:{T:1},1119:{T:-1},1120:{T:1},1121:{T:-1},1122:{T:1},1123:{T:-1},1124:{T:1},1125:{T:-1},1126:{},1128:{T:1},1129:{T:-1},1130:{},1131:{T:1},1132:{T:-1},1133:{T:1},1134:{T:-1},1135:{T:1},1136:{T:-1},1137:{T:1},1138:{T:-1},1139:{T:1},1140:{T:-1},1141:{},1142:{T:1},1143:{T:-1},1144:{T:1},1145:{T:-1},1146:{},1147:{T:1},1148:{T:-1},1149:{T:1},1150:{T:-1},1152:{T:1},1153:{T:-1},1154:{T:-1},1155:{T:-1},1156:{T:-1},1157:{T:1},1158:{T:-1},1159:{T:1},1160:{T:-1},1161:{T:1},1162:{T:-1},1163:{T:1},1164:{T:-1},1165:{T:1},1166:{T:-1},1167:{T:1},1168:{T:-1},1169:{T:1},1170:{T:-1},1171:{},1172:{T:1},1173:{T:-1},1177:{},1178:{T:1},1180:{},1181:{},1182:{},2048:{T:1},2049:{T:-1},2050:{},2051:{T:1},2052:{T:-1},2053:{},2054:{},2055:{T:1},2056:{T:-1},2057:{T:1},2058:{T:-1},2060:{},2067:{},2068:{T:1},2069:{T:-1},2070:{},2071:{},2072:{T:1},2073:{T:-1},2075:{},2076:{},2077:{T:1},2078:{T:-1},2079:{},2080:{T:1},2081:{T:-1},2082:{},2083:{T:1},2084:{T:-1},2085:{T:1},2086:{T:-1},2087:{T:1},2088:{T:-1},2089:{T:1},2090:{T:-1},2091:{},2092:{},2093:{T:1},2094:{T:-1},2095:{},2096:{T:1},2097:{T:-1},2098:{T:1},2099:{T:-1},2100:{T:1},2101:{T:-1},2102:{},2103:{T:1},2104:{T:-1},2105:{},2106:{T:1},2107:{T:-1},2108:{},2109:{T:1},2110:{T:-1},2111:{T:1},2112:{T:-1},2113:{T:1},2114:{T:-1},2115:{},2116:{},2117:{},2118:{T:1},2119:{T:-1},2120:{},2121:{T:1},2122:{T:-1},2123:{T:1},2124:{T:-1},2125:{},2126:{T:1},2127:{T:-1},2128:{},2129:{T:1},2130:{T:-1},2131:{T:1},2132:{T:-1},2133:{T:1},2134:{},2135:{},2136:{},2137:{T:1},2138:{T:-1},2139:{T:1},2140:{T:-1},2141:{},3072:{},3073:{},4096:{T:1},4097:{T:-1},5002:{T:1},5003:{T:-1},5081:{T:1},5082:{T:-1},5083:{},5084:{T:1},5085:{T:-1},5086:{T:1},5087:{T:-1},5088:{},5089:{},5090:{},5092:{T:1},5093:{T:-1},5094:{},5095:{T:1},5096:{T:-1},5097:{},5099:{},65535:{n:""}};function pr(t,e,r,n){var a=e;if(!isNaN(a)){var i=n||(r||[]).length||0,s=t.next(4);s.write_shift(2,a),s.write_shift(2,i),i>0&&MB(r)&&t.push(r)}}l(pr,"write_biff_rec");function Bxt(t,e,r,n){var a=(r||[]).length||0;if(a<=8224)return pr(t,e,r,a);var i=e;if(!isNaN(i)){for(var s=r.parts||[],o=0,u=0,h=0;h+(s[o]||8224)<=8224;)h+=s[o]||8224,o++;var d=t.next(4);for(d.write_shift(2,i),d.write_shift(2,h),t.push(r.slice(u,u+h)),u+=h;u<a;){for(d=t.next(4),d.write_shift(2,60),h=0;h+(s[o]||8224)<=8224;)h+=s[o]||8224,o++;d.write_shift(2,h),t.push(r.slice(u,u+h)),u+=h}}}l(Bxt,"write_biff_continue");function m4(t,e,r){return t||(t=Gt(7)),t.write_shift(2,e),t.write_shift(2,r),t.write_shift(2,0),t.write_shift(1,0),t}l(m4,"write_BIFF2Cell");function zxt(t,e,r,n){var a=Gt(9);return m4(a,t,e),J0e(r,n||"b",a),a}l(zxt,"write_BIFF2BERR");function Hxt(t,e,r){var n=Gt(8+2*r.length);return m4(n,t,e),n.write_shift(1,r.length),n.write_shift(r.length,r,"sbcs"),n.l<n.length?n.slice(0,n.l):n}l(Hxt,"write_BIFF2LABEL");function Wxt(t,e,r,n){if(e.v!=null)switch(e.t){case"d":case"n":var a=e.t=="d"?Ol(Uo(e.v)):e.v;a==(a|0)&&a>=0&&a<65536?pr(t,2,ryt(r,n,a)):pr(t,3,tyt(r,n,a));return;case"b":case"e":pr(t,5,zxt(r,n,e.v,e.t));return;case"s":case"str":pr(t,4,Hxt(r,n,(e.v||"").slice(0,255)));return}pr(t,1,m4(null,r,n))}l(Wxt,"write_ws_biff2_cell");function Vxt(t,e,r,n){var a=Array.isArray(e),i=Ba(e["!ref"]||"A1"),s,o="",u=[];if(i.e.c>255||i.e.r>16383){if(n.WTF)throw new Error("Range "+(e["!ref"]||"A1")+" exceeds format limit A1:IV16384");i.e.c=Math.min(i.e.c,255),i.e.r=Math.min(i.e.c,16383),s=qi(i)}for(var h=i.s.r;h<=i.e.r;++h){o=Qs(h);for(var d=i.s.c;d<=i.e.c;++d){h===i.s.r&&(u[d]=Co(d)),s=u[d]+o;var f=a?(e[h]||[])[d]:e[s];f&&Wxt(t,f,h,d)}}}l(Vxt,"write_ws_biff2");function Gxt(t,e){for(var r=e||{},n=Fl(),a=0,i=0;i<t.SheetNames.length;++i)t.SheetNames[i]==r.sheet&&(a=i);if(a==0&&r.sheet&&t.SheetNames[0]!=r.sheet)throw new Error("Sheet not found: "+r.sheet);return pr(n,r.biff==4?1033:r.biff==3?521:9,WB(t,16,r)),Vxt(n,t.Sheets[t.SheetNames[a]],a,r),pr(n,10),n.end()}l(Gxt,"write_biff2_buf");function qxt(t,e,r){pr(t,49,F1t({sz:12,name:"Arial"},r))}l(qxt,"write_FONTS_biff8");function Yxt(t,e,r){e&&[[5,8],[23,26],[41,44],[50,392]].forEach(function(n){for(var a=n[0];a<=n[1];++a)e[a]!=null&&pr(t,1054,H1t(a,e[a],r))})}l(Yxt,"write_FMTS_biff8");function Uxt(t,e){var r=Gt(19);r.write_shift(4,2151),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,1),r.write_shift(4,0),pr(t,2151,r),r=Gt(39),r.write_shift(4,2152),r.write_shift(4,0),r.write_shift(4,0),r.write_shift(2,3),r.write_shift(1,0),r.write_shift(4,0),r.write_shift(2,1),r.write_shift(4,4),r.write_shift(2,0),npe(Ba(e["!ref"]||"A1"),r),r.write_shift(4,4),pr(t,2152,r)}l(Uxt,"write_FEAT");function jxt(t,e){for(var r=0;r<16;++r)pr(t,224,ape({numFmtId:0,style:!0},0,e));e.cellXfs.forEach(function(n){pr(t,224,ape(n,0,e))})}l(jxt,"write_CELLXFS_biff8");function Kxt(t,e){for(var r=0;r<e["!links"].length;++r){var n=e["!links"][r];pr(t,440,K1t(n)),n[1].Tooltip&&pr(t,2048,X1t(n))}delete e["!links"]}l(Kxt,"write_ws_biff8_hlinks");function Xxt(t,e){if(e){var r=0;e.forEach(function(n,a){++r<=256&&n&&pr(t,125,J1t(r8(a,n),a))})}}l(Xxt,"write_ws_cols_biff8");function Zxt(t,e,r,n,a){var i=16+B0(a.cellXfs,e,a);if(e.v==null&&!e.bf){pr(t,513,Jg(r,n,i));return}if(e.bf)pr(t,6,w2t(e,r,n,a,i));else switch(e.t){case"d":case"n":var s=e.t=="d"?Ol(Uo(e.v)):e.v;pr(t,515,q1t(r,n,s,i));break;case"b":case"e":pr(t,517,G1t(r,n,e.v,i,a,e.t));break;case"s":case"str":if(a.bookSST){var o=KB(a.Strings,e.v,a.revStrings);pr(t,253,B1t(r,n,o,i))}else pr(t,516,z1t(r,n,(e.v||"").slice(0,255),i,a));break;default:pr(t,513,Jg(r,n,i))}}l(Zxt,"write_ws_biff8_cell");function Qxt(t,e,r){var n=Fl(),a=r.SheetNames[t],i=r.Sheets[a]||{},s=(r||{}).Workbook||{},o=(s.Sheets||[])[t]||{},u=Array.isArray(i),h=e.biff==8,d,f="",p=[],g=Ba(i["!ref"]||"A1"),m=h?65536:16384;if(g.e.c>255||g.e.r>=m){if(e.WTF)throw new Error("Range "+(i["!ref"]||"A1")+" exceeds format limit A1:IV16384");g.e.c=Math.min(g.e.c,255),g.e.r=Math.min(g.e.c,m-1)}pr(n,2057,WB(r,16,e)),pr(n,13,Uc(1)),pr(n,12,Uc(100)),pr(n,15,jo(!0)),pr(n,17,jo(!1)),pr(n,16,Zg(.001)),pr(n,95,jo(!0)),pr(n,42,jo(!1)),pr(n,43,jo(!1)),pr(n,130,Uc(1)),pr(n,128,V1t()),pr(n,131,jo(!1)),pr(n,132,jo(!1)),h&&Xxt(n,i["!cols"]),pr(n,512,W1t(g,e)),h&&(i["!links"]=[]);for(var y=g.s.r;y<=g.e.r;++y){f=Qs(y);for(var v=g.s.c;v<=g.e.c;++v){y===g.s.r&&(p[v]=Co(v)),d=p[v]+f;var b=u?(i[y]||[])[v]:i[d];b&&(Zxt(n,b,y,v,e),h&&b.l&&i["!links"].push([d,b.l]))}}var w=o.CodeName||o.name||a;return h&&pr(n,574,D1t((s.Views||[])[0])),h&&(i["!merges"]||[]).length&&pr(n,229,j1t(i["!merges"])),h&&Kxt(n,i),pr(n,442,tpe(w)),h&&Uxt(n,i),pr(n,10),n.end()}l(Qxt,"write_ws_biff8");function Jxt(t,e,r){var n=Fl(),a=(t||{}).Workbook||{},i=a.Sheets||[],s=a.WBProps||{},o=r.biff==8,u=r.biff==5;if(pr(n,2057,WB(t,5,r)),r.bookType=="xla"&&pr(n,135),pr(n,225,o?Uc(1200):null),pr(n,193,C1t(2)),u&&pr(n,191),u&&pr(n,192),pr(n,226),pr(n,92,M1t("SheetJS",r)),pr(n,66,Uc(o?1200:1252)),o&&pr(n,353,Uc(0)),o&&pr(n,448),pr(n,317,eyt(t.SheetNames.length)),o&&t.vbaraw&&pr(n,211),o&&t.vbaraw){var h=s.CodeName||"ThisWorkbook";pr(n,442,tpe(h))}pr(n,156,Uc(17)),pr(n,25,jo(!1)),pr(n,18,jo(!1)),pr(n,19,Uc(0)),o&&pr(n,431,jo(!1)),o&&pr(n,444,Uc(0)),pr(n,61,O1t()),pr(n,64,jo(!1)),pr(n,141,Uc(0)),pr(n,34,jo(axt(t)=="true")),pr(n,14,jo(!0)),o&&pr(n,439,jo(!1)),pr(n,218,Uc(0)),qxt(n,t,r),Yxt(n,t.SSF,r),jxt(n,r),o&&pr(n,352,jo(!1));var d=n.end(),f=Fl();o&&pr(f,140,Z1t()),o&&r.Strings&&Bxt(f,252,R1t(r.Strings)),pr(f,10);var p=f.end(),g=Fl(),m=0,y=0;for(y=0;y<t.SheetNames.length;++y)m+=(o?12:11)+(o?2:1)*t.SheetNames[y].length;var v=d.length+m+p.length;for(y=0;y<t.SheetNames.length;++y){var b=i[y]||{};pr(g,133,P1t({pos:v,hs:b.Hidden||0,dt:0,name:t.SheetNames[y]},r)),v+=e[y].length}var w=g.end();if(m!=w.length)throw new Error("BS8 "+m+" != "+w.length);var x=[];return d.length&&x.push(d),w.length&&x.push(w),p.length&&x.push(p),Ks(x)}l(Jxt,"write_biff8_global");function ewt(t,e){var r=e||{},n=[];t&&!t.SSF&&(t.SSF=Dl(gi)),t&&t.SSF&&(BA(),FA(t.SSF),r.revssf=zA(t.SSF),r.revssf[t.SSF[65535]]=0,r.ssf=t.SSF),r.Strings=[],r.Strings.Count=0,r.Strings.Unique=0,JB(r),r.cellXfs=[],B0(r.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={});for(var a=0;a<t.SheetNames.length;++a)n[n.length]=Qxt(a,r,t);return n.unshift(Jxt(t,n,r)),Ks(n)}l(ewt,"write_biff8_buf");function Ope(t,e){for(var r=0;r<=t.SheetNames.length;++r){var n=t.Sheets[t.SheetNames[r]];if(!(!n||!n["!ref"])){var a=fc(n["!ref"]);a.e.c>255&&typeof console!="undefined"&&console.error&&console.error("Worksheet '"+t.SheetNames[r]+"' extends beyond column IV (255). Data may be lost.")}}var i=e||{};switch(i.biff||2){case 8:case 5:return ewt(t,e);case 4:case 3:case 2:return Gxt(t,e)}throw new Error("invalid type "+i.bookType+" for BIFF")}l(Ope,"write_biff_buf");function twt(t,e,r,n){for(var a=t["!merges"]||[],i=[],s=e.s.c;s<=e.e.c;++s){for(var o=0,u=0,h=0;h<a.length;++h)if(!(a[h].s.r>r||a[h].s.c>s)&&!(a[h].e.r<r||a[h].e.c<s)){if(a[h].s.r<r||a[h].s.c<s){o=-1;break}o=a[h].e.r-a[h].s.r+1,u=a[h].e.c-a[h].s.c+1;break}if(!(o<0)){var d=ca({r,c:s}),f=n.dense?(t[r]||[])[s]:t[d],p=f&&f.v!=null&&(f.h||$mt(f.w||(Ud(f),f.w)||""))||"",g={};o>1&&(g.rowspan=o),u>1&&(g.colspan=u),n.editable?p='<span contenteditable="true">'+p+"</span>":f&&(g["data-t"]=f&&f.t||"z",f.v!=null&&(g["data-v"]=f.v),f.z!=null&&(g["data-z"]=f.z),f.l&&(f.l.Target||"#").charAt(0)!="#"&&(p='<a href="'+f.l.Target+'">'+p+"</a>")),g.id=(n.id||"sjs")+"-"+d,i.push(fr("td",p,g))}}var m="<tr>";return m+i.join("")+"</tr>"}l(twt,"make_html_row");var rwt='<html><head><meta charset="utf-8"/><title>SheetJS Table Export</title></head><body>',nwt="</body></html>";function awt(t,e,r){var n=[];return n.join("")+"<table"+(r&&r.id?' id="'+r.id+'"':"")+">"}l(awt,"make_html_preamble");function Dpe(t,e){var r=e||{},n=r.header!=null?r.header:rwt,a=r.footer!=null?r.footer:nwt,i=[n],s=fc(t["!ref"]);r.dense=Array.isArray(t),i.push(awt(t,s,r));for(var o=s.s.r;o<=s.e.r;++o)i.push(twt(t,s,o,r));return i.push("</table>"+a),i.join("")}l(Dpe,"sheet_to_html");function Fpe(t,e,r){var n=r||{},a=0,i=0;if(n.origin!=null)if(typeof n.origin=="number")a=n.origin;else{var s=typeof n.origin=="string"?Ss(n.origin):n.origin;a=s.r,i=s.c}var o=e.getElementsByTagName("tr"),u=Math.min(n.sheetRows||1e7,o.length),h={s:{r:0,c:0},e:{r:a,c:i}};if(t["!ref"]){var d=fc(t["!ref"]);h.s.r=Math.min(h.s.r,d.s.r),h.s.c=Math.min(h.s.c,d.s.c),h.e.r=Math.max(h.e.r,d.e.r),h.e.c=Math.max(h.e.c,d.e.c),a==-1&&(h.e.r=a=d.e.r+1)}var f=[],p=0,g=t["!rows"]||(t["!rows"]=[]),m=0,y=0,v=0,b=0,w=0,x=0;for(t["!cols"]||(t["!cols"]=[]);m<o.length&&y<u;++m){var T=o[m];if(zpe(T)){if(n.display)continue;g[y]={hidden:!0}}var C=T.children;for(v=b=0;v<C.length;++v){var S=C[v];if(!(n.display&&zpe(S))){var E=S.hasAttribute("data-v")?S.getAttribute("data-v"):S.hasAttribute("v")?S.getAttribute("v"):Omt(S.innerHTML),k=S.getAttribute("data-z")||S.getAttribute("z");for(p=0;p<f.length;++p){var A=f[p];A.s.c==b+i&&A.s.r<y+a&&y+a<=A.e.r&&(b=A.e.c+1-i,p=-1)}x=+S.getAttribute("colspan")||1,((w=+S.getAttribute("rowspan")||1)>1||x>1)&&f.push({s:{r:y+a,c:b+i},e:{r:y+a+(w||1)-1,c:b+i+(x||1)-1}});var I={t:"s",v:E},L=S.getAttribute("data-t")||S.getAttribute("t")||"";E!=null&&(E.length==0?I.t=L||"z":n.raw||E.trim().length==0||L=="s"||(E==="TRUE"?I={t:"b",v:!0}:E==="FALSE"?I={t:"b",v:!1}:isNaN(Yd(E))?isNaN(n4(E).getDate())||(I={t:"d",v:Uo(E)},n.cellDates||(I={t:"n",v:Ol(I.v)}),I.z=n.dateNF||gi[14]):I={t:"n",v:Yd(E)})),I.z===void 0&&k!=null&&(I.z=k);var R="",O=S.getElementsByTagName("A");if(O&&O.length)for(var M=0;M<O.length&&!(O[M].hasAttribute("href")&&(R=O[M].getAttribute("href"),R.charAt(0)!="#"));++M);R&&R.charAt(0)!="#"&&(I.l={Target:R}),n.dense?(t[y+a]||(t[y+a]=[]),t[y+a][b+i]=I):t[ca({c:b+i,r:y+a})]=I,h.e.c<b+i&&(h.e.c=b+i),b+=x}}++y}return f.length&&(t["!merges"]=(t["!merges"]||[]).concat(f)),h.e.r=Math.max(h.e.r,y-1+a),t["!ref"]=qi(h),y>=u&&(t["!fullref"]=qi((h.e.r=o.length-m+y-1+a,h))),t}l(Fpe,"sheet_add_dom");function Bpe(t,e){var r=e||{},n=r.dense?[]:{};return Fpe(n,t,e)}l(Bpe,"parse_dom_table");function iwt(t,e){return Yg(Bpe(t,e),e)}l(iwt,"table_to_book");function zpe(t){var e="",r=swt(t);return r&&(e=r(t).getPropertyValue("display")),e||(e=t.style&&t.style.display),e==="none"}l(zpe,"is_dom_element_hidden");function swt(t){return t.ownerDocument.defaultView&&typeof t.ownerDocument.defaultView.getComputedStyle=="function"?t.ownerDocument.defaultView.getComputedStyle:typeof getComputedStyle=="function"?getComputedStyle:null}l(swt,"get_get_computed_style_function");var owt=function(){var t=["<office:master-styles>",'<style:master-page style:name="mp1" style:page-layout-name="mp1">',"<style:header/>",'<style:header-left style:display="false"/>',"<style:footer/>",'<style:footer-left style:display="false"/>',"</style:master-page>","</office:master-styles>"].join(""),e="<office:document-styles "+s4({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","office:version":"1.2"})+">"+t+"</office:document-styles>";return l(function(){return Gi+e},"wso")}(),Hpe=function(){var t=l(function(i){return la(i).replace(/ +/g,function(s){return'<text:s text:c="'+s.length+'"/>'}).replace(/\t/g,"<text:tab/>").replace(/\n/g,"</text:p><text:p>").replace(/^ /,"<text:s/>").replace(/ $/,"<text:s/>")},"write_text_p"),e=` <table:table-cell />
|
||
`,r=` <table:covered-table-cell/>
|
||
`,n=l(function(i,s,o){var u=[];u.push(' <table:table table:name="'+la(s.SheetNames[o])+`" table:style-name="ta1">
|
||
`);var h=0,d=0,f=fc(i["!ref"]||"A1"),p=i["!merges"]||[],g=0,m=Array.isArray(i);if(i["!cols"])for(d=0;d<=f.e.c;++d)u.push(" <table:table-column"+(i["!cols"][d]?' table:style-name="co'+i["!cols"][d].ods+'"':"")+`></table:table-column>
|
||
`);var y="",v=i["!rows"]||[];for(h=0;h<f.s.r;++h)y=v[h]?' table:style-name="ro'+v[h].ods+'"':"",u.push(" <table:table-row"+y+`></table:table-row>
|
||
`);for(;h<=f.e.r;++h){for(y=v[h]?' table:style-name="ro'+v[h].ods+'"':"",u.push(" <table:table-row"+y+`>
|
||
`),d=0;d<f.s.c;++d)u.push(e);for(;d<=f.e.c;++d){var b=!1,w={},x="";for(g=0;g!=p.length;++g)if(!(p[g].s.c>d)&&!(p[g].s.r>h)&&!(p[g].e.c<d)&&!(p[g].e.r<h)){(p[g].s.c!=d||p[g].s.r!=h)&&(b=!0),w["table:number-columns-spanned"]=p[g].e.c-p[g].s.c+1,w["table:number-rows-spanned"]=p[g].e.r-p[g].s.r+1;break}if(b){u.push(r);continue}var T=ca({r:h,c:d}),C=m?(i[h]||[])[d]:i[T];if(C&&C.f&&(w["table:formula"]=la(k2t(C.f)),C.F&&C.F.slice(0,T.length)==T)){var S=fc(C.F);w["table:number-matrix-columns-spanned"]=S.e.c-S.s.c+1,w["table:number-matrix-rows-spanned"]=S.e.r-S.s.r+1}if(!C){u.push(e);continue}switch(C.t){case"b":x=C.v?"TRUE":"FALSE",w["office:value-type"]="boolean",w["office:boolean-value"]=C.v?"true":"false";break;case"n":x=C.w||String(C.v||0),w["office:value-type"]="float",w["office:value"]=C.v||0;break;case"s":case"str":x=C.v==null?"":C.v,w["office:value-type"]="string";break;case"d":x=C.w||Uo(C.v).toISOString(),w["office:value-type"]="date",w["office:date-value"]=Uo(C.v).toISOString(),w["table:style-name"]="ce1";break;default:u.push(e);continue}var E=t(x);if(C.l&&C.l.Target){var k=C.l.Target;k=k.charAt(0)=="#"?"#"+A2t(k.slice(1)):k,k.charAt(0)!="#"&&!k.match(/^\w+:/)&&(k="../"+k),E=fr("text:a",E,{"xlink:href":k.replace(/&/g,"&")})}u.push(" "+fr("table:table-cell",fr("text:p",E,{}),w)+`
|
||
`)}u.push(` </table:table-row>
|
||
`)}return u.push(` </table:table>
|
||
`),u.join("")},"write_ws"),a=l(function(i,s){i.push(` <office:automatic-styles>
|
||
`),i.push(` <number:date-style style:name="N37" number:automatic-order="true">
|
||
`),i.push(` <number:month number:style="long"/>
|
||
`),i.push(` <number:text>/</number:text>
|
||
`),i.push(` <number:day number:style="long"/>
|
||
`),i.push(` <number:text>/</number:text>
|
||
`),i.push(` <number:year/>
|
||
`),i.push(` </number:date-style>
|
||
`);var o=0;s.SheetNames.map(function(h){return s.Sheets[h]}).forEach(function(h){if(h&&h["!cols"]){for(var d=0;d<h["!cols"].length;++d)if(h["!cols"][d]){var f=h["!cols"][d];if(f.width==null&&f.wpx==null&&f.wch==null)continue;GB(f),f.ods=o;var p=h["!cols"][d].wpx+"px";i.push(' <style:style style:name="co'+o+`" style:family="table-column">
|
||
`),i.push(' <style:table-column-properties fo:break-before="auto" style:column-width="'+p+`"/>
|
||
`),i.push(` </style:style>
|
||
`),++o}}});var u=0;s.SheetNames.map(function(h){return s.Sheets[h]}).forEach(function(h){if(h&&h["!rows"]){for(var d=0;d<h["!rows"].length;++d)if(h["!rows"][d]){h["!rows"][d].ods=u;var f=h["!rows"][d].hpx+"px";i.push(' <style:style style:name="ro'+u+`" style:family="table-row">
|
||
`),i.push(' <style:table-row-properties fo:break-before="auto" style:row-height="'+f+`"/>
|
||
`),i.push(` </style:style>
|
||
`),++u}}}),i.push(` <style:style style:name="ta1" style:family="table" style:master-page-name="mp1">
|
||
`),i.push(` <style:table-properties table:display="true" style:writing-mode="lr-tb"/>
|
||
`),i.push(` </style:style>
|
||
`),i.push(` <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>
|
||
`),i.push(` </office:automatic-styles>
|
||
`)},"write_automatic_styles_ods");return l(function(s,o){var u=[Gi],h=s4({"xmlns:office":"urn:oasis:names:tc:opendocument:xmlns:office:1.0","xmlns:table":"urn:oasis:names:tc:opendocument:xmlns:table:1.0","xmlns:style":"urn:oasis:names:tc:opendocument:xmlns:style:1.0","xmlns:text":"urn:oasis:names:tc:opendocument:xmlns:text:1.0","xmlns:draw":"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0","xmlns:fo":"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:meta":"urn:oasis:names:tc:opendocument:xmlns:meta:1.0","xmlns:number":"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0","xmlns:presentation":"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0","xmlns:svg":"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0","xmlns:chart":"urn:oasis:names:tc:opendocument:xmlns:chart:1.0","xmlns:dr3d":"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0","xmlns:math":"http://www.w3.org/1998/Math/MathML","xmlns:form":"urn:oasis:names:tc:opendocument:xmlns:form:1.0","xmlns:script":"urn:oasis:names:tc:opendocument:xmlns:script:1.0","xmlns:ooo":"http://openoffice.org/2004/office","xmlns:ooow":"http://openoffice.org/2004/writer","xmlns:oooc":"http://openoffice.org/2004/calc","xmlns:dom":"http://www.w3.org/2001/xml-events","xmlns:xforms":"http://www.w3.org/2002/xforms","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:sheet":"urn:oasis:names:tc:opendocument:sh33tjs:1.0","xmlns:rpt":"http://openoffice.org/2005/report","xmlns:of":"urn:oasis:names:tc:opendocument:xmlns:of:1.2","xmlns:xhtml":"http://www.w3.org/1999/xhtml","xmlns:grddl":"http://www.w3.org/2003/g/data-view#","xmlns:tableooo":"http://openoffice.org/2009/table","xmlns:drawooo":"http://openoffice.org/2010/draw","xmlns:calcext":"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0","xmlns:loext":"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0","xmlns:field":"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0","xmlns:formx":"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0","xmlns:css3t":"http://www.w3.org/TR/css3-text/","office:version":"1.2"}),d=s4({"xmlns:config":"urn:oasis:names:tc:opendocument:xmlns:config:1.0","office:mimetype":"application/vnd.oasis.opendocument.spreadsheet"});o.bookType=="fods"?(u.push("<office:document"+h+d+`>
|
||
`),u.push(W0e().replace(/office:document-meta/g,"office:meta"))):u.push("<office:document-content"+h+`>
|
||
`),a(u,s),u.push(` <office:body>
|
||
`),u.push(` <office:spreadsheet>
|
||
`);for(var f=0;f!=s.SheetNames.length;++f)u.push(n(s.Sheets[s.SheetNames[f]],s,f));return u.push(` </office:spreadsheet>
|
||
`),u.push(` </office:body>
|
||
`),o.bookType=="fods"?u.push("</office:document>"):u.push("</office:document-content>"),u.join("")},"wcx")}();function Wpe(t,e){if(e.bookType=="fods")return Hpe(t,e);var r=kB(),n="",a=[],i=[];return n="mimetype",un(r,n,"application/vnd.oasis.opendocument.spreadsheet"),n="content.xml",un(r,n,Hpe(t,e)),a.push([n,"text/xml"]),i.push([n,"ContentFile"]),n="styles.xml",un(r,n,owt(t,e)),a.push([n,"text/xml"]),i.push([n,"StylesFile"]),n="meta.xml",un(r,n,Gi+W0e()),a.push([n,"text/xml"]),i.push([n,"MetadataFile"]),n="manifest.rdf",un(r,n,b1t(i)),a.push([n,"application/rdf+xml"]),n="META-INF/manifest.xml",un(r,n,y1t(a)),r}l(Wpe,"write_ods");function n8(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}l(n8,"u8_to_dataview");function lwt(t){return typeof TextEncoder!="undefined"?new TextEncoder().encode(t):Au(i4(t))}l(lwt,"stru8");function cwt(t,e){e:for(var r=0;r<=t.length-e.length;++r){for(var n=0;n<e.length;++n)if(t[r+n]!=e[n])continue e;return!0}return!1}l(cwt,"u8contains");function z0(t){var e=t.reduce(function(a,i){return a+i.length},0),r=new Uint8Array(e),n=0;return t.forEach(function(a){r.set(a,n),n+=a.length}),r}l(z0,"u8concat");function uwt(t,e,r){var n=Math.floor(r==0?0:Math.LOG10E*Math.log(Math.abs(r)))+6176-20,a=r/Math.pow(10,n-6176);t[e+15]|=n>>7,t[e+14]|=(n&127)<<1;for(var i=0;a>=1;++i,a/=256)t[e+i]=a&255;t[e+15]|=r>=0?0:128}l(uwt,"writeDecimal128LE");function y4(t,e){var r=e?e[0]:0,n=t[r]&127;e:if(t[r++]>=128&&(n|=(t[r]&127)<<7,t[r++]<128||(n|=(t[r]&127)<<14,t[r++]<128)||(n|=(t[r]&127)<<21,t[r++]<128)||(n+=(t[r]&127)*Math.pow(2,28),++r,t[r++]<128)||(n+=(t[r]&127)*Math.pow(2,35),++r,t[r++]<128)||(n+=(t[r]&127)*Math.pow(2,42),++r,t[r++]<128)))break e;return e&&(e[0]=r),n}l(y4,"parse_varint49");function ha(t){var e=new Uint8Array(7);e[0]=t&127;var r=1;e:if(t>127){if(e[r-1]|=128,e[r]=t>>7&127,++r,t<=16383||(e[r-1]|=128,e[r]=t>>14&127,++r,t<=2097151)||(e[r-1]|=128,e[r]=t>>21&127,++r,t<=268435455)||(e[r-1]|=128,e[r]=t/256>>>21&127,++r,t<=34359738367)||(e[r-1]|=128,e[r]=t/65536>>>21&127,++r,t<=4398046511103))break e;e[r-1]|=128,e[r]=t/16777216>>>21&127,++r}return e.slice(0,r)}l(ha,"write_varint49");function ow(t){var e=0,r=t[e]&127;e:if(t[e++]>=128){if(r|=(t[e]&127)<<7,t[e++]<128||(r|=(t[e]&127)<<14,t[e++]<128)||(r|=(t[e]&127)<<21,t[e++]<128))break e;r|=(t[e]&127)<<28}return r}l(ow,"varint_to_i32");function os(t){for(var e=[],r=[0];r[0]<t.length;){var n=r[0],a=y4(t,r),i=a&7;a=Math.floor(a/8);var s=0,o;if(a==0)break;switch(i){case 0:{for(var u=r[0];t[r[0]++]>=128;);o=t.slice(u,r[0])}break;case 5:s=4,o=t.slice(r[0],r[0]+s),r[0]+=s;break;case 1:s=8,o=t.slice(r[0],r[0]+s),r[0]+=s;break;case 2:s=y4(t,r),o=t.slice(r[0],r[0]+s),r[0]+=s;break;case 3:case 4:default:throw new Error("PB Type ".concat(i," for Field ").concat(a," at offset ").concat(n))}var h={data:o,type:i};e[a]==null?e[a]=[h]:e[a].push(h)}return e}l(os,"parse_shallow");function eo(t){var e=[];return t.forEach(function(r,n){r.forEach(function(a){a.data&&(e.push(ha(n*8+a.type)),a.type==2&&e.push(ha(a.data.length)),e.push(a.data))})}),z0(e)}l(eo,"write_shallow");function Lu(t){for(var e,r=[],n=[0];n[0]<t.length;){var a=y4(t,n),i=os(t.slice(n[0],n[0]+a));n[0]+=a;var s={id:ow(i[1][0].data),messages:[]};i[2].forEach(function(o){var u=os(o.data),h=ow(u[3][0].data);s.messages.push({meta:u,data:t.slice(n[0],n[0]+h)}),n[0]+=h}),(e=i[3])!=null&&e[0]&&(s.merge=ow(i[3][0].data)>>>0>0),r.push(s)}return r}l(Lu,"parse_iwa_file");function lw(t){var e=[];return t.forEach(function(r){var n=[];n[1]=[{data:ha(r.id),type:0}],n[2]=[],r.merge!=null&&(n[3]=[{data:ha(+!!r.merge),type:0}]);var a=[];r.messages.forEach(function(s){a.push(s.data),s.meta[3]=[{type:0,data:ha(s.data.length)}],n[2].push({data:eo(s.meta),type:2})});var i=eo(n);e.push(ha(i.length)),e.push(i),a.forEach(function(s){return e.push(s)})}),z0(e)}l(lw,"write_iwa_file");function hwt(t,e){if(t!=0)throw new Error("Unexpected Snappy chunk type ".concat(t));for(var r=[0],n=y4(e,r),a=[];r[0]<e.length;){var i=e[r[0]]&3;if(i==0){var s=e[r[0]++]>>2;if(s<60)++s;else{var o=s-59;s=e[r[0]],o>1&&(s|=e[r[0]+1]<<8),o>2&&(s|=e[r[0]+2]<<16),o>3&&(s|=e[r[0]+3]<<24),s>>>=0,s++,r[0]+=o}a.push(e.slice(r[0],r[0]+s)),r[0]+=s;continue}else{var u=0,h=0;if(i==1?(h=(e[r[0]]>>2&7)+4,u=(e[r[0]++]&224)<<3,u|=e[r[0]++]):(h=(e[r[0]++]>>2)+1,i==2?(u=e[r[0]]|e[r[0]+1]<<8,r[0]+=2):(u=(e[r[0]]|e[r[0]+1]<<8|e[r[0]+2]<<16|e[r[0]+3]<<24)>>>0,r[0]+=4)),a=[z0(a)],u==0)throw new Error("Invalid offset 0");if(u>a[0].length)throw new Error("Invalid offset beyond length");if(h>=u)for(a.push(a[0].slice(-u)),h-=u;h>=a[a.length-1].length;)a.push(a[a.length-1]),h-=a[a.length-1].length;a.push(a[0].slice(-u,-u+h))}}var d=z0(a);if(d.length!=n)throw new Error("Unexpected length: ".concat(d.length," != ").concat(n));return d}l(hwt,"parse_snappy_chunk");function $u(t){for(var e=[],r=0;r<t.length;){var n=t[r++],a=t[r]|t[r+1]<<8|t[r+2]<<16;r+=3,e.push(hwt(n,t.slice(r,r+a))),r+=a}if(r!==t.length)throw new Error("data is not a valid framed stream!");return z0(e)}l($u,"decompress_iwa_file");function cw(t){for(var e=[],r=0;r<t.length;){var n=Math.min(t.length-r,268435455),a=new Uint8Array(4);e.push(a);var i=ha(n),s=i.length;e.push(i),n<=60?(s++,e.push(new Uint8Array([n-1<<2]))):n<=256?(s+=2,e.push(new Uint8Array([240,n-1&255]))):n<=65536?(s+=3,e.push(new Uint8Array([244,n-1&255,n-1>>8&255]))):n<=16777216?(s+=4,e.push(new Uint8Array([248,n-1&255,n-1>>8&255,n-1>>16&255]))):n<=4294967296&&(s+=5,e.push(new Uint8Array([252,n-1&255,n-1>>8&255,n-1>>16&255,n-1>>>24&255]))),e.push(t.slice(r,r+n)),s+=n,a[0]=0,a[1]=s&255,a[2]=s>>8&255,a[3]=s>>16&255,r+=n}return z0(e)}l(cw,"compress_iwa_file");function ZB(t,e){var r=new Uint8Array(32),n=n8(r),a=12,i=0;switch(r[0]=5,t.t){case"n":r[1]=2,uwt(r,a,t.v),i|=1,a+=16;break;case"b":r[1]=6,n.setFloat64(a,t.v?1:0,!0),i|=2,a+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[1]=3,n.setUint32(a,e.indexOf(t.v),!0),i|=8,a+=4;break;default:throw"unsupported cell type "+t.t}return n.setUint32(8,i,!0),r.slice(0,a)}l(ZB,"write_new_storage");function QB(t,e){var r=new Uint8Array(32),n=n8(r),a=12,i=0;switch(r[0]=3,t.t){case"n":r[2]=2,n.setFloat64(a,t.v,!0),i|=32,a+=8;break;case"b":r[2]=6,n.setFloat64(a,t.v?1:0,!0),i|=32,a+=8;break;case"s":if(e.indexOf(t.v)==-1)throw new Error("Value ".concat(t.v," missing from SST!"));r[2]=3,n.setUint32(a,e.indexOf(t.v),!0),i|=16,a+=4;break;default:throw"unsupported cell type "+t.t}return n.setUint32(4,i,!0),r.slice(0,a)}l(QB,"write_old_storage");function H0(t){var e=os(t);return y4(e[1][0].data)}l(H0,"parse_TSP_Reference");function dwt(t,e,r){var n,a,i,s;if(!((n=t[6])!=null&&n[0])||!((a=t[7])!=null&&a[0]))throw"Mutation only works on post-BNC storages!";var o=((s=(i=t[8])==null?void 0:i[0])==null?void 0:s.data)&&ow(t[8][0].data)>0||!1;if(o)throw"Math only works with normal offsets";for(var u=0,h=n8(t[7][0].data),d=0,f=[],p=n8(t[4][0].data),g=0,m=[],y=0;y<e.length;++y){if(e[y]==null){h.setUint16(y*2,65535,!0),p.setUint16(y*2,65535);continue}h.setUint16(y*2,d,!0),p.setUint16(y*2,g,!0);var v,b;switch(typeof e[y]){case"string":v=ZB({t:"s",v:e[y]},r),b=QB({t:"s",v:e[y]},r);break;case"number":v=ZB({t:"n",v:e[y]},r),b=QB({t:"n",v:e[y]},r);break;case"boolean":v=ZB({t:"b",v:e[y]},r),b=QB({t:"b",v:e[y]},r);break;default:throw new Error("Unsupported value "+e[y])}f.push(v),d+=v.length,m.push(b),g+=b.length,++u}for(t[2][0].data=ha(u);y<t[7][0].data.length/2;++y)h.setUint16(y*2,65535,!0),p.setUint16(y*2,65535,!0);return t[6][0].data=z0(f),t[3][0].data=z0(m),u}l(dwt,"write_tile_row");function fwt(t,e){if(!e||!e.numbers)throw new Error("Must pass a `numbers` option -- check the README");var r=t.Sheets[t.SheetNames[0]];t.SheetNames.length>1&&console.error("The Numbers writer currently writes only the first table");var n=fc(r["!ref"]);n.s.r=n.s.c=0;var a=!1;n.e.c>9&&(a=!0,n.e.c=9),n.e.r>49&&(a=!0,n.e.r=49),a&&console.error("The Numbers writer is currently limited to ".concat(qi(n)));var i=i8(r,{range:n,header:1}),s=["~Sh33tJ5~"];i.forEach(function(Y){return Y.forEach(function(H){typeof H=="string"&&s.push(H)})});var o={},u=[],h=ma.read(e.numbers,{type:"base64"});h.FileIndex.map(function(Y,H){return[Y,h.FullPaths[H]]}).forEach(function(Y){var H=Y[0],q=Y[1];if(H.type==2&&H.name.match(/\.iwa/)){var Z=H.content,K=$u(Z),re=Lu(K);re.forEach(function(Q){u.push(Q.id),o[Q.id]={deps:[],location:q,type:ow(Q.messages[0].meta[1][0].data)}})}}),u.sort(function(Y,H){return Y-H});var d=u.filter(function(Y){return Y>1}).map(function(Y){return[Y,ha(Y)]});h.FileIndex.map(function(Y,H){return[Y,h.FullPaths[H]]}).forEach(function(Y){var H=Y[0];if(Y[1],!!H.name.match(/\.iwa/)){var q=Lu($u(H.content));q.forEach(function(Z){Z.messages.forEach(function(K){d.forEach(function(re){Z.messages.some(function(Q){return ow(Q.meta[1][0].data)!=11006&&cwt(Q.data,re[1])})&&o[re[0]].deps.push(Z.id)})})})}});for(var f=ma.find(h,o[1].location),p=Lu($u(f.content)),g,m=0;m<p.length;++m){var y=p[m];y.id==1&&(g=y)}var v=H0(os(g.messages[0].data)[1][0].data);for(f=ma.find(h,o[v].location),p=Lu($u(f.content)),m=0;m<p.length;++m)y=p[m],y.id==v&&(g=y);for(v=H0(os(g.messages[0].data)[2][0].data),f=ma.find(h,o[v].location),p=Lu($u(f.content)),m=0;m<p.length;++m)y=p[m],y.id==v&&(g=y);for(v=H0(os(g.messages[0].data)[2][0].data),f=ma.find(h,o[v].location),p=Lu($u(f.content)),m=0;m<p.length;++m)y=p[m],y.id==v&&(g=y);var b=os(g.messages[0].data);{b[6][0].data=ha(n.e.r+1),b[7][0].data=ha(n.e.c+1);var w=H0(b[46][0].data),x=ma.find(h,o[w].location),T=Lu($u(x.content));{for(var C=0;C<T.length&&T[C].id!=w;++C);if(T[C].id!=w)throw"Bad ColumnRowUIDMapArchive";var S=os(T[C].messages[0].data);S[1]=[],S[2]=[],S[3]=[];for(var E=0;E<=n.e.c;++E){var k=[];k[1]=k[2]=[{type:0,data:ha(E+420690)}],S[1].push({type:2,data:eo(k)}),S[2].push({type:0,data:ha(E)}),S[3].push({type:0,data:ha(E)})}S[4]=[],S[5]=[],S[6]=[];for(var A=0;A<=n.e.r;++A)k=[],k[1]=k[2]=[{type:0,data:ha(A+726270)}],S[4].push({type:2,data:eo(k)}),S[5].push({type:0,data:ha(A)}),S[6].push({type:0,data:ha(A)});T[C].messages[0].data=eo(S)}x.content=cw(lw(T)),x.size=x.content.length,delete b[46];var I=os(b[4][0].data);{I[7][0].data=ha(n.e.r+1);var L=os(I[1][0].data),R=H0(L[2][0].data);x=ma.find(h,o[R].location),T=Lu($u(x.content));{if(T[0].id!=R)throw"Bad HeaderStorageBucket";var O=os(T[0].messages[0].data);for(A=0;A<i.length;++A){var M=os(O[2][0].data);M[1][0].data=ha(A),M[4][0].data=ha(i[A].length),O[2][A]={type:O[2][0].type,data:eo(M)}}T[0].messages[0].data=eo(O)}x.content=cw(lw(T)),x.size=x.content.length;var P=H0(I[2][0].data);x=ma.find(h,o[P].location),T=Lu($u(x.content));{if(T[0].id!=P)throw"Bad HeaderStorageBucket";for(O=os(T[0].messages[0].data),E=0;E<=n.e.c;++E)M=os(O[2][0].data),M[1][0].data=ha(E),M[4][0].data=ha(n.e.r+1),O[2][E]={type:O[2][0].type,data:eo(M)};T[0].messages[0].data=eo(O)}x.content=cw(lw(T)),x.size=x.content.length;var z=H0(I[4][0].data);(function(){for(var Y=ma.find(h,o[z].location),H=Lu($u(Y.content)),q,Z=0;Z<H.length;++Z){var K=H[Z];K.id==z&&(q=K)}var re=os(q.messages[0].data);{re[3]=[];var Q=[];s.forEach(function(J,ae){Q[1]=[{type:0,data:ha(ae)}],Q[2]=[{type:0,data:ha(1)}],Q[3]=[{type:2,data:lwt(J)}],re[3].push({type:2,data:eo(Q)})})}q.messages[0].data=eo(re);var te=lw(H),ee=cw(te);Y.content=ee,Y.size=Y.content.length})();var D=os(I[3][0].data);{var B=D[1][0];delete D[2];var W=os(B.data);{var U=H0(W[2][0].data);(function(){for(var Y=ma.find(h,o[U].location),H=Lu($u(Y.content)),q,Z=0;Z<H.length;++Z){var K=H[Z];K.id==U&&(q=K)}var re=os(q.messages[0].data);{delete re[6],delete D[7];var Q=new Uint8Array(re[5][0].data);re[5]=[];for(var te=0,ee=0;ee<=n.e.r;++ee){var J=os(Q);te+=dwt(J,i[ee],s),J[1][0].data=ha(ee),re[5].push({data:eo(J),type:2})}re[1]=[{type:0,data:ha(n.e.c+1)}],re[2]=[{type:0,data:ha(n.e.r+1)}],re[3]=[{type:0,data:ha(te)}],re[4]=[{type:0,data:ha(n.e.r+1)}]}q.messages[0].data=eo(re);var ae=lw(H),se=cw(ae);Y.content=se,Y.size=Y.content.length})()}B.data=eo(W)}I[3][0].data=eo(D)}b[4][0].data=eo(I)}g.messages[0].data=eo(b);var j=lw(p),V=cw(j);return f.content=V,f.size=f.content.length,h}l(fwt,"write_numbers_iwa");function pwt(t){return l(function(r){for(var n=0;n!=t.length;++n){var a=t[n];r[a[0]]===void 0&&(r[a[0]]=a[1]),a[2]==="n"&&(r[a[0]]=Number(r[a[0]]))}},"fix_opts")}l(pwt,"fix_opts_func");function JB(t){pwt([["cellDates",!1],["bookSST",!1],["bookType","xlsx"],["compression",!1],["WTF",!1]])(t)}l(JB,"fix_write_opts");function gwt(t,e){return e.bookType=="ods"?Wpe(t,e):e.bookType=="numbers"?fwt(t,e):e.bookType=="xlsb"?mwt(t,e):ywt(t,e)}l(gwt,"write_zip");function mwt(t,e){iw=1024,t&&!t.SSF&&(t.SSF=Dl(gi)),t&&t.SSF&&(BA(),FA(t.SSF),e.revssf=zA(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,g4?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r=e.bookType=="xlsb"?"bin":"xml",n=bpe.indexOf(e.bookType)>-1,a=F0e();JB(e=e||{});var i=kB(),s="",o=0;if(e.cellXfs=[],B0(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),s="docProps/core.xml",un(i,s,V0e(t.Props,e)),a.coreprops.push(s),ua(e.rels,2,s,Gn.CORE_PROPS),s="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var u=[],h=0;h<t.SheetNames.length;++h)(t.Workbook.Sheets[h]||{}).Hidden!=2&&u.push(t.SheetNames[h]);t.Props.SheetNames=u}for(t.Props.Worksheets=t.Props.SheetNames.length,un(i,s,q0e(t.Props)),a.extprops.push(s),ua(e.rels,3,s,Gn.EXT_PROPS),t.Custprops!==t.Props&&Xs(t.Custprops||{}).length>0&&(s="docProps/custom.xml",un(i,s,Y0e(t.Custprops)),a.custprops.push(s),ua(e.rels,4,s,Gn.CUST_PROPS)),o=1;o<=t.SheetNames.length;++o){var d={"!id":{}},f=t.Sheets[t.SheetNames[o-1]],p=(f||{})["!type"]||"sheet";switch(p){case"chart":default:s="xl/worksheets/sheet"+o+"."+r,un(i,s,bxt(o-1,s,e,t,d)),a.sheets.push(s),ua(e.wbrels,-1,"worksheets/sheet"+o+"."+r,Gn.WS[0])}if(f){var g=f["!comments"],m=!1,y="";g&&g.length>0&&(y="xl/comments"+o+"."+r,un(i,y,Txt(g,y)),a.comments.push(y),ua(d,-1,"../comments"+o+"."+r,Gn.CMNT),m=!0),f["!legacy"]&&m&&un(i,"xl/drawings/vmlDrawing"+o+".vml",ype(o,f["!comments"])),delete f["!comments"],delete f["!legacy"]}d["!id"].rId1&&un(i,z0e(s),nw(d))}return e.Strings!=null&&e.Strings.length>0&&(s="xl/sharedStrings."+r,un(i,s,wxt(e.Strings,s,e)),a.strs.push(s),ua(e.wbrels,-1,"sharedStrings."+r,Gn.SST)),s="xl/workbook."+r,un(i,s,vxt(t,s)),a.workbooks.push(s),ua(e.rels,1,s,Gn.WB),s="xl/theme/theme1.xml",un(i,s,gpe(t.Themes,e)),a.themes.push(s),ua(e.wbrels,-1,"theme/theme1.xml",Gn.THEME),s="xl/styles."+r,un(i,s,xxt(t,s,e)),a.styles.push(s),ua(e.wbrels,-1,"styles."+r,Gn.STY),t.vbaraw&&n&&(s="xl/vbaProject.bin",un(i,s,t.vbaraw),a.vba.push(s),ua(e.wbrels,-1,"vbaProject.bin",Gn.VBA)),s="xl/metadata."+r,un(i,s,Ext(s)),a.metadata.push(s),ua(e.wbrels,-1,"metadata."+r,Gn.XLMETA),un(i,"[Content_Types].xml",B0e(a,e)),un(i,"_rels/.rels",nw(e.rels)),un(i,"xl/_rels/workbook."+r+".rels",nw(e.wbrels)),delete e.revssf,delete e.ssf,i}l(mwt,"write_zip_xlsxb");function ywt(t,e){iw=1024,t&&!t.SSF&&(t.SSF=Dl(gi)),t&&t.SSF&&(BA(),FA(t.SSF),e.revssf=zA(t.SSF),e.revssf[t.SSF[65535]]=0,e.ssf=t.SSF),e.rels={},e.wbrels={},e.Strings=[],e.Strings.Count=0,e.Strings.Unique=0,g4?e.revStrings=new Map:(e.revStrings={},e.revStrings.foo=[],delete e.revStrings.foo);var r="xml",n=bpe.indexOf(e.bookType)>-1,a=F0e();JB(e=e||{});var i=kB(),s="",o=0;if(e.cellXfs=[],B0(e.cellXfs,{},{revssf:{General:0}}),t.Props||(t.Props={}),s="docProps/core.xml",un(i,s,V0e(t.Props,e)),a.coreprops.push(s),ua(e.rels,2,s,Gn.CORE_PROPS),s="docProps/app.xml",!(t.Props&&t.Props.SheetNames))if(!t.Workbook||!t.Workbook.Sheets)t.Props.SheetNames=t.SheetNames;else{for(var u=[],h=0;h<t.SheetNames.length;++h)(t.Workbook.Sheets[h]||{}).Hidden!=2&&u.push(t.SheetNames[h]);t.Props.SheetNames=u}t.Props.Worksheets=t.Props.SheetNames.length,un(i,s,q0e(t.Props)),a.extprops.push(s),ua(e.rels,3,s,Gn.EXT_PROPS),t.Custprops!==t.Props&&Xs(t.Custprops||{}).length>0&&(s="docProps/custom.xml",un(i,s,Y0e(t.Custprops)),a.custprops.push(s),ua(e.rels,4,s,Gn.CUST_PROPS));var d=["SheetJ5"];for(e.tcid=0,o=1;o<=t.SheetNames.length;++o){var f={"!id":{}},p=t.Sheets[t.SheetNames[o-1]],g=(p||{})["!type"]||"sheet";switch(g){case"chart":default:s="xl/worksheets/sheet"+o+"."+r,un(i,s,Lpe(o-1,e,t,f)),a.sheets.push(s),ua(e.wbrels,-1,"worksheets/sheet"+o+"."+r,Gn.WS[0])}if(p){var m=p["!comments"],y=!1,v="";if(m&&m.length>0){var b=!1;m.forEach(function(w){w[1].forEach(function(x){x.T==!0&&(b=!0)})}),b&&(v="xl/threadedComments/threadedComment"+o+"."+r,un(i,v,jyt(m,d,e)),a.threadedcomments.push(v),ua(f,-1,"../threadedComments/threadedComment"+o+"."+r,Gn.TCMNT)),v="xl/comments"+o+"."+r,un(i,v,vpe(m)),a.comments.push(v),ua(f,-1,"../comments"+o+"."+r,Gn.CMNT),y=!0}p["!legacy"]&&y&&un(i,"xl/drawings/vmlDrawing"+o+".vml",ype(o,p["!comments"])),delete p["!comments"],delete p["!legacy"]}f["!id"].rId1&&un(i,z0e(s),nw(f))}return e.Strings!=null&&e.Strings.length>0&&(s="xl/sharedStrings."+r,un(i,s,ope(e.Strings,e)),a.strs.push(s),ua(e.wbrels,-1,"sharedStrings."+r,Gn.SST)),s="xl/workbook."+r,un(i,s,Ppe(t)),a.workbooks.push(s),ua(e.rels,1,s,Gn.WB),s="xl/theme/theme1.xml",un(i,s,gpe(t.Themes,e)),a.themes.push(s),ua(e.wbrels,-1,"theme/theme1.xml",Gn.THEME),s="xl/styles."+r,un(i,s,dpe(t,e)),a.styles.push(s),ua(e.wbrels,-1,"styles."+r,Gn.STY),t.vbaraw&&n&&(s="xl/vbaProject.bin",un(i,s,t.vbaraw),a.vba.push(s),ua(e.wbrels,-1,"vbaProject.bin",Gn.VBA)),s="xl/metadata."+r,un(i,s,mpe()),a.metadata.push(s),ua(e.wbrels,-1,"metadata."+r,Gn.XLMETA),d.length>1&&(s="xl/persons/person.xml",un(i,s,Kyt(d)),a.people.push(s),ua(e.wbrels,-1,"persons/person.xml",Gn.PEOPLE)),un(i,"[Content_Types].xml",B0e(a,e)),un(i,"_rels/.rels",nw(e.rels)),un(i,"xl/_rels/workbook."+r+".rels",nw(e.wbrels)),delete e.revssf,delete e.ssf,i}l(ywt,"write_zip_xlsx");function vwt(t,e){var r="";switch((e||{}).type||"base64"){case"buffer":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];case"base64":r=Vd(t.slice(0,12));break;case"binary":r=t;break;case"array":return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]];default:throw new Error("Unrecognized type "+(e&&e.type||"undefined"))}return[r.charCodeAt(0),r.charCodeAt(1),r.charCodeAt(2),r.charCodeAt(3),r.charCodeAt(4),r.charCodeAt(5),r.charCodeAt(6),r.charCodeAt(7)]}l(vwt,"firstbyte");function Vpe(t,e){switch(e.type){case"base64":case"binary":break;case"buffer":case"array":e.type="";break;case"file":return r4(e.file,ma.write(t,{type:Xn?"buffer":""}));case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");default:throw new Error("Unrecognized type "+e.type)}return ma.write(t,e)}l(Vpe,"write_cfb_ctr");function bwt(t,e){var r=Dl(e||{}),n=gwt(t,r);return xwt(n,r)}l(bwt,"write_zip_type");function xwt(t,e){var r={},n=Xn?"nodebuffer":typeof Uint8Array!="undefined"?"array":"string";if(e.compression&&(r.compression="DEFLATE"),e.password)r.type=n;else switch(e.type){case"base64":r.type="base64";break;case"binary":r.type="string";break;case"string":throw new Error("'string' output type invalid for '"+e.bookType+"' files");case"buffer":case"file":r.type=n;break;default:throw new Error("Unrecognized type "+e.type)}var a=t.FullPaths?ma.write(t,{fileType:"zip",type:{nodebuffer:"buffer",string:"binary"}[r.type]||r.type,compression:!!e.compression}):t.generate(r);if(typeof Deno!="undefined"&&typeof a=="string"){if(e.type=="binary"||e.type=="base64")return a;a=new Uint8Array($A(a))}return e.password&&typeof encrypt_agile!="undefined"?Vpe(encrypt_agile(a,e.password),e):e.type==="file"?r4(e.file,a):e.type=="string"?a4(a):a}l(xwt,"write_zip_denouement");function wwt(t,e){var r=e||{},n=Dxt(t,r);return Vpe(n,r)}l(wwt,"write_cfb_type");function kh(t,e,r){r||(r="");var n=r+t;switch(e.type){case"base64":return JS(i4(n));case"binary":return i4(n);case"string":return t;case"file":return r4(e.file,n,"utf8");case"buffer":return Xn?Gd(n,"utf8"):typeof TextEncoder!="undefined"?new TextEncoder().encode(n):kh(n,{type:"binary"}).split("").map(function(a){return a.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}l(kh,"write_string_type");function Twt(t,e){switch(e.type){case"base64":return JS(t);case"binary":return t;case"string":return t;case"file":return r4(e.file,t,"binary");case"buffer":return Xn?Gd(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)})}throw new Error("Unrecognized type "+e.type)}l(Twt,"write_stxt_type");function a8(t,e){switch(e.type){case"string":case"base64":case"binary":for(var r="",n=0;n<t.length;++n)r+=String.fromCharCode(t[n]);return e.type=="base64"?JS(r):e.type=="string"?a4(r):r;case"file":return r4(e.file,t);case"buffer":return t;default:throw new Error("Unrecognized type "+e.type)}}l(a8,"write_binary_type");function Gpe(t,e){Xgt(),oxt(t);var r=Dl(e||{});if(r.cellStyles&&(r.cellNF=!0,r.sheetStubs=!0),r.type=="array"){r.type="binary";var n=Gpe(t,r);return r.type="array",$A(n)}var a=0;if(r.sheet&&(typeof r.sheet=="number"?a=r.sheet:a=t.SheetNames.indexOf(r.sheet),!t.SheetNames[a]))throw new Error("Sheet not found: "+r.sheet+" : "+typeof r.sheet);switch(r.bookType||"xlsb"){case"xml":case"xlml":return kh(Rxt(t,r),r);case"slk":case"sylk":return kh(ayt.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"htm":case"html":return kh(Dpe(t.Sheets[t.SheetNames[a]],r),r);case"txt":return Twt(Ype(t.Sheets[t.SheetNames[a]],r),r);case"csv":return kh(ez(t.Sheets[t.SheetNames[a]],r),r,"\uFEFF");case"dif":return kh(iyt.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"dbf":return a8(nyt.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"prn":return kh(syt.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"rtf":return kh(fyt.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"eth":return kh(ipe.from_sheet(t.Sheets[t.SheetNames[a]],r),r);case"fods":return kh(Wpe(t,r),r);case"wk1":return a8(spe.sheet_to_wk1(t.Sheets[t.SheetNames[a]],r),r);case"wk3":return a8(spe.book_to_wk3(t,r),r);case"biff2":r.biff||(r.biff=2);case"biff3":r.biff||(r.biff=3);case"biff4":return r.biff||(r.biff=4),a8(Ope(t,r),r);case"biff5":r.biff||(r.biff=5);case"biff8":case"xla":case"xls":return r.biff||(r.biff=8),wwt(t,r);case"xlsx":case"xlsm":case"xlam":case"xlsb":case"numbers":case"ods":return bwt(t,r);default:throw new Error("Unrecognized bookType |"+r.bookType+"|")}}l(Gpe,"writeSync");function Ewt(t){if(!t.bookType){var e={xls:"biff8",htm:"html",slk:"sylk",socialcalc:"eth",Sh33tJS:"WTF"},r=t.file.slice(t.file.lastIndexOf(".")).toLowerCase();r.match(/^\.[a-z]+$/)&&(t.bookType=r.slice(1)),t.bookType=e[t.bookType]||t.bookType}}l(Ewt,"resolve_book_type");function Cwt(t,e,r){var n={};return n.type="file",n.file=e,Ewt(n),Gpe(t,n)}l(Cwt,"writeFileSync");function Swt(t,e,r,n,a,i,s,o){var u=Qs(r),h=o.defval,d=o.raw||!Object.prototype.hasOwnProperty.call(o,"raw"),f=!0,p=a===1?[]:{};if(a!==1)if(Object.defineProperty)try{Object.defineProperty(p,"__rowNum__",{value:r,enumerable:!1})}catch(v){p.__rowNum__=r}else p.__rowNum__=r;if(!s||t[r])for(var g=e.s.c;g<=e.e.c;++g){var m=s?t[r][g]:t[n[g]+u];if(m===void 0||m.t===void 0){if(h===void 0)continue;i[g]!=null&&(p[i[g]]=h);continue}var y=m.v;switch(m.t){case"z":if(y==null)break;continue;case"e":y=y==0?null:void 0;break;case"s":case"d":case"b":case"n":break;default:throw new Error("unrecognized type "+m.t)}if(i[g]!=null){if(y==null)if(m.t=="e"&&y===null)p[i[g]]=null;else if(h!==void 0)p[i[g]]=h;else if(d&&y===null)p[i[g]]=null;else continue;else p[i[g]]=d&&(m.t!=="n"||m.t==="n"&&o.rawNumbers!==!1)?y:Ud(m,y,o);y!=null&&(f=!1)}}return{row:p,isempty:f}}l(Swt,"make_json_row");function i8(t,e){if(t==null||t["!ref"]==null)return[];var r={t:"n",v:0},n=0,a=1,i=[],s=0,o="",u={s:{r:0,c:0},e:{r:0,c:0}},h=e||{},d=h.range!=null?h.range:t["!ref"];switch(h.header===1?n=1:h.header==="A"?n=2:Array.isArray(h.header)?n=3:h.header==null&&(n=0),typeof d){case"string":u=Ba(d);break;case"number":u=Ba(t["!ref"]),u.s.r=d;break;default:u=d}n>0&&(a=0);var f=Qs(u.s.r),p=[],g=[],m=0,y=0,v=Array.isArray(t),b=u.s.r,w=0,x={};v&&!t[b]&&(t[b]=[]);var T=h.skipHidden&&t["!cols"]||[],C=h.skipHidden&&t["!rows"]||[];for(w=u.s.c;w<=u.e.c;++w)if(!(T[w]||{}).hidden)switch(p[w]=Co(w),r=v?t[b][w]:t[p[w]+f],n){case 1:i[w]=w-u.s.c;break;case 2:i[w]=p[w];break;case 3:i[w]=h.header[w-u.s.c];break;default:if(r==null&&(r={w:"__EMPTY",t:"s"}),o=s=Ud(r,null,h),y=x[s]||0,!y)x[s]=1;else{do o=s+"_"+y++;while(x[o]);x[s]=y,x[o]=1}i[w]=o}for(b=u.s.r+a;b<=u.e.r;++b)if(!(C[b]||{}).hidden){var S=Swt(t,u,b,p,n,i,v,h);(S.isempty===!1||(n===1?h.blankrows!==!1:h.blankrows))&&(g[m++]=S.row)}return g.length=m,g}l(i8,"sheet_to_json");var qpe=/"/g;function _wt(t,e,r,n,a,i,s,o){for(var u=!0,h=[],d="",f=Qs(r),p=e.s.c;p<=e.e.c;++p)if(n[p]){var g=o.dense?(t[r]||[])[p]:t[n[p]+f];if(g==null)d="";else if(g.v!=null){u=!1,d=""+(o.rawNumbers&&g.t=="n"?g.v:Ud(g,null,o));for(var m=0,y=0;m!==d.length;++m)if((y=d.charCodeAt(m))===a||y===i||y===34||o.forceQuotes){d='"'+d.replace(qpe,'""')+'"';break}d=="ID"&&(d='"ID"')}else g.f!=null&&!g.F?(u=!1,d="="+g.f,d.indexOf(",")>=0&&(d='"'+d.replace(qpe,'""')+'"')):d="";h.push(d)}return o.blankrows===!1&&u?null:h.join(s)}l(_wt,"make_csv_row");function ez(t,e){var r=[],n=e==null?{}:e;if(t==null||t["!ref"]==null)return"";var a=Ba(t["!ref"]),i=n.FS!==void 0?n.FS:",",s=i.charCodeAt(0),o=n.RS!==void 0?n.RS:`
|
||
`,u=o.charCodeAt(0),h=new RegExp((i=="|"?"\\|":i)+"+$"),d="",f=[];n.dense=Array.isArray(t);for(var p=n.skipHidden&&t["!cols"]||[],g=n.skipHidden&&t["!rows"]||[],m=a.s.c;m<=a.e.c;++m)(p[m]||{}).hidden||(f[m]=Co(m));for(var y=0,v=a.s.r;v<=a.e.r;++v)(g[v]||{}).hidden||(d=_wt(t,a,v,f,s,u,i,n),d!=null&&(n.strip&&(d=d.replace(h,"")),(d||n.blankrows!==!1)&&r.push((y++?o:"")+d)));return delete n.dense,r.join("")}l(ez,"sheet_to_csv");function Ype(t,e){e||(e={}),e.FS=" ",e.RS=`
|
||
`;var r=ez(t,e);return r}l(Ype,"sheet_to_txt");function kwt(t){var e="",r,n="";if(t==null||t["!ref"]==null)return[];var a=Ba(t["!ref"]),i="",s=[],o,u=[],h=Array.isArray(t);for(o=a.s.c;o<=a.e.c;++o)s[o]=Co(o);for(var d=a.s.r;d<=a.e.r;++d)for(i=Qs(d),o=a.s.c;o<=a.e.c;++o)if(e=s[o]+i,r=h?(t[d]||[])[o]:t[e],n="",r!==void 0){if(r.F!=null){if(e=r.F,!r.f)continue;n=r.f,e.indexOf(":")==-1&&(e=e+":"+e)}if(r.f!=null)n=r.f;else{if(r.t=="z")continue;if(r.t=="n"&&r.v!=null)n=""+r.v;else if(r.t=="b")n=r.v?"TRUE":"FALSE";else if(r.w!==void 0)n="'"+r.w;else{if(r.v===void 0)continue;r.t=="s"?n="'"+r.v:n=""+r.v}}u[u.length]=e+"="+n}return u}l(kwt,"sheet_to_formulae");function Upe(t,e,r){var n=r||{},a=+!n.skipHeader,i=t||{},s=0,o=0;if(i&&n.origin!=null)if(typeof n.origin=="number")s=n.origin;else{var u=typeof n.origin=="string"?Ss(n.origin):n.origin;s=u.r,o=u.c}var h,d={s:{c:0,r:0},e:{c:o,r:s+e.length-1+a}};if(i["!ref"]){var f=Ba(i["!ref"]);d.e.c=Math.max(d.e.c,f.e.c),d.e.r=Math.max(d.e.r,f.e.r),s==-1&&(s=f.e.r+1,d.e.r=s+e.length-1+a)}else s==-1&&(s=0,d.e.r=e.length-1+a);var p=n.header||[],g=0;e.forEach(function(y,v){Xs(y).forEach(function(b){(g=p.indexOf(b))==-1&&(p[g=p.length]=b);var w=y[b],x="z",T="",C=ca({c:o+g,r:s+v+a});h=v4(i,C),w&&typeof w=="object"&&!(w instanceof Date)?i[C]=w:(typeof w=="number"?x="n":typeof w=="boolean"?x="b":typeof w=="string"?x="s":w instanceof Date?(x="d",n.cellDates||(x="n",w=Ol(w)),T=n.dateNF||gi[14]):w===null&&n.nullError&&(x="e",w=0),h?(h.t=x,h.v=w,delete h.w,delete h.R,T&&(h.z=T)):i[C]=h={t:x,v:w},T&&(h.z=T))})}),d.e.c=Math.max(d.e.c,o+p.length-1);var m=Qs(s);if(a)for(g=0;g<p.length;++g)i[Co(g+o)+m]={t:"s",v:p[g]};return i["!ref"]=qi(d),i}l(Upe,"sheet_add_json");function Awt(t,e){return Upe(null,t,e)}l(Awt,"json_to_sheet");function v4(t,e,r){if(typeof e=="string"){if(Array.isArray(t)){var n=Ss(e);return t[n.r]||(t[n.r]=[]),t[n.r][n.c]||(t[n.r][n.c]={t:"z"})}return t[e]||(t[e]={t:"z"})}return typeof e!="number"?v4(t,ca(e)):v4(t,ca({r:e,c:r||0}))}l(v4,"ws_get_cell_stub");function Nwt(t,e){if(typeof e=="number"){if(e>=0&&t.SheetNames.length>e)return e;throw new Error("Cannot find sheet # "+e)}else if(typeof e=="string"){var r=t.SheetNames.indexOf(e);if(r>-1)return r;throw new Error("Cannot find sheet name |"+e+"|")}else throw new Error("Cannot find sheet |"+e+"|")}l(Nwt,"wb_sheet_idx");function Iwt(){return{SheetNames:[],Sheets:{}}}l(Iwt,"book_new");function Lwt(t,e,r,n){var a=1;if(!r)for(;a<=65535&&t.SheetNames.indexOf(r="Sheet"+a)!=-1;++a,r=void 0);if(!r||t.SheetNames.length>=65535)throw new Error("Too many worksheets");if(n&&t.SheetNames.indexOf(r)>=0){var i=r.match(/(^.*?)(\d+)$/);a=i&&+i[2]||0;var s=i&&i[1]||r;for(++a;a<=65535&&t.SheetNames.indexOf(r=s+a)!=-1;++a);}if(Mpe(r),t.SheetNames.indexOf(r)>=0)throw new Error("Worksheet with name |"+r+"| already exists!");return t.SheetNames.push(r),t.Sheets[r]=e,r}l(Lwt,"book_append_sheet");function $wt(t,e,r){t.Workbook||(t.Workbook={}),t.Workbook.Sheets||(t.Workbook.Sheets=[]);var n=Nwt(t,e);switch(t.Workbook.Sheets[n]||(t.Workbook.Sheets[n]={}),r){case 0:case 1:case 2:break;default:throw new Error("Bad sheet visibility setting "+r)}t.Workbook.Sheets[n].Hidden=r}l($wt,"book_set_sheet_visibility");function Mwt(t,e){return t.z=e,t}l(Mwt,"cell_set_number_format");function jpe(t,e,r){return e?(t.l={Target:e},r&&(t.l.Tooltip=r)):delete t.l,t}l(jpe,"cell_set_hyperlink");function Pwt(t,e,r){return jpe(t,"#"+e,r)}l(Pwt,"cell_set_internal_link");function Rwt(t,e,r){t.c||(t.c=[]),t.c.push({t:e,a:r||"SheetJS"})}l(Rwt,"cell_add_comment");function Owt(t,e,r,n){for(var a=typeof e!="string"?e:Ba(e),i=typeof e=="string"?e:qi(e),s=a.s.r;s<=a.e.r;++s)for(var o=a.s.c;o<=a.e.c;++o){var u=v4(t,s,o);u.t="n",u.F=i,delete u.v,s==a.s.r&&o==a.s.c&&(u.f=r,n&&(u.D=!0))}return t}l(Owt,"sheet_set_array_formula");var tz={encode_col:Co,encode_row:Qs,encode_cell:ca,encode_range:qi,decode_col:OB,decode_row:RB,split_cell:Xmt,decode_cell:Ss,decode_range:fc,format_cell:Ud,sheet_add_aoa:I0e,sheet_add_json:Upe,sheet_add_dom:Fpe,aoa_to_sheet:ew,json_to_sheet:Awt,table_to_sheet:Bpe,table_to_book:iwt,sheet_to_csv:ez,sheet_to_txt:Ype,sheet_to_json:i8,sheet_to_html:Dpe,sheet_to_formulae:kwt,sheet_to_row_object_array:i8,sheet_get_cell:v4,book_new:Iwt,book_append_sheet:Lwt,book_set_sheet_visibility:$wt,cell_set_number_format:Mwt,cell_set_hyperlink:jpe,cell_set_internal_link:Pwt,cell_add_comment:Rwt,sheet_set_array_formula:Owt,consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Dwt(t){return`${(String(t||"export").trim()||"export").replace(/\.(csv|xls|xlsx)$/i,"")}.xlsx`}l(Dwt,"ensureXlsxFilename");function Ah(t,e,r="Sheet1"){const n=tz.aoa_to_sheet(t||[]),a=tz.book_new();tz.book_append_sheet(a,n,r.slice(0,31)||"Sheet1"),Cwt(a,Dwt(e))}l(Ah,"downloadExcelAoa");const rz={lease:"租赁成本",logistics:"物流成本",ops:"运维成本"},Kpe={company_borne:"我司承担",package_h2:"包氢项目"},Xpe={abnormal:"异动",transfer:"调拨"};function Zpe(t,e,r,n){return t.filter(a=>!(!a.occurredAt.startsWith(String(e))||r==="verified"&&a.verifyStatus!=="verified"||n==="own"&&a.fleet!=="own"||n==="external"&&a.fleet!=="external"))}l(Zpe,"filterOrders");function Nh(t){return t.reduce((e,r)=>e+r.amount,0)}l(Nh,"sumAmount");function W0(t){return t.reduce((e,r)=>e+r.quantityKg,0)}l(W0,"sumKg");function s8(t){return t.filter(e=>e.borneBy==="company")}l(s8,"companyCostRows");function o8(t,e){return Nh(s8(t).filter(r=>r.costDim===e))}l(o8,"dimAmount");function Qpe(t,e){return Nh(s8(t).filter(r=>r.costDim==="lease"&&r.leaseKind===e))}l(Qpe,"leaseSubAmount");function Jpe(t,e){return Nh(s8(t).filter(r=>r.costDim==="ops"&&r.opsKind===e))}l(Jpe,"opsSubAmount");function Fwt(t){return[{key:"lease",label:rz.lease,amount:o8(t,"lease"),subs:[{key:"company_borne",label:Kpe.company_borne,amount:Qpe(t,"company_borne")},{key:"package_h2",label:Kpe.package_h2,amount:Qpe(t,"package_h2")}]},{key:"logistics",label:rz.logistics,amount:o8(t,"logistics"),subs:[]},{key:"ops",label:rz.ops,amount:o8(t,"ops"),subs:[{key:"abnormal",label:Xpe.abnormal,amount:Jpe(t,"abnormal")},{key:"transfer",label:Xpe.transfer,amount:Jpe(t,"transfer")}]}]}l(Fwt,"costDimCards");function Bwt(t){return o8(t,"pending")}l(Bwt,"pendingAmount");function zwt(t){const e=t.filter(r=>r.verifyStatus==="unverified");return{amount:Nh(e),count:e.length}}l(zwt,"unverified");function Hwt(t,e){return e?t.filter(r=>r.borneBy!=="company"||r.costDim!==e.dim?!1:e.sub?e.dim==="lease"?r.leaseKind===e.sub:e.dim==="ops"?r.opsKind===e.sub:!0:!0):t}l(Hwt,"applyDimFilter");function Wwt(t,e){return e?Hwt(t,e):s8(t)}l(Wwt,"companyRowsForStats");function Vwt(t){const e=new Map;return t.forEach(r=>{var n;const a=r.occurredAt.slice(0,7),i=`${r.stationId}|${a}`,s=(n=e.get(i))!=null?n:[];s.push(r),e.set(i,s)}),Array.from(e.entries()).map(([r,n])=>{const[a,i]=r.split("|");return{stationId:a,stationName:n[0].stationName,month:i,amount:Nh(n),quantityKg:W0(n),unverifiedAmount:Nh(n.filter(s=>s.verifyStatus==="unverified"))}}).sort((r,n)=>n.amount-r.amount)}l(Vwt,"stationMonthAgg");function Gwt(t){const e=new Map;return t.forEach(r=>{var n;const a=(n=e.get(r.customerId))!=null?n:[];a.push(r),e.set(r.customerId,a)}),Array.from(e.entries()).map(([r,n])=>{const a=n.filter(o=>o.borneBy==="company"),i=n.filter(o=>o.borneBy==="customer");let s="混合";return a.length&&!i.length?s="我司":i.length&&!a.length&&(s="客户"),{customerId:r,customerName:n[0].customerName,borneLabel:s,quantityKg:W0(n),companyCost:Nh(a),unverifiedAmount:Nh(n.filter(o=>o.verifyStatus==="unverified"))}}).sort((r,n)=>n.companyCost-r.companyCost||n.quantityKg-r.quantityKg)}l(Gwt,"customerAttrAgg");function qwt(t,e,r,n){const a=l(O=>Math.round(O*100)/100,"round2"),i=Zpe(r,e,"all","all"),s=W0(i)||1,o=W0(t),u=o/s,h=W0(t.filter(O=>O.borneBy==="company")),d=W0(t.filter(O=>O.borneBy==="customer")),f=h+d||1,p=h/f,g=d/f,m=t.filter(O=>O.occurredAt.startsWith(`${e}-08`)),y=t.filter(O=>O.occurredAt.startsWith(`${e}-08-08`)),v=W0(m),b=W0(y);Nh(m);const w=Nh(y),T=v/(o||1),C=v>0?b/v:0,S=a(n.totalKgT*u),E=a(n.totalFeeWan*u),k=a(n.incomeWan*u),A=a(n.costWan*u),I=a(n.profitWan*u),L=a(S*T),R=a(E*T);return{totalKgT:S,companyKgT:a(S*p),customerKgT:a(S*g),totalFeeWan:E,companyFeeWan:a(E*p),customerFeeWan:a(E*g),profitWan:I,incomeWan:k,costWan:A,monthKgT:L,monthFeeWan:R,monthYearPct:a(T*100),dayKg:a(b>0?b:n.dayKg*u*Math.max(C,.01)),dayFee:Math.round(w>0?w:n.dayFee*u*Math.max(C,.01)),dayMonthPct:a((C||n.dayMonthPct/100)*100),profitRatePct:k>0?a(I/k*100):0}}l(qwt,"computeHostKpi");function Ywt(){const t=[{id:"st-ln",name:"佛山南海羚牛加氢站"},{id:"st-dp",name:"东鹏大道甲醇制氢一体站"},{id:"st-jx",name:"嘉兴中石化滨海加氢站"},{id:"st-jj",name:"嘉兴嘉锦加氢站"},{id:"st-cd",name:"成都中石化天府机场高速北站加氢站"},{id:"st-gz",name:"广州黄埔高新区氢能示范加氢站"},{id:"st-sh",name:"上海安亭加氢站"}],e=["粤A99887","粤B12001","浙A52088","浙F77881","浙A88888F","浙A66666","浙F11223","浙F33445","川A77889","川B99001","沪A33219","粤B88102","浙F99812","浙F66521","粤A11029"],r=["粤A77661","浙F33211","川A55432","沪B98765","粤B66554","浙A22334","粤A99102","川B88761","无车牌(散车)"],n=[{id:"c-ln",name:"羚牛自营",type:"internal",deptId:"d-ops",deptName:"运维中心"},{id:"c-bao",name:"包氢专线项目",type:"internal",deptId:"d-lease",deptName:"租赁业务一部"},{id:"c-lease-a",name:"嘉兴智奇供应链",type:"internal",deptId:"d-lease",deptName:"租赁业务一部"},{id:"c-log",name:"嘉兴益顺冷链",type:"internal",deptId:"d-log",deptName:"物流中心"},{id:"c-log2",name:"四川群彬物流",type:"internal",deptId:"d-log",deptName:"物流中心"},{id:"c-lease-b",name:"无锡铭康物流",type:"internal",deptId:"d-lease",deptName:"租赁业务二部"},{id:"c-ops",name:"运维调拨车辆",type:"internal",deptId:"d-ops",deptName:"运维中心"},{id:"c-pend",name:"待归属样本",type:"internal",deptId:"d-lease",deptName:"租赁业务一部"},{id:"c-ext-a",name:"广东氢动力",type:"external",deptId:"d-sales",deptName:"能源销售"},{id:"c-ext-b",name:"广东清运专线",type:"external",deptId:"d-sales",deptName:"能源销售"},{id:"c-ext-c",name:"东展供应链",type:"external",deptId:"d-sales",deptName:"能源销售"},{id:"c-ext-d",name:"顺丰冷运专线",type:"external",deptId:"d-sales",deptName:"能源销售"},{id:"c-ext-e",name:"极兔速递冷链",type:"external",deptId:"d-sales",deptName:"能源销售"}],a=[];for(let i=1;i<=200;i++){const s=String(i).padStart(3,"0");let o=2026,u=Math.floor(i%8)+1;i>145&&i<=185?(o=2025,u=Math.floor(i%12)+1):i>185&&(o=2024,u=Math.floor(i%12)+1);const h=i*7%28+1,d=i*3%14+7,f=i*11%50+5,p=u<10?`0${u}`:`${u}`,g=h<10?`0${h}`:`${h}`,m=d<10?`0${d}`:`${d}`,y=f<10?`0${f}`:`${f}`,v=`${o}-${p}-${g} ${m}:${y}`,b=t[i%t.length],w=n[i%n.length],x=w.type==="internal",T=x?"own":"external",C=x?e[i%e.length]:r[i%r.length],S=[28,30,32,35][i%4],E=Math.round((18+i*3.7%85)*100)/100,k=Math.round(E*S);let A="company",I="lease",L,R;(w.id==="c-ext-a"||w.id==="c-ext-d")&&(A="customer");const O=i%5;O===0?(I="lease",L="company_borne"):O===1?(I="lease",L="package_h2"):O===2?I="logistics":O===3?(I="ops",R=i%2===0?"abnormal":"transfer"):I="pending";const M=x?i%4===0?"unverified":"verified":"unverified",P=x?i%3===0?"manual":i%3===1?"fence":"api":i%2===0?"api":"manual";a.push({id:`HO-${String(o).slice(2)}${p}-${s}`,occurredAt:v,stationId:b.id,stationName:b.name,plateNo:C,customerId:w.id,customerName:w.name,deptId:w.deptId,deptName:w.deptName,amount:k,quantityKg:E,unitPrice:S,borneBy:A,costDim:I,leaseKind:L,opsKind:R,verifyStatus:M,source:P,fleet:T})}return a}l(Ywt,"generate200MockOrders");const ege=Ywt(),Ih={totalKgT:697.16,totalFeeWan:2093.71,profitWan:13.01,incomeWan:743.88,costWan:2093.71,monthKgT:16.67,dayKg:181.78,dayFee:6533,dayMonthPct:1.1},Uwt=2026;var jwt=Object.defineProperty,Kwt=Object.defineProperties,Xwt=Object.getOwnPropertyDescriptors,tge=Object.getOwnPropertySymbols,Zwt=Object.prototype.hasOwnProperty,Qwt=Object.prototype.propertyIsEnumerable,rge=l((t,e,r)=>e in t?jwt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp$3"),nz=l((t,e)=>{for(var r in e||(e={}))Zwt.call(e,r)&&rge(t,r,e[r]);if(tge)for(var r of tge(e))Qwt.call(e,r)&&rge(t,r,e[r]);return t},"__spreadValues$3"),az=l((t,e)=>Kwt(t,Xwt(e)),"__spreadProps$3");const uw={api:"API接入",station_report:"站点上报",lingniu_report:"羚牛上报"},Jwt={self_use:"自用消费",external_sale:"对外销售"},b4={verified:"已核对",unverified:"未核对"},l8=[{date:"2026-08-08",shortDate:"08-08",unitPrice:30,quantityKg:3139.12,amountYuan:94173.6,momPct:1626.9,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:1800,amountYuan:54e3,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:1100,amountYuan:33e3,vehicles:[{id:"v-101",time:"08:15",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:45.2,unitPrice:30,amountYuan:1356,source:"api",verifyStatus:"verified"},{id:"v-102",time:"09:30",plateNo:"浙A66666F",fleetCategory:"own",quantityKg:54.8,unitPrice:30,amountYuan:1644,source:"lingniu_report",verifyStatus:"verified"},{id:"v-103",time:"11:20",plateNo:"浙A33333F",fleetCategory:"own",quantityKg:40,unitPrice:30,amountYuan:1200,source:"station_report",verifyStatus:"unverified"},{id:"v-104",time:"14:00",plateNo:"浙A99999F",fleetCategory:"own",quantityKg:960,unitPrice:30,amountYuan:28800,source:"api",verifyStatus:"verified"}]},{customerId:"c-qd",customerName:"广东氢动力科技服务有限公司",quantityKg:700,amountYuan:21e3,vehicles:[{id:"v-201",time:"10:10",plateNo:"粤B12345D",fleetCategory:"external",quantityKg:350,unitPrice:30,amountYuan:10500,source:"station_report",verifyStatus:null},{id:"v-202",time:"15:45",plateNo:null,fleetCategory:"external",quantityKg:350,unitPrice:30,amountYuan:10500,source:"api",verifyStatus:null}]}]},{stationId:"st-fs",stationName:"佛山南海加氢站",stationType:"external_sale",unitPrice:38,quantityKg:1339.12,amountYuan:50886.56,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:500,amountYuan:19e3,vehicles:[{id:"v-300",time:"06:50",plateNo:"粤B88666D",fleetCategory:"own",quantityKg:500,unitPrice:38,amountYuan:19e3,source:"api",verifyStatus:"verified"}]},{customerId:"c-qy",customerName:"广东清运科技有限公司",quantityKg:300,amountYuan:11400,vehicles:[{id:"v-301",time:"07:40",plateNo:"粤E88111D",fleetCategory:"external",quantityKg:300,unitPrice:38,amountYuan:11400,source:"station_report",verifyStatus:null}]},{customerId:"c-dp",customerName:"东展供应链(广州)有限公司",quantityKg:539.12,amountYuan:20486.56,vehicles:[{id:"v-401",time:"16:00",plateNo:"粤A99888D",fleetCategory:"external",quantityKg:539.12,unitPrice:38,amountYuan:20486.56,source:"api",verifyStatus:null}]}]}]},{date:"2026-08-07",shortDate:"08-07",unitPrice:30,quantityKg:1181.78,amountYuan:35453.4,momPct:-62.3,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:681.78,amountYuan:20453.4,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:181.78,amountYuan:5453.4,vehicles:[{id:"v-501",time:"09:00",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:81.78,unitPrice:30,amountYuan:2453.4,source:"lingniu_report",verifyStatus:"verified"},{id:"v-502",time:"14:30",plateNo:"浙A66666F",fleetCategory:"own",quantityKg:100,unitPrice:30,amountYuan:3e3,source:"api",verifyStatus:"verified"}]},{customerId:"c-qy",customerName:"广东清运科技有限公司",quantityKg:500,amountYuan:15e3,vehicles:[{id:"v-503",time:"16:10",plateNo:null,fleetCategory:"external",quantityKg:500,unitPrice:30,amountYuan:15e3,source:"station_report",verifyStatus:null}]}]},{stationId:"st-jj",stationName:"嘉兴嘉锦加氢站",stationType:"self_use",unitPrice:30,quantityKg:500,amountYuan:15e3,customers:[{customerId:"c-qd",customerName:"广东氢动力科技服务有限公司",quantityKg:500,amountYuan:15e3,vehicles:[{id:"v-504",time:"11:00",plateNo:"粤B99111D",fleetCategory:"external",quantityKg:500,unitPrice:30,amountYuan:15e3,source:"api",verifyStatus:null}]}]}]},{date:"2026-08-06",shortDate:"08-06",unitPrice:30,quantityKg:2250,amountYuan:67500,momPct:90.4,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:1250,amountYuan:37500,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:850,amountYuan:25500,vehicles:[{id:"v-601",time:"10:00",plateNo:"浙A55555F",fleetCategory:"own",quantityKg:450,unitPrice:30,amountYuan:13500,source:"api",verifyStatus:"verified"},{id:"v-602",time:"16:00",plateNo:"浙A33333F",fleetCategory:"own",quantityKg:400,unitPrice:30,amountYuan:12e3,source:"lingniu_report",verifyStatus:"unverified"}]},{customerId:"c-qd",customerName:"广东氢动力科技服务有限公司",quantityKg:400,amountYuan:12e3,vehicles:[{id:"v-603",time:"17:30",plateNo:"粤B33888D",fleetCategory:"external",quantityKg:400,unitPrice:30,amountYuan:12e3,source:"station_report",verifyStatus:null}]}]},{stationId:"st-dp",stationName:"东鹏加氢站(对外)",stationType:"external_sale",unitPrice:38,quantityKg:1e3,amountYuan:38e3,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:300,amountYuan:11400,vehicles:[{id:"v-700",time:"09:10",plateNo:"浙A11222F",fleetCategory:"own",quantityKg:300,unitPrice:38,amountYuan:11400,source:"api",verifyStatus:"verified"}]},{customerId:"c-dp",customerName:"东展供应链(广州)有限公司",quantityKg:700,amountYuan:26600,vehicles:[{id:"v-701",time:"11:30",plateNo:null,fleetCategory:"external",quantityKg:700,unitPrice:38,amountYuan:26600,source:"station_report",verifyStatus:null}]}]}]},{date:"2026-08-05",shortDate:"08-05",unitPrice:30,quantityKg:2720,amountYuan:81600,momPct:20.9,stations:[{stationId:"st-jj",stationName:"嘉兴嘉锦加氢站",stationType:"self_use",unitPrice:30,quantityKg:2720,amountYuan:81600,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:1720,amountYuan:51600,vehicles:[{id:"v-801",time:"08:00",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:860,unitPrice:30,amountYuan:25800,source:"api",verifyStatus:"verified"},{id:"v-802",time:"15:20",plateNo:"浙A99999F",fleetCategory:"own",quantityKg:860,unitPrice:30,amountYuan:25800,source:"lingniu_report",verifyStatus:"verified"}]},{customerId:"c-qy",customerName:"广东清运科技有限公司",quantityKg:1e3,amountYuan:3e4,vehicles:[{id:"v-803",time:"18:00",plateNo:"粤E99999D",fleetCategory:"external",quantityKg:1e3,unitPrice:30,amountYuan:3e4,source:"api",verifyStatus:null}]}]}]},{date:"2026-08-04",shortDate:"08-04",unitPrice:30,quantityKg:3150,amountYuan:94500,momPct:1.6,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:3150,amountYuan:94500,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:1e3,amountYuan:3e4,vehicles:[{id:"v-900",time:"07:30",plateNo:"浙A77777F",fleetCategory:"own",quantityKg:1e3,unitPrice:30,amountYuan:3e4,source:"api",verifyStatus:"verified"}]},{customerId:"c-qd",customerName:"广东氢动力科技服务有限公司",quantityKg:2150,amountYuan:64500,vehicles:[{id:"v-901",time:"09:10",plateNo:"粤B88888D",fleetCategory:"external",quantityKg:1075,unitPrice:30,amountYuan:32250,source:"station_report",verifyStatus:null},{id:"v-902",time:"16:40",plateNo:"粤B99999D",fleetCategory:"external",quantityKg:1075,unitPrice:30,amountYuan:32250,source:"api",verifyStatus:null}]}]}]},{date:"2026-08-03",shortDate:"08-03",unitPrice:30,quantityKg:3100,amountYuan:93e3,momPct:5.1,stations:[{stationId:"st-sh",stationName:"上海金山加氢站",stationType:"self_use",unitPrice:30,quantityKg:3100,amountYuan:93e3,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2100,amountYuan:63e3,vehicles:[{id:"v-1001",time:"10:30",plateNo:"沪A88111F",fleetCategory:"own",quantityKg:2100,unitPrice:30,amountYuan:63e3,source:"api",verifyStatus:"verified"}]},{customerId:"c-dp",customerName:"东展供应链(广州)有限公司",quantityKg:1e3,amountYuan:3e4,vehicles:[{id:"v-1002",time:"15:10",plateNo:null,fleetCategory:"external",quantityKg:1e3,unitPrice:30,amountYuan:3e4,source:"station_report",verifyStatus:null}]}]}]},{date:"2026-08-02",shortDate:"08-02",unitPrice:30,quantityKg:2950,amountYuan:88500,momPct:-18.5,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:2950,amountYuan:88500,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2e3,amountYuan:6e4,vehicles:[{id:"v-1101",time:"08:45",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:1e3,unitPrice:30,amountYuan:3e4,source:"lingniu_report",verifyStatus:"verified"},{id:"v-1102",time:"14:15",plateNo:"浙A66666F",fleetCategory:"own",quantityKg:1e3,unitPrice:30,amountYuan:3e4,source:"api",verifyStatus:"verified"}]},{customerId:"c-qy",customerName:"广东清运科技有限公司",quantityKg:950,amountYuan:28500,vehicles:[{id:"v-1103",time:"17:00",plateNo:null,fleetCategory:"external",quantityKg:950,unitPrice:30,amountYuan:28500,source:"station_report",verifyStatus:null}]}]}]},{date:"2026-08-01",shortDate:"08-01",unitPrice:30,quantityKg:3620,amountYuan:108600,momPct:1.1,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:2e3,amountYuan:6e4,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2e3,amountYuan:6e4,vehicles:[{id:"v-1201",time:"09:00",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:2e3,unitPrice:30,amountYuan:6e4,source:"api",verifyStatus:"verified"}]}]},{stationId:"st-jj",stationName:"嘉兴嘉锦加氢站",stationType:"self_use",unitPrice:30,quantityKg:1620,amountYuan:48600,customers:[{customerId:"c-qd",customerName:"广东氢动力科技服务有限公司",quantityKg:1620,amountYuan:48600,vehicles:[{id:"v-1202",time:"11:20",plateNo:"粤B33333D",fleetCategory:"external",quantityKg:1620,unitPrice:30,amountYuan:48600,source:"station_report",verifyStatus:null}]}]}]},{date:"2026-07-31",shortDate:"07-31",unitPrice:30,quantityKg:3580,amountYuan:107400,momPct:-4.5,stations:[{stationId:"st-jj",stationName:"嘉兴嘉锦加氢站",stationType:"self_use",unitPrice:30,quantityKg:3580,amountYuan:107400,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2580,amountYuan:77400,vehicles:[{id:"v-1301",time:"10:00",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:2580,unitPrice:30,amountYuan:77400,source:"api",verifyStatus:"verified"}]},{customerId:"c-qd",customerName:"广东氢动力科技服务有限公司",quantityKg:1e3,amountYuan:3e4,vehicles:[{id:"v-1302",time:"16:00",plateNo:"粤B55555D",fleetCategory:"external",quantityKg:1e3,unitPrice:30,amountYuan:3e4,source:"api",verifyStatus:null}]}]}]},{date:"2026-07-30",shortDate:"07-30",unitPrice:30,quantityKg:3750,amountYuan:112500,momPct:8.7,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:3750,amountYuan:112500,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:3750,amountYuan:112500,vehicles:[{id:"v-1401",time:"08:30",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:3750,unitPrice:30,amountYuan:112500,source:"lingniu_report",verifyStatus:"verified"}]}]}]},{date:"2026-07-29",shortDate:"07-29",unitPrice:30,quantityKg:3450,amountYuan:103500,momPct:15.8,stations:[{stationId:"st-hz",stationName:"杭州临安加氢站",stationType:"self_use",unitPrice:30,quantityKg:3450,amountYuan:103500,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2450,amountYuan:73500,vehicles:[{id:"v-1501",time:"13:00",plateNo:"浙A66666F",fleetCategory:"own",quantityKg:2450,unitPrice:30,amountYuan:73500,source:"api",verifyStatus:"verified"}]},{customerId:"c-qy",customerName:"广东清运科技有限公司",quantityKg:1e3,amountYuan:3e4,vehicles:[{id:"v-1502",time:"17:40",plateNo:"浙A99111D",fleetCategory:"external",quantityKg:1e3,unitPrice:30,amountYuan:3e4,source:"station_report",verifyStatus:null}]}]}]},{date:"2026-07-28",shortDate:"07-28",unitPrice:30,quantityKg:2980.2,amountYuan:89406,momPct:-4.5,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:2980.2,amountYuan:89406,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2980.2,amountYuan:89406,vehicles:[{id:"v-1601",time:"15:10",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:2980.2,unitPrice:30,amountYuan:89406,source:"lingniu_report",verifyStatus:"verified"}]}]}]},{date:"2026-07-27",shortDate:"07-27",unitPrice:30,quantityKg:3120,amountYuan:93600,momPct:33.3,stations:[{stationId:"st-sh",stationName:"上海金山加氢站",stationType:"self_use",unitPrice:30,quantityKg:3120,amountYuan:93600,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2120,amountYuan:63600,vehicles:[{id:"v-1701",time:"11:00",plateNo:"沪A88111F",fleetCategory:"own",quantityKg:2120,unitPrice:30,amountYuan:63600,source:"api",verifyStatus:"verified"}]},{customerId:"c-dp",customerName:"东展供应链(广州)有限公司",quantityKg:1e3,amountYuan:3e4,vehicles:[{id:"v-1702",time:"16:20",plateNo:null,fleetCategory:"external",quantityKg:1e3,unitPrice:30,amountYuan:3e4,source:"station_report",verifyStatus:null}]}]}]},{date:"2026-07-26",shortDate:"07-26",unitPrice:30,quantityKg:2340.5,amountYuan:70215,momPct:-36.5,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:2340.5,amountYuan:70215,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2340.5,amountYuan:70215,vehicles:[{id:"v-1801",time:"14:20",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:2340.5,unitPrice:30,amountYuan:70215,source:"api",verifyStatus:"verified"}]}]}]},{date:"2026-07-25",shortDate:"07-25",unitPrice:30,quantityKg:3683,amountYuan:110490,momPct:null,stations:[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:2183,amountYuan:65490,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",quantityKg:2183,amountYuan:65490,vehicles:[{id:"v-1901",time:"09:30",plateNo:"浙A88888F",fleetCategory:"own",quantityKg:2183,unitPrice:30,amountYuan:65490,source:"api",verifyStatus:"verified"}]}]},{stationId:"st-jj",stationName:"嘉兴嘉锦加氢站",stationType:"self_use",unitPrice:30,quantityKg:1500,amountYuan:45e3,customers:[{customerId:"c-qd",customerName:"广东氢动力科技服务有限公司",quantityKg:1500,amountYuan:45e3,vehicles:[{id:"v-1902",time:"16:00",plateNo:"粤B12345D",fleetCategory:"external",quantityKg:1500,unitPrice:30,amountYuan:45e3,source:"station_report",verifyStatus:null}]}]}]}];function eTt(t,e){if(!t||!e)return l8;const r=t.split("-").map(Number),n=e.split("-").map(Number);if(r.length!==3||n.length!==3)return l8;const a=new Date(r[0],r[1]-1,r[2]),i=new Date(n[0],n[1]-1,n[2]);if(isNaN(a.getTime())||isNaN(i.getTime())||a>i)return l8;const s=Math.abs(i.getTime()-a.getTime()),o=Math.min(180,Math.ceil(s/(1e3*60*60*24))+1),u=new Map;l8.forEach(d=>u.set(d.date,d));const h=[];for(let d=0;d<o;d++){const f=new Date(i.getTime()-d*864e5),p=f.getFullYear(),g=String(f.getMonth()+1).padStart(2,"0"),m=String(f.getDate()).padStart(2,"0"),y=`${p}-${g}-${m}`,v=`${g}-${m}`;if(u.has(y))h.push(u.get(y));else{const b=p*1e4+Number(g)*100+Number(m),w=2200+b%1400+b%9*60,x=Math.round(w*.62*10)/10,T=Math.round(w*.38*10)/10,C=Math.round((x+T)*10)/10;h.push({date:y,shortDate:v,unitPrice:30,quantityKg:C,amountYuan:Math.round(C*30*10)/10,momPct:Math.round((b%24-12)*10)/10,stations:[{stationId:`st-jx-${y}`,stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",unitPrice:30,quantityKg:x,amountYuan:Math.round(x*30),prechargeBalance:128500+b%4e3,customers:[{customerId:"c-ln",customerName:"羚牛氢能科技(广东)有限公司",customerCategory:"internal",quantityKg:x,amountYuan:Math.round(x*30),vehicles:[{id:`v-gen1-${y}`,time:"08:30",plateNo:`浙A${b%89999+1e4}F`,fleetCategory:"own",quantityKg:Math.round(x*.65*10)/10,unitPrice:30,amountYuan:Math.round(x*.65*30),source:"api",verifyStatus:"verified"},{id:`v-gen2-${y}`,time:"14:20",plateNo:`浙A${b%79999+1e4}F`,fleetCategory:"own",quantityKg:Math.round(x*.35*10)/10,unitPrice:30,amountYuan:Math.round(x*.35*30),source:"station_report",verifyStatus:b%2===0?"verified":"unverified"}]}]},{stationId:`st-fs-${y}`,stationName:"佛山南海加氢站",stationType:"external_sale",unitPrice:35,quantityKg:T,amountYuan:Math.round(T*35),prechargeBalance:92e3+b%3e3,customers:[{customerId:"c-qd",customerName:"广东氢动力科技服务有限公司",customerCategory:"external",quantityKg:T,amountYuan:Math.round(T*35),vehicles:[{id:`v-gen3-${y}`,time:"10:15",plateNo:`粤B${b%89999+1e4}D`,fleetCategory:"external",quantityKg:Math.round(T*.7*10)/10,unitPrice:35,amountYuan:Math.round(T*.7*35),source:"api",verifyStatus:null},{id:`v-gen4-${y}`,time:"16:40",plateNo:null,fleetCategory:"external",quantityKg:Math.round(T*.3*10)/10,unitPrice:35,amountYuan:Math.round(T*.3*35),source:"station_report",verifyStatus:null}]}]}]})}}return h}l(eTt,"getDailyDataForRange");function tTt(t,e){if(e==="all")return t;const r=[];for(const n of t){const a=[];for(const i of n.stations){const s=[];for(const o of i.customers){const u=(o.vehicles||[]).filter(h=>h.fleetCategory===e);if(u.length>0){const h=u.reduce((f,p)=>f+p.quantityKg,0),d=u.reduce((f,p)=>f+p.amountYuan,0);s.push(az(nz({},o),{quantityKg:Math.round(h*100)/100,amountYuan:Math.round(d*100)/100,vehicles:u}))}}if(s.length>0){const o=s.reduce((h,d)=>h+d.quantityKg,0),u=s.reduce((h,d)=>h+d.amountYuan,0);a.push(az(nz({},i),{quantityKg:Math.round(o*100)/100,amountYuan:Math.round(u*100)/100,customers:s}))}}if(a.length>0){const i=a.reduce((o,u)=>o+u.quantityKg,0),s=a.reduce((o,u)=>o+u.amountYuan,0);r.push(az(nz({},n),{quantityKg:Math.round(i*100)/100,amountYuan:Math.round(s*100)/100,stations:a}))}}for(let n=0;n<r.length;n++){const a=r[n],i=r[n+1];if(i&&i.quantityKg>0){const s=(a.quantityKg-i.quantityKg)/i.quantityKg*100;a.momPct=Math.round(s*10)/10}else a.momPct=null}return r}l(tTt,"filterDailyDataByFleet");function rTt(t,e){const r=Math.round(t.reduce((w,x)=>w+x.quantityKg,0)*10)/10;let n=0,a=0;t.forEach(w=>{w.stations.forEach(x=>{x.customers.forEach(T=>{T.vehicles.forEach(C=>{C.fleetCategory==="own"?n+=C.quantityKg:a+=C.quantityKg})})})}),n=Math.round(n*10)/10,a=Math.round(a*10)/10;let i="全部车辆",s=`内部 ${n.toLocaleString("zh-CN")}Kg · 外部 ${a.toLocaleString("zh-CN")}Kg`;e==="own"?(i="羚牛车辆",s="内部车辆归属口径"):e==="external"&&(i="外部车辆",s="外部车辆归属口径");const o=t.length,u=`${o} 天`,h=o>0?Math.round(r/o*10)/10:0,d=`${h.toLocaleString("zh-CN")} Kg`,f=new Set;t.forEach(w=>w.stations.forEach(x=>f.add(x.stationId)));const p=f.size;let g=null,m=null;t.forEach(w=>{(!g||w.quantityKg>g.quantityKg)&&(g=w),(!m||w.quantityKg<m.quantityKg)&&(m=w)});const y=g?`${g.shortDate} · ${Math.round(g.quantityKg).toLocaleString("zh-CN")}`:"-",v=m?`${m.shortDate} · ${Math.round(m.quantityKg).toLocaleString("zh-CN")}`:"-",b=t.length>0?`${t[t.length-1].date} 至 ${t[0].date}`:"无数据";return{totalQuantityKg:r,dateRange:b,fleetTypeLabel:i,fleetSubLabel:s,ownKg:n,extKg:a,activeDays:u,dailyAvgKg:d,dailyAvgKgNum:h,stationCount:p,peakDayLabel:y,troughDayLabel:v,zeroDaysCount:0}}l(rTt,"calculateDailyKpis");const nge={wechat_scan:"微信扫码",bank_transfer:"对公转账",other:"其他"};var nTt=Object.defineProperty,aTt=Object.defineProperties,iTt=Object.getOwnPropertyDescriptors,age=Object.getOwnPropertySymbols,sTt=Object.prototype.hasOwnProperty,oTt=Object.prototype.propertyIsEnumerable,ige=l((t,e,r)=>e in t?nTt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp$2"),lTt=l((t,e)=>{for(var r in e||(e={}))sTt.call(e,r)&&ige(t,r,e[r]);if(age)for(var r of age(e))oTt.call(e,r)&&ige(t,r,e[r]);return t},"__spreadValues$2"),cTt=l((t,e)=>aTt(t,iTt(e)),"__spreadProps$2");const sge="oneos-energy-spot-cash-intake-v4",uTt=["oneos-energy-spot-cash-intake-v3","oneos-energy-spot-cash-intake-v2"];function hTt(){return[{id:"day-st-fs-nanhai-2026-08-02",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-02",totalAmount:2530.42,lines:[{id:"line-st-fs-nanhai-2026-08-02-0",customerName:"东展供应链(广州)有限公司",amount:655.12,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-02-1",customerName:"广东开鸿氢能科技有限公司",amount:503.88,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-02-2",customerName:"现代氢能科技有限公司",amount:760.38,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-02-3",customerName:"广东氢动力科技服务有限公司",amount:296.78,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-02-4",customerName:"羚牛氢能科技(广东)有限公司",amount:314.26,payMethod:"wechat_scan"}],updatedBy:"杨凤娥",updatedAt:"2026-08-02 18:00"},{id:"day-st-fs-nanhai-2026-08-03",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-03",totalAmount:2193.36,lines:[{id:"line-st-fs-nanhai-2026-08-03-0",customerName:"现代氢能科技有限公司",amount:1259.7,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-03-1",customerName:"羚牛氢能科技(广东)有限公司",amount:634.22,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-03-2",customerName:"东展供应链(广州)有限公司",amount:299.44,payMethod:"wechat_scan"}],updatedBy:"杨凤娥",updatedAt:"2026-08-03 18:00"},{id:"day-st-fs-nanhai-2026-08-04",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-04",totalAmount:5216.16,lines:[{id:"line-st-fs-nanhai-2026-08-04-0",customerName:"广东沣开科技有限公司",amount:3e3,payMethod:"bank_transfer"},{id:"line-st-fs-nanhai-2026-08-04-1",customerName:"现代氢能科技有限公司",amount:1024.1,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-04-2",customerName:"羚牛氢能科技(广东)有限公司",amount:473.86,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-04-3",customerName:"广东氢动力科技服务有限公司",amount:368.6,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-04-4",customerName:"东展供应链(广州)有限公司",amount:163.78,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-04-5",customerName:"外省过路车",amount:185.82,payMethod:"wechat_scan"}],updatedBy:"杨凤娥",updatedAt:"2026-08-04 18:00"},{id:"day-st-fs-nanhai-2026-08-05",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-05",totalAmount:3469.78,lines:[{id:"line-st-fs-nanhai-2026-08-05-0",customerName:"现代氢能科技有限公司",amount:1155.58,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-05-1",customerName:"羚牛氢能科技(广东)有限公司",amount:608,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-05-2",customerName:"广东氢动力科技服务有限公司",amount:530.86,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-05-3",customerName:"广东开鸿氢能科技有限公司",amount:315.78,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-05-4",customerName:"东展供应链(广州)有限公司",amount:859.56,payMethod:"wechat_scan"}],updatedBy:"杨凤娥",updatedAt:"2026-08-05 18:00"},{id:"day-st-fs-nanhai-2026-08-06",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-06",totalAmount:1006.24,lines:[{id:"line-st-fs-nanhai-2026-08-06-0",customerName:"现代氢能科技有限公司",amount:478.8,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-06-1",customerName:"羚牛氢能科技(广东)有限公司",amount:527.44,payMethod:"wechat_scan"}],updatedBy:"杨凤娥",updatedAt:"2026-08-06 18:00"},{id:"day-st-fs-nanhai-2026-08-07",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-07",totalAmount:22094.18,lines:[{id:"line-st-fs-nanhai-2026-08-07-0",customerName:"东展供应链(广州)有限公司",amount:201.02,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-07-1",customerName:"现代氢能科技有限公司",amount:1410.18,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-07-2",customerName:"羚牛氢能科技(广东)有限公司",amount:482.98,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-07-3",customerName:"羚牛氢能科技(广东)有限公司",amount:2e4,payMethod:"bank_transfer"}],updatedBy:"杨凤娥",updatedAt:"2026-08-07 18:00"},{id:"day-st-fs-nanhai-2026-08-08",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-08",totalAmount:2845.06,lines:[{id:"line-st-fs-nanhai-2026-08-08-0",customerName:"东展供应链(广州)有限公司",amount:745.94,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-08-1",customerName:"现代氢能科技有限公司",amount:1371.8,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-08-2",customerName:"羚牛氢能科技(广东)有限公司",amount:727.32,payMethod:"wechat_scan"}],updatedBy:"杨凤娥",updatedAt:"2026-08-08 18:00"},{id:"day-st-fs-nanhai-2026-08-09",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-09",totalAmount:2485.58,lines:[{id:"line-st-fs-nanhai-2026-08-09-0",customerName:"现代氢能科技有限公司",amount:775.2,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-09-1",customerName:"羚牛氢能科技(广东)有限公司",amount:987.62,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-09-2",customerName:"广东氢动力科技服务有限公司",amount:250.42,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-09-3",customerName:"东展供应链(广州)有限公司",amount:472.34,payMethod:"wechat_scan"}],updatedBy:"杨凤娥",updatedAt:"2026-08-09 18:00"},{id:"day-st-fs-nanhai-2026-08-10",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-10",totalAmount:22823.78,lines:[{id:"line-st-fs-nanhai-2026-08-10-0",customerName:"现代氢能科技有限公司",amount:1582.7,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-10-1",customerName:"羚牛氢能科技(广东)有限公司",amount:757.34,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-10-2",customerName:"广东氢动力科技服务有限公司",amount:186.2,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-10-3",customerName:"东展供应链(广州)有限公司",amount:297.54,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-10-4",customerName:"广东瀚清能源有限公司",amount:2e4,payMethod:"bank_transfer"}],updatedBy:"杨凤娥",updatedAt:"2026-08-10 18:00"},{id:"day-st-fs-nanhai-2026-08-11",stationId:"st-fs-nanhai",stationName:"佛山南海羚牛加氢站",bizDate:"2026-08-11",totalAmount:2301.04,lines:[{id:"line-st-fs-nanhai-2026-08-11-0",customerName:"现代氢能科技有限公司",amount:755.06,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-11-1",customerName:"羚牛氢能科技(广东)有限公司",amount:596.36,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-11-2",customerName:"广东开鸿氢能科技有限公司",amount:599.26,payMethod:"wechat_scan"},{id:"line-st-fs-nanhai-2026-08-11-3",customerName:"东展供应链(广州)有限公司",amount:350.36,payMethod:"wechat_scan"}],updatedBy:"杨凤娥",updatedAt:"2026-08-11 18:00"},{id:"day-st-dp-dongpeng-2026-06-26",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-06-26",totalAmount:1e4,lines:[{id:"line-st-dp-dongpeng-2026-06-26-0",customerName:"广州市梅洛特物流有限公司",amount:1e4,payMethod:"bank_transfer"}],updatedBy:"金可鹏",updatedAt:"2026-06-26 18:00"},{id:"day-st-dp-dongpeng-2026-07-01",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-01",totalAmount:1506.75,lines:[{id:"line-st-dp-dongpeng-2026-07-01-0",customerName:"广州新运多租赁有限公司",amount:1506.75,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-01 18:00"},{id:"day-st-dp-dongpeng-2026-07-02",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-02",totalAmount:596.4,lines:[{id:"line-st-dp-dongpeng-2026-07-02-0",customerName:"广州中味餐饮服务有限公司",amount:96.25,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-02-1",customerName:"广州新运多租赁有限公司",amount:500.15,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-02 18:00"},{id:"day-st-dp-dongpeng-2026-07-03",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-03",totalAmount:918.4,lines:[{id:"line-st-dp-dongpeng-2026-07-03-0",customerName:"广州新运多租赁有限公司",amount:918.4,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-03 18:00"},{id:"day-st-dp-dongpeng-2026-07-04",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-04",totalAmount:349.3,lines:[{id:"line-st-dp-dongpeng-2026-07-04-0",customerName:"广州新运多租赁有限公司",amount:349.3,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-04 18:00"},{id:"day-st-dp-dongpeng-2026-07-07",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-07",totalAmount:20640.15,lines:[{id:"line-st-dp-dongpeng-2026-07-07-0",customerName:"广州市梅洛特物流有限公司",amount:2e4,payMethod:"bank_transfer"},{id:"line-st-dp-dongpeng-2026-07-07-1",customerName:"广州中味餐饮服务有限公司",amount:362.25,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-07-2",customerName:"广州新运多租赁有限公司",amount:277.9,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-07 18:00"},{id:"day-st-dp-dongpeng-2026-07-08",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-08",totalAmount:896.35,lines:[{id:"line-st-dp-dongpeng-2026-07-08-0",customerName:"广州新运多租赁有限公司",amount:896.35,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-08 18:00"},{id:"day-st-dp-dongpeng-2026-07-09",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-09",totalAmount:902.65,lines:[{id:"line-st-dp-dongpeng-2026-07-09-0",customerName:"广州中味餐饮服务有限公司",amount:211.4,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-09-1",customerName:"广州新运多租赁有限公司",amount:691.25,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-09 18:00"},{id:"day-st-dp-dongpeng-2026-07-10",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-10",totalAmount:1198.05,lines:[{id:"line-st-dp-dongpeng-2026-07-10-0",customerName:"广州中味餐饮服务有限公司",amount:314.65,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-10-1",customerName:"广州新运多租赁有限公司",amount:883.4,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-10 18:00"},{id:"day-st-dp-dongpeng-2026-07-14",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-14",totalAmount:266.7,lines:[{id:"line-st-dp-dongpeng-2026-07-14-0",customerName:"广州中味餐饮服务有限公司",amount:266.7,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-14 18:00"},{id:"day-st-dp-dongpeng-2026-07-15",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-15",totalAmount:562.8,lines:[{id:"line-st-dp-dongpeng-2026-07-15-0",customerName:"广州中味餐饮服务有限公司",amount:262.5,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-15-1",customerName:"广州新运多租赁有限公司",amount:300.3,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-15 18:00"},{id:"day-st-dp-dongpeng-2026-07-16",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-16",totalAmount:497.7,lines:[{id:"line-st-dp-dongpeng-2026-07-16-0",customerName:"广州中味餐饮服务有限公司",amount:200.9,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-16-1",customerName:"广州新运多租赁有限公司",amount:296.8,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-16 18:00"},{id:"day-st-dp-dongpeng-2026-07-17",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-17",totalAmount:911.4,lines:[{id:"line-st-dp-dongpeng-2026-07-17-0",customerName:"广州新运多租赁有限公司",amount:911.4,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-17 18:00"},{id:"day-st-dp-dongpeng-2026-07-18",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-18",totalAmount:870.45,lines:[{id:"line-st-dp-dongpeng-2026-07-18-0",customerName:"广州新运多租赁有限公司",amount:870.45,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-18 18:00"},{id:"day-st-dp-dongpeng-2026-07-19",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-19",totalAmount:468.65,lines:[{id:"line-st-dp-dongpeng-2026-07-19-0",customerName:"广州中味餐饮服务有限公司",amount:181.3,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-19-1",customerName:"广州新运多租赁有限公司",amount:287.35,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-19 18:00"},{id:"day-st-dp-dongpeng-2026-07-20",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-20",totalAmount:708.75,lines:[{id:"line-st-dp-dongpeng-2026-07-20-0",customerName:"广州新运多租赁有限公司",amount:480.55,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-20-1",customerName:"广州中味餐饮服务有限公司",amount:228.2,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-20 18:00"},{id:"day-st-dp-dongpeng-2026-07-21",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-21",totalAmount:234.85,lines:[{id:"line-st-dp-dongpeng-2026-07-21-0",customerName:"广州新运多租赁有限公司",amount:234.85,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-21 18:00"},{id:"day-st-dp-dongpeng-2026-07-25",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-25",totalAmount:20686,lines:[{id:"line-st-dp-dongpeng-2026-07-25-0",customerName:"广州新运多租赁有限公司",amount:686,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-25-1",customerName:"广州福满华冷链物流有限公司",amount:2e4,payMethod:"bank_transfer"}],updatedBy:"金可鹏",updatedAt:"2026-07-25 18:00"},{id:"day-st-dp-dongpeng-2026-07-27",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-27",totalAmount:213.85,lines:[{id:"line-st-dp-dongpeng-2026-07-27-0",customerName:"广州新运多租赁有限公司",amount:213.85,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-27 18:00"},{id:"day-st-dp-dongpeng-2026-07-28",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-28",totalAmount:20872.2,lines:[{id:"line-st-dp-dongpeng-2026-07-28-0",customerName:"广州中味餐饮服务有限公司",amount:480.9,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-28-1",customerName:"广州新运多租赁有限公司",amount:391.3,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-28-2",customerName:"广州市梅洛特物流有限公司",amount:2e4,payMethod:"bank_transfer"}],updatedBy:"金可鹏",updatedAt:"2026-07-28 18:00"},{id:"day-st-dp-dongpeng-2026-07-29",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-29",totalAmount:814.8,lines:[{id:"line-st-dp-dongpeng-2026-07-29-0",customerName:"广州中味餐饮服务有限公司",amount:84,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-29-1",customerName:"广州新运多租赁有限公司",amount:730.8,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-29 18:00"},{id:"day-st-dp-dongpeng-2026-07-30",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-30",totalAmount:1450.4,lines:[{id:"line-st-dp-dongpeng-2026-07-30-0",customerName:"广州中味餐饮服务有限公司",amount:393.05,payMethod:"wechat_scan"},{id:"line-st-dp-dongpeng-2026-07-30-1",customerName:"广州新运多租赁有限公司",amount:1057.35,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-30 18:00"},{id:"day-st-dp-dongpeng-2026-07-31",stationId:"st-dp-dongpeng",stationName:"东鹏大道甲醇制氢一体站",bizDate:"2026-07-31",totalAmount:587.65,lines:[{id:"line-st-dp-dongpeng-2026-07-31-0",customerName:"广州新运多租赁有限公司",amount:587.65,payMethod:"wechat_scan"}],updatedBy:"金可鹏",updatedAt:"2026-07-31 18:00"}]}l(hTt,"seedDays");function iz(t){return cTt(lTt({},t),{changeLogs:Array.isArray(t.changeLogs)?t.changeLogs:[]})}l(iz,"normalizeDay");function sz(){try{const t=localStorage.getItem(sge);if(t){const e=JSON.parse(t);if(Array.isArray(e)&&e.length)return e.map(iz)}for(const e of uTt){const r=localStorage.getItem(e);if(!r)continue;const n=JSON.parse(r);if(Array.isArray(n)&&n.length){const a=n.map(iz);return dTt(a),a}}}catch(t){}return hTt().map(iz)}l(sz,"loadCashIntakeDays");function dTt(t){try{localStorage.setItem(sge,JSON.stringify(t))}catch(e){}}l(dTt,"saveCashIntakeDays");function oz(t,e,r,n){return t.filter(a=>a.stationId===e&&a.bizDate>=r&&a.bizDate<=n).slice().sort((a,i)=>a.bizDate.localeCompare(i.bizDate))}l(oz,"getCashIntakeForStationRange");const hw=[{id:"st-fs-nanhai",name:"佛山南海羚牛加氢站",region:"广东佛山"},{id:"st-dp-dongpeng",name:"东鹏大道甲醇制氢一体站",region:"广东广州"}],kt="st-fs-nanhai",Dt="st-dp-dongpeng",Mu=["9","10","11","12","1","2","3","4","6","7","8"];function lz(t,e){const r=Number(e.slice(0,4)),n=Number(t);return!Number.isFinite(r)||!Number.isFinite(n)?`${t}月`:`${n>=9?r-1:r}年${n}月`}l(lz,"stationMonthLabel");function nwr(t){return t}l(nwr,"stationTrendDateLabel");const cz="2026-08-11",fTt=[{stationId:kt,date:"2026-08-02",shortDate:"08-02",quantityKg:79.27,unitPrice:38,amountYuan:3012.26,vehicleCount:14},{stationId:kt,date:"2026-08-03",shortDate:"08-03",quantityKg:84.16,unitPrice:38,amountYuan:3198.08,vehicleCount:16},{stationId:kt,date:"2026-08-04",shortDate:"08-04",quantityKg:90.04,unitPrice:38,amountYuan:3421.52,vehicleCount:21},{stationId:kt,date:"2026-08-05",shortDate:"08-05",quantityKg:128.68,unitPrice:38,amountYuan:4889.84,vehicleCount:24},{stationId:kt,date:"2026-08-06",shortDate:"08-06",quantityKg:58.77,unitPrice:38,amountYuan:2233.38,vehicleCount:16},{stationId:kt,date:"2026-08-07",shortDate:"08-07",quantityKg:69.58,unitPrice:38,amountYuan:2644.04,vehicleCount:14},{stationId:kt,date:"2026-08-08",shortDate:"08-08",quantityKg:87.84,unitPrice:38,amountYuan:3337.92,vehicleCount:16},{stationId:kt,date:"2026-08-09",shortDate:"08-09",quantityKg:76.46,unitPrice:38,amountYuan:2905.48,vehicleCount:14},{stationId:kt,date:"2026-08-10",shortDate:"08-10",quantityKg:117.61,unitPrice:38,amountYuan:4469.18,vehicleCount:23},{stationId:kt,date:"2026-08-11",shortDate:"08-11",quantityKg:91.39,unitPrice:38,amountYuan:3473.34,vehicleCount:19},{stationId:Dt,date:"2026-06-18",shortDate:"06-18",quantityKg:107.62,unitPrice:38.5,amountYuan:4143.37,vehicleCount:15},{stationId:Dt,date:"2026-06-22",shortDate:"06-22",quantityKg:15.86,unitPrice:38.5,amountYuan:610.61,vehicleCount:3},{stationId:Dt,date:"2026-06-23",shortDate:"06-23",quantityKg:85.45,unitPrice:38.5,amountYuan:3289.82,vehicleCount:13},{stationId:Dt,date:"2026-06-24",shortDate:"06-24",quantityKg:30.83,unitPrice:38.5,amountYuan:1186.95,vehicleCount:5},{stationId:Dt,date:"2026-06-26",shortDate:"06-26",quantityKg:11.88,unitPrice:38.5,amountYuan:457.38,vehicleCount:2},{stationId:Dt,date:"2026-07-01",shortDate:"07-01",quantityKg:186.05,unitPrice:35,amountYuan:6511.75,vehicleCount:28},{stationId:Dt,date:"2026-07-02",shortDate:"07-02",quantityKg:196.63,unitPrice:35,amountYuan:6882.05,vehicleCount:29},{stationId:Dt,date:"2026-07-03",shortDate:"07-03",quantityKg:162,unitPrice:35,amountYuan:5670,vehicleCount:25},{stationId:Dt,date:"2026-07-04",shortDate:"07-04",quantityKg:96.87,unitPrice:35,amountYuan:3390.45,vehicleCount:14},{stationId:Dt,date:"2026-07-07",shortDate:"07-07",quantityKg:198.57,unitPrice:35,amountYuan:6949.95,vehicleCount:30},{stationId:Dt,date:"2026-07-08",shortDate:"07-08",quantityKg:174.9,unitPrice:35,amountYuan:6121.5,vehicleCount:21},{stationId:Dt,date:"2026-07-09",shortDate:"07-09",quantityKg:178.46,unitPrice:35,amountYuan:6246.1,vehicleCount:25},{stationId:Dt,date:"2026-07-10",shortDate:"07-10",quantityKg:218.81,unitPrice:35,amountYuan:7658.35,vehicleCount:31},{stationId:Dt,date:"2026-07-14",shortDate:"07-14",quantityKg:216.79,unitPrice:35,amountYuan:7587.65,vehicleCount:26},{stationId:Dt,date:"2026-07-15",shortDate:"07-15",quantityKg:24.36,unitPrice:35,amountYuan:852.6,vehicleCount:4},{stationId:Dt,date:"2026-07-16",shortDate:"07-16",quantityKg:181.41,unitPrice:35,amountYuan:6349.35,vehicleCount:26},{stationId:Dt,date:"2026-07-17",shortDate:"07-17",quantityKg:102.84,unitPrice:35,amountYuan:3599.4,vehicleCount:18},{stationId:Dt,date:"2026-07-18",shortDate:"07-18",quantityKg:169.36,unitPrice:35,amountYuan:5927.6,vehicleCount:22},{stationId:Dt,date:"2026-07-19",shortDate:"07-19",quantityKg:113.23,unitPrice:35,amountYuan:3963.05,vehicleCount:16},{stationId:Dt,date:"2026-07-20",shortDate:"07-20",quantityKg:78.02,unitPrice:35,amountYuan:2730.7,vehicleCount:14},{stationId:Dt,date:"2026-07-21",shortDate:"07-21",quantityKg:85.03,unitPrice:35,amountYuan:2976.05,vehicleCount:12},{stationId:Dt,date:"2026-07-22",shortDate:"07-22",quantityKg:141.24,unitPrice:35,amountYuan:4943.4,vehicleCount:22},{stationId:Dt,date:"2026-07-25",shortDate:"07-25",quantityKg:172.26,unitPrice:35,amountYuan:6029.1,vehicleCount:24},{stationId:Dt,date:"2026-07-27",shortDate:"07-27",quantityKg:23.74,unitPrice:35,amountYuan:830.9,vehicleCount:4},{stationId:Dt,date:"2026-07-28",shortDate:"07-28",quantityKg:133.22,unitPrice:35,amountYuan:4662.7,vehicleCount:21},{stationId:Dt,date:"2026-07-29",shortDate:"07-29",quantityKg:59.82,unitPrice:35,amountYuan:2093.7,vehicleCount:10},{stationId:Dt,date:"2026-07-30",shortDate:"07-30",quantityKg:237.38,unitPrice:35,amountYuan:8308.3,vehicleCount:33},{stationId:Dt,date:"2026-07-31",shortDate:"07-31",quantityKg:68.14,unitPrice:35,amountYuan:2384.9,vehicleCount:13}],pTt=[{stationId:kt,customerName:"广东氢动力科技服务有限公司",months:{9:33.72,10:191.13,11:320.52,12:567.44,1:541.85,2:414.8,3:440.41,4:275.51,6:49.46,7:134.56,8:66.49}},{stationId:kt,customerName:"羚牛氢能科技(广东)有限公司",months:{9:51.05,10:584.17,11:416.24,12:651.01,1:625.93,2:533.13,3:1217.31,4:2936.04,6:126.53,7:1342.7,8:313.7}},{stationId:kt,customerName:"广州福满华冷链物流有限公司",months:{9:5.72,10:25.44,11:15.85,12:16.36,1:24.56,2:17.79,3:5.67,4:2.39,6:3.08,7:14.87}},{stationId:kt,customerName:"广东清运科技有限公司",months:{10:79.11,11:215.94,12:191.48,1:234.09,2:259.59,3:175.99,4:183.54}},{stationId:kt,customerName:"东展供应链(广州)有限公司",months:{10:102.92,11:761.89,12:229.17,1:114.17,2:68.04,3:71.87,4:36.51,6:67.58,7:184.64,8:114.5}},{stationId:kt,customerName:"昇美新能源有限公司",months:{11:14.07,2:25.41,7:3.68}},{stationId:kt,customerName:"佛山市南海腾威汽车贸易有限公司",months:{11:222.44,12:4301.37,1:45.94}},{stationId:kt,customerName:"广东云韬氢能科技有限公司",months:{12:2363.47}},{stationId:kt,customerName:"广东沣开科技有限公司",months:{1:103.08,2:37.65,3:230.14,4:141.82,6:58.1,7:255.32,8:69.49}},{stationId:kt,customerName:"现代氢能科技有限公司",months:{1:107.73,2:179.28,3:206.92,4:564.29,6:90.56,7:504.95,8:300.29}},{stationId:kt,customerName:"广东中氢联达新能源投资有限公司",months:{1:1329.17,2:1620.28,3:241.11}},{stationId:kt,customerName:"广州东逸物流有限公司",months:{2:44.2}},{stationId:kt,customerName:"广州铁语物流运输有限公司",months:{3:66.18,4:62,6:33.81}},{stationId:kt,customerName:"佛山市南海绿氢投资有限公司",months:{3:7.14}},{stationId:kt,customerName:"佛山市南海区瀚洁城市环境管理有限公司大沥分公司",months:{4:13.43}},{stationId:kt,customerName:"佛山市南海区狮山镇惠鑫绿色供应链有限公司",months:{3:45.18,4:146.27}},{stationId:kt,customerName:"广东开鸿氢能科技有限公司",months:{7:85.52,8:37.34}},{stationId:kt,customerName:"广东中氢顺答汽车科技有限公司",months:{8:50.92}},{stationId:kt,customerName:"广东瀚清能源有限公司",months:{8:5.66}},{stationId:Dt,customerName:"羚牛氢能科技(广东)有限公司",months:{6:146.81,7:1828.45}},{stationId:Dt,customerName:"广州市梅洛特物流有限公司",months:{6:11.88,7:776.74}},{stationId:Dt,customerName:"广州新运多租赁有限公司",months:{6:72.07,7:400.09}},{stationId:Dt,customerName:"广州星达供应链管理有限公司",months:{6:20.88,7:90.16}},{stationId:Dt,customerName:"广州中味餐饮服务有限公司",months:{7:88.06}},{stationId:Dt,customerName:"广州福满华冷链物流有限公司",months:{7:35.62}}];function gTt(t){return t.map(e=>{const r={};for(const[n,a]of Object.entries(e.months))r[n]=Math.round(a*38*100)/100;return{stationId:e.stationId,customerName:e.customerName,months:r}})}l(gTt,"customerMonthFeeFromKg");const mTt=[{stationId:kt,date:"2026-08-02",plateNo:"粤AH80311",quantityKg:2.6,unitPrice:38,amountYuan:98.8,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤EFH7893",quantityKg:.34,unitPrice:38,amountYuan:12.92,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤EFH7893",quantityKg:8.86,unitPrice:38,amountYuan:336.68,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤EFD4833",quantityKg:8.04,unitPrice:38,amountYuan:305.52,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤AHD5206",quantityKg:9.41,unitPrice:38,amountYuan:357.58,customerName:"广东沣开科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤AH95660",quantityKg:4.25,unitPrice:38,amountYuan:161.5,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤AHD7219",quantityKg:7.17,unitPrice:38,amountYuan:272.46,customerName:"广东开鸿氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤AGR5056",quantityKg:6,unitPrice:38,amountYuan:228,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-02",plateNo:"粤AH81683",quantityKg:8.57,unitPrice:38,amountYuan:325.66,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤EFD4993",quantityKg:7.81,unitPrice:38,amountYuan:296.78,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤AHD7576",quantityKg:6.09,unitPrice:38,amountYuan:231.42,customerName:"广东开鸿氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-02",plateNo:"粤AGQ3028",quantityKg:2.27,unitPrice:38,amountYuan:86.26,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-02",plateNo:"粤AGE1516",quantityKg:3.27,unitPrice:38,amountYuan:124.26,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-02",plateNo:"粤AH81231",quantityKg:4.59,unitPrice:38,amountYuan:174.42,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤AH81683",quantityKg:5.84,unitPrice:38,amountYuan:221.92,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤AGQ8399",quantityKg:6.25,unitPrice:38,amountYuan:237.5,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-03",plateNo:"粤EFF1075",quantityKg:1.64,unitPrice:38,amountYuan:62.32,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤AH30131",quantityKg:7.47,unitPrice:38,amountYuan:283.86,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤AHD8221",quantityKg:8.76,unitPrice:38,amountYuan:332.88,customerName:"广东沣开科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤AGR5056",quantityKg:5.41,unitPrice:38,amountYuan:205.58,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-03",plateNo:"粤AH95660",quantityKg:5.59,unitPrice:38,amountYuan:212.42,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤AH30108",quantityKg:8.39,unitPrice:38,amountYuan:318.82,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤AH65622",quantityKg:5.86,unitPrice:38,amountYuan:222.68,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤EFJ2488",quantityKg:7.56,unitPrice:38,amountYuan:287.28,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤EFJ2488",quantityKg:.32,unitPrice:38,amountYuan:12.16,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-03",plateNo:"粤AGP2009",quantityKg:3.95,unitPrice:38,amountYuan:150.1,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-03",plateNo:"粤AGQ3028",quantityKg:7.35,unitPrice:38,amountYuan:279.3,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-03",plateNo:"粤AGE1516",quantityKg:4.22,unitPrice:38,amountYuan:160.36,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-03",plateNo:"粤AGP5766",quantityKg:3.93,unitPrice:38,amountYuan:149.34,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-03",plateNo:"粤EFK1052",quantityKg:1.62,unitPrice:38,amountYuan:61.56,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤AFG2090",quantityKg:5.66,unitPrice:38,amountYuan:215.08,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-04",plateNo:"粤AH95660",quantityKg:4.83,unitPrice:38,amountYuan:183.54,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"豫AHA9677",quantityKg:4.89,unitPrice:38,amountYuan:185.82,customerName:"外省过路车",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤AH65622",quantityKg:5.02,unitPrice:38,amountYuan:190.76,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤EFF1075",quantityKg:2.17,unitPrice:38,amountYuan:82.46,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤EFK1052",quantityKg:1.62,unitPrice:38,amountYuan:61.56,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤AH81683",quantityKg:4.74,unitPrice:38,amountYuan:180.12,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤AGR5056",quantityKg:7.62,unitPrice:38,amountYuan:289.56,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-04",plateNo:"粤AH81691",quantityKg:3.94,unitPrice:38,amountYuan:149.72,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤EFD4878",quantityKg:.33,unitPrice:38,amountYuan:12.54,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤EFD4878",quantityKg:9.37,unitPrice:38,amountYuan:356.06,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤AGW5861",quantityKg:8.42,unitPrice:38,amountYuan:319.96,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤EFP0270",quantityKg:1.93,unitPrice:38,amountYuan:73.34,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤AGQ8376",quantityKg:4.48,unitPrice:38,amountYuan:170.24,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-04",plateNo:"粤AGQ9555",quantityKg:4.59,unitPrice:38,amountYuan:174.42,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-04",plateNo:"粤EFQ3560",quantityKg:2.27,unitPrice:38,amountYuan:86.26,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤EFD4887",quantityKg:3.95,unitPrice:38,amountYuan:150.1,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤EFD4887",quantityKg:.36,unitPrice:38,amountYuan:13.68,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-04",plateNo:"粤AGQ8399",quantityKg:5.41,unitPrice:38,amountYuan:205.58,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-04",plateNo:"粤AGE1516",quantityKg:3.59,unitPrice:38,amountYuan:136.42,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-04",plateNo:"粤AGP5766",quantityKg:4.85,unitPrice:38,amountYuan:184.3,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFH2360",quantityKg:1.41,unitPrice:38,amountYuan:53.58,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFP2610",quantityKg:3.01,unitPrice:38,amountYuan:114.38,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤AH95660",quantityKg:6.33,unitPrice:38,amountYuan:240.54,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤AH65622",quantityKg:7.03,unitPrice:38,amountYuan:267.14,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤AGR5056",quantityKg:5.55,unitPrice:38,amountYuan:210.9,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFQ3650",quantityKg:2.53,unitPrice:38,amountYuan:96.14,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFJ4661",quantityKg:7.78,unitPrice:38,amountYuan:295.64,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤AGN6150",quantityKg:5.2,unitPrice:38,amountYuan:197.6,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFP3757",quantityKg:2.06,unitPrice:38,amountYuan:78.28,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤AGQ8399",quantityKg:6.64,unitPrice:38,amountYuan:252.32,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-05",plateNo:"粤AFG2090",quantityKg:2.33,unitPrice:38,amountYuan:88.54,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFQ3560",quantityKg:2.34,unitPrice:38,amountYuan:88.92,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFH7825",quantityKg:5.6,unitPrice:38,amountYuan:212.8,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFJ0697",quantityKg:8.37,unitPrice:38,amountYuan:318.06,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤E00438F",quantityKg:11.48,unitPrice:38,amountYuan:436.24,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFH8009",quantityKg:4.88,unitPrice:38,amountYuan:185.44,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFJ4899",quantityKg:9.96,unitPrice:38,amountYuan:378.48,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤EFP3757",quantityKg:1.8,unitPrice:38,amountYuan:68.4,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤AGP4422",quantityKg:6.29,unitPrice:38,amountYuan:239.02,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-05",plateNo:"粤AHD7219",quantityKg:8.31,unitPrice:38,amountYuan:315.78,customerName:"广东开鸿氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤AGE1516",quantityKg:3.77,unitPrice:38,amountYuan:143.26,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-05",plateNo:"粤AGP5766",quantityKg:4.16,unitPrice:38,amountYuan:158.08,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-05",plateNo:"粤AH30131",quantityKg:5.43,unitPrice:38,amountYuan:206.34,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-05",plateNo:"粤AH81231",quantityKg:6.42,unitPrice:38,amountYuan:243.96,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤EFL2452",quantityKg:9.2,unitPrice:38,amountYuan:349.6,customerName:"广东沣开科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤EFK1052",quantityKg:1.96,unitPrice:38,amountYuan:74.48,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤EFQ3737",quantityKg:.85,unitPrice:38,amountYuan:32.3,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤EFQ3737",quantityKg:1.77,unitPrice:38,amountYuan:67.26,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤AGP4422",quantityKg:1.71,unitPrice:38,amountYuan:65.1,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-06",plateNo:"粤AGP4422",quantityKg:6.65,unitPrice:38,amountYuan:252.7,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-06",plateNo:"粤AH81683",quantityKg:3.26,unitPrice:38,amountYuan:123.88,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤AGR5056",quantityKg:5.52,unitPrice:38,amountYuan:209.76,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-06",plateNo:"粤AH65622",quantityKg:2.29,unitPrice:38,amountYuan:87.02,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤AH65622",quantityKg:4.18,unitPrice:38,amountYuan:158.84,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤EFF1075",quantityKg:2.02,unitPrice:38,amountYuan:76.76,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤AGQ1308",quantityKg:7.13,unitPrice:38,amountYuan:270.94,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-06",plateNo:"粤EFJ2150",quantityKg:2.91,unitPrice:38,amountYuan:110.58,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤EFJ6025",quantityKg:2.41,unitPrice:38,amountYuan:91.58,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-06",plateNo:"粤AGE1516",quantityKg:4.04,unitPrice:38,amountYuan:153.52,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-06",plateNo:"粤AH81683",quantityKg:2.87,unitPrice:38,amountYuan:109.06,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤EFP2610",quantityKg:1.79,unitPrice:38,amountYuan:68.02,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤AH81683",quantityKg:2.88,unitPrice:38,amountYuan:109.44,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤AGR5056",quantityKg:5.64,unitPrice:38,amountYuan:214.32,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-07",plateNo:"粤AH65622",quantityKg:6.24,unitPrice:38,amountYuan:237.12,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤AGQ8399",quantityKg:5.49,unitPrice:38,amountYuan:208.62,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-07",plateNo:"粤AGQ8399",quantityKg:2.06,unitPrice:38,amountYuan:78.28,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-07",plateNo:"粤AH80311",quantityKg:3.3,unitPrice:38,amountYuan:125.4,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤EFH7886",quantityKg:5.29,unitPrice:38,amountYuan:201.02,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤AH80311",quantityKg:6.9,unitPrice:38,amountYuan:262.2,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤AH81231",quantityKg:4.27,unitPrice:38,amountYuan:162.26,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤AH30131",quantityKg:8.7,unitPrice:38,amountYuan:330.6,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤AH95660",quantityKg:4.82,unitPrice:38,amountYuan:183.16,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-07",plateNo:"粤AGE1516",quantityKg:5.13,unitPrice:38,amountYuan:194.94,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-07",plateNo:"粤AGP5766",quantityKg:7.07,unitPrice:38,amountYuan:268.66,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-08",plateNo:"粤EFH7893",quantityKg:9.38,unitPrice:38,amountYuan:356.44,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AH30131",quantityKg:5.3,unitPrice:38,amountYuan:201.4,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AH81683",quantityKg:5.98,unitPrice:38,amountYuan:227.24,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AGR5056",quantityKg:5.11,unitPrice:38,amountYuan:194.18,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-08",plateNo:"粤AGZ5633",quantityKg:7.33,unitPrice:38,amountYuan:278.54,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤EFD4887",quantityKg:3.95,unitPrice:38,amountYuan:150.1,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AH80311",quantityKg:3.64,unitPrice:38,amountYuan:138.32,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AGP4422",quantityKg:8.82,unitPrice:38,amountYuan:335.16,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-08",plateNo:"粤AH95660",quantityKg:5.02,unitPrice:38,amountYuan:190.76,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AH81231",quantityKg:2.94,unitPrice:38,amountYuan:111.72,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AH95660",quantityKg:5.89,unitPrice:38,amountYuan:223.82,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AHD8221",quantityKg:8.84,unitPrice:38,amountYuan:335.92,customerName:"广东沣开科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤EFH7886",quantityKg:2.78,unitPrice:38,amountYuan:105.64,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤EFH4388",quantityKg:3.52,unitPrice:38,amountYuan:133.76,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-08",plateNo:"粤AGE1516",quantityKg:4.13,unitPrice:38,amountYuan:156.94,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-08",plateNo:"粤AGP5766",quantityKg:5.21,unitPrice:38,amountYuan:197.98,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-09",plateNo:"粤EFH4388",quantityKg:3.7,unitPrice:38,amountYuan:140.6,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-09",plateNo:"粤EFH4388",quantityKg:.35,unitPrice:38,amountYuan:13.3,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-09",plateNo:"粤AGQ3028",quantityKg:9.09,unitPrice:38,amountYuan:345.42,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-09",plateNo:"粤AGQ8399",quantityKg:6.39,unitPrice:38,amountYuan:242.82,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-09",plateNo:"粤AGR5056",quantityKg:6.59,unitPrice:38,amountYuan:250.42,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-09",plateNo:"粤EFJ4899",quantityKg:8.38,unitPrice:38,amountYuan:318.44,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-09",plateNo:"粤AH81683",quantityKg:3.34,unitPrice:38,amountYuan:126.92,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-09",plateNo:"粤AH30108",quantityKg:5.36,unitPrice:38,amountYuan:203.68,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-09",plateNo:"粤AFG2090",quantityKg:4.66,unitPrice:38,amountYuan:177.08,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-09",plateNo:"粤AH95660",quantityKg:5.54,unitPrice:38,amountYuan:210.52,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-09",plateNo:"粤AGP5766",quantityKg:4.86,unitPrice:38,amountYuan:184.68,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-09",plateNo:"粤AH81231",quantityKg:6.16,unitPrice:38,amountYuan:234.08,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-09",plateNo:"粤AGP9719",quantityKg:5.45,unitPrice:38,amountYuan:207.1,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-09",plateNo:"粤EFH3822",quantityKg:6.59,unitPrice:38,amountYuan:250.42,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AH30131",quantityKg:6.32,unitPrice:38,amountYuan:240.16,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AH30131",quantityKg:.34,unitPrice:38,amountYuan:12.92,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AGW5861",quantityKg:8.59,unitPrice:38,amountYuan:326.42,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤E00211F",quantityKg:12.04,unitPrice:38,amountYuan:457.52,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AH80311",quantityKg:4.89,unitPrice:38,amountYuan:185.82,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AH65622",quantityKg:4.23,unitPrice:38,amountYuan:160.74,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AH95660",quantityKg:4.24,unitPrice:38,amountYuan:161.12,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AGR5056",quantityKg:5.77,unitPrice:38,amountYuan:219.26,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-10",plateNo:"粤AGP5685",quantityKg:5.94,unitPrice:38,amountYuan:225.72,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-10",plateNo:"粤AHD7725",quantityKg:9.67,unitPrice:38,amountYuan:367.46,customerName:"广东沣开科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AHD7725",quantityKg:.32,unitPrice:38,amountYuan:12.16,customerName:"广东沣开科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤EFP3757",quantityKg:2.52,unitPrice:38,amountYuan:95.76,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤EFF1075",quantityKg:1.33,unitPrice:38,amountYuan:50.54,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤EFL8320",quantityKg:1.84,unitPrice:38,amountYuan:69.92,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤EFH3886",quantityKg:4.9,unitPrice:38,amountYuan:186.2,customerName:"广东氢动力科技服务有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AH81231",quantityKg:7.27,unitPrice:38,amountYuan:276.26,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AGP4422",quantityKg:8.62,unitPrice:38,amountYuan:327.56,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-10",plateNo:"粤AH95660",quantityKg:5.77,unitPrice:38,amountYuan:219.26,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤EFJ2488",quantityKg:.37,unitPrice:38,amountYuan:14.06,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤EFJ2488",quantityKg:7.46,unitPrice:38,amountYuan:283.48,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AGP5766",quantityKg:5.54,unitPrice:38,amountYuan:210.52,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-10",plateNo:"粤AHD5206",quantityKg:5.28,unitPrice:38,amountYuan:200.64,customerName:"广东沣开科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-10",plateNo:"粤AFG2090",quantityKg:4.36,unitPrice:38,amountYuan:165.68,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-11",plateNo:"粤AH65622",quantityKg:5.94,unitPrice:38,amountYuan:225.72,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AHD7219",quantityKg:9.92,unitPrice:38,amountYuan:376.96,customerName:"广东开鸿氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AHD7219",quantityKg:.32,unitPrice:38,amountYuan:12.16,customerName:"广东开鸿氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤EFH8783",quantityKg:5.28,unitPrice:38,amountYuan:200.64,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AHD7576",quantityKg:5.53,unitPrice:38,amountYuan:210.14,customerName:"广东开鸿氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤EFL8320",quantityKg:2.28,unitPrice:38,amountYuan:86.64,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AGP5685",quantityKg:8.11,unitPrice:38,amountYuan:308.18,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-11",plateNo:"粤AGR5056",quantityKg:4.64,unitPrice:38,amountYuan:176.32,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-11",plateNo:"粤AH30131",quantityKg:7.36,unitPrice:38,amountYuan:279.68,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤EFD5822",quantityKg:5.66,unitPrice:38,amountYuan:215.08,customerName:"广东瀚清能源有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AGP5766",quantityKg:4.56,unitPrice:38,amountYuan:173.8,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-11",plateNo:"粤EFD4887",quantityKg:3.94,unitPrice:38,amountYuan:149.72,customerName:"东展供应链(广州)有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AHD5338",quantityKg:9.96,unitPrice:38,amountYuan:378.48,customerName:"广东沣开科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AH81231",quantityKg:4.18,unitPrice:38,amountYuan:158.84,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AH81231",quantityKg:2.39,unitPrice:38,amountYuan:90.82,customerName:"现代氢能科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤AGP4422",quantityKg:6.48,unitPrice:38,amountYuan:246.24,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:kt,date:"2026-08-11",plateNo:"粤EFQ5650",quantityKg:.85,unitPrice:38,amountYuan:32.3,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤EFQ5650",quantityKg:1.52,unitPrice:38,amountYuan:57.76,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:kt,date:"2026-08-11",plateNo:"粤EFF1075",quantityKg:2.47,unitPrice:38,amountYuan:93.86,customerName:"广东中氢顺答汽车科技有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AFH3562",quantityKg:5.66,unitPrice:35,amountYuan:198.1,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AG17852",quantityKg:5.93,unitPrice:35,amountYuan:207.55,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤A03569F",quantityKg:19.87,unitPrice:35,amountYuan:695.45,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGR9758",quantityKg:8.42,unitPrice:35,amountYuan:294.7,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGP5755",quantityKg:8.14,unitPrice:35,amountYuan:284.9,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AFP1332",quantityKg:6.35,unitPrice:35,amountYuan:222.25,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AH65535",quantityKg:5.12,unitPrice:35,amountYuan:179.2,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AH81311",quantityKg:6.36,unitPrice:35,amountYuan:222.6,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGP6579",quantityKg:7.86,unitPrice:35,amountYuan:275.1,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGF9106",quantityKg:6.17,unitPrice:35,amountYuan:215.95,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGR8536",quantityKg:7.22,unitPrice:35,amountYuan:252.7,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AG39007",quantityKg:4.93,unitPrice:35,amountYuan:172.55,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGH6240",quantityKg:5.4,unitPrice:35,amountYuan:189,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AH81566",quantityKg:5.12,unitPrice:35,amountYuan:179.2,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGP3688",quantityKg:7,unitPrice:35,amountYuan:245,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGR5538",quantityKg:6.71,unitPrice:35,amountYuan:234.85,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGR0298",quantityKg:6.1,unitPrice:35,amountYuan:213.5,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AH98809",quantityKg:3.53,unitPrice:35,amountYuan:123.55,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGR1128",quantityKg:5.57,unitPrice:35,amountYuan:194.95,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AH21159",quantityKg:4.55,unitPrice:35,amountYuan:159.25,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AH87393",quantityKg:4.05,unitPrice:35,amountYuan:141.75,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-22",plateNo:"粤AGR9816",quantityKg:1.18,unitPrice:35,amountYuan:41.3,customerName:"广州星达供应链管理有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AH81566",quantityKg:6.3,unitPrice:35,amountYuan:220.5,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AH98809",quantityKg:8.33,unitPrice:35,amountYuan:291.55,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AH21159",quantityKg:8.98,unitPrice:35,amountYuan:314.3,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AH95298",quantityKg:8.14,unitPrice:35,amountYuan:284.9,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AH99322",quantityKg:8.92,unitPrice:35,amountYuan:312.2,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AFH3562",quantityKg:6.44,unitPrice:35,amountYuan:225.4,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AG17852",quantityKg:6.29,unitPrice:35,amountYuan:220.15,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGH6240",quantityKg:6.15,unitPrice:35,amountYuan:215.25,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AFP1332",quantityKg:5.96,unitPrice:35,amountYuan:208.6,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGR5278",quantityKg:5.28,unitPrice:35,amountYuan:184.8,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGP6637",quantityKg:8.04,unitPrice:35,amountYuan:281.4,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGP9773",quantityKg:7.05,unitPrice:35,amountYuan:246.75,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGF9106",quantityKg:6.08,unitPrice:35,amountYuan:212.8,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGZ2231",quantityKg:4.23,unitPrice:35,amountYuan:148.05,customerName:"广州福满华冷链物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGP9728",quantityKg:6.92,unitPrice:35,amountYuan:242.2,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGR8559",quantityKg:8.02,unitPrice:35,amountYuan:280.7,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGP9787",quantityKg:8.56,unitPrice:35,amountYuan:299.6,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGR4655",quantityKg:9.2,unitPrice:35,amountYuan:322,customerName:"广州福满华冷链物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGR5538",quantityKg:7.4,unitPrice:35,amountYuan:259,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGR1578",quantityKg:6.96,unitPrice:35,amountYuan:243.6,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGP5636",quantityKg:9.13,unitPrice:35,amountYuan:319.55,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AGR9816",quantityKg:3.49,unitPrice:35,amountYuan:122.15,customerName:"广州星达供应链管理有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AH65535",quantityKg:7.73,unitPrice:35,amountYuan:270.55,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-25",plateNo:"粤AH87393",quantityKg:8.66,unitPrice:35,amountYuan:303.1,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-27",plateNo:"粤AH87393",quantityKg:4.87,unitPrice:35,amountYuan:170.45,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-27",plateNo:"粤AH81311",quantityKg:8.27,unitPrice:35,amountYuan:289.45,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-27",plateNo:"粤AGR5278",quantityKg:6.11,unitPrice:35,amountYuan:213.85,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-27",plateNo:"粤AGR9816",quantityKg:4.49,unitPrice:35,amountYuan:157.15,customerName:"广州星达供应链管理有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AG84993",quantityKg:6.53,unitPrice:35,amountYuan:228.55,customerName:"广州中味餐饮服务有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGR6500",quantityKg:7.97,unitPrice:35,amountYuan:278.95,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGP5758",quantityKg:4.68,unitPrice:35,amountYuan:163.8,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGR9825",quantityKg:3.65,unitPrice:35,amountYuan:127.75,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGE4080",quantityKg:6.57,unitPrice:35,amountYuan:229.95,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGW8256",quantityKg:7.21,unitPrice:35,amountYuan:252.35,customerName:"广州中味餐饮服务有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AH81566",quantityKg:3.83,unitPrice:35,amountYuan:134.05,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AH27798",quantityKg:8.53,unitPrice:35,amountYuan:298.55,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AG17852",quantityKg:6.7,unitPrice:35,amountYuan:234.5,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGR5538",quantityKg:5.48,unitPrice:35,amountYuan:191.8,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGF9106",quantityKg:6.18,unitPrice:35,amountYuan:216.3,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGF4063",quantityKg:6.23,unitPrice:35,amountYuan:218.05,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGR5278",quantityKg:5.7,unitPrice:35,amountYuan:199.5,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGZ6135",quantityKg:5.64,unitPrice:35,amountYuan:197.4,customerName:"广州福满华冷链物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGZ2231",quantityKg:7.05,unitPrice:35,amountYuan:246.75,customerName:"广州福满华冷链物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AH98933",quantityKg:8.54,unitPrice:35,amountYuan:298.9,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGH6240",quantityKg:6.57,unitPrice:35,amountYuan:229.95,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGR5556",quantityKg:9.37,unitPrice:35,amountYuan:327.95,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AGP5653",quantityKg:7.99,unitPrice:35,amountYuan:279.65,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AH87393",quantityKg:4.74,unitPrice:35,amountYuan:165.9,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-28",plateNo:"粤AH81311",quantityKg:4.06,unitPrice:35,amountYuan:142.1,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AGR5099",quantityKg:7.51,unitPrice:35,amountYuan:262.85,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AFH3562",quantityKg:6.28,unitPrice:35,amountYuan:219.8,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AGR9818",quantityKg:7.18,unitPrice:35,amountYuan:251.3,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AGR9899",quantityKg:7.25,unitPrice:35,amountYuan:253.75,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AH98809",quantityKg:4.85,unitPrice:35,amountYuan:169.75,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AGR9816",quantityKg:4.64,unitPrice:35,amountYuan:162.4,customerName:"广州星达供应链管理有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AGP9787",quantityKg:6.08,unitPrice:35,amountYuan:212.8,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AGR5538",quantityKg:6.43,unitPrice:35,amountYuan:225.05,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AG84993",quantityKg:2.4,unitPrice:35,amountYuan:84,customerName:"广州中味餐饮服务有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-29",plateNo:"粤AGR5278",quantityKg:7.2,unitPrice:35,amountYuan:252,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AG39007",quantityKg:5.93,unitPrice:35,amountYuan:207.55,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGP9773",quantityKg:8.2,unitPrice:35,amountYuan:287,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGQ8398",quantityKg:7.92,unitPrice:35,amountYuan:277.2,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AG84993",quantityKg:4.92,unitPrice:35,amountYuan:172.2,customerName:"广州中味餐饮服务有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AH81311",quantityKg:8.21,unitPrice:35,amountYuan:287.35,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGP5359",quantityKg:7.4,unitPrice:35,amountYuan:259,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGR5278",quantityKg:7.86,unitPrice:35,amountYuan:275.1,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGW8256",quantityKg:6.31,unitPrice:35,amountYuan:220.85,customerName:"广州中味餐饮服务有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤A00859F",quantityKg:20.09,unitPrice:35,amountYuan:703.15,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGG4975",quantityKg:6.11,unitPrice:35,amountYuan:213.85,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGP5636",quantityKg:7.68,unitPrice:35,amountYuan:268.8,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGR5278",quantityKg:5.27,unitPrice:35,amountYuan:184.45,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AG32783",quantityKg:6.05,unitPrice:35,amountYuan:211.75,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AH87393",quantityKg:6.25,unitPrice:35,amountYuan:218.75,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGP5659",quantityKg:4.82,unitPrice:35,amountYuan:168.7,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGR8799",quantityKg:4.35,unitPrice:35,amountYuan:152.25,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AH98809",quantityKg:4.99,unitPrice:35,amountYuan:174.65,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGR1578",quantityKg:8.69,unitPrice:35,amountYuan:304.15,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGG0490",quantityKg:4.42,unitPrice:35,amountYuan:154.7,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤A03569F",quantityKg:19.16,unitPrice:35,amountYuan:670.6,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGP5718",quantityKg:3.12,unitPrice:35,amountYuan:109.2,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGZ2231",quantityKg:4.8,unitPrice:35,amountYuan:168,customerName:"广州福满华冷链物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGZ6135",quantityKg:4.7,unitPrice:35,amountYuan:164.5,customerName:"广州福满华冷链物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGR9758",quantityKg:8.16,unitPrice:35,amountYuan:285.6,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGR9816",quantityKg:5.46,unitPrice:35,amountYuan:191.1,customerName:"广州星达供应链管理有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGR9899",quantityKg:7.91,unitPrice:35,amountYuan:276.85,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGP5755",quantityKg:7.21,unitPrice:35,amountYuan:252.35,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGP9717",quantityKg:8.7,unitPrice:35,amountYuan:304.5,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AGR0298",quantityKg:7.48,unitPrice:35,amountYuan:261.8,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AH27798",quantityKg:4.33,unitPrice:35,amountYuan:151.55,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AH95298",quantityKg:5.23,unitPrice:35,amountYuan:183.05,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AH81311",quantityKg:6.18,unitPrice:35,amountYuan:216.3,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-30",plateNo:"粤AH99322",quantityKg:9.47,unitPrice:35,amountYuan:331.45,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AH98809",quantityKg:5.68,unitPrice:35,amountYuan:198.8,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGR5028",quantityKg:8.35,unitPrice:35,amountYuan:292.25,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGR8536",quantityKg:7.14,unitPrice:35,amountYuan:249.9,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGR5538",quantityKg:6.67,unitPrice:35,amountYuan:233.45,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGP6579",quantityKg:6.56,unitPrice:35,amountYuan:229.6,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGR5278",quantityKg:6.15,unitPrice:35,amountYuan:215.25,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGR3288",quantityKg:6.55,unitPrice:35,amountYuan:229.25,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AH21159",quantityKg:3.8,unitPrice:35,amountYuan:133,customerName:"广州市梅洛特物流有限公司",fleet:"external"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGP5138",quantityKg:6.04,unitPrice:35,amountYuan:211.4,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AFH3562",quantityKg:3.58,unitPrice:35,amountYuan:125.3,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGH6240",quantityKg:3.65,unitPrice:35,amountYuan:127.75,customerName:"羚牛氢能科技(广东)有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGR8799",quantityKg:3.94,unitPrice:35,amountYuan:137.9,customerName:"广州新运多租赁有限公司",fleet:"own"},{stationId:Dt,date:"2026-07-31",plateNo:"粤AGP5139",quantityKg:.03,unitPrice:35,amountYuan:1.05,customerName:"广州新运多租赁有限公司",fleet:"own"}],yTt=[{stationId:"st-fs-nanhai",customerName:"广东氢动力科技服务有限公司",rechargeOrSpotYuan:112162.21,consumePrepaidYuan:45485.63,consumeSpotYuan:62162.21,balanceYuan:4514.37},{stationId:"st-fs-nanhai",customerName:"广州福满华冷链物流有限公司",rechargeOrSpotYuan:4693.45,consumePrepaidYuan:0,consumeSpotYuan:4693.45,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"广东清运科技有限公司",rechargeOrSpotYuan:7e4,consumePrepaidYuan:47479.04,consumeSpotYuan:0,balanceYuan:22520.96},{stationId:"st-fs-nanhai",customerName:"羚牛氢能科技(广东)有限公司",rechargeOrSpotYuan:308832.16,consumePrepaidYuan:159416.71,consumeSpotYuan:167024.17,balanceYuan:-17608.72,remark:"月结"},{stationId:"st-fs-nanhai",customerName:"东展供应链(广州)有限公司",rechargeOrSpotYuan:62797.68,consumePrepaidYuan:35211.75,consumeSpotYuan:27585.93,balanceYuan:-0},{stationId:"st-fs-nanhai",customerName:"昇美新能源有限公司",rechargeOrSpotYuan:1591.99,consumePrepaidYuan:0,consumeSpotYuan:1591.99,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"佛山市南海腾威汽车贸易有限公司",rechargeOrSpotYuan:159941.25,consumePrepaidYuan:159941.25,consumeSpotYuan:0,balanceYuan:-0},{stationId:"st-fs-nanhai",customerName:"广东云韬氢能科技有限公司",rechargeOrSpotYuan:82721.48,consumePrepaidYuan:0,consumeSpotYuan:82721.48,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"广东沣开科技有限公司",rechargeOrSpotYuan:34857.85,consumePrepaidYuan:32292.29,consumeSpotYuan:857.85,balanceYuan:1707.71},{stationId:"st-fs-nanhai",customerName:"现代氢能科技有限公司",rechargeOrSpotYuan:73585.87,consumePrepaidYuan:0,consumeSpotYuan:73585.87,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"广东中氢联达新能源投资有限公司",rechargeOrSpotYuan:111669.6,consumePrepaidYuan:111669.6,consumeSpotYuan:0,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"广州东逸物流有限公司",rechargeOrSpotYuan:1547,consumePrepaidYuan:0,consumeSpotYuan:1547,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"广州铁语物流运输有限公司",rechargeOrSpotYuan:6176.87,consumePrepaidYuan:0,consumeSpotYuan:6176.87,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"佛山市南海绿氢投资有限公司",rechargeOrSpotYuan:249.9,consumePrepaidYuan:0,consumeSpotYuan:249.9,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"佛山市南海区瀚洁城市环境管理有限公司大沥分公司",rechargeOrSpotYuan:2e4,consumePrepaidYuan:564.06,consumeSpotYuan:0,balanceYuan:19435.94},{stationId:"st-fs-nanhai",customerName:"佛山市南海区狮山镇惠鑫绿色供应链有限公司",rechargeOrSpotYuan:7069.58,consumePrepaidYuan:4998.09,consumeSpotYuan:2071.49,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"广东开鸿氢能科技有限公司",rechargeOrSpotYuan:4668.68,consumePrepaidYuan:0,consumeSpotYuan:4668.68,balanceYuan:0},{stationId:"st-fs-nanhai",customerName:"广东中氢顺答汽车科技有限公司",rechargeOrSpotYuan:5e3,consumePrepaidYuan:1934.96,consumeSpotYuan:0,balanceYuan:3065.04},{stationId:"st-fs-nanhai",customerName:"广东瀚清能源有限公司",rechargeOrSpotYuan:2e4,consumePrepaidYuan:215.08,consumeSpotYuan:0,balanceYuan:19784.92},{stationId:"st-fs-nanhai",customerName:"外省过路车",rechargeOrSpotYuan:185.82,consumePrepaidYuan:0,consumeSpotYuan:185.82,balanceYuan:0},{stationId:"st-dp-dongpeng",customerName:"广州新运多租赁有限公司",rechargeOrSpotYuan:13072.15,consumePrepaidYuan:2483.36,consumeSpotYuan:13072.15,balanceYuan:-2483.36},{stationId:"st-dp-dongpeng",customerName:"广州星达供应链管理有限公司",rechargeOrSpotYuan:0,consumePrepaidYuan:3421.64,consumeSpotYuan:0,balanceYuan:-3421.64},{stationId:"st-dp-dongpeng",customerName:"广州市梅洛特物流有限公司",rechargeOrSpotYuan:5e4,consumePrepaidYuan:27643.28,consumeSpotYuan:0,balanceYuan:22356.72},{stationId:"st-dp-dongpeng",customerName:"广州中味餐饮服务有限公司",rechargeOrSpotYuan:3082.1,consumePrepaidYuan:0,consumeSpotYuan:3082.1,balanceYuan:0},{stationId:"st-dp-dongpeng",customerName:"羚牛氢能科技(广东)有限公司",rechargeOrSpotYuan:0,consumePrepaidYuan:67018.98,consumeSpotYuan:0,balanceYuan:-67018.98},{stationId:"st-dp-dongpeng",customerName:"广州福满华冷链物流有限公司",rechargeOrSpotYuan:2e4,consumePrepaidYuan:1246.7,consumeSpotYuan:0,balanceYuan:18753.3,remark:"0.06"}];function oge(t,e){const r={};for(const n of e)r[n]=0;for(const n of t)for(const a of e)r[a]+=n.months[a]||0;return r}l(oge,"monthTotals");function vTt(t){const e=new Date(`${t}T00:00:00`);e.setDate(e.getDate()-9);const r=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0");return{startDate:`${r}-${n}-${a}`,end:t}}l(vTt,"windowRange");function lge(t,e,r){return fTt.filter(n=>n.stationId===t&&n.date>=e&&n.date<=r).sort((n,a)=>n.date.localeCompare(a.date))}l(lge,"stationWindowVolumes");function x4(t){return t<10?`0${t}`:`${t}`}l(x4,"pad2");function w4(t){const e=t.split("-"),r=parseInt(e[0],10)||2026,n=parseInt(e[1],10)||1,a=parseInt(e[2],10)||1;return{year:r,month:n,day:a}}l(w4,"parseYmd");function c8(t,e,r){return`${t}-${x4(e)}-${x4(r)}`}l(c8,"toYmd");function u8(t){const{year:e,month:r,day:n}=w4(t);return`${e}-${x4(r)}-${x4(n)}`}l(u8,"displayYmd");function h8(t){return c8(t.getFullYear(),t.getMonth()+1,t.getDate())}l(h8,"ymdFromDate");function bTt(t){const e=new Date(t),r=e.getDay(),n=r===0?-6:1-r;return e.setDate(e.getDate()+n),e}l(bTt,"startOfWeek");function xTt(t=new Date){const e=h8(t),r=bTt(t),n=new Date(r);n.setDate(r.getDate()+6);const a=c8(t.getFullYear(),t.getMonth()+1,1),i=new Date(t.getFullYear(),t.getMonth()+1,0);return{today:{start:e,end:e},week:{start:h8(r),end:h8(n)},month:{start:a,end:h8(i)}}}l(xTt,"rangeShortcuts");const cge=l(({label:t="查询日期",start:e,end:r,onChange:n,align:a="right",anchorYmd:i})=>{const[s,o]=N.useState(!1),[u,h]=N.useState("start"),[d,f]=N.useState(e),[p,g]=N.useState(r),m=N.useRef(null),y=N.useMemo(()=>{if(i){const B=w4(i);return new Date(B.year,B.month-1,B.day)}return new Date},[i]),v=N.useMemo(()=>w4(d),[d]),b=N.useMemo(()=>w4(p),[p]),w=u==="start"?v:b,[x,T]=N.useState(w.year),[C,S]=N.useState(w.month);N.useEffect(()=>{if(!s)return;f(e),g(r),h("start");const B=w4(e);T(B.year),S(B.month)},[s,e,r]),N.useEffect(()=>{if(!s)return;const B=l(W=>{m.current&&!m.current.contains(W.target)&&o(!1)},"onDoc");return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[s]);const E=new Date(x,C,0).getDate(),k=new Date(x,C-1,1).getDay(),A=Array.from({length:E},(B,W)=>W+1),I=Array.from({length:k},(B,W)=>W),L=l(B=>{B.stopPropagation(),C===1?(T(W=>W-1),S(12)):S(W=>W-1)},"goPrev"),R=l(B=>{B.stopPropagation(),C===12?(T(W=>W+1),S(1)):S(W=>W+1)},"goNext"),O=l(B=>B>=d&&B<=p,"inRange"),M=l(B=>B===d||B===p,"isEdge"),P=l((B,W)=>{W.stopPropagation();const U=c8(x,C,B);if(u==="start"){const j=U,V=U>p?U:p;f(j),g(V),h("end");return}U<d?(f(U),g(d)):g(U),h("start")},"pickDay"),z=l(()=>{const B=d<=p?d:p,W=d<=p?p:d;n({start:B,end:W}),o(!1)},"applyDraft"),D=l(B=>{const U=xTt(y)[B];f(U.start),g(U.end),n(U),o(!1)},"applyShortcut");return N.createElement("div",{className:`sd-date sd-date--range ${a==="right"?"sd-date--right":""}`,ref:m},N.createElement("button",{type:"button",className:`sd-date__trigger ${s?"is-open":""}`,onClick:l(()=>o(B=>!B),"onClick"),"aria-haspopup":"dialog","aria-expanded":s},N.createElement("span",{className:"sd-date__label"},t),N.createElement("span",{className:"sd-date__value"},u8(e)," 至 ",u8(r)),N.createElement(_fe,{size:15,"aria-hidden":!0,className:"sd-date__icon"})),s?N.createElement("div",{className:"sd-date__popover sd-date__popover--range",role:"dialog","aria-label":t},N.createElement("div",{className:"sd-date__shortcuts"},N.createElement("button",{type:"button",onClick:l(()=>D("today"),"onClick")},"本日"),N.createElement("button",{type:"button",onClick:l(()=>D("week"),"onClick")},"本周"),N.createElement("button",{type:"button",onClick:l(()=>D("month"),"onClick")},"本月")),N.createElement("div",{className:"sd-date__range-tabs"},N.createElement("button",{type:"button",className:u==="start"?"is-on":"",onClick:l(()=>h("start"),"onClick")},"开始 ",u8(d)),N.createElement("button",{type:"button",className:u==="end"?"is-on":"",onClick:l(()=>h("end"),"onClick")},"结束 ",u8(p))),N.createElement("div",{className:"sd-date__header"},N.createElement("button",{type:"button",className:"sd-date__nav",onClick:L,"aria-label":"上一月"},N.createElement(ZS,{size:16})),N.createElement("div",{className:"sd-date__title"},x,"年",x4(C),"月"),N.createElement("button",{type:"button",className:"sd-date__nav",onClick:R,"aria-label":"下一月"},N.createElement(kfe,{size:16}))),N.createElement("div",{className:"sd-date__week"},["日","一","二","三","四","五","六"].map(B=>N.createElement("span",{key:B},B))),N.createElement("div",{className:"sd-date__grid"},I.map(B=>N.createElement("span",{key:`b-${B}`,className:"sd-date__day is-empty"})),A.map(B=>{const W=c8(x,C,B),U=["sd-date__day",M(W)?"is-selected":"",O(W)?"is-in-range":""].filter(Boolean).join(" ");return N.createElement("button",{key:B,type:"button",className:U,onClick:l(j=>P(B,j),"onClick")},B)})),N.createElement("div",{className:"sd-date__footer sd-date__footer--range"},N.createElement("button",{type:"button",className:"sd-date__today",onClick:l(()=>D("today"),"onClick")},"本日"),N.createElement("button",{type:"button",className:"sd-btn sd-btn--primary sd-date__apply",onClick:z},"确定"))):null)},"SdDateRangePicker"),uge=l(({options:t,value:e,onChange:r,label:n="客户"})=>{const[a,i]=N.useState(!1),[s,o]=N.useState(""),u=N.useRef(null);N.useEffect(()=>{if(!a)return;const g=l(m=>{var y;(y=u.current)!=null&&y.contains(m.target)||i(!1)},"onDoc");return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[a]);const h=N.useMemo(()=>{const g=s.trim();return g?t.filter(m=>m.includes(g)):t},[t,s]),d=e.length===0||e.length===t.length,f=d?"全部客户":e.length<=2?e.join("、"):`已选 ${e.length} 家`,p=l(g=>{if(e.length===0){r([g]);return}if(e.includes(g)){const y=e.filter(v=>v!==g);r(y.length===0?[]:y);return}const m=[...e,g];r(m.length===t.length?[]:m)},"toggle");return N.createElement("div",{className:`sd-msel ${a?"is-open":""}`,ref:u},N.createElement("button",{type:"button",className:"sd-msel__trigger","aria-haspopup":"listbox","aria-expanded":a,onClick:l(()=>i(g=>!g),"onClick")},N.createElement("span",{className:"sd-msel__label"},n),N.createElement("span",{className:"sd-msel__value",title:f},f),N.createElement(XS,{size:14,"aria-hidden":!0,className:"sd-msel__chev"})),a?N.createElement("div",{className:"sd-msel__panel",role:"listbox","aria-multiselectable":!0},N.createElement("div",{className:"sd-msel__search"},N.createElement("input",{type:"search",value:s,onChange:l(g=>o(g.target.value),"onChange"),placeholder:"搜索客户","aria-label":"搜索客户"}),s?N.createElement("button",{type:"button",className:"sd-msel__clear",onClick:l(()=>o(""),"onClick"),"aria-label":"清空搜索"},N.createElement(Vg,{size:12})):null),N.createElement("div",{className:"sd-msel__actions"},N.createElement("button",{type:"button",onClick:l(()=>r([]),"onClick")},"全选"),N.createElement("button",{type:"button",onClick:l(()=>{r([]),i(!1)},"onClick")},"重置")),N.createElement("ul",{className:"sd-msel__list"},h.length===0?N.createElement("li",{className:"sd-msel__empty"},"无匹配客户"):h.map(g=>{const m=d||e.includes(g);return N.createElement("li",{key:g},N.createElement("button",{type:"button",className:`sd-msel__opt ${m?"is-on":""}`,role:"option","aria-selected":m,onClick:l(()=>p(g),"onClick")},N.createElement("span",{className:"sd-msel__check","aria-hidden":!0},m?N.createElement(Wgt,{size:12}):null),N.createElement("span",{className:"sd-msel__name"},g)))}))):null)},"SdCustomerMultiSelect"),dw=10;function ks(t){return t.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}l(ks,"money$1");function Kd(t){return t.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}l(Kd,"kg$1");function uz(t){const e=String(t||"").split(/[-/]/);if(e.length<3)return t;const r=e[0],n=String(Number(e[1])||0).padStart(2,"0"),a=String(Number(e[2])||0).padStart(2,"0");return`${r}-${n}-${a}`}l(uz,"padYmd");function hz(t,e){return e==null||!Number.isFinite(e)?"":t>e?"is-stock-up":t<e?"is-stock-down":"is-stock-flat"}l(hz,"stockDeltaClass");function em(t){return t>0?"is-stock-up":t<0?"is-stock-down":"is-stock-flat"}l(em,"stockSignClass");function dz({curr:t,prev:e}){return e==null||!Number.isFinite(e)||t===e?null:N.createElement("span",{className:"sd-delta","aria-hidden":!0},t>e?"▲":"▼")}l(dz,"DeltaMark");function d8({expanded:t,total:e,onToggle:r}){return e<=dw?null:N.createElement("button",{type:"button",className:"sd-more-btn",onClick:r},t?N.createElement(N.Fragment,null,"收起",N.createElement(Vgt,{size:14,"aria-hidden":!0})):N.createElement(N.Fragment,null,"更多(还有 ",e-dw," 条)",N.createElement(XS,{size:14,"aria-hidden":!0})))}l(d8,"MoreToggle");const wTt=l(({stationId:t,asOf:e,rangeStart:r,rangeEnd:n,updatedAt:a,onBack:i,onRefresh:s,onRangeChange:o})=>{var u,h,d,f;const[p,g]=N.useState(0),[m,y]=N.useState([]),[v,b]=N.useState(null),[w,x]=N.useState(!1),[T,C]=N.useState(!1),[S,E]=N.useState(!1),[k,A]=N.useState(!1),I=((u=hw.find(pe=>pe.id===t))==null?void 0:u.name)||t,L=(h=hw.find(pe=>pe.id===t))==null?void 0:h.region,R=r,O=n,M=N.useMemo(()=>lge(t,R,O),[t,R,O]),P=N.useMemo(()=>[...M].sort((Ae,Ve)=>Ae.date.localeCompare(Ve.date)).slice(-7),[M]),z=P.reduce((pe,Ae)=>pe+Ae.quantityKg,0),D=P.reduce((pe,Ae)=>pe+Ae.amountYuan,0),B=P.reduce((pe,Ae)=>pe+Ae.vehicleCount,0),W=M.find(pe=>pe.date===e)||M[M.length-1],U=M.reduce((pe,Ae)=>pe+Ae.quantityKg,0),j=M.reduce((pe,Ae)=>pe+Ae.amountYuan,0),V=M.filter(pe=>pe.date.startsWith(e.slice(0,7))).reduce((pe,Ae)=>pe+Ae.quantityKg,0),Y=N.useMemo(()=>{if(!W)return null;const pe=[...M].sort((Ve,ze)=>Ve.date.localeCompare(ze.date)),Ae=pe.findIndex(Ve=>Ve.date===W.date);return Ae>0?pe[Ae-1].quantityKg:null},[W,M]),H=N.useMemo(()=>pTt.filter(pe=>pe.stationId===t),[t]),q=N.useMemo(()=>H.map(pe=>pe.customerName),[H]),Z=N.useMemo(()=>{if(m.length===0)return H;const pe=new Set(m);return H.filter(Ae=>pe.has(Ae.customerName))},[H,m]),K=N.useMemo(()=>gTt(Z),[Z]),re=N.useMemo(()=>oge(Z,Mu),[Z]),Q=N.useMemo(()=>oge(K,Mu),[K]),te=w?Z:Z.slice(0,dw),ee=T?K:K.slice(0,dw),J=N.useMemo(()=>mTt.filter(pe=>pe.stationId===t&&pe.date>=R&&pe.date<=O),[t,R,O]),ae=N.useMemo(()=>oz(sz(),t,R,O),[t,R,O,p]),se=N.useMemo(()=>ae.flatMap(pe=>pe.lines.map(Ae=>({id:Ae.id,bizDate:uz(pe.bizDate),customerName:Ae.customerName,payMethod:Ae.payMethod,amount:Ae.amount}))),[ae]),fe=k?se:se.slice(0,dw),ve=ae.reduce((pe,Ae)=>pe+Ae.totalAmount,0),de=N.useMemo(()=>yTt.filter(pe=>pe.stationId===t),[t]),Ee=S?de:de.slice(0,dw),Ce=N.useMemo(()=>({recharge:de.reduce((pe,Ae)=>pe+Ae.rechargeOrSpotYuan,0),prepaid:de.reduce((pe,Ae)=>pe+Ae.consumePrepaidYuan,0),spot:de.reduce((pe,Ae)=>pe+Ae.consumeSpotYuan,0),balance:de.reduce((pe,Ae)=>pe+Ae.balanceYuan,0)}),[de]),De=Math.max(...M.map(pe=>pe.quantityKg),1),ce=v?M.find(pe=>pe.date===v):null,Ie=l(()=>{const pe=Mu.map(Ve=>lz(Ve,e)),Ae=[[`${I} · 站日报(查询日期 ${e})`],["统计区间",`${R} 至 ${O}`],["最后更新时间",a],[],["近7日加氢量"],["日期","加氢量(Kg)","单价","金额(元)","车次"],...P.map(Ve=>[Ve.date,Ve.quantityKg,Ve.unitPrice,Ve.amountYuan,Ve.vehicleCount]),[],["客户月加氢量(Kg)"],["客户",...pe],...Z.map(Ve=>[Ve.customerName,...Mu.map(ze=>{var We;return(We=Ve.months[ze])!=null?We:0})]),[],["客户月加氢费(元)"],["客户",...pe],...K.map(Ve=>[Ve.customerName,...Mu.map(ze=>{var We;return(We=Ve.months[ze])!=null?We:0})]),[],["客户氢费收支汇总"],["客户","充值/现金结算","扣预付消费","现结消费","余额","备注"],...de.map(Ve=>[Ve.customerName,Ve.rechargeOrSpotYuan,Ve.consumePrepaidYuan,Ve.consumeSpotYuan,Ve.balanceYuan,Ve.remark||""]),["小计",Ce.recharge,Ce.prepaid,Ce.spot,Ce.balance,""],[],["氢费充值/现结进账明细"],["充值日期","客户","付款方式","金额(元)"],...se.map(Ve=>[Ve.bizDate,Ve.customerName,nge[Ve.payMethod],Ve.amount]),[],["车辆加氢明细(由汇总派生 · 取证)"],["日期","车牌","客户","归属","加氢量(Kg)","单价","金额(元)"],...J.map(Ve=>[Ve.date,Ve.plateNo,Ve.customerName,Ve.fleet==="own"?"羚牛车辆":"外部车辆",Ve.quantityKg,Ve.unitPrice,Ve.amountYuan])];Ah(Ae,`站日报取证_${I}_查询${e}.xlsx`,"站日报取证")},"handleExport"),ye=l((pe,Ae)=>Mu.map((Ve,ze)=>{var We,me;const Se=(We=pe[Ve])!=null?We:0,ne=ze>0?Mu[ze-1]:null,xe=ne!=null?(me=pe[ne])!=null?me:0:null,oe=hz(Se,xe);return N.createElement("td",{key:Ve,className:`is-num ${oe}`},Ae(Se),N.createElement(dz,{curr:Se,prev:xe}))}),"renderMonthCells");return N.createElement("div",{className:"sd-detail","data-annotation-id":"station-daily-detail"},N.createElement("header",{className:"sd-detail-top"},N.createElement("div",{className:"sd-detail-top__lead"},N.createElement("button",{type:"button",className:"sd-btn sd-btn--ghost",onClick:i},N.createElement(zgt,{size:15,"aria-hidden":!0}),"返回"),N.createElement("div",null,N.createElement("h1",{className:"sd-detail-top__title"},I),N.createElement("p",{className:"sd-detail-top__meta"},L?`${L} · `:"",R," 至 ",O),N.createElement("p",{className:"sd-detail-top__updated"},"最后更新时间 ",a))),N.createElement("div",{className:"sd-detail-top__tools"},N.createElement(cge,{label:"查询日期",start:r,end:n,anchorYmd:cz,onChange:o}),N.createElement("button",{type:"button",className:"sd-btn sd-btn--ghost",onClick:l(()=>{s(),g(pe=>pe+1)},"onClick")},"刷新"),N.createElement("button",{type:"button",className:"sd-btn sd-btn--primary ehb-hide-h5",onClick:Ie},N.createElement(P0,{size:15,"aria-hidden":!0}),"导出取证"))),N.createElement("div",{className:"sd-hero-kpis sd-hero-kpis--detail"},N.createElement("div",{className:"sd-hero-kpi sd-hero-kpi--accent"},N.createElement("div",{className:"sd-hero-kpi__label"},"当日加氢"),N.createElement("div",{className:`sd-hero-kpi__value ${hz((d=W==null?void 0:W.quantityKg)!=null?d:0,Y)}`},W?Kd(W.quantityKg):"0.00",N.createElement("span",{className:"sd-unit"},"Kg"),N.createElement(dz,{curr:(f=W==null?void 0:W.quantityKg)!=null?f:0,prev:Y})),N.createElement("div",{className:"sd-hero-kpi__sub"},W?`¥${ks(W.amountYuan)} · ${W.vehicleCount} 车次`:"¥0.00 · 0 车次")),N.createElement("div",{className:"sd-hero-kpi"},N.createElement("div",{className:"sd-hero-kpi__label"},"近 10 日加氢"),N.createElement("div",{className:"sd-hero-kpi__value"},Kd(U),N.createElement("span",{className:"sd-unit"},"Kg")),N.createElement("div",{className:"sd-hero-kpi__sub"},"¥",ks(j))),N.createElement("div",{className:"sd-hero-kpi"},N.createElement("div",{className:"sd-hero-kpi__label"},"本月加氢"),N.createElement("div",{className:"sd-hero-kpi__value"},Kd(V),N.createElement("span",{className:"sd-unit"},"Kg")),N.createElement("div",{className:"sd-hero-kpi__sub"},e.slice(0,7))),N.createElement("div",{className:"sd-hero-kpi"},N.createElement("div",{className:"sd-hero-kpi__label"},"近 10 日现结"),N.createElement("div",{className:"sd-hero-kpi__value"},ks(ve),N.createElement("span",{className:"sd-unit"},"元")),N.createElement("div",{className:"sd-hero-kpi__sub"},ae.length?`${ae.length} 天有进账`:"0 天有进账"))),N.createElement("section",{className:"sd-panel sd-panel--block"},N.createElement("h2",{className:"sd-panel__title"},"加氢站每日加氢量汇总(近 7 日)"),N.createElement("div",{className:"sd-table-scroll"},N.createElement("table",{className:"sd-bi-table sd-bi-table--fill"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"日期"),N.createElement("th",{className:"is-num"},"加氢量(Kg)"),N.createElement("th",{className:"is-num"},"较昨日"),N.createElement("th",{className:"is-num"},"单价"),N.createElement("th",{className:"is-num"},"金额(元)"),N.createElement("th",{className:"is-num"},"车次"))),N.createElement("tbody",null,N.createElement("tr",{className:"is-total"},N.createElement("td",null,"近 7 日合计"),N.createElement("td",{className:"is-num"},Kd(z)),N.createElement("td",{className:"is-num"},"0"),N.createElement("td",{className:"is-num"},"0"),N.createElement("td",{className:"is-num"},ks(D)),N.createElement("td",{className:"is-num"},B)),P.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:6,className:"ehb-empty-cell"},"本窗暂无加氢量")):P.map((pe,Ae)=>{const Ve=Ae>0?P[Ae-1].quantityKg:null,ze=M.findIndex(ne=>ne.date===pe.date),We=ze>0?M[ze-1].quantityKg:Ve,me=We==null?null:pe.quantityKg-We,Se=hz(pe.quantityKg,We);return N.createElement("tr",{key:pe.date},N.createElement("td",null,uz(pe.date)),N.createElement("td",{className:`is-num ${Se}`},Kd(pe.quantityKg),N.createElement(dz,{curr:pe.quantityKg,prev:We})),N.createElement("td",{className:`is-num ${Se}`},me==null?"0.00":`${me>0?"+":""}${Kd(me)}`),N.createElement("td",{className:"is-num"},pe.unitPrice),N.createElement("td",{className:"is-num"},ks(pe.amountYuan)),N.createElement("td",{className:"is-num"},pe.vehicleCount))}))))),N.createElement("section",{className:"sd-panel sd-panel--block"},N.createElement("div",{className:"sd-panel__head-row"},N.createElement("h2",{className:"sd-panel__title"},"区间加氢量趋势"),N.createElement("span",{className:"sd-trend-legend-chip","aria-hidden":!0},N.createElement("i",{className:"sd-trend-legend-dot"}),I)),N.createElement("div",{className:"sd-trend sd-trend--fill",role:"img","aria-label":"区间加氢量趋势",onMouseLeave:l(()=>b(null),"onMouseLeave")},M.length===0?N.createElement("div",{className:"ehb-empty-cell",style:{padding:24}},"本窗暂无趋势"):M.map(pe=>N.createElement("div",{key:pe.date,className:`sd-trend__col ${v===pe.date?"is-hover":""}`,onMouseEnter:l(()=>b(pe.date),"onMouseEnter")},N.createElement("div",{className:"sd-trend__val"},pe.quantityKg.toFixed(0)),N.createElement("div",{className:"sd-trend__bar-wrap"},N.createElement("div",{className:"sd-trend__bar",style:{height:`${Math.max(8,pe.quantityKg/De*100)}%`}})),N.createElement("div",{className:"sd-trend__date"},pe.date))),ce?N.createElement("div",{className:"sd-trend-tip",role:"tooltip"},N.createElement("div",{className:"sd-trend-tip__date"},uz(ce.date)),N.createElement("div",{className:"sd-trend-tip__row"},N.createElement("i",{className:"sd-trend-legend-dot"}),N.createElement("span",{className:"sd-trend-tip__name"},I),N.createElement("strong",null,Kd(ce.quantityKg)," Kg · ¥",ks(ce.amountYuan))),N.createElement("div",{className:"sd-trend-tip__sub"},ce.vehicleCount," 车次")):null)),N.createElement("section",{className:"sd-panel sd-panel--block"},N.createElement("div",{className:"sd-panel__head-row"},N.createElement("h2",{className:"sd-panel__title"},"客户月加氢量汇总(Kg)"),N.createElement(uge,{options:q,value:m,onChange:y})),N.createElement("div",{className:"sd-table-scroll sd-table-scroll--matrix"},N.createElement("table",{className:"sd-bi-table sd-bi-table--matrix"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"客户"),Mu.map(pe=>N.createElement("th",{key:pe,className:"is-num"},lz(pe,e))))),N.createElement("tbody",null,N.createElement("tr",{className:"is-total"},N.createElement("td",null,"合计"),ye(re,Kd)),Z.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:1+Mu.length,className:"ehb-empty-cell"},"无匹配客户")):te.map(pe=>N.createElement("tr",{key:pe.customerName},N.createElement("td",null,pe.customerName),ye(pe.months,Kd)))))),N.createElement(d8,{expanded:w,total:Z.length,onToggle:l(()=>x(pe=>!pe),"onToggle")})),N.createElement("section",{className:"sd-panel sd-panel--block"},N.createElement("div",{className:"sd-panel__head-row"},N.createElement("h2",{className:"sd-panel__title"},"客户月加氢费汇总(元)"),N.createElement(uge,{options:q,value:m,onChange:y})),N.createElement("div",{className:"sd-table-scroll sd-table-scroll--matrix"},N.createElement("table",{className:"sd-bi-table sd-bi-table--matrix is-amount"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"客户"),Mu.map(pe=>N.createElement("th",{key:pe,className:"is-num"},lz(pe,e))))),N.createElement("tbody",null,N.createElement("tr",{className:"is-total"},N.createElement("td",null,"合计"),ye(Q,ks)),K.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:1+Mu.length,className:"ehb-empty-cell"},"无匹配客户")):ee.map(pe=>N.createElement("tr",{key:pe.customerName},N.createElement("td",null,pe.customerName),ye(pe.months,ks)))))),N.createElement(d8,{expanded:T,total:K.length,onToggle:l(()=>C(pe=>!pe),"onToggle")})),N.createElement("div",{className:"sd-dual sd-dual--cash sd-dual--ledger"},N.createElement("section",{className:"sd-panel"},N.createElement("h2",{className:"sd-panel__title"},"客户氢费收支汇总"),N.createElement("div",{className:"sd-table-scroll"},N.createElement("table",{className:"sd-bi-table sd-bi-table--ledger"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"客户"),N.createElement("th",{className:"is-num"},"充值/现金结算"),N.createElement("th",{className:"is-num"},"扣预付"),N.createElement("th",{className:"is-num"},"现结"),N.createElement("th",{className:"is-num"},"余额"),N.createElement("th",null,"备注"))),N.createElement("tbody",null,de.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:6,className:"ehb-empty-cell"},"暂无收支汇总")):N.createElement(N.Fragment,null,Ee.map(pe=>N.createElement("tr",{key:pe.customerName},N.createElement("td",{title:pe.customerName},pe.customerName),N.createElement("td",{className:`is-num ${em(pe.rechargeOrSpotYuan)}`},ks(pe.rechargeOrSpotYuan)),N.createElement("td",{className:`is-num ${em(-pe.consumePrepaidYuan)}`},ks(pe.consumePrepaidYuan)),N.createElement("td",{className:`is-num ${em(-pe.consumeSpotYuan)}`},ks(pe.consumeSpotYuan)),N.createElement("td",{className:`is-num ${em(pe.balanceYuan)}`},ks(pe.balanceYuan),pe.balanceYuan!==0?N.createElement("span",{className:"sd-delta","aria-hidden":!0},pe.balanceYuan>0?"▲":"▼"):null),N.createElement("td",null,pe.remark||""))),N.createElement("tr",{className:"is-total"},N.createElement("td",null,"小计"),N.createElement("td",{className:`is-num ${em(Ce.recharge)}`},ks(Ce.recharge)),N.createElement("td",{className:"is-num"},ks(Ce.prepaid)),N.createElement("td",{className:"is-num"},ks(Ce.spot)),N.createElement("td",{className:`is-num ${em(Ce.balance)}`},ks(Ce.balance)),N.createElement("td",null)))))),N.createElement(d8,{expanded:S,total:de.length,onToggle:l(()=>E(pe=>!pe),"onToggle")})),N.createElement("section",{className:"sd-panel"},N.createElement("div",{className:"sd-panel__head-row"},N.createElement("h2",{className:"sd-panel__title"},"氢费充值/现结进账明细"),N.createElement("span",{className:"sd-panel__meta"},"合计 ¥",ks(ve)," · ",se.length," 笔")),N.createElement("div",{className:"sd-table-scroll sd-table-scroll--cash-lines"},N.createElement("table",{className:"sd-bi-table sd-bi-table--ledger"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"充值日期"),N.createElement("th",null,"客户"),N.createElement("th",null,"付款方式"),N.createElement("th",{className:"is-num"},"金额(元)"))),N.createElement("tbody",null,se.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:4,className:"ehb-empty-cell"},"本窗暂无进账明细")):fe.map(pe=>N.createElement("tr",{key:pe.id},N.createElement("td",{className:"is-mono"},pe.bizDate),N.createElement("td",{title:pe.customerName},pe.customerName),N.createElement("td",null,nge[pe.payMethod]),N.createElement("td",{className:`is-num ${em(pe.amount)}`},ks(pe.amount))))))),N.createElement(d8,{expanded:k,total:se.length,onToggle:l(()=>A(pe=>!pe),"onToggle")}))))},"StationDailyDetailView");var TTt=Object.defineProperty,ETt=Object.defineProperties,CTt=Object.getOwnPropertyDescriptors,hge=Object.getOwnPropertySymbols,STt=Object.prototype.hasOwnProperty,_Tt=Object.prototype.propertyIsEnumerable,dge=l((t,e,r)=>e in t?TTt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp$1"),kTt=l((t,e)=>{for(var r in e||(e={}))STt.call(e,r)&&dge(t,r,e[r]);if(hge)for(var r of hge(e))_Tt.call(e,r)&&dge(t,r,e[r]);return t},"__spreadValues$1"),ATt=l((t,e)=>ETt(t,CTt(e)),"__spreadProps$1");function fw(t){return t.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}l(fw,"money");function f8(t){return t.toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2})}l(f8,"kg");function fz(t,e){const r=[],n=new Date(`${t}T00:00:00`),a=new Date(`${e}T00:00:00`);for(;n<=a;){const i=n.getFullYear(),s=String(n.getMonth()+1).padStart(2,"0"),o=String(n.getDate()).padStart(2,"0");r.push(`${i}-${s}-${o}`),n.setDate(n.getDate()+1)}return r}l(fz,"calendarDays");function NTt({vols:t,maxKg:e}){if(!t.length)return N.createElement("div",{className:"sd-spark sd-spark--empty","aria-hidden":!0});const r=Math.max(...t.map(a=>a.quantityKg),1),n=Math.max(e,r,1);return N.createElement("div",{className:"sd-spark","aria-hidden":!0},t.map(a=>N.createElement("div",{key:a.date,className:"sd-spark__col",title:`${a.date} ${a.quantityKg} Kg`},N.createElement("div",{className:"sd-spark__bar",style:{height:`${Math.max(10,a.quantityKg/n*100)}%`}}))))}l(NTt,"MiniSpark");const fge=vTt(cz),ITt=l(({embedded:t=!1})=>{const[e,r]=N.useState(fge.startDate),[n,a]=N.useState(fge.end),[i,s]=N.useState(null),[o,u]=N.useState("2026-08-12 10:00"),[h,d]=N.useState(0),[f,p]=N.useState(null),[g,m]=N.useState("all"),[y,v]=N.useState(hw[0].id),b=N.useMemo(()=>{const R=sz(),O=hw.map(P=>{var z,D,B;const W=lge(P.id,e,n),U=W.find(q=>q.date===n)||W[W.length-1],j=W.reduce((q,Z)=>q+Z.quantityKg,0),V=W.reduce((q,Z)=>q+Z.amountYuan,0),Y=oz(R,P.id,e,n),H=Y.reduce((q,Z)=>q+Z.totalAmount,0);return{id:P.id,name:P.name,region:P.region,endKg:(z=U==null?void 0:U.quantityKg)!=null?z:0,endAmt:(D=U==null?void 0:U.amountYuan)!=null?D:0,endVehicles:(B=U==null?void 0:U.vehicleCount)!=null?B:0,rangeKg:j,rangeAmt:V,cashDays:Y.length,cashTotal:H,vols:W,share:0}}),M=O.reduce((P,z)=>P+z.rangeKg,0)||1;return O.map(P=>ATt(kTt({},P),{share:P.rangeKg/M})).sort((P,z)=>z.rangeKg-P.rangeKg||P.name.localeCompare(z.name,"zh-CN"))},[e,n,h]),w=N.useMemo(()=>b.reduce((R,O)=>(R.rangeKg+=O.rangeKg,R.rangeAmt+=O.rangeAmt,R.cashTotal+=O.cashTotal,R.endKg+=O.endKg,R.endVehicles+=O.endVehicles,R),{rangeKg:0,rangeAmt:0,cashTotal:0,endKg:0,endVehicles:0}),[b]),x=N.useMemo(()=>{const R=new Map;return b.forEach(O=>{O.vols.forEach(M=>{const P=R.get(M.date)||{date:M.date,kg:0,amt:0,vehicles:0};P.kg+=M.quantityKg,P.amt+=M.amountYuan,P.vehicles+=M.vehicleCount,R.set(M.date,P)})}),fz(e,n).map(O=>R.get(O)||{date:O,kg:0,amt:0,vehicles:0})},[b,e,n]),T=N.useMemo(()=>{const R=sz(),O=new Map;return hw.forEach(M=>{oz(R,M.id,e,n).forEach(P=>{O.set(P.bizDate,(O.get(P.bizDate)||0)+P.totalAmount)})}),fz(e,n).map(M=>({date:M,amount:O.get(M)||0}))},[e,n,h]),C=N.useMemo(()=>Math.max(...b.flatMap(R=>R.vols.map(O=>O.quantityKg)),1),[b]),S=g==="all"?b:b.filter(R=>R.id===y),E=l(()=>{u(`2026-08-12 ${new Date().toTimeString().slice(0,5)}`),d(O=>O+1)},"handleRefresh"),k=l(R=>s(R),"openStation");if(i){const R=N.createElement(wTt,{stationId:i,asOf:n,rangeStart:e,rangeEnd:n,updatedAt:o,onBack:l(()=>s(null),"onBack"),onRefresh:E,onRangeChange:l(({start:O,end:M})=>{r(O),a(M)},"onRangeChange")});return t?N.createElement("div",{className:"sd-embedded","data-annotation-id":"energy-h2-station-daily-embedded"},R):N.createElement("div",{className:"ehb-shell ehb-shell--station-daily","data-annotation-id":"energy-h2-station-daily"},N.createElement("div",{className:"ehb-body sd-body"},R))}const A=b.some(R=>R.cashDays>0),I=fz(e,n).length,L=N.createElement(N.Fragment,null,N.createElement("header",{className:`sd-topbar ${t?"sd-topbar--embedded":""}`},N.createElement("div",{className:"sd-topbar__lead"},N.createElement("p",{className:"sd-topbar__updated"},"最后更新时间 ",o)),N.createElement("div",{className:"sd-topbar__tools"},N.createElement(cge,{label:"查询日期",start:e,end:n,anchorYmd:cz,onChange:l(({start:R,end:O})=>{r(R),a(O)},"onChange")}),N.createElement("button",{type:"button",className:"sd-btn sd-btn--ghost",onClick:E},N.createElement(xB,{size:15,"aria-hidden":!0}),"刷新"))),N.createElement("div",{className:"sd-hero-kpis","aria-label":"全站核心指标"},N.createElement("div",{className:"sd-hero-kpi"},N.createElement("div",{className:"sd-hero-kpi__label"},"加氢站"),N.createElement("div",{className:"sd-hero-kpi__value"},hw.length),N.createElement("div",{className:"sd-hero-kpi__sub"},"统计站点数")),N.createElement("button",{type:"button",className:"sd-hero-kpi sd-hero-kpi--accent sd-hero-kpi--click",onClick:l(()=>p("volumeTotal"),"onClick")},N.createElement("div",{className:"sd-hero-kpi__label"},"统计加氢总量"),N.createElement("div",{className:"sd-hero-kpi__value"},f8(w.rangeKg),N.createElement("span",{className:"sd-unit"},"Kg")),N.createElement("div",{className:"sd-hero-kpi__sub"},w.endVehicles," 车次 · 点按查看日明细")),N.createElement("button",{type:"button",className:"sd-hero-kpi sd-hero-kpi--click",onClick:l(()=>p("volumeDays"),"onClick")},N.createElement("div",{className:"sd-hero-kpi__label"},"统计加氢量"),N.createElement("div",{className:"sd-hero-kpi__value"},f8(w.rangeKg),N.createElement("span",{className:"sd-unit"},"Kg")),N.createElement("div",{className:"sd-hero-kpi__sub"},"¥",fw(w.rangeAmt)," · ",I," 天")),N.createElement("button",{type:"button",className:"sd-hero-kpi sd-hero-kpi--click",onClick:l(()=>p("cashDays"),"onClick")},N.createElement("div",{className:"sd-hero-kpi__label"},"统计现结金额"),N.createElement("div",{className:"sd-hero-kpi__value"},fw(w.cashTotal),N.createElement("span",{className:"sd-unit"},"元")),N.createElement("div",{className:"sd-hero-kpi__sub"},A?`${T.filter(R=>R.amount>0).length} 天有进账`:"0 天有进账"))),N.createElement("section",{className:"sd-station-board","aria-label":"各站经营概况"},N.createElement("div",{className:"sd-section-head"},N.createElement("h2",{className:"sd-section-title"},"各站概况"),N.createElement("div",{className:"sd-board-mode",role:"tablist","aria-label":"各站展示方式"},N.createElement("button",{type:"button",role:"tab",className:g==="all"?"is-on":"","aria-selected":g==="all",onClick:l(()=>m("all"),"onClick")},"全部"),N.createElement("button",{type:"button",role:"tab",className:g==="single"?"is-on":"","aria-selected":g==="single",onClick:l(()=>m("single"),"onClick")},"单站"),g==="single"?N.createElement("select",{className:"sd-board-station-select",value:y,onChange:l(R=>v(R.target.value),"onChange"),"aria-label":"选择站点"},b.map(R=>N.createElement("option",{key:R.id,value:R.id},R.name))):null)),N.createElement("div",{className:"sd-station-single-card"},S.map(R=>N.createElement("button",{key:R.id,type:"button",className:`sd-station-row ${g==="single"?"is-solo":""}`,onClick:l(()=>k(R.id),"onClick")},N.createElement("div",{className:"sd-station-row__main"},N.createElement("span",{className:"sd-station-card__icon","aria-hidden":!0},N.createElement(kA,{size:18})),N.createElement("div",{className:"sd-station-row__id"},N.createElement("div",{className:"sd-station-card__name"},R.name),N.createElement("div",{className:"sd-station-card__region"},N.createElement(Ggt,{size:12,"aria-hidden":!0}),R.region)),N.createElement(NTt,{vols:R.vols,maxKg:C}),N.createElement("div",{className:"sd-station-row__metrics"},N.createElement("div",null,N.createElement("span",{className:"sd-station-card__m-label"},"区间加氢"),N.createElement("strong",null,f8(R.rangeKg),N.createElement("span",null,"Kg"))),N.createElement("div",null,N.createElement("span",{className:"sd-station-card__m-label"},"区间金额"),N.createElement("strong",null,"¥",fw(R.rangeAmt))),N.createElement("div",null,N.createElement("span",{className:"sd-station-card__m-label"},"现结进账"),N.createElement("strong",null,"¥",fw(R.cashTotal))),N.createElement("div",{className:"sd-station-row__share"},N.createElement("span",{className:"sd-station-card__m-label"},"加氢量占比"),N.createElement("strong",{className:"sd-station-card__share"},(R.share*100).toFixed(1),"%"),N.createElement("div",{className:"sd-station-row__share-bar",role:"img","aria-label":`加氢量占比 ${(R.share*100).toFixed(1)}%`},N.createElement("i",{style:{width:`${Math.max(R.share*100,R.rangeKg>0?2:0)}%`}})))),N.createElement("span",{className:"sd-station-card__go","aria-hidden":!0},N.createElement(Hgt,{size:16}))))))),f?N.createElement("div",{className:"sd-kpi-modal",role:"dialog","aria-modal":"true"},N.createElement("button",{type:"button",className:"sd-kpi-modal__mask","aria-label":"关闭",onClick:l(()=>p(null),"onClick")}),N.createElement("div",{className:"sd-kpi-modal__panel"},N.createElement("div",{className:"sd-kpi-modal__head"},N.createElement("h3",null,f==="volumeTotal"&&"统计加氢总量 · 日明细",f==="volumeDays"&&"统计加氢量 · 单日数据",f==="cashDays"&&"统计现结金额 · 单日数据"),N.createElement("span",{className:"sd-kpi-modal__meta"},e," 至 ",n),N.createElement("button",{type:"button",className:"sd-btn sd-btn--ghost",onClick:l(()=>p(null),"onClick")},N.createElement(Vg,{size:14,"aria-hidden":!0}),"关闭")),N.createElement("div",{className:"sd-table-scroll"},f==="cashDays"?N.createElement("table",{className:"sd-bi-table sd-bi-table--fill"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"日期"),N.createElement("th",{className:"is-num"},"现结金额(元)"))),N.createElement("tbody",null,T.map(R=>N.createElement("tr",{key:R.date},N.createElement("td",{className:"is-mono"},R.date),N.createElement("td",{className:"is-num"},fw(R.amount)))))):N.createElement("table",{className:"sd-bi-table sd-bi-table--fill"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"日期"),N.createElement("th",{className:"is-num"},"加氢车次"),N.createElement("th",{className:"is-num"},"加氢量(Kg)"),N.createElement("th",{className:"is-num"},"加氢金额(元)"))),N.createElement("tbody",null,x.map(R=>N.createElement("tr",{key:R.date},N.createElement("td",{className:"is-mono"},R.date),N.createElement("td",{className:"is-num"},R.vehicles),N.createElement("td",{className:"is-num"},f8(R.kg)),N.createElement("td",{className:"is-num"},fw(R.amt))))))))):null);return t?N.createElement("div",{className:"sd-embedded","data-annotation-id":"energy-h2-station-daily-embedded"},L):N.createElement("div",{className:"ehb-shell ehb-shell--station-daily","data-annotation-id":"energy-h2-station-daily"},N.createElement("div",{className:"ehb-body sd-body"},L))},"StationDailyApp");var LTt=Object.defineProperty,$Tt=Object.defineProperties,MTt=Object.getOwnPropertyDescriptors,pge=Object.getOwnPropertySymbols,PTt=Object.prototype.hasOwnProperty,RTt=Object.prototype.propertyIsEnumerable,gge=l((t,e,r)=>e in t?LTt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp"),_o=l((t,e)=>{for(var r in e||(e={}))PTt.call(e,r)&&gge(t,r,e[r]);if(pge)for(var r of pge(e))RTt.call(e,r)&&gge(t,r,e[r]);return t},"__spreadValues"),ko=l((t,e)=>$Tt(t,MTt(e)),"__spreadProps");function OTt({value:t,onChange:e}){const[r,n]=N.useState(!1),a=N.useRef(null),i=[2026,2025,2024,2023,2022,2021,2020];return N.useEffect(()=>{function s(o){a.current&&!a.current.contains(o.target)&&n(!1)}return l(s,"handleClickOutside"),r&&document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}},[r]),N.createElement("div",{className:"ehb-year-select-wrapper",ref:a},N.createElement("button",{type:"button",className:`ehb-year-select-btn ${r?"is-active":""}`,onClick:l(()=>n(!r),"onClick"),"aria-label":"年份选择"},N.createElement("span",{className:"ehb-year-text"},t," 年"),N.createElement(XS,{size:13,style:{transition:"transform 0.2s ease",transform:r?"rotate(180deg)":"none",color:"#64748b"}})),r&&N.createElement("div",{className:"ehb-year-dropdown"},N.createElement("div",{className:"ehb-year-dropdown__header"},"切换数据年份"),N.createElement("div",{className:"ehb-year-dropdown__list"},i.map(s=>N.createElement("button",{key:s,type:"button",className:`ehb-year-dropdown__item ${s===t?"is-selected":""}`,onClick:l(()=>{e(s),n(!1)},"onClick")},N.createElement("span",null,s," 年"),s===t&&N.createElement("span",{className:"ehb-year-check"},"✓"))))))}l(OTt,"BiYearSelect");function p8({value:t,onChange:e,options:r,allLabel:n,placeholder:a="搜索…",width:i=180,disabled:s=!1}){var o;const[u,h]=N.useState(!1),[d,f]=N.useState(""),p=N.useRef(null),g=N.useRef(null);N.useEffect(()=>{function v(b){p.current&&!p.current.contains(b.target)&&h(!1)}return l(v,"onDoc"),u&&document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[u]),N.useEffect(()=>{u&&(f(""),requestAnimationFrame(()=>{var v;return(v=g.current)==null?void 0:v.focus()}))},[u]);const m=t==="all"?n:((o=r.find(v=>v.value===t))==null?void 0:o.label)||n,y=N.useMemo(()=>{const v=d.trim().toLowerCase();return v?r.filter(b=>b.label.toLowerCase().includes(v)||b.value.toLowerCase().includes(v)):r},[r,d]);return N.createElement("div",{className:`ehb-bi-search-select ${s?"is-disabled":""}`,ref:p,style:{width:i}},N.createElement("button",{type:"button",className:`ehb-bi-search-select__trigger ${u?"is-open":""} ${t!=="all"?"has-value":""}`,onClick:l(()=>!s&&h(v=>!v),"onClick"),disabled:s,title:m},N.createElement("span",{className:"ehb-bi-search-select__label"},m),N.createElement(XS,{size:13,className:"ehb-bi-search-select__chevron"})),u&&!s&&N.createElement("div",{className:"ehb-bi-search-select__dropdown"},N.createElement("div",{className:"ehb-bi-search-select__search"},N.createElement(AA,{size:13}),N.createElement("input",{ref:g,type:"text",value:d,onChange:l(v=>f(v.target.value),"onChange"),placeholder:a,onClick:l(v=>v.stopPropagation(),"onClick")})),N.createElement("div",{className:"ehb-bi-search-select__list"},N.createElement("button",{type:"button",className:`ehb-bi-search-select__item ${t==="all"?"is-selected":""}`,onClick:l(()=>{e("all"),h(!1)},"onClick")},n),y.map(v=>N.createElement("button",{key:v.value,type:"button",className:`ehb-bi-search-select__item ${t===v.value?"is-selected":""}`,onClick:l(()=>{e(v.value),h(!1)},"onClick"),title:v.label},v.label)),y.length===0&&N.createElement("div",{className:"ehb-bi-search-select__empty"},"无匹配项"))))}l(p8,"BiSearchSelect");const tm=[{rank:1,name:"嘉兴中石化滨海加氢站",province:"浙江省",kgT:"243.66",kgPct:35,incomeWan:"52.66",incomePct:7.1},{rank:2,name:"嘉兴嘉锦加氢站",province:"浙江省",kgT:"182.89",kgPct:26.2,incomeWan:"119.53",incomePct:16.1},{rank:3,name:"嘉兴嘉燃加氢站",province:"浙江省",kgT:"28.23",kgPct:4,incomeWan:"61.47",incomePct:8.3},{rank:4,name:"桐乡中石化绿能加氢站",province:"浙江省",kgT:"26.08",kgPct:3.7,incomeWan:"35.76",incomePct:4.8},{rank:5,name:"成都中石化天府机场高速北站加氢站",province:"四川省",kgT:"22.93",kgPct:3.3,incomeWan:"68.62",incomePct:9.2},{rank:6,name:"花桥中石油加氢站",province:"江苏省",kgT:"19.71",kgPct:2.8,incomeWan:"35.15",incomePct:4.7},{rank:7,name:"常熟嘉化加氢站",province:"江苏省",kgT:"15.56",kgPct:2.2,incomeWan:"25.81",incomePct:3.5},{rank:8,name:"嘉善中石化站前路加氢站",province:"浙江省",kgT:"14.61",kgPct:2.1,incomeWan:"25.34",incomePct:3.4},{rank:9,name:"嘉兴东方港湾加氢站",province:"浙江省",kgT:"13.45",kgPct:1.9,incomeWan:"7.01",incomePct:.9},{rank:10,name:"成都中石化天府机场高速南站加氢站",province:"四川省",kgT:"12.86",kgPct:1.8,incomeWan:"38.46",incomePct:5.2},{rank:11,name:"成都国氢华通加氢站",province:"四川省",kgT:"12.09",kgPct:1.7,incomeWan:"36.26",incomePct:4.9},{rank:12,name:"广州新锋交通联新加氢站",province:"广东省",kgT:"9.33",kgPct:1.3,incomeWan:"13.49",incomePct:1.8},{rank:13,name:"乌鲁木齐隆盛达沙坪加氢站",province:"新疆维吾尔自治区",kgT:"9.33",kgPct:1.3,incomeWan:"21.12",incomePct:2.8},{rank:14,name:"佛山豪石油加氢站",province:"广东省",kgT:"8.96",kgPct:1.3,incomeWan:"26.6",incomePct:3.6},{rank:15,name:"佛南海羚牛加氢站",province:"广东省",kgT:"7.10",kgPct:1,incomeWan:"3.29",incomePct:.4},{rank:16,name:"佛山中石化佛西加氢站",province:"广东省",kgT:"5.83",kgPct:.8,incomeWan:"20.32",incomePct:2.7},{rank:17,name:"广州中石化东明三路加氢站",province:"广东省",kgT:"5.62",kgPct:.8,incomeWan:"5.73",incomePct:.8},{rank:18,name:"常熟AP银河路加氢站",province:"江苏省",kgT:"4.98",kgPct:.7,incomeWan:"20.06",incomePct:2.7},{rank:19,name:"武汉中石化革新加氢站",province:"湖北省",kgT:"3.95",kgPct:.6,incomeWan:"9.45",incomePct:1.3},{rank:20,name:"韶关韶钢加氢站",province:"广东省",kgT:"3.72",kgPct:.5,incomeWan:"10.81",incomePct:1.5},{rank:21,name:"成都博能加氢站",province:"四川省",kgT:"3.49",kgPct:.5,incomeWan:"10.21",incomePct:1.4},{rank:22,name:"无锡润硕氢能加氢站",province:"江苏省",kgT:"3.22",kgPct:.5,incomeWan:"11.98",incomePct:1.6},{rank:23,name:"上海安亭加氢站",province:"上海市",kgT:"3.10",kgPct:.4,incomeWan:"9.82",incomePct:1.3},{rank:24,name:"昆山千灯加氢站",province:"江苏省",kgT:"2.88",kgPct:.4,incomeWan:"8.90",incomePct:1.2},{rank:25,name:"宁波港区示范加氢站",province:"浙江省",kgT:"2.45",kgPct:.3,incomeWan:"7.65",incomePct:1}],mge=[{rank:1,name:"嘉兴市乍浦港口经营有限公司",bearer:"cust",kgT:"288.37",costWan:"807.94",receivable:"¥1,987 元"},{rank:2,name:"嘉兴益顺冷链物流有限公司",bearer:"cust",kgT:"38.93",costWan:"136.83",receivable:"¥66.25 万元"},{rank:3,name:"嘉兴智奇供应链管理有限公司",bearer:"cust",kgT:"35.45",costWan:"101.73",receivable:"¥14.44 万元"},{rank:4,name:"车辆异动",bearer:"cust",kgT:"28.10",costWan:"92.96",receivable:"¥2,503 元"},{rank:5,name:"四川群彬物流有限公司",bearer:"cust",kgT:"23.35",costWan:"69.98",receivable:"¥69.98 万元"},{rank:6,name:"浙江洋井供应链管理有限公司",bearer:"cust",kgT:"18.62",costWan:"61.08",receivable:"¥321 元"},{rank:7,name:"无锡铭康物流有限公司-1",bearer:"lingniu",kgT:"16.89",costWan:"58.38",receivable:"¥0 元"},{rank:8,name:"上海明纳物流有限公司",bearer:"lingniu",kgT:"12.44",costWan:"41.4",receivable:"¥0 元"},{rank:9,name:"嘉兴中外运物流有限公司",bearer:"lingniu",kgT:"11.39",costWan:"31.94",receivable:"¥0 元"},{rank:10,name:"重庆金时源供应链有限公司",bearer:"cust",kgT:"11.18",costWan:"27.96",receivable:"¥27.96 万元"},{rank:11,name:"四川拱照物流有限公司",bearer:"cust",kgT:"10.34",costWan:"31",receivable:"¥31 万元"},{rank:12,name:"无锡铭康物流有限公司",bearer:"lingniu",kgT:"9.21",costWan:"31.72",receivable:"¥0 元"},{rank:13,name:"嘉兴羚利供应链科技有限公司",bearer:"cust",kgT:"8.62",costWan:"24.13",receivable:"¥25.85 万元"},{rank:14,name:"宁波港集装箱运输有限公司嘉兴分公司",bearer:"cust",kgT:"8.09",costWan:"22.66",receivable:"¥23.01 万元"},{rank:15,name:"成都诺和物流有限公司",bearer:"cust",kgT:"6.67",costWan:"19.99",receivable:"¥19.99 万元"},{rank:16,name:"嘉兴市飞宇物流有限公司",bearer:"cust",kgT:"6.49",costWan:"18.22",receivable:"¥6,483 元"},{rank:17,name:"嘉兴港区众通快递有限公司",bearer:"cust",kgT:"6.27",costWan:"17.55",receivable:"¥18.81 万元"},{rank:18,name:"浙江集佑供应链有限公司",bearer:"cust",kgT:"6.20",costWan:"17.35",receivable:"¥18.59 万元"},{rank:19,name:"日邮物流(中国)有限公司",bearer:"cust",kgT:"5.90",costWan:"22.11",receivable:"¥22.2 万元"},{rank:20,name:"四川邦达蜀运供应链管理有限公司",bearer:"cust",kgT:"5.21",costWan:"15.63",receivable:"¥15.65 万元"},{rank:21,name:"嘉兴古道物流有限公司",bearer:"cust",kgT:"5.18",costWan:"14.49",receivable:"¥15.53 万元"},{rank:22,name:"宁波乐驰物流有限公司",bearer:"cust",kgT:"5.01",costWan:"14.01",receivable:"¥14.1 万元"},{rank:23,name:"广东清运物流专线",bearer:"cust",kgT:"4.82",costWan:"13.50",receivable:"¥13.50 万元"},{rank:24,name:"顺丰冷运嘉兴分线",bearer:"cust",kgT:"4.21",costWan:"11.78",receivable:"¥11.80 万元"},{rank:25,name:"极兔速递冷链事业部",bearer:"cust",kgT:"3.95",costWan:"11.06",receivable:"¥11.06 万元"},{rank:26,name:"武汉捷运货运有限公司",bearer:"cust",kgT:"3.62",costWan:"10.13",receivable:"¥10.15 万元"},{rank:27,name:"成都天府物流二部",bearer:"cust",kgT:"3.11",costWan:"8.70",receivable:"¥8.70 万元"},{rank:28,name:"广州黄埔冷链车队",bearer:"cust",kgT:"2.85",costWan:"7.98",receivable:"¥8.00 万元"},{rank:29,name:"常熟物流储运中心",bearer:"cust",kgT:"2.40",costWan:"6.72",receivable:"¥6.72 万元"},{rank:30,name:"无锡灵通运输公司",bearer:"cust",kgT:"2.10",costWan:"5.88",receivable:"¥5.90 万元"}];function DTt({year:t,fleetScope:e,verifyScope:r,onOpenDrill:n,onOpenCustomerBill:a,onOpenStationBill:i}){const s=N.useMemo(()=>{const k=t===2026?1:t===2025?.85:.7,A=r==="verified"?.75:1,I=r==="verified"?0:1;return[{m:"1月",own:56800,ext:28400},{m:"2月",own:34600,ext:17400},{m:"3月",own:75200,ext:37600},{m:"4月",own:9e4,ext:45e3},{m:"5月",own:85300,ext:42700},{m:"6月",own:78600,ext:39400},{m:"7月",own:81300,ext:40700},{m:"8月",own:18600,ext:9400}].map(R=>{let O=Math.round(R.own*k*A),M=Math.round(R.ext*k*I);e==="own"&&(M=0),e==="external"&&(O=0);const P=O+M;return{month:R.m,ownKg:O,extKg:M,totalKg:P}})},[t,e,r]),o=N.useMemo(()=>Math.max(...s.map(S=>S.totalKg),1),[s]),u=[{name:"嘉兴市乍浦港口经营有限公司",ratio:.408},{name:"嘉兴益顺冷链物流有限公司",ratio:.176},{name:"嘉兴智奇供应链管理有限公司",ratio:.118},{name:"四川群彬物流有限公司",ratio:.078},{name:"浙江洋井供应链管理有限公司",ratio:.053},{name:"重庆金时源供应链有限公司",ratio:.039},{name:"四川拱照物流有限公司",ratio:.03},{name:"嘉兴羚利供应链科技有限公司",ratio:.027},{name:"宁波港集装箱运输嘉兴分公司",ratio:.023},{name:"成都诺和物流有限公司",ratio:.015},{name:"嘉兴市飞宇物流有限公司",ratio:.012},{name:"嘉兴港区众通快递有限公司",ratio:.01},{name:"浙江集佑供应链有限公司",ratio:.008},{name:"日邮物流(中国)有限公司",ratio:.003}],h=N.useMemo(()=>{const E=t===2026?1:.8,k=e==="all"?1:e==="own"?.67:.33,A=r==="verified"?e==="external"?0:.75:1,I=E*k*A;return[{m:"1月",income:82e3,cost:78e3},{m:"2月",income:38e3,cost:36e3},{m:"3月",income:98e3,cost:92e3},{m:"4月",income:105e3,cost:99e3},{m:"5月",income:112e3,cost:104e3},{m:"6月",income:118e3,cost:109e3},{m:"7月",income:115e3,cost:108e3},{m:"8月",income:16500,cost:15800}].map(R=>{const O=Math.round(R.income*I),M=Math.round(R.cost*I),P=u.map(U=>({name:U.name,amount:Math.round(O*U.ratio)}));P.sort((U,j)=>j.amount-U.amount);const z=P.slice(0,9),D=P.slice(9),B=D.reduce((U,j)=>U+j.amount,0),W=[{label:"包氢项目",amount:Math.round(M*.36)},{label:"我司承担",amount:Math.round(M*.32)},{label:"物流成本",amount:Math.round(M*.18)},{label:"运维异动",amount:Math.round(M*.08)},{label:"运维调拨",amount:Math.round(M*.06)}];return{m:R.m,income:O,cost:M,top9:z,restAmount:B,restCount:D.length,costDetails:W}})},[t,e,r]),d=N.useMemo(()=>Math.max(...h.flatMap(S=>[S.income,S.cost]),1),[h]),f=N.useMemo(()=>{const S=r==="verified"?.75:1,E=r==="verified"?0:1;return[{rank:1,name:"嘉兴中石化滨海加氢站",ownKg:163250,extKg:80411},{rank:2,name:"嘉兴嘉锦加氢站",ownKg:128020,extKg:54869},{rank:3,name:"嘉兴嘉燃加氢站",ownKg:18350,extKg:9884},{rank:4,name:"桐乡中石化绿能加氢站",ownKg:15648,extKg:10432},{rank:5,name:"成都中石化天府机场北站",ownKg:16050,extKg:6879}].map(A=>{let I=Math.round(A.ownKg*S),L=Math.round(A.extKg*E);e==="own"&&(L=0),e==="external"&&(I=0);const R=I+L;return ko(_o({},A),{ownKg:I,extKg:L,val:R,pct:100})}).map((A,I,L)=>{const R=Math.max(...L.map(O=>O.val),1);return ko(_o({},A),{pct:Math.round(A.val/R*100)})})},[e,r]),[p,g]=N.useState("city"),[m,y]=N.useState("all"),v=N.useMemo(()=>{const S=["all"];return tm.forEach(E=>{E.province&&!S.includes(E.province)&&S.push(E.province)}),S},[]),b=N.useMemo(()=>m==="all"?tm:tm.filter(S=>S.province===m),[m]),w=N.useMemo(()=>m==="all"?"共 65 站":m==="浙江省"?"共 28 站":m==="广东省"?"共 16 站":m==="四川省"?"共 11 站":m==="江苏省"?"共 7 站":`共 ${b.length} 站`,[m,b]),C=p==="province"?[{label:"浙江省",pct:"73.2%",color:"#0284c7",dashArray:"175 238",dashOffset:"0"},{label:"四川省",pct:"11.8%",color:"#38bdf8",dashArray:"28 238",dashOffset:"-176"},{label:"广东省",pct:"7.5%",color:"#10b981",dashArray:"18 238",dashOffset:"-205"},{label:"江苏省",pct:"5.4%",color:"#f59e0b",dashArray:"13 238",dashOffset:"-224"},{label:"其他省份",pct:"2.1%",color:"#94a3b8",dashArray:"5 238",dashOffset:"-238"}]:[{label:"嘉兴市",pct:"65.2%",color:"#0284c7",dashArray:"155 238",dashOffset:"0"},{label:"成都市",pct:"7.4%",color:"#38bdf8",dashArray:"18 238",dashOffset:"-156"},{label:"佛山市",pct:"3.7%",color:"#10b981",dashArray:"9 238",dashOffset:"-175"},{label:"昆山市",pct:"2.8%",color:"#f59e0b",dashArray:"7 238",dashOffset:"-185"},{label:"常熟市",pct:"2.2%",color:"#8b5cf6",dashArray:"5 238",dashOffset:"-193"},{label:"广州市",pct:"2.1%",color:"#ec4899",dashArray:"5 238",dashOffset:"-199"},{label:"深圳市",pct:"1.9%",color:"#06b6d4",dashArray:"4 238",dashOffset:"-205"},{label:"无锡市",pct:"1.9%",color:"#84cc16",dashArray:"4 238",dashOffset:"-210"},{label:"其他城市",pct:"12.7%",color:"#94a3b8",dashArray:"30 238",dashOffset:"-215"}];return N.createElement("div",{className:"ehb-overview-charts"},N.createElement("div",{className:"ehb-chart-box"},N.createElement("div",{className:"ehb-chart-box-head"},N.createElement("div",{className:"ehb-chart-box-title"},t," 年月度加氢量"),N.createElement("div",{className:"ehb-chart-legend-inline"},N.createElement("span",{className:"ehb-chart-legend-tag"},N.createElement("span",{className:"ehb-legend-sq",style:{background:"#0284c7"}}),"内部客户"),N.createElement("span",{className:"ehb-chart-legend-tag"},N.createElement("span",{className:"ehb-legend-sq",style:{background:"#f59e0b"}}),"外部客户"),N.createElement("span",{className:"ehb-chart-box-meta"},"统计范围:",t===2026?"2026-01-01 至 2026-08-08":`${t}-01-01 至 ${t}-12-31`," · 单位 Kg"))),N.createElement("div",{className:"ehb-mbar-chart"},s.map(S=>{const E=Math.min(100,Math.round(S.totalKg/o*100)),k=S.totalKg>0?Math.round(S.ownKg/S.totalKg*100):60,A=Math.max(0,100-k);return N.createElement("div",{key:S.month,className:"ehb-mbar-col",onClick:l(()=>n(`${t}年${S.month}加氢量`),"onClick"),style:{cursor:"pointer"},title:"点击钻取该月各加氢站内部/外部客户加氢量"},N.createElement("div",{className:"ehb-mbar-tooltip"},N.createElement("div",{className:"ehb-mbar-tooltip__head"},t,"年",S.month),N.createElement("div",{className:"ehb-mbar-tooltip__row"},N.createElement("span",{className:"ehb-mbar-tooltip__left"},N.createElement("span",{className:"ehb-mbar-tooltip__dot is-own"}),"内部客户"),N.createElement("span",{className:"ehb-mbar-tooltip__val"},S.ownKg.toLocaleString("zh-CN")," Kg")),N.createElement("div",{className:"ehb-mbar-tooltip__row"},N.createElement("span",{className:"ehb-mbar-tooltip__left"},N.createElement("span",{className:"ehb-mbar-tooltip__dot is-ext"}),"外部客户"),N.createElement("span",{className:"ehb-mbar-tooltip__val"},S.extKg.toLocaleString("zh-CN")," Kg")),N.createElement("div",{className:"ehb-mbar-tooltip__row",style:{marginTop:2,paddingTop:3,borderTop:"1px dashed rgba(255, 255, 255, 0.15)"}},N.createElement("span",{className:"ehb-mbar-tooltip__left",style:{color:"#ffffff",fontWeight:600}},"月度合计"),N.createElement("span",{className:"ehb-mbar-tooltip__val",style:{color:"#38bdf8"}},S.totalKg.toLocaleString("zh-CN")," Kg"))),N.createElement("div",{className:"ehb-mbar-val"},(S.totalKg/1e3).toFixed(1),"k"),N.createElement("div",{className:"ehb-mbar-fill",style:{height:`${E}%`,display:"flex",flexDirection:"column",overflow:"hidden",background:"transparent",borderRadius:"4px 4px 0 0"}},N.createElement("div",{style:{height:`${A}%`,background:"linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%)"}}),N.createElement("div",{style:{height:`${k}%`,background:"linear-gradient(180deg, #38bdf8 0%, #0284c7 100%)"}})),N.createElement("div",{className:"ehb-mbar-label"},S.month))}))),N.createElement("div",{className:"ehb-chart-box"},N.createElement("div",{className:"ehb-chart-box-head"},N.createElement("div",{className:"ehb-chart-box-title"},t," 年月度收支对比"),N.createElement("div",{className:"ehb-chart-legend-inline"},N.createElement("span",{className:"ehb-chart-legend-tag"},N.createElement("span",{className:"ehb-legend-sq is-income"}),"客户收入"),N.createElement("span",{className:"ehb-chart-legend-tag"},N.createElement("span",{className:"ehb-legend-sq is-cost"}),"成本支出"),N.createElement("span",{className:"ehb-chart-box-meta"},"统计范围:",t===2026?"2026-01-01 至 2026-08-08":`${t}-01-01 至 ${t}-12-31`," · 单位 元"))),N.createElement("div",{className:"ehb-rev-chart"},h.map(S=>{const E=Math.min(100,Math.round(S.income/d*100)),k=Math.min(100,Math.round(S.cost/d*100));return N.createElement("div",{key:S.m,className:"ehb-rev-col-group"},N.createElement("div",{className:"ehb-rev-bars"},N.createElement("div",{className:"ehb-rev-bar is-cost",style:{height:`${k}%`},onClick:l(()=>n(`${t}年${S.m}成本支出`),"onClick"),title:"点击钻取该月各加氢站成本支出"},N.createElement("div",{className:"ehb-rev-cost-tooltip"},N.createElement("div",{className:"ehb-rev-cost-tooltip__head"},N.createElement("span",null,t,"年",S.m," 成本支出明细"),N.createElement("span",{style:{fontSize:10,opacity:.8}},"成本构成")),N.createElement("div",{className:"ehb-rev-cost-tooltip__list"},S.costDetails.map(A=>N.createElement("div",{key:A.label,className:"ehb-rev-cost-tooltip__item"},N.createElement("span",{className:"ehb-rev-cost-tooltip__tag"},N.createElement("span",{className:"ehb-rev-cost-tooltip__dot"}),A.label),N.createElement("span",{className:"ehb-rev-cost-tooltip__val"},"¥",A.amount.toLocaleString("zh-CN"))))),N.createElement("div",{className:"ehb-rev-cost-tooltip__foot"},N.createElement("span",{style:{color:"#cbd5e1"}},"成本合计"),N.createElement("span",{style:{color:"#fbbf24",fontFamily:"var(--bi-font-mono)"}},"¥",S.cost.toLocaleString("zh-CN"))))),N.createElement("div",{className:"ehb-rev-bar is-income",style:{height:`${E}%`},onClick:l(()=>n(`${t}年${S.m}客户收入`),"onClick"),title:"点击钻取该月各加氢站客户收入"},N.createElement("div",{className:"ehb-rev-income-tooltip"},N.createElement("div",{className:"ehb-rev-income-tooltip__head"},N.createElement("span",null,t,"年",S.m," 客户加氢收入明细"),N.createElement("span",{style:{fontSize:10,opacity:.8}},"金额高→低")),N.createElement("div",{className:"ehb-rev-income-tooltip__list"},S.top9.map((A,I)=>N.createElement("div",{key:A.name,className:"ehb-rev-income-tooltip__item"},N.createElement("span",{className:"ehb-rev-income-tooltip__cust-name",title:A.name},I+1,". ",A.name),N.createElement("span",{className:"ehb-rev-income-tooltip__cust-val"},"¥",A.amount.toLocaleString("zh-CN")))),S.restCount>0&&N.createElement("div",{className:"ehb-rev-income-tooltip__item"},N.createElement("span",{className:"ehb-rev-income-tooltip__cust-name is-other"},"10. 其他客户 (",S.restCount,"家)"),N.createElement("span",{className:"ehb-rev-income-tooltip__cust-val"},"¥",S.restAmount.toLocaleString("zh-CN")))),N.createElement("div",{className:"ehb-rev-income-tooltip__foot"},N.createElement("span",{style:{color:"#cbd5e1"}},"收入合计"),N.createElement("span",{style:{color:"#34d399",fontFamily:"var(--bi-font-mono)"}},"¥",S.income.toLocaleString("zh-CN")))))),N.createElement("div",{className:"ehb-rev-label"},S.m))}))),N.createElement("div",{className:"ehb-two-charts-row"},N.createElement("div",{className:"ehb-chart-box"},N.createElement("div",{className:"ehb-chart-box-head"},N.createElement("div",{className:"ehb-chart-box-title"},"加氢站加氢量 Top5"),N.createElement("div",{className:"ehb-chart-legend-inline"},N.createElement("span",{className:"ehb-chart-legend-tag"},N.createElement("span",{className:"ehb-legend-sq",style:{background:"#0284c7"}}),"内部客户"),N.createElement("span",{className:"ehb-chart-legend-tag"},N.createElement("span",{className:"ehb-legend-sq",style:{background:"#f59e0b"}}),"外部客户"),N.createElement("span",{className:"ehb-chart-box-meta"},"统计范围:",t===2026?"2026-01-01 至 2026-08-08":`${t}-01-01 至 ${t}-12-31`," · 单位 Kg"))),N.createElement("div",{className:"ehb-top-stations-list"},f.map(S=>{const E=Math.round(S.ownKg/S.val*100),k=100-E;return N.createElement("div",{key:S.rank,className:"ehb-top-station-item",onClick:l(()=>n(`加氢站客户量:${S.name}`),"onClick"),style:{cursor:"pointer"},title:"点击钻取该加氢站内部/外部客户加氢总量"},N.createElement("span",{className:`ehb-top-rank ${S.rank>2?"is-sub":""}`},S.rank),N.createElement("span",{className:"ehb-top-station-name",title:S.name},S.name),N.createElement("div",{className:"ehb-top-bar-bg"},N.createElement("div",{className:"ehb-top-bar-tooltip"},N.createElement("div",{className:"ehb-top-bar-tooltip__head"},S.name),N.createElement("div",{className:"ehb-top-bar-tooltip__row"},N.createElement("span",{className:"ehb-top-bar-tooltip__left"},N.createElement("span",{className:"ehb-top-bar-tooltip__dot is-own"}),"内部客户"),N.createElement("span",{className:"ehb-top-bar-tooltip__val"},S.ownKg.toLocaleString("zh-CN")," Kg ",N.createElement("span",{style:{fontSize:10,opacity:.7,fontWeight:400}},"(",E,"%)"))),N.createElement("div",{className:"ehb-top-bar-tooltip__row"},N.createElement("span",{className:"ehb-top-bar-tooltip__left"},N.createElement("span",{className:"ehb-top-bar-tooltip__dot is-ext"}),"外部客户"),N.createElement("span",{className:"ehb-top-bar-tooltip__val"},S.extKg.toLocaleString("zh-CN")," Kg ",N.createElement("span",{style:{fontSize:10,opacity:.7,fontWeight:400}},"(",k,"%)"))),N.createElement("div",{className:"ehb-top-bar-tooltip__foot"},N.createElement("span",null,"加氢总量"),N.createElement("span",{style:{color:"#38bdf8",fontFamily:"var(--bi-font-mono)"}},S.val.toLocaleString("zh-CN")," Kg"))),N.createElement("div",{className:"ehb-top-bar-fill",style:{width:`${S.pct}%`}},N.createElement("div",{className:"ehb-top-bar-seg is-own",style:{width:`${E}%`}}),N.createElement("div",{className:"ehb-top-bar-seg is-ext",style:{width:`${k}%`}}))),N.createElement("span",{className:"ehb-top-station-val"},S.val.toLocaleString("zh-CN")))}))),N.createElement("div",{className:"ehb-chart-box"},N.createElement("div",{className:"ehb-chart-box-head"},N.createElement("div",{className:"ehb-chart-box-title"},"各区域加氢占比"),N.createElement("div",{className:"ehb-mini-tabs"},N.createElement("button",{type:"button",className:`ehb-mini-tab ${p==="province"?"is-active":""}`,onClick:l(()=>g("province"),"onClick")},"按省"),N.createElement("button",{type:"button",className:`ehb-mini-tab ${p==="city"?"is-active":""}`,onClick:l(()=>g("city"),"onClick")},"按市"))),N.createElement("div",{className:"ehb-donut-section"},N.createElement("div",{className:"ehb-donut-chart-wrap"},N.createElement("svg",{width:"130",height:"130",viewBox:"0 0 100 100"},N.createElement("circle",{cx:"50",cy:"50",r:"38",fill:"none",stroke:"#f1f5f9",strokeWidth:"16"}),C.map(S=>N.createElement("circle",{key:S.label,cx:"50",cy:"50",r:"38",fill:"none",stroke:S.color,strokeWidth:"16",strokeDasharray:S.dashArray,strokeDashoffset:S.dashOffset,style:{transition:"all 0.3s ease",cursor:"pointer"},onClick:l(()=>n(`区域${p==="city"?"市":"省"}:${S.label}`),"onClick")},N.createElement("title",null,`点击钻取${S.label}各加氢站加氢总量与占比`)))),N.createElement("div",{className:"ehb-donut-center-text"},N.createElement("div",{className:"title"},"年合计"),N.createElement("div",{className:"val"},"697.17T"))),N.createElement("div",{className:"ehb-region-legend-grid"},C.map(S=>N.createElement("div",{key:S.label,className:"ehb-region-legend-item",onClick:l(()=>n(`区域${p==="city"?"市":"省"}:${S.label}`),"onClick"),style:{cursor:"pointer"},title:`点击钻取${S.label}各加氢站加氢总量与占比`},N.createElement("div",{className:"ehb-region-legend-left"},N.createElement("span",{className:"ehb-region-dot",style:{background:S.color}}),N.createElement("span",null,S.label)),N.createElement("span",{className:"ehb-region-legend-val"},S.pct))))))),N.createElement("div",{className:"ehb-sum-table-card"},N.createElement("div",{className:"ehb-sum-table-card__head",style:{flexWrap:"wrap",gap:12}},N.createElement("div",{style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"}},N.createElement("div",{className:"ehb-sum-table-card__title"},"加氢站加氢汇总"),N.createElement("div",{className:"ehb-mini-tabs"},v.map(S=>N.createElement("button",{key:S,type:"button",className:`ehb-mini-tab ${m===S?"is-active":""}`,onClick:l(()=>y(S),"onClick")},S==="all"?"全国":S)))),N.createElement("div",{className:"ehb-sum-table-card__meta"},"统计范围:",t===2026?"2026-01-01 至 2026-08-08":`${t}-01-01 至 ${t}-12-31`," · ",w)),N.createElement("div",{className:"ehb-sum-table-wrap"},N.createElement("table",{className:"ehb-sum-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",{className:"col-idx"},"#"),N.createElement("th",{style:{textAlign:"left"}},"加氢站(点击钻取)"),N.createElement("th",{style:{textAlign:"left"}},"所属省份"),N.createElement("th",{style:{textAlign:"right"}},"加氢量"),N.createElement("th",{style:{textAlign:"right"}},"占比"),N.createElement("th",{style:{textAlign:"right"}},"氢费收入"),N.createElement("th",{style:{textAlign:"right"}},"收入占比"))),N.createElement("tbody",null,b.map((S,E)=>N.createElement("tr",{key:S.name,onClick:l(()=>i(S.name,S.province),"onClick"),style:{cursor:"pointer"},title:"点击钻取:加氢量 / 占比 / 氢费收入 / 收入占比"},N.createElement("td",{className:"col-idx"},E+1),N.createElement("td",{style:{fontWeight:600,color:"#0284c7"}},S.name," ",N.createElement("span",{style:{fontSize:11,fontWeight:400,opacity:.8}},"钻取 ›")),N.createElement("td",null,N.createElement("span",{style:{fontSize:11,color:"#0284c7",background:"#eff6ff",padding:"1px 6px",borderRadius:4,fontWeight:500}},S.province)),N.createElement("td",{style:{textAlign:"right"},className:"col-bold-kg"},S.kgT," ",N.createElement("span",{style:{fontSize:11,fontWeight:400,color:"#64748b"}},"T")),N.createElement("td",null,N.createElement("div",{className:"ehb-ratio-flex"},N.createElement("div",{className:"ehb-mini-bar-track"},N.createElement("div",{className:"ehb-mini-bar-fill is-blue",style:{width:`${Math.min(100,S.kgPct*2.5)}%`}})),N.createElement("span",{className:"ehb-ratio-text"},S.kgPct.toFixed(1),"%"))),N.createElement("td",{style:{textAlign:"right"},className:"col-green-fee"},"¥",S.incomeWan," ",N.createElement("span",{style:{fontSize:11,fontWeight:400}},"万元")),N.createElement("td",null,N.createElement("div",{className:"ehb-ratio-flex"},N.createElement("div",{className:"ehb-mini-bar-track"},N.createElement("div",{className:"ehb-mini-bar-fill is-green",style:{width:`${Math.min(100,S.incomePct*5)}%`}})),N.createElement("span",{className:"ehb-ratio-text"},S.incomePct.toFixed(1),"%"))))))))),N.createElement("div",{className:"ehb-sum-table-card"},N.createElement("div",{className:"ehb-sum-table-card__head"},N.createElement("div",{className:"ehb-sum-table-card__title"},"客户账单汇总",N.createElement("span",{className:"ehb-title-sub ehb-hide-h5"},"(已收 / 未收:等待客户能源账户和对账单打通后获取)"),N.createElement("span",{className:"ehb-title-sub ehb-show-h5"},"(已收未收打通中)")),N.createElement("div",{className:"ehb-sum-table-card__meta"},"统计范围:",t===2026?"2026-01-01 至 2026-08-08":`${t}-01-01 至 ${t}-12-31`," · Top 30")),N.createElement("div",{className:"ehb-sum-table-wrap"},N.createElement("table",{className:"ehb-sum-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",{className:"col-idx"},"#"),N.createElement("th",{style:{textAlign:"left"}},"客户(点击钻取)"),N.createElement("th",{style:{textAlign:"center"}},"承担方"),N.createElement("th",{style:{textAlign:"right"}},"加氢量"),N.createElement("th",{style:{textAlign:"right"}},"成本支出"),N.createElement("th",{style:{textAlign:"right"}},"应收"),N.createElement("th",{style:{textAlign:"right"},title:"等待客户能源账户和对账单打通后,取客户能源账户和对账单即可"},"已收"),N.createElement("th",{style:{textAlign:"right"},title:"等待客户能源账户和对账单打通后,取客户能源账户和对账单即可"},"未收"))),N.createElement("tbody",null,mge.map(S=>N.createElement("tr",{key:S.rank,onClick:l(()=>a(S.name),"onClick"),style:{cursor:"pointer"},title:"点击钻取:承担方 / 加氢量 / 成本支出 / 应收 / 已收 / 未收"},N.createElement("td",{className:"col-idx"},S.rank),N.createElement("td",{style:{fontWeight:600,color:"#0284c7"}},S.name," ",N.createElement("span",{style:{fontSize:11,fontWeight:400,opacity:.8}},"钻取 ›")),N.createElement("td",{style:{textAlign:"center"}},N.createElement("span",{className:`ehb-bearer-tag ${S.bearer==="cust"?"is-cust":"is-lingniu"}`},S.bearer==="cust"?"客户":"羚牛")),N.createElement("td",{style:{textAlign:"right"},className:"col-bold-kg"},S.kgT," ",N.createElement("span",{style:{fontSize:11,fontWeight:400,color:"#64748b"}},"T")),N.createElement("td",{style:{textAlign:"right"},className:"col-orange-cost"},"¥",S.costWan," ",N.createElement("span",{style:{fontSize:11,fontWeight:400}},"万元")),N.createElement("td",{style:{textAlign:"right"},className:"col-green-fee"},S.receivable),N.createElement("td",{style:{textAlign:"right"}},N.createElement("span",{className:"ehb-stay-tuned-tag",title:"等待客户能源账户和对账单打通后,取客户能源账户和对账单即可"},"敬请期待")),N.createElement("td",{style:{textAlign:"right"}},N.createElement("span",{className:"ehb-stay-tuned-tag",title:"等待客户能源账户和对账单打通后,取客户能源账户和对账单即可"},"敬请期待")))))))))}l(DTt,"OverviewTrendsDashboard");const FTt=l(()=>{const[t,e]=N.useState("global"),[r,n]=N.useState("overview"),[a,i]=N.useState(Uwt),[s,o]=N.useState("all"),[u,h]=N.useState("all"),[d,f]=N.useState(null),[p,g]=N.useState("siteMonth"),[m,y]=N.useState(null),[v,b]=N.useState(null),[w,x]=N.useState(null),[T,C]=N.useState(null),[S,E]=N.useState(null),[k,A]=N.useState(!1),I=N.useRef(null),[L,R]=N.useState(null),[O,M]=N.useState(null),[P,z]=N.useState("2026-07-25"),[D,B]=N.useState("2026-08-08"),W="统计时间范围",U=N.useMemo(()=>r==="daily"?`${P} 至 ${D}`:a===2026?"2026-01-01 至 2026-08-08 11:25":`${a}-01-01 至 ${a}-12-31 23:59`,[r,P,D,a]),j=l(()=>{y(null),b(null),x(null),C(null)},"clearEntity"),V=N.useMemo(()=>Zpe(ege,a,u,s),[a,u,s]),Y=N.useMemo(()=>qwt(V,a,ege,Ih),[V,a]),H=N.useMemo(()=>{var J;const ae=a===2026?1:a===2025?.85:.7,se=s==="all"?1:s==="own"?.67:.33,fe=u==="verified"?s==="external"?0:.75:1,ve=ae*se*fe,de=tm.map(De=>({name:De.name,province:De.province,kg:Math.round(parseFloat(De.kgT)*1e3*ve)})).filter(De=>De.kg>0).sort((De,ce)=>ce.kg-De.kg),Ee=((J=de[0])==null?void 0:J.kg)||1,Ce=de.reduce((De,ce)=>De+ce.kg,0)||1;return de.map((De,ce)=>ko(_o({},De),{rank:ce+1,barPct:Math.round(De.kg/Ee*100),sharePct:Math.round(De.kg/Ce*1e3)/10}))},[a,s,u]),q=N.useMemo(()=>{const J=H.slice(0,5).reduce((se,fe)=>se+fe.kg,0),ae=H.reduce((se,fe)=>se+fe.kg,0)||1;return Math.round(J/ae*1e3)/10},[H]),Z=N.useMemo(()=>{const J=a===2026?1:a===2025?.85:.7,ae=u==="verified"?.75:1,se=u==="verified"?0:1,ve=[{m:"1月",own:56800,ext:28400},{m:"2月",own:34600,ext:17400},{m:"3月",own:75200,ext:37600},{m:"4月",own:9e4,ext:45e3},{m:"5月",own:85300,ext:42700},{m:"6月",own:78600,ext:39400},{m:"7月",own:81300,ext:40700},{m:"8月",own:18600,ext:9400}].map(ce=>{let Ie=Math.round(ce.own*J*ae),ye=Math.round(ce.ext*J*se);return s==="own"&&(ye=0),s==="external"&&(Ie=0),{month:ce.m,totalKg:Ie+ye}}),de=l(ce=>Math.round(ce/1e3*100)/100,"toT"),Ee=ve[ve.length-1],Ce=ve.reduce((ce,Ie)=>Ie.totalKg>ce.totalKg?Ie:ce,ve[0]),De=ve.reduce((ce,Ie)=>ce+Ie.totalKg,0)/(ve.length||1);return`当月 ${de(Ee.totalKg)} T · 峰值${Ce.month} ${de(Ce.totalKg)} T · 月均 ${de(De)} T`},[a,s,u]);N.useEffect(()=>{if(!k)return;function J(ae){I.current&&!I.current.contains(ae.target)&&A(!1)}return l(J,"onDoc"),document.addEventListener("mousedown",J),()=>document.removeEventListener("mousedown",J)},[k]),N.useMemo(()=>Fwt(V),[V]),Bwt(V),zwt(V);const K=N.useMemo(()=>Wwt(V,d),[V,d]),re=N.useMemo(()=>d?K:V,[V,d,K]);N.useMemo(()=>Vwt(K),[K]),N.useMemo(()=>Gwt(re),[re]),N.useMemo(()=>{let J=K;return m&&(J=J.filter(ae=>ae.stationId===m)),w&&(J=J.filter(ae=>ae.customerId===w)),J},[K,m,w]),s==="external"&&V.length;const[Q,te]=N.useState("2026-08-08 10:12"),ee=l(()=>{const ae=new Date().toTimeString().split(" ")[0].slice(0,5);te(`2026-08-08 ${ae}`)},"handleRefreshData");return N.createElement("div",{className:"ehb-shell","data-annotation-id":"energy-h2-bi-board"},N.createElement("aside",{className:"ehb-rail","aria-label":"能源BI模块"},N.createElement("button",{type:"button",className:"ehb-rail__item is-active",title:"氢能"},N.createElement(kA,{size:20,"aria-hidden":!0}),"氢能"),N.createElement("button",{type:"button",className:"ehb-rail__item",disabled:!0,title:"电能(宿主)"},N.createElement(wB,{size:20,"aria-hidden":!0}),"电能"),N.createElement("button",{type:"button",className:"ehb-rail__item",disabled:!0,title:"ETC(宿主)"},N.createElement(Afe,{size:20,"aria-hidden":!0}),"ETC")),N.createElement("div",{className:"ehb-body"},N.createElement("header",{className:"ehb-chrome"},N.createElement("div",{className:"ehb-opening-watermark",role:"status","data-annotation-id":"ehb-opening-calib-banner",style:{width:"100%",marginBottom:10,padding:"8px 12px",borderRadius:10,border:"1px solid #f59e0b",background:"linear-gradient(90deg, #fffbeb, #fef3c7)",color:"#92400e",fontSize:13,fontWeight:600,lineHeight:1.4}},"期初校准中:期初余额与成本单价未锁定前,本看板仅供内部核对,不作对外真源。"),N.createElement("div",{className:"ehb-chrome__lead",style:{display:"flex",alignItems:"center",gap:12,flexWrap:"wrap"}},t==="global"?N.createElement("span",{className:"ehb-time-range-pill",style:{fontSize:12,color:"#0284c7",background:"#eff6ff",border:"1px solid #bae6fd",padding:"3px 10px",borderRadius:16,fontWeight:500,display:"inline-flex",alignItems:"center",gap:4,boxShadow:"0 1px 2px rgba(2, 132, 199, 0.06)"}},"📅 ",W,":",U):null),N.createElement("div",{className:"ehb-chrome__tools"},N.createElement("div",{className:"ehb-seg ehb-seg--wrap",role:"tablist","aria-label":"范围"},N.createElement("button",{type:"button",role:"tab",className:t==="global"?"is-active":"","aria-selected":t==="global",onClick:l(()=>e("global"),"onClick")},"全局"),N.createElement("button",{type:"button",role:"tab",className:t==="station"?"is-active":"","aria-selected":t==="station",onClick:l(()=>e("station"),"onClick")},"单站")),t==="global"?N.createElement("div",{className:"ehb-seg ehb-seg--wrap",role:"tablist","aria-label":"视图"},N.createElement("button",{type:"button",role:"tab",className:r==="daily"?"is-active":"","aria-selected":r==="daily",onClick:l(()=>n("daily"),"onClick")},"按日"),N.createElement("button",{type:"button",role:"tab",className:r==="overview"?"is-active":"","aria-selected":r==="overview",onClick:l(()=>n("overview"),"onClick")},"总览")):null)),t==="station"?N.createElement(ITt,{embedded:!0}):N.createElement(N.Fragment,null,r==="daily"?N.createElement(YTt,{updatedAt:Q,onRefresh:ee,startDate:P,endDate:D,onStartDateChange:z,onEndDateChange:B}):N.createElement(N.Fragment,null,N.createElement("section",{className:"ehb-daily-filter-card",style:{marginBottom:12}},N.createElement("div",{className:"ehb-daily-filter-row"},N.createElement("div",{className:"ehb-daily-filter-group"},N.createElement(OTt,{value:a,onChange:l(J=>{i(J),j()},"onChange")}),N.createElement("div",{className:"ehb-pill-tabs"},N.createElement("button",{type:"button",className:`ehb-pill-btn ${u==="all"?"is-active":""}`,onClick:l(()=>{h("all"),j()},"onClick")},"全量订单"),N.createElement("button",{type:"button",className:`ehb-pill-btn ${u==="verified"?"is-active":""}`,onClick:l(()=>{h("verified"),j()},"onClick")},"仅已核对"))),N.createElement("div",{className:"ehb-daily-filter-group"},N.createElement("div",{className:"ehb-fleet-segmented"},N.createElement("button",{type:"button",className:`ehb-fleet-btn ${s==="all"?"is-active":""}`,onClick:l(()=>{o("all"),j()},"onClick")},"全部车辆"),N.createElement("button",{type:"button",className:`ehb-fleet-btn ${s==="own"?"is-active":""}`,onClick:l(()=>{o("own"),j()},"onClick")},N.createElement(ku,{size:14}),"仅羚牛车辆"),N.createElement("button",{type:"button",className:`ehb-fleet-btn ${s==="external"?"is-active":""}`,onClick:l(()=>{o("external"),j()},"onClick")},N.createElement(ku,{size:14}),"仅外部车辆")),N.createElement("span",{className:"ehb-chrome__clock",style:{fontSize:12,color:"#64748b"}},Q),N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--ghost",onClick:ee,title:"数据刷新"},N.createElement(xB,{size:14,"aria-hidden":!0}),"刷新")))),N.createElement("section",{className:"ehb-host","aria-label":"经营总览"},N.createElement("div",{className:"ehb-host-kpi"},N.createElement(T4,{icon:N.createElement(kA,{size:14}),tone:"blue",label:"累计加氢量",value:Y.totalKgT,unit:"T",left:`我司 ${Y.companyKgT} T`,right:`客户 ${Y.customerKgT} T`,onClick:l(()=>E("累计加氢量"),"onClick")}),N.createElement(T4,{icon:N.createElement(Afe,{size:14}),tone:"blue",label:"累计加氢费",prefix:"¥",value:Y.totalFeeWan,unit:"万",left:`我司 ¥${Y.companyFeeWan} 万`,right:`客户 ¥${Y.customerFeeWan} 万`,onClick:l(()=>E("累计加氢费"),"onClick")}),N.createElement(T4,{icon:N.createElement(Sfe,{size:14}),tone:"green",label:"加氢利润",prefix:"¥",value:Y.profitWan,unit:"万",left:`收入 ¥${Y.incomeWan} 万`,right:`成本 ¥${Y.costWan} 万`,onClick:l(()=>E("加氢利润"),"onClick")}),N.createElement(T4,{icon:N.createElement(ku,{size:14}),tone:"amber",label:"本月加氢",value:Y.monthKgT,unit:"T",left:`加氢费 ¥${Y.monthFeeWan} 万`,right:`占年比 ${Y.monthYearPct}%`,onClick:l(()=>E("本月加氢"),"onClick")}),N.createElement(T4,{icon:N.createElement(wB,{size:14}),tone:"purple",label:"本日加氢",value:Y.dayKg,unit:"Kg",left:`加氢费 ¥${Y.dayFee.toLocaleString("zh-CN")}`,right:`占月比 ${Y.dayMonthPct}%`,onClick:l(()=>E("本日加氢"),"onClick")})),N.createElement("div",{className:"ehb-insight","aria-label":"经营洞察"},N.createElement("div",{className:"ehb-insight__card"},N.createElement("div",{className:"ehb-insight__icon is-down"},N.createElement(Ygt,{size:18,"aria-hidden":!0})),N.createElement("div",null,N.createElement("div",{className:"ehb-insight__title"},"月度加氢异常波动"),N.createElement("div",{className:"ehb-insight__value is-neg"},Y.monthYearPct>0?`占年 ${Y.monthYearPct}%`:"—"),N.createElement("div",{className:"ehb-insight__desc"},Z))),N.createElement("div",{className:`ehb-insight__card ehb-insight__card--rank ${k?"is-open":""}`,ref:I,onClick:l(()=>A(J=>!J),"onClick"),style:{cursor:"pointer"},title:"点击查看加氢站加氢量排名"},N.createElement("div",{className:"ehb-insight__icon"},N.createElement(qgt,{size:18,"aria-hidden":!0})),N.createElement("div",{className:"ehb-insight__rank-body"},N.createElement("div",{className:"ehb-insight__title"},"头部加氢站占比"),N.createElement("div",{className:"ehb-insight__value"},"Top5 ",q,"%"),N.createElement("div",{className:"ehb-insight__desc"},"累计 ",Y.totalKgT," T · 点击展开加氢量排名")),N.createElement(XS,{size:14,className:`ehb-insight__rank-chevron ${k?"is-open":""}`,"aria-hidden":!0}),k&&N.createElement("div",{className:"ehb-station-rank-dropdown",onClick:l(J=>J.stopPropagation(),"onClick"),role:"listbox","aria-label":"加氢站加氢量排名"},N.createElement("div",{className:"ehb-station-rank-dropdown__head"},N.createElement("span",null,"加氢站加氢量排名"),N.createElement("span",{className:"ehb-station-rank-dropdown__meta"},"高 → 低 · 共 ",H.length," 站")),N.createElement("div",{className:"ehb-station-rank-dropdown__list"},H.map(J=>N.createElement("button",{key:J.name,type:"button",className:"ehb-station-rank-item",onClick:l(()=>{A(!1),E(`加氢站客户量:${J.name}`)},"onClick"),title:"点击钻取该站明细"},N.createElement("span",{className:`ehb-station-rank-item__rank ${J.rank<=3?"is-top":""}`},J.rank),N.createElement("span",{className:"ehb-station-rank-item__main"},N.createElement("span",{className:"ehb-station-rank-item__name"},J.name),N.createElement("span",{className:"ehb-station-rank-item__bar"},N.createElement("span",{style:{width:`${J.barPct}%`}}))),N.createElement("span",{className:"ehb-station-rank-item__val"},(J.kg/1e3).toLocaleString("zh-CN",{maximumFractionDigits:2})," T"),N.createElement("span",{className:"ehb-station-rank-item__share"},J.sharePct,"%"))),H.length===0&&N.createElement("div",{className:"ehb-station-rank-empty"},"当前筛选下暂无站点数据")))),N.createElement("div",{className:"ehb-insight__card"},N.createElement("div",{className:"ehb-insight__icon is-ok"},N.createElement(Sfe,{size:18,"aria-hidden":!0})),N.createElement("div",null,N.createElement("div",{className:"ehb-insight__title"},"加氢利润率"),N.createElement("div",{className:`ehb-insight__value ${Y.profitRatePct>=0?"is-pos":"is-neg"}`},Y.profitRatePct,"%"),N.createElement("div",{className:"ehb-insight__desc"},"加氢利润 ",Y.profitWan," 万 · 收入 ",Y.incomeWan," 万"))))),N.createElement(DTt,{year:a,fleetScope:s,verifyScope:u,onOpenDrill:l(J=>E(J),"onOpenDrill"),onOpenCustomerBill:l(J=>R(J),"onOpenCustomerBill"),onOpenStationBill:l((J,ae)=>M({name:J,province:ae}),"onOpenStationBill")}))),t==="global"&&S&&N.createElement(VTt,{label:S,year:a,fleetScope:s,verifyScope:u,onClose:l(()=>E(null),"onClose")}),t==="global"&&L&&N.createElement(GTt,{customerName:L,year:a,onClose:l(()=>R(null),"onClose")}),t==="global"&&O&&N.createElement(qTt,{stationName:O.name,province:O.province,year:a,onClose:l(()=>M(null),"onClose")})))},"EnergyBiBoardApp");function T4({icon:t,tone:e,label:r,value:n,prefix:a,unit:i,left:s,right:o,onClick:u}){return N.createElement("div",{className:`ehb-kpi-dual is-${e}`,onClick:u,title:"点击展开站 → 客户 → 车牌数据来源穿透明细"},N.createElement("div",{className:"ehb-kpi-dual__head"},N.createElement("span",{className:"ehb-kpi-dual__label"},r,N.createElement("span",{className:"ehb-kpi-drill-hint"},N.createElement(AA,{size:10})," 钻取")),N.createElement("span",{className:`ehb-kpi-dual__badge is-${e}`},t)),N.createElement("div",{className:"ehb-kpi-dual__val"},a&&N.createElement("span",{className:"ehb-kpi-dual__symbol"},a),N.createElement("span",{className:"ehb-kpi-dual__num"},n),i&&N.createElement("span",{className:"ehb-kpi-dual__unit"},i)),N.createElement("div",{className:"ehb-kpi-dual__deck"},N.createElement("span",null,s),N.createElement("span",null,o)))}l(T4,"HostKpi");function Li(t,e,r,n){const a=e==="own",i=4.5;return[{time:"2026-08-08 09:15",factor:1.2,source:"api"},{time:"2026-08-08 14:30",factor:.9,source:"api"},{time:"2026-08-07 11:20",factor:1.1,source:"station_report"},{time:"2026-08-06 16:45",factor:.8,source:"lingniu_report"},{time:"2026-08-05 10:10",factor:1.05,source:"api"},{time:"2026-08-04 15:25",factor:.95,source:"station_report"},{time:"2026-08-03 08:50",factor:1.15,source:"api"},{time:"2026-08-02 17:05",factor:.85,source:"lingniu_report"},{time:"2026-08-01 12:40",factor:1,source:"station_report"},{time:"2026-07-31 09:30",factor:.9,source:"api"}].map((o,u)=>{const h=String(u+1).padStart(2,"0"),d=Math.round(n/100*o.factor*10)/10,f=o.source==="api"?`API-20260808-${t}-${h}`:o.source==="station_report"?`ST-20260808-${t}-${h}`:`LN-20260808-${t}-${h}`;let p=null;return a&&(r==="verified"?p="verified":r==="unverified"?p="unverified":p=u%2===0?"verified":"unverified"),{orderId:`ORD-20260808-${t}-${h}`,time:o.time,kg:d,unitPrice:i,amount:Math.round(d*i),source:o.source,certNo:f,verifyStatus:p}})}l(Li,"makeVehicleOrders");function yge(t,e){if(e!=="own")return null;if(!t||t.length===0)return"unverified";const r=t.filter(a=>a.verifyStatus==="verified").length,n=t.filter(a=>a.verifyStatus==="unverified").length;return r>0&&n>0?"partial":r>0&&n===0?"verified":"unverified"}l(yge,"computeVehicleVerifyStatus");function BTt(t){const e=t.map(r=>yge(r.orders,r.fleetCategory)).filter(r=>r!==null);return e.length===0?null:e.every(r=>r==="verified")?"verified":e.every(r=>r==="unverified")?"unverified":"partial"}l(BTt,"aggregateVehiclesVerifyStatus");const vge={own:"羚牛车辆:车牌可识别,且归属羚牛自有/合作车队",external:"外部车辆:非羚牛车队;无法识别车牌的归入「无车牌」并标外部车辆"},zTt={api:"API接入:加氢数据由接口自动归集,可按接口流水追溯",station_report:"站点上报:由加氢站报送的加氢数据",lingniu_report:"羚牛上报:从 OneOS 归集的加氢记录"},V0={verified:"已核对:范围内加氢订单均已完成核对",partial:"部分核对:范围内既有已核对,也有未核对订单",unverified:"未核对:范围内加氢订单均尚未核对",order_verified:"已核对:该笔加氢订单已完成核对",order_unverified:"未核对:该笔加氢订单尚未核对",external_skip:"外部车辆不参与核对,故无核对状态"};function bge(t){return N.createElement("span",{className:`ehb-tag ${t?"ehb-tag--own-fleet":"ehb-tag--ext-fleet"}`,title:t?vge.own:vge.external},t?"羚牛车辆":"外部车辆")}l(bge,"renderFleetTag");function pz(t){const e=t==="api"||t==="station_report"||t==="lingniu_report"?t:"api",r=e==="api"?"api":e==="station_report"?"station":"lingniu";return N.createElement("span",{className:`ehb-tag ehb-tag--source-${r}`,title:zTt[e]},uw[e]||t)}l(pz,"renderSourceTag");function xge(t,e){return t!=="own"?N.createElement("span",{style:{color:"#94a3b8"},title:V0.external_skip},"-"):e==="verified"?N.createElement("span",{className:"ehb-tag ehb-tag--verify-ok",title:V0.order_verified},"已核对"):N.createElement("span",{className:"ehb-tag ehb-tag--verify-warn",title:V0.order_unverified},"未核对")}l(xge,"renderOrderVerifyTag");function HTt(t,e){return t!=="own"||e===null?N.createElement("span",{style:{color:"#94a3b8"},title:V0.external_skip},"-"):e==="verified"?N.createElement("span",{className:"ehb-tag ehb-tag--verify-ok",title:"该车辆下全部加氢订单均已核对"},"已核对"):e==="partial"?N.createElement("span",{className:"ehb-tag ehb-tag--verify-partial",title:"该车辆下部分订单已核对,部分未核对"},"部分核对"):N.createElement("span",{className:"ehb-tag ehb-tag--verify-warn",title:"该车辆下全部加氢订单均未核对"},"未核对")}l(HTt,"renderVehicleVerifyTag");function WTt(t,e="下属车辆"){return t==="verified"?N.createElement("span",{className:"ehb-tag ehb-tag--verify-ok",title:`${V0.verified}(${e})`},"已核对"):t==="partial"?N.createElement("span",{className:"ehb-tag ehb-tag--verify-partial",title:`${V0.partial}(${e})`},"部分核对"):t==="unverified"?N.createElement("span",{className:"ehb-tag ehb-tag--verify-warn",title:`${V0.unverified}(${e})`},"未核对"):N.createElement("span",{style:{color:"#94a3b8"},title:V0.external_skip},"-")}l(WTt,"renderAggVerifyTag");function VTt({label:t,year:e,fleetScope:r,verifyScope:n,onClose:a}){var i,s,o,u;const[h,d]=N.useState("all"),[f,p]=N.useState("all"),[g,m]=N.useState("all"),[y,v]=N.useState(r);N.useEffect(()=>{v(r)},[r,t]);const[b,w]=N.useState({"st-jx":!0}),[x,T]=N.useState({"st-jx_c-zp":!0}),[C,S]=N.useState({"st-jx_c-zp_浙F88888":!0}),[E,k]=N.useState({}),A=l(qe=>{w(Me=>ko(_o({},Me),{[qe]:!Me[qe]}))},"toggleStation"),I=l((qe,Me)=>{const lt=`${qe}_${Me}`;T(it=>ko(_o({},it),{[lt]:!it[lt]}))},"toggleCustomer"),L=l((qe,Me,lt)=>{const it=`${qe}_${Me}_${lt}`;S(Ue=>ko(_o({},Ue),{[it]:!Ue[it]}))},"toggleVehicle"),R=l(qe=>{k(Me=>ko(_o({},Me),{[qe]:!Me[qe]}))},"toggleShowAllOrders"),O=N.useMemo(()=>{const Me=e===2026?1:.85;return[{stationId:"st-jx",stationName:"嘉兴中石化滨海加氢站",stationType:"self_use",province:"浙江省",totalKg:Math.round(243661*Me),totalFeeWan:(1096.47*Me).toFixed(2),customers:[{customerId:"c-zp",customerName:"嘉兴市乍浦港口经营有限公司",category:"internal",totalKg:Math.round(163250*Me),totalFeeWan:(734.63*Me).toFixed(2),vehicles:[{plateNo:"浙F88888",fleetCategory:"own",source:"api",certNo:"API-20260808-9821",count:142,kg:42600,amount:191700,orders:Li("9821","own","partial",42600)},{plateNo:"浙F66666",fleetCategory:"own",source:"api",certNo:"API-20260808-9822",count:128,kg:38400,amount:172800,orders:Li("9822","own","verified",38400)},{plateNo:"浙F77777",fleetCategory:"own",source:"lingniu_report",certNo:"LN-REP-202608-012",count:110,kg:33e3,amount:148500,orders:Li("012","own","verified",33e3)},{plateNo:"浙F55555",fleetCategory:"own",source:"station_report",certNo:"ST-REP-202608-045",count:98,kg:29400,amount:132300,orders:Li("045","own","unverified",29400)},{plateNo:"浙F33333",fleetCategory:"own",source:"api",certNo:"API-20260808-9825",count:66,kg:19850,amount:89325,orders:Li("9825","own","partial",19850)}]},{customerId:"c-ys",customerName:"嘉兴益顺冷链物流有限公司",category:"external",totalKg:Math.round(54869*Me),totalFeeWan:(246.91*Me).toFixed(2),vehicles:[{plateNo:"浙F12345",fleetCategory:"external",source:"api",certNo:"API-20260808-7712",count:85,kg:25500,amount:114750,orders:Li("7712","external","verified",25500)},{plateNo:"浙F67890",fleetCategory:"external",source:"station_report",certNo:"ST-REP-202608-088",count:62,kg:18600,amount:83700,orders:Li("088","external","verified",18600)},{plateNo:"无车牌",fleetCategory:"external",source:"station_report",certNo:"ST-REP-202608-099",count:36,kg:10769,amount:48460,orders:Li("099","external","verified",10769)}]},{customerId:"c-zq",customerName:"嘉兴智奇供应链管理有限公司",category:"external",totalKg:Math.round(25542*Me),totalFeeWan:(114.93*Me).toFixed(2),vehicles:[{plateNo:"沪A99881",fleetCategory:"external",source:"api",certNo:"API-20260808-6623",count:52,kg:15600,amount:70200,orders:Li("6623","external","verified",15600)},{plateNo:"沪A99882",fleetCategory:"external",source:"api",certNo:"API-20260808-6624",count:33,kg:9942,amount:44739,orders:Li("6624","external","verified",9942)}]}]},{stationId:"st-jj",stationName:"嘉兴嘉锦加氢站",stationType:"external_sale",province:"浙江省",totalKg:Math.round(182889*Me),totalFeeWan:(823*Me).toFixed(2),customers:[{customerId:"c-ln",customerName:"羚牛自营车队",category:"internal",totalKg:Math.round(128020*Me),totalFeeWan:(576.09*Me).toFixed(2),vehicles:[{plateNo:"浙A88881F",fleetCategory:"own",source:"api",certNo:"API-20260808-1001",count:180,kg:54e3,amount:243e3,orders:Li("1001","own","verified",54e3)},{plateNo:"浙A88882F",fleetCategory:"own",source:"lingniu_report",certNo:"LN-REP-202608-102",count:150,kg:45e3,amount:202500,orders:Li("102","own","verified",45e3)},{plateNo:"浙A88883F",fleetCategory:"own",source:"station_report",certNo:"ST-REP-202608-103",count:96,kg:29020,amount:130590,orders:Li("103","own","unverified",29020)}]},{customerId:"c-qb",customerName:"四川群彬物流有限公司",category:"external",totalKg:Math.round(54869*Me),totalFeeWan:(246.91*Me).toFixed(2),vehicles:[{plateNo:"川A77123",fleetCategory:"external",source:"api",certNo:"API-20260808-3301",count:110,kg:33e3,amount:148500,orders:Li("3301","external","verified",33e3)},{plateNo:"川A77124",fleetCategory:"external",source:"station_report",certNo:"ST-REP-202608-332",count:72,kg:21869,amount:98410,orders:Li("332","external","verified",21869)}]}]},{stationId:"st-jr",stationName:"嘉兴嘉燃加氢站",stationType:"self_use",province:"浙江省",totalKg:Math.round(28234*Me),totalFeeWan:(127.05*Me).toFixed(2),customers:[{customerId:"c-yj",customerName:"浙江洋井供应链管理有限公司",category:"external",totalKg:Math.round(28234*Me),totalFeeWan:(127.05*Me).toFixed(2),vehicles:[{plateNo:"浙B99112",fleetCategory:"external",source:"api",certNo:"API-20260808-4411",count:60,kg:18350,amount:82575,orders:Li("4411","external","verified",18350)},{plateNo:"浙B99113",fleetCategory:"external",source:"api",certNo:"API-20260808-4412",count:32,kg:9884,amount:44478,orders:Li("4412","external","verified",9884)}]}]},{stationId:"st-ln",stationName:"桐乡中石化绿能加氢站",stationType:"external_sale",province:"浙江省",totalKg:Math.round(26080*Me),totalFeeWan:(117.36*Me).toFixed(2),customers:[{customerId:"c-js",customerName:"重庆金时源供应链有限公司",category:"external",totalKg:Math.round(26080*Me),totalFeeWan:(117.36*Me).toFixed(2),vehicles:[{plateNo:"渝A66881",fleetCategory:"external",source:"api",certNo:"API-20260808-5501",count:52,kg:15648,amount:70416,orders:Li("5501","external","verified",15648)},{plateNo:"渝A66882",fleetCategory:"external",source:"station_report",certNo:"ST-REP-202608-552",count:35,kg:10432,amount:46944,orders:Li("552","external","verified",10432)}]}]},{stationId:"st-tf",stationName:"成都中石化天府机场北站",stationType:"external_sale",province:"四川省",totalKg:Math.round(22929*Me),totalFeeWan:(103.18*Me).toFixed(2),customers:[{customerId:"c-gz",customerName:"四川拱照物流有限公司",category:"external",totalKg:Math.round(22929*Me),totalFeeWan:(103.18*Me).toFixed(2),vehicles:[{plateNo:"川A88901",fleetCategory:"external",source:"api",certNo:"API-20260808-8801",count:53,kg:16050,amount:72225,orders:Li("8801","external","verified",16050)},{plateNo:"川A88902",fleetCategory:"external",source:"station_report",certNo:"ST-REP-202608-8802",count:23,kg:6879,amount:30955,orders:Li("8802","external","verified",6879)}]}]}]},[e]),M=N.useMemo(()=>O.map(qe=>{if(h!=="all"&&qe.stationId!==h)return null;const Me=qe.customers.map(lt=>{if(f!=="all"&<.customerId!==f)return null;const it=lt.vehicles.map(Ue=>{if(y!=="all"&&Ue.fleetCategory!==y||g!=="all"&&Ue.plateNo!==g)return null;if(n==="verified"){if(Ue.fleetCategory!=="own")return null;const we=Ue.orders.filter(ie=>ie.verifyStatus==="verified");if(we.length===0)return null;const gt=we.reduce((ie,be)=>ie+be.kg,0),ge=we.reduce((ie,be)=>ie+be.amount,0);return ko(_o({},Ue),{orders:we,count:we.length,kg:gt,amount:ge})}return Ue}).filter(Boolean);return it.length===0?null:ko(_o({},lt),{vehicles:it,totalKg:it.reduce((Ue,we)=>Ue+we.kg,0),totalFeeWan:(it.reduce((Ue,we)=>Ue+we.amount,0)/1e4).toFixed(2)})}).filter(Boolean);return Me.length===0?null:ko(_o({},qe),{customers:Me,totalKg:Me.reduce((lt,it)=>lt+it.totalKg,0),totalFeeWan:Me.reduce((lt,it)=>lt+parseFloat(it.totalFeeWan),0).toFixed(2)})}).filter(Boolean),[O,h,f,g,y,n]),P=N.useMemo(()=>O.map(qe=>({value:qe.stationId,label:qe.stationName})),[O]),z=N.useMemo(()=>{const qe=new Map;return O.forEach(Me=>{h!=="all"&&Me.stationId!==h||Me.customers.forEach(lt=>{qe.has(lt.customerId)||qe.set(lt.customerId,lt.customerName)})}),Array.from(qe.entries()).map(([Me,lt])=>({value:Me,label:lt}))},[O,h]),D=N.useMemo(()=>{const qe=new Set;return O.forEach(Me=>{h!=="all"&&Me.stationId!==h||Me.customers.forEach(lt=>{f!=="all"&<.customerId!==f||lt.vehicles.forEach(it=>{y!=="all"&&it.fleetCategory!==y||qe.add(it.plateNo)})})}),Array.from(qe).map(Me=>({value:Me,label:/无车牌/.test(Me)?"无车牌":Me}))},[O,h,f,y]);N.useEffect(()=>{f!=="all"&&!z.some(qe=>qe.value===f)&&(p("all"),m("all"))},[z,f]),N.useEffect(()=>{g!=="all"&&!D.some(qe=>qe.value===g)&&m("all")},[D,g]);const B=t==="加氢利润",W=t==="本月加氢",U=t==="本日加氢",j=t.match(/^(\d{4})年(\d{1,2})月(加氢量|客户收入|成本支出)$/),V=(j==null?void 0:j[3])==="加氢量",Y=(j==null?void 0:j[3])==="客户收入",H=(j==null?void 0:j[3])==="成本支出",q=V||Y||H,Z=t.match(/^加氢站(?:客户量)?:(.+)$/),K=!!Z,re=(s=(i=Z==null?void 0:Z[1])==null?void 0:i.trim())!=null?s:"",Q=t.match(/^区域(市|省):(.+)$/),te=!!Q,ee=Q==null?void 0:Q[1],J=(u=(o=Q==null?void 0:Q[2])==null?void 0:o.trim())!=null?u:"",ae=q||K||te,se=j?Number(j[2])-1:-1,fe=[85200,52e3,112800,135e3,128e3,118e3,122e3,28e3],ve=fe.reduce((qe,Me)=>qe+Me,0)||1,de=se>=0&&se<fe.length?fe[se]/ve:1,Ee=Ih.incomeWan/Ih.costWan,Ce=Ih.profitWan/Ih.costWan,De=Ih.monthKgT/Ih.totalKgT,ce=Ih.dayKg/(Ih.totalKgT*1e3),Ie=l(qe=>Math.round(qe*Ee*100)/100,"toIncomeYuan"),ye=l(qe=>Math.round(qe*Ce*100)/100,"toProfitYuan"),pe=l(qe=>Math.round(qe*De*100)/100,"toMonthKg"),Ae=l(qe=>Math.round(qe*De*100)/100,"toMonthFee"),Ve=l(qe=>Math.round(qe*ce*100)/100,"toDayKg"),ze=l(qe=>Math.round(qe*ce*100)/100,"toDayFee"),We=l(qe=>parseFloat(String(qe))*1e4,"feeWanToYuan"),me=M.reduce((qe,Me)=>qe+We(Me.totalFeeWan),0),Se=Ae(me),ne=l(qe=>me>0?Math.round(qe/me*1e4)/100:0,"toFeeYearPct"),xe=l(qe=>Se>0?Math.round(qe/Se*1e4)/100:0,"toFeeMonthPct"),oe=B||W||U?8:7,_e=N.useMemo(()=>M.map(qe=>{const Me=qe.customers.filter(it=>it.category==="internal").reduce((it,Ue)=>it+Ue.totalKg,0),lt=qe.customers.filter(it=>it.category==="external").reduce((it,Ue)=>it+Ue.totalKg,0);return{stationId:qe.stationId,stationName:qe.stationName,province:qe.province,internalKg:Math.round(Me*de),externalKg:Math.round(lt*de),totalKg:Math.round((Me+lt)*de)}}).sort((qe,Me)=>Me.totalKg-qe.totalKg),[M,de]),ue=N.useMemo(()=>M.map(qe=>{const Me=We(qe.totalFeeWan)*de;return{stationId:qe.stationId,stationName:qe.stationName,province:qe.province,incomeYuan:Math.round(Me*Ee),costYuan:Math.round(Me)}}).sort((qe,Me)=>H?Me.costYuan-qe.costYuan:Me.incomeYuan-qe.incomeYuan),[M,de,Ee,H]),tt=_e.reduce((qe,Me)=>qe+Me.internalKg,0),Re=_e.reduce((qe,Me)=>qe+Me.externalKg,0),et=_e.reduce((qe,Me)=>qe+Me.totalKg,0),Xe=ue.reduce((qe,Me)=>qe+Me.incomeYuan,0),ot=ue.reduce((qe,Me)=>qe+Me.costYuan,0),Ge=N.useMemo(()=>{if(!K||!re)return[];const qe=O.find(Me=>Me.stationName===re)||O.find(Me=>Me.stationName.includes(re.replace(/加氢站$/,""))||re.includes(Me.stationName.replace(/加氢站$/,"")));if(!qe){const Me=[{rank:1,name:"嘉兴中石化滨海加氢站",ownKg:163250,extKg:80411},{rank:2,name:"嘉兴嘉锦加氢站",ownKg:128020,extKg:54869},{rank:3,name:"嘉兴嘉燃加氢站",ownKg:18350,extKg:9884},{rank:4,name:"桐乡中石化绿能加氢站",ownKg:15648,extKg:10432},{rank:5,name:"成都中石化天府机场北站",ownKg:16050,extKg:6879}].find(lt=>lt.name===re||re.includes(lt.name.slice(0,6)));return Me?[{customerId:"own",customerName:"内部客户合计",category:"internal",totalKg:Me.ownKg},{customerId:"ext",customerName:"外部客户合计",category:"external",totalKg:Me.extKg}]:[]}return qe.customers.map(Me=>({customerId:Me.customerId,customerName:Me.customerName,category:Me.category,totalKg:Me.totalKg})).sort((Me,lt)=>lt.totalKg-Me.totalKg)},[O,K,re]),ht=Ge.filter(qe=>qe.category==="internal").reduce((qe,Me)=>qe+Me.totalKg,0),Je=Ge.filter(qe=>qe.category==="external").reduce((qe,Me)=>qe+Me.totalKg,0),St=ht+Je,He=N.useMemo(()=>{if(!te||!J)return[];const qe={嘉兴市:["嘉兴","桐乡","嘉善"],成都市:["成都"],佛山市:["佛山"],昆山市:["昆山"],常熟市:["常熟"],广州市:["广州"],深圳市:["深圳"],无锡市:["无锡"]},Me=l((Ue,we)=>we==="其他城市"?!Object.values(qe).flat().some(ie=>Ue.includes(ie)):(qe[we]||[we.replace(/市$/,"")]).some(ge=>Ue.includes(ge)),"matchCity"),lt=tm.filter(Ue=>ee==="省"?J==="其他省份"?!["浙江省","四川省","广东省","江苏省"].includes(Ue.province):Ue.province===J:Me(Ue.name,J)),it=lt.reduce((Ue,we)=>Ue+parseFloat(we.kgT)*1e3,0)||1;return lt.map(Ue=>{const we=Math.round(parseFloat(Ue.kgT)*1e3);return{name:Ue.name,province:Ue.province,kg:we,kgT:Ue.kgT,pct:Math.round(we/it*1e4)/100,incomeWan:Ue.incomeWan}}).sort((Ue,we)=>we.kg-Ue.kg)},[te,ee,J]),dt=He.reduce((qe,Me)=>qe+Me.kg,0),Oe=l((qe,Me)=>{if(B)return N.createElement(N.Fragment,null,N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#10b981",fontWeight:600}},"¥",Ie(Me).toLocaleString("zh-CN")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#f59e0b",fontWeight:600}},"¥",Me.toLocaleString("zh-CN")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#0284c7",fontWeight:700}},"¥",ye(Me).toLocaleString("zh-CN")));if(W){const lt=pe(qe),it=Ae(Me);return N.createElement(N.Fragment,null,N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#0f172a",fontWeight:600}},lt.toLocaleString("zh-CN")," Kg"),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#f59e0b",fontWeight:600}},"¥",it.toLocaleString("zh-CN")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#0284c7",fontWeight:700}},ne(it).toFixed(2),"%"))}if(U){const lt=Ve(qe),it=ze(Me);return N.createElement(N.Fragment,null,N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#0f172a",fontWeight:600}},lt.toLocaleString("zh-CN")," Kg"),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#f59e0b",fontWeight:600}},"¥",it.toLocaleString("zh-CN")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#0284c7",fontWeight:700}},xe(it).toFixed(2),"%"))}return N.createElement(N.Fragment,null,N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#0f172a",fontWeight:600}},qe.toLocaleString("zh-CN")," Kg"),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#10b981"}},"¥",Me.toLocaleString("zh-CN")))},"renderMetricCells"),vt=l(()=>{if(V){const it=[["加氢站名称","所属省份","内部客户加氢总量(Kg)","外部客户加氢总量(Kg)","合计加氢总量(Kg)"]];_e.forEach(Ue=>{it.push([Ue.stationName,Ue.province,Ue.internalKg,Ue.externalKg,Ue.totalKg])}),Ah(it,`${t}_各站内外部客户加氢量.xlsx`,"月度各站加氢量");return}if(Y){const it=[["加氢站名称","所属省份","客户收入(元)"]];ue.forEach(Ue=>{it.push([Ue.stationName,Ue.province,Ue.incomeYuan])}),Ah(it,`${t}_各站客户收入.xlsx`,"月度各站客户收入");return}if(H){const it=[["加氢站名称","所属省份","成本支出(元)"]];ue.forEach(Ue=>{it.push([Ue.stationName,Ue.province,Ue.costYuan])}),Ah(it,`${t}_各站成本支出.xlsx`,"月度各站成本支出");return}if(K){const it=[["加氢站","客户名称","客户类型","加氢总量(Kg)"]];Ge.forEach(Ue=>{it.push([re,Ue.customerName,Ue.category==="internal"?"内部客户":"外部客户",Ue.totalKg])}),Ah(it,`${re}_内外部客户加氢量.xlsx`,"站客户加氢量");return}if(te){const it=[["区域","加氢站名称","所属省份","加氢总量(Kg)","区域内占比(%)"]];He.forEach(Ue=>{it.push([J,Ue.name,Ue.province,Ue.kg,Ue.pct])}),Ah(it,`${J}_各站加氢总量占比.xlsx`,"区域各站加氢量");return}const qe=[B?["加氢站名称","客户名称","车牌号","车辆归属","订单编号","加氢时间","数据来源","订单核对状态","加氢量(Kg)","收入(元)","成本(元)","利润(元)"]:W?["加氢站名称","客户名称","车牌号","车辆归属","订单编号","加氢时间","数据来源","订单核对状态","本月加氢量(Kg)","本月加氢费(元)","加氢费占年比(%)"]:U?["加氢站名称","客户名称","车牌号","车辆归属","订单编号","加氢时间","数据来源","订单核对状态","本日加氢量(Kg)","本日加氢费(元)","加氢费占月比(%)"]:["加氢站名称","加氢站类型","客户名称","客户类型","车牌号","车辆归属","订单编号","加氢时间","数据来源","来源凭证/接口流水号","订单核对状态","单价(元/Kg)","加氢量(Kg)","加氢金额(元)"]];O.forEach(it=>{it.customers.forEach(Ue=>{Ue.vehicles.forEach(we=>{we.orders.forEach(gt=>{if(B)qe.push([it.stationName,Ue.customerName,we.plateNo,we.fleetCategory==="own"?"羚牛车辆":"外部车辆",gt.orderId,gt.time,uw[gt.source]||gt.source,we.fleetCategory==="own"?b4[gt.verifyStatus||"unverified"]||"未核对":"-",gt.kg,Ie(gt.amount),gt.amount,ye(gt.amount)]);else if(W){const ge=Ae(gt.amount);qe.push([it.stationName,Ue.customerName,we.plateNo,we.fleetCategory==="own"?"羚牛车辆":"外部车辆",gt.orderId,gt.time,uw[gt.source]||gt.source,we.fleetCategory==="own"?b4[gt.verifyStatus||"unverified"]||"未核对":"-",pe(gt.kg),ge,ne(ge)])}else if(U){const ge=ze(gt.amount);qe.push([it.stationName,Ue.customerName,we.plateNo,we.fleetCategory==="own"?"羚牛车辆":"外部车辆",gt.orderId,gt.time,uw[gt.source]||gt.source,we.fleetCategory==="own"?b4[gt.verifyStatus||"unverified"]||"未核对":"-",Ve(gt.kg),ge,xe(ge)])}else qe.push([it.stationName,it.stationType==="self_use"?"自用消费":"对外销售",Ue.customerName,Ue.category==="internal"?"内部客户":"外部客户",we.plateNo,we.fleetCategory==="own"?"羚牛车辆":"外部车辆",gt.orderId,gt.time,uw[gt.source]||gt.source,gt.certNo,we.fleetCategory==="own"?b4[gt.verifyStatus||"unverified"]||"未核对":"-",gt.unitPrice,gt.kg,gt.amount])})})})});const Me=B?`${e}年_加氢利润_收入成本穿透明细.xlsx`:W?`${e}年_本月加氢_量费占年比穿透明细.xlsx`:U?`${e}年_本日加氢_量费占月比穿透明细.xlsx`:`${e}年_${t}_加氢站_客户_车牌_单笔订单穿透流水账单.xlsx`;Ah(qe,Me,B?"加氢利润收入成本明细":W?"本月加氢穿透明细":U?"本日加氢穿透明细":"KPI穿透订单明细")},"handleExportDrillExcel");return N.createElement("div",{className:"ehb-modal-overlay",onClick:a},N.createElement("div",{className:"ehb-modal-card",onClick:l(qe=>qe.stopPropagation(),"onClick")},N.createElement("div",{className:"ehb-modal-head"},N.createElement("div",{className:"ehb-modal-head__title-group"},N.createElement("button",{type:"button",className:"ehb-modal-back-btn",onClick:a,title:"返回看板"},N.createElement(ZS,{size:18}),N.createElement("span",null,"返回")),N.createElement("div",null,N.createElement("div",{className:"ehb-modal-head__title"},N.createElement("span",null,"「",e,"」",t,"明细")))),N.createElement("div",{className:"ehb-modal-head__actions"},N.createElement("button",{type:"button",className:"ehb-modal-close-btn",onClick:a,title:"关闭"},N.createElement(Vg,{size:18})))),N.createElement("div",{className:"ehb-modal-body"},ae?K?N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-bar"},N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"加氢站"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7",fontSize:13}},re)),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"内部客户加氢总量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},ht.toLocaleString("zh-CN")," Kg")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"外部客户加氢总量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#f59e0b"}},Je.toLocaleString("zh-CN")," Kg")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"合计加氢总量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0f172a"}},St.toLocaleString("zh-CN")," Kg"))),N.createElement("div",{className:"ehb-modal-filter-row"},N.createElement("div",{className:"ehb-modal-filter-group"},N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--outline ehb-export-btn",onClick:vt},N.createElement(P0,{size:14,"aria-hidden":!0}),"导出 Excel"),N.createElement("div",{className:"ehb-modal-hint-text"},"该站内部客户与外部客户加氢总量(可纵向滚动)"))),N.createElement("div",{className:"ehb-modal-table-wrap is-v-scroll"},N.createElement("table",{className:"ehb-modal-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"客户"),N.createElement("th",null,"类型"),N.createElement("th",{style:{textAlign:"right"}},"加氢总量 (Kg)"),N.createElement("th",{style:{textAlign:"right"}},"站内占比"))),N.createElement("tbody",null,Ge.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:4,style:{textAlign:"center",color:"#94a3b8",padding:28}},"暂无该站客户数据")):Ge.map(qe=>N.createElement("tr",{key:qe.customerId},N.createElement("td",{style:{fontWeight:600}},qe.customerName),N.createElement("td",null,N.createElement("span",{style:{fontSize:11,color:qe.category==="internal"?"#0284c7":"#b45309",background:qe.category==="internal"?"#eff6ff":"#fffbeb",padding:"1px 6px",borderRadius:4}},qe.category==="internal"?"内部客户":"外部客户")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",fontWeight:700,color:qe.category==="internal"?"#0284c7":"#f59e0b"}},qe.totalKg.toLocaleString("zh-CN")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)"}},St>0?(qe.totalKg/St*100).toFixed(1):"0.0","%"))))))):te?N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-bar"},N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"区域"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7",fontSize:13}},J)),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"加氢总量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},(dt/1e3).toFixed(2)," T")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"覆盖加氢站数"),N.createElement("span",{className:"ehb-modal-meta-val"},He.length," 站"))),N.createElement("div",{className:"ehb-modal-filter-row"},N.createElement("div",{className:"ehb-modal-filter-group"},N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--outline ehb-export-btn",onClick:vt},N.createElement(P0,{size:14,"aria-hidden":!0}),"导出 Excel"),N.createElement("div",{className:"ehb-modal-hint-text"},"该",ee,"各加氢站加氢总量与区域内占比(可纵向滚动)"))),N.createElement("div",{className:"ehb-modal-table-wrap is-v-scroll"},N.createElement("table",{className:"ehb-modal-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",{style:{width:48}},"#"),N.createElement("th",null,"加氢站"),N.createElement("th",null,"所属省份"),N.createElement("th",{style:{textAlign:"right"}},"加氢总量 (Kg)"),N.createElement("th",{style:{textAlign:"right"}},"区域内占比"))),N.createElement("tbody",null,He.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:5,style:{textAlign:"center",color:"#94a3b8",padding:28}},"该区域暂无加氢站数据")):He.map((qe,Me)=>N.createElement("tr",{key:qe.name},N.createElement("td",{style:{color:"#94a3b8"}},Me+1),N.createElement("td",{style:{fontWeight:600,color:"#0f172a"}},qe.name),N.createElement("td",{style:{color:"#64748b"}},qe.province),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",fontWeight:700,color:"#0284c7"}},qe.kg.toLocaleString("zh-CN")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",fontWeight:600}},qe.pct.toFixed(1),"%"))))))):N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-bar"},V?N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"内部客户加氢总量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},tt.toLocaleString("zh-CN")," Kg")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"外部客户加氢总量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#f59e0b"}},Re.toLocaleString("zh-CN")," Kg")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"合计加氢总量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0f172a"}},et.toLocaleString("zh-CN")," Kg"))):Y?N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"客户收入合计"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#10b981"}},"¥",Xe.toLocaleString("zh-CN"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"站均收入"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},"¥",(ue.length?Math.round(Xe/ue.length):0).toLocaleString("zh-CN")))):N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"成本支出合计"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#f59e0b"}},"¥",ot.toLocaleString("zh-CN"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"站均成本"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},"¥",(ue.length?Math.round(ot/ue.length):0).toLocaleString("zh-CN")))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"覆盖加氢站数"),N.createElement("span",{className:"ehb-modal-meta-val"},(V?_e:ue).length," 站"))),N.createElement("div",{className:"ehb-modal-filter-row"},N.createElement("div",{className:"ehb-modal-filter-group"},N.createElement(p8,{value:h,onChange:l(qe=>{d(qe),p("all"),m("all")},"onChange"),options:P,allLabel:"全部加氢站",placeholder:"搜索加氢站…",width:220}),N.createElement("div",{className:"ehb-fleet-segmented",role:"radiogroup","aria-label":"车辆归属"},N.createElement("button",{type:"button",role:"radio","aria-checked":y==="all",className:`ehb-fleet-btn ${y==="all"?"is-active":""}`,onClick:l(()=>{v("all"),m("all")},"onClick")},"全部车辆"),N.createElement("button",{type:"button",role:"radio","aria-checked":y==="own",className:`ehb-fleet-btn ${y==="own"?"is-active":""}`,onClick:l(()=>{v("own"),m("all")},"onClick")},N.createElement(ku,{size:14,"aria-hidden":!0}),"仅羚牛车辆"),N.createElement("button",{type:"button",role:"radio","aria-checked":y==="external",className:`ehb-fleet-btn ${y==="external"?"is-active":""}`,onClick:l(()=>{v("external"),m("all")},"onClick")},N.createElement(ku,{size:14,"aria-hidden":!0}),"仅外部车辆")),N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--outline ehb-export-btn",onClick:vt,title:"导出 Excel"},N.createElement(P0,{size:14,"aria-hidden":!0}),"导出 Excel"),N.createElement("div",{className:"ehb-modal-hint-text"},V?"该月各加氢站:内部客户加氢总量 · 外部客户加氢总量 · 合计":Y?"该月各加氢站客户收入":"该月各加氢站成本支出"))),N.createElement("div",{className:"ehb-modal-table-wrap"},N.createElement("table",{className:"ehb-modal-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"加氢站"),N.createElement("th",null,"所属省份"),V?N.createElement(N.Fragment,null,N.createElement("th",{style:{textAlign:"right"}},"内部客户加氢总量 (Kg)"),N.createElement("th",{style:{textAlign:"right"}},"外部客户加氢总量 (Kg)"),N.createElement("th",{style:{textAlign:"right"}},"合计加氢总量 (Kg)")):N.createElement("th",{style:{textAlign:"right"}},Y?"客户收入 (元)":"成本支出 (元)"))),N.createElement("tbody",null,V?_e.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:5,style:{textAlign:"center",color:"#94a3b8",padding:28}},"暂无符合筛选的加氢站数据")):_e.map(qe=>N.createElement("tr",{key:qe.stationId},N.createElement("td",{style:{fontWeight:600,color:"#0f172a"}},qe.stationName),N.createElement("td",{style:{color:"#64748b"}},qe.province),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#0284c7",fontWeight:600}},qe.internalKg.toLocaleString("zh-CN")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#f59e0b",fontWeight:600}},qe.externalKg.toLocaleString("zh-CN")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#0f172a",fontWeight:700}},qe.totalKg.toLocaleString("zh-CN")))):ue.length===0?N.createElement("tr",null,N.createElement("td",{colSpan:3,style:{textAlign:"center",color:"#94a3b8",padding:28}},"暂无符合筛选的加氢站数据")):ue.map(qe=>N.createElement("tr",{key:qe.stationId},N.createElement("td",{style:{fontWeight:600,color:"#0f172a"}},qe.stationName),N.createElement("td",{style:{color:"#64748b"}},qe.province),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:Y?"#10b981":"#f59e0b",fontWeight:700}},"¥",(Y?qe.incomeYuan:qe.costYuan).toLocaleString("zh-CN")))))))):N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-bar"},B?N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"收入合计"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#10b981"}},"¥",Ie(M.reduce((qe,Me)=>qe+We(Me.totalFeeWan),0)).toLocaleString("zh-CN"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"成本合计"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#f59e0b"}},"¥",M.reduce((qe,Me)=>qe+We(Me.totalFeeWan),0).toLocaleString("zh-CN"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"加氢利润"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},"¥",(Ih.profitWan*1e4).toLocaleString("zh-CN"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"覆盖加氢站数"),N.createElement("span",{className:"ehb-modal-meta-val"},M.length," 站"))):W?N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"本月加氢量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},(pe(M.reduce((qe,Me)=>qe+Me.totalKg,0))/1e3).toFixed(2)," T")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"本月加氢费"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#f59e0b"}},"¥",(Ae(me)/1e4).toFixed(2)," 万元")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"加氢费占年比"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},(De*100).toFixed(2),"%")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"覆盖加氢站数"),N.createElement("span",{className:"ehb-modal-meta-val"},M.length," 站"))):U?N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"本日加氢量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},Ve(M.reduce((qe,Me)=>qe+Me.totalKg,0)).toLocaleString("zh-CN")," Kg")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"本日加氢费"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#f59e0b"}},"¥",ze(me).toLocaleString("zh-CN"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"加氢费占月比"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},Se>0?(ze(me)/Se*100).toFixed(2):"0.00","%")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"覆盖加氢站数"),N.createElement("span",{className:"ehb-modal-meta-val"},M.length," 站"))):N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"数据归集总量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},(M.reduce((qe,Me)=>qe+Me.totalKg,0)/1e3).toFixed(2)," T")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"数据总金额"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#10b981"}},"¥",M.reduce((qe,Me)=>qe+parseFloat(Me.totalFeeWan),0).toFixed(2)," 万元")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"覆盖加氢站数"),N.createElement("span",{className:"ehb-modal-meta-val"},M.length," 站")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"数据源可追溯率"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#f59e0b"}},"100% (含API/站点上报凭证)")))),N.createElement("div",{className:"ehb-modal-filter-row"},N.createElement("div",{className:"ehb-modal-filter-group"},N.createElement(p8,{value:h,onChange:l(qe=>{d(qe),p("all"),m("all")},"onChange"),options:P,allLabel:"全部加氢站",placeholder:"搜索加氢站…",width:200}),N.createElement(p8,{value:f,onChange:l(qe=>{p(qe),m("all")},"onChange"),options:z,allLabel:"全部客户",placeholder:"搜索客户…",width:200}),N.createElement(p8,{value:g,onChange:m,options:D,allLabel:"全部车辆",placeholder:"搜索车牌…",width:160}),N.createElement("div",{className:"ehb-fleet-segmented",role:"radiogroup","aria-label":"车辆归属"},N.createElement("button",{type:"button",role:"radio","aria-checked":y==="all",className:`ehb-fleet-btn ${y==="all"?"is-active":""}`,onClick:l(()=>{v("all"),m("all")},"onClick")},"全部车辆"),N.createElement("button",{type:"button",role:"radio","aria-checked":y==="own",className:`ehb-fleet-btn ${y==="own"?"is-active":""}`,onClick:l(()=>{v("own"),m("all")},"onClick")},N.createElement(ku,{size:14,"aria-hidden":!0}),"仅羚牛车辆"),N.createElement("button",{type:"button",role:"radio","aria-checked":y==="external",className:`ehb-fleet-btn ${y==="external"?"is-active":""}`,onClick:l(()=>{v("external"),m("all")},"onClick")},N.createElement(ku,{size:14,"aria-hidden":!0}),"仅外部车辆")),N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--outline ehb-export-btn",onClick:vt,title:"导出 Excel 穿透账单"},N.createElement(P0,{size:14,"aria-hidden":!0}),"导出 Excel 穿透账单"),N.createElement("div",{className:"ehb-modal-hint-text"},"提示:点击表格行可四级层层展开 【加氢站 → 客户 → 车牌 → 单笔订单与核对明细】"))),N.createElement("div",{className:"ehb-h5-scroll-hint"},"‹ 左右滑动查看完整数据与凭证列 ›"),N.createElement("div",{className:"ehb-modal-table-wrap"},N.createElement("table",{className:"ehb-modal-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"加氢站 / 客户 / 车辆与凭证链路"),N.createElement("th",null,"类型 / 归属"),N.createElement("th",null,"数据来源及凭证号"),N.createElement("th",null,"核对状态"),N.createElement("th",{style:{textAlign:"right"}},"加氢笔数"),B?N.createElement(N.Fragment,null,N.createElement("th",{style:{textAlign:"right"}},"收入 (元)"),N.createElement("th",{style:{textAlign:"right"}},"成本 (元)"),N.createElement("th",{style:{textAlign:"right"}},"利润 (元)")):W?N.createElement(N.Fragment,null,N.createElement("th",{style:{textAlign:"right"}},"本月加氢量 (Kg)"),N.createElement("th",{style:{textAlign:"right"}},"本月加氢费 (元)"),N.createElement("th",{style:{textAlign:"right"}},"加氢费占年比")):U?N.createElement(N.Fragment,null,N.createElement("th",{style:{textAlign:"right"}},"本日加氢量 (Kg)"),N.createElement("th",{style:{textAlign:"right"}},"本日加氢费 (元)"),N.createElement("th",{style:{textAlign:"right"}},"加氢费占月比")):N.createElement(N.Fragment,null,N.createElement("th",{style:{textAlign:"right"}},"加氢总量 (Kg)"),N.createElement("th",{style:{textAlign:"right"}},"加氢金额 (元)")))),N.createElement("tbody",null,M.map(qe=>{const Me=!!b[qe.stationId],lt=qe.customers.flatMap(Ue=>Ue.vehicles),it=BTt(lt);return N.createElement(N.Fragment,{key:qe.stationId},N.createElement("tr",{style:{cursor:"pointer",background:Me?"#f0f9ff":"#f8fafc",fontWeight:700},onClick:l(()=>A(qe.stationId),"onClick")},N.createElement("td",{style:{color:"#0f172a"}},N.createElement("span",{style:{marginRight:6,color:"#0284c7",display:"inline-block",width:14}},Me?"▼":"►"),N.createElement("span",null,qe.stationName),N.createElement("span",{style:{fontSize:11,color:"#64748b",fontWeight:400,marginLeft:8}},"(",qe.customers.length," 家客户)")),N.createElement("td",{style:{color:"#94a3b8"}},"-"),N.createElement("td",{style:{color:"#64748b",fontSize:11},title:"本站数据由系统自动归集,无需单笔手工录入"},"全量自动归集"),N.createElement("td",null,WTt(it,"本站羚牛车辆")),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)"}},qe.customers.reduce((Ue,we)=>Ue+we.vehicles.reduce((gt,ge)=>gt+ge.count,0),0)," 笔"),Oe(qe.totalKg,We(qe.totalFeeWan))),Me&&qe.customers.map(Ue=>{const we=`${qe.stationId}_${Ue.customerId}`,gt=!!x[we];return N.createElement(N.Fragment,{key:we},N.createElement("tr",{style:{cursor:"pointer",background:gt?"#f1f5f9":"#ffffff",fontSize:12},onClick:l(()=>I(qe.stationId,Ue.customerId),"onClick")},N.createElement("td",{style:{paddingLeft:28,fontWeight:600,color:"#1e293b"}},N.createElement("span",{style:{marginRight:6,color:"#0284c7",display:"inline-block",width:14}},gt?"▼":"►"),N.createElement("span",null,"└─ 客户:",Ue.customerName)),N.createElement("td",{style:{color:"#94a3b8"}},"-"),N.createElement("td",{style:{color:"#64748b",fontSize:11}},Ue.vehicles.length," 辆车挂载"),N.createElement("td",null,"-"),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)"}},Ue.vehicles.reduce((ge,ie)=>ge+ie.count,0)," 笔"),Oe(Ue.totalKg,We(Ue.totalFeeWan))),gt&&Ue.vehicles.map((ge,ie)=>{const be=`${qe.stationId}_${Ue.customerId}_${ge.plateNo}`,$e=!!C[be],le=!!E[be],ke=le?ge.orders:ge.orders.slice(0,5),je=yge(ge.orders,ge.fleetCategory),ut=!ge.plateNo||/无车牌/.test(ge.plateNo),Qe=ut?"无车牌":ge.plateNo,Ze=!ut&&ge.fleetCategory==="own";return N.createElement(N.Fragment,{key:`${we}_${ie}`},N.createElement("tr",{style:{cursor:"pointer",background:$e?"#f1f5f9":"#ffffff",fontSize:11},onClick:l(()=>L(qe.stationId,Ue.customerId,ge.plateNo),"onClick")},N.createElement("td",{style:{paddingLeft:52,color:"#334155",fontWeight:600}},N.createElement("span",{style:{marginRight:6,color:"#0284c7",display:"inline-block",width:14}},$e?"▼":"►"),N.createElement("strong",{style:{fontFamily:"var(--bi-font-mono)",color:"#0f172a"}},Qe),N.createElement("span",{style:{fontSize:10,color:"#64748b",fontWeight:400,marginLeft:6}},"(",ge.count," 笔订单)")),N.createElement("td",null,bge(Ze)),N.createElement("td",null,pz(ge.source)),N.createElement("td",null,HTt(ge.fleetCategory,je)),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#475569"}},ge.count," 笔"),Oe(ge.kg,ge.amount)),$e&&N.createElement(N.Fragment,null,ke.map(st=>N.createElement("tr",{key:st.orderId,style:{background:"#f8fafc",fontSize:11}},N.createElement("td",{style:{paddingLeft:76,color:"#334155"}},N.createElement("span",{style:{color:"#cbd5e1",marginRight:6}},"└──"),N.createElement("span",{style:{color:"#64748b",fontSize:10,marginRight:6}},"订单编号"),N.createElement("span",{style:{fontFamily:"var(--bi-font-mono)",color:"#0284c7",fontWeight:600,marginRight:6},title:"加氢订单编号"},st.orderId),N.createElement("span",{style:{color:"#64748b",fontSize:10}},"(",st.time,")")),N.createElement("td",null,N.createElement("span",{style:{color:"#64748b",fontSize:10,fontFamily:"var(--bi-font-mono)"}},"单价 ¥",st.unitPrice.toFixed(2),"/Kg")),N.createElement("td",null,pz(st.source)),N.createElement("td",null,xge(ge.fleetCategory,st.verifyStatus)),N.createElement("td",{style:{textAlign:"right",fontFamily:"var(--bi-font-mono)",color:"#94a3b8"}},"1 笔"),Oe(st.kg,st.amount))),N.createElement("tr",{style:{background:"#f8fafc",fontSize:11}},N.createElement("td",{colSpan:oe,style:{paddingLeft:76,paddingTop:6,paddingBottom:8}},N.createElement("span",{style:{color:"#cbd5e1",marginRight:6}},"└──"),N.createElement("span",{className:"ehb-order-more-row"},N.createElement("button",{type:"button",className:"ehb-order-more-btn",onClick:l(st=>{st.stopPropagation(),R(be)},"onClick")},le?"收起至近 5 笔 ▲":`查看全量 ${ge.count} 笔订单流水 ▼`),N.createElement("span",{className:"ehb-order-more-hint"},le?`包含该车辆共 ${ge.count} 笔历史加氢订单,已展示全量 ${ge.orders.length} 笔穿透流水`:`包含该车辆共 ${ge.count} 笔历史加氢订单,默认展示近 ${ke.length} 笔穿透核对流水明细`))))))}))}))}))))))))}l(VTt,"KpiDrillModal");function GTt({customerName:t,year:e,onClose:r}){var n;const[a,i]=N.useState(""),[s,o]=N.useState({"2026-08-08":!0}),u=mge.find(b=>b.name===t),h=(u==null?void 0:u.bearer)==="lingniu"?"羚牛":"客户",d=u?parseFloat(u.kgT):0,f=u?parseFloat(u.costWan):0,p=(n=u==null?void 0:u.receivable)!=null?n:"—",g=l(b=>{o(w=>ko(_o({},w),{[b]:!w[b]}))},"toggleDate"),m=N.useMemo(()=>[{date:"2026-08-08",stationCount:2,records:[{plateNo:"浙A88888F",fleetCategory:"own",stationName:"嘉兴中石化滨海加氢站",time:"2026-08-08 08:15",kg:45.2,receivable:1356},{plateNo:"浙A66666F",fleetCategory:"own",stationName:"嘉兴嘉锦加氢站",time:"2026-08-08 09:30",kg:54.8,receivable:1644},{plateNo:"粤B12345D",fleetCategory:"external",stationName:"嘉兴中石化滨海加氢站",time:"2026-08-08 10:10",kg:350,receivable:10500},{plateNo:"粤B99881D",fleetCategory:"external",stationName:"嘉兴嘉锦加氢站",time:"2026-08-08 14:20",kg:280,receivable:8400}]},{date:"2026-08-07",stationCount:1,records:[{plateNo:"浙A88888F",fleetCategory:"own",stationName:"嘉兴中石化滨海加氢站",time:"2026-08-07 11:20",kg:48,receivable:1440},{plateNo:"浙A33333F",fleetCategory:"own",stationName:"嘉兴中石化滨海加氢站",time:"2026-08-07 16:45",kg:52,receivable:1560},{plateNo:"沪A66128D",fleetCategory:"external",stationName:"嘉兴中石化滨海加氢站",time:"2026-08-07 17:30",kg:120,receivable:3600}]},{date:"2026-08-06",stationCount:2,records:[{plateNo:"浙A88888F",fleetCategory:"own",stationName:"嘉兴中石化滨海加氢站",time:"2026-08-06 09:10",kg:42.5,receivable:1275},{plateNo:"川A88901",fleetCategory:"external",stationName:"成都中石化天府机场高速北站加氢站",time:"2026-08-06 13:15",kg:210,receivable:6300},{plateNo:"川A88902",fleetCategory:"external",stationName:"成都中石化天府机场高速北站加氢站",time:"2026-08-06 15:50",kg:180,receivable:5400}]},{date:"2026-08-05",stationCount:1,records:[{plateNo:"浙A66666F",fleetCategory:"own",stationName:"桐乡中石化绿能加氢站",time:"2026-08-05 10:40",kg:50,receivable:1500},{plateNo:"渝A66881",fleetCategory:"external",stationName:"桐乡中石化绿能加氢站",time:"2026-08-05 14:05",kg:310,receivable:9300}]}].map(w=>{const x=w.records.filter(E=>{if(!a)return!0;const k=a.toLowerCase();return E.plateNo&&E.plateNo.toLowerCase().includes(k)||E.stationName.toLowerCase().includes(k)}),T=x.reduce((E,k)=>E+k.kg,0),C=x.reduce((E,k)=>E+k.receivable,0),S=d>0?Math.round(T/(d*1e3)*f*1e4*100)/100:Math.round(C*.9*100)/100;return ko(_o({},w),{records:x,totalKg:Math.round(T*10)/10,totalReceivable:Math.round(C*100)/100,totalCost:S})}).filter(w=>w.records.length>0),[a,d,f]),y=N.useMemo(()=>m.reduce((b,w)=>b+w.totalKg,0),[m]);N.useMemo(()=>m.reduce((b,w)=>b+w.totalReceivable,0),[m]);const v=l(()=>{const b=[["客户名称","日期","车牌号","车辆归属","加氢站","加氢时间","加氢量(Kg)","应收(元)","已收","未收"]];m.forEach(w=>{w.records.forEach(x=>{b.push([t,w.date,x.plateNo||"无车牌(散车)",x.fleetCategory==="own"?"羚牛车辆":"外部车辆",x.stationName,x.time,x.kg,x.receivable,"敬请期待 (对接账户)","敬请期待 (对接账单)"])})}),Ah(b,`客户账单穿透流水_${t}_${e}年.xlsx`,"客户账单穿透流水")},"handleExportExcel");return N.createElement("div",{className:"ehb-modal-overlay",onClick:r},N.createElement("div",{className:"ehb-modal-card",onClick:l(b=>b.stopPropagation(),"onClick")},N.createElement("div",{className:"ehb-modal-head"},N.createElement("div",{className:"ehb-modal-head__title-group"},N.createElement("button",{type:"button",className:"ehb-modal-back-btn",onClick:r,title:"返回看板"},N.createElement(ZS,{size:18}),N.createElement("span",null,"返回")),N.createElement("div",null,N.createElement("div",{className:"ehb-modal-head__title"},N.createElement("span",null,"「",t,"」客户账单明细")))),N.createElement("div",{className:"ehb-modal-head__actions"},N.createElement("button",{type:"button",className:"ehb-modal-close-btn",onClick:r,title:"关闭"},N.createElement(Vg,{size:18})))),N.createElement("div",{className:"ehb-modal-body"},N.createElement("div",{className:"ehb-modal-meta-bar"},N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"承担方"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7",fontSize:13}},h)),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"加氢量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},d>0?d.toFixed(2):(y/1e3).toFixed(2)," ",N.createElement("span",{style:{fontSize:11,fontWeight:400}},"T"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"成本支出"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#f59e0b"}},"¥",f>0?f.toFixed(2):"—"," ",N.createElement("span",{style:{fontSize:11,fontWeight:400}},"万元"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"应收"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#10b981",fontSize:13}},p)),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"已收"),N.createElement("span",{className:"ehb-stay-tuned-tag",title:"等待客户能源账户和对账单打通后获取"},"敬请期待")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"未收"),N.createElement("span",{className:"ehb-stay-tuned-tag",title:"等待客户能源账户和对账单打通后获取"},"敬请期待"))),N.createElement("div",{className:"ehb-modal-filter-row"},N.createElement("div",{className:"ehb-modal-filter-group"},N.createElement("div",{className:"ehb-modal-search-input"},N.createElement(AA,{size:14,style:{color:"#94a3b8",flexShrink:0}}),N.createElement("input",{type:"text",placeholder:"搜索车牌号 / 加氢站...",value:a,onChange:l(b=>i(b.target.value),"onChange")}),a&&N.createElement("button",{type:"button",onClick:l(()=>i(""),"onClick"),title:"清空"},N.createElement(Vg,{size:12}))),N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--outline ehb-export-btn",onClick:v,title:"导出 Excel 客户账单"},N.createElement(P0,{size:14,"aria-hidden":!0}),"导出 Excel"),N.createElement("div",{className:"ehb-modal-hint-text"},"按日展开:加氢量 · 成本支出 · 应收 · 已收 · 未收"))),N.createElement("div",{className:"ehb-h5-scroll-hint"},"‹ 左右滑动查看完整关键字段 ›"),N.createElement("div",{className:"ehb-modal-table-wrap is-v-scroll"},N.createElement("table",{className:"ehb-modal-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",{style:{width:140}},"日期 / 车牌明细"),N.createElement("th",null,"加氢站"),N.createElement("th",{style:{textAlign:"center"}},"承担方"),N.createElement("th",{style:{textAlign:"right"}},"加氢量(Kg)"),N.createElement("th",{style:{textAlign:"right"}},"成本支出(元)"),N.createElement("th",{style:{textAlign:"right"}},"应收(元)"),N.createElement("th",{style:{textAlign:"center"}},"已收"),N.createElement("th",{style:{textAlign:"center"}},"未收"))),N.createElement("tbody",null,m.map(b=>{const w=!!s[b.date];return N.createElement(N.Fragment,{key:b.date},N.createElement("tr",{style:{background:"#f8fafc",fontWeight:600,cursor:"pointer"},onClick:l(()=>g(b.date),"onClick")},N.createElement("td",{className:"ehb-tree-cell-l1",style:{color:"#0284c7"}},N.createElement("div",{className:"ehb-tree-node-title"},N.createElement("span",{style:{marginRight:6}},w?"▼":"►"),N.createElement("span",null,"📅 ",b.date))),N.createElement("td",{style:{color:"#64748b",fontSize:12}},"涉及 ",b.stationCount," 个加氢站 · ",b.records.length," 笔"),N.createElement("td",{style:{textAlign:"center"}},N.createElement("span",{className:`ehb-bearer-tag ${(u==null?void 0:u.bearer)==="cust"?"is-cust":"is-lingniu"}`},h)),N.createElement("td",{style:{textAlign:"right",color:"#0284c7"}},b.totalKg.toLocaleString("zh-CN")," Kg"),N.createElement("td",{style:{textAlign:"right",color:"#f59e0b",fontFamily:"var(--bi-font-mono)"}},"¥",b.totalCost.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{textAlign:"right",color:"#10b981"}},"¥",b.totalReceivable.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{textAlign:"center"}},N.createElement("span",{className:"ehb-stay-tuned-tag",title:"等待客户能源账户和对账单打通后获取"},"敬请期待")),N.createElement("td",{style:{textAlign:"center"}},N.createElement("span",{className:"ehb-stay-tuned-tag",title:"等待客户能源账户和对账单打通后获取"},"敬请期待"))),w&&b.records.map((x,T)=>{const C=b.totalKg>0?Math.round(x.kg/b.totalKg*b.totalCost*100)/100:0;return N.createElement("tr",{key:`${b.date}_${x.plateNo}_${T}`,style:{background:"#ffffff"}},N.createElement("td",{className:"ehb-tree-cell-l2",style:{fontSize:12}},N.createElement("div",{className:"ehb-tree-node-title"},N.createElement("span",{style:{color:"#cbd5e1",flexShrink:0}},"└──"),N.createElement("span",{style:{fontWeight:600,color:"#1e293b"}},x.plateNo||"无车牌(散车)"),N.createElement("span",{style:{marginLeft:6,fontSize:10,color:"#94a3b8"}},x.time))),N.createElement("td",{style:{fontSize:12,color:"#475569"}},x.stationName),N.createElement("td",{style:{textAlign:"center"}},N.createElement("span",{className:`ehb-bearer-tag ${(u==null?void 0:u.bearer)==="cust"?"is-cust":"is-lingniu"}`},h)),N.createElement("td",{style:{textAlign:"right",fontSize:12,fontWeight:600,color:"#0284c7",fontFamily:"var(--bi-font-mono)"}},x.kg.toFixed(1)," Kg"),N.createElement("td",{style:{textAlign:"right",fontSize:12,fontWeight:600,color:"#f59e0b",fontFamily:"var(--bi-font-mono)"}},"¥",C.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{textAlign:"right",fontSize:12,fontWeight:600,color:"#059669",fontFamily:"var(--bi-font-mono)"}},"¥",x.receivable.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{textAlign:"center"}},N.createElement("span",{className:"ehb-stay-tuned-tag"},"敬请期待")),N.createElement("td",{style:{textAlign:"center"}},N.createElement("span",{className:"ehb-stay-tuned-tag"},"敬请期待")))}))})))))))}l(GTt,"CustomerBillDrillModal");function qTt({stationName:t,province:e,year:r,onClose:n}){var a,i;const[s,o]=N.useState(""),[u,h]=N.useState({"2026-08-08":!0}),d=tm.find(T=>T.name===t)||tm.find(T=>t.includes(T.name.slice(0,8))||T.name.includes(t.slice(0,8))),f=d?parseFloat(d.kgT):0,p=(a=d==null?void 0:d.kgPct)!=null?a:0,g=d?parseFloat(d.incomeWan):0,m=(i=d==null?void 0:d.incomePct)!=null?i:0,y=l(T=>{h(C=>ko(_o({},C),{[T]:!C[T]}))},"toggleDate"),v=f>0?Math.round(f*1e3):243660,b=g>0?Math.round(g*1e4):526600,w=N.useMemo(()=>[{date:"2026-08-08",records:[{plateNo:"浙A88888F",fleetCategory:"own",customerName:"羚牛氢能科技(广东)有限公司",time:"2026-08-08 08:15",kg:450.2,income:13506},{plateNo:"浙A66666F",fleetCategory:"own",customerName:"嘉兴市乍浦港口经营有限公司",time:"2026-08-08 09:30",kg:540.8,income:16224},{plateNo:"粤B12345D",fleetCategory:"external",customerName:"广东氢动力科技服务有限公司",time:"2026-08-08 10:10",kg:350,income:10500},{plateNo:"沪A66128D",fleetCategory:"external",customerName:"上海明纳物流有限公司",time:"2026-08-08 14:20",kg:280,income:8400}]},{date:"2026-08-07",records:[{plateNo:"浙A88888F",fleetCategory:"own",customerName:"羚牛氢能科技(广东)有限公司",time:"2026-08-07 11:20",kg:480,income:14400},{plateNo:"浙A33333F",fleetCategory:"own",customerName:"嘉兴益顺冷链物流有限公司",time:"2026-08-07 16:45",kg:520,income:15600},{plateNo:"粤B99881D",fleetCategory:"external",customerName:"嘉兴智奇供应链管理有限公司",time:"2026-08-07 17:30",kg:410,income:12300}]},{date:"2026-08-06",records:[{plateNo:"浙A88888F",fleetCategory:"own",customerName:"羚牛氢能科技(广东)有限公司",time:"2026-08-06 09:10",kg:425,income:12750},{plateNo:"川A88901",fleetCategory:"external",customerName:"四川群彬物流有限公司",time:"2026-08-06 13:15",kg:610,income:18300},{plateNo:"川A88902",fleetCategory:"external",customerName:"四川拱照物流有限公司",time:"2026-08-06 15:50",kg:580,income:17400}]},{date:"2026-08-05",records:[{plateNo:"浙A66666F",fleetCategory:"own",customerName:"嘉兴市乍浦港口经营有限公司",time:"2026-08-05 10:40",kg:500,income:15e3},{plateNo:"渝A66881",fleetCategory:"external",customerName:"重庆金时源供应链有限公司",time:"2026-08-05 14:05",kg:710,income:21300}]}].map(C=>{const S=C.records.filter(L=>{if(!s)return!0;const R=s.toLowerCase();return C.date.includes(R)||L.plateNo&&L.plateNo.toLowerCase().includes(R)||L.customerName.toLowerCase().includes(R)}),E=S.reduce((L,R)=>L+R.kg,0),k=S.reduce((L,R)=>L+R.income,0),A=Math.round(E/v*1e4)/100,I=Math.round(k/b*1e4)/100;return ko(_o({},C),{records:S,totalKg:Math.round(E*10)/10,totalKgPct:A,totalIncome:Math.round(k*100)/100,totalIncomePct:I})}).filter(C=>C.records.length>0),[s]);N.useMemo(()=>w.reduce((T,C)=>T+C.totalKg,0),[w]),N.useMemo(()=>w.reduce((T,C)=>T+C.totalIncome,0),[w]);const x=l(()=>{const T=[["加氢站名称","所属省份","日期","车牌号","车辆归属","关联客户","加氢时间","加氢量(Kg)","加氢量占比","氢费收入(元)","收入占比"]];w.forEach(C=>{C.records.forEach(S=>{const E=(S.kg/v*100).toFixed(2)+"%",k=(S.income/b*100).toFixed(2)+"%";T.push([t,e,C.date,S.plateNo||"无车牌(散车)",S.fleetCategory==="own"?"羚牛车辆":"外部车辆",S.customerName,S.time,S.kg,E,S.income,k])})}),Ah(T,`加氢站按日账单穿透_${t}_${r}年.xlsx`,"站按日账单穿透")},"handleExportExcel");return N.createElement("div",{className:"ehb-modal-overlay",onClick:n},N.createElement("div",{className:"ehb-modal-card",onClick:l(T=>T.stopPropagation(),"onClick")},N.createElement("div",{className:"ehb-modal-head"},N.createElement("div",{className:"ehb-modal-head__title-group"},N.createElement("button",{type:"button",className:"ehb-modal-back-btn",onClick:n,title:"返回看板"},N.createElement(ZS,{size:18}),N.createElement("span",null,"返回")),N.createElement("div",null,N.createElement("div",{className:"ehb-modal-head__title"},N.createElement("span",null,"「",t,"」加氢汇总明细")))),N.createElement("div",{className:"ehb-modal-head__actions"},N.createElement("button",{type:"button",className:"ehb-modal-close-btn",onClick:n,title:"关闭"},N.createElement(Vg,{size:18})))),N.createElement("div",{className:"ehb-modal-body"},N.createElement("div",{className:"ehb-modal-meta-bar"},N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"所属省份"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7",fontSize:13}},e)),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"加氢量"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},(v/1e3).toFixed(2)," ",N.createElement("span",{style:{fontSize:11,fontWeight:400}},"T"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"占比"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#0284c7"}},p.toFixed(1),"%")),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"氢费收入"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#10b981"}},"¥",(b/1e4).toFixed(2)," ",N.createElement("span",{style:{fontSize:11,fontWeight:400}},"万元"))),N.createElement("div",{className:"ehb-modal-meta-item"},N.createElement("span",{className:"ehb-modal-meta-label"},"收入占比"),N.createElement("span",{className:"ehb-modal-meta-val",style:{color:"#10b981"}},m.toFixed(1),"%"))),N.createElement("div",{className:"ehb-modal-filter-row"},N.createElement("div",{className:"ehb-modal-filter-group"},N.createElement("div",{className:"ehb-modal-search-input"},N.createElement(AA,{size:14,style:{color:"#94a3b8",flexShrink:0}}),N.createElement("input",{type:"text",placeholder:"搜索日期 / 车牌号 / 客户...",value:s,onChange:l(T=>o(T.target.value),"onChange")}),s&&N.createElement("button",{type:"button",onClick:l(()=>o(""),"onClick"),title:"清空"},N.createElement(Vg,{size:12}))),N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--outline ehb-export-btn",onClick:x,title:"导出 Excel"},N.createElement(P0,{size:14,"aria-hidden":!0}),"导出 Excel"),N.createElement("div",{className:"ehb-modal-hint-text"},"按日展开关键字段:加氢量 · 占比 · 氢费收入 · 收入占比"))),N.createElement("div",{className:"ehb-h5-scroll-hint"},"‹ 左右滑动查看完整数据与状态 ›"),N.createElement("div",{className:"ehb-modal-table-wrap is-v-scroll"},N.createElement("table",{className:"ehb-modal-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",{style:{width:140}},"日期 / 车牌明细"),N.createElement("th",null,"关联客户 / 车辆归属"),N.createElement("th",null,"加氢时间"),N.createElement("th",{style:{textAlign:"right"}},"加氢量(Kg)"),N.createElement("th",{style:{textAlign:"right",width:120}},"加氢量占比"),N.createElement("th",{style:{textAlign:"right"}},"氢费收入(元)"),N.createElement("th",{style:{textAlign:"right",width:120}},"收入占比"))),N.createElement("tbody",null,w.map(T=>{const C=!!u[T.date];return N.createElement(N.Fragment,{key:T.date},N.createElement("tr",{style:{background:"#f8fafc",fontWeight:600,cursor:"pointer"},onClick:l(()=>y(T.date),"onClick")},N.createElement("td",{className:"ehb-tree-cell-l1",style:{color:"#0284c7"}},N.createElement("div",{className:"ehb-tree-node-title"},N.createElement("span",{style:{marginRight:6}},C?"▼":"►"),N.createElement("span",null,"📅 ",T.date))),N.createElement("td",{style:{color:"#64748b",fontSize:12}},T.records.length," 笔车辆加氢发生"),N.createElement("td",{style:{color:"#94a3b8",fontSize:12}},"当天汇总"),N.createElement("td",{style:{textAlign:"right",color:"#0284c7"}},T.totalKg.toLocaleString("zh-CN")," Kg"),N.createElement("td",null,N.createElement("div",{className:"ehb-ratio-flex"},N.createElement("div",{className:"ehb-mini-bar-track"},N.createElement("div",{className:"ehb-mini-bar-fill is-blue",style:{width:`${Math.min(100,T.totalKgPct*10)}%`}})),N.createElement("span",{className:"ehb-ratio-text"},T.totalKgPct.toFixed(2),"%"))),N.createElement("td",{style:{textAlign:"right",color:"#10b981"}},"¥",T.totalIncome.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",null,N.createElement("div",{className:"ehb-ratio-flex"},N.createElement("div",{className:"ehb-mini-bar-track"},N.createElement("div",{className:"ehb-mini-bar-fill is-green",style:{width:`${Math.min(100,T.totalIncomePct*10)}%`}})),N.createElement("span",{className:"ehb-ratio-text"},T.totalIncomePct.toFixed(2),"%")))),C&&T.records.map((S,E)=>{const k=Math.round(S.kg/v*1e4)/100,A=Math.round(S.income/b*1e4)/100;return N.createElement("tr",{key:`${T.date}_${S.plateNo}_${E}`,style:{background:"#ffffff"}},N.createElement("td",{className:"ehb-tree-cell-l2",style:{fontSize:12}},N.createElement("div",{className:"ehb-tree-node-title"},N.createElement("span",{style:{color:"#cbd5e1",flexShrink:0}},"└──"),N.createElement("span",{style:{fontWeight:600,color:"#1e293b"}},S.plateNo||"无车牌(散车)"),N.createElement("span",{className:`ehb-tag ${S.fleetCategory==="own"?"is-own":"is-ext"}`,style:{marginLeft:6,fontSize:10}},S.fleetCategory==="own"?"羚牛":"外部"))),N.createElement("td",{style:{fontSize:12,color:"#475569"}},S.customerName),N.createElement("td",{style:{fontSize:12,color:"#64748b",fontFamily:"var(--bi-font-mono)"}},S.time),N.createElement("td",{style:{textAlign:"right",fontSize:12,fontWeight:600,color:"#0284c7",fontFamily:"var(--bi-font-mono)"}},S.kg.toFixed(1)," Kg"),N.createElement("td",null,N.createElement("span",{style:{fontSize:11,color:"#64748b"}},k.toFixed(2),"%")),N.createElement("td",{style:{textAlign:"right",fontSize:12,fontWeight:600,color:"#059669",fontFamily:"var(--bi-font-mono)"}},"¥",S.income.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",null,N.createElement("span",{style:{fontSize:11,color:"#64748b"}},A.toFixed(2),"%")))}))})))))))}l(qTt,"StationBillDrillModal");function wge({label:t,value:e,onChange:r}){const[n,a]=N.useState(!1),i=N.useRef(null),[s,o]=N.useState("day"),u=N.useMemo(()=>{const k=e.split("-"),A=parseInt(k[0],10)||2026,I=parseInt(k[1],10)||8,L=parseInt(k[2],10)||1;return{year:A,month:I,day:L}},[e]),[h,d]=N.useState(u.year),[f,p]=N.useState(u.month);N.useEffect(()=>{if(n){d(u.year),p(u.month);const k=e.split("-");k.length===1&&e.length===4?o("year"):k.length===2?o("month"):o("day")}},[n,e,u]),N.useEffect(()=>{function k(A){i.current&&!i.current.contains(A.target)&&a(!1)}return l(k,"handleClickOutside"),n&&document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[n]);const g=[2026,2025,2024,2023,2022,2021,2020],m=[1,2,3,4,5,6,7,8,9,10,11,12],y=l((k,A)=>{A.stopPropagation(),d(k),s==="year"?(r(`${k}`),a(!1)):o(s==="day"?"month":"day")},"handleSelectYear"),v=l((k,A)=>{A.stopPropagation(),p(k);const I=k<10?`0${k}`:`${k}`;s==="month"?(r(`${h}-${I}`),a(!1)):o("day")},"handleSelectMonth"),b=l((k,A)=>{A.stopPropagation();const I=f<10?`0${f}`:`${f}`,L=k<10?`0${k}`:`${k}`;r(`${h}-${I}-${L}`),a(!1)},"handleSelectDay"),w=l(k=>{k.stopPropagation(),s==="day"?f===1?(d(A=>A-1),p(12)):p(A=>A-1):d(A=>A-1)},"handlePrev"),x=l(k=>{k.stopPropagation(),s==="day"?f===12?(d(A=>A+1),p(1)):p(A=>A+1):d(A=>A+1)},"handleNext"),T=new Date(h,f,0).getDate(),C=new Date(h,f-1,1).getDay(),S=Array.from({length:T},(k,A)=>A+1),E=Array.from({length:C},(k,A)=>A);return N.createElement("div",{className:"ehb-daily-date-picker-wrapper",ref:i},N.createElement("div",{className:`ehb-daily-date-picker ${n?"is-active":""}`,onClick:l(()=>a(!n),"onClick")},N.createElement("span",{className:"ehb-date-label"},t),N.createElement("span",{className:"ehb-date-val"},e),N.createElement(_fe,{size:14,style:{color:"#94a3b8"}})),n&&N.createElement("div",{className:"ehb-date-popover"},N.createElement("div",{className:"ehb-dp-mode-bar"},N.createElement("button",{type:"button",className:`ehb-dp-mode-btn ${s==="day"?"is-active":""}`,onClick:l(k=>{k.stopPropagation(),o("day")},"onClick")},"按日"),N.createElement("button",{type:"button",className:`ehb-dp-mode-btn ${s==="month"?"is-active":""}`,onClick:l(k=>{k.stopPropagation(),o("month")},"onClick")},"按月"),N.createElement("button",{type:"button",className:`ehb-dp-mode-btn ${s==="year"?"is-active":""}`,onClick:l(k=>{k.stopPropagation(),o("year")},"onClick")},"按年")),N.createElement("div",{className:"ehb-dp-header"},N.createElement("button",{type:"button",className:"ehb-dp-nav-btn",onClick:w},N.createElement(ZS,{size:14})),N.createElement("div",{className:"ehb-dp-title-group"},N.createElement("button",{type:"button",className:`ehb-dp-title-btn ${s==="year"?"is-active":""}`,onClick:l(k=>{k.stopPropagation(),o("year")},"onClick")},h," 年"),s==="day"&&N.createElement("button",{type:"button",className:`ehb-dp-title-btn ${s==="month"?"is-active":""}`,onClick:l(k=>{k.stopPropagation(),o("month")},"onClick")},f," 月")),N.createElement("button",{type:"button",className:"ehb-dp-nav-btn",onClick:x},N.createElement(kfe,{size:14}))),s==="day"&&N.createElement(N.Fragment,null,N.createElement("div",{className:"ehb-dp-week-row"},N.createElement("span",null,"日"),N.createElement("span",null,"一"),N.createElement("span",null,"二"),N.createElement("span",null,"三"),N.createElement("span",null,"四"),N.createElement("span",null,"五"),N.createElement("span",null,"六")),N.createElement("div",{className:"ehb-dp-grid"},E.map(k=>N.createElement("span",{key:`empty-${k}`,className:"ehb-dp-day is-empty"})),S.map(k=>{const A=f<10?`0${f}`:`${f}`,I=k<10?`0${k}`:`${k}`,L=e===`${h}-${A}-${I}`;return N.createElement("button",{key:k,type:"button",className:`ehb-dp-day ${L?"is-selected":""}`,onClick:l(R=>b(k,R),"onClick")},k)}))),s==="month"&&N.createElement("div",{className:"ehb-dp-month-grid"},m.map(k=>{const A=k<10?`0${k}`:`${k}`,I=e===`${h}-${A}`||e.split("-").length===3&&u.year===h&&u.month===k;return N.createElement("button",{key:k,type:"button",className:`ehb-dp-month-item ${I?"is-selected":""}`,onClick:l(L=>v(k,L),"onClick")},k," 月")})),s==="year"&&N.createElement("div",{className:"ehb-dp-year-grid"},g.map(k=>{const A=e===`${k}`||u.year===k;return N.createElement("button",{key:k,type:"button",className:`ehb-dp-year-item ${A?"is-selected":""}`,onClick:l(I=>y(k,I),"onClick")},k," 年")}))))}l(wge,"BiCustomDatePicker");function YTt({updatedAt:t,onRefresh:e,startDate:r,endDate:n,onStartDateChange:a,onEndDateChange:i}){const[s,o]=N.useState("15days"),[u,h]=N.useState("all"),d=N.useMemo(()=>s==="week"?"本周加氢量":s==="month"?"本月加氢量":s==="15days"?"近 15 天加氢量":"自定义区间加氢量",[s]),f=l(z=>{o(z),z==="week"?(a("2026-08-03"),i("2026-08-08")):z==="month"?(a("2026-08-01"),i("2026-08-08")):z==="15days"&&(a("2026-07-25"),i("2026-08-08"))},"handlePresetChange"),p=l((z,D)=>{if(!z)return D?"9999-12-31":"0000-01-01";const B=z.split("-");if(B.length===1)return D?`${B[0]}-12-31`:`${B[0]}-01-01`;if(B.length===2){const W=parseInt(B[0],10),U=parseInt(B[1],10);if(D){const j=new Date(W,U,0).getDate(),V=j<10?`0${j}`:`${j}`;return`${B[0]}-${B[1]}-${V}`}return`${B[0]}-${B[1]}-01`}return z},"normalizeDateStr"),g=N.useMemo(()=>p(r,!1),[r]),m=N.useMemo(()=>p(n,!0),[n]),y=N.useMemo(()=>eTt(g,m),[g,m]),v=N.useMemo(()=>tTt(y,u),[y,u]),b=N.useMemo(()=>rTt(v,u),[v,u]),[w,x]=N.useState("2026-08-08"),[T,C]=N.useState({"2026-08-08_st-jx":!0}),[S,E]=N.useState({"2026-08-08_st-jx_c-ln":!0}),[k,A]=N.useState(null);N.useEffect(()=>{v.length>0&&(!w||!v.some(z=>z.date===w))&&x(v[0].date)},[v,w]);const I=N.useMemo(()=>v.length?Math.max(...v.map(z=>z.quantityKg),3e3):4e3,[v]),L=N.useMemo(()=>v.reduce((D,B)=>D+B.quantityKg,0).toLocaleString("zh-CN",{minimumFractionDigits:2,maximumFractionDigits:2}),[v]),R=l(z=>{x(z),A(z),setTimeout(()=>{const D=document.getElementById(`daily-row-${z}`);D&&D.scrollIntoView({behavior:"smooth",block:"center"})},60),setTimeout(()=>{A(D=>D===z?null:D)},2e3)},"handleBarClick"),O=l((z,D,B)=>{B.stopPropagation();const W=`${z}_${D}`;C(U=>ko(_o({},U),{[W]:!U[W]}))},"toggleStation"),M=l((z,D,B,W)=>{W.stopPropagation();const U=`${z}_${D}_${B}`;E(j=>ko(_o({},j),{[U]:!j[U]}))},"toggleCustomer"),P=l(()=>{const z=[["日期","加氢站名称","加氢站类型","客户名称","客户属性","加氢时间","车牌号","车辆归属","数据来源","核对状态","单价(元/Kg)","加氢量(Kg)","加氢金额(元)","预充值余额"]];v.forEach(W=>{W.stations.forEach(U=>{var j,V;const Y=(j=U.prechargeBalance)!=null?j:U.stationId.includes("jx")?128500:U.stationId.includes("tx")?86200:45e3;(V=U.customers)==null||V.forEach(H=>{var q;const Z=H.customerCategory==="internal"||H.customerId==="c-ln";(q=H.vehicles)==null||q.forEach(K=>{z.push([W.date,U.stationName,Jwt[U.stationType]||U.stationType,H.customerName,Z?"内部客户":"外部客户",K.time,K.plateNo||"无车牌(散车)",K.fleetCategory==="own"?"羚牛车辆":"外部车辆",uw[K.source]||K.source,K.fleetCategory==="own"?b4[K.verifyStatus||"unverified"]||"未核对":"-",K.unitPrice,K.quantityKg,K.amountYuan,`¥${Y.toLocaleString("zh-CN",{minimumFractionDigits:2})} (对接站点管理)`])})})})});const D=`${r.replace(/[/]/g,"")}-${n.replace(/[/]/g,"")}`;Ah(z,`每日加氢数据明细_${u==="all"?"全部车辆":u==="own"?"羚牛车辆":"外部车辆"}_${D}.xlsx`,"每日加氢明细")},"handleExportExcel");return N.createElement("div",{className:"ehb-daily-container"},N.createElement("section",{className:"ehb-daily-filter-card"},N.createElement("div",{className:"ehb-daily-filter-row"},N.createElement("div",{className:"ehb-daily-filter-group"},N.createElement("div",{className:"ehb-pill-tabs"},N.createElement("button",{type:"button",className:`ehb-pill-btn ${s==="week"?"is-active":""}`,onClick:l(()=>f("week"),"onClick")},"本周"),N.createElement("button",{type:"button",className:`ehb-pill-btn ${s==="month"?"is-active":""}`,onClick:l(()=>f("month"),"onClick")},"本月"),N.createElement("button",{type:"button",className:`ehb-pill-btn ${s==="15days"?"is-active":""}`,onClick:l(()=>f("15days"),"onClick")},"近 15 天"),N.createElement("button",{type:"button",className:`ehb-pill-btn ${s==="custom"?"is-active":""}`,onClick:l(()=>f("custom"),"onClick")},"自定义")),N.createElement(wge,{label:"开始日期",value:r,onChange:l(z=>{a(z),o("custom")},"onChange")}),N.createElement(wge,{label:"结束日期",value:n,onChange:l(z=>{i(z),o("custom")},"onChange")})),N.createElement("div",{className:"ehb-daily-filter-group"},N.createElement("div",{className:"ehb-fleet-segmented"},N.createElement("button",{type:"button",className:`ehb-fleet-btn ${u==="all"?"is-active":""}`,onClick:l(()=>h("all"),"onClick")},N.createElement(ku,{size:14}),"全部车辆"),N.createElement("button",{type:"button",className:`ehb-fleet-btn ${u==="own"?"is-active":""}`,onClick:l(()=>h("own"),"onClick")},N.createElement(ku,{size:14}),"仅羚牛车辆"),N.createElement("button",{type:"button",className:`ehb-fleet-btn ${u==="external"?"is-active":""}`,onClick:l(()=>h("external"),"onClick")},N.createElement(ku,{size:14}),"仅外部车辆")),t&&N.createElement("span",{className:"ehb-chrome__clock",style:{fontSize:12,color:"#64748b"}},t),N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--ghost",onClick:e,title:"数据刷新"},N.createElement(xB,{size:14,"aria-hidden":!0}),"刷新")))),N.createElement("section",{className:"ehb-daily-kpi-grid"},N.createElement("div",{className:"ehb-daily-kpi-card"},N.createElement("div",{className:"ehb-daily-kpi-head"},N.createElement("span",{className:"ehb-daily-kpi-title"},d),N.createElement("span",{className:"ehb-kpi-dual__badge is-blue"},N.createElement(kA,{size:14}))),N.createElement("div",{className:"ehb-daily-kpi-val"},N.createElement("span",{className:"ehb-kpi-dual__num"},b.totalQuantityKg.toLocaleString("zh-CN")),N.createElement("span",{className:"ehb-kpi-dual__unit"},"Kg")),N.createElement("div",{className:"ehb-daily-kpi-sub"},b.dateRange)),N.createElement("div",{className:"ehb-daily-kpi-card"},N.createElement("div",{className:"ehb-daily-kpi-head"},N.createElement("span",{className:"ehb-daily-kpi-title"},"车辆结构"),N.createElement("span",{className:"ehb-kpi-dual__badge is-green"},N.createElement(ku,{size:14}))),N.createElement("div",{className:"ehb-daily-kpi-val"},N.createElement("span",{className:"ehb-kpi-dual__num",style:{fontSize:u==="all"?18:24}},b.fleetTypeLabel)),N.createElement("div",{className:"ehb-daily-kpi-sub"},b.fleetSubLabel)),N.createElement("div",{className:"ehb-daily-kpi-card"},N.createElement("div",{className:"ehb-daily-kpi-head"},N.createElement("span",{className:"ehb-daily-kpi-title"},"有效天数"),N.createElement("span",{className:"ehb-kpi-dual__badge is-amber"},N.createElement(Ugt,{size:14}))),N.createElement("div",{className:"ehb-daily-kpi-val"},N.createElement("span",{className:"ehb-kpi-dual__num"},b.activeDays)),N.createElement("div",{className:"ehb-daily-kpi-sub"},"日均 ",b.dailyAvgKg)),N.createElement("div",{className:"ehb-daily-kpi-card"},N.createElement("div",{className:"ehb-daily-kpi-head"},N.createElement("span",{className:"ehb-daily-kpi-title"},"涉及加氢站"),N.createElement("span",{className:"ehb-kpi-dual__badge is-purple"},N.createElement(wB,{size:14}))),N.createElement("div",{className:"ehb-daily-kpi-val"},N.createElement("span",{className:"ehb-kpi-dual__num"},b.stationCount),N.createElement("span",{className:"ehb-kpi-dual__unit"},"站")),N.createElement("div",{className:"ehb-daily-kpi-sub"},"按明细站点去重"))),N.createElement("section",{className:"ehb-daily-chart-section"},N.createElement("div",{className:"ehb-daily-chart-head"},N.createElement("div",{className:"ehb-daily-chart-title"},N.createElement("span",null,"每日加氢量"),N.createElement("span",{className:"ehb-title-sub ehb-hide-h5"},"(点击柱体下锚定位到对应日期明细)"),N.createElement("span",{className:"ehb-title-sub ehb-show-h5"},"(点击柱体定位)")),N.createElement("div",{className:"ehb-daily-chart-meta-group"},N.createElement("div",{className:"ehb-daily-chart-legend"},N.createElement("span",{className:"ehb-legend-item"},N.createElement("span",{className:"ehb-legend-dot is-own"}),"内部客户"),N.createElement("span",{className:"ehb-legend-item"},N.createElement("span",{className:"ehb-legend-dot is-ext"}),"外部客户")),N.createElement("span",{className:"ehb-daily-chart-meta"},"时间单位:日 · 单位 Kg"))),N.createElement("div",{className:"ehb-daily-summary-pills"},N.createElement("div",{className:"ehb-daily-pill-item"},N.createElement("span",null,"峰值日"),N.createElement("strong",null,b.peakDayLabel)),N.createElement("div",{className:"ehb-daily-pill-item"},N.createElement("span",null,"低谷日"),N.createElement("strong",null,b.troughDayLabel)),N.createElement("div",{className:"ehb-daily-pill-item"},N.createElement("span",null,"零数日"),N.createElement("strong",null,b.zeroDaysCount," 天"))),N.createElement("div",{className:"ehb-h5-scroll-hint"},"‹ 左右滑动查看每日加氢趋势 ›"),N.createElement("div",{className:"ehb-daily-bar-container"},N.createElement("div",{className:"ehb-daily-avg-line",style:{bottom:`${I>0?Math.min(92,Math.round(b.dailyAvgKgNum/I*100)):50}%`}},N.createElement("span",{className:"ehb-daily-avg-label"},"均值 ",b.dailyAvgKg)),[...v].reverse().map(z=>{let D=0,B=0;z.stations.forEach(q=>{q.customers.forEach(Z=>{Z.vehicles.forEach(K=>{K.fleetCategory==="own"?D+=K.quantityKg:B+=K.quantityKg})})}),D=Math.round(D*10)/10,B=Math.round(B*10)/10;const W=z.quantityKg>0?z.quantityKg:1,U=Math.min(100,Math.round(z.quantityKg/I*100)),j=Math.round(D/W*100),V=Math.max(0,100-j),Y=w===z.date,H=`${z.date} 加氢总量 ${Math.round(z.quantityKg).toLocaleString("zh-CN")} Kg
|
||
├─ 内部客户: ${Math.round(D).toLocaleString("zh-CN")} Kg (${j}%)
|
||
└─ 外部客户: ${Math.round(B).toLocaleString("zh-CN")} Kg (${V}%)
|
||
(点击下锚定位到该日明细)`;return N.createElement("div",{key:z.date,className:"ehb-daily-bar-col",title:H,onClick:l(()=>R(z.date),"onClick")},N.createElement("div",{className:"ehb-daily-bar-val",style:{color:Y?"#0284c7":void 0,fontWeight:Y?700:void 0}},Math.round(z.quantityKg)),N.createElement("div",{className:`ehb-daily-bar-fill is-stacked ${Y?"is-active":""}`,style:{height:`${U}%`}},B>0&&N.createElement("div",{className:"ehb-bar-segment is-ext",style:{height:`${V}%`},title:`外部客户: ${Math.round(B)} Kg (${V}%)`}),D>0&&N.createElement("div",{className:"ehb-bar-segment is-own",style:{height:`${j}%`},title:`内部客户: ${Math.round(D)} Kg (${j}%)`})),N.createElement("div",{className:"ehb-daily-bar-label",style:{color:Y?"#0284c7":void 0,fontWeight:Y?700:void 0}},z.shortDate))}))),N.createElement("section",{className:"ehb-daily-table-card"},N.createElement("div",{className:"ehb-daily-table-head"},N.createElement("div",{className:"ehb-daily-table-title"},N.createElement("span",null,"每日加氢数据明细"),N.createElement("span",{className:"ehb-title-sub ehb-hide-h5"},"(可多层下钻:按日 → 加氢站 → 客户 → 车辆及数据源)"),N.createElement("span",{className:"ehb-title-sub ehb-show-h5"},"(可逐级下钻)")),N.createElement("button",{type:"button",className:"ehb-btn ehb-btn--outline ehb-export-btn",onClick:P,title:"导出 Excel 表格"},N.createElement(P0,{size:14,"aria-hidden":!0}),"导出 Excel")),N.createElement("div",{className:"ehb-table-wrap"},N.createElement("table",{className:"ehb-table"},N.createElement("thead",null,N.createElement("tr",null,N.createElement("th",null,"日期 / 加氢站 / 客户 / 车辆明细"),N.createElement("th",null,"单价 (元/Kg)"),N.createElement("th",null,"加氢量 (Kg)"),N.createElement("th",null,"金额 (元) / 环比"),N.createElement("th",{title:"对接站点管理预充值余额"},"预充值余额"))),N.createElement("tbody",null,N.createElement("tr",{style:{background:"#f8fafc",fontWeight:700}},N.createElement("td",null,N.createElement("strong",{style:{color:"#0f172a"}},"合计")),N.createElement("td",null),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)"}},L),N.createElement("td",null),N.createElement("td",{style:{fontSize:11,color:"#64748b",fontWeight:400},title:"对接站点管理预充值余额"},"对接站点管理")),v.map(z=>{const D=w===z.date,B=k===z.date;return N.createElement(N.Fragment,{key:z.date},N.createElement("tr",{id:`daily-row-${z.date}`,className:`${B?"is-highlight-target":""}`,style:{cursor:"pointer",background:D?"#f0f9ff":void 0},onClick:l(()=>x(D?null:z.date),"onClick")},N.createElement("td",{style:{fontWeight:600}},N.createElement("span",{style:{marginRight:6,display:"inline-block",width:14,color:"#0284c7"}},z.stations.length>0?D?"▼":"►":"•"),N.createElement("span",null,z.date),N.createElement("span",{style:{fontSize:11,color:"#64748b",fontWeight:400,marginLeft:8}},"(",z.stations.length," 个加氢站)")),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)"}},z.unitPrice.toFixed(2)),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",fontWeight:700,color:"#0f172a"}},z.quantityKg.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)"}},z.momPct!==null?N.createElement("span",{style:{color:z.momPct<0?"#ef4444":"#10b981",fontWeight:600}},z.momPct>0?`+${z.momPct.toFixed(1)}%`:`${z.momPct.toFixed(1)}%`):"-"),N.createElement("td",{style:{color:"#64748b"}},"-")),D&&z.stations.map(W=>{var U,j,V;const Y=`${z.date}_${W.stationId}`,H=!!T[Y],q=(U=W.prechargeBalance)!=null?U:W.stationId.includes("jx")?128500:W.stationId.includes("tx")?86200:45e3;return N.createElement(N.Fragment,{key:Y},N.createElement("tr",{style:{background:H?"#f1f5f9":"#f8fafc",cursor:"pointer",fontSize:13},onClick:l(Z=>O(z.date,W.stationId,Z),"onClick")},N.createElement("td",{style:{paddingLeft:24,fontWeight:600}},N.createElement("span",{style:{marginRight:6,color:"#0284c7",display:"inline-block",width:14}},(j=W.customers)!=null&&j.length?H?"▼":"►":"•"),N.createElement("span",null,"└ ",W.stationName)),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",color:"#475569"}},W.unitPrice.toFixed(2)),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",fontWeight:600,color:"#334155"}},W.quantityKg.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",color:"#475569"}},"¥",W.amountYuan.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",fontWeight:600,color:"#0284c7"},title:"对接站点管理预充值余额"},"¥",q.toLocaleString("zh-CN",{minimumFractionDigits:2}))),H&&((V=W.customers)==null?void 0:V.map(Z=>{var K,re;const Q=`${z.date}_${W.stationId}_${Z.customerId}`,te=!!S[Q],ee=Z.customerCategory==="internal"||Z.customerId==="c-ln";return N.createElement(N.Fragment,{key:Q},N.createElement("tr",{style:{background:te?"#e2e8f0":"#f1f5f9",cursor:"pointer",fontSize:12},onClick:l(J=>M(z.date,W.stationId,Z.customerId,J),"onClick")},N.createElement("td",{style:{paddingLeft:44,color:"#1e293b"}},N.createElement("div",{style:{display:"inline-flex",alignItems:"center",gap:8,flexWrap:"wrap"}},N.createElement("span",null,N.createElement("span",{style:{marginRight:6,color:"#0284c7",display:"inline-block",width:14}},(K=Z.vehicles)!=null&&K.length?te?"▼":"►":"•"),N.createElement("strong",{style:{fontWeight:600}},"└─ 客户:",Z.customerName)),ee?N.createElement("span",{className:"ehb-split-tag is-own",title:"内部客户加氢数据"},N.createElement("span",{className:"ehb-split-tag__label"},"内部客户"),N.createElement("span",{className:"ehb-split-tag__val"},Z.quantityKg.toLocaleString("zh-CN",{minimumFractionDigits:2})," Kg"),N.createElement("span",{className:"ehb-split-tag__price"},"¥",Z.amountYuan.toLocaleString("zh-CN",{minimumFractionDigits:2}))):N.createElement("span",{className:"ehb-split-tag is-ext",title:"外部客户加氢数据"},N.createElement("span",{className:"ehb-split-tag__label"},"外部客户"),N.createElement("span",{className:"ehb-split-tag__val"},Z.quantityKg.toLocaleString("zh-CN",{minimumFractionDigits:2})," Kg"),N.createElement("span",{className:"ehb-split-tag__price"},"¥",Z.amountYuan.toLocaleString("zh-CN",{minimumFractionDigits:2}))))),N.createElement("td",{style:{color:"#64748b"}},"-"),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",color:"#1e293b",fontWeight:600}},Z.quantityKg.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",color:"#1e293b"}},"¥",Z.amountYuan.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{color:"#64748b"}},"-")),te&&((re=Z.vehicles)==null?void 0:re.map(J=>N.createElement("tr",{key:J.id,style:{background:"#ffffff",fontSize:12}},N.createElement("td",{style:{paddingLeft:64}},N.createElement("span",{style:{color:"#94a3b8",marginRight:8}},"└──"),N.createElement("span",{style:{fontFamily:"var(--bi-font-mono)",color:"#64748b",marginRight:10}},J.time),J.plateNo?N.createElement("span",{style:{fontFamily:"var(--bi-font-mono)",fontWeight:700,marginRight:8}},J.plateNo):N.createElement("span",{style:{fontStyle:"italic",color:"#94a3b8",marginRight:8}},"无车牌(散车)"),N.createElement("span",{style:{marginRight:6}},bge(J.fleetCategory==="own")),N.createElement("span",{style:{marginRight:6}},pz(J.source)),J.fleetCategory==="own"&&J.verifyStatus&&N.createElement("span",null,xge(J.fleetCategory,J.verifyStatus))),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",color:"#64748b"}},J.unitPrice.toFixed(2)),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",color:"#334155"}},J.quantityKg.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{fontFamily:"var(--bi-font-mono)",color:"#334155"}},"¥",J.amountYuan.toLocaleString("zh-CN",{minimumFractionDigits:2})),N.createElement("td",{style:{color:"#64748b"}},"-")))))})))}))}))))))}l(YTt,"HostDailyView");var UTt={directory:{title:"能源氢费经营看板",nodes:[{id:"overview",title:"产品需求说明(PRD)",type:"markdown",path:".spec/requirements-prd.md",description:"口令 lingniu · 顶栏全局/单站 · 无关联入口卡 · 默认全部车辆·KPI/图表/钻取跟随筛选 · 无车牌归外部车辆 · 外部主数据见 energy-h2-external-* · 分流 own→氢费明细 external→仅 BI"},{id:"board-app",title:"氢能经营看板",type:"route",path:"/prototypes/energy-h2-bi-board",description:"顶栏全局/单站;单站=日报起止查询·行内加氢量占比·按量降序"},{id:"energy-board-plan",title:"能源 BI 看板方案",type:"markdown",path:"../../resources/prd/energy-board-plan-20260806.md"},{id:"host-ref",title:"宿主 overview 视觉参考",type:"markdown",path:"../../resources/prd/energy-bi-host-ref/content.md"}]}};function jTt(){const[t,e]=N.useState(()=>$gt());return t?N.createElement(FTt,null):N.createElement(Pgt,{onOk:l(()=>e(!0),"onOk")})}l(jTt,"AuthedEnergyBiBoard");function Tge(){N.useEffect(()=>{kgt()},[]);const t=N.useMemo(()=>({title:"能源氢费经营看板"}),[]);return N.createElement(_gt,{source:UTt,options:t},N.createElement(jTt,null))}if(l(Tge,"EnergyH2BiBoardEntry"),typeof document!="undefined"){const t=document.getElementById("root");t&&!t.dataset.energyH2BiBoardMounted&&(t.dataset.energyH2BiBoardMounted="1",yg(t).render(N.createElement(Tge,null)))}var Ege=Object.defineProperty,_=l((t,e)=>Ege(t,"name",{value:e,configurable:!0}),"__name$1"),g8=l((t,e)=>{for(var r in e)Ege(t,r,{get:e[r],enumerable:!0})},"__export$1"),Cge={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Nl,function(){var r=1e3,n=6e4,a=36e5,i="millisecond",s="second",o="minute",u="hour",h="day",d="week",f="month",p="quarter",g="year",m="date",y="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:l(function(M){var P=["th","st","nd","rd"],z=M%100;return"["+M+(P[(z-20)%10]||P[z]||P[0])+"]"},"ordinal")},x=l(function(M,P,z){var D=String(M);return!D||D.length>=P?M:""+Array(P+1-D.length).join(z)+M},"m"),T={s:x,z:l(function(M){var P=-M.utcOffset(),z=Math.abs(P),D=Math.floor(z/60),B=z%60;return(P<=0?"+":"-")+x(D,2,"0")+":"+x(B,2,"0")},"z"),m:l(function M(P,z){if(P.date()<z.date())return-M(z,P);var D=12*(z.year()-P.year())+(z.month()-P.month()),B=P.clone().add(D,f),W=z-B<0,U=P.clone().add(D+(W?-1:1),f);return+(-(D+(z-B)/(W?B-U:U-B))||0)},"t"),a:l(function(M){return M<0?Math.ceil(M)||0:Math.floor(M)},"a"),p:l(function(M){return{M:f,y:g,w:d,d:h,D:m,h:u,m:o,s,ms:i,Q:p}[M]||String(M||"").toLowerCase().replace(/s$/,"")},"p"),u:l(function(M){return M===void 0},"u")},C="en",S={};S[C]=w;var E="$isDayjsObject",k=l(function(M){return M instanceof R||!(!M||!M[E])},"S"),A=l(function M(P,z,D){var B;if(!P)return C;if(typeof P=="string"){var W=P.toLowerCase();S[W]&&(B=W),z&&(S[W]=z,B=W);var U=P.split("-");if(!B&&U.length>1)return M(U[0])}else{var j=P.name;S[j]=P,B=j}return!D&&B&&(C=B),B||!D&&C},"t"),I=l(function(M,P){if(k(M))return M.clone();var z=typeof P=="object"?P:{};return z.date=M,z.args=arguments,new R(z)},"O"),L=T;L.l=A,L.i=k,L.w=function(M,P){return I(M,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var R=function(){function M(z){this.$L=A(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[E]=!0}l(M,"M");var P=M.prototype;return P.parse=function(z){this.$d=function(D){var B=D.date,W=D.utc;if(B===null)return new Date(NaN);if(L.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var U=B.match(v);if(U){var j=U[2]-1||0,V=(U[7]||"0").substring(0,3);return W?new Date(Date.UTC(U[1],j,U[3]||1,U[4]||0,U[5]||0,U[6]||0,V)):new Date(U[1],j,U[3]||1,U[4]||0,U[5]||0,U[6]||0,V)}}return new Date(B)}(z),this.init()},P.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},P.$utils=function(){return L},P.isValid=function(){return this.$d.toString()!==y},P.isSame=function(z,D){var B=I(z);return this.startOf(D)<=B&&B<=this.endOf(D)},P.isAfter=function(z,D){return I(z)<this.startOf(D)},P.isBefore=function(z,D){return this.endOf(D)<I(z)},P.$g=function(z,D,B){return L.u(z)?this[D]:this.set(B,z)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(z,D){var B=this,W=!!L.u(D)||D,U=L.p(z),j=l(function(Q,te){var ee=L.w(B.$u?Date.UTC(B.$y,te,Q):new Date(B.$y,te,Q),B);return W?ee:ee.endOf(h)},"l"),V=l(function(Q,te){return L.w(B.toDate()[Q].apply(B.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(te)),B)},"$"),Y=this.$W,H=this.$M,q=this.$D,Z="set"+(this.$u?"UTC":"");switch(U){case g:return W?j(1,0):j(31,11);case f:return W?j(1,H):j(0,H+1);case d:var K=this.$locale().weekStart||0,re=(Y<K?Y+7:Y)-K;return j(W?q-re:q+(6-re),H);case h:case m:return V(Z+"Hours",0);case u:return V(Z+"Minutes",1);case o:return V(Z+"Seconds",2);case s:return V(Z+"Milliseconds",3);default:return this.clone()}},P.endOf=function(z){return this.startOf(z,!1)},P.$set=function(z,D){var B,W=L.p(z),U="set"+(this.$u?"UTC":""),j=(B={},B[h]=U+"Date",B[m]=U+"Date",B[f]=U+"Month",B[g]=U+"FullYear",B[u]=U+"Hours",B[o]=U+"Minutes",B[s]=U+"Seconds",B[i]=U+"Milliseconds",B)[W],V=W===h?this.$D+(D-this.$W):D;if(W===f||W===g){var Y=this.clone().set(m,1);Y.$d[j](V),Y.init(),this.$d=Y.set(m,Math.min(this.$D,Y.daysInMonth())).$d}else j&&this.$d[j](V);return this.init(),this},P.set=function(z,D){return this.clone().$set(z,D)},P.get=function(z){return this[L.p(z)]()},P.add=function(z,D){var B,W=this;z=Number(z);var U=L.p(D),j=l(function(H){var q=I(W);return L.w(q.date(q.date()+Math.round(H*z)),W)},"y");if(U===f)return this.set(f,this.$M+z);if(U===g)return this.set(g,this.$y+z);if(U===h)return j(1);if(U===d)return j(7);var V=(B={},B[o]=n,B[u]=a,B[s]=r,B)[U]||1,Y=this.$d.getTime()+z*V;return L.w(Y,this)},P.subtract=function(z,D){return this.add(-1*z,D)},P.format=function(z){var D=this,B=this.$locale();if(!this.isValid())return B.invalidDate||y;var W=z||"YYYY-MM-DDTHH:mm:ssZ",U=L.z(this),j=this.$H,V=this.$m,Y=this.$M,H=B.weekdays,q=B.months,Z=B.meridiem,K=l(function(te,ee,J,ae){return te&&(te[ee]||te(D,W))||J[ee].slice(0,ae)},"h"),re=l(function(te){return L.s(j%12||12,te,"0")},"d"),Q=Z||function(te,ee,J){var ae=te<12?"AM":"PM";return J?ae.toLowerCase():ae};return W.replace(b,function(te,ee){return ee||function(J){switch(J){case"YY":return String(D.$y).slice(-2);case"YYYY":return L.s(D.$y,4,"0");case"M":return Y+1;case"MM":return L.s(Y+1,2,"0");case"MMM":return K(B.monthsShort,Y,q,3);case"MMMM":return K(q,Y);case"D":return D.$D;case"DD":return L.s(D.$D,2,"0");case"d":return String(D.$W);case"dd":return K(B.weekdaysMin,D.$W,H,2);case"ddd":return K(B.weekdaysShort,D.$W,H,3);case"dddd":return H[D.$W];case"H":return String(j);case"HH":return L.s(j,2,"0");case"h":return re(1);case"hh":return re(2);case"a":return Q(j,V,!0);case"A":return Q(j,V,!1);case"m":return String(V);case"mm":return L.s(V,2,"0");case"s":return String(D.$s);case"ss":return L.s(D.$s,2,"0");case"SSS":return L.s(D.$ms,3,"0");case"Z":return U}return null}(te)||U.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(z,D,B){var W,U=this,j=L.p(D),V=I(z),Y=(V.utcOffset()-this.utcOffset())*n,H=this-V,q=l(function(){return L.m(U,V)},"D");switch(j){case g:W=q()/12;break;case f:W=q();break;case p:W=q()/3;break;case d:W=(H-Y)/6048e5;break;case h:W=(H-Y)/864e5;break;case u:W=H/a;break;case o:W=H/n;break;case s:W=H/r;break;default:W=H}return B?W:L.a(W)},P.daysInMonth=function(){return this.endOf(f).$D},P.$locale=function(){return S[this.$L]},P.locale=function(z,D){if(!z)return this.$L;var B=this.clone(),W=A(z,D,!0);return W&&(B.$L=W),B},P.clone=function(){return L.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},M}(),O=R.prototype;return I.prototype=O,[["$ms",i],["$s",s],["$m",o],["$H",u],["$W",h],["$M",f],["$y",g],["$D",m]].forEach(function(M){O[M[1]]=function(P){return this.$g(P,M[0],M[1])}}),I.extend=function(M,P){return M.$i||(M(P,R,I),M.$i=!0),I},I.locale=A,I.isDayjs=k,I.unix=function(M){return I(1e3*M)},I.en=S[C],I.Ls=S,I.p={},I})})(Cge);var KTt=Cge.exports,As=Pd(KTt),Xd={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},Le={trace:_((...t)=>{},"trace"),debug:_((...t)=>{},"debug"),info:_((...t)=>{},"info"),warn:_((...t)=>{},"warn"),error:_((...t)=>{},"error"),fatal:_((...t)=>{},"fatal")},gz=_(function(t="fatal"){let e=Xd.fatal;typeof t=="string"?t.toLowerCase()in Xd&&(e=Xd[t]):typeof t=="number"&&(e=t),Le.trace=()=>{},Le.debug=()=>{},Le.info=()=>{},Le.warn=()=>{},Le.error=()=>{},Le.fatal=()=>{},e<=Xd.fatal&&(Le.fatal=console.error?console.error.bind(console,jc("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",jc("FATAL"))),e<=Xd.error&&(Le.error=console.error?console.error.bind(console,jc("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",jc("ERROR"))),e<=Xd.warn&&(Le.warn=console.warn?console.warn.bind(console,jc("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",jc("WARN"))),e<=Xd.info&&(Le.info=console.info?console.info.bind(console,jc("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",jc("INFO"))),e<=Xd.debug&&(Le.debug=console.debug?console.debug.bind(console,jc("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",jc("DEBUG"))),e<=Xd.trace&&(Le.trace=console.debug?console.debug.bind(console,jc("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",jc("TRACE")))},"setLogLevel"),jc=_(t=>`%c${As().format("ss.SSS")} : ${t} : `,"format");const m8={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:l(t=>t>=255?255:t<0?0:t,"r"),g:l(t=>t>=255?255:t<0?0:t,"g"),b:l(t=>t>=255?255:t<0?0:t,"b"),h:l(t=>t%360,"h"),s:l(t=>t>=100?100:t<0?0:t,"s"),l:l(t=>t>=100?100:t<0?0:t,"l"),a:l(t=>t>=1?1:t<0?0:t,"a")},toLinear:l(t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},"toLinear"),hue2rgb:l((t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),"hue2rgb"),hsl2rgb:l(({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const a=r<.5?r*(1+e):r+e-r*e,i=2*r-a;switch(n){case"r":return m8.hue2rgb(i,a,t+1/3)*255;case"g":return m8.hue2rgb(i,a,t)*255;case"b":return m8.hue2rgb(i,a,t-1/3)*255}},"hsl2rgb"),rgb2hsl:l(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const a=Math.max(t,e,r),i=Math.min(t,e,r),s=(a+i)/2;if(n==="l")return s*100;if(a===i)return 0;const o=a-i,u=s>.5?o/(2-a-i):o/(a+i);if(n==="s")return u*100;switch(a){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}},"rgb2hsl")},Qr={channel:m8,lang:{clamp:l((t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),"clamp"),round:l(t=>Math.round(t*1e10)/1e10,"round")},unit:{dec2hex:l(t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`},"dec2hex")}},G0={};for(let t=0;t<=255;t++)G0[t]=Qr.unit.dec2hex(t);const Ao={ALL:0,RGB:1,HSL:2};let XTt=(IC=class{constructor(){this.type=Ao.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Ao.ALL}is(e){return this.type===e}},l(IC,"Type"),IC);const wre=class wre{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new XTt}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Ao.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:a}=e;r===void 0&&(e.h=Qr.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=Qr.channel.rgb2hsl(e,"s")),a===void 0&&(e.l=Qr.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:a}=e;r===void 0&&(e.r=Qr.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=Qr.channel.hsl2rgb(e,"g")),a===void 0&&(e.b=Qr.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(Ao.HSL)&&r!==void 0?r:(this._ensureHSL(),Qr.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(Ao.HSL)&&r!==void 0?r:(this._ensureHSL(),Qr.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(Ao.HSL)&&r!==void 0?r:(this._ensureHSL(),Qr.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(Ao.RGB)&&r!==void 0?r:(this._ensureRGB(),Qr.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(Ao.RGB)&&r!==void 0?r:(this._ensureRGB(),Qr.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(Ao.RGB)&&r!==void 0?r:(this._ensureRGB(),Qr.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Ao.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ao.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ao.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ao.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ao.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ao.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}};l(wre,"Channels");let mz=wre;const y8=new mz({r:0,g:0,b:0,a:0},"transparent"),pw={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:l(t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(pw.re);if(!e)return;const r=e[1],n=parseInt(r,16),a=r.length,i=a%4===0,s=a>4,o=s?1:17,u=s?8:4,h=i?0:-1,d=s?255:15;return y8.set({r:(n>>u*(h+3)&d)*o,g:(n>>u*(h+2)&d)*o,b:(n>>u*(h+1)&d)*o,a:i?(n&d)*o/255:1},t)},"parse"),stringify:l(t=>{const{r:e,g:r,b:n,a}=t;return a<1?`#${G0[Math.round(e)]}${G0[Math.round(r)]}${G0[Math.round(n)]}${G0[Math.round(a*255)]}`:`#${G0[Math.round(e)]}${G0[Math.round(r)]}${G0[Math.round(n)]}`},"stringify")},rm={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:l(t=>{const e=t.match(rm.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return Qr.channel.clamp.h(parseFloat(r)*.9);case"rad":return Qr.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Qr.channel.clamp.h(parseFloat(r)*360)}}return Qr.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:l(t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(rm.re);if(!r)return;const[,n,a,i,s,o]=r;return y8.set({h:rm._hue2deg(n),s:Qr.channel.clamp.s(parseFloat(a)),l:Qr.channel.clamp.l(parseFloat(i)),a:s?Qr.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:l(t=>{const{h:e,s:r,l:n,a}=t;return a<1?`hsla(${Qr.lang.round(e)}, ${Qr.lang.round(r)}%, ${Qr.lang.round(n)}%, ${a})`:`hsl(${Qr.lang.round(e)}, ${Qr.lang.round(r)}%, ${Qr.lang.round(n)}%)`},"stringify")},E4={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:l(t=>{t=t.toLowerCase();const e=E4.colors[t];if(e)return pw.parse(e)},"parse"),stringify:l(t=>{const e=pw.stringify(t);for(const r in E4.colors)if(E4.colors[r]===e)return r},"stringify")},C4={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:l(t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(C4.re);if(!r)return;const[,n,a,i,s,o,u,h,d]=r;return y8.set({r:Qr.channel.clamp.r(a?parseFloat(n)*2.55:parseFloat(n)),g:Qr.channel.clamp.g(s?parseFloat(i)*2.55:parseFloat(i)),b:Qr.channel.clamp.b(u?parseFloat(o)*2.55:parseFloat(o)),a:h?Qr.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},t)},"parse"),stringify:l(t=>{const{r:e,g:r,b:n,a}=t;return a<1?`rgba(${Qr.lang.round(e)}, ${Qr.lang.round(r)}, ${Qr.lang.round(n)}, ${Qr.lang.round(a)})`:`rgb(${Qr.lang.round(e)}, ${Qr.lang.round(r)}, ${Qr.lang.round(n)})`},"stringify")},Pu={format:{keyword:E4,hex:pw,rgb:C4,rgba:C4,hsl:rm,hsla:rm},parse:l(t=>{if(typeof t!="string")return t;const e=pw.parse(t)||C4.parse(t)||rm.parse(t)||E4.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:l(t=>!t.changed&&t.color?t.color:t.type.is(Ao.HSL)||t.data.r===void 0?rm.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?C4.stringify(t):pw.stringify(t),"stringify")},Sge=l((t,e)=>{const r=Pu.parse(t);for(const n in e)r[n]=Qr.channel.clamp[n](e[n]);return Pu.stringify(r)},"change"),Ru=l((t,e,r=0,n=1)=>{if(typeof t!="number")return Sge(t,{a:e});const a=y8.set({r:Qr.channel.clamp.r(t),g:Qr.channel.clamp.g(e),b:Qr.channel.clamp.b(r),a:Qr.channel.clamp.a(n)});return Pu.stringify(a)},"rgba$2"),yz=l((t,e)=>Qr.lang.round(Pu.parse(t)[e]),"channel"),ZTt=l(t=>{const{r:e,g:r,b:n}=Pu.parse(t),a=.2126*Qr.channel.toLinear(e)+.7152*Qr.channel.toLinear(r)+.0722*Qr.channel.toLinear(n);return Qr.lang.round(a)},"luminance"),QTt=l(t=>ZTt(t)>=.5,"isLight"),Ko=l(t=>!QTt(t),"isDark"),vz=l((t,e,r)=>{const n=Pu.parse(t),a=n[e],i=Qr.channel.clamp[e](a+r);return a!==i&&(n[e]=i),Pu.stringify(n)},"adjustChannel"),Wt=l((t,e)=>vz(t,"l",e),"lighten"),Vt=l((t,e)=>vz(t,"l",-e),"darken"),_ge=l((t,e)=>vz(t,"a",-e),"transparentize"),Fe=l((t,e)=>{const r=Pu.parse(t),n={};for(const a in e)e[a]&&(n[a]=r[a]+e[a]);return Sge(t,n)},"adjust$1"),JTt=l((t,e,r=50)=>{const{r:n,g:a,b:i,a:s}=Pu.parse(t),{r:o,g:u,b:h,a:d}=Pu.parse(e),f=r/100,p=f*2-1,g=s-d,y=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,v=1-y,b=n*y+o*v,w=a*y+u*v,x=i*y+h*v,T=s*f+d*(1-f);return Ru(b,w,x,T)},"mix"),Lt=l((t,e=100)=>{const r=Pu.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,JTt(r,t,e)},"invert");function kge(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}l(kge,"_arrayLikeToArray$1");function eEt(t){if(Array.isArray(t))return t}l(eEt,"_arrayWithHoles$1");function tEt(t,e){var r=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,s,o=[],u=!0,h=!1;try{if(i=(r=r.call(t)).next,e!==0)for(;!(u=(n=i.call(r)).done)&&(o.push(n.value),o.length!==e);u=!0);}catch(d){h=!0,a=d}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw a}}return o}}l(tEt,"_iterableToArrayLimit$1");function rEt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}l(rEt,"_nonIterableRest$1");function nEt(t,e){return eEt(t)||tEt(t,e)||aEt(t,e)||rEt()}l(nEt,"_slicedToArray$1");function aEt(t,e){if(t){if(typeof t=="string")return kge(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kge(t,e):void 0}}l(aEt,"_unsupportedIterableToArray$1");const Age=Object.entries,Nge=Object.setPrototypeOf,iEt=Object.isFrozen,sEt=Object.getPrototypeOf,oEt=Object.getOwnPropertyDescriptor;let to=Object.freeze,ro=Object.seal,gw=Object.create,Ige=typeof Reflect!="undefined"&&Reflect,bz=Ige.apply,xz=Ige.construct;to||(to=l(function(e){return e},"freeze")),ro||(ro=l(function(e){return e},"seal")),bz||(bz=l(function(e,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i];return e.apply(r,a)},"apply")),xz||(xz=l(function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return new e(...n)},"construct"));const mw=Ui(Array.prototype.forEach),lEt=Ui(Array.prototype.lastIndexOf),Lge=Ui(Array.prototype.pop),yw=Ui(Array.prototype.push),cEt=Ui(Array.prototype.splice),q0=Array.isArray,S4=Ui(String.prototype.toLowerCase),wz=Ui(String.prototype.toString),$ge=Ui(String.prototype.match),_4=Ui(String.prototype.replace),Mge=Ui(String.prototype.indexOf),uEt=Ui(String.prototype.trim),hEt=Ui(Number.prototype.toString),dEt=Ui(Boolean.prototype.toString),Pge=typeof BigInt=="undefined"?null:Ui(BigInt.prototype.toString),Rge=typeof Symbol=="undefined"?null:Ui(Symbol.prototype.toString),Ns=Ui(Object.prototype.hasOwnProperty),k4=Ui(Object.prototype.toString),Is=Ui(RegExp.prototype.test),nm=fEt(TypeError);function Ui(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return bz(t,e,n)}}l(Ui,"unapply");function fEt(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return xz(t,r)}}l(fEt,"unconstruct");function $n(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S4;if(Nge&&Nge(t,null),!q0(e))return t;let n=e.length;for(;n--;){let a=e[n];if(typeof a=="string"){const i=r(a);i!==a&&(iEt(e)||(e[n]=i),a=i)}t[a]=!0}return t}l($n,"addToSet");function pEt(t){for(let e=0;e<t.length;e++)Ns(t,e)||(t[e]=null);return t}l(pEt,"cleanArray");function Xo(t){const e=gw(null);for(const n of Age(t)){var r=nEt(n,2);const a=r[0],i=r[1];Ns(t,a)&&(q0(i)?e[a]=pEt(i):i&&typeof i=="object"&&i.constructor===Object?e[a]=Xo(i):e[a]=i)}return e}l(Xo,"clone$6");function gEt(t){switch(typeof t){case"string":return t;case"number":return hEt(t);case"boolean":return dEt(t);case"bigint":return Pge?Pge(t):"0";case"symbol":return Rge?Rge(t):"Symbol()";case"undefined":return k4(t);case"function":case"object":{if(t===null)return k4(t);const e=t,r=Lh(e,"toString");if(typeof r=="function"){const n=r(e);return typeof n=="string"?n:k4(n)}return k4(t)}default:return k4(t)}}l(gEt,"stringifyValue");function Lh(t,e){for(;t!==null;){const n=oEt(t,e);if(n){if(n.get)return Ui(n.get);if(typeof n.value=="function")return Ui(n.value)}t=sEt(t)}function r(){return null}return l(r,"fallbackValue"),r}l(Lh,"lookupGetter");function mEt(t){try{return Is(t,""),!0}catch(e){return!1}}l(mEt,"isRegex");const Oge=to(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Tz=to(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ez=to(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),yEt=to(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Cz=to(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),vEt=to(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Dge=to(["#text"]),Fge=to(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Sz=to(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Bge=to(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),v8=to(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),bEt=ro(/{{[\w\W]*|^[\w\W]*}}/g),xEt=ro(/<%[\w\W]*|^[\w\W]*%>/g),wEt=ro(/\${[\w\W]*/g),TEt=ro(/^data-[\-\w.\u00B7-\uFFFF]+$/),EEt=ro(/^aria-[\-\w]+$/),zge=ro(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),CEt=ro(/^(?:\w+script|data):/i),SEt=ro(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_Et=ro(/^html$/i),kEt=ro(/^[a-z][.\w]*(-[.\w]+)+$/i),Hge=ro(/<[/\w!]/g),Wge=ro(/<[/\w]/g),AEt=ro(/<\/no(script|embed|frames)/i),NEt=ro(/\/>/i),gc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},IEt=l(function(){return typeof window=="undefined"?null:window},"getGlobal"),LEt=l(function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const a="data-tt-policy-suffix";r&&r.hasAttribute(a)&&(n=r.getAttribute(a));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch(s){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},"_createTrustedTypesPolicy"),Vge=l(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap"),Y0=l(function(e,r,n,a){return Ns(e,r)&&q0(e[r])?$n(a.base?Xo(a.base):{},e[r],a.transform):n},"_resolveSetOption");function Gge(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:IEt();const e=l(cr=>Gge(cr),"DOMPurify");if(e.version="3.4.12",e.removed=[],!t||!t.document||t.document.nodeType!==gc.document||!t.Element)return e.isSupported=!1,e;let r=t.document;const n=r,a=n.currentScript;t.DocumentFragment;const i=t.HTMLTemplateElement,s=t.Node,o=t.Element,u=t.NodeFilter,h=t.NamedNodeMap;h===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const d=t.DOMParser,f=t.trustedTypes,p=o.prototype,g=Lh(p,"cloneNode"),m=Lh(p,"remove"),y=Lh(p,"nextSibling"),v=Lh(p,"childNodes"),b=Lh(p,"parentNode"),w=Lh(p,"shadowRoot"),x=Lh(p,"attributes"),T=s&&s.prototype?Lh(s.prototype,"nodeType"):null,C=s&&s.prototype?Lh(s.prototype,"nodeName"):null;if(typeof i=="function"){const cr=r.createElement("template");cr.content&&cr.content.ownerDocument&&(r=cr.content.ownerDocument)}let S,E="",k,A=!1,I=0;const L=l(function(){if(I>0)throw nm('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},"_assertNotInTrustedTypesPolicy"),R=l(function(ct){L(),I++;try{return S.createHTML(ct)}finally{I--}},"_createTrustedHTML"),O=l(function(ct){L(),I++;try{return S.createScriptURL(ct)}finally{I--}},"_createTrustedScriptURL"),M=l(function(){return A||(k=LEt(f,a),A=!0),k},"_getDefaultTrustedTypesPolicy"),P=r,z=P.implementation,D=P.createNodeIterator,B=P.createDocumentFragment,W=P.getElementsByTagName,U=n.importNode;let j=Vge();e.isSupported=typeof Age=="function"&&typeof b=="function"&&z&&z.createHTMLDocument!==void 0;const V=bEt,Y=xEt,H=wEt,q=TEt,Z=EEt,K=CEt,re=SEt,Q=kEt;let te=zge,ee=null;const J=$n({},[...Oge,...Tz,...Ez,...Cz,...Dge]);let ae=null;const se=$n({},[...Fge,...Sz,...Bge,...v8]);let fe=Object.seal(gw(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,de=null;const Ee=Object.seal(gw(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ce=!0,De=!0,ce=!1,Ie=!0,ye=!1,pe=!0,Ae=!1,Ve=!1,ze=null,We=null,me=!1,Se=!1,ne=!1,xe=!1,oe=!0,_e=!1;const ue="user-content-";let tt=!0,Re=!1,et={},Xe=null;const ot=$n({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ge=null;const ht=$n({},["audio","video","img","source","image","track"]);let Je=null;const St=$n({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),He="http://www.w3.org/1998/Math/MathML",dt="http://www.w3.org/2000/svg",Oe="http://www.w3.org/1999/xhtml";let vt=Oe,qe=!1,Me=null;const lt=$n({},[He,dt,Oe],wz),it=to(["mi","mo","mn","ms","mtext"]);let Ue=$n({},it);const we=to(["annotation-xml"]);let gt=$n({},we);const ge=$n({},["title","style","font","a","script"]);let ie=null;const be=["application/xhtml+xml","text/html"],$e="text/html";let le=null,ke=null;const je=r.createElement("form"),ut=l(function(ct){return ct instanceof RegExp||ct instanceof Function},"isRegexOrFunction"),Qe=l(function(){let ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ke&&ke===ct)return;(!ct||typeof ct!="object")&&(ct={}),ct=Xo(ct),ie=be.indexOf(ct.PARSER_MEDIA_TYPE)===-1?$e:ct.PARSER_MEDIA_TYPE,le=ie==="application/xhtml+xml"?wz:S4,ee=Y0(ct,"ALLOWED_TAGS",J,{transform:le}),ae=Y0(ct,"ALLOWED_ATTR",se,{transform:le}),Me=Y0(ct,"ALLOWED_NAMESPACES",lt,{transform:wz}),Je=Y0(ct,"ADD_URI_SAFE_ATTR",St,{transform:le,base:St}),Ge=Y0(ct,"ADD_DATA_URI_TAGS",ht,{transform:le,base:ht}),Xe=Y0(ct,"FORBID_CONTENTS",ot,{transform:le}),ve=Y0(ct,"FORBID_TAGS",Xo({}),{transform:le}),de=Y0(ct,"FORBID_ATTR",Xo({}),{transform:le}),et=Ns(ct,"USE_PROFILES")?ct.USE_PROFILES&&typeof ct.USE_PROFILES=="object"?Xo(ct.USE_PROFILES):ct.USE_PROFILES:!1,Ce=ct.ALLOW_ARIA_ATTR!==!1,De=ct.ALLOW_DATA_ATTR!==!1,ce=ct.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=ct.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ye=ct.SAFE_FOR_TEMPLATES||!1,pe=ct.SAFE_FOR_XML!==!1,Ae=ct.WHOLE_DOCUMENT||!1,Se=ct.RETURN_DOM||!1,ne=ct.RETURN_DOM_FRAGMENT||!1,xe=ct.RETURN_TRUSTED_TYPE||!1,me=ct.FORCE_BODY||!1,oe=ct.SANITIZE_DOM!==!1,_e=ct.SANITIZE_NAMED_PROPS||!1,tt=ct.KEEP_CONTENT!==!1,Re=ct.IN_PLACE||!1,te=mEt(ct.ALLOWED_URI_REGEXP)?ct.ALLOWED_URI_REGEXP:zge,vt=typeof ct.NAMESPACE=="string"?ct.NAMESPACE:Oe,Ue=Ns(ct,"MATHML_TEXT_INTEGRATION_POINTS")&&ct.MATHML_TEXT_INTEGRATION_POINTS&&typeof ct.MATHML_TEXT_INTEGRATION_POINTS=="object"?Xo(ct.MATHML_TEXT_INTEGRATION_POINTS):$n({},it),gt=Ns(ct,"HTML_INTEGRATION_POINTS")&&ct.HTML_INTEGRATION_POINTS&&typeof ct.HTML_INTEGRATION_POINTS=="object"?Xo(ct.HTML_INTEGRATION_POINTS):$n({},we);const $t=Ns(ct,"CUSTOM_ELEMENT_HANDLING")&&ct.CUSTOM_ELEMENT_HANDLING&&typeof ct.CUSTOM_ELEMENT_HANDLING=="object"?Xo(ct.CUSTOM_ELEMENT_HANDLING):gw(null);if(fe=gw(null),Ns($t,"tagNameCheck")&&ut($t.tagNameCheck)&&(fe.tagNameCheck=$t.tagNameCheck),Ns($t,"attributeNameCheck")&&ut($t.attributeNameCheck)&&(fe.attributeNameCheck=$t.attributeNameCheck),Ns($t,"allowCustomizedBuiltInElements")&&typeof $t.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=$t.allowCustomizedBuiltInElements),ro(fe),ye&&(De=!1),ne&&(Se=!0),et&&(ee=$n({},Dge),ae=gw(null),et.html===!0&&($n(ee,Oge),$n(ae,Fge)),et.svg===!0&&($n(ee,Tz),$n(ae,Sz),$n(ae,v8)),et.svgFilters===!0&&($n(ee,Ez),$n(ae,Sz),$n(ae,v8)),et.mathMl===!0&&($n(ee,Cz),$n(ae,Bge),$n(ae,v8))),Ee.tagCheck=null,Ee.attributeCheck=null,Ns(ct,"ADD_TAGS")&&(typeof ct.ADD_TAGS=="function"?Ee.tagCheck=ct.ADD_TAGS:q0(ct.ADD_TAGS)&&(ee===J&&(ee=Xo(ee)),$n(ee,ct.ADD_TAGS,le))),Ns(ct,"ADD_ATTR")&&(typeof ct.ADD_ATTR=="function"?Ee.attributeCheck=ct.ADD_ATTR:q0(ct.ADD_ATTR)&&(ae===se&&(ae=Xo(ae)),$n(ae,ct.ADD_ATTR,le))),Ns(ct,"ADD_URI_SAFE_ATTR")&&q0(ct.ADD_URI_SAFE_ATTR)&&$n(Je,ct.ADD_URI_SAFE_ATTR,le),Ns(ct,"FORBID_CONTENTS")&&q0(ct.FORBID_CONTENTS)&&(Xe===ot&&(Xe=Xo(Xe)),$n(Xe,ct.FORBID_CONTENTS,le)),Ns(ct,"ADD_FORBID_CONTENTS")&&q0(ct.ADD_FORBID_CONTENTS)&&(Xe===ot&&(Xe=Xo(Xe)),$n(Xe,ct.ADD_FORBID_CONTENTS,le)),tt&&(ee["#text"]=!0),Ae&&$n(ee,["html","head","body"]),ee.table&&($n(ee,["tbody"]),delete ve.tbody),ct.TRUSTED_TYPES_POLICY){if(typeof ct.TRUSTED_TYPES_POLICY.createHTML!="function")throw nm('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ct.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw nm('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Et=S;S=ct.TRUSTED_TYPES_POLICY;try{E=R("")}catch(jt){throw S=Et,jt}}else ct.TRUSTED_TYPES_POLICY===null?(S=void 0,E=""):(S===void 0&&(S=M()),S&&typeof E=="string"&&(E=R("")));to&&to(ct),ke=ct},"_parseConfig"),Ze=$n({},[...Tz,...Ez,...yEt]),st=$n({},[...Cz,...vEt]),Ct=l(function(ct,$t,Et){return $t.namespaceURI===Oe?ct==="svg":$t.namespaceURI===He?ct==="svg"&&(Et==="annotation-xml"||Ue[Et]):!!Ze[ct]},"_checkSvgNamespace"),Mt=l(function(ct,$t,Et){return $t.namespaceURI===Oe?ct==="math":$t.namespaceURI===dt?ct==="math"&>[Et]:!!st[ct]},"_checkMathMlNamespace"),Bt=l(function(ct,$t,Et){return $t.namespaceURI===dt&&!gt[Et]||$t.namespaceURI===He&&!Ue[Et]?!1:!st[ct]&&(ge[ct]||!Ze[ct])},"_checkHtmlNamespace"),Pt=l(function(ct){let $t=b(ct);(!$t||!$t.tagName)&&($t={namespaceURI:vt,tagName:"template"});const Et=S4(ct.tagName),jt=S4($t.tagName);return Me[ct.namespaceURI]?ct.namespaceURI===dt?Ct(Et,$t,jt):ct.namespaceURI===He?Mt(Et,$t,jt):ct.namespaceURI===Oe?Bt(Et,$t,jt):!!(ie==="application/xhtml+xml"&&Me[ct.namespaceURI]):!1},"_checkValidNamespace"),Pe=l(function(ct){yw(e.removed,{element:ct});try{b(ct).removeChild(ct)}catch($t){if(m(ct),!b(ct))throw nm("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},"_forceRemove"),at=l(function(ct){Nt(ct);const $t=v(ct);if($t){const jt=[];mw($t,ir=>{yw(jt,ir)}),mw(jt,ir=>{try{m(ir)}catch(br){}})}const Et=x(ct);if(Et)for(let jt=Et.length-1;jt>=0;--jt){const ir=Et[jt],br=ir&&ir.name;if(typeof br=="string")try{ct.removeAttribute(br)}catch(tn){}}},"_neutralizeRoot"),yt=l(function(ct,$t){try{yw(e.removed,{attribute:$t.getAttributeNode(ct),from:$t})}catch(Et){yw(e.removed,{attribute:null,from:$t})}if($t.removeAttribute(ct),ct==="is")if(Se||ne)try{Pe($t)}catch(Et){}else try{$t.setAttribute(ct,"")}catch(Et){}},"_removeAttribute"),Tt=l(function(ct){const $t=x(ct);if($t)for(let Et=$t.length-1;Et>=0;--Et){const jt=$t[Et],ir=jt&&jt.name;if(!(typeof ir!="string"||ae[le(ir)]))try{ct.removeAttribute(ir)}catch(br){}}},"_stripDisallowedAttributes"),Nt=l(function(ct){const $t=[ct];for(;$t.length>0;){const Et=$t.pop();(T?T(Et):Et.nodeType)===gc.element&&Tt(Et);const ir=v(Et);if(ir)for(let br=ir.length-1;br>=0;--br)$t.push(ir[br])}},"_neutralizeSubtree"),zt=l(function(ct){if(!pe)return;const $t=[ct];for(;$t.length>0;){const Et=$t.pop(),jt=T?T(Et):Et.nodeType;if(jt===gc.processingInstruction||jt===gc.comment&&Is(Wge,Et.data)){try{m(Et)}catch(br){}continue}if(jt===gc.element){const br=Et,tn=le(C?C(Et):Et.nodeName);try{br.hasAttribute&&br.hasAttribute("patchsrc")&&br.removeAttribute("patchsrc"),br.hasAttribute&&br.hasAttribute("for")&&tn!=="label"&&tn!=="output"&&br.removeAttribute("for")}catch(Gr){}}const ir=v(Et);if(ir)for(let br=ir.length-1;br>=0;--br)$t.push(ir[br])}},"_neutralizePatchLinkage"),Jt=l(function(ct){let $t=null,Et=null;if(me)ct="<remove></remove>"+ct;else{const br=$ge(ct,/^[\r\n\t ]+/);Et=br&&br[0]}ie==="application/xhtml+xml"&&vt===Oe&&(ct='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ct+"</body></html>");const jt=S?R(ct):ct;if(vt===Oe)try{$t=new d().parseFromString(jt,ie)}catch(br){}if(!$t||!$t.documentElement){$t=z.createDocument(vt,"template",null);try{$t.documentElement.innerHTML=qe?E:jt}catch(br){}}const ir=$t.body||$t.documentElement;return ct&&Et&&ir.insertBefore(r.createTextNode(Et),ir.childNodes[0]||null),vt===Oe?W.call($t,Ae?"html":"body")[0]:Ae?$t.documentElement:ir},"_initDocument"),Ht=l(function(ct){return D.call(ct.ownerDocument||ct,ct,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),wt=l(function(ct){return ct=_4(ct,V," "),ct=_4(ct,Y," "),ct=_4(ct,H," "),ct},"_stripTemplateExpressions"),_t=l(function(ct){var $t;ct.normalize();const Et=D.call(ct.ownerDocument||ct,ct,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let jt=Et.nextNode();for(;jt;)jt.data=wt(jt.data),jt=Et.nextNode();const ir=($t=ct.querySelectorAll)===null||$t===void 0?void 0:$t.call(ct,"template");ir&&mw(ir,br=>{er(br.content)&&_t(br.content)})},"_scrubTemplateExpressions"),Ot=l(function(ct){const $t=C?C(ct):null;return typeof $t!="string"||le($t)!=="form"?!1:typeof ct.nodeName!="string"||typeof ct.textContent!="string"||typeof ct.removeChild!="function"||ct.attributes!==x(ct)||typeof ct.removeAttribute!="function"||typeof ct.setAttribute!="function"||typeof ct.namespaceURI!="string"||typeof ct.insertBefore!="function"||typeof ct.hasChildNodes!="function"||ct.nodeType!==T(ct)||ct.childNodes!==v(ct)},"_isClobbered"),er=l(function(ct){if(!T||typeof ct!="object"||ct===null)return!1;try{return T(ct)===gc.documentFragment}catch($t){return!1}},"_isDocumentFragment"),Ye=l(function(ct){if(!T||typeof ct!="object"||ct===null)return!1;try{return typeof T(ct)=="number"}catch($t){return!1}},"_isNode");function Ut(cr,ct,$t){cr.length!==0&&mw(cr,Et=>{Et.call(e,ct,$t,ke)})}l(Ut,"_executeHooks");const rt=l(function(ct,$t){return!!(pe&&ct.hasChildNodes()&&!Ye(ct.firstElementChild)&&Is(Hge,ct.textContent)&&Is(Hge,ct.innerHTML)||pe&&ct.namespaceURI===Oe&&$t==="style"&&Ye(ct.firstElementChild)||ct.nodeType===gc.processingInstruction||pe&&ct.nodeType===gc.comment&&Is(Wge,ct.data))},"_isUnsafeNode"),vr=l(function(ct,$t){if(!ve[$t]&&Us($t)&&(fe.tagNameCheck instanceof RegExp&&Is(fe.tagNameCheck,$t)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck($t)))return!1;if(tt&&!Xe[$t]){const Et=b(ct),jt=v(ct);if(jt&&Et){const ir=jt.length;for(let br=ir-1;br>=0;--br){const tn=Re?jt[br]:g(jt[br],!0);Et.insertBefore(tn,y(ct))}}}return Pe(ct),!0},"_sanitizeDisallowedNode"),en=l(function(ct,$t){if(Ut(j.beforeSanitizeElements,ct,null),ct!==$t&&b(ct)===null)return!0;if(Ot(ct))return Pe(ct),!0;const Et=le(C?C(ct):ct.nodeName);if(Ut(j.uponSanitizeElement,ct,{tagName:Et,allowedTags:ee}),ct!==$t&&b(ct)===null)return!0;if(rt(ct,Et))return Pe(ct),!0;if(ve[Et]||!(Ee.tagCheck instanceof Function&&Ee.tagCheck(Et))&&!ee[Et]){const ir=vr(ct,Et);return ir===!1&&Ut(j.afterSanitizeElements,ct,null),ir}if((T?T(ct):ct.nodeType)===gc.element&&!Pt(ct)||(Et==="noscript"||Et==="noembed"||Et==="noframes")&&Is(AEt,ct.innerHTML))return Pe(ct),!0;if(ye&&ct.nodeType===gc.text){const ir=wt(ct.textContent);ct.textContent!==ir&&(yw(e.removed,{element:ct.cloneNode()}),ct.textContent=ir)}return Ut(j.afterSanitizeElements,ct,null),!1},"_sanitizeElements"),Pn=l(function(ct,$t,Et){if(de[$t]||pe&&$t==="patchsrc"||pe&&$t==="for"&&ct!=="label"&&ct!=="output"||oe&&($t==="id"||$t==="name")&&(Et in r||Et in je))return!1;const jt=ae[$t]||Ee.attributeCheck instanceof Function&&Ee.attributeCheck($t,ct);if(!(De&&Is(q,$t))){if(!(Ce&&Is(Z,$t))){if(jt){if(!Je[$t]){if(!Is(te,_4(Et,re,""))){if(!(($t==="src"||$t==="xlink:href"||$t==="href")&&ct!=="script"&&Mge(Et,"data:")===0&&Ge[ct])){if(!(ce&&!Is(K,_4(Et,re,"")))){if(Et)return!1}}}}}else if(!(Us(ct)&&(fe.tagNameCheck instanceof RegExp&&Is(fe.tagNameCheck,ct)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(ct))&&(fe.attributeNameCheck instanceof RegExp&&Is(fe.attributeNameCheck,$t)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck($t,ct))||$t==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&Is(fe.tagNameCheck,Et)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(Et))))return!1}}return!0},"_isValidAttribute"),ia=$n({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Us=l(function(ct){return!ia[S4(ct)]&&Is(Q,ct)},"_isBasicCustomElement"),lr=l(function(ct,$t,Et,jt){if(S&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Et)switch(f.getAttributeType(ct,$t)){case"TrustedHTML":return R(jt);case"TrustedScriptURL":return O(jt)}return jt},"_applyTrustedTypesToAttribute"),$r=l(function(ct,$t,Et,jt){try{Et?ct.setAttributeNS(Et,$t,jt):ct.setAttribute($t,jt),Ot(ct)?Pe(ct):Lge(e.removed)}catch(ir){yt($t,ct)}},"_setAttributeValue"),xn=l(function(ct){Ut(j.beforeSanitizeAttributes,ct,null);const $t=ct.attributes;if(!$t||Ot(ct))return;const Et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ae,forceKeepAttr:void 0};let jt=$t.length;const ir=le(ct.nodeName);for(;jt--;){const br=$t[jt],tn=br.name,Gr=br.namespaceURI,Dr=br.value,Rr=le(tn),sa=Dr;let In=tn==="value"?sa:uEt(sa);if(Et.attrName=Rr,Et.attrValue=In,Et.keepAttr=!0,Et.forceKeepAttr=void 0,Ut(j.uponSanitizeAttribute,ct,Et),In=Et.attrValue,_e&&(Rr==="id"||Rr==="name")&&Mge(In,ue)!==0&&(yt(tn,ct),In=ue+In),pe&&Is(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,In)){yt(tn,ct);continue}if(Rr==="attributename"&&$ge(In,"href")){yt(tn,ct);continue}if(!Et.forceKeepAttr){if(!Et.keepAttr){yt(tn,ct);continue}if(!Ie&&Is(NEt,In)){yt(tn,ct);continue}if(ye&&(In=wt(In)),!Pn(ir,Rr,In)){yt(tn,ct);continue}In=lr(ir,Rr,Gr,In),In!==sa&&$r(ct,tn,Gr,In)}}Ut(j.afterSanitizeAttributes,ct,null)},"_sanitizeAttributes"),ka=l(function(ct){let $t=null;const Et=Ht(ct);for(Ut(j.beforeSanitizeShadowDOM,ct,null);$t=Et.nextNode();)if(Ut(j.uponSanitizeShadowNode,$t,null),en($t,ct),xn($t),er($t.content)&&ka($t.content),(T?T($t):$t.nodeType)===gc.element){const ir=w($t);er(ir)&&(di(ir),ka(ir))}Ut(j.afterSanitizeShadowDOM,ct,null)},"_sanitizeShadowDOM"),di=l(function(ct){const $t=[{node:ct,shadow:null}];for(;$t.length>0;){const Et=$t.pop();if(Et.shadow){ka(Et.shadow);continue}const jt=Et.node,br=(T?T(jt):jt.nodeType)===gc.element,tn=v(jt);if(tn)for(let Gr=tn.length-1;Gr>=0;--Gr)$t.push({node:tn[Gr],shadow:null});if(br){const Gr=C?C(jt):null;if(typeof Gr=="string"&&le(Gr)==="template"){const Dr=jt.content;er(Dr)&&$t.push({node:Dr,shadow:null})}}if(br){const Gr=w(jt);er(Gr)&&$t.push({node:null,shadow:Gr},{node:Gr,shadow:null})}}},"_sanitizeAttachedShadowRoots");return e.sanitize=function(cr){let ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$t=null,Et=null,jt=null,ir=null;if(qe=!cr,qe&&(cr="<!-->"),typeof cr!="string"&&!Ye(cr)&&(cr=gEt(cr),typeof cr!="string"))throw nm("dirty is not a string, aborting");if(!e.isSupported)return cr;Ve?(ee=ze,ae=We):Qe(ct),(j.uponSanitizeElement.length>0||j.uponSanitizeAttribute.length>0)&&(ee=Xo(ee)),j.uponSanitizeAttribute.length>0&&(ae=Xo(ae)),e.removed=[];const br=Re&&typeof cr!="string"&&Ye(cr);if(br){zt(cr);const Rr=C?C(cr):cr.nodeName;if(typeof Rr=="string"){const sa=le(Rr);if(!ee[sa]||ve[sa])throw at(cr),nm("root node is forbidden and cannot be sanitized in-place")}if(Ot(cr))throw at(cr),nm("root node is clobbered and cannot be sanitized in-place");try{di(cr)}catch(sa){throw at(cr),sa}}else if(Ye(cr))$t=Jt("<!---->"),Et=$t.ownerDocument.importNode(cr,!0),Et.nodeType===gc.element&&Et.nodeName==="BODY"||Et.nodeName==="HTML"?$t=Et:$t.appendChild(Et),di(Et);else{if(!Se&&!ye&&!Ae&&cr.indexOf("<")===-1)return S&&xe?R(cr):cr;if($t=Jt(cr),!$t)return Se?null:xe?E:""}$t&&me&&Pe($t.firstChild);const tn=br?cr:$t,Gr=Ht(tn);try{for(;jt=Gr.nextNode();)en(jt,tn),xn(jt),er(jt.content)&&ka(jt.content)}catch(Rr){throw br&&(at(cr),mw(e.removed,sa=>{sa.element&&Nt(sa.element)})),Rr}if(br)return mw(e.removed,Rr=>{Rr.element&&Nt(Rr.element)}),ye&&_t(cr),cr;if(Se){if(ye&&_t($t),ne)for(ir=B.call($t.ownerDocument);$t.firstChild;)ir.appendChild($t.firstChild);else ir=$t;return(ae.shadowroot||ae.shadowrootmode)&&(ir=U.call(n,ir,!0)),ir}let Dr=Ae?$t.outerHTML:$t.innerHTML;return Ae&&ee["!doctype"]&&$t.ownerDocument&&$t.ownerDocument.doctype&&$t.ownerDocument.doctype.name&&Is(_Et,$t.ownerDocument.doctype.name)&&(Dr="<!DOCTYPE "+$t.ownerDocument.doctype.name+`>
|
||
`+Dr),ye&&(Dr=wt(Dr)),S&&xe?R(Dr):Dr},e.setConfig=function(){let cr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Qe(cr),Ve=!0,ze=ee,We=ae},e.clearConfig=function(){ke=null,Ve=!1,ze=null,We=null,S=k,E=""},e.isValidAttribute=function(cr,ct,$t){ke||Qe({});const Et=le(cr),jt=le(ct);return Pn(Et,jt,$t)},e.addHook=function(cr,ct){typeof ct=="function"&&Ns(j,cr)&&yw(j[cr],ct)},e.removeHook=function(cr,ct){if(Ns(j,cr)){if(ct!==void 0){const $t=lEt(j[cr],ct);return $t===-1?void 0:cEt(j[cr],$t,1)[0]}return Lge(j[cr])}},e.removeHooks=function(cr){Ns(j,cr)&&(j[cr]=[])},e.removeAllHooks=function(){j=Vge()},e}l(Gge,"createDOMPurify");var Zd=Gge(),_z=_((t,e,{depth:r=2,clobber:n=!1}={})=>{const a={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(i=>_z(t,i,a)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(i=>{t.includes(i)||t.push(i)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(i=>{typeof e[i]=="object"&&e[i]!==null&&(t[i]===void 0||typeof t[i]=="object")?(t[i]===void 0&&(t[i]=Array.isArray(e[i])?[]:{}),t[i]=_z(t[i],e[i],{depth:r-1,clobber:n})):(n||typeof t[i]!="object"&&typeof e[i]!="object")&&(t[i]=e[i])}),t)},"assignWithDepth"),$i=_z,$h="#ffffff",Mh="#f2f2f2",jr=_((t,e)=>e?Fe(t,{s:-40,l:10}):Fe(t,{s:-40,l:-10}),"mkBorder"),$Et=(ky=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,n,a,i,s,o,u,h,d,f,p,g,m,y,v,b,w,x,T,C,S,E,k,A,I,L,R,O,M,P,z,D,B,W,U,j,V,Y,H,q,Z,K,re,Q,te,ee,J,ae,se,fe,ve,de,Ee,Ce,De,ce,Ie,ye,pe;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Lt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Lt(this.tertiaryColor),this.lineColor=this.lineColor||Lt(this.background),this.arrowheadColor=this.arrowheadColor||Lt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Lt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Wt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Vt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Vt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Wt(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Fe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Fe(this.primaryColor,{h:330}),this.darkMode)for(let Ae=0;Ae<this.THEME_COLOR_LIMIT;Ae++)this["cScale"+Ae]=Vt(this["cScale"+Ae],75);else for(let Ae=0;Ae<this.THEME_COLOR_LIMIT;Ae++)this["cScale"+Ae]=Vt(this["cScale"+Ae],25);for(let Ae=0;Ae<this.THEME_COLOR_LIMIT;Ae++)this["cScaleInv"+Ae]=this["cScaleInv"+Ae]||Lt(this["cScale"+Ae]);for(let Ae=0;Ae<this.THEME_COLOR_LIMIT;Ae++)this.darkMode?this["cScalePeer"+Ae]=this["cScalePeer"+Ae]||Wt(this["cScale"+Ae],10):this["cScalePeer"+Ae]=this["cScalePeer"+Ae]||Vt(this["cScale"+Ae],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Ae=0;Ae<this.THEME_COLOR_LIMIT;Ae++)this["cScaleLabel"+Ae]=this["cScaleLabel"+Ae]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let Ae=0;Ae<5;Ae++)this["surface"+Ae]=this["surface"+Ae]||Fe(this.mainBkg,{h:180,s:-15,l:e*(5+Ae*3)}),this["surfacePeer"+Ae]=this["surfacePeer"+Ae]||Fe(this.mainBkg,{h:180,s:-15,l:e*(8+Ae*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Fe(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Fe(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Fe(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Fe(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Fe(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Fe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Fe(this.primaryColor,{l:-10}),this.pie5=this.pie5||Fe(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Fe(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Fe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Fe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Fe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Fe(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Fe(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Fe(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=(r=this.venn1)!=null?r:Fe(this.primaryColor,{l:-30}),this.venn2=(n=this.venn2)!=null?n:Fe(this.secondaryColor,{l:-30}),this.venn3=(a=this.venn3)!=null?a:Fe(this.tertiaryColor,{l:-30}),this.venn4=(i=this.venn4)!=null?i:Fe(this.primaryColor,{h:60,l:-30}),this.venn5=(s=this.venn5)!=null?s:Fe(this.primaryColor,{h:-60,l:-30}),this.venn6=(o=this.venn6)!=null?o:Fe(this.secondaryColor,{h:60,l:-30}),this.venn7=(u=this.venn7)!=null?u:Fe(this.primaryColor,{h:120,l:-30}),this.venn8=(h=this.venn8)!=null?h:Fe(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=(d=this.vennTitleTextColor)!=null?d:this.titleColor,this.vennSetTextColor=(f=this.vennSetTextColor)!=null?f:this.textColor,this.cynefin={domainFontSize:((p=this.cynefin)==null?void 0:p.domainFontSize)||16,itemFontSize:((g=this.cynefin)==null?void 0:g.itemFontSize)||12,boundaryColor:((m=this.cynefin)==null?void 0:m.boundaryColor)||this.lineColor,boundaryWidth:((y=this.cynefin)==null?void 0:y.boundaryWidth)||2,cliffColor:((v=this.cynefin)==null?void 0:v.cliffColor)||"#8B0000",cliffWidth:((b=this.cynefin)==null?void 0:b.cliffWidth)||4,arrowColor:((w=this.cynefin)==null?void 0:w.arrowColor)||this.lineColor,arrowWidth:((x=this.cynefin)==null?void 0:x.arrowWidth)||2,complexBg:((T=this.cynefin)==null?void 0:T.complexBg)||"#E8F5E9",complicatedBg:((C=this.cynefin)==null?void 0:C.complicatedBg)||"#E3F2FD",chaoticBg:((S=this.cynefin)==null?void 0:S.chaoticBg)||"#FBE9E7",clearBg:((E=this.cynefin)==null?void 0:E.clearBg)||"#FFF8E1",confusionBg:((k=this.cynefin)==null?void 0:k.confusionBg)||"#F3E5F5",textColor:((A=this.cynefin)==null?void 0:A.textColor)||this.textColor,labelColor:((I=this.cynefin)==null?void 0:I.labelColor)||this.primaryTextColor},this.radar={axisColor:((L=this.radar)==null?void 0:L.axisColor)||this.lineColor,axisStrokeWidth:((R=this.radar)==null?void 0:R.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((M=this.radar)==null?void 0:M.curveOpacity)||.5,curveStrokeWidth:((P=this.radar)==null?void 0:P.curveStrokeWidth)||2,graticuleColor:((z=this.radar)==null?void 0:z.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((D=this.radar)==null?void 0:D.graticuleStrokeWidth)||1,graticuleOpacity:((B=this.radar)==null?void 0:B.graticuleOpacity)||.3,legendBoxSize:((W=this.radar)==null?void 0:W.legendBoxSize)||12,legendFontSize:((U=this.radar)==null?void 0:U.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((j=this.wardley)==null?void 0:j.backgroundColor)||this.background,axisColor:((V=this.wardley)==null?void 0:V.axisColor)||this.lineColor,axisTextColor:((Y=this.wardley)==null?void 0:Y.axisTextColor)||this.primaryTextColor,gridColor:((H=this.wardley)==null?void 0:H.gridColor)||this.gridColor,componentFill:((q=this.wardley)==null?void 0:q.componentFill)||this.background,componentStroke:((Z=this.wardley)==null?void 0:Z.componentStroke)||this.lineColor,componentLabelColor:((K=this.wardley)==null?void 0:K.componentLabelColor)||this.primaryTextColor,linkStroke:((re=this.wardley)==null?void 0:re.linkStroke)||this.lineColor,evolutionStroke:((Q=this.wardley)==null?void 0:Q.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((te=this.wardley)==null?void 0:te.annotationStroke)||this.lineColor,annotationTextColor:((ee=this.wardley)==null?void 0:ee.annotationTextColor)||this.primaryTextColor,annotationFill:((J=this.wardley)==null?void 0:J.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((ae=this.xyChart)==null?void 0:ae.backgroundColor)||this.background,titleColor:((se=this.xyChart)==null?void 0:se.titleColor)||this.primaryTextColor,dataLabelColor:((fe=this.xyChart)==null?void 0:fe.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((ve=this.xyChart)==null?void 0:ve.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((de=this.xyChart)==null?void 0:de.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Ee=this.xyChart)==null?void 0:Ee.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Ce=this.xyChart)==null?void 0:Ce.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((De=this.xyChart)==null?void 0:De.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((ce=this.xyChart)==null?void 0:ce.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Ie=this.xyChart)==null?void 0:Ie.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((ye=this.xyChart)==null?void 0:ye.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((pe=this.xyChart)==null?void 0:pe.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Fe(this.primaryColor,{h:-30}),this.git4=this.git4||Fe(this.primaryColor,{h:-60}),this.git5=this.git5||Fe(this.primaryColor,{h:-90}),this.git6=this.git6||Fe(this.primaryColor,{h:60}),this.git7=this.git7||Fe(this.primaryColor,{h:120}),this.darkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(ky,"Theme"),_(ky,"Theme"),ky),MEt=_(t=>{const e=new $Et;return e.calculate(t),e},"getThemeVariables"),PEt=(Ay=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Wt(this.primaryColor,16),this.tertiaryColor=Fe(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.background),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Lt(this.primaryColor),this.secondaryTextColor=Lt(this.secondaryColor),this.tertiaryTextColor=Lt(this.tertiaryColor),this.lineColor=Lt(this.background),this.textColor=Lt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Wt(Lt("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ru(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=Vt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Vt(this.sectionBkgColor,10),this.taskBorderColor=Ru(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ru(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Wt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Vt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var e,r,n,a,i,s,o,u,h,d,f,p,g,m,y,v,b,w,x,T,C,S,E,k,A,I,L,R,O,M,P,z,D,B,W,U,j,V,Y,H,q,Z,K,re,Q,te,ee,J,ae,se,fe,ve;this.secondBkg=Wt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Wt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Wt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=Lt(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Fe(this.primaryColor,{h:64}),this.fillType3=Fe(this.secondaryColor,{h:64}),this.fillType4=Fe(this.primaryColor,{h:-64}),this.fillType5=Fe(this.secondaryColor,{h:-64}),this.fillType6=Fe(this.primaryColor,{h:128}),this.fillType7=Fe(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Fe(this.primaryColor,{h:330});for(let de=0;de<this.THEME_COLOR_LIMIT;de++)this["cScaleInv"+de]=this["cScaleInv"+de]||Lt(this["cScale"+de]);for(let de=0;de<this.THEME_COLOR_LIMIT;de++)this["cScalePeer"+de]=this["cScalePeer"+de]||Wt(this["cScale"+de],10);for(let de=0;de<5;de++)this["surface"+de]=this["surface"+de]||Fe(this.mainBkg,{h:30,s:-30,l:-(-10+de*4)}),this["surfacePeer"+de]=this["surfacePeer"+de]||Fe(this.mainBkg,{h:30,s:-30,l:-(-7+de*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let de=0;de<this.THEME_COLOR_LIMIT;de++)this["cScaleLabel"+de]=this["cScaleLabel"+de]||this.scaleLabelColor;for(let de=0;de<this.THEME_COLOR_LIMIT;de++)this["pie"+de]=this["cScale"+de];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let de=0;de<8;de++)this["venn"+(de+1)]=(e=this["venn"+(de+1)])!=null?e:Wt(this["cScale"+de],30);this.vennTitleTextColor=(r=this.vennTitleTextColor)!=null?r:this.titleColor,this.vennSetTextColor=(n=this.vennSetTextColor)!=null?n:this.textColor,this.cynefin={domainFontSize:((a=this.cynefin)==null?void 0:a.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((u=this.cynefin)==null?void 0:u.cliffColor)||"#FF6B6B",cliffWidth:((h=this.cynefin)==null?void 0:h.cliffWidth)||4,arrowColor:((d=this.cynefin)==null?void 0:d.arrowColor)||this.lineColor,arrowWidth:((f=this.cynefin)==null?void 0:f.arrowWidth)||2,complexBg:((p=this.cynefin)==null?void 0:p.complexBg)||"#1B5E20",complicatedBg:((g=this.cynefin)==null?void 0:g.complicatedBg)||"#0D47A1",chaoticBg:((m=this.cynefin)==null?void 0:m.chaoticBg)||"#BF360C",clearBg:((y=this.cynefin)==null?void 0:y.clearBg)||"#F57F17",confusionBg:((v=this.cynefin)==null?void 0:v.confusionBg)||"#4A148C",textColor:((b=this.cynefin)==null?void 0:b.textColor)||this.textColor,labelColor:((w=this.cynefin)==null?void 0:w.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((T=this.xyChart)==null?void 0:T.titleColor)||this.primaryTextColor,dataLabelColor:((C=this.xyChart)==null?void 0:C.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((S=this.xyChart)==null?void 0:S.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((E=this.xyChart)==null?void 0:E.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((L=this.xyChart)==null?void 0:L.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((R=this.xyChart)==null?void 0:R.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((P=this.radar)==null?void 0:P.axisColor)||this.lineColor,axisStrokeWidth:((z=this.radar)==null?void 0:z.axisStrokeWidth)||2,axisLabelFontSize:((D=this.radar)==null?void 0:D.axisLabelFontSize)||12,curveOpacity:((B=this.radar)==null?void 0:B.curveOpacity)||.5,curveStrokeWidth:((W=this.radar)==null?void 0:W.curveStrokeWidth)||2,graticuleColor:((U=this.radar)==null?void 0:U.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((j=this.radar)==null?void 0:j.graticuleStrokeWidth)||1,graticuleOpacity:((V=this.radar)==null?void 0:V.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((H=this.radar)==null?void 0:H.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((Z=this.wardley)==null?void 0:Z.axisColor)||this.lineColor,axisTextColor:((K=this.wardley)==null?void 0:K.axisTextColor)||this.primaryTextColor,gridColor:((re=this.wardley)==null?void 0:re.gridColor)||this.gridColor,componentFill:((Q=this.wardley)==null?void 0:Q.componentFill)||this.mainBkg,componentStroke:((te=this.wardley)==null?void 0:te.componentStroke)||this.lineColor,componentLabelColor:((ee=this.wardley)==null?void 0:ee.componentLabelColor)||this.primaryTextColor,linkStroke:((J=this.wardley)==null?void 0:J.linkStroke)||this.lineColor,evolutionStroke:((ae=this.wardley)==null?void 0:ae.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((se=this.wardley)==null?void 0:se.annotationStroke)||this.lineColor,annotationTextColor:((fe=this.wardley)==null?void 0:fe.annotationTextColor)||this.primaryTextColor,annotationFill:((ve=this.wardley)==null?void 0:ve.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Wt(this.secondaryColor,20),this.git1=Wt(this.pie2||this.secondaryColor,20),this.git2=Wt(this.pie3||this.tertiaryColor,20),this.git3=Wt(this.pie4||Fe(this.primaryColor,{h:-30}),20),this.git4=Wt(this.pie5||Fe(this.primaryColor,{h:-60}),20),this.git5=Wt(this.pie6||Fe(this.primaryColor,{h:-90}),10),this.git6=Wt(this.pie7||Fe(this.primaryColor,{h:60}),10),this.git7=Wt(this.pie8||Fe(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Lt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Lt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||Wt("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||Wt("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||Wt("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||Wt("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||Wt(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||Wt(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Wt(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Wt(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(Ay,"Theme2"),_(Ay,"Theme"),Ay),REt=_(t=>{const e=new PEt;return e.calculate(t),e},"getThemeVariables"),OEt=(Ny=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Fe(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Fe(this.primaryColor,{h:-160}),this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Lt(this.primaryColor),this.secondaryTextColor=Lt(this.secondaryColor),this.tertiaryTextColor=Lt(this.tertiaryColor),this.lineColor=Lt(this.background),this.textColor=Lt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ru(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var e,r,n,a,i,s,o,u,h,d,f,p,g,m,y,v,b,w,x,T,C,S,E,k,A,I,L,R,O,M,P,z,D,B,W,U,j,V,Y,H,q,Z,K,re,Q,te,ee,J,ae,se,fe,ve,de,Ee,Ce,De,ce,Ie,ye;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Fe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Vt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Vt(this.tertiaryColor,40);for(let pe=0;pe<this.THEME_COLOR_LIMIT;pe++)this["cScale"+pe]=Vt(this["cScale"+pe],10),this["cScalePeer"+pe]=this["cScalePeer"+pe]||Vt(this["cScale"+pe],25);for(let pe=0;pe<this.THEME_COLOR_LIMIT;pe++)this["cScaleInv"+pe]=this["cScaleInv"+pe]||Fe(this["cScale"+pe],{h:180});for(let pe=0;pe<5;pe++)this["surface"+pe]=this["surface"+pe]||Fe(this.mainBkg,{h:30,l:-(5+pe*5)}),this["surfacePeer"+pe]=this["surfacePeer"+pe]||Fe(this.mainBkg,{h:30,l:-(7+pe*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Lt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Lt(this.labelTextColor);for(let pe=0;pe<this.THEME_COLOR_LIMIT;pe++)this["cScaleLabel"+pe]=this["cScaleLabel"+pe]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Wt(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Wt(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Fe(this.primaryColor,{h:64}),this.fillType3=Fe(this.secondaryColor,{h:64}),this.fillType4=Fe(this.primaryColor,{h:-64}),this.fillType5=Fe(this.secondaryColor,{h:-64}),this.fillType6=Fe(this.primaryColor,{h:128}),this.fillType7=Fe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Fe(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Fe(this.primaryColor,{l:-10}),this.pie5=this.pie5||Fe(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Fe(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Fe(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Fe(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Fe(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Fe(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Fe(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Fe(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=(e=this.venn1)!=null?e:Fe(this.primaryColor,{l:-30}),this.venn2=(r=this.venn2)!=null?r:Fe(this.secondaryColor,{l:-30}),this.venn3=(n=this.venn3)!=null?n:Fe(this.tertiaryColor,{l:-40}),this.venn4=(a=this.venn4)!=null?a:Fe(this.primaryColor,{h:60,l:-30}),this.venn5=(i=this.venn5)!=null?i:Fe(this.primaryColor,{h:-60,l:-30}),this.venn6=(s=this.venn6)!=null?s:Fe(this.secondaryColor,{h:60,l:-30}),this.venn7=(o=this.venn7)!=null?o:Fe(this.primaryColor,{h:120,l:-30}),this.venn8=(u=this.venn8)!=null?u:Fe(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=(h=this.vennTitleTextColor)!=null?h:this.titleColor,this.vennSetTextColor=(d=this.vennSetTextColor)!=null?d:this.textColor,this.cynefin={domainFontSize:((f=this.cynefin)==null?void 0:f.domainFontSize)||16,itemFontSize:((p=this.cynefin)==null?void 0:p.itemFontSize)||12,boundaryColor:((g=this.cynefin)==null?void 0:g.boundaryColor)||this.lineColor,boundaryWidth:((m=this.cynefin)==null?void 0:m.boundaryWidth)||2,cliffColor:((y=this.cynefin)==null?void 0:y.cliffColor)||"#8B0000",cliffWidth:((v=this.cynefin)==null?void 0:v.cliffWidth)||4,arrowColor:((b=this.cynefin)==null?void 0:b.arrowColor)||this.lineColor,arrowWidth:((w=this.cynefin)==null?void 0:w.arrowWidth)||2,complexBg:((x=this.cynefin)==null?void 0:x.complexBg)||"#E8F5E9",complicatedBg:((T=this.cynefin)==null?void 0:T.complicatedBg)||"#E3F2FD",chaoticBg:((C=this.cynefin)==null?void 0:C.chaoticBg)||"#FBE9E7",clearBg:((S=this.cynefin)==null?void 0:S.clearBg)||"#FFF8E1",confusionBg:((E=this.cynefin)==null?void 0:E.confusionBg)||"#F3E5F5",textColor:((k=this.cynefin)==null?void 0:k.textColor)||this.textColor,labelColor:((A=this.cynefin)==null?void 0:A.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((I=this.radar)==null?void 0:I.axisColor)||this.lineColor,axisStrokeWidth:((L=this.radar)==null?void 0:L.axisStrokeWidth)||2,axisLabelFontSize:((R=this.radar)==null?void 0:R.axisLabelFontSize)||12,curveOpacity:((O=this.radar)==null?void 0:O.curveOpacity)||.5,curveStrokeWidth:((M=this.radar)==null?void 0:M.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((z=this.radar)==null?void 0:z.graticuleStrokeWidth)||1,graticuleOpacity:((D=this.radar)==null?void 0:D.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((U=this.wardley)==null?void 0:U.backgroundColor)||this.background,axisColor:((j=this.wardley)==null?void 0:j.axisColor)||this.lineColor,axisTextColor:((V=this.wardley)==null?void 0:V.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:((H=this.wardley)==null?void 0:H.componentFill)||this.background,componentStroke:((q=this.wardley)==null?void 0:q.componentStroke)||this.lineColor,componentLabelColor:((Z=this.wardley)==null?void 0:Z.componentLabelColor)||this.primaryTextColor,linkStroke:((K=this.wardley)==null?void 0:K.linkStroke)||this.lineColor,evolutionStroke:((re=this.wardley)==null?void 0:re.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Q=this.wardley)==null?void 0:Q.annotationStroke)||this.lineColor,annotationTextColor:((te=this.wardley)==null?void 0:te.annotationTextColor)||this.primaryTextColor,annotationFill:((ee=this.wardley)==null?void 0:ee.annotationFill)||this.background},this.xyChart={backgroundColor:((J=this.xyChart)==null?void 0:J.backgroundColor)||this.background,titleColor:((ae=this.xyChart)==null?void 0:ae.titleColor)||this.primaryTextColor,dataLabelColor:((se=this.xyChart)==null?void 0:se.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((fe=this.xyChart)==null?void 0:fe.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((ve=this.xyChart)==null?void 0:ve.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((de=this.xyChart)==null?void 0:de.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Ee=this.xyChart)==null?void 0:Ee.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Ce=this.xyChart)==null?void 0:Ce.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((De=this.xyChart)==null?void 0:De.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((ce=this.xyChart)==null?void 0:ce.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Ie=this.xyChart)==null?void 0:Ie.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((ye=this.xyChart)==null?void 0:ye.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Fe(this.primaryColor,{h:-30}),this.git4=this.git4||Fe(this.primaryColor,{h:-60}),this.git5=this.git5||Fe(this.primaryColor,{h:-90}),this.git6=this.git6||Fe(this.primaryColor,{h:60}),this.git7=this.git7||Fe(this.primaryColor,{h:120}),this.darkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Vt(Lt(this.git0),25),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Lt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Lt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(Ny,"Theme3"),_(Ny,"Theme"),Ny),Qd=_(t=>{const e=new OEt;return e.calculate(t),e},"getThemeVariables"),DEt=(Iy=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Wt("#cde498",10),this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Lt(this.primaryColor),this.secondaryTextColor=Lt(this.secondaryColor),this.tertiaryTextColor=Lt(this.primaryColor),this.lineColor=Lt(this.background),this.textColor=Lt(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var e,r,n,a,i,s,o,u,h,d,f,p,g,m,y,v,b,w,x,T,C,S,E,k,A,I,L,R,O,M,P,z,D,B,W,U,j,V,Y,H,q,Z,K,re,Q,te,ee,J,ae,se,fe,ve,de,Ee,Ce,De,ce,Ie,ye;this.actorBorder=Vt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Fe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Vt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Vt(this.tertiaryColor,40);for(let pe=0;pe<this.THEME_COLOR_LIMIT;pe++)this["cScale"+pe]=Vt(this["cScale"+pe],10),this["cScalePeer"+pe]=this["cScalePeer"+pe]||Vt(this["cScale"+pe],25);for(let pe=0;pe<this.THEME_COLOR_LIMIT;pe++)this["cScaleInv"+pe]=this["cScaleInv"+pe]||Fe(this["cScale"+pe],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let pe=0;pe<this.THEME_COLOR_LIMIT;pe++)this["cScaleLabel"+pe]=this["cScaleLabel"+pe]||this.scaleLabelColor;for(let pe=0;pe<5;pe++)this["surface"+pe]=this["surface"+pe]||Fe(this.mainBkg,{h:30,s:-30,l:-(5+pe*5)}),this["surfacePeer"+pe]=this["surfacePeer"+pe]||Fe(this.mainBkg,{h:30,s:-30,l:-(8+pe*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Wt(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Fe(this.primaryColor,{h:64}),this.fillType3=Fe(this.secondaryColor,{h:64}),this.fillType4=Fe(this.primaryColor,{h:-64}),this.fillType5=Fe(this.secondaryColor,{h:-64}),this.fillType6=Fe(this.primaryColor,{h:128}),this.fillType7=Fe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Fe(this.primaryColor,{l:-30}),this.pie5=this.pie5||Fe(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Fe(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Fe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Fe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Fe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Fe(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Fe(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Fe(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=(e=this.venn1)!=null?e:Fe(this.primaryColor,{l:-30}),this.venn2=(r=this.venn2)!=null?r:Fe(this.secondaryColor,{l:-30}),this.venn3=(n=this.venn3)!=null?n:Fe(this.tertiaryColor,{l:-30}),this.venn4=(a=this.venn4)!=null?a:Fe(this.primaryColor,{h:60,l:-30}),this.venn5=(i=this.venn5)!=null?i:Fe(this.primaryColor,{h:-60,l:-30}),this.venn6=(s=this.venn6)!=null?s:Fe(this.secondaryColor,{h:60,l:-30}),this.venn7=(o=this.venn7)!=null?o:Fe(this.primaryColor,{h:120,l:-30}),this.venn8=(u=this.venn8)!=null?u:Fe(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=(h=this.vennTitleTextColor)!=null?h:this.titleColor,this.vennSetTextColor=(d=this.vennSetTextColor)!=null?d:this.textColor,this.cynefin={domainFontSize:((f=this.cynefin)==null?void 0:f.domainFontSize)||16,itemFontSize:((p=this.cynefin)==null?void 0:p.itemFontSize)||12,boundaryColor:((g=this.cynefin)==null?void 0:g.boundaryColor)||this.lineColor,boundaryWidth:((m=this.cynefin)==null?void 0:m.boundaryWidth)||2,cliffColor:((y=this.cynefin)==null?void 0:y.cliffColor)||"#8B4513",cliffWidth:((v=this.cynefin)==null?void 0:v.cliffWidth)||4,arrowColor:((b=this.cynefin)==null?void 0:b.arrowColor)||this.lineColor,arrowWidth:((w=this.cynefin)==null?void 0:w.arrowWidth)||2,complexBg:((x=this.cynefin)==null?void 0:x.complexBg)||"#C8E6C9",complicatedBg:((T=this.cynefin)==null?void 0:T.complicatedBg)||"#DCEDC8",chaoticBg:((C=this.cynefin)==null?void 0:C.chaoticBg)||"#FFE0B2",clearBg:((S=this.cynefin)==null?void 0:S.clearBg)||"#FFF9C4",confusionBg:((E=this.cynefin)==null?void 0:E.confusionBg)||"#D7CCC8",textColor:((k=this.cynefin)==null?void 0:k.textColor)||this.textColor,labelColor:((A=this.cynefin)==null?void 0:A.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((I=this.radar)==null?void 0:I.axisColor)||this.lineColor,axisStrokeWidth:((L=this.radar)==null?void 0:L.axisStrokeWidth)||2,axisLabelFontSize:((R=this.radar)==null?void 0:R.axisLabelFontSize)||12,curveOpacity:((O=this.radar)==null?void 0:O.curveOpacity)||.5,curveStrokeWidth:((M=this.radar)==null?void 0:M.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((z=this.radar)==null?void 0:z.graticuleStrokeWidth)||1,graticuleOpacity:((D=this.radar)==null?void 0:D.graticuleOpacity)||.3,legendBoxSize:((B=this.radar)==null?void 0:B.legendBoxSize)||12,legendFontSize:((W=this.radar)==null?void 0:W.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((U=this.wardley)==null?void 0:U.backgroundColor)||this.background,axisColor:((j=this.wardley)==null?void 0:j.axisColor)||this.lineColor,axisTextColor:((V=this.wardley)==null?void 0:V.axisTextColor)||this.primaryTextColor,gridColor:((Y=this.wardley)==null?void 0:Y.gridColor)||this.gridColor,componentFill:((H=this.wardley)==null?void 0:H.componentFill)||this.background,componentStroke:((q=this.wardley)==null?void 0:q.componentStroke)||this.lineColor,componentLabelColor:((Z=this.wardley)==null?void 0:Z.componentLabelColor)||this.primaryTextColor,linkStroke:((K=this.wardley)==null?void 0:K.linkStroke)||this.lineColor,evolutionStroke:((re=this.wardley)==null?void 0:re.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Q=this.wardley)==null?void 0:Q.annotationStroke)||this.lineColor,annotationTextColor:((te=this.wardley)==null?void 0:te.annotationTextColor)||this.primaryTextColor,annotationFill:((ee=this.wardley)==null?void 0:ee.annotationFill)||this.background},this.xyChart={backgroundColor:((J=this.xyChart)==null?void 0:J.backgroundColor)||this.background,titleColor:((ae=this.xyChart)==null?void 0:ae.titleColor)||this.primaryTextColor,dataLabelColor:((se=this.xyChart)==null?void 0:se.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((fe=this.xyChart)==null?void 0:fe.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((ve=this.xyChart)==null?void 0:ve.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((de=this.xyChart)==null?void 0:de.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Ee=this.xyChart)==null?void 0:Ee.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((Ce=this.xyChart)==null?void 0:Ce.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((De=this.xyChart)==null?void 0:De.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((ce=this.xyChart)==null?void 0:ce.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Ie=this.xyChart)==null?void 0:Ie.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((ye=this.xyChart)==null?void 0:ye.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Fe(this.primaryColor,{h:-30}),this.git4=this.git4||Fe(this.primaryColor,{h:-60}),this.git5=this.git5||Fe(this.primaryColor,{h:-90}),this.git6=this.git6||Fe(this.primaryColor,{h:60}),this.git7=this.git7||Fe(this.primaryColor,{h:120}),this.darkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Lt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Lt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(Iy,"Theme4"),_(Iy,"Theme"),Iy),FEt=_(t=>{const e=new DEt;return e.calculate(t),e},"getThemeVariables"),BEt=(Ly=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Wt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Fe(this.primaryColor,{h:-160}),this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Lt(this.primaryColor),this.secondaryTextColor=Lt(this.secondaryColor),this.tertiaryTextColor=Lt(this.tertiaryColor),this.lineColor=Lt(this.background),this.textColor=Lt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||Wt(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var e,r,n,a,i,s,o,u,h,d,f,p,g,m,y,v,b,w,x,T,C,S,E,k,A,I,L,R,O,M,P,z,D,B,W,U,j,V,Y,H,q,Z,K,re,Q,te,ee,J,ae,se,fe,ve;this.secondBkg=Wt(this.contrast,55),this.border2=this.contrast,this.actorBorder=Wt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let de=0;de<this.THEME_COLOR_LIMIT;de++)this["cScaleInv"+de]=this["cScaleInv"+de]||Lt(this["cScale"+de]);for(let de=0;de<this.THEME_COLOR_LIMIT;de++)this.darkMode?this["cScalePeer"+de]=this["cScalePeer"+de]||Wt(this["cScale"+de],10):this["cScalePeer"+de]=this["cScalePeer"+de]||Vt(this["cScale"+de],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let de=0;de<this.THEME_COLOR_LIMIT;de++)this["cScaleLabel"+de]=this["cScaleLabel"+de]||this.scaleLabelColor;for(let de=0;de<5;de++)this["surface"+de]=this["surface"+de]||Fe(this.mainBkg,{l:-(5+de*5)}),this["surfacePeer"+de]=this["surfacePeer"+de]||Fe(this.mainBkg,{l:-(8+de*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=Wt(this.contrast,30),this.sectionBkgColor2=Wt(this.contrast,30),this.taskBorderColor=Vt(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Wt(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Vt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Fe(this.primaryColor,{h:64}),this.fillType3=Fe(this.secondaryColor,{h:64}),this.fillType4=Fe(this.primaryColor,{h:-64}),this.fillType5=Fe(this.secondaryColor,{h:-64}),this.fillType6=Fe(this.primaryColor,{h:128}),this.fillType7=Fe(this.secondaryColor,{h:128});for(let de=0;de<this.THEME_COLOR_LIMIT;de++)this["pie"+de]=this["cScale"+de];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let de=0;de<8;de++)this["venn"+(de+1)]=(e=this["venn"+(de+1)])!=null?e:this["cScale"+de];this.vennTitleTextColor=(r=this.vennTitleTextColor)!=null?r:this.titleColor,this.vennSetTextColor=(n=this.vennSetTextColor)!=null?n:this.textColor,this.cynefin={domainFontSize:((a=this.cynefin)==null?void 0:a.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((u=this.cynefin)==null?void 0:u.cliffColor)||"#8B0000",cliffWidth:((h=this.cynefin)==null?void 0:h.cliffWidth)||4,arrowColor:((d=this.cynefin)==null?void 0:d.arrowColor)||this.lineColor,arrowWidth:((f=this.cynefin)==null?void 0:f.arrowWidth)||2,complexBg:((p=this.cynefin)==null?void 0:p.complexBg)||"#E8F5E9",complicatedBg:((g=this.cynefin)==null?void 0:g.complicatedBg)||"#E3F2FD",chaoticBg:((m=this.cynefin)==null?void 0:m.chaoticBg)||"#FBE9E7",clearBg:((y=this.cynefin)==null?void 0:y.clearBg)||"#FFF8E1",confusionBg:((v=this.cynefin)==null?void 0:v.confusionBg)||"#F3E5F5",textColor:((b=this.cynefin)==null?void 0:b.textColor)||this.textColor,labelColor:((w=this.cynefin)==null?void 0:w.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((T=this.xyChart)==null?void 0:T.titleColor)||this.primaryTextColor,dataLabelColor:((C=this.xyChart)==null?void 0:C.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((S=this.xyChart)==null?void 0:S.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((E=this.xyChart)==null?void 0:E.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((k=this.xyChart)==null?void 0:k.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((L=this.xyChart)==null?void 0:L.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((R=this.xyChart)==null?void 0:R.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((O=this.xyChart)==null?void 0:O.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((M=this.xyChart)==null?void 0:M.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((P=this.radar)==null?void 0:P.axisColor)||this.lineColor,axisStrokeWidth:((z=this.radar)==null?void 0:z.axisStrokeWidth)||2,axisLabelFontSize:((D=this.radar)==null?void 0:D.axisLabelFontSize)||12,curveOpacity:((B=this.radar)==null?void 0:B.curveOpacity)||.5,curveStrokeWidth:((W=this.radar)==null?void 0:W.curveStrokeWidth)||2,graticuleColor:((U=this.radar)==null?void 0:U.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((j=this.radar)==null?void 0:j.graticuleStrokeWidth)||1,graticuleOpacity:((V=this.radar)==null?void 0:V.graticuleOpacity)||.3,legendBoxSize:((Y=this.radar)==null?void 0:Y.legendBoxSize)||12,legendFontSize:((H=this.radar)==null?void 0:H.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((Z=this.wardley)==null?void 0:Z.axisColor)||this.lineColor,axisTextColor:((K=this.wardley)==null?void 0:K.axisTextColor)||this.primaryTextColor,gridColor:((re=this.wardley)==null?void 0:re.gridColor)||this.gridColor,componentFill:((Q=this.wardley)==null?void 0:Q.componentFill)||this.background,componentStroke:((te=this.wardley)==null?void 0:te.componentStroke)||this.lineColor,componentLabelColor:((ee=this.wardley)==null?void 0:ee.componentLabelColor)||this.primaryTextColor,linkStroke:((J=this.wardley)==null?void 0:J.linkStroke)||this.lineColor,evolutionStroke:((ae=this.wardley)==null?void 0:ae.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((se=this.wardley)==null?void 0:se.annotationStroke)||this.lineColor,annotationTextColor:((fe=this.wardley)==null?void 0:fe.annotationTextColor)||this.primaryTextColor,annotationFill:((ve=this.wardley)==null?void 0:ve.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Vt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Fe(this.primaryColor,{h:-30}),this.git4=this.pie5||Fe(this.primaryColor,{h:-60}),this.git5=this.pie6||Fe(this.primaryColor,{h:-90}),this.git6=this.pie7||Fe(this.primaryColor,{h:60}),this.git7=this.pie8||Fe(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(Ly,"Theme5"),_(Ly,"Theme"),Ly),zEt=_(t=>{const e=new BEt;return e.calculate(t),e},"getThemeVariables"),HEt=($y=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var i,s,o,u,h,d,f,p,g,m,y,v,b;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Lt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Lt(this.tertiaryColor),this.lineColor=this.lineColor||Lt(this.background),this.arrowheadColor=this.arrowheadColor||Lt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Lt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",r="#E9E9F1",n=Fe(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Wt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||Fe(e,{h:30}),this.cScale4=this.cScale4||Fe(e,{h:60}),this.cScale5=this.cScale5||Fe(e,{h:90}),this.cScale6=this.cScale6||Fe(e,{h:120}),this.cScale7=this.cScale7||Fe(e,{h:150}),this.cScale8=this.cScale8||Fe(e,{h:210,l:150}),this.cScale9=this.cScale9||Fe(e,{h:270}),this.cScale10=this.cScale10||Fe(e,{h:300}),this.cScale11=this.cScale11||Fe(e,{h:330}),this.darkMode)for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=Vt(this["cScale"+w],75);else for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScale"+w]=Vt(this["cScale"+w],25);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleInv"+w]=this["cScaleInv"+w]||Lt(this["cScale"+w]);for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this.darkMode?this["cScalePeer"+w]=this["cScalePeer"+w]||Wt(this["cScale"+w],10):this["cScalePeer"+w]=this["cScalePeer"+w]||Vt(this["cScale"+w],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let w=0;w<this.THEME_COLOR_LIMIT;w++)this["cScaleLabel"+w]=this["cScaleLabel"+w]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let w=0;w<5;w++)this["surface"+w]=this["surface"+w]||Fe(this.mainBkg,{h:180,s:-15,l:a*(5+w*3)}),this["surfacePeer"+w]=this["surfacePeer"+w]||Fe(this.mainBkg,{h:180,s:-15,l:a*(8+w*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||Fe(e,{h:64}),this.fillType3=this.fillType3||Fe(r,{h:64}),this.fillType4=this.fillType4||Fe(e,{h:-64}),this.fillType5=this.fillType5||Fe(r,{h:-64}),this.fillType6=this.fillType6||Fe(e,{h:128}),this.fillType7=this.fillType7||Fe(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||Fe(e,{l:-10}),this.pie5=this.pie5||Fe(r,{l:-10}),this.pie6=this.pie6||Fe(n,{l:-10}),this.pie7=this.pie7||Fe(e,{h:60,l:-10}),this.pie8=this.pie8||Fe(e,{h:-60,l:-10}),this.pie9=this.pie9||Fe(e,{h:120,l:0}),this.pie10=this.pie10||Fe(e,{h:60,l:-20}),this.pie11=this.pie11||Fe(e,{h:-60,l:-20}),this.pie12=this.pie12||Fe(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=(i=this.vennTitleTextColor)!=null?i:this.titleColor,this.vennSetTextColor=(s=this.vennSetTextColor)!=null?s:this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||Fe(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((u=this.xyChart)==null?void 0:u.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||Fe(e,{h:-30}),this.git4=this.git4||Fe(e,{h:-60}),this.git5=this.git5||Fe(e,{h:-90}),this.git6=this.git6||Fe(e,{h:60}),this.git7=this.git7||Fe(e,{h:120}),this.darkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l($y,"Theme6"),_($y,"Theme"),$y),WEt=_(t=>{const e=new HEt;return e.calculate(t),e},"getThemeVariables"),VEt=(My=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Wt(this.primaryColor,16),this.tertiaryColor=Fe(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.background),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Lt(this.primaryColor),this.secondaryTextColor=Lt(this.secondaryColor),this.tertiaryTextColor=Lt(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Wt(Lt("#323D47"),10),this.border1="#ccc",this.border2=Ru(255,255,255,.25),this.arrowheadColor=Lt(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,n,a,i,s,o,u,h,d,f,p,g,m;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Lt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Lt(this.tertiaryColor),this.lineColor=this.lineColor||Lt(this.background),this.arrowheadColor=this.arrowheadColor||Lt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Lt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Wt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Fe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Fe(this.primaryColor,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=Vt(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=Vt(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||Lt(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||Wt(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||Vt(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||Fe(this.mainBkg,{h:180,s:-15,l:e*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||Fe(this.mainBkg,{h:180,s:-15,l:e*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Fe(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Fe(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Fe(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Fe(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Fe(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Fe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Fe(this.primaryColor,{l:-10}),this.pie5=this.pie5||Fe(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Fe(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Fe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Fe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Fe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Fe(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Fe(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Fe(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=(r=this.vennTitleTextColor)!=null?r:this.titleColor,this.vennSetTextColor=(n=this.vennSetTextColor)!=null?n:this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(My,"Theme7"),_(My,"Theme"),My),GEt=_(t=>{const e=new VEt;return e.calculate(t),e},"getThemeVariables"),qEt=(Py=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=jr("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var i,s,o,u,h,d,f,p,g,m,y,v,b,w;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||Fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Lt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Lt(this.tertiaryColor),this.lineColor=this.lineColor||Lt(this.background),this.arrowheadColor=this.arrowheadColor||Lt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Lt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",r="#E9E9F1",n=Fe(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Wt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=this.mainBkg;if(this.darkMode)for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=Vt(this["cScale"+x],75);else for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScale"+x]=Vt(this["cScale"+x],25);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||Lt(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||Wt(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||Vt(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||Fe(this.mainBkg,{h:180,s:-15,l:a*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||Fe(this.mainBkg,{h:180,s:-15,l:a*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||Fe(e,{h:64}),this.fillType3=this.fillType3||Fe(r,{h:64}),this.fillType4=this.fillType4||Fe(e,{h:-64}),this.fillType5=this.fillType5||Fe(r,{h:-64}),this.fillType6=this.fillType6||Fe(e,{h:128}),this.fillType7=this.fillType7||Fe(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||Fe(e,{l:-10}),this.pie5=this.pie5||Fe(r,{l:-10}),this.pie6=this.pie6||Fe(n,{l:-10}),this.pie7=this.pie7||Fe(e,{h:60,l:-10}),this.pie8=this.pie8||Fe(e,{h:-60,l:-10}),this.pie9=this.pie9||Fe(e,{h:120,l:0}),this.pie10=this.pie10||Fe(e,{h:60,l:-20}),this.pie11=this.pie11||Fe(e,{h:-60,l:-20}),this.pie12=this.pie12||Fe(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=(i=this.vennTitleTextColor)!=null?i:this.titleColor,this.vennSetTextColor=(s=this.vennSetTextColor)!=null?s:this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||Fe(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((u=this.xyChart)==null?void 0:u.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||Fe(e,{h:-30}),this.git4=this.git4||Fe(e,{h:-60}),this.git5=this.git5||Fe(e,{h:-90}),this.git6=this.git6||Fe(e,{h:60}),this.git7=this.git7||Fe(e,{h:120}),this.darkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=(w=this.commitLineColor)!=null?w:"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(Py,"Theme8"),_(Py,"Theme"),Py),YEt=_(t=>{const e=new qEt;return e.calculate(t),e},"getThemeVariables"),UEt=(Ry=class{constructor(){var e,r;this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Wt(this.primaryColor,16),this.tertiaryColor=Fe(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.background),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Lt(this.primaryColor),this.secondaryTextColor=Lt(this.secondaryColor),this.tertiaryTextColor=Lt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Wt(Lt("#323D47"),10),this.border1="#ccc",this.border2=Ru(255,255,255,.25),this.arrowheadColor=Lt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=(e=this.noteBkgColor)!=null?e:"#FEF9C3",this.noteTextColor=(r=this.noteTextColor)!=null?r:"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,n,a,i,s,o,u,h,d,f,p,g,m,y;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||Fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Lt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Lt(this.tertiaryColor),this.lineColor=this.lineColor||Lt(this.background),this.arrowheadColor=this.arrowheadColor||Lt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Lt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Wt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Fe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Fe(this.primaryColor,{h:330}),this.darkMode)for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=Vt(this["cScale"+v],75);else for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScale"+v]=Vt(this["cScale"+v],25);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||Lt(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||Wt(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||Vt(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=this["cScaleLabel"+v]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||Fe(this.mainBkg,{h:180,s:-15,l:e*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||Fe(this.mainBkg,{h:180,s:-15,l:e*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Fe(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Fe(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Fe(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Fe(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Fe(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Fe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Fe(this.primaryColor,{l:-10}),this.pie5=this.pie5||Fe(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Fe(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Fe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Fe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Fe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Fe(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Fe(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Fe(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=(r=this.vennTitleTextColor)!=null?r:this.titleColor,this.vennSetTextColor=(n=this.vennSetTextColor)!=null?n:this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Fe(this.primaryColor,{h:-30}),this.git4=this.git4||Fe(this.primaryColor,{h:-60}),this.git5=this.git5||Fe(this.primaryColor,{h:-90}),this.git6=this.git6||Fe(this.primaryColor,{h:60}),this.git7=this.git7||Fe(this.primaryColor,{h:120}),this.darkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=(y=this.commitLineColor)!=null?y:"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(Ry,"Theme9"),_(Ry,"Theme"),Ry),jEt=_(t=>{const e=new UEt;return e.calculate(t),e},"getThemeVariables"),KEt=(Oy=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=jr(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var i,s,o,u,h,d,f,p,g,m,y,v,b,w;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||Fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Lt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Lt(this.tertiaryColor),this.lineColor=this.lineColor||Lt(this.background),this.arrowheadColor=this.arrowheadColor||Lt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Lt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const e="#ECECFE",r="#E9E9F1",n=Fe(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Wt(e,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleInv"+x]=this["cScaleInv"+x]||Lt(this["cScale"+x]);for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this.darkMode?this["cScalePeer"+x]=this["cScalePeer"+x]||Wt(this["cScale"+x],10):this["cScalePeer"+x]=this["cScalePeer"+x]||Vt(this["cScale"+x],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let x=0;x<this.THEME_COLOR_LIMIT;x++)this["cScaleLabel"+x]=this["cScaleLabel"+x]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let x=0;x<5;x++)this["surface"+x]=this["surface"+x]||Fe(this.mainBkg,{h:180,s:-15,l:a*(5+x*3)}),this["surfacePeer"+x]=this["surfacePeer"+x]||Fe(this.mainBkg,{h:180,s:-15,l:a*(8+x*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||Fe(e,{h:64}),this.fillType3=this.fillType3||Fe(r,{h:64}),this.fillType4=this.fillType4||Fe(e,{h:-64}),this.fillType5=this.fillType5||Fe(r,{h:-64}),this.fillType6=this.fillType6||Fe(e,{h:128}),this.fillType7=this.fillType7||Fe(r,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||r,this.pie3=this.pie3||n,this.pie4=this.pie4||Fe(e,{l:-10}),this.pie5=this.pie5||Fe(r,{l:-10}),this.pie6=this.pie6||Fe(n,{l:-10}),this.pie7=this.pie7||Fe(e,{h:60,l:-10}),this.pie8=this.pie8||Fe(e,{h:-60,l:-10}),this.pie9=this.pie9||Fe(e,{h:120,l:0}),this.pie10=this.pie10||Fe(e,{h:60,l:-20}),this.pie11=this.pie11||Fe(e,{h:-60,l:-20}),this.pie12=this.pie12||Fe(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=(i=this.vennTitleTextColor)!=null?i:this.titleColor,this.vennSetTextColor=(s=this.vennSetTextColor)!=null?s:this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||Fe(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((u=this.xyChart)==null?void 0:u.titleColor)||this.primaryTextColor,xAxisTitleColor:((h=this.xyChart)==null?void 0:h.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((d=this.xyChart)==null?void 0:d.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((f=this.xyChart)==null?void 0:f.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((p=this.xyChart)==null?void 0:p.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((g=this.xyChart)==null?void 0:g.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((m=this.xyChart)==null?void 0:m.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((y=this.xyChart)==null?void 0:y.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((v=this.xyChart)==null?void 0:v.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((b=this.xyChart)==null?void 0:b.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||r,this.git2=this.git2||n,this.git3=this.git3||Fe(e,{h:-30}),this.git4=this.git4||Fe(e,{h:-60}),this.git5=this.git5||Fe(e,{h:-90}),this.git6=this.git6||Fe(e,{h:60}),this.git7=this.git7||Fe(e,{h:120}),this.darkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=(w=this.commitLineColor)!=null?w:"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(Oy,"Theme10"),_(Oy,"Theme"),Oy),XEt=_(t=>{const e=new KEt;return e.calculate(t),e},"getThemeVariables"),ZEt=(Dy=class{constructor(){var e,r;this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Wt(this.primaryColor,16),this.tertiaryColor=Fe(this.primaryColor,{h:-160}),this.primaryBorderColor=Lt(this.background),this.secondaryBorderColor=jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=jr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Lt(this.primaryColor),this.secondaryTextColor=Lt(this.secondaryColor),this.tertiaryTextColor=Lt(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Wt(Lt("#323D47"),10),this.border1="#ccc",this.border2=Ru(255,255,255,.25),this.arrowheadColor=Lt(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=(e=this.noteBkgColor)!=null?e:"#FEF9C3",this.noteTextColor=(r=this.noteTextColor)!=null?r:"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,n,a,i,s,o,u,h,d,f,p,g,m,y;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||Fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||jr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||jr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||jr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||jr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Lt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Lt(this.tertiaryColor),this.lineColor=this.lineColor||Lt(this.background),this.arrowheadColor=this.arrowheadColor||Lt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Lt(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Wt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleInv"+v]=this["cScaleInv"+v]||Lt(this["cScale"+v]);for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this.darkMode?this["cScalePeer"+v]=this["cScalePeer"+v]||Wt(this["cScale"+v],10):this["cScalePeer"+v]=this["cScalePeer"+v]||Vt(this["cScale"+v],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let v=0;v<this.THEME_COLOR_LIMIT;v++)this["cScaleLabel"+v]=Vt(this["cScale"+v],75);const e=this.darkMode?-4:-1;for(let v=0;v<5;v++)this["surface"+v]=this["surface"+v]||Fe(this.mainBkg,{h:180,s:-15,l:e*(5+v*3)}),this["surfacePeer"+v]=this["surfacePeer"+v]||Fe(this.mainBkg,{h:180,s:-15,l:e*(8+v*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Fe(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Fe(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Fe(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Fe(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Fe(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Fe(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Fe(this.primaryColor,{l:-10}),this.pie5=this.pie5||Fe(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Fe(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Fe(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Fe(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Fe(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Fe(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Fe(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Fe(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=(r=this.vennTitleTextColor)!=null?r:this.titleColor,this.vennSetTextColor=(n=this.vennSetTextColor)!=null?n:this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Fe(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Fe(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Fe(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Fe(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Fe(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Fe(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ko(this.quadrant1Fill)?Wt(this.quadrant1Fill):Vt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((u=this.xyChart)==null?void 0:u.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((d=this.xyChart)==null?void 0:d.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((f=this.xyChart)==null?void 0:f.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Vt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Fe(this.primaryColor,{h:-30}),this.git4=this.git4||Fe(this.primaryColor,{h:-60}),this.git5=this.git5||Fe(this.primaryColor,{h:-90}),this.git6=this.git6||Fe(this.primaryColor,{h:60}),this.git7=this.git7||Fe(this.primaryColor,{h:120}),this.darkMode?(this.git0=Wt(this.git0,25),this.git1=Wt(this.git1,25),this.git2=Wt(this.git2,25),this.git3=Wt(this.git3,25),this.git4=Wt(this.git4,25),this.git5=Wt(this.git5,25),this.git6=Wt(this.git6,25),this.git7=Wt(this.git7,25)):(this.git0=Vt(this.git0,25),this.git1=Vt(this.git1,25),this.git2=Vt(this.git2,25),this.git3=Vt(this.git3,25),this.git4=Vt(this.git4,25),this.git5=Vt(this.git5,25),this.git6=Vt(this.git6,25),this.git7=Vt(this.git7,25)),this.gitInv0=this.gitInv0||Lt(this.git0),this.gitInv1=this.gitInv1||Lt(this.git1),this.gitInv2=this.gitInv2||Lt(this.git2),this.gitInv3=this.gitInv3||Lt(this.git3),this.gitInv4=this.gitInv4||Lt(this.git4),this.gitInv5=this.gitInv5||Lt(this.git5),this.gitInv6=this.gitInv6||Lt(this.git6),this.gitInv7=this.gitInv7||Lt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=(y=this.commitLineColor)!=null?y:"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||$h,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Mh}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},l(Dy,"Theme11"),_(Dy,"Theme"),Dy),QEt=_(t=>{const e=new ZEt;return e.calculate(t),e},"getThemeVariables"),Jd={base:{getThemeVariables:MEt},dark:{getThemeVariables:REt},default:{getThemeVariables:Qd},forest:{getThemeVariables:FEt},neutral:{getThemeVariables:zEt},neo:{getThemeVariables:WEt},"neo-dark":{getThemeVariables:GEt},redux:{getThemeVariables:YEt},"redux-dark":{getThemeVariables:jEt},"redux-color":{getThemeVariables:XEt},"redux-dark-color":{getThemeVariables:QEt}},no={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},qge=Ne(X({},no),{deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Jd.default.getThemeVariables(),sequence:Ne(X({},no.sequence),{messageFont:_(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:_(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:_(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")}),class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:Ne(X({},no.gantt),{tickInterval:void 0,useWidth:void 0}),c4:Ne(X({},no.c4),{useWidth:void 0,personFont:_(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:Ne(X({},no.flowchart),{inheritDir:!1}),external_personFont:_(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:_(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:_(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:_(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:_(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:_(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:_(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:_(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:_(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:_(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:_(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:_(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:_(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:_(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:_(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:_(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:_(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:_(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:_(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:_(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:_(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")}),pie:Ne(X({},no.pie),{useWidth:984}),xyChart:Ne(X({},no.xyChart),{useWidth:void 0}),requirement:Ne(X({},no.requirement),{useWidth:void 0}),packet:X({},no.packet),eventmodeling:X({},no.eventmodeling),treeView:Ne(X({},no.treeView),{useWidth:void 0}),radar:X({},no.radar),railroad:Ne(X({},no.railroad),{fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0}),ishikawa:X({},no.ishikawa),sankey:Ne(X({},no.sankey),{nodeColors:void 0}),treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:X({},no.venn),cynefin:X({},no.cynefin)}),Yge=_((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...Yge(t[n],"")]:[...r,e+n],[]),"keyify"),JEt=new Set(Yge(qge,"")),hn=qge,eCt={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},tCt=_((t,e)=>{for(const r of Object.keys(t)){const n=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof n!="string"||!e.test(n))&&(Le.debug("sanitize deleting dictionary entry:",r,n),delete t[r])}},"sanitizeDictionaryConfig"),b8=_(t=>{if(Le.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>b8(e));return}for(const e of Object.keys(t)){if(Le.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!JEt.has(e)||t[e]==null){Le.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){const n=eCt[e];n?tCt(t[e],n):(Le.debug("sanitizing object",e),b8(t[e]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(Le.debug("sanitizing css option",e),t[e]=Uge(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}Le.debug("After sanitization",t)}},"sanitizeDirective"),Uge=_(t=>{let e=0,r=0;for(const n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),vw=Object.freeze(hn),Ph=_(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Bl=$i({},vw),x8,am=[],A4=$i({},vw),w8=_((t,e)=>{let r=$i({},t),n={};for(const a of e)Xge(a),n=$i(n,a);if(r=$i(r,n),n.theme&&n.theme in Jd){const a=$i({},x8),i=$i(a.themeVariables||{},n.themeVariables);r.theme&&r.theme in Jd&&(r.themeVariables=Jd[r.theme].getThemeVariables(i))}return A4=r,Jge(A4),A4},"updateCurrentConfig"),rCt=_(t=>(Bl=$i({},vw),Bl=$i(Bl,t),t.theme&&Jd[t.theme]&&(Bl.themeVariables=Jd[t.theme].getThemeVariables(t.themeVariables)),w8(Bl,am),Bl),"setSiteConfig"),nCt=_(t=>{x8=$i({},t)},"saveConfigFromInitialize"),aCt=_(t=>(Bl=$i(Bl,t),w8(Bl,am),Bl),"updateSiteConfig"),jge=_(()=>$i({},Bl),"getSiteConfig"),Kge=_(t=>(Jge(t),$i(A4,t),Ar()),"setConfig"),Ar=_(()=>$i({},A4),"getConfig"),Xge=_(t=>{var e;t&&(["secure",...(e=Bl.secure)!=null?e:[]].forEach(r=>{Object.hasOwn(t,r)&&(Le.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.startsWith("__")&&delete t[r]}),Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].includes("<")||t[r].includes(">")||t[r].includes("url(data:"))&&delete t[r],typeof t[r]=="object"&&Xge(t[r])}))},"sanitize"),iCt=_(t=>{var e;b8(t),t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables=Ne(X({},t.themeVariables),{fontFamily:t.fontFamily})),am.push(t),w8(Bl,am)},"addDirective"),T8=_((t=Bl)=>{am=[],w8(t,am)},"reset"),sCt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Zge={},Qge=_(t=>{Zge[t]||(Le.warn(sCt[t]),Zge[t]=!0)},"issueWarning"),Jge=_(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Qge("LAZY_LOAD_DEPRECATED")},"checkConfig"),eme=_(()=>{let t={};x8&&(t=$i(t,x8));for(const e of am)t=$i(t,e);return t},"getUserDefinedConfig"),ta=_(t=>{var e,r,n,a;return((e=t.flowchart)==null?void 0:e.htmlLabels)!=null&&Qge("FLOWCHART_HTML_LABELS_DEPRECATED"),Ph((a=(n=t.htmlLabels)!=null?n:(r=t.flowchart)==null?void 0:r.htmlLabels)!=null?a:!0)},"getEffectiveHtmlLabels"),tme=new RegExp("^([^\\S\\n\\r]*)-{3}\\s*[\\n\\r](.*?)[\\n\\r]\\1-{3}\\s*[\\n\\r]+","s"),N4=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,oCt=/\s*%%.*\n/gm,rme=(Fy=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},l(Fy,"UnknownDiagramError"),_(Fy,"UnknownDiagramError"),Fy),im={},kz=_(function(t,e){t=t.replace(tme,"").replace(N4,"").replace(oCt,`
|
||
`);for(const[r,{detector:n}]of Object.entries(im))if(n(t,e))return r;throw new rme(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),Az=_((...t)=>{for(const{id:e,detector:r,loader:n}of t)nme(e,r,n)},"registerLazyLoadedDiagrams"),nme=_((t,e,r)=>{im[t]&&Le.warn(`Detector with key ${t} already exists. Overwriting.`),im[t]={detector:e,loader:r},Le.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),lCt=_(t=>im[t].loader,"getDiagramLoader"),bw=/<br\s*\/?>/gi,cCt=_(t=>t?ome(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),uCt=(()=>{let t=!1;return()=>{t||(ame(),t=!0)}})();function ame(){const t="data-temp-href-target";Zd.addHook("beforeSanitizeAttributes",e=>{var r;e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,(r=e.getAttribute("target"))!=null?r:"")}),Zd.addHook("afterSanitizeAttributes",e=>{var r;e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",(r=e.getAttribute(t))!=null?r:""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}l(ame,"setupDompurifyHooks"),_(ame,"setupDompurifyHooks");var ime=_(t=>(uCt(),Zd.sanitize(t)),"removeScript"),sme=_((t,e)=>{if(ta(e)){const r=e.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?t=ime(t):r!=="loose"&&(t=ome(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=pCt(t))}return t},"sanitizeMore"),mn=_((t,e)=>t&&(e.dompurifyConfig?t=Zd.sanitize(sme(t,e),e.dompurifyConfig).toString():t=Zd.sanitize(sme(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),hCt=_((t,e)=>typeof t=="string"?mn(t,e):t.flat().map(r=>mn(r,e)),"sanitizeTextOrArray"),dCt=_(t=>bw.test(t),"hasBreaks"),fCt=_(t=>t.split(bw),"splitBreaks"),pCt=_(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),ome=_(t=>t.replace(bw,"#br#"),"breakToPlaceholder"),E8=_(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),gCt=_(function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),mCt=_(function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),U0=_(function(t){const e=t.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let a=e[n];if(a===","&&n>0&&n+1<e.length){const i=e[n-1],s=e[n+1];yCt(i,s)&&(a=i+","+s,n++,r.pop())}r.push(vCt(a))}return r.join("")},"parseGenericTypes"),Nz=_((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),yCt=_((t,e)=>{const r=Nz(t,"~"),n=Nz(e,"~");return r===1&&n===1},"shouldCombineSets"),vCt=_(t=>{const e=Nz(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let a=n.indexOf("~"),i=n.lastIndexOf("~");for(;a!==-1&&i!==-1&&a!==i;)n[a]="<",n[i]=">",a=n.indexOf("~"),i=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),lme=_(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Iz=/\$\$(.*?)\$\$/g,Mi=_(t=>{var e,r;return((r=(e=t.match(Iz))==null?void 0:e.length)!=null?r:0)>0},"hasKatex"),I4=_((t,e)=>nt(this,null,function*(){const r=document.createElement("div");r.innerHTML=yield C8(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",r);const a={width:r.clientWidth,height:r.clientHeight};return r.remove(),a}),"calculateMathMLDimensions"),bCt=_((t,e)=>nt(this,null,function*(){if(!Mi(t))return t;if(!(lme()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Iz,"MathML is unsupported in this environment.");{const{default:r}=yield Promise.resolve().then(function(){return zPt}),n=e.forceLegacyMathML||!lme()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(bw).map(a=>Mi(a)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${a}</div>`:`<div>${a}</div>`).join("").replace(Iz,(a,i)=>r.renderToString(i,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}}),"renderKatexUnsanitized"),C8=_((t,e)=>nt(this,null,function*(){return mn(yield bCt(t,e),e)}),"renderKatexSanitized"),or={getRows:cCt,sanitizeText:mn,sanitizeTextOrArray:hCt,hasBreaks:dCt,splitBreaks:fCt,lineBreakRegex:bw,removeScript:ime,getUrl:E8,evaluate:Ph,getMax:gCt,getMin:mCt},xCt=_(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),wCt=_(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),yi=_(function(t,e,r,n){const a=wCt(e,r,n);xCt(t,a)},"configureSvgSize"),xw=_(function(t,e,r,n){const a=e.node().getBBox(),i=a.width,s=a.height;Le.info(`SVG bounds: ${i}x${s}`,a);let o=0,u=0;Le.info(`Graph bounds: ${o}x${u}`,t),o=i+r*2,u=s+r*2,Le.info(`Calculated bounds: ${o}x${u}`),yi(e,u,o,n);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),S8={};function Lz(t){return[...t.cssRules].map(e=>e.cssText).join(`
|
||
`)}l(Lz,"cssStyleSheetToString"),_(Lz,"cssStyleSheetToString");var TCt=_((t,e,r,n)=>{var i,s;let a="";return t in S8&&S8[t]?a=S8[t](Ne(X({},r),{svgId:n})):Le.warn(`No theme found for ${t}`),` & {
|
||
font-family: ${r.fontFamily};
|
||
font-size: ${r.fontSize};
|
||
fill: ${r.textColor}
|
||
}
|
||
@keyframes edge-animation-frame {
|
||
from {
|
||
stroke-dashoffset: 0;
|
||
}
|
||
}
|
||
@keyframes dash {
|
||
to {
|
||
stroke-dashoffset: 0;
|
||
}
|
||
}
|
||
& .edge-animation-slow {
|
||
stroke-dasharray: 9,5 !important;
|
||
stroke-dashoffset: 900;
|
||
animation: dash 50s linear infinite;
|
||
stroke-linecap: round;
|
||
}
|
||
& .edge-animation-fast {
|
||
stroke-dasharray: 9,5 !important;
|
||
stroke-dashoffset: 900;
|
||
animation: dash 20s linear infinite;
|
||
stroke-linecap: round;
|
||
}
|
||
/* Classes common for multiple diagrams */
|
||
|
||
& .error-icon {
|
||
fill: ${r.errorBkgColor};
|
||
}
|
||
& .error-text {
|
||
fill: ${r.errorTextColor};
|
||
stroke: ${r.errorTextColor};
|
||
}
|
||
|
||
& .edge-thickness-normal {
|
||
stroke-width: ${(i=r.strokeWidth)!=null?i:1}px;
|
||
}
|
||
& .edge-thickness-thick {
|
||
stroke-width: 3.5px
|
||
}
|
||
& .edge-pattern-solid {
|
||
stroke-dasharray: 0;
|
||
}
|
||
& .edge-thickness-invisible {
|
||
stroke-width: 0;
|
||
fill: none;
|
||
}
|
||
& .edge-pattern-dashed{
|
||
stroke-dasharray: 3;
|
||
}
|
||
.edge-pattern-dotted {
|
||
stroke-dasharray: 2;
|
||
}
|
||
|
||
& .marker {
|
||
fill: ${r.lineColor};
|
||
stroke: ${r.lineColor};
|
||
}
|
||
& .marker.cross {
|
||
stroke: ${r.lineColor};
|
||
}
|
||
|
||
& svg {
|
||
font-family: ${r.fontFamily};
|
||
font-size: ${r.fontSize};
|
||
}
|
||
& p {
|
||
margin: 0
|
||
}
|
||
|
||
${a}
|
||
.node .neo-node {
|
||
stroke: ${r.nodeBorder};
|
||
}
|
||
|
||
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
||
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
||
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
||
}
|
||
[data-look="neo"].swimlane.cluster rect {
|
||
filter: none;
|
||
}
|
||
|
||
|
||
[data-look="neo"].node path {
|
||
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
||
stroke-width: ${(s=r.strokeWidth)!=null?s:1}px;
|
||
}
|
||
|
||
[data-look="neo"].node .outer-path {
|
||
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
||
}
|
||
|
||
[data-look="neo"].node .neo-line path {
|
||
stroke: ${r.nodeBorder};
|
||
filter: none;
|
||
}
|
||
|
||
[data-look="neo"].node circle{
|
||
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
||
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
||
}
|
||
|
||
[data-look="neo"].node circle .state-start{
|
||
fill: #000000;
|
||
}
|
||
|
||
[data-look="neo"].icon-shape .icon {
|
||
fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
||
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
||
}
|
||
|
||
[data-look="neo"].icon-shape .icon-neo path {
|
||
stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};
|
||
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};
|
||
}
|
||
|
||
${e}
|
||
`},"getStyles"),ECt=_((t,e)=>{e!==void 0&&(S8[t]=e)},"addStylesForDiagram"),CCt=TCt,$z={};g8($z,{clear:l(()=>Ca,"clear"),getAccDescription:l(()=>Wa,"getAccDescription"),getAccTitle:l(()=>za,"getAccTitle"),getDiagramTitle:l(()=>Ia,"getDiagramTitle"),setAccDescription:l(()=>Ha,"setAccDescription"),setAccTitle:l(()=>Na,"setAccTitle"),setDiagramTitle:l(()=>Va,"setDiagramTitle")});var Mz="",Pz="",Rz="",Oz=_(t=>mn(t,Ar()),"sanitizeText"),Ca=_(()=>{Mz="",Rz="",Pz=""},"clear"),Na=_(t=>{Mz=Oz(t).replace(/^\s+/g,"")},"setAccTitle"),za=_(()=>Mz,"getAccTitle"),Ha=_(t=>{Rz=Oz(t).replace(/\n\s+/g,`
|
||
`)},"setAccDescription"),Wa=_(()=>Rz,"getAccDescription"),Va=_(t=>{Pz=Oz(t)},"setDiagramTitle"),Ia=_(()=>Pz,"getDiagramTitle"),cme=Le,SCt=gz,ft=Ar,Dz=Kge,ume=vw,Fz=_(t=>mn(t,ft()),"sanitizeText"),Bz=xw,_Ct=_(()=>$z,"getCommonDb"),_8={},k8=_((t,e,r)=>{var n;_8[t]&&cme.warn(`Diagram with id ${t} already registered. Overwriting.`),_8[t]=e,r&&nme(t,r),ECt(t,e.styles),(n=e.injectUtils)==null||n.call(e,cme,SCt,ft,Fz,Bz,_Ct(),()=>{})},"registerDiagram"),zz=_(t=>{if(t in _8)return _8[t];throw new kCt(t)},"getDiagram"),kCt=(By=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},l(By,"DiagramNotFoundError"),_(By,"DiagramNotFoundError"),By);function A8(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}l(A8,"ascending$2");function ACt(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}l(ACt,"descending$2");function Hz(t){let e,r,n;t.length!==2?(e=A8,r=l((o,u)=>A8(t(o),u),"compare2"),n=l((o,u)=>t(o)-u,"delta")):(e=t===A8||t===ACt?t:NCt,r=t,n=t);function a(o,u,h=0,d=o.length){if(h<d){if(e(u,u)!==0)return d;do{const f=h+d>>>1;r(o[f],u)<0?h=f+1:d=f}while(h<d)}return h}l(a,"left");function i(o,u,h=0,d=o.length){if(h<d){if(e(u,u)!==0)return d;do{const f=h+d>>>1;r(o[f],u)<=0?h=f+1:d=f}while(h<d)}return h}l(i,"right");function s(o,u,h=0,d=o.length){const f=a(o,u,h,d-1);return f>h&&n(o[f-1],u)>-n(o[f],u)?f-1:f}return l(s,"center"),{left:a,center:s,right:i}}l(Hz,"bisector");function NCt(){return 0}l(NCt,"zero$1");function ICt(t){return t===null?NaN:+t}l(ICt,"number$5");const LCt=Hz(A8).right;Hz(ICt).center;const Tre=class Tre extends Map{constructor(e,r=PCt){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,a]of e)this.set(n,a)}get(e){return super.get(hme(this,e))}has(e){return super.has(hme(this,e))}set(e,r){return super.set($Ct(this,e),r)}delete(e){return super.delete(MCt(this,e))}};l(Tre,"InternMap");let N8=Tre;function hme({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}l(hme,"intern_get");function $Ct({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}l($Ct,"intern_set");function MCt({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}l(MCt,"intern_delete");function PCt(t){return t!==null&&typeof t=="object"?t.valueOf():t}l(PCt,"keyof");const RCt=Math.sqrt(50),OCt=Math.sqrt(10),DCt=Math.sqrt(2);function I8(t,e,r){const n=(e-t)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),s=i>=RCt?10:i>=OCt?5:i>=DCt?2:1;let o,u,h;return a<0?(h=Math.pow(10,-a)/s,o=Math.round(t*h),u=Math.round(e*h),o/h<t&&++o,u/h>e&&--u,h=-h):(h=Math.pow(10,a)*s,o=Math.round(t/h),u=Math.round(e/h),o*h<t&&++o,u*h>e&&--u),u<o&&.5<=r&&r<2?I8(t,e,r*2):[o,u,h]}l(I8,"tickSpec");function FCt(t,e,r){if(e=+e,t=+t,r=+r,!(r>0))return[];if(t===e)return[t];const n=e<t,[a,i,s]=n?I8(e,t,r):I8(t,e,r);if(!(i>=a))return[];const o=i-a+1,u=new Array(o);if(n)if(s<0)for(let h=0;h<o;++h)u[h]=(i-h)/-s;else for(let h=0;h<o;++h)u[h]=(i-h)*s;else if(s<0)for(let h=0;h<o;++h)u[h]=(a+h)/-s;else for(let h=0;h<o;++h)u[h]=(a+h)*s;return u}l(FCt,"ticks");function Wz(t,e,r){return e=+e,t=+t,r=+r,I8(t,e,r)[2]}l(Wz,"tickIncrement");function Vz(t,e,r){e=+e,t=+t,r=+r;const n=e<t,a=n?Wz(e,t,r):Wz(t,e,r);return(n?-1:1)*(a<0?1/-a:a)}l(Vz,"tickStep");function BCt(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}l(BCt,"max$4");function zCt(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}l(zCt,"min$5");function HCt(t,e,r){t=+t,e=+e,r=(a=arguments.length)<2?(e=t,t=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((e-t)/r))|0,i=new Array(a);++n<a;)i[n]=t+n*r;return i}l(HCt,"range$1");function WCt(t){return t}l(WCt,"identity$8");var L8=1,Gz=2,qz=3,$8=4,dme=1e-6;function VCt(t){return"translate("+t+",0)"}l(VCt,"translateX");function GCt(t){return"translate(0,"+t+")"}l(GCt,"translateY");function qCt(t){return e=>+t(e)}l(qCt,"number$4");function YCt(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}l(YCt,"center$1");function UCt(){return!this.__axis}l(UCt,"entering");function fme(t,e){var r=[],n=null,a=null,i=6,s=6,o=3,u=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,h=t===L8||t===$8?-1:1,d=t===$8||t===Gz?"x":"y",f=t===L8||t===qz?VCt:GCt;function p(g){var m=n==null?e.ticks?e.ticks.apply(e,r):e.domain():n,y=a==null?e.tickFormat?e.tickFormat.apply(e,r):WCt:a,v=Math.max(i,0)+o,b=e.range(),w=+b[0]+u,x=+b[b.length-1]+u,T=(e.bandwidth?YCt:qCt)(e.copy(),u),C=g.selection?g.selection():g,S=C.selectAll(".domain").data([null]),E=C.selectAll(".tick").data(m,e).order(),k=E.exit(),A=E.enter().append("g").attr("class","tick"),I=E.select("line"),L=E.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(A),I=I.merge(A.append("line").attr("stroke","currentColor").attr(d+"2",h*i)),L=L.merge(A.append("text").attr("fill","currentColor").attr(d,h*v).attr("dy",t===L8?"0em":t===qz?"0.71em":"0.32em")),g!==C&&(S=S.transition(g),E=E.transition(g),I=I.transition(g),L=L.transition(g),k=k.transition(g).attr("opacity",dme).attr("transform",function(R){return isFinite(R=T(R))?f(R+u):this.getAttribute("transform")}),A.attr("opacity",dme).attr("transform",function(R){var O=this.parentNode.__axis;return f((O&&isFinite(O=O(R))?O:T(R))+u)})),k.remove(),S.attr("d",t===$8||t===Gz?s?"M"+h*s+","+w+"H"+u+"V"+x+"H"+h*s:"M"+u+","+w+"V"+x:s?"M"+w+","+h*s+"V"+u+"H"+x+"V"+h*s:"M"+w+","+u+"H"+x),E.attr("opacity",1).attr("transform",function(R){return f(T(R)+u)}),I.attr(d+"2",h*i),L.attr(d,h*v).text(y),C.filter(UCt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Gz?"start":t===$8?"end":"middle"),C.each(function(){this.__axis=T})}return l(p,"axis"),p.scale=function(g){return arguments.length?(e=g,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(g){return arguments.length?(r=g==null?[]:Array.from(g),p):r.slice()},p.tickValues=function(g){return arguments.length?(n=g==null?null:Array.from(g),p):n&&n.slice()},p.tickFormat=function(g){return arguments.length?(a=g,p):a},p.tickSize=function(g){return arguments.length?(i=s=+g,p):i},p.tickSizeInner=function(g){return arguments.length?(i=+g,p):i},p.tickSizeOuter=function(g){return arguments.length?(s=+g,p):s},p.tickPadding=function(g){return arguments.length?(o=+g,p):o},p.offset=function(g){return arguments.length?(u=+g,p):u},p}l(fme,"axis");function jCt(t){return fme(L8,t)}l(jCt,"axisTop");function KCt(t){return fme(qz,t)}l(KCt,"axisBottom");var XCt={value:l(()=>{},"value")};function pme(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new M8(r)}l(pme,"dispatch$1");function M8(t){this._=t}l(M8,"Dispatch");function ZCt(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");if(a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}l(ZCt,"parseTypenames$1"),M8.prototype=pme.prototype={constructor:M8,on:l(function(t,e){var r=this._,n=ZCt(t+"",r),a,i=-1,s=n.length;if(arguments.length<2){for(;++i<s;)if((a=(t=n[i]).type)&&(a=QCt(r[a],t.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<s;)if(a=(t=n[i]).type)r[a]=gme(r[a],t.name,e);else if(e==null)for(a in r)r[a]=gme(r[a],t.name,null);return this},"on"),copy:l(function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new M8(t)},"copy"),call:l(function(t,e){if((a=arguments.length-2)>0)for(var r=new Array(a),n=0,a,i;n<a;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],n=0,a=i.length;n<a;++n)i[n].value.apply(e,r)},"call"),apply:l(function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],a=0,i=n.length;a<i;++a)n[a].value.apply(e,r)},"apply")};function QCt(t,e){for(var r=0,n=t.length,a;r<n;++r)if((a=t[r]).name===e)return a.value}l(QCt,"get$4");function gme(t,e,r){for(var n=0,a=t.length;n<a;++n)if(t[n].name===e){t[n]=XCt,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}l(gme,"set$3");var Yz="http://www.w3.org/1999/xhtml",mme={svg:"http://www.w3.org/2000/svg",xhtml:Yz,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function P8(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),mme.hasOwnProperty(e)?{space:mme[e],local:t}:t}l(P8,"namespace");function JCt(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Yz&&e.documentElement.namespaceURI===Yz?e.createElement(t):e.createElementNS(r,t)}}l(JCt,"creatorInherit");function eSt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}l(eSt,"creatorFixed");function yme(t){var e=P8(t);return(e.local?eSt:JCt)(e)}l(yme,"creator");function tSt(){}l(tSt,"none");function Uz(t){return t==null?tSt:function(){return this.querySelector(t)}}l(Uz,"selector");function rSt(t){typeof t!="function"&&(t=Uz(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var i=e[a],s=i.length,o=n[a]=new Array(s),u,h,d=0;d<s;++d)(u=i[d])&&(h=t.call(u,u.__data__,d,i))&&("__data__"in u&&(h.__data__=u.__data__),o[d]=h);return new mc(n,this._parents)}l(rSt,"selection_select");function nSt(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}l(nSt,"array$2");function aSt(){return[]}l(aSt,"empty");function vme(t){return t==null?aSt:function(){return this.querySelectorAll(t)}}l(vme,"selectorAll");function iSt(t){return function(){return nSt(t.apply(this,arguments))}}l(iSt,"arrayAll");function sSt(t){typeof t=="function"?t=iSt(t):t=vme(t);for(var e=this._groups,r=e.length,n=[],a=[],i=0;i<r;++i)for(var s=e[i],o=s.length,u,h=0;h<o;++h)(u=s[h])&&(n.push(t.call(u,u.__data__,h,s)),a.push(u));return new mc(n,a)}l(sSt,"selection_selectAll");function bme(t){return function(){return this.matches(t)}}l(bme,"matcher");function xme(t){return function(e){return e.matches(t)}}l(xme,"childMatcher");var oSt=Array.prototype.find;function lSt(t){return function(){return oSt.call(this.children,t)}}l(lSt,"childFind");function cSt(){return this.firstElementChild}l(cSt,"childFirst");function uSt(t){return this.select(t==null?cSt:lSt(typeof t=="function"?t:xme(t)))}l(uSt,"selection_selectChild");var hSt=Array.prototype.filter;function dSt(){return Array.from(this.children)}l(dSt,"children");function fSt(t){return function(){return hSt.call(this.children,t)}}l(fSt,"childrenFilter");function pSt(t){return this.selectAll(t==null?dSt:fSt(typeof t=="function"?t:xme(t)))}l(pSt,"selection_selectChildren");function gSt(t){typeof t!="function"&&(t=bme(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var i=e[a],s=i.length,o=n[a]=[],u,h=0;h<s;++h)(u=i[h])&&t.call(u,u.__data__,h,i)&&o.push(u);return new mc(n,this._parents)}l(gSt,"selection_filter");function wme(t){return new Array(t.length)}l(wme,"sparse");function mSt(){return new mc(this._enter||this._groups.map(wme),this._parents)}l(mSt,"selection_enter");function R8(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}l(R8,"EnterNode"),R8.prototype={constructor:R8,appendChild:l(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:l(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:l(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:l(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")};function ySt(t){return function(){return t}}l(ySt,"constant$7");function vSt(t,e,r,n,a,i){for(var s=0,o,u=e.length,h=i.length;s<h;++s)(o=e[s])?(o.__data__=i[s],n[s]=o):r[s]=new R8(t,i[s]);for(;s<u;++s)(o=e[s])&&(a[s]=o)}l(vSt,"bindIndex");function bSt(t,e,r,n,a,i,s){var o,u,h=new Map,d=e.length,f=i.length,p=new Array(d),g;for(o=0;o<d;++o)(u=e[o])&&(p[o]=g=s.call(u,u.__data__,o,e)+"",h.has(g)?a[o]=u:h.set(g,u));for(o=0;o<f;++o)g=s.call(t,i[o],o,i)+"",(u=h.get(g))?(n[o]=u,u.__data__=i[o],h.delete(g)):r[o]=new R8(t,i[o]);for(o=0;o<d;++o)(u=e[o])&&h.get(p[o])===u&&(a[o]=u)}l(bSt,"bindKey");function xSt(t){return t.__data__}l(xSt,"datum");function wSt(t,e){if(!arguments.length)return Array.from(this,xSt);var r=e?bSt:vSt,n=this._parents,a=this._groups;typeof t!="function"&&(t=ySt(t));for(var i=a.length,s=new Array(i),o=new Array(i),u=new Array(i),h=0;h<i;++h){var d=n[h],f=a[h],p=f.length,g=TSt(t.call(d,d&&d.__data__,h,n)),m=g.length,y=o[h]=new Array(m),v=s[h]=new Array(m),b=u[h]=new Array(p);r(d,f,y,v,b,g,e);for(var w=0,x=0,T,C;w<m;++w)if(T=y[w]){for(w>=x&&(x=w+1);!(C=v[x])&&++x<m;);T._next=C||null}}return s=new mc(s,n),s._enter=o,s._exit=u,s}l(wSt,"selection_data");function TSt(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}l(TSt,"arraylike");function ESt(){return new mc(this._exit||this._groups.map(wme),this._parents)}l(ESt,"selection_exit");function CSt(t,e,r){var n=this.enter(),a=this,i=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?i.remove():r(i),n&&a?n.merge(a).order():a}l(CSt,"selection_join");function SSt(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,a=r.length,i=n.length,s=Math.min(a,i),o=new Array(a),u=0;u<s;++u)for(var h=r[u],d=n[u],f=h.length,p=o[u]=new Array(f),g,m=0;m<f;++m)(g=h[m]||d[m])&&(p[m]=g);for(;u<a;++u)o[u]=r[u];return new mc(o,this._parents)}l(SSt,"selection_merge");function _St(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],a=n.length-1,i=n[a],s;--a>=0;)(s=n[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}l(_St,"selection_order");function kSt(t){t||(t=ASt);function e(f,p){return f&&p?t(f.__data__,p.__data__):!f-!p}l(e,"compareNode");for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i){for(var s=r[i],o=s.length,u=a[i]=new Array(o),h,d=0;d<o;++d)(h=s[d])&&(u[d]=h);u.sort(e)}return new mc(a,this._parents).order()}l(kSt,"selection_sort");function ASt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}l(ASt,"ascending$1");function NSt(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}l(NSt,"selection_call");function ISt(){return Array.from(this)}l(ISt,"selection_nodes");function LSt(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],a=0,i=n.length;a<i;++a){var s=n[a];if(s)return s}return null}l(LSt,"selection_node");function $St(){let t=0;for(const e of this)++t;return t}l($St,"selection_size");function MSt(){return!this.node()}l(MSt,"selection_empty");function PSt(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var a=e[r],i=0,s=a.length,o;i<s;++i)(o=a[i])&&t.call(o,o.__data__,i,a);return this}l(PSt,"selection_each");function RSt(t){return function(){this.removeAttribute(t)}}l(RSt,"attrRemove$1");function OSt(t){return function(){this.removeAttributeNS(t.space,t.local)}}l(OSt,"attrRemoveNS$1");function DSt(t,e){return function(){this.setAttribute(t,e)}}l(DSt,"attrConstant$1");function FSt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}l(FSt,"attrConstantNS$1");function BSt(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}l(BSt,"attrFunction$1");function zSt(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}l(zSt,"attrFunctionNS$1");function HSt(t,e){var r=P8(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?OSt:RSt:typeof e=="function"?r.local?zSt:BSt:r.local?FSt:DSt)(r,e))}l(HSt,"selection_attr");function Tme(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}l(Tme,"defaultView");function WSt(t){return function(){this.style.removeProperty(t)}}l(WSt,"styleRemove$1");function VSt(t,e,r){return function(){this.style.setProperty(t,e,r)}}l(VSt,"styleConstant$1");function GSt(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}l(GSt,"styleFunction$1");function qSt(t,e,r){return arguments.length>1?this.each((e==null?WSt:typeof e=="function"?GSt:VSt)(t,e,r==null?"":r)):ww(this.node(),t)}l(qSt,"selection_style");function ww(t,e){return t.style.getPropertyValue(e)||Tme(t).getComputedStyle(t,null).getPropertyValue(e)}l(ww,"styleValue");function YSt(t){return function(){delete this[t]}}l(YSt,"propertyRemove");function USt(t,e){return function(){this[t]=e}}l(USt,"propertyConstant");function jSt(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}l(jSt,"propertyFunction");function KSt(t,e){return arguments.length>1?this.each((e==null?YSt:typeof e=="function"?jSt:USt)(t,e)):this.node()[t]}l(KSt,"selection_property");function Eme(t){return t.trim().split(/^|\s+/)}l(Eme,"classArray");function jz(t){return t.classList||new Cme(t)}l(jz,"classList");function Cme(t){this._node=t,this._names=Eme(t.getAttribute("class")||"")}l(Cme,"ClassList"),Cme.prototype={add:l(function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:l(function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:l(function(t){return this._names.indexOf(t)>=0},"contains")};function Sme(t,e){for(var r=jz(t),n=-1,a=e.length;++n<a;)r.add(e[n])}l(Sme,"classedAdd");function _me(t,e){for(var r=jz(t),n=-1,a=e.length;++n<a;)r.remove(e[n])}l(_me,"classedRemove");function XSt(t){return function(){Sme(this,t)}}l(XSt,"classedTrue");function ZSt(t){return function(){_me(this,t)}}l(ZSt,"classedFalse");function QSt(t,e){return function(){(e.apply(this,arguments)?Sme:_me)(this,t)}}l(QSt,"classedFunction");function JSt(t,e){var r=Eme(t+"");if(arguments.length<2){for(var n=jz(this.node()),a=-1,i=r.length;++a<i;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?QSt:e?XSt:ZSt)(r,e))}l(JSt,"selection_classed");function e4t(){this.textContent=""}l(e4t,"textRemove");function t4t(t){return function(){this.textContent=t}}l(t4t,"textConstant$1");function r4t(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}l(r4t,"textFunction$1");function n4t(t){return arguments.length?this.each(t==null?e4t:(typeof t=="function"?r4t:t4t)(t)):this.node().textContent}l(n4t,"selection_text");function a4t(){this.innerHTML=""}l(a4t,"htmlRemove");function i4t(t){return function(){this.innerHTML=t}}l(i4t,"htmlConstant");function s4t(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}l(s4t,"htmlFunction");function o4t(t){return arguments.length?this.each(t==null?a4t:(typeof t=="function"?s4t:i4t)(t)):this.node().innerHTML}l(o4t,"selection_html");function l4t(){this.nextSibling&&this.parentNode.appendChild(this)}l(l4t,"raise");function c4t(){return this.each(l4t)}l(c4t,"selection_raise");function u4t(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}l(u4t,"lower");function h4t(){return this.each(u4t)}l(h4t,"selection_lower");function d4t(t){var e=typeof t=="function"?t:yme(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}l(d4t,"selection_append");function f4t(){return null}l(f4t,"constantNull");function p4t(t,e){var r=typeof t=="function"?t:yme(t),n=e==null?f4t:typeof e=="function"?e:Uz(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}l(p4t,"selection_insert");function g4t(){var t=this.parentNode;t&&t.removeChild(this)}l(g4t,"remove");function m4t(){return this.each(g4t)}l(m4t,"selection_remove");function y4t(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}l(y4t,"selection_cloneShallow");function v4t(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}l(v4t,"selection_cloneDeep");function b4t(t){return this.select(t?v4t:y4t)}l(b4t,"selection_clone");function x4t(t){return arguments.length?this.property("__data__",t):this.node().__data__}l(x4t,"selection_datum");function w4t(t){return function(e){t.call(this,e,this.__data__)}}l(w4t,"contextListener");function T4t(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}l(T4t,"parseTypenames");function E4t(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,a=e.length,i;r<a;++r)i=e[r],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++n]=i;++n?e.length=n:delete this.__on}}}l(E4t,"onRemove");function C4t(t,e,r){return function(){var n=this.__on,a,i=w4t(e);if(n){for(var s=0,o=n.length;s<o;++s)if((a=n[s]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=r),a.value=e;return}}this.addEventListener(t.type,i,r),a={type:t.type,name:t.name,value:e,listener:i,options:r},n?n.push(a):this.__on=[a]}}l(C4t,"onAdd");function S4t(t,e,r){var n=T4t(t+""),a,i=n.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var u=0,h=o.length,d;u<h;++u)for(a=0,d=o[u];a<i;++a)if((s=n[a]).type===d.type&&s.name===d.name)return d.value}return}for(o=e?C4t:E4t,a=0;a<i;++a)this.each(o(n[a],e,r));return this}l(S4t,"selection_on");function kme(t,e,r){var n=Tme(t),a=n.CustomEvent;typeof a=="function"?a=new a(e,r):(a=n.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}l(kme,"dispatchEvent");function _4t(t,e){return function(){return kme(this,t,e)}}l(_4t,"dispatchConstant");function k4t(t,e){return function(){return kme(this,t,e.apply(this,arguments))}}l(k4t,"dispatchFunction");function A4t(t,e){return this.each((typeof e=="function"?k4t:_4t)(t,e))}l(A4t,"selection_dispatch");function*N4t(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],a=0,i=n.length,s;a<i;++a)(s=n[a])&&(yield s)}l(N4t,"selection_iterator");var Ame=[null];function mc(t,e){this._groups=t,this._parents=e}l(mc,"Selection$1");function L4(){return new mc([[document.documentElement]],Ame)}l(L4,"selection");function I4t(){return this}l(I4t,"selection_selection"),mc.prototype=L4.prototype={constructor:mc,select:rSt,selectAll:sSt,selectChild:uSt,selectChildren:pSt,filter:gSt,data:wSt,enter:mSt,exit:ESt,join:CSt,merge:SSt,selection:I4t,order:_St,sort:kSt,call:NSt,nodes:ISt,node:LSt,size:$St,empty:MSt,each:PSt,attr:HSt,style:qSt,property:KSt,classed:JSt,text:n4t,html:o4t,raise:c4t,lower:h4t,append:d4t,insert:p4t,remove:m4t,clone:b4t,datum:x4t,on:S4t,dispatch:A4t,[Symbol.iterator]:N4t};function Yt(t){return typeof t=="string"?new mc([[document.querySelector(t)]],[document.documentElement]):new mc([[t]],Ame)}l(Yt,"select");function $4(t,e,r){t.prototype=e.prototype=r,r.constructor=t}l($4,"define$4");function O8(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}l(O8,"extend$2");function sm(){}l(sm,"Color$1");var M4=.7,D8=1/M4,Tw="\\s*([+-]?\\d+)\\s*",P4="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Rh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",L4t=/^#([0-9a-f]{3,8})$/,$4t=new RegExp(`^rgb\\(${Tw},${Tw},${Tw}\\)$`),M4t=new RegExp(`^rgb\\(${Rh},${Rh},${Rh}\\)$`),P4t=new RegExp(`^rgba\\(${Tw},${Tw},${Tw},${P4}\\)$`),R4t=new RegExp(`^rgba\\(${Rh},${Rh},${Rh},${P4}\\)$`),O4t=new RegExp(`^hsl\\(${P4},${Rh},${Rh}\\)$`),D4t=new RegExp(`^hsla\\(${P4},${Rh},${Rh},${P4}\\)$`),Nme={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};$4(sm,om,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ime,formatHex:Ime,formatHex8:F4t,formatHsl:B4t,formatRgb:Lme,toString:Lme});function Ime(){return this.rgb().formatHex()}l(Ime,"color_formatHex");function F4t(){return this.rgb().formatHex8()}l(F4t,"color_formatHex8");function B4t(){return Dme(this).formatHsl()}l(B4t,"color_formatHsl");function Lme(){return this.rgb().formatRgb()}l(Lme,"color_formatRgb");function om(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=L4t.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?$me(e):r===3?new No(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?F8(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?F8(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=$4t.exec(t))?new No(e[1],e[2],e[3],1):(e=M4t.exec(t))?new No(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=P4t.exec(t))?F8(e[1],e[2],e[3],e[4]):(e=R4t.exec(t))?F8(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=O4t.exec(t))?Ome(e[1],e[2]/100,e[3]/100,1):(e=D4t.exec(t))?Ome(e[1],e[2]/100,e[3]/100,e[4]):Nme.hasOwnProperty(t)?$me(Nme[t]):t==="transparent"?new No(NaN,NaN,NaN,0):null}l(om,"color");function $me(t){return new No(t>>16&255,t>>8&255,t&255,1)}l($me,"rgbn");function F8(t,e,r,n){return n<=0&&(t=e=r=NaN),new No(t,e,r,n)}l(F8,"rgba$1");function Mme(t){return t instanceof sm||(t=om(t)),t?(t=t.rgb(),new No(t.r,t.g,t.b,t.opacity)):new No}l(Mme,"rgbConvert");function Kz(t,e,r,n){return arguments.length===1?Mme(t):new No(t,e,r,n==null?1:n)}l(Kz,"rgb");function No(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}l(No,"Rgb"),$4(No,Kz,O8(sm,{brighter(t){return t=t==null?D8:Math.pow(D8,t),new No(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?M4:Math.pow(M4,t),new No(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new No(lm(this.r),lm(this.g),lm(this.b),B8(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Pme,formatHex:Pme,formatHex8:z4t,formatRgb:Rme,toString:Rme}));function Pme(){return`#${cm(this.r)}${cm(this.g)}${cm(this.b)}`}l(Pme,"rgb_formatHex");function z4t(){return`#${cm(this.r)}${cm(this.g)}${cm(this.b)}${cm((isNaN(this.opacity)?1:this.opacity)*255)}`}l(z4t,"rgb_formatHex8");function Rme(){const t=B8(this.opacity);return`${t===1?"rgb(":"rgba("}${lm(this.r)}, ${lm(this.g)}, ${lm(this.b)}${t===1?")":`, ${t})`}`}l(Rme,"rgb_formatRgb");function B8(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}l(B8,"clampa");function lm(t){return Math.max(0,Math.min(255,Math.round(t)||0))}l(lm,"clampi");function cm(t){return t=lm(t),(t<16?"0":"")+t.toString(16)}l(cm,"hex");function Ome(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ou(t,e,r,n)}l(Ome,"hsla$1");function Dme(t){if(t instanceof Ou)return new Ou(t.h,t.s,t.l,t.opacity);if(t instanceof sm||(t=om(t)),!t)return new Ou;if(t instanceof Ou)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,a=Math.min(e,r,n),i=Math.max(e,r,n),s=NaN,o=i-a,u=(i+a)/2;return o?(e===i?s=(r-n)/o+(r<n)*6:r===i?s=(n-e)/o+2:s=(e-r)/o+4,o/=u<.5?i+a:2-i-a,s*=60):o=u>0&&u<1?0:s,new Ou(s,o,u,t.opacity)}l(Dme,"hslConvert");function H4t(t,e,r,n){return arguments.length===1?Dme(t):new Ou(t,e,r,n==null?1:n)}l(H4t,"hsl");function Ou(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}l(Ou,"Hsl"),$4(Ou,H4t,O8(sm,{brighter(t){return t=t==null?D8:Math.pow(D8,t),new Ou(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?M4:Math.pow(M4,t),new Ou(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,a=2*r-n;return new No(Xz(t>=240?t-240:t+120,a,n),Xz(t,a,n),Xz(t<120?t+240:t-120,a,n),this.opacity)},clamp(){return new Ou(Fme(this.h),z8(this.s),z8(this.l),B8(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=B8(this.opacity);return`${t===1?"hsl(":"hsla("}${Fme(this.h)}, ${z8(this.s)*100}%, ${z8(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Fme(t){return t=(t||0)%360,t<0?t+360:t}l(Fme,"clamph");function z8(t){return Math.max(0,Math.min(1,t||0))}l(z8,"clampt");function Xz(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}l(Xz,"hsl2rgb");const W4t=Math.PI/180,V4t=180/Math.PI,H8=18,Bme=.96422,zme=1,Hme=.82521,Wme=4/29,Ew=6/29,Vme=3*Ew*Ew,G4t=Ew*Ew*Ew;function Gme(t){if(t instanceof Oh)return new Oh(t.l,t.a,t.b,t.opacity);if(t instanceof ef)return qme(t);t instanceof No||(t=Mme(t));var e=eH(t.r),r=eH(t.g),n=eH(t.b),a=Zz((.2225045*e+.7168786*r+.0606169*n)/zme),i,s;return e===r&&r===n?i=s=a:(i=Zz((.4360747*e+.3850649*r+.1430804*n)/Bme),s=Zz((.0139322*e+.0971045*r+.7141733*n)/Hme)),new Oh(116*a-16,500*(i-a),200*(a-s),t.opacity)}l(Gme,"labConvert");function q4t(t,e,r,n){return arguments.length===1?Gme(t):new Oh(t,e,r,n==null?1:n)}l(q4t,"lab");function Oh(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}l(Oh,"Lab"),$4(Oh,q4t,O8(sm,{brighter(t){return new Oh(this.l+H8*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new Oh(this.l-H8*(t==null?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Bme*Qz(e),t=zme*Qz(t),r=Hme*Qz(r),new No(Jz(3.1338561*e-1.6168667*t-.4906146*r),Jz(-.9787684*e+1.9161415*t+.033454*r),Jz(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function Zz(t){return t>G4t?Math.pow(t,.3333333333333333):t/Vme+Wme}l(Zz,"xyz2lab");function Qz(t){return t>Ew?t*t*t:Vme*(t-Wme)}l(Qz,"lab2xyz");function Jz(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,.4166666666666667)-.055)}l(Jz,"lrgb2rgb");function eH(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}l(eH,"rgb2lrgb");function Y4t(t){if(t instanceof ef)return new ef(t.h,t.c,t.l,t.opacity);if(t instanceof Oh||(t=Gme(t)),t.a===0&&t.b===0)return new ef(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*V4t;return new ef(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}l(Y4t,"hclConvert");function tH(t,e,r,n){return arguments.length===1?Y4t(t):new ef(t,e,r,n==null?1:n)}l(tH,"hcl$1");function ef(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}l(ef,"Hcl");function qme(t){if(isNaN(t.h))return new Oh(t.l,0,0,t.opacity);var e=t.h*W4t;return new Oh(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}l(qme,"hcl2lab"),$4(ef,tH,O8(sm,{brighter(t){return new ef(this.h,this.c,this.l+H8*(t==null?1:t),this.opacity)},darker(t){return new ef(this.h,this.c,this.l-H8*(t==null?1:t),this.opacity)},rgb(){return qme(this).rgb()}}));var W8=l(t=>()=>t,"constant$6");function Yme(t,e){return function(r){return t+r*e}}l(Yme,"linear$1");function U4t(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}l(U4t,"exponential");function j4t(t,e){var r=e-t;return r?Yme(t,r>180||r<-180?r-360*Math.round(r/360):r):W8(isNaN(t)?e:t)}l(j4t,"hue");function K4t(t){return(t=+t)==1?R4:function(e,r){return r-e?U4t(e,r,t):W8(isNaN(e)?r:e)}}l(K4t,"gamma");function R4(t,e){var r=e-t;return r?Yme(t,r):W8(isNaN(t)?e:t)}l(R4,"nogamma");var V8=l(function t(e){var r=K4t(e);function n(a,i){var s=r((a=Kz(a)).r,(i=Kz(i)).r),o=r(a.g,i.g),u=r(a.b,i.b),h=R4(a.opacity,i.opacity);return function(d){return a.r=s(d),a.g=o(d),a.b=u(d),a.opacity=h(d),a+""}}return l(n,"rgb$1"),n.gamma=t,n},"rgbGamma")(1);function X4t(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=t[a]*(1-i)+e[a]*i;return n}}l(X4t,"numberArray");function Z4t(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}l(Z4t,"isNumberArray");function Q4t(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,a=new Array(n),i=new Array(r),s;for(s=0;s<n;++s)a[s]=aH(t[s],e[s]);for(;s<r;++s)i[s]=e[s];return function(o){for(s=0;s<n;++s)i[s]=a[s](o);return i}}l(Q4t,"genericArray");function J4t(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}l(J4t,"date$1");function Du(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}l(Du,"interpolateNumber");function e3t(t,e){var r={},n={},a;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in t?r[a]=aH(t[a],e[a]):n[a]=e[a];return function(i){for(a in r)n[a]=r[a](i);return n}}l(e3t,"object$1");var rH=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nH=new RegExp(rH.source,"g");function t3t(t){return function(){return t}}l(t3t,"zero");function r3t(t){return function(e){return t(e)+""}}l(r3t,"one");function Ume(t,e){var r=rH.lastIndex=nH.lastIndex=0,n,a,i,s=-1,o=[],u=[];for(t=t+"",e=e+"";(n=rH.exec(t))&&(a=nH.exec(e));)(i=a.index)>r&&(i=e.slice(r,i),o[s]?o[s]+=i:o[++s]=i),(n=n[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,u.push({i:s,x:Du(n,a)})),r=nH.lastIndex;return r<e.length&&(i=e.slice(r),o[s]?o[s]+=i:o[++s]=i),o.length<2?u[0]?r3t(u[0].x):t3t(e):(e=u.length,function(h){for(var d=0,f;d<e;++d)o[(f=u[d]).i]=f.x(h);return o.join("")})}l(Ume,"interpolateString");function aH(t,e){var r=typeof e,n;return e==null||r==="boolean"?W8(e):(r==="number"?Du:r==="string"?(n=om(e))?(e=n,V8):Ume:e instanceof om?V8:e instanceof Date?J4t:Z4t(e)?X4t:Array.isArray(e)?Q4t:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?e3t:Du)(t,e)}l(aH,"interpolate$1");function n3t(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}l(n3t,"interpolateRound");var jme=180/Math.PI,iH={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Kme(t,e,r,n,a,i){var s,o,u;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(u=t*r+e*n)&&(r-=t*u,n-=e*u),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,u/=o),t*n<e*r&&(t=-t,e=-e,u=-u,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(e,t)*jme,skewX:Math.atan(u)*jme,scaleX:s,scaleY:o}}l(Kme,"decompose");var G8;function a3t(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?iH:Kme(e.a,e.b,e.c,e.d,e.e,e.f)}l(a3t,"parseCss");function i3t(t){return t==null||(G8||(G8=document.createElementNS("http://www.w3.org/2000/svg","g")),G8.setAttribute("transform",t),!(t=G8.transform.baseVal.consolidate()))?iH:(t=t.matrix,Kme(t.a,t.b,t.c,t.d,t.e,t.f))}l(i3t,"parseSvg");function Xme(t,e,r,n){function a(h){return h.length?h.pop()+" ":""}l(a,"pop");function i(h,d,f,p,g,m){if(h!==f||d!==p){var y=g.push("translate(",null,e,null,r);m.push({i:y-4,x:Du(h,f)},{i:y-2,x:Du(d,p)})}else(f||p)&&g.push("translate("+f+e+p+r)}l(i,"translate");function s(h,d,f,p){h!==d?(h-d>180?d+=360:d-h>180&&(h+=360),p.push({i:f.push(a(f)+"rotate(",null,n)-2,x:Du(h,d)})):d&&f.push(a(f)+"rotate("+d+n)}l(s,"rotate");function o(h,d,f,p){h!==d?p.push({i:f.push(a(f)+"skewX(",null,n)-2,x:Du(h,d)}):d&&f.push(a(f)+"skewX("+d+n)}l(o,"skewX");function u(h,d,f,p,g,m){if(h!==f||d!==p){var y=g.push(a(g)+"scale(",null,",",null,")");m.push({i:y-4,x:Du(h,f)},{i:y-2,x:Du(d,p)})}else(f!==1||p!==1)&&g.push(a(g)+"scale("+f+","+p+")")}return l(u,"scale"),function(h,d){var f=[],p=[];return h=t(h),d=t(d),i(h.translateX,h.translateY,d.translateX,d.translateY,f,p),s(h.rotate,d.rotate,f,p),o(h.skewX,d.skewX,f,p),u(h.scaleX,h.scaleY,d.scaleX,d.scaleY,f,p),h=d=null,function(g){for(var m=-1,y=p.length,v;++m<y;)f[(v=p[m]).i]=v.x(g);return f.join("")}}}l(Xme,"interpolateTransform");var s3t=Xme(a3t,"px, ","px)","deg)"),o3t=Xme(i3t,", ",")",")");function l3t(t){return function(e,r){var n=t((e=tH(e)).h,(r=tH(r)).h),a=R4(e.c,r.c),i=R4(e.l,r.l),s=R4(e.opacity,r.opacity);return function(o){return e.h=n(o),e.c=a(o),e.l=i(o),e.opacity=s(o),e+""}}}l(l3t,"hcl");var c3t=l3t(j4t),Cw=0,O4=0,D4=0,Zme=1e3,q8,F4,Y8=0,um=0,U8=0,B4=typeof performance=="object"&&performance.now?performance:Date,Qme=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function sH(){return um||(Qme(u3t),um=B4.now()+U8)}l(sH,"now");function u3t(){um=0}l(u3t,"clearNow");function j8(){this._call=this._time=this._next=null}l(j8,"Timer"),j8.prototype=Jme.prototype={constructor:j8,restart:l(function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?sH():+r)+(e==null?0:+e),!this._next&&F4!==this&&(F4?F4._next=this:q8=this,F4=this),this._call=t,this._time=r,oH()},"restart"),stop:l(function(){this._call&&(this._call=null,this._time=1/0,oH())},"stop")};function Jme(t,e,r){var n=new j8;return n.restart(t,e,r),n}l(Jme,"timer$1");function h3t(){sH(),++Cw;for(var t=q8,e;t;)(e=um-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Cw}l(h3t,"timerFlush");function e1e(){um=(Y8=B4.now())+U8,Cw=O4=0;try{h3t()}finally{Cw=0,f3t(),um=0}}l(e1e,"wake");function d3t(){var t=B4.now(),e=t-Y8;e>Zme&&(U8-=e,Y8=t)}l(d3t,"poke");function f3t(){for(var t,e=q8,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:q8=r);F4=t,oH(n)}l(f3t,"nap");function oH(t){if(!Cw){O4&&(O4=clearTimeout(O4));var e=t-um;e>24?(t<1/0&&(O4=setTimeout(e1e,t-B4.now()-U8)),D4&&(D4=clearInterval(D4))):(D4||(Y8=B4.now(),D4=setInterval(d3t,Zme)),Cw=1,Qme(e1e))}}l(oH,"sleep");function t1e(t,e,r){var n=new j8;return e=e==null?0:+e,n.restart(a=>{n.stop(),t(a+e)},e,r),n}l(t1e,"timeout");var p3t=pme("start","end","cancel","interrupt"),g3t=[],r1e=0,n1e=1,lH=2,K8=3,a1e=4,cH=5,X8=6;function Z8(t,e,r,n,a,i){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;m3t(t,r,{name:e,index:n,group:a,on:p3t,tween:g3t,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:r1e})}l(Z8,"schedule");function uH(t,e){var r=Fu(t,e);if(r.state>r1e)throw new Error("too late; already scheduled");return r}l(uH,"init$1");function Dh(t,e){var r=Fu(t,e);if(r.state>K8)throw new Error("too late; already running");return r}l(Dh,"set$2");function Fu(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}l(Fu,"get$3");function m3t(t,e,r){var n=t.__transition,a;n[e]=r,r.timer=Jme(i,0,r.time);function i(h){r.state=n1e,r.timer.restart(s,r.delay,r.time),r.delay<=h&&s(h-r.delay)}l(i,"schedule");function s(h){var d,f,p,g;if(r.state!==n1e)return u();for(d in n)if(g=n[d],g.name===r.name){if(g.state===K8)return t1e(s);g.state===a1e?(g.state=X8,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete n[d]):+d<e&&(g.state=X8,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete n[d])}if(t1e(function(){r.state===K8&&(r.state=a1e,r.timer.restart(o,r.delay,r.time),o(h))}),r.state=lH,r.on.call("start",t,t.__data__,r.index,r.group),r.state===lH){for(r.state=K8,a=new Array(p=r.tween.length),d=0,f=-1;d<p;++d)(g=r.tween[d].value.call(t,t.__data__,r.index,r.group))&&(a[++f]=g);a.length=f+1}}l(s,"start");function o(h){for(var d=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(u),r.state=cH,1),f=-1,p=a.length;++f<p;)a[f].call(t,d);r.state===cH&&(r.on.call("end",t,t.__data__,r.index,r.group),u())}l(o,"tick");function u(){r.state=X8,r.timer.stop(),delete n[e];for(var h in n)return;delete t.__transition}l(u,"stop")}l(m3t,"create$1");function y3t(t,e){var r=t.__transition,n,a,i=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){i=!1;continue}a=n.state>lH&&n.state<cH,n.state=X8,n.timer.stop(),n.on.call(a?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[s]}i&&delete t.__transition}}l(y3t,"interrupt");function v3t(t){return this.each(function(){y3t(this,t)})}l(v3t,"selection_interrupt");function b3t(t,e){var r,n;return function(){var a=Dh(this,t),i=a.tween;if(i!==r){n=r=i;for(var s=0,o=n.length;s<o;++s)if(n[s].name===e){n=n.slice(),n.splice(s,1);break}}a.tween=n}}l(b3t,"tweenRemove");function x3t(t,e,r){var n,a;if(typeof r!="function")throw new Error;return function(){var i=Dh(this,t),s=i.tween;if(s!==n){a=(n=s).slice();for(var o={name:e,value:r},u=0,h=a.length;u<h;++u)if(a[u].name===e){a[u]=o;break}u===h&&a.push(o)}i.tween=a}}l(x3t,"tweenFunction");function w3t(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=Fu(this.node(),r).tween,a=0,i=n.length,s;a<i;++a)if((s=n[a]).name===t)return s.value;return null}return this.each((e==null?b3t:x3t)(r,t,e))}l(w3t,"transition_tween");function hH(t,e,r){var n=t._id;return t.each(function(){var a=Dh(this,n);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return Fu(a,n).value[e]}}l(hH,"tweenValue");function i1e(t,e){var r;return(typeof e=="number"?Du:e instanceof om?V8:(r=om(e))?(e=r,V8):Ume)(t,e)}l(i1e,"interpolate");function T3t(t){return function(){this.removeAttribute(t)}}l(T3t,"attrRemove");function E3t(t){return function(){this.removeAttributeNS(t.space,t.local)}}l(E3t,"attrRemoveNS");function C3t(t,e,r){var n,a=r+"",i;return function(){var s=this.getAttribute(t);return s===a?null:s===n?i:i=e(n=s,r)}}l(C3t,"attrConstant");function S3t(t,e,r){var n,a=r+"",i;return function(){var s=this.getAttributeNS(t.space,t.local);return s===a?null:s===n?i:i=e(n=s,r)}}l(S3t,"attrConstantNS");function _3t(t,e,r){var n,a,i;return function(){var s,o=r(this),u;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),u=o+"",s===u?null:s===n&&u===a?i:(a=u,i=e(n=s,o)))}}l(_3t,"attrFunction");function k3t(t,e,r){var n,a,i;return function(){var s,o=r(this),u;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),u=o+"",s===u?null:s===n&&u===a?i:(a=u,i=e(n=s,o)))}}l(k3t,"attrFunctionNS");function A3t(t,e){var r=P8(t),n=r==="transform"?o3t:i1e;return this.attrTween(t,typeof e=="function"?(r.local?k3t:_3t)(r,n,hH(this,"attr."+t,e)):e==null?(r.local?E3t:T3t)(r):(r.local?S3t:C3t)(r,n,e))}l(A3t,"transition_attr");function N3t(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}l(N3t,"attrInterpolate");function I3t(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}l(I3t,"attrInterpolateNS");function L3t(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&I3t(t,i)),r}return l(a,"tween"),a._value=e,a}l(L3t,"attrTweenNS");function $3t(t,e){var r,n;function a(){var i=e.apply(this,arguments);return i!==n&&(r=(n=i)&&N3t(t,i)),r}return l(a,"tween"),a._value=e,a}l($3t,"attrTween");function M3t(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=P8(t);return this.tween(r,(n.local?L3t:$3t)(n,e))}l(M3t,"transition_attrTween");function P3t(t,e){return function(){uH(this,t).delay=+e.apply(this,arguments)}}l(P3t,"delayFunction");function R3t(t,e){return e=+e,function(){uH(this,t).delay=e}}l(R3t,"delayConstant");function O3t(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?P3t:R3t)(e,t)):Fu(this.node(),e).delay}l(O3t,"transition_delay");function D3t(t,e){return function(){Dh(this,t).duration=+e.apply(this,arguments)}}l(D3t,"durationFunction");function F3t(t,e){return e=+e,function(){Dh(this,t).duration=e}}l(F3t,"durationConstant");function B3t(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?D3t:F3t)(e,t)):Fu(this.node(),e).duration}l(B3t,"transition_duration");function z3t(t,e){if(typeof e!="function")throw new Error;return function(){Dh(this,t).ease=e}}l(z3t,"easeConstant");function H3t(t){var e=this._id;return arguments.length?this.each(z3t(e,t)):Fu(this.node(),e).ease}l(H3t,"transition_ease");function W3t(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Dh(this,t).ease=r}}l(W3t,"easeVarying");function V3t(t){if(typeof t!="function")throw new Error;return this.each(W3t(this._id,t))}l(V3t,"transition_easeVarying");function G3t(t){typeof t!="function"&&(t=bme(t));for(var e=this._groups,r=e.length,n=new Array(r),a=0;a<r;++a)for(var i=e[a],s=i.length,o=n[a]=[],u,h=0;h<s;++h)(u=i[h])&&t.call(u,u.__data__,h,i)&&o.push(u);return new tf(n,this._parents,this._name,this._id)}l(G3t,"transition_filter");function q3t(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,a=r.length,i=Math.min(n,a),s=new Array(n),o=0;o<i;++o)for(var u=e[o],h=r[o],d=u.length,f=s[o]=new Array(d),p,g=0;g<d;++g)(p=u[g]||h[g])&&(f[g]=p);for(;o<n;++o)s[o]=e[o];return new tf(s,this._parents,this._name,this._id)}l(q3t,"transition_merge");function Y3t(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}l(Y3t,"start$1");function U3t(t,e,r){var n,a,i=Y3t(e)?uH:Dh;return function(){var s=i(this,t),o=s.on;o!==n&&(a=(n=o).copy()).on(e,r),s.on=a}}l(U3t,"onFunction");function j3t(t,e){var r=this._id;return arguments.length<2?Fu(this.node(),r).on.on(t):this.each(U3t(r,t,e))}l(j3t,"transition_on");function K3t(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}l(K3t,"removeFunction");function X3t(){return this.on("end.remove",K3t(this._id))}l(X3t,"transition_remove");function Z3t(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Uz(t));for(var n=this._groups,a=n.length,i=new Array(a),s=0;s<a;++s)for(var o=n[s],u=o.length,h=i[s]=new Array(u),d,f,p=0;p<u;++p)(d=o[p])&&(f=t.call(d,d.__data__,p,o))&&("__data__"in d&&(f.__data__=d.__data__),h[p]=f,Z8(h[p],e,r,p,h,Fu(d,r)));return new tf(i,this._parents,e,r)}l(Z3t,"transition_select");function Q3t(t){var e=this._name,r=this._id;typeof t!="function"&&(t=vme(t));for(var n=this._groups,a=n.length,i=[],s=[],o=0;o<a;++o)for(var u=n[o],h=u.length,d,f=0;f<h;++f)if(d=u[f]){for(var p=t.call(d,d.__data__,f,u),g,m=Fu(d,r),y=0,v=p.length;y<v;++y)(g=p[y])&&Z8(g,e,r,y,p,m);i.push(p),s.push(d)}return new tf(i,s,e,r)}l(Q3t,"transition_selectAll");var J3t=L4.prototype.constructor;function e5t(){return new J3t(this._groups,this._parents)}l(e5t,"transition_selection");function t5t(t,e){var r,n,a;return function(){var i=ww(this,t),s=(this.style.removeProperty(t),ww(this,t));return i===s?null:i===r&&s===n?a:a=e(r=i,n=s)}}l(t5t,"styleNull");function s1e(t){return function(){this.style.removeProperty(t)}}l(s1e,"styleRemove");function r5t(t,e,r){var n,a=r+"",i;return function(){var s=ww(this,t);return s===a?null:s===n?i:i=e(n=s,r)}}l(r5t,"styleConstant");function n5t(t,e,r){var n,a,i;return function(){var s=ww(this,t),o=r(this),u=o+"";return o==null&&(u=o=(this.style.removeProperty(t),ww(this,t))),s===u?null:s===n&&u===a?i:(a=u,i=e(n=s,o))}}l(n5t,"styleFunction");function a5t(t,e){var r,n,a,i="style."+e,s="end."+i,o;return function(){var u=Dh(this,t),h=u.on,d=u.value[i]==null?o||(o=s1e(e)):void 0;(h!==r||a!==d)&&(n=(r=h).copy()).on(s,a=d),u.on=n}}l(a5t,"styleMaybeRemove");function i5t(t,e,r){var n=(t+="")=="transform"?s3t:i1e;return e==null?this.styleTween(t,t5t(t,n)).on("end.style."+t,s1e(t)):typeof e=="function"?this.styleTween(t,n5t(t,n,hH(this,"style."+t,e))).each(a5t(this._id,t)):this.styleTween(t,r5t(t,n,e),r).on("end.style."+t,null)}l(i5t,"transition_style");function s5t(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}l(s5t,"styleInterpolate");function o5t(t,e,r){var n,a;function i(){var s=e.apply(this,arguments);return s!==a&&(n=(a=s)&&s5t(t,s,r)),n}return l(i,"tween"),i._value=e,i}l(o5t,"styleTween");function l5t(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,o5t(t,e,r==null?"":r))}l(l5t,"transition_styleTween");function c5t(t){return function(){this.textContent=t}}l(c5t,"textConstant");function u5t(t){return function(){var e=t(this);this.textContent=e==null?"":e}}l(u5t,"textFunction");function h5t(t){return this.tween("text",typeof t=="function"?u5t(hH(this,"text",t)):c5t(t==null?"":t+""))}l(h5t,"transition_text");function d5t(t){return function(e){this.textContent=t.call(this,e)}}l(d5t,"textInterpolate");function f5t(t){var e,r;function n(){var a=t.apply(this,arguments);return a!==r&&(e=(r=a)&&d5t(a)),e}return l(n,"tween"),n._value=t,n}l(f5t,"textTween");function p5t(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,f5t(t))}l(p5t,"transition_textTween");function g5t(){for(var t=this._name,e=this._id,r=o1e(),n=this._groups,a=n.length,i=0;i<a;++i)for(var s=n[i],o=s.length,u,h=0;h<o;++h)if(u=s[h]){var d=Fu(u,e);Z8(u,t,r,h,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new tf(n,this._parents,t,r)}l(g5t,"transition_transition");function m5t(){var t,e,r=this,n=r._id,a=r.size();return new Promise(function(i,s){var o={value:s},u={value:l(function(){--a===0&&i()},"value")};r.each(function(){var h=Dh(this,n),d=h.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(u)),h.on=e}),a===0&&i()})}l(m5t,"transition_end");var y5t=0;function tf(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}l(tf,"Transition$1");function o1e(){return++y5t}l(o1e,"newId");var rf=L4.prototype;tf.prototype={constructor:tf,select:Z3t,selectAll:Q3t,selectChild:rf.selectChild,selectChildren:rf.selectChildren,filter:G3t,merge:q3t,selection:e5t,transition:g5t,call:rf.call,nodes:rf.nodes,node:rf.node,size:rf.size,empty:rf.empty,each:rf.each,on:j3t,attr:A3t,attrTween:M3t,style:i5t,styleTween:l5t,text:h5t,textTween:p5t,remove:X3t,tween:w3t,delay:O3t,duration:B3t,ease:H3t,easeVarying:V3t,end:m5t,[Symbol.iterator]:rf[Symbol.iterator]};function v5t(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}l(v5t,"cubicInOut");var b5t={time:null,delay:0,duration:250,ease:v5t};function x5t(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}l(x5t,"inherit");function w5t(t){var e,r;t instanceof tf?(e=t._id,t=t._name):(e=o1e(),(r=b5t).time=sH(),t=t==null?null:t+"");for(var n=this._groups,a=n.length,i=0;i<a;++i)for(var s=n[i],o=s.length,u,h=0;h<o;++h)(u=s[h])&&Z8(u,t,e,h,s,r||x5t(u,e));return new tf(n,this._parents,t,e)}l(w5t,"selection_transition"),L4.prototype.interrupt=v3t,L4.prototype.transition=w5t;const dH=Math.PI,fH=2*dH,hm=1e-6,T5t=fH-hm;function l1e(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}l(l1e,"append$1");function E5t(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return l1e;const r=ph(10,e);return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}l(E5t,"appendRound");let C5t=(LC=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?l1e:E5t(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,a){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(e,r,n,a,i,s){this._append`C${+e},${+r},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(e,r,n,a,i){if(e=+e,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,o=this._y1,u=n-e,h=a-r,d=s-e,f=o-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>hm)if(!(Math.abs(f*u-h*d)>hm)||!i)this._append`L${this._x1=e},${this._y1=r}`;else{let g=n-s,m=a-o,y=u*u+h*h,v=g*g+m*m,b=Math.sqrt(y),w=Math.sqrt(p),x=i*Math.tan((dH-Math.acos((y+p-v)/(2*b*w)))/2),T=x/w,C=x/b;Math.abs(T-1)>hm&&this._append`L${e+T*d},${r+T*f}`,this._append`A${i},${i},0,0,${+(f*g>d*m)},${this._x1=e+C*u},${this._y1=r+C*h}`}}arc(e,r,n,a,i,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(a),u=n*Math.sin(a),h=e+o,d=r+u,f=1^s,p=s?a-i:i-a;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>hm||Math.abs(this._y1-d)>hm)&&this._append`L${h},${d}`,n&&(p<0&&(p=p%fH+fH),p>T5t?this._append`A${n},${n},0,1,${f},${e-o},${r-u}A${n},${n},0,1,${f},${this._x1=h},${this._y1=d}`:p>hm&&this._append`A${n},${n},0,${+(p>=dH)},${f},${this._x1=e+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(e,r,n,a){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}},l(LC,"Path"),LC);function S5t(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}l(S5t,"formatDecimal");function Q8(t,e){if(!isFinite(t)||t===0)return null;var r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}l(Q8,"formatDecimalParts");function Sw(t){return t=Q8(Math.abs(t)),t?t[1]:NaN}l(Sw,"exponent");function _5t(t,e){return function(r,n){for(var a=r.length,i=[],s=0,o=t[0],u=0;a>0&&o>0&&(u+o+1>n&&(o=Math.max(1,n-u)),i.push(r.substring(a-=o,a+o)),!((u+=o+1)>n));)o=t[s=(s+1)%t.length];return i.reverse().join(e)}}l(_5t,"formatGroup");function k5t(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}l(k5t,"formatNumerals");var A5t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function J8(t){if(!(e=A5t.exec(t)))throw new Error("invalid format: "+t);var e;return new pH({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}l(J8,"formatSpecifier"),J8.prototype=pH.prototype;function pH(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}l(pH,"FormatSpecifier"),pH.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function N5t(t){e:for(var e=t.length,r=1,n=-1,a;r<e;++r)switch(t[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+t[r])break e;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(a+1):t}l(N5t,"formatTrim");var e7;function I5t(t,e){var r=Q8(t,e);if(!r)return e7=void 0,t.toPrecision(e);var n=r[0],a=r[1],i=a-(e7=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return i===s?n:i>s?n+new Array(i-s+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+Q8(t,Math.max(0,e+i-1))[0]}l(I5t,"formatPrefixAuto");function c1e(t,e){var r=Q8(t,e);if(!r)return t+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}l(c1e,"formatRounded");var u1e={"%":l((t,e)=>(t*100).toFixed(e),"%"),b:l(t=>Math.round(t).toString(2),"b"),c:l(t=>t+"","c"),d:S5t,e:l((t,e)=>t.toExponential(e),"e"),f:l((t,e)=>t.toFixed(e),"f"),g:l((t,e)=>t.toPrecision(e),"g"),o:l(t=>Math.round(t).toString(8),"o"),p:l((t,e)=>c1e(t*100,e),"p"),r:c1e,s:I5t,X:l(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:l(t=>Math.round(t).toString(16),"x")};function h1e(t){return t}l(h1e,"identity$6");var d1e=Array.prototype.map,f1e=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function L5t(t){var e=t.grouping===void 0||t.thousands===void 0?h1e:_5t(d1e.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",a=t.decimal===void 0?".":t.decimal+"",i=t.numerals===void 0?h1e:k5t(d1e.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function h(f,p){f=J8(f);var g=f.fill,m=f.align,y=f.sign,v=f.symbol,b=f.zero,w=f.width,x=f.comma,T=f.precision,C=f.trim,S=f.type;S==="n"?(x=!0,S="g"):u1e[S]||(T===void 0&&(T=12),C=!0,S="g"),(b||g==="0"&&m==="=")&&(b=!0,g="0",m="=");var E=(p&&p.prefix!==void 0?p.prefix:"")+(v==="$"?r:v==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():""),k=(v==="$"?n:/[%p]/.test(S)?s:"")+(p&&p.suffix!==void 0?p.suffix:""),A=u1e[S],I=/[defgprs%]/.test(S);T=T===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function L(R){var O=E,M=k,P,z,D;if(S==="c")M=A(R)+M,R="";else{R=+R;var B=R<0||1/R<0;if(R=isNaN(R)?u:A(Math.abs(R),T),C&&(R=N5t(R)),B&&+R==0&&y!=="+"&&(B=!1),O=(B?y==="("?y:o:y==="-"||y==="("?"":y)+O,M=(S==="s"&&!isNaN(R)&&e7!==void 0?f1e[8+e7/3]:"")+M+(B&&y==="("?")":""),I){for(P=-1,z=R.length;++P<z;)if(D=R.charCodeAt(P),48>D||D>57){M=(D===46?a+R.slice(P+1):R.slice(P))+M,R=R.slice(0,P);break}}}x&&!b&&(R=e(R,1/0));var W=O.length+R.length+M.length,U=W<w?new Array(w-W+1).join(g):"";switch(x&&b&&(R=e(U+R,U.length?w-M.length:1/0),U=""),m){case"<":R=O+R+M+U;break;case"=":R=O+U+R+M;break;case"^":R=U.slice(0,W=U.length>>1)+O+R+M+U.slice(W);break;default:R=U+O+R+M;break}return i(R)}return l(L,"format"),L.toString=function(){return f+""},L}l(h,"newFormat");function d(f,p){var g=Math.max(-8,Math.min(8,Math.floor(Sw(p)/3)))*3,m=Math.pow(10,-g),y=h((f=J8(f),f.type="f",f),{suffix:f1e[8+g/3]});return function(v){return y(m*v)}}return l(d,"formatPrefix"),{format:h,formatPrefix:d}}l(L5t,"formatLocale$1");var t7,dm,p1e;$5t({thousands:",",grouping:[3],currency:["$",""]});function $5t(t){return t7=L5t(t),dm=t7.format,p1e=t7.formatPrefix,t7}l($5t,"defaultLocale$1");function M5t(t){return Math.max(0,-Sw(Math.abs(t)))}l(M5t,"precisionFixed");function P5t(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Sw(e)/3)))*3-Sw(Math.abs(t)))}l(P5t,"precisionPrefix");function R5t(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Sw(e)-Sw(t))+1}l(R5t,"precisionRound");function O5t(t){var e=0,r=t.children,n=r&&r.length;if(!n)e=1;else for(;--n>=0;)e+=r[n].value;t.value=e}l(O5t,"count");function D5t(){return this.eachAfter(O5t)}l(D5t,"node_count");function F5t(t,e){let r=-1;for(const n of this)t.call(e,n,++r,this);return this}l(F5t,"node_each");function B5t(t,e){for(var r=this,n=[r],a,i,s=-1;r=n.pop();)if(t.call(e,r,++s,this),a=r.children)for(i=a.length-1;i>=0;--i)n.push(a[i]);return this}l(B5t,"node_eachBefore");function z5t(t,e){for(var r=this,n=[r],a=[],i,s,o,u=-1;r=n.pop();)if(a.push(r),i=r.children)for(s=0,o=i.length;s<o;++s)n.push(i[s]);for(;r=a.pop();)t.call(e,r,++u,this);return this}l(z5t,"node_eachAfter");function H5t(t,e){let r=-1;for(const n of this)if(t.call(e,n,++r,this))return n}l(H5t,"node_find");function W5t(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,a=n&&n.length;--a>=0;)r+=n[a].value;e.value=r})}l(W5t,"node_sum");function V5t(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}l(V5t,"node_sort");function G5t(t){for(var e=this,r=q5t(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var a=n.length;t!==r;)n.splice(a,0,t),t=t.parent;return n}l(G5t,"node_path");function q5t(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),a=null;for(t=r.pop(),e=n.pop();t===e;)a=t,t=r.pop(),e=n.pop();return a}l(q5t,"leastCommonAncestor");function Y5t(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}l(Y5t,"node_ancestors");function U5t(){return Array.from(this)}l(U5t,"node_descendants");function j5t(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}l(j5t,"node_leaves");function K5t(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}l(K5t,"node_links");function*X5t(){var t=this,e,r=[t],n,a,i;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,n=t.children)for(a=0,i=n.length;a<i;++a)r.push(n[a]);while(r.length)}l(X5t,"node_iterator");function gH(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=J5t)):e===void 0&&(e=Q5t);for(var r=new r7(t),n,a=[r],i,s,o,u;n=a.pop();)if((s=e(n.data))&&(u=(s=Array.from(s)).length))for(n.children=s,o=u-1;o>=0;--o)a.push(i=s[o]=new r7(s[o])),i.parent=n,i.depth=n.depth+1;return r.eachBefore(t_t)}l(gH,"hierarchy");function Z5t(){return gH(this).eachBefore(e_t)}l(Z5t,"node_copy");function Q5t(t){return t.children}l(Q5t,"objectChildren");function J5t(t){return Array.isArray(t)?t[1]:null}l(J5t,"mapChildren");function e_t(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}l(e_t,"copyData");function t_t(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}l(t_t,"computeHeight");function r7(t){this.data=t,this.depth=this.height=0,this.parent=null}l(r7,"Node$1"),r7.prototype=gH.prototype={constructor:r7,count:D5t,each:F5t,eachAfter:z5t,eachBefore:B5t,find:H5t,sum:W5t,sort:V5t,path:G5t,ancestors:Y5t,descendants:U5t,leaves:j5t,links:K5t,copy:Z5t,[Symbol.iterator]:X5t};function r_t(t){if(typeof t!="function")throw new Error;return t}l(r_t,"required");function z4(){return 0}l(z4,"constantZero");function H4(t){return function(){return t}}l(H4,"constant$5");function n_t(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}l(n_t,"roundNode");function a_t(t,e,r,n,a){for(var i=t.children,s,o=-1,u=i.length,h=t.value&&(n-e)/t.value;++o<u;)s=i[o],s.y0=r,s.y1=a,s.x0=e,s.x1=e+=s.value*h}l(a_t,"treemapDice");function i_t(t,e,r,n,a){for(var i=t.children,s,o=-1,u=i.length,h=t.value&&(a-r)/t.value;++o<u;)s=i[o],s.x0=e,s.x1=n,s.y0=r,s.y1=r+=s.value*h}l(i_t,"treemapSlice");var s_t=(1+Math.sqrt(5))/2;function o_t(t,e,r,n,a,i){for(var s=[],o=e.children,u,h,d=0,f=0,p=o.length,g,m,y=e.value,v,b,w,x,T,C,S;d<p;){g=a-r,m=i-n;do v=o[f++].value;while(!v&&f<p);for(b=w=v,C=Math.max(m/g,g/m)/(y*t),S=v*v*C,T=Math.max(w/S,S/b);f<p;++f){if(v+=h=o[f].value,h<b&&(b=h),h>w&&(w=h),S=v*v*C,x=Math.max(w/S,S/b),x>T){v-=h;break}T=x}s.push(u={value:v,dice:g<m,children:o.slice(d,f)}),u.dice?a_t(u,r,n,a,y?n+=m*v/y:i):i_t(u,r,n,y?r+=g*v/y:a,i),y-=v,d=f}return s}l(o_t,"squarifyRatio");var l_t=l(function t(e){function r(n,a,i,s,o){o_t(e,n,a,i,s,o)}return l(r,"squarify"),r.ratio=function(n){return t((n=+n)>1?n:1)},r},"custom")(s_t);function c_t(){var t=l_t,e=!1,r=1,n=1,a=[0],i=z4,s=z4,o=z4,u=z4,h=z4;function d(p){return p.x0=p.y0=0,p.x1=r,p.y1=n,p.eachBefore(f),a=[0],e&&p.eachBefore(n_t),p}l(d,"treemap");function f(p){var g=a[p.depth],m=p.x0+g,y=p.y0+g,v=p.x1-g,b=p.y1-g;v<m&&(m=v=(m+v)/2),b<y&&(y=b=(y+b)/2),p.x0=m,p.y0=y,p.x1=v,p.y1=b,p.children&&(g=a[p.depth+1]=i(p)/2,m+=h(p)-g,y+=s(p)-g,v-=o(p)-g,b-=u(p)-g,v<m&&(m=v=(m+v)/2),b<y&&(y=b=(y+b)/2),t(p,m,y,v,b))}return l(f,"positionNode"),d.round=function(p){return arguments.length?(e=!!p,d):e},d.size=function(p){return arguments.length?(r=+p[0],n=+p[1],d):[r,n]},d.tile=function(p){return arguments.length?(t=r_t(p),d):t},d.padding=function(p){return arguments.length?d.paddingInner(p).paddingOuter(p):d.paddingInner()},d.paddingInner=function(p){return arguments.length?(i=typeof p=="function"?p:H4(+p),d):i},d.paddingOuter=function(p){return arguments.length?d.paddingTop(p).paddingRight(p).paddingBottom(p).paddingLeft(p):d.paddingTop()},d.paddingTop=function(p){return arguments.length?(s=typeof p=="function"?p:H4(+p),d):s},d.paddingRight=function(p){return arguments.length?(o=typeof p=="function"?p:H4(+p),d):o},d.paddingBottom=function(p){return arguments.length?(u=typeof p=="function"?p:H4(+p),d):u},d.paddingLeft=function(p){return arguments.length?(h=typeof p=="function"?p:H4(+p),d):h},d}l(c_t,"treemap$1");function n7(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}l(n7,"initRange");const g1e=Symbol("implicit");function fm(){var t=new N8,e=[],r=[],n=g1e;function a(i){let s=t.get(i);if(s===void 0){if(n!==g1e)return n;t.set(i,s=e.push(i)-1)}return r[s%r.length]}return l(a,"scale"),a.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new N8;for(const s of i)t.has(s)||t.set(s,e.push(s)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return fm(e,r).unknown(n)},n7.apply(a,arguments),a}l(fm,"ordinal");function mH(){var t=fm().unknown(void 0),e=t.domain,r=t.range,n=0,a=1,i,s,o=!1,u=0,h=0,d=.5;delete t.unknown;function f(){var p=e().length,g=a<n,m=g?a:n,y=g?n:a;i=(y-m)/Math.max(1,p-u+h*2),o&&(i=Math.floor(i)),m+=(y-m-i*(p-u))*d,s=i*(1-u),o&&(m=Math.round(m),s=Math.round(s));var v=HCt(p).map(function(b){return m+i*b});return r(g?v.reverse():v)}return l(f,"rescale"),t.domain=function(p){return arguments.length?(e(p),f()):e()},t.range=function(p){return arguments.length?([n,a]=p,n=+n,a=+a,f()):[n,a]},t.rangeRound=function(p){return[n,a]=p,n=+n,a=+a,o=!0,f()},t.bandwidth=function(){return s},t.step=function(){return i},t.round=function(p){return arguments.length?(o=!!p,f()):o},t.padding=function(p){return arguments.length?(u=Math.min(1,h=+p),f()):u},t.paddingInner=function(p){return arguments.length?(u=Math.min(1,p),f()):u},t.paddingOuter=function(p){return arguments.length?(h=+p,f()):h},t.align=function(p){return arguments.length?(d=Math.max(0,Math.min(1,p)),f()):d},t.copy=function(){return mH(e(),[n,a]).round(o).paddingInner(u).paddingOuter(h).align(d)},n7.apply(f(),arguments)}l(mH,"band");function u_t(t){return function(){return t}}l(u_t,"constants$1");function h_t(t){return+t}l(h_t,"number$3");var m1e=[0,1];function _w(t){return t}l(_w,"identity$5");function yH(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:u_t(isNaN(e)?NaN:.5)}l(yH,"normalize$1");function d_t(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}l(d_t,"clamper");function f_t(t,e,r){var n=t[0],a=t[1],i=e[0],s=e[1];return a<n?(n=yH(a,n),i=r(s,i)):(n=yH(n,a),i=r(i,s)),function(o){return i(n(o))}}l(f_t,"bimap");function p_t(t,e,r){var n=Math.min(t.length,e.length)-1,a=new Array(n),i=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)a[s]=yH(t[s],t[s+1]),i[s]=r(e[s],e[s+1]);return function(o){var u=LCt(t,o,1,n)-1;return i[u](a[u](o))}}l(p_t,"polymap");function y1e(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}l(y1e,"copy$2");function g_t(){var t=m1e,e=m1e,r=aH,n,a,i,s=_w,o,u,h;function d(){var p=Math.min(t.length,e.length);return s!==_w&&(s=d_t(t[0],t[p-1])),o=p>2?p_t:f_t,u=h=null,f}l(d,"rescale");function f(p){return p==null||isNaN(p=+p)?i:(u||(u=o(t.map(n),e,r)))(n(s(p)))}return l(f,"scale"),f.invert=function(p){return s(a((h||(h=o(e,t.map(n),Du)))(p)))},f.domain=function(p){return arguments.length?(t=Array.from(p,h_t),d()):t.slice()},f.range=function(p){return arguments.length?(e=Array.from(p),d()):e.slice()},f.rangeRound=function(p){return e=Array.from(p),r=n3t,d()},f.clamp=function(p){return arguments.length?(s=p?!0:_w,d()):s!==_w},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,g){return n=p,a=g,d()}}l(g_t,"transformer");function v1e(){return g_t()(_w,_w)}l(v1e,"continuous");function m_t(t,e,r,n){var a=Vz(t,e,r),i;switch(n=J8(n==null?",f":n),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(i=P5t(a,s))&&(n.precision=i),p1e(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=R5t(a,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=M5t(a))&&(n.precision=i-(n.type==="%")*2);break}}return dm(n)}l(m_t,"tickFormat");function y_t(t){var e=t.domain;return t.ticks=function(r){var n=e();return FCt(n[0],n[n.length-1],r==null?10:r)},t.tickFormat=function(r,n){var a=e();return m_t(a[0],a[a.length-1],r==null?10:r,n)},t.nice=function(r){r==null&&(r=10);var n=e(),a=0,i=n.length-1,s=n[a],o=n[i],u,h,d=10;for(o<s&&(h=s,s=o,o=h,h=a,a=i,i=h);d-- >0;){if(h=Wz(s,o,r),h===u)return n[a]=s,n[i]=o,e(n);if(h>0)s=Math.floor(s/h)*h,o=Math.ceil(o/h)*h;else if(h<0)s=Math.ceil(s*h)/h,o=Math.floor(o*h)/h;else break;u=h}return t},t}l(y_t,"linearish");function kw(){var t=v1e();return t.copy=function(){return y1e(t,kw())},n7.apply(t,arguments),y_t(t)}l(kw,"linear");function v_t(t,e){t=t.slice();var r=0,n=t.length-1,a=t[r],i=t[n],s;return i<a&&(s=r,r=n,n=s,s=a,a=i,i=s),t[r]=e.floor(a),t[n]=e.ceil(i),t}l(v_t,"nice");const vH=new Date,bH=new Date;function ls(t,e,r,n){function a(i){return t(i=arguments.length===0?new Date:new Date(+i)),i}return l(a,"interval"),a.floor=i=>(t(i=new Date(+i)),i),a.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=(i,s)=>(e(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const u=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return u;let h;do u.push(h=new Date(+i)),e(i,o),t(i);while(h<i&&i<s);return u},a.filter=i=>ls(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!i(s););else for(;--o>=0;)for(;e(s,1),!i(s););}),r&&(a.count=(i,s)=>(vH.setTime(+i),bH.setTime(+s),t(vH),t(bH),Math.floor(r(vH,bH))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}l(ls,"timeInterval");const Aw=ls(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Aw.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?ls(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Aw),Aw.range;const nf=1e3,Kc=nf*60,af=Kc*60,sf=af*24,xH=sf*7,b1e=sf*30,wH=sf*365,j0=ls(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*nf)},(t,e)=>(e-t)/nf,t=>t.getUTCSeconds());j0.range;const W4=ls(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nf)},(t,e)=>{t.setTime(+t+e*Kc)},(t,e)=>(e-t)/Kc,t=>t.getMinutes());W4.range,ls(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Kc)},(t,e)=>(e-t)/Kc,t=>t.getUTCMinutes()).range;const V4=ls(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*nf-t.getMinutes()*Kc)},(t,e)=>{t.setTime(+t+e*af)},(t,e)=>(e-t)/af,t=>t.getHours());V4.range,ls(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*af)},(t,e)=>(e-t)/af,t=>t.getUTCHours()).range;const pm=ls(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Kc)/sf,t=>t.getDate()-1);pm.range;const TH=ls(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/sf,t=>t.getUTCDate()-1);TH.range,ls(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/sf,t=>Math.floor(t/sf)).range;function gm(t){return ls(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Kc)/xH)}l(gm,"timeWeekday");const G4=gm(0),q4=gm(1),x1e=gm(2),w1e=gm(3),mm=gm(4),T1e=gm(5),E1e=gm(6);G4.range,q4.range,x1e.range,w1e.range,mm.range,T1e.range,E1e.range;function ym(t){return ls(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/xH)}l(ym,"utcWeekday");const C1e=ym(0),a7=ym(1),b_t=ym(2),x_t=ym(3),Nw=ym(4),w_t=ym(5),T_t=ym(6);C1e.range,a7.range,b_t.range,x_t.range,Nw.range,w_t.range,T_t.range;const Y4=ls(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Y4.range,ls(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()).range;const of=ls(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());of.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:ls(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}),of.range;const vm=ls(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());vm.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:ls(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}),vm.range;function E_t(t,e,r,n,a,i){const s=[[j0,1,nf],[j0,5,5*nf],[j0,15,15*nf],[j0,30,30*nf],[i,1,Kc],[i,5,5*Kc],[i,15,15*Kc],[i,30,30*Kc],[a,1,af],[a,3,3*af],[a,6,6*af],[a,12,12*af],[n,1,sf],[n,2,2*sf],[r,1,xH],[e,1,b1e],[e,3,3*b1e],[t,1,wH]];function o(h,d,f){const p=d<h;p&&([h,d]=[d,h]);const g=f&&typeof f.range=="function"?f:u(h,d,f),m=g?g.range(h,+d+1):[];return p?m.reverse():m}l(o,"ticks");function u(h,d,f){const p=Math.abs(d-h)/f,g=Hz(([,,v])=>v).right(s,p);if(g===s.length)return t.every(Vz(h/wH,d/wH,f));if(g===0)return Aw.every(Math.max(Vz(h,d,f),1));const[m,y]=s[p/s[g-1][2]<s[g][2]/p?g-1:g];return m.every(y)}return l(u,"tickInterval"),[o,u]}l(E_t,"ticker");const[C_t,S_t]=E_t(of,Y4,G4,pm,V4,W4);function EH(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}l(EH,"localDate");function CH(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}l(CH,"utcDate");function U4(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}l(U4,"newDate");function __t(t){var e=t.dateTime,r=t.date,n=t.time,a=t.periods,i=t.days,s=t.shortDays,o=t.months,u=t.shortMonths,h=j4(a),d=K4(a),f=j4(i),p=K4(i),g=j4(s),m=K4(s),y=j4(o),v=K4(o),b=j4(u),w=K4(u),x={a:D,A:B,b:W,B:U,c:null,d:I1e,e:I1e,f:K_t,g:ikt,G:okt,H:Y_t,I:U_t,j:j_t,L:L1e,m:X_t,M:Z_t,p:j,q:V,Q:D1e,s:F1e,S:Q_t,u:J_t,U:ekt,V:tkt,w:rkt,W:nkt,x:null,X:null,y:akt,Y:skt,Z:lkt,"%":O1e},T={a:Y,A:H,b:q,B:Z,c:null,d:M1e,e:M1e,f:dkt,g:Tkt,G:Ckt,H:ckt,I:ukt,j:hkt,L:P1e,m:fkt,M:pkt,p:K,q:re,Q:D1e,s:F1e,S:gkt,u:mkt,U:ykt,V:vkt,w:bkt,W:xkt,x:null,X:null,y:wkt,Y:Ekt,Z:Skt,"%":O1e},C={a:I,A:L,b:R,B:O,c:M,d:A1e,e:A1e,f:W_t,g:k1e,G:_1e,H:N1e,I:N1e,j:F_t,L:H_t,m:D_t,M:B_t,p:A,q:O_t,Q:G_t,s:q_t,S:z_t,u:L_t,U:$_t,V:M_t,w:I_t,W:P_t,x:P,X:z,y:k1e,Y:_1e,Z:R_t,"%":V_t};x.x=S(r,x),x.X=S(n,x),x.c=S(e,x),T.x=S(r,T),T.X=S(n,T),T.c=S(e,T);function S(Q,te){return function(ee){var J=[],ae=-1,se=0,fe=Q.length,ve,de,Ee;for(ee instanceof Date||(ee=new Date(+ee));++ae<fe;)Q.charCodeAt(ae)===37&&(J.push(Q.slice(se,ae)),(de=S1e[ve=Q.charAt(++ae)])!=null?ve=Q.charAt(++ae):de=ve==="e"?" ":"0",(Ee=te[ve])&&(ve=Ee(ee,de)),J.push(ve),se=ae+1);return J.push(Q.slice(se,ae)),J.join("")}}l(S,"newFormat");function E(Q,te){return function(ee){var J=U4(1900,void 0,1),ae=k(J,Q,ee+="",0),se,fe;if(ae!=ee.length)return null;if("Q"in J)return new Date(J.Q);if("s"in J)return new Date(J.s*1e3+("L"in J?J.L:0));if(te&&!("Z"in J)&&(J.Z=0),"p"in J&&(J.H=J.H%12+J.p*12),J.m===void 0&&(J.m="q"in J?J.q:0),"V"in J){if(J.V<1||J.V>53)return null;"w"in J||(J.w=1),"Z"in J?(se=CH(U4(J.y,0,1)),fe=se.getUTCDay(),se=fe>4||fe===0?a7.ceil(se):a7(se),se=TH.offset(se,(J.V-1)*7),J.y=se.getUTCFullYear(),J.m=se.getUTCMonth(),J.d=se.getUTCDate()+(J.w+6)%7):(se=EH(U4(J.y,0,1)),fe=se.getDay(),se=fe>4||fe===0?q4.ceil(se):q4(se),se=pm.offset(se,(J.V-1)*7),J.y=se.getFullYear(),J.m=se.getMonth(),J.d=se.getDate()+(J.w+6)%7)}else("W"in J||"U"in J)&&("w"in J||(J.w="u"in J?J.u%7:"W"in J?1:0),fe="Z"in J?CH(U4(J.y,0,1)).getUTCDay():EH(U4(J.y,0,1)).getDay(),J.m=0,J.d="W"in J?(J.w+6)%7+J.W*7-(fe+5)%7:J.w+J.U*7-(fe+6)%7);return"Z"in J?(J.H+=J.Z/100|0,J.M+=J.Z%100,CH(J)):EH(J)}}l(E,"newParse");function k(Q,te,ee,J){for(var ae=0,se=te.length,fe=ee.length,ve,de;ae<se;){if(J>=fe)return-1;if(ve=te.charCodeAt(ae++),ve===37){if(ve=te.charAt(ae++),de=C[ve in S1e?te.charAt(ae++):ve],!de||(J=de(Q,ee,J))<0)return-1}else if(ve!=ee.charCodeAt(J++))return-1}return J}l(k,"parseSpecifier");function A(Q,te,ee){var J=h.exec(te.slice(ee));return J?(Q.p=d.get(J[0].toLowerCase()),ee+J[0].length):-1}l(A,"parsePeriod");function I(Q,te,ee){var J=g.exec(te.slice(ee));return J?(Q.w=m.get(J[0].toLowerCase()),ee+J[0].length):-1}l(I,"parseShortWeekday");function L(Q,te,ee){var J=f.exec(te.slice(ee));return J?(Q.w=p.get(J[0].toLowerCase()),ee+J[0].length):-1}l(L,"parseWeekday");function R(Q,te,ee){var J=b.exec(te.slice(ee));return J?(Q.m=w.get(J[0].toLowerCase()),ee+J[0].length):-1}l(R,"parseShortMonth");function O(Q,te,ee){var J=y.exec(te.slice(ee));return J?(Q.m=v.get(J[0].toLowerCase()),ee+J[0].length):-1}l(O,"parseMonth");function M(Q,te,ee){return k(Q,e,te,ee)}l(M,"parseLocaleDateTime");function P(Q,te,ee){return k(Q,r,te,ee)}l(P,"parseLocaleDate");function z(Q,te,ee){return k(Q,n,te,ee)}l(z,"parseLocaleTime");function D(Q){return s[Q.getDay()]}l(D,"formatShortWeekday");function B(Q){return i[Q.getDay()]}l(B,"formatWeekday");function W(Q){return u[Q.getMonth()]}l(W,"formatShortMonth");function U(Q){return o[Q.getMonth()]}l(U,"formatMonth");function j(Q){return a[+(Q.getHours()>=12)]}l(j,"formatPeriod");function V(Q){return 1+~~(Q.getMonth()/3)}l(V,"formatQuarter");function Y(Q){return s[Q.getUTCDay()]}l(Y,"formatUTCShortWeekday");function H(Q){return i[Q.getUTCDay()]}l(H,"formatUTCWeekday");function q(Q){return u[Q.getUTCMonth()]}l(q,"formatUTCShortMonth");function Z(Q){return o[Q.getUTCMonth()]}l(Z,"formatUTCMonth");function K(Q){return a[+(Q.getUTCHours()>=12)]}l(K,"formatUTCPeriod");function re(Q){return 1+~~(Q.getUTCMonth()/3)}return l(re,"formatUTCQuarter"),{format:l(function(Q){var te=S(Q+="",x);return te.toString=function(){return Q},te},"format"),parse:l(function(Q){var te=E(Q+="",!1);return te.toString=function(){return Q},te},"parse"),utcFormat:l(function(Q){var te=S(Q+="",T);return te.toString=function(){return Q},te},"utcFormat"),utcParse:l(function(Q){var te=E(Q+="",!0);return te.toString=function(){return Q},te},"utcParse")}}l(__t,"formatLocale");var S1e={"-":"",_:" ",0:"0"},Ls=/^\s*\d+/,k_t=/^%/,A_t=/[\\^$*+?|[\]().{}]/g;function qn(t,e,r){var n=t<0?"-":"",a=(n?-t:t)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(e)+a:a)}l(qn,"pad$1");function N_t(t){return t.replace(A_t,"\\$&")}l(N_t,"requote");function j4(t){return new RegExp("^(?:"+t.map(N_t).join("|")+")","i")}l(j4,"formatRe");function K4(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}l(K4,"formatLookup");function I_t(t,e,r){var n=Ls.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}l(I_t,"parseWeekdayNumberSunday");function L_t(t,e,r){var n=Ls.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}l(L_t,"parseWeekdayNumberMonday");function $_t(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}l($_t,"parseWeekNumberSunday");function M_t(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}l(M_t,"parseWeekNumberISO");function P_t(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}l(P_t,"parseWeekNumberMonday");function _1e(t,e,r){var n=Ls.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}l(_1e,"parseFullYear");function k1e(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}l(k1e,"parseYear");function R_t(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}l(R_t,"parseZone");function O_t(t,e,r){var n=Ls.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}l(O_t,"parseQuarter");function D_t(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}l(D_t,"parseMonthNumber");function A1e(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}l(A1e,"parseDayOfMonth");function F_t(t,e,r){var n=Ls.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}l(F_t,"parseDayOfYear");function N1e(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}l(N1e,"parseHour24");function B_t(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}l(B_t,"parseMinutes");function z_t(t,e,r){var n=Ls.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}l(z_t,"parseSeconds");function H_t(t,e,r){var n=Ls.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}l(H_t,"parseMilliseconds");function W_t(t,e,r){var n=Ls.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}l(W_t,"parseMicroseconds");function V_t(t,e,r){var n=k_t.exec(e.slice(r,r+1));return n?r+n[0].length:-1}l(V_t,"parseLiteralPercent");function G_t(t,e,r){var n=Ls.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}l(G_t,"parseUnixTimestamp");function q_t(t,e,r){var n=Ls.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}l(q_t,"parseUnixTimestampSeconds");function I1e(t,e){return qn(t.getDate(),e,2)}l(I1e,"formatDayOfMonth");function Y_t(t,e){return qn(t.getHours(),e,2)}l(Y_t,"formatHour24");function U_t(t,e){return qn(t.getHours()%12||12,e,2)}l(U_t,"formatHour12");function j_t(t,e){return qn(1+pm.count(of(t),t),e,3)}l(j_t,"formatDayOfYear");function L1e(t,e){return qn(t.getMilliseconds(),e,3)}l(L1e,"formatMilliseconds");function K_t(t,e){return L1e(t,e)+"000"}l(K_t,"formatMicroseconds");function X_t(t,e){return qn(t.getMonth()+1,e,2)}l(X_t,"formatMonthNumber");function Z_t(t,e){return qn(t.getMinutes(),e,2)}l(Z_t,"formatMinutes");function Q_t(t,e){return qn(t.getSeconds(),e,2)}l(Q_t,"formatSeconds");function J_t(t){var e=t.getDay();return e===0?7:e}l(J_t,"formatWeekdayNumberMonday");function ekt(t,e){return qn(G4.count(of(t)-1,t),e,2)}l(ekt,"formatWeekNumberSunday");function $1e(t){var e=t.getDay();return e>=4||e===0?mm(t):mm.ceil(t)}l($1e,"dISO");function tkt(t,e){return t=$1e(t),qn(mm.count(of(t),t)+(of(t).getDay()===4),e,2)}l(tkt,"formatWeekNumberISO");function rkt(t){return t.getDay()}l(rkt,"formatWeekdayNumberSunday");function nkt(t,e){return qn(q4.count(of(t)-1,t),e,2)}l(nkt,"formatWeekNumberMonday");function akt(t,e){return qn(t.getFullYear()%100,e,2)}l(akt,"formatYear");function ikt(t,e){return t=$1e(t),qn(t.getFullYear()%100,e,2)}l(ikt,"formatYearISO");function skt(t,e){return qn(t.getFullYear()%1e4,e,4)}l(skt,"formatFullYear");function okt(t,e){var r=t.getDay();return t=r>=4||r===0?mm(t):mm.ceil(t),qn(t.getFullYear()%1e4,e,4)}l(okt,"formatFullYearISO");function lkt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+qn(e/60|0,"0",2)+qn(e%60,"0",2)}l(lkt,"formatZone");function M1e(t,e){return qn(t.getUTCDate(),e,2)}l(M1e,"formatUTCDayOfMonth");function ckt(t,e){return qn(t.getUTCHours(),e,2)}l(ckt,"formatUTCHour24");function ukt(t,e){return qn(t.getUTCHours()%12||12,e,2)}l(ukt,"formatUTCHour12");function hkt(t,e){return qn(1+TH.count(vm(t),t),e,3)}l(hkt,"formatUTCDayOfYear");function P1e(t,e){return qn(t.getUTCMilliseconds(),e,3)}l(P1e,"formatUTCMilliseconds");function dkt(t,e){return P1e(t,e)+"000"}l(dkt,"formatUTCMicroseconds");function fkt(t,e){return qn(t.getUTCMonth()+1,e,2)}l(fkt,"formatUTCMonthNumber");function pkt(t,e){return qn(t.getUTCMinutes(),e,2)}l(pkt,"formatUTCMinutes");function gkt(t,e){return qn(t.getUTCSeconds(),e,2)}l(gkt,"formatUTCSeconds");function mkt(t){var e=t.getUTCDay();return e===0?7:e}l(mkt,"formatUTCWeekdayNumberMonday");function ykt(t,e){return qn(C1e.count(vm(t)-1,t),e,2)}l(ykt,"formatUTCWeekNumberSunday");function R1e(t){var e=t.getUTCDay();return e>=4||e===0?Nw(t):Nw.ceil(t)}l(R1e,"UTCdISO");function vkt(t,e){return t=R1e(t),qn(Nw.count(vm(t),t)+(vm(t).getUTCDay()===4),e,2)}l(vkt,"formatUTCWeekNumberISO");function bkt(t){return t.getUTCDay()}l(bkt,"formatUTCWeekdayNumberSunday");function xkt(t,e){return qn(a7.count(vm(t)-1,t),e,2)}l(xkt,"formatUTCWeekNumberMonday");function wkt(t,e){return qn(t.getUTCFullYear()%100,e,2)}l(wkt,"formatUTCYear");function Tkt(t,e){return t=R1e(t),qn(t.getUTCFullYear()%100,e,2)}l(Tkt,"formatUTCYearISO");function Ekt(t,e){return qn(t.getUTCFullYear()%1e4,e,4)}l(Ekt,"formatUTCFullYear");function Ckt(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Nw(t):Nw.ceil(t),qn(t.getUTCFullYear()%1e4,e,4)}l(Ckt,"formatUTCFullYearISO");function Skt(){return"+0000"}l(Skt,"formatUTCZone");function O1e(){return"%"}l(O1e,"formatLiteralPercent");function D1e(t){return+t}l(D1e,"formatUnixTimestamp");function F1e(t){return Math.floor(+t/1e3)}l(F1e,"formatUnixTimestampSeconds");var Iw,i7;_kt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function _kt(t){return Iw=__t(t),i7=Iw.format,Iw.parse,Iw.utcFormat,Iw.utcParse,Iw}l(_kt,"defaultLocale");function kkt(t){return new Date(t)}l(kkt,"date");function Akt(t){return t instanceof Date?+t:+new Date(+t)}l(Akt,"number$2");function B1e(t,e,r,n,a,i,s,o,u,h){var d=v1e(),f=d.invert,p=d.domain,g=h(".%L"),m=h(":%S"),y=h("%I:%M"),v=h("%I %p"),b=h("%a %d"),w=h("%b %d"),x=h("%B"),T=h("%Y");function C(S){return(u(S)<S?g:o(S)<S?m:s(S)<S?y:i(S)<S?v:n(S)<S?a(S)<S?b:w:r(S)<S?x:T)(S)}return l(C,"tickFormat"),d.invert=function(S){return new Date(f(S))},d.domain=function(S){return arguments.length?p(Array.from(S,Akt)):p().map(kkt)},d.ticks=function(S){var E=p();return t(E[0],E[E.length-1],S==null?10:S)},d.tickFormat=function(S,E){return E==null?C:h(E)},d.nice=function(S){var E=p();return(!S||typeof S.range!="function")&&(S=e(E[0],E[E.length-1],S==null?10:S)),S?p(v_t(E,S)):d},d.copy=function(){return y1e(d,B1e(t,e,r,n,a,i,s,o,u,h))},d}l(B1e,"calendar");function Nkt(){return n7.apply(B1e(C_t,S_t,of,Y4,G4,pm,V4,W4,j0,i7).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}l(Nkt,"time");function Ikt(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(n*6,++n*6);return r}l(Ikt,"colors$1");var Lkt=Ikt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Pi(t){return l(function(){return t},"constant")}l(Pi,"constant$4");const z1e=Math.abs,Io=Math.atan2,bm=Math.cos,$kt=Math.max,SH=Math.min,Fh=Math.sin,Lw=Math.sqrt,Lo=1e-12,X4=Math.PI,s7=X4/2,o7=2*X4;function Mkt(t){return t>1?0:t<-1?X4:Math.acos(t)}l(Mkt,"acos");function H1e(t){return t>=1?s7:t<=-1?-s7:Math.asin(t)}l(H1e,"asin");function W1e(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new C5t(e)}l(W1e,"withPath");function Pkt(t){return t.innerRadius}l(Pkt,"arcInnerRadius");function Rkt(t){return t.outerRadius}l(Rkt,"arcOuterRadius");function Okt(t){return t.startAngle}l(Okt,"arcStartAngle");function Dkt(t){return t.endAngle}l(Dkt,"arcEndAngle");function Fkt(t){return t&&t.padAngle}l(Fkt,"arcPadAngle");function Bkt(t,e,r,n,a,i,s,o){var u=r-t,h=n-e,d=s-a,f=o-i,p=f*u-d*h;if(!(p*p<Lo))return p=(d*(e-i)-f*(t-a))/p,[t+p*u,e+p*h]}l(Bkt,"intersect");function l7(t,e,r,n,a,i,s){var o=t-r,u=e-n,h=(s?i:-i)/Lw(o*o+u*u),d=h*u,f=-h*o,p=t+d,g=e+f,m=r+d,y=n+f,v=(p+m)/2,b=(g+y)/2,w=m-p,x=y-g,T=w*w+x*x,C=a-i,S=p*y-m*g,E=(x<0?-1:1)*Lw($kt(0,C*C*T-S*S)),k=(S*x-w*E)/T,A=(-S*w-x*E)/T,I=(S*x+w*E)/T,L=(-S*w+x*E)/T,R=k-v,O=A-b,M=I-v,P=L-b;return R*R+O*O>M*M+P*P&&(k=I,A=L),{cx:k,cy:A,x01:-d,y01:-f,x11:k*(a/C-1),y11:A*(a/C-1)}}l(l7,"cornerTangents");function $w(){var t=Pkt,e=Rkt,r=Pi(0),n=null,a=Okt,i=Dkt,s=Fkt,o=null,u=W1e(h);function h(){var d,f,p=+t.apply(this,arguments),g=+e.apply(this,arguments),m=a.apply(this,arguments)-s7,y=i.apply(this,arguments)-s7,v=z1e(y-m),b=y>m;if(o||(o=d=u()),g<p&&(f=g,g=p,p=f),!(g>Lo))o.moveTo(0,0);else if(v>o7-Lo)o.moveTo(g*bm(m),g*Fh(m)),o.arc(0,0,g,m,y,!b),p>Lo&&(o.moveTo(p*bm(y),p*Fh(y)),o.arc(0,0,p,y,m,b));else{var w=m,x=y,T=m,C=y,S=v,E=v,k=s.apply(this,arguments)/2,A=k>Lo&&(n?+n.apply(this,arguments):Lw(p*p+g*g)),I=SH(z1e(g-p)/2,+r.apply(this,arguments)),L=I,R=I,O,M;if(A>Lo){var P=H1e(A/p*Fh(k)),z=H1e(A/g*Fh(k));(S-=P*2)>Lo?(P*=b?1:-1,T+=P,C-=P):(S=0,T=C=(m+y)/2),(E-=z*2)>Lo?(z*=b?1:-1,w+=z,x-=z):(E=0,w=x=(m+y)/2)}var D=g*bm(w),B=g*Fh(w),W=p*bm(C),U=p*Fh(C);if(I>Lo){var j=g*bm(x),V=g*Fh(x),Y=p*bm(T),H=p*Fh(T),q;if(v<X4)if(q=Bkt(D,B,Y,H,j,V,W,U)){var Z=D-q[0],K=B-q[1],re=j-q[0],Q=V-q[1],te=1/Fh(Mkt((Z*re+K*Q)/(Lw(Z*Z+K*K)*Lw(re*re+Q*Q)))/2),ee=Lw(q[0]*q[0]+q[1]*q[1]);L=SH(I,(p-ee)/(te-1)),R=SH(I,(g-ee)/(te+1))}else L=R=0}E>Lo?R>Lo?(O=l7(Y,H,D,B,g,R,b),M=l7(j,V,W,U,g,R,b),o.moveTo(O.cx+O.x01,O.cy+O.y01),R<I?o.arc(O.cx,O.cy,R,Io(O.y01,O.x01),Io(M.y01,M.x01),!b):(o.arc(O.cx,O.cy,R,Io(O.y01,O.x01),Io(O.y11,O.x11),!b),o.arc(0,0,g,Io(O.cy+O.y11,O.cx+O.x11),Io(M.cy+M.y11,M.cx+M.x11),!b),o.arc(M.cx,M.cy,R,Io(M.y11,M.x11),Io(M.y01,M.x01),!b))):(o.moveTo(D,B),o.arc(0,0,g,w,x,!b)):o.moveTo(D,B),!(p>Lo)||!(S>Lo)?o.lineTo(W,U):L>Lo?(O=l7(W,U,j,V,p,-L,b),M=l7(D,B,Y,H,p,-L,b),o.lineTo(O.cx+O.x01,O.cy+O.y01),L<I?o.arc(O.cx,O.cy,L,Io(O.y01,O.x01),Io(M.y01,M.x01),!b):(o.arc(O.cx,O.cy,L,Io(O.y01,O.x01),Io(O.y11,O.x11),!b),o.arc(0,0,p,Io(O.cy+O.y11,O.cx+O.x11),Io(M.cy+M.y11,M.cx+M.x11),b),o.arc(M.cx,M.cy,L,Io(M.y11,M.x11),Io(M.y01,M.x01),!b))):o.arc(0,0,p,C,T,b)}if(o.closePath(),d)return o=null,d+""||null}return l(h,"arc"),h.centroid=function(){var d=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+a.apply(this,arguments)+ +i.apply(this,arguments))/2-X4/2;return[bm(f)*d,Fh(f)*d]},h.innerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:Pi(+d),h):t},h.outerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:Pi(+d),h):e},h.cornerRadius=function(d){return arguments.length?(r=typeof d=="function"?d:Pi(+d),h):r},h.padRadius=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Pi(+d),h):n},h.startAngle=function(d){return arguments.length?(a=typeof d=="function"?d:Pi(+d),h):a},h.endAngle=function(d){return arguments.length?(i=typeof d=="function"?d:Pi(+d),h):i},h.padAngle=function(d){return arguments.length?(s=typeof d=="function"?d:Pi(+d),h):s},h.context=function(d){return arguments.length?(o=d==null?null:d,h):o},h}l($w,"d3arc");function V1e(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}l(V1e,"array$1");function G1e(t){this._context=t}l(G1e,"Linear"),G1e.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}},"point")};function Z4(t){return new G1e(t)}l(Z4,"curveLinear");function zkt(t){return t[0]}l(zkt,"x$4");function Hkt(t){return t[1]}l(Hkt,"y$4");function Q4(t,e){var r=Pi(!0),n=null,a=Z4,i=null,s=W1e(o);t=typeof t=="function"?t:t===void 0?zkt:Pi(t),e=typeof e=="function"?e:e===void 0?Hkt:Pi(e);function o(u){var h,d=(u=V1e(u)).length,f,p=!1,g;for(n==null&&(i=a(g=s())),h=0;h<=d;++h)!(h<d&&r(f=u[h],h,u))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+t(f,h,u),+e(f,h,u));if(g)return i=null,g+""||null}return l(o,"line"),o.x=function(u){return arguments.length?(t=typeof u=="function"?u:Pi(+u),o):t},o.y=function(u){return arguments.length?(e=typeof u=="function"?u:Pi(+u),o):e},o.defined=function(u){return arguments.length?(r=typeof u=="function"?u:Pi(!!u),o):r},o.curve=function(u){return arguments.length?(a=u,n!=null&&(i=a(n)),o):a},o.context=function(u){return arguments.length?(u==null?n=i=null:i=a(n=u),o):n},o}l(Q4,"line$1");function Wkt(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}l(Wkt,"descending$1");function Vkt(t){return t}l(Vkt,"identity$4");function Gkt(){var t=Vkt,e=Wkt,r=null,n=Pi(0),a=Pi(o7),i=Pi(0);function s(o){var u,h=(o=V1e(o)).length,d,f,p=0,g=new Array(h),m=new Array(h),y=+n.apply(this,arguments),v=Math.min(o7,Math.max(-o7,a.apply(this,arguments)-y)),b,w=Math.min(Math.abs(v)/h,i.apply(this,arguments)),x=w*(v<0?-1:1),T;for(u=0;u<h;++u)(T=m[g[u]=u]=+t(o[u],u,o))>0&&(p+=T);for(e!=null?g.sort(function(C,S){return e(m[C],m[S])}):r!=null&&g.sort(function(C,S){return r(o[C],o[S])}),u=0,f=p?(v-h*x)/p:0;u<h;++u,y=b)d=g[u],T=m[d],b=y+(T>0?T*f:0)+x,m[d]={data:o[d],index:u,value:T,startAngle:y,endAngle:b,padAngle:w};return m}return l(s,"pie"),s.value=function(o){return arguments.length?(t=typeof o=="function"?o:Pi(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Pi(+o),s):n},s.endAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Pi(+o),s):a},s.padAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Pi(+o),s):i},s}l(Gkt,"d3pie");const Ere=class Ere{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}};l(Ere,"Bump");let c7=Ere;function q1e(t){return new c7(t,!0)}l(q1e,"bumpX");function Y1e(t){return new c7(t,!1)}l(Y1e,"bumpY");function K0(){}l(K0,"noop$5");function u7(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}l(u7,"point$5");function h7(t){this._context=t}l(h7,"Basis"),h7.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 3:u7(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:u7(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function J4(t){return new h7(t)}l(J4,"curveBasis");function U1e(t){this._context=t}l(U1e,"BasisClosed"),U1e.prototype={areaStart:K0,areaEnd:K0,lineStart:l(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:u7(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function qkt(t){return new U1e(t)}l(qkt,"curveBasisClosed");function j1e(t){this._context=t}l(j1e,"BasisOpen"),j1e.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:u7(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")};function Ykt(t){return new j1e(t)}l(Ykt,"curveBasisOpen");function K1e(t,e){this._basis=new h7(t),this._beta=e}l(K1e,"Bundle"),K1e.prototype={lineStart:l(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:l(function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],a=e[0],i=t[r]-n,s=e[r]-a,o=-1,u;++o<=r;)u=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+u*i),this._beta*e[o]+(1-this._beta)*(a+u*s));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:l(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};var Ukt=l(function t(e){function r(n){return e===1?new h7(n):new K1e(n,e)}return l(r,"bundle"),r.beta=function(n){return t(+n)},r},"custom")(.85);function d7(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}l(d7,"point$4");function _H(t,e){this._context=t,this._k=(1-e)/6}l(_H,"Cardinal"),_H.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:d7(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:d7(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var X1e=l(function t(e){function r(n){return new _H(n,e)}return l(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0);function kH(t,e){this._context=t,this._k=(1-e)/6}l(kH,"CardinalClosed"),kH.prototype={areaStart:K0,areaEnd:K0,lineStart:l(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:d7(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var jkt=l(function t(e){function r(n){return new kH(n,e)}return l(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0);function AH(t,e){this._context=t,this._k=(1-e)/6}l(AH,"CardinalOpen"),AH.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:d7(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Kkt=l(function t(e){function r(n){return new AH(n,e)}return l(r,"cardinal"),r.tension=function(n){return t(+n)},r},"custom")(0);function NH(t,e,r){var n=t._x1,a=t._y1,i=t._x2,s=t._y2;if(t._l01_a>Lo){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,a=(a*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Lo){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,d=3*t._l23_a*(t._l23_a+t._l12_a);i=(i*h+t._x1*t._l23_2a-e*t._l12_2a)/d,s=(s*h+t._y1*t._l23_2a-r*t._l12_2a)/d}t._context.bezierCurveTo(n,a,i,s,t._x2,t._y2)}l(NH,"point$3");function Z1e(t,e){this._context=t,this._alpha=e}l(Z1e,"CatmullRom"),Z1e.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:NH(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Q1e=l(function t(e){function r(n){return e?new Z1e(n,e):new _H(n,0)}return l(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5);function J1e(t,e){this._context=t,this._alpha=e}l(J1e,"CatmullRomClosed"),J1e.prototype={areaStart:K0,areaEnd:K0,lineStart:l(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:NH(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Xkt=l(function t(e){function r(n){return e?new J1e(n,e):new kH(n,0)}return l(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5);function eye(t,e){this._context=t,this._alpha=e}l(eye,"CatmullRomOpen"),eye.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:l(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:NH(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")};var Zkt=l(function t(e){function r(n){return e?new eye(n,e):new AH(n,0)}return l(r,"catmullRom"),r.alpha=function(n){return t(+n)},r},"custom")(.5);function tye(t){this._context=t}l(tye,"LinearClosed"),tye.prototype={areaStart:K0,areaEnd:K0,lineStart:l(function(){this._point=0},"lineStart"),lineEnd:l(function(){this._point&&this._context.closePath()},"lineEnd"),point:l(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")};function Qkt(t){return new tye(t)}l(Qkt,"curveLinearClosed");function rye(t){return t<0?-1:1}l(rye,"sign");function nye(t,e,r){var n=t._x1-t._x0,a=e-t._x1,i=(t._y1-t._y0)/(n||a<0&&-0),s=(r-t._y1)/(a||n<0&&-0),o=(i*a+s*n)/(n+a);return(rye(i)+rye(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}l(nye,"slope3");function aye(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}l(aye,"slope2");function IH(t,e,r){var n=t._x0,a=t._y0,i=t._x1,s=t._y1,o=(i-n)/3;t._context.bezierCurveTo(n+o,a+o*e,i-o,s-o*r,i,s)}l(IH,"point$2");function f7(t){this._context=t}l(f7,"MonotoneX"),f7.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:l(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:IH(this,this._t0,aye(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:l(function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,IH(this,aye(this,r=nye(this,t,e)),r);break;default:IH(this,this._t0,r=nye(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")};function iye(t){this._context=new sye(t)}l(iye,"MonotoneY"),(iye.prototype=Object.create(f7.prototype)).point=function(t,e){f7.prototype.point.call(this,e,t)};function sye(t){this._context=t}l(sye,"ReflectContext"),sye.prototype={moveTo:l(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:l(function(){this._context.closePath()},"closePath"),lineTo:l(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:l(function(t,e,r,n,a,i){this._context.bezierCurveTo(e,t,n,r,i,a)},"bezierCurveTo")};function oye(t){return new f7(t)}l(oye,"monotoneX");function lye(t){return new iye(t)}l(lye,"monotoneY");function cye(t){this._context=t}l(cye,"Natural"),cye.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:l(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=uye(t),a=uye(e),i=0,s=1;s<r;++i,++s)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},"lineEnd"),point:l(function(t,e){this._x.push(+t),this._y.push(+e)},"point")};function uye(t){var e,r=t.length-1,n,a=new Array(r),i=new Array(r),s=new Array(r);for(a[0]=0,i[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)a[e]=1,i[e]=4,s[e]=4*t[e]+2*t[e+1];for(a[r-1]=2,i[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=a[e]/i[e-1],i[e]-=n,s[e]-=n*s[e-1];for(a[r-1]=s[r-1]/i[r-1],e=r-2;e>=0;--e)a[e]=(s[e]-a[e+1])/i[e];for(i[r-1]=(t[r]+a[r-1])/2,e=0;e<r-1;++e)i[e]=2*t[e+1]-a[e+1];return[a,i]}l(uye,"controlPoints$1");function hye(t){return new cye(t)}l(hye,"curveNatural");function p7(t,e){this._context=t,this._t=e}l(p7,"Step"),p7.prototype={areaStart:l(function(){this._line=0},"areaStart"),areaEnd:l(function(){this._line=NaN},"areaEnd"),lineStart:l(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:l(function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:l(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e},"point")};function dye(t){return new p7(t,.5)}l(dye,"curveStep");function fye(t){return new p7(t,0)}l(fye,"stepBefore");function pye(t){return new p7(t,1)}l(pye,"stepAfter");function e3(t,e,r){this.k=t,this.x=e,this.y=r}l(e3,"Transform"),e3.prototype={constructor:e3,scale:l(function(t){return t===1?this:new e3(this.k*t,this.x,this.y)},"scale"),translate:l(function(t,e){return t===0&e===0?this:new e3(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:l(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:l(function(t){return t*this.k+this.x},"applyX"),applyY:l(function(t){return t*this.k+this.y},"applyY"),invert:l(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:l(function(t){return(t-this.x)/this.k},"invertX"),invertY:l(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:l(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:l(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:l(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},e3.prototype;var $o=_(t=>{var a,i;const{securityLevel:e}=ft();let r=Yt("body");if(e==="sandbox"){const o=(i=(a=Yt(`#i${t}`).node())==null?void 0:a.contentDocument)!=null?i:document;r=Yt(o.body)}return r.select(`#${t}`)},"selectSvgElement");function LH(t){return typeof t=="undefined"||t===null}l(LH,"isNothing"),_(LH,"isNothing");function gye(t){return typeof t=="object"&&t!==null}l(gye,"isObject$2"),_(gye,"isObject");function mye(t){return Array.isArray(t)?t:LH(t)?[]:[t]}l(mye,"toArray"),_(mye,"toArray");function yye(t,e){var r,n,a,i;if(e)for(i=Object.keys(e),r=0,n=i.length;r<n;r+=1)a=i[r],t[a]=e[a];return t}l(yye,"extend$1"),_(yye,"extend");function vye(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}l(vye,"repeat"),_(vye,"repeat");function bye(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}l(bye,"isNegativeZero"),_(bye,"isNegativeZero");var Jkt=LH,e6t=gye,t6t=mye,r6t=vye,n6t=bye,a6t=yye,cs={isNothing:Jkt,isObject:e6t,toArray:t6t,repeat:r6t,isNegativeZero:n6t,extend:a6t};function $H(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
||
|
||
`+t.mark.snippet),n+" "+r):n}l($H,"formatError"),_($H,"formatError");function Mw(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=$H(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}l(Mw,"YAMLException$1"),_(Mw,"YAMLException$1"),Mw.prototype=Object.create(Error.prototype),Mw.prototype.constructor=Mw,Mw.prototype.toString=_(l(function(e){return this.name+": "+$H(this,e)},"toString"),"toString");var zl=Mw;function g7(t,e,r,n,a){var i="",s="",o=Math.floor(a/2)-1;return n-e>o&&(i=" ... ",e=n-o+i.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:i+t.slice(e,r).replace(/\t/g,"→")+s,pos:n-e+i.length}}l(g7,"getLine"),_(g7,"getLine");function m7(t,e){return cs.repeat(" ",e-t.length)+t}l(m7,"padStart"),_(m7,"padStart");function xye(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],a=[],i,s=-1;i=r.exec(t.buffer);)a.push(i.index),n.push(i.index+i[0].length),t.position<=i.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",u,h,d=Math.min(t.line+e.linesAfter,a.length).toString().length,f=e.maxLength-(e.indent+d+3);for(u=1;u<=e.linesBefore&&!(s-u<0);u++)h=g7(t.buffer,n[s-u],a[s-u],t.position-(n[s]-n[s-u]),f),o=cs.repeat(" ",e.indent)+m7((t.line-u+1).toString(),d)+" | "+h.str+`
|
||
`+o;for(h=g7(t.buffer,n[s],a[s],t.position,f),o+=cs.repeat(" ",e.indent)+m7((t.line+1).toString(),d)+" | "+h.str+`
|
||
`,o+=cs.repeat("-",e.indent+d+3+h.pos)+`^
|
||
`,u=1;u<=e.linesAfter&&!(s+u>=a.length);u++)h=g7(t.buffer,n[s+u],a[s+u],t.position-(n[s]-n[s+u]),f),o+=cs.repeat(" ",e.indent)+m7((t.line+u+1).toString(),d)+" | "+h.str+`
|
||
`;return o.replace(/\n$/,"")}l(xye,"makeSnippet"),_(xye,"makeSnippet");var i6t=xye,s6t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],o6t=["scalar","sequence","mapping"];function wye(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}l(wye,"compileStyleAliases"),_(wye,"compileStyleAliases");function Tye(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(s6t.indexOf(r)===-1)throw new zl('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=wye(e.styleAliases||null),o6t.indexOf(this.kind)===-1)throw new zl('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}l(Tye,"Type$1$1"),_(Tye,"Type$1");var Mo=Tye;function MH(t,e){var r=[];return t[e].forEach(function(n){var a=r.length;r.forEach(function(i,s){i.tag===n.tag&&i.kind===n.kind&&i.multi===n.multi&&(a=s)}),r[a]=n}),r}l(MH,"compileList"),_(MH,"compileList");function Eye(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(a){a.multi?(t.multi[a.kind].push(a),t.multi.fallback.push(a)):t[a.kind][a.tag]=t.fallback[a.tag]=a}for(l(n,"collectType"),_(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}l(Eye,"compileMap"),_(Eye,"compileMap");function y7(t){return this.extend(t)}l(y7,"Schema$1"),_(y7,"Schema$1"),y7.prototype.extend=_(l(function(e){var r=[],n=[];if(e instanceof Mo)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new zl("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(i){if(!(i instanceof Mo))throw new zl("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(i.loadKind&&i.loadKind!=="scalar")throw new zl("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(i.multi)throw new zl("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(i){if(!(i instanceof Mo))throw new zl("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(y7.prototype);return a.implicit=(this.implicit||[]).concat(r),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=MH(a,"implicit"),a.compiledExplicit=MH(a,"explicit"),a.compiledTypeMap=Eye(a.compiledImplicit,a.compiledExplicit),a},"extend2"),"extend");var l6t=y7,c6t=new Mo("tag:yaml.org,2002:str",{kind:"scalar",construct:_(function(t){return t!==null?t:""},"construct")}),u6t=new Mo("tag:yaml.org,2002:seq",{kind:"sequence",construct:_(function(t){return t!==null?t:[]},"construct")}),h6t=new Mo("tag:yaml.org,2002:map",{kind:"mapping",construct:_(function(t){return t!==null?t:{}},"construct")}),d6t=new l6t({explicit:[c6t,u6t,h6t]});function Cye(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}l(Cye,"resolveYamlNull"),_(Cye,"resolveYamlNull");function Sye(){return null}l(Sye,"constructYamlNull"),_(Sye,"constructYamlNull");function _ye(t){return t===null}l(_ye,"isNull"),_(_ye,"isNull");var f6t=new Mo("tag:yaml.org,2002:null",{kind:"scalar",resolve:Cye,construct:Sye,predicate:_ye,represent:{canonical:_(function(){return"~"},"canonical"),lowercase:_(function(){return"null"},"lowercase"),uppercase:_(function(){return"NULL"},"uppercase"),camelcase:_(function(){return"Null"},"camelcase"),empty:_(function(){return""},"empty")},defaultStyle:"lowercase"});function kye(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}l(kye,"resolveYamlBoolean"),_(kye,"resolveYamlBoolean");function Aye(t){return t==="true"||t==="True"||t==="TRUE"}l(Aye,"constructYamlBoolean"),_(Aye,"constructYamlBoolean");function Nye(t){return Object.prototype.toString.call(t)==="[object Boolean]"}l(Nye,"isBoolean"),_(Nye,"isBoolean");var p6t=new Mo("tag:yaml.org,2002:bool",{kind:"scalar",resolve:kye,construct:Aye,predicate:Nye,represent:{lowercase:_(function(t){return t?"true":"false"},"lowercase"),uppercase:_(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:_(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function Iye(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}l(Iye,"isHexCode"),_(Iye,"isHexCode");function Lye(t){return 48<=t&&t<=55}l(Lye,"isOctCode"),_(Lye,"isOctCode");function $ye(t){return 48<=t&&t<=57}l($ye,"isDecCode"),_($ye,"isDecCode");function Mye(t){if(t===null)return!1;var e=t.length,r=0,n=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!Iye(t.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!Lye(t.charCodeAt(r)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;r<e;r++)if(a=t[r],a!=="_"){if(!$ye(t.charCodeAt(r)))return!1;n=!0}return!(!n||a==="_")}l(Mye,"resolveYamlInteger"),_(Mye,"resolveYamlInteger");function Pye(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}l(Pye,"constructYamlInteger"),_(Pye,"constructYamlInteger");function Rye(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!cs.isNegativeZero(t)}l(Rye,"isInteger"),_(Rye,"isInteger");var g6t=new Mo("tag:yaml.org,2002:int",{kind:"scalar",resolve:Mye,construct:Pye,predicate:Rye,represent:{binary:_(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:_(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:_(function(t){return t.toString(10)},"decimal"),hexadecimal:_(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),m6t=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Oye(t){return!(t===null||!m6t.test(t)||t[t.length-1]==="_")}l(Oye,"resolveYamlFloat"),_(Oye,"resolveYamlFloat");function Dye(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}l(Dye,"constructYamlFloat"),_(Dye,"constructYamlFloat");var y6t=/^[-+]?[0-9]+e/;function Fye(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(cs.isNegativeZero(t))return"-0.0";return r=t.toString(10),y6t.test(r)?r.replace("e",".e"):r}l(Fye,"representYamlFloat"),_(Fye,"representYamlFloat");function Bye(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||cs.isNegativeZero(t))}l(Bye,"isFloat"),_(Bye,"isFloat");var v6t=new Mo("tag:yaml.org,2002:float",{kind:"scalar",resolve:Oye,construct:Dye,predicate:Bye,represent:Fye,defaultStyle:"lowercase"}),zye=d6t.extend({implicit:[f6t,p6t,g6t,v6t]}),b6t=zye,Hye=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Wye=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 Vye(t){return t===null?!1:Hye.exec(t)!==null||Wye.exec(t)!==null}l(Vye,"resolveYamlTimestamp"),_(Vye,"resolveYamlTimestamp");function Gye(t){var e,r,n,a,i,s,o,u=0,h=null,d,f,p;if(e=Hye.exec(t),e===null&&(e=Wye.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,n,a));if(i=+e[4],s=+e[5],o=+e[6],e[7]){for(u=e[7].slice(0,3);u.length<3;)u+="0";u=+u}return e[9]&&(d=+e[10],f=+(e[11]||0),h=(d*60+f)*6e4,e[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,n,a,i,s,o,u)),h&&p.setTime(p.getTime()-h),p}l(Gye,"constructYamlTimestamp"),_(Gye,"constructYamlTimestamp");function qye(t){return t.toISOString()}l(qye,"representYamlTimestamp"),_(qye,"representYamlTimestamp");var x6t=new Mo("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Vye,construct:Gye,instanceOf:Date,represent:qye});function Yye(t){return t==="<<"||t===null}l(Yye,"resolveYamlMerge"),_(Yye,"resolveYamlMerge");var w6t=new Mo("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Yye}),PH=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`;function Uye(t){if(t===null)return!1;var e,r,n=0,a=t.length,i=PH;for(r=0;r<a;r++)if(e=i.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}l(Uye,"resolveYamlBinary"),_(Uye,"resolveYamlBinary");function jye(t){var e,r,n=t.replace(/[\r\n=]/g,""),a=n.length,i=PH,s=0,o=[];for(e=0;e<a;e++)e%4===0&&e&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|i.indexOf(n.charAt(e));return r=a%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}l(jye,"constructYamlBinary"),_(jye,"constructYamlBinary");function Kye(t){var e="",r=0,n,a,i=t.length,s=PH;for(n=0;n<i;n++)n%3===0&&n&&(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return a=i%3,a===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):a===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):a===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}l(Kye,"representYamlBinary"),_(Kye,"representYamlBinary");function Xye(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}l(Xye,"isBinary"),_(Xye,"isBinary");var T6t=new Mo("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Uye,construct:jye,predicate:Xye,represent:Kye}),E6t=Object.prototype.hasOwnProperty,C6t=Object.prototype.toString;function Zye(t){if(t===null)return!0;var e=[],r,n,a,i,s,o=t;for(r=0,n=o.length;r<n;r+=1){if(a=o[r],s=!1,C6t.call(a)!=="[object Object]")return!1;for(i in a)if(E6t.call(a,i))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(i)===-1)e.push(i);else return!1}return!0}l(Zye,"resolveYamlOmap"),_(Zye,"resolveYamlOmap");function Qye(t){return t!==null?t:[]}l(Qye,"constructYamlOmap"),_(Qye,"constructYamlOmap");var S6t=new Mo("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Zye,construct:Qye}),_6t=Object.prototype.toString;function Jye(t){if(t===null)return!0;var e,r,n,a,i,s=t;for(i=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(n=s[e],_6t.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;i[e]=[a[0],n[a[0]]]}return!0}l(Jye,"resolveYamlPairs"),_(Jye,"resolveYamlPairs");function eve(t){if(t===null)return[];var e,r,n,a,i,s=t;for(i=new Array(s.length),e=0,r=s.length;e<r;e+=1)n=s[e],a=Object.keys(n),i[e]=[a[0],n[a[0]]];return i}l(eve,"constructYamlPairs"),_(eve,"constructYamlPairs");var k6t=new Mo("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Jye,construct:eve}),A6t=Object.prototype.hasOwnProperty;function tve(t){if(t===null)return!0;var e,r=t;for(e in r)if(A6t.call(r,e)&&r[e]!==null)return!1;return!0}l(tve,"resolveYamlSet"),_(tve,"resolveYamlSet");function rve(t){return t!==null?t:{}}l(rve,"constructYamlSet"),_(rve,"constructYamlSet");var N6t=new Mo("tag:yaml.org,2002:set",{kind:"mapping",resolve:tve,construct:rve}),nve=b6t.extend({implicit:[x6t,w6t],explicit:[T6t,S6t,k6t,N6t]}),X0=Object.prototype.hasOwnProperty,v7=1,ave=2,ive=3,b7=4,RH=1,I6t=2,sve=3,L6t=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$6t=/[\x85\u2028\u2029]/,M6t=/[,\[\]\{\}]/,ove=/^(?:!|!!|![a-z\-]+!)$/i,lve=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function OH(t){return Object.prototype.toString.call(t)}l(OH,"_class"),_(OH,"_class");function Bu(t){return t===10||t===13}l(Bu,"is_EOL"),_(Bu,"is_EOL");function Z0(t){return t===9||t===32}l(Z0,"is_WHITE_SPACE"),_(Z0,"is_WHITE_SPACE");function Zo(t){return t===9||t===32||t===10||t===13}l(Zo,"is_WS_OR_EOL"),_(Zo,"is_WS_OR_EOL");function xm(t){return t===44||t===91||t===93||t===123||t===125}l(xm,"is_FLOW_INDICATOR"),_(xm,"is_FLOW_INDICATOR");function cve(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}l(cve,"fromHexCode"),_(cve,"fromHexCode");function uve(t){return t===120?2:t===117?4:t===85?8:0}l(uve,"escapedHexLen"),_(uve,"escapedHexLen");function hve(t){return 48<=t&&t<=57?t-48:-1}l(hve,"fromDecimalCode"),_(hve,"fromDecimalCode");function DH(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
||
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}l(DH,"simpleEscapeSequence"),_(DH,"simpleEscapeSequence");function dve(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}l(dve,"charFromCodepoint"),_(dve,"charFromCodepoint");function FH(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}l(FH,"setProperty"),_(FH,"setProperty");var fve=new Array(256),pve=new Array(256);for(wm=0;wm<256;wm++)fve[wm]=DH(wm)?1:0,pve[wm]=DH(wm);var wm;function gve(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||nve,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}l(gve,"State$1"),_(gve,"State$1");function BH(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=i6t(r),new zl(e,r)}l(BH,"generateError"),_(BH,"generateError");function Mr(t,e){throw BH(t,e)}l(Mr,"throwError"),_(Mr,"throwError");function t3(t,e){t.onWarning&&t.onWarning.call(null,BH(t,e))}l(t3,"throwWarning"),_(t3,"throwWarning");var mve={YAML:_(l(function(e,r,n){var a,i,s;e.version!==null&&Mr(e,"duplication of %YAML directive"),n.length!==1&&Mr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&Mr(e,"ill-formed argument of the YAML directive"),i=parseInt(a[1],10),s=parseInt(a[2],10),i!==1&&Mr(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&t3(e,"unsupported YAML version of the document")},"handleYamlDirective"),"handleYamlDirective"),TAG:_(l(function(e,r,n){var a,i;n.length!==2&&Mr(e,"TAG directive accepts exactly two arguments"),a=n[0],i=n[1],ove.test(a)||Mr(e,"ill-formed tag handle (first argument) of the TAG directive"),X0.call(e.tagMap,a)&&Mr(e,'there is a previously declared suffix for "'+a+'" tag handle'),lve.test(i)||Mr(e,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(s){Mr(e,"tag prefix is malformed: "+i)}e.tagMap[a]=i},"handleTagDirective"),"handleTagDirective")};function lf(t,e,r,n){var a,i,s,o;if(e<r){if(o=t.input.slice(e,r),n)for(a=0,i=o.length;a<i;a+=1)s=o.charCodeAt(a),s===9||32<=s&&s<=1114111||Mr(t,"expected valid JSON character");else L6t.test(o)&&Mr(t,"the stream contains non-printable characters");t.result+=o}}l(lf,"captureSegment"),_(lf,"captureSegment");function zH(t,e,r,n){var a,i,s,o;for(cs.isObject(r)||Mr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),s=0,o=a.length;s<o;s+=1)i=a[s],X0.call(e,i)||(FH(e,i,r[i]),n[i]=!0)}l(zH,"mergeMappings"),_(zH,"mergeMappings");function Tm(t,e,r,n,a,i,s,o,u){var h,d;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),h=0,d=a.length;h<d;h+=1)Array.isArray(a[h])&&Mr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&OH(a[h])==="[object Object]"&&(a[h]="[object Object]");if(typeof a=="object"&&OH(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(i))for(h=0,d=i.length;h<d;h+=1)zH(t,e,i[h],r);else zH(t,e,i,r);else!t.json&&!X0.call(r,a)&&X0.call(e,a)&&(t.line=s||t.line,t.lineStart=o||t.lineStart,t.position=u||t.position,Mr(t,"duplicated mapping key")),FH(e,a,i),delete r[a];return e}l(Tm,"storeMappingPair"),_(Tm,"storeMappingPair");function x7(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Mr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}l(x7,"readLineBreak"),_(x7,"readLineBreak");function Ri(t,e,r){for(var n=0,a=t.input.charCodeAt(t.position);a!==0;){for(;Z0(a);)a===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(Bu(a))for(x7(t),a=t.input.charCodeAt(t.position),n++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&t3(t,"deficient indentation"),n}l(Ri,"skipSeparationSpace"),_(Ri,"skipSeparationSpace");function r3(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Zo(r)))}l(r3,"testDocumentSeparator"),_(r3,"testDocumentSeparator");function w7(t,e){e===1?t.result+=" ":e>1&&(t.result+=cs.repeat(`
|
||
`,e-1))}l(w7,"writeFoldedLines"),_(w7,"writeFoldedLines");function yve(t,e,r){var n,a,i,s,o,u,h,d,f=t.kind,p=t.result,g;if(g=t.input.charCodeAt(t.position),Zo(g)||xm(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(a=t.input.charCodeAt(t.position+1),Zo(a)||r&&xm(a)))return!1;for(t.kind="scalar",t.result="",i=s=t.position,o=!1;g!==0;){if(g===58){if(a=t.input.charCodeAt(t.position+1),Zo(a)||r&&xm(a))break}else if(g===35){if(n=t.input.charCodeAt(t.position-1),Zo(n))break}else{if(t.position===t.lineStart&&r3(t)||r&&xm(g))break;if(Bu(g))if(u=t.line,h=t.lineStart,d=t.lineIndent,Ri(t,!1,-1),t.lineIndent>=e){o=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=u,t.lineStart=h,t.lineIndent=d;break}}o&&(lf(t,i,s,!1),w7(t,t.line-u),i=s=t.position,o=!1),Z0(g)||(s=t.position+1),g=t.input.charCodeAt(++t.position)}return lf(t,i,s,!1),t.result?!0:(t.kind=f,t.result=p,!1)}l(yve,"readPlainScalar"),_(yve,"readPlainScalar");function vve(t,e){var r,n,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(lf(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,a=t.position;else return!0;else Bu(r)?(lf(t,n,a,!0),w7(t,Ri(t,!1,e)),n=a=t.position):t.position===t.lineStart&&r3(t)?Mr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Mr(t,"unexpected end of the stream within a single quoted scalar")}l(vve,"readSingleQuotedScalar"),_(vve,"readSingleQuotedScalar");function bve(t,e){var r,n,a,i,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return lf(t,r,t.position,!0),t.position++,!0;if(o===92){if(lf(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Bu(o))Ri(t,!1,e);else if(o<256&&fve[o])t.result+=pve[o],t.position++;else if((s=uve(o))>0){for(a=s,i=0;a>0;a--)o=t.input.charCodeAt(++t.position),(s=cve(o))>=0?i=(i<<4)+s:Mr(t,"expected hexadecimal character");t.result+=dve(i),t.position++}else Mr(t,"unknown escape sequence");r=n=t.position}else Bu(o)?(lf(t,r,n,!0),w7(t,Ri(t,!1,e)),r=n=t.position):t.position===t.lineStart&&r3(t)?Mr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Mr(t,"unexpected end of the stream within a double quoted scalar")}l(bve,"readDoubleQuotedScalar"),_(bve,"readDoubleQuotedScalar");function xve(t,e){var r=!0,n,a,i,s=t.tag,o,u=t.anchor,h,d,f,p,g,m=Object.create(null),y,v,b,w;if(w=t.input.charCodeAt(t.position),w===91)d=93,g=!1,o=[];else if(w===123)d=125,g=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),w=t.input.charCodeAt(++t.position);w!==0;){if(Ri(t,!0,e),w=t.input.charCodeAt(t.position),w===d)return t.position++,t.tag=s,t.anchor=u,t.kind=g?"mapping":"sequence",t.result=o,!0;r?w===44&&Mr(t,"expected the node content, but found ','"):Mr(t,"missed comma between flow collection entries"),v=y=b=null,f=p=!1,w===63&&(h=t.input.charCodeAt(t.position+1),Zo(h)&&(f=p=!0,t.position++,Ri(t,!0,e))),n=t.line,a=t.lineStart,i=t.position,Em(t,e,v7,!1,!0),v=t.tag,y=t.result,Ri(t,!0,e),w=t.input.charCodeAt(t.position),(p||t.line===n)&&w===58&&(f=!0,w=t.input.charCodeAt(++t.position),Ri(t,!0,e),Em(t,e,v7,!1,!0),b=t.result),g?Tm(t,o,m,v,y,b,n,a,i):f?o.push(Tm(t,null,m,v,y,b,n,a,i)):o.push(y),Ri(t,!0,e),w=t.input.charCodeAt(t.position),w===44?(r=!0,w=t.input.charCodeAt(++t.position)):r=!1}Mr(t,"unexpected end of the stream within a flow collection")}l(xve,"readFlowCollection"),_(xve,"readFlowCollection");function wve(t,e){var r,n,a=RH,i=!1,s=!1,o=e,u=0,h=!1,d,f;if(f=t.input.charCodeAt(t.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)RH===a?a=f===43?sve:I6t:Mr(t,"repeat of a chomping mode identifier");else if((d=hve(f))>=0)d===0?Mr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Mr(t,"repeat of an indentation width identifier"):(o=e+d-1,s=!0);else break;if(Z0(f)){do f=t.input.charCodeAt(++t.position);while(Z0(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Bu(f)&&f!==0)}for(;f!==0;){for(x7(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!s||t.lineIndent<o)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>o&&(o=t.lineIndent),Bu(f)){u++;continue}if(t.lineIndent<o){a===sve?t.result+=cs.repeat(`
|
||
`,i?1+u:u):a===RH&&i&&(t.result+=`
|
||
`);break}for(n?Z0(f)?(h=!0,t.result+=cs.repeat(`
|
||
`,i?1+u:u)):h?(h=!1,t.result+=cs.repeat(`
|
||
`,u+1)):u===0?i&&(t.result+=" "):t.result+=cs.repeat(`
|
||
`,u):t.result+=cs.repeat(`
|
||
`,i?1+u:u),i=!0,s=!0,u=0,r=t.position;!Bu(f)&&f!==0;)f=t.input.charCodeAt(++t.position);lf(t,r,t.position,!1)}return!0}l(wve,"readBlockScalar"),_(wve,"readBlockScalar");function HH(t,e){var r,n=t.tag,a=t.anchor,i=[],s,o=!1,u;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=i),u=t.input.charCodeAt(t.position);u!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Mr(t,"tab characters must not be used in indentation")),!(u!==45||(s=t.input.charCodeAt(t.position+1),!Zo(s))));){if(o=!0,t.position++,Ri(t,!0,-1)&&t.lineIndent<=e){i.push(null),u=t.input.charCodeAt(t.position);continue}if(r=t.line,Em(t,e,ive,!1,!0),i.push(t.result),Ri(t,!0,-1),u=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&u!==0)Mr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=n,t.anchor=a,t.kind="sequence",t.result=i,!0):!1}l(HH,"readBlockSequence"),_(HH,"readBlockSequence");function Tve(t,e,r){var n,a,i,s,o,u,h=t.tag,d=t.anchor,f={},p=Object.create(null),g=null,m=null,y=null,v=!1,b=!1,w;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),w=t.input.charCodeAt(t.position);w!==0;){if(!v&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Mr(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),i=t.line,(w===63||w===58)&&Zo(n))w===63?(v&&(Tm(t,f,p,g,m,null,s,o,u),g=m=y=null),b=!0,v=!0,a=!0):v?(v=!1,a=!0):Mr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,w=n;else{if(s=t.line,o=t.lineStart,u=t.position,!Em(t,r,ave,!1,!0))break;if(t.line===i){for(w=t.input.charCodeAt(t.position);Z0(w);)w=t.input.charCodeAt(++t.position);if(w===58)w=t.input.charCodeAt(++t.position),Zo(w)||Mr(t,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(Tm(t,f,p,g,m,null,s,o,u),g=m=y=null),b=!0,v=!1,a=!1,g=t.tag,m=t.result;else if(b)Mr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=h,t.anchor=d,!0}else if(b)Mr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=h,t.anchor=d,!0}if((t.line===i||t.lineIndent>e)&&(v&&(s=t.line,o=t.lineStart,u=t.position),Em(t,e,b7,!0,a)&&(v?m=t.result:y=t.result),v||(Tm(t,f,p,g,m,y,s,o,u),g=m=y=null),Ri(t,!0,-1),w=t.input.charCodeAt(t.position)),(t.line===i||t.lineIndent>e)&&w!==0)Mr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return v&&Tm(t,f,p,g,m,null,s,o,u),b&&(t.tag=h,t.anchor=d,t.kind="mapping",t.result=f),b}l(Tve,"readBlockMapping"),_(Tve,"readBlockMapping");function Eve(t){var e,r=!1,n=!1,a,i,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&Mr(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(r=!0,s=t.input.charCodeAt(++t.position)):s===33?(n=!0,a="!!",s=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(i=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):Mr(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Zo(s);)s===33&&(n?Mr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),ove.test(a)||Mr(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),M6t.test(i)&&Mr(t,"tag suffix cannot contain flow indicator characters")}i&&!lve.test(i)&&Mr(t,"tag name cannot contain such characters: "+i);try{i=decodeURIComponent(i)}catch(o){Mr(t,"tag name is malformed: "+i)}return r?t.tag=i:X0.call(t.tagMap,a)?t.tag=t.tagMap[a]+i:a==="!"?t.tag="!"+i:a==="!!"?t.tag="tag:yaml.org,2002:"+i:Mr(t,'undeclared tag handle "'+a+'"'),!0}l(Eve,"readTagProperty"),_(Eve,"readTagProperty");function Cve(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Mr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Zo(r)&&!xm(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Mr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}l(Cve,"readAnchorProperty"),_(Cve,"readAnchorProperty");function Sve(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Zo(n)&&!xm(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Mr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),X0.call(t.anchorMap,r)||Mr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Ri(t,!0,-1),!0}l(Sve,"readAlias"),_(Sve,"readAlias");function Em(t,e,r,n,a){var i,s,o,u=1,h=!1,d=!1,f,p,g,m,y,v;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,i=s=o=b7===r||ive===r,n&&Ri(t,!0,-1)&&(h=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),u===1)for(;Eve(t)||Cve(t);)Ri(t,!0,-1)?(h=!0,o=i,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):o=!1;if(o&&(o=h||a),(u===1||b7===r)&&(v7===r||ave===r?y=e:y=e+1,v=t.position-t.lineStart,u===1?o&&(HH(t,v)||Tve(t,v,y))||xve(t,y)?d=!0:(s&&wve(t,y)||vve(t,y)||bve(t,y)?d=!0:Sve(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&Mr(t,"alias node should not have any properties")):yve(t,y,v7===r)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):u===0&&(d=o&&HH(t,v))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Mr(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,p=t.implicitTypes.length;f<p;f+=1)if(m=t.implicitTypes[f],m.resolve(t.result)){t.result=m.construct(t.result),t.tag=m.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(X0.call(t.typeMap[t.kind||"fallback"],t.tag))m=t.typeMap[t.kind||"fallback"][t.tag];else for(m=null,g=t.typeMap.multi[t.kind||"fallback"],f=0,p=g.length;f<p;f+=1)if(t.tag.slice(0,g[f].tag.length)===g[f].tag){m=g[f];break}m||Mr(t,"unknown tag !<"+t.tag+">"),t.result!==null&&m.kind!==t.kind&&Mr(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+m.kind+'", not "'+t.kind+'"'),m.resolve(t.result,t.tag)?(t.result=m.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Mr(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}l(Em,"composeNode"),_(Em,"composeNode");function _ve(t){var e=t.position,r,n,a,i=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(Ri(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(i=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!Zo(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),a=[],n.length<1&&Mr(t,"directive name must not be less than one character in length");s!==0;){for(;Z0(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Bu(s));break}if(Bu(s))break;for(r=t.position;s!==0&&!Zo(s);)s=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}s!==0&&x7(t),X0.call(mve,n)?mve[n](t,n,a):t3(t,'unknown document directive "'+n+'"')}if(Ri(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Ri(t,!0,-1)):i&&Mr(t,"directives end mark is expected"),Em(t,t.lineIndent-1,b7,!1,!0),Ri(t,!0,-1),t.checkLineBreaks&&$6t.test(t.input.slice(e,t.position))&&t3(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&r3(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Ri(t,!0,-1));return}if(t.position<t.length-1)Mr(t,"end of the stream or a document separator is expected");else return}l(_ve,"readDocument"),_(_ve,"readDocument");function WH(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
||
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new gve(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,Mr(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)_ve(r);return r.documents}l(WH,"loadDocuments"),_(WH,"loadDocuments");function P6t(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var n=WH(t,r);if(typeof e!="function")return n;for(var a=0,i=n.length;a<i;a+=1)e(n[a])}l(P6t,"loadAll$1"),_(P6t,"loadAll$1");function kve(t,e){var r=WH(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new zl("expected a single document in the stream, but found more")}}l(kve,"load$1"),_(kve,"load$1");var R6t=kve,O6t={load:R6t},Ave=Object.prototype.toString,Nve=Object.prototype.hasOwnProperty,VH=65279,D6t=9,n3=10,F6t=13,B6t=32,z6t=33,H6t=34,GH=35,W6t=37,V6t=38,G6t=39,q6t=42,Ive=44,Y6t=45,T7=58,U6t=61,j6t=62,K6t=63,X6t=64,Lve=91,$ve=93,Z6t=96,Mve=123,Q6t=124,Pve=125,Po={};Po[0]="\\0",Po[7]="\\a",Po[8]="\\b",Po[9]="\\t",Po[10]="\\n",Po[11]="\\v",Po[12]="\\f",Po[13]="\\r",Po[27]="\\e",Po[34]='\\"',Po[92]="\\\\",Po[133]="\\N",Po[160]="\\_",Po[8232]="\\L",Po[8233]="\\P";var J6t=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],eAt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Rve(t,e){var r,n,a,i,s,o,u;if(e===null)return{};for(r={},n=Object.keys(e),a=0,i=n.length;a<i;a+=1)s=n[a],o=String(e[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),u=t.compiledTypeMap.fallback[s],u&&Nve.call(u.styleAliases,o)&&(o=u.styleAliases[o]),r[s]=o;return r}l(Rve,"compileStyleMap"),_(Rve,"compileStyleMap");function Ove(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new zl("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+cs.repeat("0",n-e.length)+e}l(Ove,"encodeHex"),_(Ove,"encodeHex");var tAt=1,a3=2;function Dve(t){this.schema=t.schema||nve,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=cs.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Rve(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?a3:tAt,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}l(Dve,"State"),_(Dve,"State");function qH(t,e){for(var r=cs.repeat(" ",e),n=0,a=-1,i="",s,o=t.length;n<o;)a=t.indexOf(`
|
||
`,n),a===-1?(s=t.slice(n),n=o):(s=t.slice(n,a+1),n=a+1),s.length&&s!==`
|
||
`&&(i+=r),i+=s;return i}l(qH,"indentString"),_(qH,"indentString");function E7(t,e){return`
|
||
`+cs.repeat(" ",t.indent*e)}l(E7,"generateNextLine"),_(E7,"generateNextLine");function Fve(t,e){var r,n,a;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}l(Fve,"testImplicitResolving"),_(Fve,"testImplicitResolving");function i3(t){return t===B6t||t===D6t}l(i3,"isWhitespace$1"),_(i3,"isWhitespace");function Pw(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==VH||65536<=t&&t<=1114111}l(Pw,"isPrintable"),_(Pw,"isPrintable");function YH(t){return Pw(t)&&t!==VH&&t!==F6t&&t!==n3}l(YH,"isNsCharOrWhitespace"),_(YH,"isNsCharOrWhitespace");function UH(t,e,r){var n=YH(t),a=n&&!i3(t);return(r?n:n&&t!==Ive&&t!==Lve&&t!==$ve&&t!==Mve&&t!==Pve)&&t!==GH&&!(e===T7&&!a)||YH(e)&&!i3(e)&&t===GH||e===T7&&a}l(UH,"isPlainSafe"),_(UH,"isPlainSafe");function Bve(t){return Pw(t)&&t!==VH&&!i3(t)&&t!==Y6t&&t!==K6t&&t!==T7&&t!==Ive&&t!==Lve&&t!==$ve&&t!==Mve&&t!==Pve&&t!==GH&&t!==V6t&&t!==q6t&&t!==z6t&&t!==Q6t&&t!==U6t&&t!==j6t&&t!==G6t&&t!==H6t&&t!==W6t&&t!==X6t&&t!==Z6t}l(Bve,"isPlainSafeFirst"),_(Bve,"isPlainSafeFirst");function zve(t){return!i3(t)&&t!==T7}l(zve,"isPlainSafeLast"),_(zve,"isPlainSafeLast");function Rw(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}l(Rw,"codePointAt"),_(Rw,"codePointAt");function jH(t){var e=/^\n* /;return e.test(t)}l(jH,"needIndentIndicator"),_(jH,"needIndentIndicator");var Hve=1,KH=2,Wve=3,Vve=4,Ow=5;function Gve(t,e,r,n,a,i,s,o){var u,h=0,d=null,f=!1,p=!1,g=n!==-1,m=-1,y=Bve(Rw(t,0))&&zve(Rw(t,t.length-1));if(e||s)for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=Rw(t,u),!Pw(h))return Ow;y=y&&UH(h,d,o),d=h}else{for(u=0;u<t.length;h>=65536?u+=2:u++){if(h=Rw(t,u),h===n3)f=!0,g&&(p=p||u-m-1>n&&t[m+1]!==" ",m=u);else if(!Pw(h))return Ow;y=y&&UH(h,d,o),d=h}p=p||g&&u-m-1>n&&t[m+1]!==" "}return!f&&!p?y&&!s&&!a(t)?Hve:i===a3?Ow:KH:r>9&&jH(t)?Ow:s?i===a3?Ow:KH:p?Vve:Wve}l(Gve,"chooseScalarStyle"),_(Gve,"chooseScalarStyle");function qve(t,e,r,n,a){t.dump=function(){if(e.length===0)return t.quotingType===a3?'""':"''";if(!t.noCompatMode&&(J6t.indexOf(e)!==-1||eAt.test(e)))return t.quotingType===a3?'"'+e+'"':"'"+e+"'";var i=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-i),o=n||t.flowLevel>-1&&r>=t.flowLevel;function u(h){return Fve(t,h)}switch(l(u,"testAmbiguity"),_(u,"testAmbiguity"),Gve(e,o,t.indent,s,u,t.quotingType,t.forceQuotes&&!n,a)){case Hve:return e;case KH:return"'"+e.replace(/'/g,"''")+"'";case Wve:return"|"+XH(e,t.indent)+ZH(qH(e,i));case Vve:return">"+XH(e,t.indent)+ZH(qH(Yve(e,s),i));case Ow:return'"'+Uve(e)+'"';default:throw new zl("impossible error: invalid scalar style")}}()}l(qve,"writeScalar"),_(qve,"writeScalar");function XH(t,e){var r=jH(t)?String(e):"",n=t[t.length-1]===`
|
||
`,a=n&&(t[t.length-2]===`
|
||
`||t===`
|
||
`),i=a?"+":n?"":"-";return r+i+`
|
||
`}l(XH,"blockHeader"),_(XH,"blockHeader");function ZH(t){return t[t.length-1]===`
|
||
`?t.slice(0,-1):t}l(ZH,"dropEndingNewline"),_(ZH,"dropEndingNewline");function Yve(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var h=t.indexOf(`
|
||
`);return h=h!==-1?h:t.length,r.lastIndex=h,QH(t.slice(0,h),e)}(),a=t[0]===`
|
||
`||t[0]===" ",i,s;s=r.exec(t);){var o=s[1],u=s[2];i=u[0]===" ",n+=o+(!a&&!i&&u!==""?`
|
||
`:"")+QH(u,e),a=i}return n}l(Yve,"foldString"),_(Yve,"foldString");function QH(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,a=0,i,s=0,o=0,u="";n=r.exec(t);)o=n.index,o-a>e&&(i=s>a?s:o,u+=`
|
||
`+t.slice(a,i),a=i+1),s=o;return u+=`
|
||
`,t.length-a>e&&s>a?u+=t.slice(a,s)+`
|
||
`+t.slice(s+1):u+=t.slice(a),u.slice(1)}l(QH,"foldLine"),_(QH,"foldLine");function Uve(t){for(var e="",r=0,n,a=0;a<t.length;r>=65536?a+=2:a++)r=Rw(t,a),n=Po[r],!n&&Pw(r)?(e+=t[a],r>=65536&&(e+=t[a+1])):e+=n||Ove(r);return e}l(Uve,"escapeString"),_(Uve,"escapeString");function jve(t,e,r){var n="",a=t.tag,i,s,o;for(i=0,s=r.length;i<s;i+=1)o=r[i],t.replacer&&(o=t.replacer.call(r,String(i),o)),(Bh(t,e,o,!1,!1)||typeof o=="undefined"&&Bh(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=a,t.dump="["+n+"]"}l(jve,"writeFlowSequence"),_(jve,"writeFlowSequence");function JH(t,e,r,n){var a="",i=t.tag,s,o,u;for(s=0,o=r.length;s<o;s+=1)u=r[s],t.replacer&&(u=t.replacer.call(r,String(s),u)),(Bh(t,e+1,u,!0,!0,!1,!0)||typeof u=="undefined"&&Bh(t,e+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=E7(t,e)),t.dump&&n3===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=i,t.dump=a||"[]"}l(JH,"writeBlockSequence"),_(JH,"writeBlockSequence");function Kve(t,e,r){var n="",a=t.tag,i=Object.keys(r),s,o,u,h,d;for(s=0,o=i.length;s<o;s+=1)d="",n!==""&&(d+=", "),t.condenseFlow&&(d+='"'),u=i[s],h=r[u],t.replacer&&(h=t.replacer.call(r,u,h)),Bh(t,e,u,!1,!1)&&(t.dump.length>1024&&(d+="? "),d+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Bh(t,e,h,!1,!1)&&(d+=t.dump,n+=d));t.tag=a,t.dump="{"+n+"}"}l(Kve,"writeFlowMapping"),_(Kve,"writeFlowMapping");function Xve(t,e,r,n){var a="",i=t.tag,s=Object.keys(r),o,u,h,d,f,p;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new zl("sortKeys must be a boolean or a function");for(o=0,u=s.length;o<u;o+=1)p="",(!n||a!=="")&&(p+=E7(t,e)),h=s[o],d=r[h],t.replacer&&(d=t.replacer.call(r,h,d)),Bh(t,e+1,h,!0,!0,!0)&&(f=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,f&&(t.dump&&n3===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,f&&(p+=E7(t,e)),Bh(t,e+1,d,!0,f)&&(t.dump&&n3===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,a+=p));t.tag=i,t.dump=a||"{}"}l(Xve,"writeBlockMapping"),_(Xve,"writeBlockMapping");function eW(t,e,r){var n,a,i,s,o,u;for(a=r?t.explicitTypes:t.implicitTypes,i=0,s=a.length;i<s;i+=1)if(o=a[i],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof e=="object"&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(r?o.multi&&o.representName?t.tag=o.representName(e):t.tag=o.tag:t.tag="?",o.represent){if(u=t.styleMap[o.tag]||o.defaultStyle,Ave.call(o.represent)==="[object Function]")n=o.represent(e,u);else if(Nve.call(o.represent,u))n=o.represent[u](e,u);else throw new zl("!<"+o.tag+'> tag resolver accepts not "'+u+'" style');t.dump=n}return!0}return!1}l(eW,"detectType"),_(eW,"detectType");function Bh(t,e,r,n,a,i,s){t.tag=null,t.dump=r,eW(t,r,!1)||eW(t,r,!0);var o=Ave.call(t.dump),u=n,h;n&&(n=t.flowLevel<0||t.flowLevel>e);var d=o==="[object Object]"||o==="[object Array]",f,p;if(d&&(f=t.duplicates.indexOf(r),p=f!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(a=!1),p&&t.usedDuplicates[f])t.dump="*ref_"+f;else{if(d&&p&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(Xve(t,e,t.dump,a),p&&(t.dump="&ref_"+f+t.dump)):(Kve(t,e,t.dump),p&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?JH(t,e-1,t.dump,a):JH(t,e,t.dump,a),p&&(t.dump="&ref_"+f+t.dump)):(jve(t,e,t.dump),p&&(t.dump="&ref_"+f+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&qve(t,t.dump,e,i,u);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new zl("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(h=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",t.dump=h+" "+t.dump)}return!0}l(Bh,"writeNode"),_(Bh,"writeNode");function Zve(t,e){var r=[],n=[],a,i;for(C7(t,r,n),a=0,i=n.length;a<i;a+=1)e.duplicates.push(r[n[a]]);e.usedDuplicates=new Array(i)}l(Zve,"getDuplicateReferences"),_(Zve,"getDuplicateReferences");function C7(t,e,r){var n,a,i;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,i=t.length;a<i;a+=1)C7(t[a],e,r);else for(n=Object.keys(t),a=0,i=n.length;a<i;a+=1)C7(t[n[a]],e,r)}l(C7,"inspectNode"),_(C7,"inspectNode");function rAt(t,e){e=e||{};var r=new Dve(e);r.noRefs||Zve(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Bh(r,0,n,!0,!0)?r.dump+`
|
||
`:""}l(rAt,"dump$1"),_(rAt,"dump$1");function nAt(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}l(nAt,"renamed"),_(nAt,"renamed");var S7=zye,_7=O6t.load;var aAt=_(t=>{const{handDrawnSeed:e}=ft();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Dw=_(t=>{const e=iAt([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),iAt=_(t=>{const e=new Map;return t.forEach(r=>{const[n,a]=r.split(":");e.set(n.trim(),a==null?void 0:a.trim())}),e},"styles2Map"),tW=_(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),Er=_(t=>{const{stylesArray:e}=Dw(t),r=[],n=[],a=[],i=[];return e.forEach(s=>{const o=s[0];tW(o)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&a.push(s.join(":")+" !important"),o==="fill"&&i.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:a,backgroundStyles:i}},"styles2String"),_r=_((t,e)=>{var u;const{themeVariables:r,handDrawnSeed:n}=ft(),{nodeBorder:a,mainBkg:i}=r,{stylesMap:s}=Dw(t);return Object.assign({roughness:.7,fill:s.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||a,seed:n,strokeWidth:((u=s.get("stroke-width"))==null?void 0:u.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:sAt(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),sAt=_(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(e.length===1){const a=isNaN(e[0])?0:e[0];return[a,a]}const r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray"),Qve={},$s={};Object.defineProperty($s,"__esModule",{value:!0}),$s.BLANK_URL=$s.relativeFirstCharacters=$s.whitespaceEscapeCharsRegex=$s.urlSchemeRegex=$s.ctrlCharactersRegex=$s.htmlCtrlEntityRegex=$s.htmlEntitiesRegex=$s.invalidProtocolRegex=void 0,$s.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,$s.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,$s.htmlCtrlEntityRegex=/&(newline|tab);/gi,$s.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,$s.urlSchemeRegex=/^.+(:|:)/gim,$s.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,$s.relativeFirstCharacters=[".","/"],$s.BLANK_URL="about:blank",Object.defineProperty(Qve,"__esModule",{value:!0});var Cm=Qve.sanitizeUrl=uAt,Ro=$s;function oAt(t){return Ro.relativeFirstCharacters.indexOf(t[0])>-1}l(oAt,"isRelativeUrlWithoutProtocol");function lAt(t){var e=t.replace(Ro.ctrlCharactersRegex,"");return e.replace(Ro.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}l(lAt,"decodeHtmlCharacters");function cAt(t){return URL.canParse(t)}l(cAt,"isValidUrl");function Jve(t){try{return decodeURIComponent(t)}catch(e){return t}}l(Jve,"decodeURI");function uAt(t){if(!t)return Ro.BLANK_URL;var e,r=Jve(t.trim());do r=lAt(r).replace(Ro.htmlCtrlEntityRegex,"").replace(Ro.ctrlCharactersRegex,"").replace(Ro.whitespaceEscapeCharsRegex,"").trim(),r=Jve(r),e=r.match(Ro.ctrlCharactersRegex)||r.match(Ro.htmlEntitiesRegex)||r.match(Ro.htmlCtrlEntityRegex)||r.match(Ro.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Ro.BLANK_URL;if(oAt(n))return n;var a=n.trimStart(),i=a.match(Ro.urlSchemeRegex);if(!i)return n;var s=i[0].toLowerCase().trim();if(Ro.invalidProtocolRegex.test(s))return Ro.BLANK_URL;var o=a.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!cAt(o))return Ro.BLANK_URL;var u=new URL(o);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return o}l(uAt,"sanitizeUrl");function hAt(t){return Array.isArray(t)}l(hAt,"isArray$2");function rW(t){var r;if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const n=t[Symbol.toStringTag];return n==null||!((r=Object.getOwnPropertyDescriptor(t,Symbol.toStringTag))!=null&&r.writable)?!1:t.toString()===`[object ${n}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}l(rW,"isPlainObject$1");function dAt(){}l(dAt,"noop$4");function e2e(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}l(e2e,"getSymbols$2");function s3(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}l(s3,"getTag$2");const t2e="[object RegExp]",nW="[object String]",aW="[object Number]",iW="[object Boolean]",sW="[object Arguments]",r2e="[object Symbol]",n2e="[object Date]",a2e="[object Map]",i2e="[object Set]",s2e="[object Array]",o2e="[object ArrayBuffer]",l2e="[object Object]",c2e="[object DataView]",u2e="[object Uint8Array]",h2e="[object Uint8ClampedArray]",d2e="[object Uint16Array]",f2e="[object Uint32Array]",p2e="[object Int8Array]",g2e="[object Int16Array]",m2e="[object Int32Array]",y2e="[object Float32Array]",v2e="[object Float64Array]",b2e=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}();function oW(t){return typeof b2e.Buffer!="undefined"&&b2e.Buffer.isBuffer(t)}l(oW,"isBuffer$2");function fAt(t){return Number.isSafeInteger(t)&&t>=0}l(fAt,"isLength$2");function x2e(t){return t!=null&&typeof t!="function"&&fAt(t.length)}l(x2e,"isArrayLike$2");function pAt(t){return t==="__proto__"}l(pAt,"isUnsafeProperty");function k7(t){return t==null||typeof t!="object"&&typeof t!="function"}l(k7,"isPrimitive");function lW(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}l(lW,"isTypedArray$3");function gAt(t,e){return Fw(t,void 0,t,new Map,e)}l(gAt,"cloneDeepWith$1");function Fw(t,e,r,n=new Map,a=void 0){const i=a==null?void 0:a(t,e,r,n);if(i!==void 0)return i;if(k7(t))return t;if(n.has(t))return n.get(t);if(Array.isArray(t)){const s=new Array(t.length);n.set(t,s);for(let o=0;o<t.length;o++)s[o]=Fw(t[o],o,r,n,a);return Object.hasOwn(t,"index")&&(s.index=t.index),Object.hasOwn(t,"input")&&(s.input=t.input),s}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const s=new RegExp(t.source,t.flags);return s.lastIndex=t.lastIndex,s}if(t instanceof Map){const s=new Map;n.set(t,s);for(const[o,u]of t)s.set(o,Fw(u,o,r,n,a));return s}if(t instanceof Set){const s=new Set;n.set(t,s);for(const o of t)s.add(Fw(o,void 0,r,n,a));return s}if(oW(t))return t.subarray();if(lW(t)){const s=new(Object.getPrototypeOf(t)).constructor(t.length);n.set(t,s);for(let o=0;o<t.length;o++)s[o]=Fw(t[o],o,r,n,a);return s}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer!="undefined"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const s=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return n.set(t,s),zu(s,t,r,n,a),s}if(typeof File!="undefined"&&t instanceof File){const s=new File([t],t.name,{type:t.type});return n.set(t,s),zu(s,t,r,n,a),s}if(typeof Blob!="undefined"&&t instanceof Blob){const s=new Blob([t],{type:t.type});return n.set(t,s),zu(s,t,r,n,a),s}if(t instanceof Error){const s=structuredClone(t);return n.set(t,s),s.message=t.message,s.name=t.name,s.stack=t.stack,s.cause=t.cause,s.constructor=t.constructor,zu(s,t,r,n,a),s}if(t instanceof Boolean){const s=new Boolean(t.valueOf());return n.set(t,s),zu(s,t,r,n,a),s}if(t instanceof Number){const s=new Number(t.valueOf());return n.set(t,s),zu(s,t,r,n,a),s}if(t instanceof String){const s=new String(t.valueOf());return n.set(t,s),zu(s,t,r,n,a),s}if(typeof t=="object"&&mAt(t)){const s=Object.create(Object.getPrototypeOf(t));return n.set(t,s),zu(s,t,r,n,a),s}return t}l(Fw,"cloneDeepWithImpl");function zu(t,e,r=t,n,a){const i=[...Object.keys(e),...e2e(e)];for(let s=0;s<i.length;s++){const o=i[s],u=Object.getOwnPropertyDescriptor(t,o);(u==null||u.writable)&&(t[o]=Fw(e[o],o,r,n,a))}}l(zu,"copyProperties");function mAt(t){switch(s3(t)){case sW:case s2e:case o2e:case c2e:case iW:case n2e:case y2e:case v2e:case p2e:case g2e:case m2e:case a2e:case aW:case l2e:case t2e:case i2e:case nW:case r2e:case u2e:case h2e:case d2e:case f2e:return!0;default:return!1}}l(mAt,"isCloneableObject$1");function yAt(t,e){return gAt(t,(r,n,a,i)=>{if(typeof t=="object"){if(s3(t)==="[object Object]"&&typeof t.constructor!="function"){const s={};return i.set(t,s),zu(s,t,a,i),s}switch(Object.prototype.toString.call(t)){case aW:case nW:case iW:{const s=new t.constructor(t==null?void 0:t.valueOf());return zu(s,t),s}case sW:{const s={};return zu(s,t),s.length=t.length,s[Symbol.iterator]=t[Symbol.iterator],s}default:return}}})}l(yAt,"cloneDeepWith");function w2e(t){return yAt(t)}l(w2e,"cloneDeep$1");function cW(t){return t!==null&&typeof t=="object"&&s3(t)==="[object Arguments]"}l(cW,"isArguments$2");function uW(t){return typeof t=="object"&&t!==null}l(uW,"isObjectLike$2");function vAt(t){return uW(t)&&x2e(t)}l(vAt,"isArrayLikeObject$2");function o3(t){return lW(t)}l(o3,"isTypedArray$2");function bAt(t){const e=t==null?void 0:t.constructor;return t===(typeof e=="function"?e.prototype:Object.prototype)}l(bAt,"isPrototype$2");function l3(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");const r=l(function(...n){const a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);const s=t.apply(this,n);return r.cache=i.set(a,s)||i,s},"memoized");return r.cache=new(l3.Cache||Map),r}l(l3,"memoize$3"),l3.Cache=Map;function xAt(t){if(k7(t))return t;const e=s3(t);if(!wAt(t))return{};if(hAt(t)){const n=Array.from(t);return t.length>0&&typeof t[0]=="string"&&Object.hasOwn(t,"index")&&(n.index=t.index,n.input=t.input),n}if(o3(t)){const n=t,a=n.constructor;return new a(n.buffer,n.byteOffset,n.length)}if(e==="[object ArrayBuffer]")return new ArrayBuffer(t.byteLength);if(e==="[object DataView]"){const n=t,a=n.buffer,i=n.byteOffset,s=n.byteLength,o=new ArrayBuffer(s),u=new Uint8Array(a,i,s);return new Uint8Array(o).set(u),new DataView(o)}if(e==="[object Boolean]"||e==="[object Number]"||e==="[object String]"){const n=t.constructor,a=new n(t.valueOf());return e==="[object String]"?EAt(a,t):hW(a,t),a}if(e==="[object Date]")return new Date(Number(t));if(e==="[object RegExp]"){const n=t,a=new RegExp(n.source,n.flags);return a.lastIndex=n.lastIndex,a}if(e==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(t));if(e==="[object Map]"){const n=t,a=new Map;return n.forEach((i,s)=>{a.set(s,i)}),a}if(e==="[object Set]"){const n=t,a=new Set;return n.forEach(i=>{a.add(i)}),a}if(e==="[object Arguments]"){const n=t,a={};return hW(a,n),a.length=n.length,a[Symbol.iterator]=n[Symbol.iterator],a}const r={};return CAt(r,t),hW(r,t),TAt(r,t),r}l(xAt,"clone$5");function wAt(t){switch(s3(t)){case sW:case s2e:case o2e:case c2e:case iW:case n2e:case y2e:case v2e:case p2e:case g2e:case m2e:case a2e:case aW:case l2e:case t2e:case i2e:case nW:case r2e:case u2e:case h2e:case d2e:case f2e:return!0;default:return!1}}l(wAt,"isCloneableObject");function hW(t,e){for(const r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}l(hW,"copyOwnProperties");function TAt(t,e){const r=Object.getOwnPropertySymbols(e);for(let n=0;n<r.length;n++){const a=r[n];Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}}l(TAt,"copySymbolProperties");function EAt(t,e){const r=e.valueOf().length;for(const n in e)Object.hasOwn(e,n)&&(Number.isNaN(Number(n))||Number(n)>=r)&&(t[n]=e[n])}l(EAt,"cloneStringObjectProperties");function CAt(t,e){const r=Object.getPrototypeOf(e);r!==null&&typeof e.constructor=="function"&&Object.setPrototypeOf(t,r)}l(CAt,"copyPrototype");function SAt(t){if(k7(t))return t;if(Array.isArray(t)||lW(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer!="undefined"&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(e==null)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const n=new r(t);return n.lastIndex=t.lastIndex,n}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let n;return t instanceof AggregateError?n=new r(t.errors,t.message,{cause:t.cause}):n=new r(t.message,{cause:t.cause}),n.stack=t.stack,Object.assign(n,t),n}return typeof File!="undefined"&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):typeof t=="object"?Object.assign(Object.create(e),t):t}l(SAt,"clone$4");function _At(t,...e){const r=e.slice(0,-1),n=e[e.length-1];let a=t;for(let i=0;i<r.length;i++){const s=r[i];a=A7(a,s,n,new Map)}return a}l(_At,"mergeWith");function A7(t,e,r,n){var i;if(k7(t)&&(t=Object(t)),e==null||typeof e!="object")return t;if(n.has(e))return SAt(n.get(e));if(n.set(e,t),Array.isArray(e)){e=e.slice();for(let s=0;s<e.length;s++)e[s]=(i=e[s])!=null?i:void 0}const a=[...Object.keys(e),...e2e(e)];for(let s=0;s<a.length;s++){const o=a[s];if(pAt(o))continue;let u=e[o],h=t[o];if(cW(u)&&(u=X({},u)),cW(h)&&(h=X({},h)),oW(u)&&(u=w2e(u)),Array.isArray(u))if(Array.isArray(h)){const f=[],p=Reflect.ownKeys(h);for(let g=0;g<p.length;g++){const m=p[g];f[m]=h[m]}h=f}else if(vAt(h)){const f=[];for(let p=0;p<h.length;p++)f[p]=h[p];h=f}else h=[];const d=r(h,u,o,t,e,n);d!==void 0?t[o]=d:Array.isArray(u)||uW(h)&&uW(u)&&(rW(h)||rW(u)||o3(h)||o3(u))?t[o]=A7(h,u,r,n):h==null&&rW(u)?t[o]=A7({},u,r,n):h==null&&o3(u)?t[o]=w2e(u):(h===void 0||u!==void 0)&&(t[o]=u)}return t}l(A7,"mergeWithDeep");function kAt(t,...e){return _At(t,...e,dAt)}l(kAt,"merge$2");function T2e(t){if(t==null)return!0;if(x2e(t))return typeof t.splice!="function"&&typeof t!="string"&&!oW(t)&&!o3(t)&&!cW(t)?!1:t.length===0;if(typeof t=="object"||typeof t=="function"){if(t instanceof Map||t instanceof Set)return t.size===0;const e=Object.keys(t);return bAt(t)?e.filter(r=>r!=="constructor").length===0:e.length===0}return!0}l(T2e,"isEmpty$2");var E2e="",AAt={curveBasis:J4,curveBasisClosed:qkt,curveBasisOpen:Ykt,curveBumpX:q1e,curveBumpY:Y1e,curveBundle:Ukt,curveCardinalClosed:jkt,curveCardinalOpen:Kkt,curveCardinal:X1e,curveCatmullRomClosed:Xkt,curveCatmullRomOpen:Zkt,curveCatmullRom:Q1e,curveLinear:Z4,curveLinearClosed:Qkt,curveMonotoneX:oye,curveMonotoneY:lye,curveNatural:hye,curveStep:dye,curveStepAfter:pye,curveStepBefore:fye},NAt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,IAt=_(function(t,e){const r=C2e(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const s=r.map(o=>o.args);b8(s),n=$i(n,[...s])}else n=r.args;if(!n)return;let a=kz(t,e);const i="config";return n[i]!==void 0&&(a==="flowchart-v2"&&(a="flowchart"),n[a]=n[i],delete n[i]),n},"detectInit"),C2e=_(function(t,e=null){var r,n;try{const a=new RegExp(`[%]{2}(?![{]${NAt.source})(?=[}][%]{2}).*
|
||
`,"ig");t=t.trim().replace(a,"").replace(/'/gm,'"'),Le.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const s=[];for(;(i=N4.exec(t))!==null;)if(i.index===N4.lastIndex&&N4.lastIndex++,i&&!e||e&&((r=i[1])!=null&&r.match(e))||e&&((n=i[2])!=null&&n.match(e))){const o=i[1]?i[1]:i[2],u=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;s.push({type:o,args:u})}return s.length===0?{type:t,args:null}:s.length===1?s[0]:s}catch(a){return Le.error(`ERROR: ${a.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),LAt=_(function(t){return t.replace(N4,"")},"removeDirectives"),$At=_(function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");function dW(t,e){var n;if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return(n=AAt[r])!=null?n:e}l(dW,"interpolateToCurve"),_(dW,"interpolateToCurve");function S2e(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?Cm(r):r}l(S2e,"formatUrl"),_(S2e,"formatUrl");var MAt=_((t,...e)=>{const r=t.split("."),n=r.length-1,a=r[n];let i=window;for(let s=0;s<n;s++)if(i=i[r[s]],!i){Le.error(`Function name: ${t} not found in window`);return}i[a](...e)},"runFunc");function fW(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}l(fW,"distance$1"),_(fW,"distance");function _2e(t){let e,r=0;t.forEach(a=>{r+=fW(a,e),e=a});const n=r/2;return pW(t,n)}l(_2e,"traverseEdge"),_(_2e,"traverseEdge");function k2e(t){return t.length===1?t[0]:_2e(t)}l(k2e,"calcLabelPosition"),_(k2e,"calcLabelPosition");var A2e=_((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),pW=_((t,e)=>{let r,n=e;for(const a of t){if(r){const i=fW(a,r);if(i===0)return r;if(i<n)n-=i;else{const s=n/i;if(s<=0)return r;if(s>=1)return{x:a.x,y:a.y};if(s>0&&s<1)return{x:A2e((1-s)*r.x+s*a.x,5),y:A2e((1-s)*r.y+s*a.y,5)}}}r=a}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),PAt=_((t,e,r)=>{Le.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const a=pW(e,25),i=t?10:5,s=Math.atan2(e[0].y-a.y,e[0].x-a.x),o={x:0,y:0};return o.x=Math.sin(s)*i+(e[0].x+a.x)/2,o.y=-Math.cos(s)*i+(e[0].y+a.y)/2,o},"calcCardinalityPosition");function N2e(t,e,r){const n=structuredClone(r);Le.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const a=25+t,i=pW(n,a),s=10+t*.5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),u={x:0,y:0};return e==="start_left"?(u.x=Math.sin(o+Math.PI)*s+(n[0].x+i.x)/2,u.y=-Math.cos(o+Math.PI)*s+(n[0].y+i.y)/2):e==="end_right"?(u.x=Math.sin(o-Math.PI)*s+(n[0].x+i.x)/2-5,u.y=-Math.cos(o-Math.PI)*s+(n[0].y+i.y)/2-5):e==="end_left"?(u.x=Math.sin(o)*s+(n[0].x+i.x)/2-5,u.y=-Math.cos(o)*s+(n[0].y+i.y)/2-5):(u.x=Math.sin(o)*s+(n[0].x+i.x)/2,u.y=-Math.cos(o)*s+(n[0].y+i.y)/2),u}l(N2e,"calcTerminalLabelPosition"),_(N2e,"calcTerminalLabelPosition");function gW(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}l(gW,"getStylesFromArray"),_(gW,"getStylesFromArray");var I2e=0,L2e=_(()=>(I2e++,"id-"+Math.random().toString(36).substr(2,12)+"-"+I2e),"generateId");function $2e(t){let e="";const r="0123456789abcdef",n=r.length;for(let a=0;a<t;a++)e+=r.charAt(Math.floor(Math.random()*n));return e}l($2e,"makeRandomHex"),_($2e,"makeRandomHex");var M2e=_(t=>$2e(t.length),"random"),RAt=_(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),OAt=_(function(t,e){const r=e.text.replace(or.lineBreakRegex," "),[,n]=cf(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),e.class!==void 0&&a.attr("class",e.class);const i=a.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.attr("fill",e.fill),i.text(r),a},"drawSimpleText"),c3=l3((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),or.lineBreakRegex.test(t)))return t;const n=t.split(" ").filter(Boolean),a=[];let i="";return n.forEach((s,o)=>{const u=Qo(`${s} `,r),h=Qo(i,r);if(u>e){const{hyphenatedStrings:p,remainingWord:g}=DAt(s,e,"-",r);a.push(i,...p),i=g}else h+u>=e?(a.push(i),i=s):i=[i,s].filter(Boolean).join(" ");o+1===n.length&&a.push(i)}),a.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),DAt=l3((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const a=[...t],i=[];let s="";return a.forEach((o,u)=>{const h=`${s}${o}`;if(Qo(h,n)>=e){const f=u+1,p=a.length===f,g=`${h}${r}`;i.push(p?h:g),s=""}else s=h}),{hyphenatedStrings:i,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function N7(t,e){return I7(t,e).height}l(N7,"calculateTextHeight"),_(N7,"calculateTextHeight");function Qo(t,e){return I7(t,e).width}l(Qo,"calculateTextWidth"),_(Qo,"calculateTextWidth");var I7=l3((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,i]=cf(r),s=["sans-serif",n],o=t.split(or.lineBreakRegex),u=[],h=Yt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const d=h.append("svg");for(const p of s){let g=0;const m={width:0,height:0,lineHeight:0};for(const y of o){const v=RAt();v.text=y||E2e;const b=OAt(d,v).style("font-size",i).style("font-weight",a).style("font-family",p),w=(b._groups||b)[0][0].getBBox();if(w.width===0&&w.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,w.width)),g=Math.round(w.height),m.height+=g,m.lineHeight=Math.round(Math.max(m.lineHeight,g))}u.push(m)}d.remove();const f=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[f]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),FAt=(zy=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},l(zy,"InitIDGenerator"),_(zy,"InitIDGenerator"),zy),L7,BAt=_(function(t){return L7=L7||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),L7.innerHTML=t,unescape(L7.textContent)},"entityDecode");function mW(t){return"str"in t}l(mW,"isDetailedError"),_(mW,"isDetailedError");var zAt=_((t,e,r,n)=>{var i;if(!n)return;const a=(i=t.node())==null?void 0:i.getBBox();a&&t.append("text").text(n).attr("text-anchor","middle").attr("x",a.x+a.width/2).attr("y",-r).attr("class",e)},"insertTitle"),cf=_(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t!=null?t:"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function Ga(t,e){return kAt({},t,e)}l(Ga,"cleanAndMerge"),_(Ga,"cleanAndMerge");var Wr={assignWithDepth:$i,wrapLabel:c3,calculateTextHeight:N7,calculateTextWidth:Qo,calculateTextDimensions:I7,cleanAndMerge:Ga,detectInit:IAt,detectDirective:C2e,isSubstringInArray:$At,interpolateToCurve:dW,calcLabelPosition:k2e,calcCardinalityPosition:PAt,calcTerminalLabelPosition:N2e,formatUrl:S2e,getStylesFromArray:gW,generateId:L2e,random:M2e,runFunc:MAt,entityDecode:BAt,insertTitle:zAt,isLabelCoordinateInPath:P2e,parseFontSize:cf,InitIDGenerator:FAt},HAt=_(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),uf=_(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),Bw=_((t,e,{counter:r=0,prefix:n,suffix:a},i)=>i||`${n?`${n}_`:""}${t}_${e}_${r}${a?`_${a}`:""}`,"getEdgeId");function Ms(t){return t!=null?t:null}l(Ms,"handleUndefinedAttr"),_(Ms,"handleUndefinedAttr");function P2e(t,e){const r=Math.round(t.x),n=Math.round(t.y),a=e.replace(/(\d+\.\d+)/g,i=>Math.round(parseFloat(i)).toString());return a.includes(r.toString())||a.includes(n.toString())}l(P2e,"isLabelCoordinateInPath"),_(P2e,"isLabelCoordinateInPath");var zw=_(({flowchart:t})=>{var a,i,s,o;const e=(i=(a=t==null?void 0:t.subGraphTitleMargin)==null?void 0:a.top)!=null?i:0,r=(o=(s=t==null?void 0:t.subGraphTitleMargin)==null?void 0:s.bottom)!=null?o:0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins");function yW(t,e){return nt(this,null,function*(){const r=t.getElementsByTagName("img");if(!r||r.length===0)return;const n=e.replace(/<img[^>]*>/g,"").trim()==="";yield Promise.all([...r].map(a=>new Promise(i=>{function s(){if(a.style.display="flex",a.style.flexDirection="column",n){const o=ft().fontSize?ft().fontSize:window.getComputedStyle(document.body).fontSize,u=5,[h=hn.fontSize]=cf(o),d=h*u+"px";a.style.minWidth=d,a.style.maxWidth=d}else a.style.width="100%";i(a)}l(s,"setupImage"),_(s,"setupImage"),setTimeout(()=>{a.complete&&s()}),a.addEventListener("error",s),a.addEventListener("load",s)})))})}l(yW,"configureLabelImages"),_(yW,"configureLabelImages");const WAt=Object.freeze({left:0,top:0,width:16,height:16}),$7=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),R2e=Object.freeze(X(X({},WAt),$7)),VAt=Object.freeze(Ne(X({},R2e),{body:"",hidden:!1})),GAt=Object.freeze({width:null,height:null}),qAt=Object.freeze(X(X({},GAt),$7)),YAt=l((t,e,r,n="")=>{const a=t.split(":");if(t.slice(0,1)==="@"){if(a.length<2||a.length>3)return null;n=a.shift().slice(1)}if(a.length>3||!a.length)return null;if(a.length>1){const o=a.pop(),u=a.pop(),h={provider:a.length>0?a[0]:n,prefix:u,name:o};return vW(h)?h:null}const i=a[0],s=i.split("-");if(s.length>1){const o={provider:n,prefix:s.shift(),name:s.join("-")};return vW(o)?o:null}if(r&&n===""){const o={provider:n,prefix:"",name:i};return vW(o,r)?o:null}return null},"stringToIcon"),vW=l((t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1,"validateIconName");function UAt(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}l(UAt,"mergeIconTransformations");function O2e(t,e){const r=UAt(t,e);for(const n in VAt)n in $7?n in t&&!(n in r)&&(r[n]=$7[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}l(O2e,"mergeIconData");function jAt(t,e){const r=t.icons,n=t.aliases||Object.create(null),a=Object.create(null);function i(s){if(r[s])return a[s]=[];if(!(s in a)){a[s]=null;const o=n[s]&&n[s].parent,u=o&&i(o);u&&(a[s]=[o].concat(u))}return a[s]}return l(i,"resolve"),(e||Object.keys(r).concat(Object.keys(n))).forEach(i),a}l(jAt,"getIconsTree");function D2e(t,e,r){const n=t.icons,a=t.aliases||Object.create(null);let i={};function s(o){i=O2e(n[o]||a[o],i)}return l(s,"parse"),s(e),r.forEach(s),O2e(t,i)}l(D2e,"internalGetIconData");function KAt(t,e){if(t.icons[e])return D2e(t,e,[]);const r=jAt(t,[e])[e];return r?D2e(t,e,r):null}l(KAt,"getIconData");const XAt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ZAt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function F2e(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const n=t.split(XAt);if(n===null||!n.length)return t;const a=[];let i=n.shift(),s=ZAt.test(i);for(;;){if(s){const o=parseFloat(i);isNaN(o)?a.push(i):a.push(Math.ceil(o*e*r)/r)}else a.push(i);if(i=n.shift(),i===void 0)return a.join("");s=!s}}l(F2e,"calculateSize$1");function QAt(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const a=t.indexOf(">",n),i=t.indexOf("</"+e);if(a===-1||i===-1)break;const s=t.indexOf(">",i);if(s===-1)break;r+=t.slice(a+1,i).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}l(QAt,"splitSVGDefs");function JAt(t,e){return t?"<defs>"+t+"</defs>"+e:e}l(JAt,"mergeDefsAndContent");function e8t(t,e,r){const n=QAt(t);return JAt(n.defs,e+n.content+r)}l(e8t,"wrapSVGContent");const t8t=l(t=>t==="unset"||t==="undefined"||t==="none","isUnsetKeyword");function r8t(t,e){const r=X(X({},R2e),t),n=X(X({},qAt),e),a={left:r.left,top:r.top,width:r.width,height:r.height};let i=r.body;[r,n].forEach(y=>{const v=[],b=y.hFlip,w=y.vFlip;let x=y.rotate;b?w?x+=2:(v.push("translate("+(a.width+a.left).toString()+" "+(0-a.top).toString()+")"),v.push("scale(-1 1)"),a.top=a.left=0):w&&(v.push("translate("+(0-a.left).toString()+" "+(a.height+a.top).toString()+")"),v.push("scale(1 -1)"),a.top=a.left=0);let T;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:T=a.height/2+a.top,v.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:v.unshift("rotate(180 "+(a.width/2+a.left).toString()+" "+(a.height/2+a.top).toString()+")");break;case 3:T=a.width/2+a.left,v.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}x%2===1&&(a.left!==a.top&&(T=a.left,a.left=a.top,a.top=T),a.width!==a.height&&(T=a.width,a.width=a.height,a.height=T)),v.length&&(i=e8t(i,'<g transform="'+v.join(" ")+'">',"</g>"))});const s=n.width,o=n.height,u=a.width,h=a.height;let d,f;s===null?(f=o===null?"1em":o==="auto"?h:o,d=F2e(f,u/h)):(d=s==="auto"?u:s,f=o===null?F2e(d,h/u):o==="auto"?h:o);const p={},g=l((y,v)=>{t8t(v)||(p[y]=v.toString())},"setAttr");g("width",d),g("height",f);const m=[a.left,a.top,u,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:i}}l(r8t,"iconToSVG");const n8t=/\sid="(\S+)"/g,B2e=new Map;function a8t(t){t=t.replace(/[0-9]+$/,"")||"a";const e=B2e.get(t)||0;return B2e.set(t,e+1),e?`${t}${e}`:t}l(a8t,"nextID");function i8t(t){const e=[];let r;for(;r=n8t.exec(t);)e.push(r[1]);if(!e.length)return t;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(a=>{const i=a8t(a),s=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+i+n+"$3")}),t=t.replace(new RegExp(n,"g"),""),t}l(i8t,"replaceIDs");function s8t(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}l(s8t,"iconToHTML");var z2e={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},bW=new Map,H2e=new Map,xW=_(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(Le.debug("Registering icon pack:",e.name),"loader"in e)H2e.set(e.name,e.loader);else if("icons"in e)bW.set(e.name,e.icons);else throw Le.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),W2e=_((t,e)=>nt(this,null,function*(){const r=YAt(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let a=bW.get(n);if(!a){const s=H2e.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{const o=yield s();a=Ne(X({},o),{prefix:n}),bW.set(n,a)}catch(o){throw Le.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const i=KAt(a,r.name);if(!i)throw new Error(`Icon not found: ${t}`);return i}),"getRegisteredIconData"),o8t=_(t=>nt(this,null,function*(){try{return yield W2e(t),!0}catch(e){return!1}}),"isIconAvailable"),hf=_((t,e,r)=>nt(this,null,function*(){let n;try{n=yield W2e(t,e==null?void 0:e.fallbackPrefix)}catch(s){Le.error(s),n=z2e}const a=r8t(n,e),i=s8t(i8t(a.body),X(X({},a.attributes),r));return mn(i,Ar())}),"getIconSVG");function wW(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}l(wW,"L$1");var Sm=wW();function V2e(t){Sm=t}l(V2e,"G$1");var u3={exec:l(()=>null,"exec")};function Yn(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:l((a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Jo.caret,"$1"),r=r.replace(a,s),n},"replace"),getRegex:l(()=>new RegExp(r,e),"getRegex")};return n}l(Yn,"d$1");var l8t=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch(t){return!1}})(),Jo={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:l(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:l(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},c8t=/^(?:[ \t]*(?:\n|$))+/,u8t=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,h8t=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,h3=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,d8t=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,TW=/(?:[*+-]|\d{1,9}[.)])/,G2e=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,q2e=Yn(G2e).replace(/bull/g,TW).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),f8t=Yn(G2e).replace(/bull/g,TW).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),EW=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,p8t=/^[^\n]+/,CW=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,g8t=Yn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",CW).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),m8t=Yn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,TW).getRegex(),M7="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",SW=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,y8t=Yn("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",SW).replace("tag",M7).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Y2e=Yn(EW).replace("hr",h3).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M7).getRegex(),v8t=Yn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Y2e).getRegex(),_W={blockquote:v8t,code:u8t,def:g8t,fences:h8t,heading:d8t,hr:h3,html:y8t,lheading:q2e,list:m8t,newline:c8t,paragraph:Y2e,table:u3,text:p8t},U2e=Yn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",h3).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M7).getRegex(),b8t=Ne(X({},_W),{lheading:f8t,table:U2e,paragraph:Yn(EW).replace("hr",h3).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",U2e).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",M7).getRegex()}),x8t=Ne(X({},_W),{html:Yn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",SW).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:u3,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Yn(EW).replace("hr",h3).replace("heading",` *#{1,6} *[^
|
||
]`).replace("lheading",q2e).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),w8t=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,T8t=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,j2e=/^( {2,}|\\)\n(?!\s*$)/,E8t=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,P7=/[\p{P}\p{S}]/u,kW=/[\s\p{P}\p{S}]/u,K2e=/[^\s\p{P}\p{S}]/u,C8t=Yn(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,kW).getRegex(),X2e=/(?!~)[\p{P}\p{S}]/u,S8t=/(?!~)[\s\p{P}\p{S}]/u,_8t=/(?:[^\s\p{P}\p{S}]|~)/u,k8t=Yn(/link|precode-code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-",l8t?"(?<!`)()":"(^^|[^`])").replace("code",new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),Z2e=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,A8t=Yn(Z2e,"u").replace(/punct/g,P7).getRegex(),N8t=Yn(Z2e,"u").replace(/punct/g,X2e).getRegex(),Q2e="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",I8t=Yn(Q2e,"gu").replace(/notPunctSpace/g,K2e).replace(/punctSpace/g,kW).replace(/punct/g,P7).getRegex(),L8t=Yn(Q2e,"gu").replace(/notPunctSpace/g,_8t).replace(/punctSpace/g,S8t).replace(/punct/g,X2e).getRegex(),$8t=Yn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,K2e).replace(/punctSpace/g,kW).replace(/punct/g,P7).getRegex(),M8t=Yn(/\\(punct)/,"gu").replace(/punct/g,P7).getRegex(),P8t=Yn(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),R8t=Yn(SW).replace("(?:-->|$)","-->").getRegex(),O8t=Yn("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",R8t).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),R7=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,D8t=Yn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",R7).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),J2e=Yn(/^!?\[(label)\]\[(ref)\]/).replace("label",R7).replace("ref",CW).getRegex(),ebe=Yn(/^!?\[(ref)\](?:\[\])?/).replace("ref",CW).getRegex(),F8t=Yn("reflink|nolink(?!\\()","g").replace("reflink",J2e).replace("nolink",ebe).getRegex(),tbe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,AW={_backpedal:u3,anyPunctuation:M8t,autolink:P8t,blockSkip:k8t,br:j2e,code:T8t,del:u3,emStrongLDelim:A8t,emStrongRDelimAst:I8t,emStrongRDelimUnd:$8t,escape:w8t,link:D8t,nolink:ebe,punctuation:C8t,reflink:J2e,reflinkSearch:F8t,tag:O8t,text:E8t,url:u3},B8t=Ne(X({},AW),{link:Yn(/^!?\[(label)\]\((.*?)\)/).replace("label",R7).getRegex(),reflink:Yn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",R7).getRegex()}),NW=Ne(X({},AW),{emStrongRDelimAst:L8t,emStrongLDelim:N8t,url:Yn(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",tbe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Yn(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",tbe).getRegex()}),z8t=Ne(X({},NW),{br:Yn(j2e).replace("{2,}","*").getRegex(),text:Yn(NW.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),O7={normal:_W,gfm:b8t,pedantic:x8t},d3={normal:AW,gfm:NW,breaks:z8t,pedantic:B8t},H8t={"&":"&","<":"<",">":">",'"':""","'":"'"},rbe=l(t=>H8t[t],"ge");function zh(t,e){if(e){if(Jo.escapeTest.test(t))return t.replace(Jo.escapeReplace,rbe)}else if(Jo.escapeTestNoEncode.test(t))return t.replace(Jo.escapeReplaceNoEncode,rbe);return t}l(zh,"w$2");function nbe(t){try{t=encodeURI(t).replace(Jo.percentDecode,"%")}catch(e){return null}return t}l(nbe,"J$1");function abe(t,e){var i;let r=t.replace(Jo.findPipe,(s,o,u)=>{let h=!1,d=o;for(;--d>=0&&u[d]==="\\";)h=!h;return h?"|":" |"}),n=r.split(Jo.splitPipe),a=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;a<n.length;a++)n[a]=n[a].trim().replace(Jo.slashPipe,"|");return n}l(abe,"V$1");function f3(t,e,r){let n=t.length;if(n===0)return"";let a=0;for(;a<n&&t.charAt(n-a-1)===e;)a++;return t.slice(0,n-a)}l(f3,"z$1");function W8t(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}l(W8t,"fe");function ibe(t,e,r,n,a){let i=e.href,s=e.title||null,o=t[1].replace(a.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,u}l(ibe,"me");function V8t(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let a=n[1];return e.split(`
|
||
`).map(i=>{let s=i.match(r.other.beginningSpace);if(s===null)return i;let[o]=s;return o.length>=a.length?i.slice(a.length):i}).join(`
|
||
`)}l(V8t,"Ye");var D7=($C=class{constructor(e){Ln(this,"options");Ln(this,"rules");Ln(this,"lexer");this.options=e||Sm}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:f3(n,`
|
||
`)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],a=V8t(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:a}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let a=f3(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:f3(r[0],`
|
||
`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=f3(r[0],`
|
||
`).split(`
|
||
`),a="",i="",s=[];for(;n.length>0;){let o=!1,u=[],h;for(h=0;h<n.length;h++)if(this.rules.other.blockquoteStart.test(n[h]))u.push(n[h]),o=!0;else if(!o)u.push(n[h]);else break;n=n.slice(h);let d=u.join(`
|
||
`),f=d.replace(this.rules.other.blockquoteSetextReplace,`
|
||
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
|
||
${d}`:d,i=i?`${i}
|
||
${f}`:f;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,s,!0),this.lexer.state.top=p,n.length===0)break;let g=s.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let m=g,y=m.raw+`
|
||
`+n.join(`
|
||
`),v=this.blockquote(y);s[s.length-1]=v,a=a.substring(0,a.length-m.raw.length)+v.raw,i=i.substring(0,i.length-m.text.length)+v.text;break}else if((g==null?void 0:g.type)==="list"){let m=g,y=m.raw+`
|
||
`+n.join(`
|
||
`),v=this.list(y);s[s.length-1]=v,a=a.substring(0,a.length-g.raw.length)+v.raw,i=i.substring(0,i.length-m.raw.length)+v.raw,n=y.substring(s.at(-1).raw.length).split(`
|
||
`);continue}}return{type:"blockquote",raw:a,tokens:s,text:i}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),a=n.length>1,i={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let s=this.rules.other.listItemRegex(n),o=!1;for(;e;){let h=!1,d="",f="";if(!(r=s.exec(e))||this.rules.block.hr.test(e))break;d=r[0],e=e.substring(d.length);let p=r[2].split(`
|
||
`,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),g=e.split(`
|
||
`,1)[0],m=!p.trim(),y=0;if(this.options.pedantic?(y=2,f=p.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,f=p.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(g)&&(d+=g+`
|
||
`,e=e.substring(g.length+1),h=!0),!h){let w=this.rules.other.nextBulletRegex(y),x=this.rules.other.hrRegex(y),T=this.rules.other.fencesBeginRegex(y),C=this.rules.other.headingBeginRegex(y),S=this.rules.other.htmlBeginRegex(y);for(;e;){let E=e.split(`
|
||
`,1)[0],k;if(g=E,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),k=g):k=g.replace(this.rules.other.tabCharGlobal," "),T.test(g)||C.test(g)||S.test(g)||w.test(g)||x.test(g))break;if(k.search(this.rules.other.nonSpaceChar)>=y||!g.trim())f+=`
|
||
`+k.slice(y);else{if(m||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(p)||C.test(p)||x.test(p))break;f+=`
|
||
`+g}!m&&!g.trim()&&(m=!0),d+=E+`
|
||
`,e=e.substring(E.length+1),p=k.slice(y)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(o=!0));let v=null,b;this.options.gfm&&(v=this.rules.other.listIsTask.exec(f),v&&(b=v[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:d,task:!!v,checked:b,loose:!1,text:f,tokens:[]}),i.raw+=d}let u=i.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let h=0;h<i.items.length;h++)if(this.lexer.state.top=!1,i.items[h].tokens=this.lexer.blockTokens(i.items[h].text,[]),!i.loose){let d=i.items[h].tokens.filter(p=>p.type==="space"),f=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));i.loose=f}if(i.loose)for(let h=0;h<i.items.length;h++)i.items[h].loose=!0;return i}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:a,title:i}}}table(e){var o;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=abe(r[1]),a=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
||
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let u of a)this.rules.other.tableAlignRight.test(u)?s.align.push("right"):this.rules.other.tableAlignCenter.test(u)?s.align.push("center"):this.rules.other.tableAlignLeft.test(u)?s.align.push("left"):s.align.push(null);for(let u=0;u<n.length;u++)s.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:s.align[u]});for(let u of i)s.rows.push(abe(u,s.header.length).map((h,d)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:s.align[d]})));return s}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
|
||
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=f3(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=W8t(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let a=r[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(a);s&&(a=s[1],i=s[3])}else i=r[3]?r[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),ibe(r,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=r[a.toLowerCase()];if(!i){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return ibe(n,i,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let i=[...a[0]].length-1,s,o,u=i,h=0,d=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,r=r.slice(-1*e.length+i);(a=d.exec(r))!=null;){if(s=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!s)continue;if(o=[...s].length,a[3]||a[4]){u+=o;continue}else if((a[5]||a[6])&&i%3&&!((i+o)%3)){h+=o;continue}if(u-=o,u>0)continue;o=Math.min(o,o+u+h);let f=[...a[0]][0].length,p=e.slice(0,i+a.index+f+o);if(Math.min(i,o)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,a;return r[2]==="@"?(n=r[1],a="mailto:"+n):(n=r[1],a=n),{type:"link",raw:r[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,a;let r;if(r=this.rules.inline.url.exec(e)){let i,s;if(r[2]==="@")i=r[0],s="mailto:"+i;else{let o;do o=r[0],r[0]=(a=(n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])!=null?a:"";while(o!==r[0]);i=r[0],r[1]==="www."?s="http://"+r[0]:s=r[0]}return{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},l($C,"y"),$C),Hu=(ug=class{constructor(e){Ln(this,"tokens");Ln(this,"options");Ln(this,"state");Ln(this,"tokenizer");Ln(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Sm,this.options.tokenizer=this.options.tokenizer||new D7,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Jo,block:O7.normal,inline:d3.normal};this.options.pedantic?(r.block=O7.pedantic,r.inline=d3.pedantic):this.options.gfm&&(r.block=O7.gfm,this.options.breaks?r.inline=d3.breaks:r.inline=d3.gfm),this.tokenizer.rules=r}static get rules(){return{block:O7,inline:d3}}static lex(e,r){return new ug(r).lex(e)}static lexInline(e,r){return new ug(r).inlineTokens(e)}lex(e){e=e.replace(Jo.carriageReturn,`
|
||
`),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var a,i,s;for(this.options.pedantic&&(e=e.replace(Jo.tabCharGlobal," ").replace(Jo.spaceLine,""));e;){let o;if((i=(a=this.options.extensions)==null?void 0:a.block)!=null&&i.some(h=>(o=h.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
|
||
`:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
||
`)?"":`
|
||
`)+o.raw,h.text+=`
|
||
`+o.text,this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
||
`)?"":`
|
||
`)+o.raw,h.text+=`
|
||
`+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let u=e;if((s=this.options.extensions)!=null&&s.startBlock){let h=1/0,d=e.slice(1),f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(u=e.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(u))){let h=r.at(-1);n&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
||
`)?"":`
|
||
`)+o.raw,h.text+=`
|
||
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),n=u.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
||
`)?"":`
|
||
`)+o.raw,h.text+=`
|
||
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(e){let h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var u,h,d,f,p,g;let n=e,a=null;if(this.tokens.links){let m=Object.keys(this.tokens.links);if(m.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)m.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,a.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=a[2]?a[2].length:0,n=n.slice(0,a.index+i)+"["+"a".repeat(a[0].length-i-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=(d=(h=(u=this.options.hooks)==null?void 0:u.emStrongMask)==null?void 0:h.call({lexer:this},n))!=null?d:n;let s=!1,o="";for(;e;){s||(o=""),s=!1;let m;if((p=(f=this.options.extensions)==null?void 0:f.inline)!=null&&p.some(v=>(m=v.call({lexer:this},e,r))?(e=e.substring(m.raw.length),r.push(m),!0):!1))continue;if(m=this.tokenizer.escape(e)){e=e.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.tag(e)){e=e.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.link(e)){e=e.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(m.raw.length);let v=r.at(-1);m.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=m.raw,v.text+=m.text):r.push(m);continue}if(m=this.tokenizer.emStrong(e,n,o)){e=e.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.codespan(e)){e=e.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.br(e)){e=e.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.del(e)){e=e.substring(m.raw.length),r.push(m);continue}if(m=this.tokenizer.autolink(e)){e=e.substring(m.raw.length),r.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(e))){e=e.substring(m.raw.length),r.push(m);continue}let y=e;if((g=this.options.extensions)!=null&&g.startInline){let v=1/0,b=e.slice(1),w;this.options.extensions.startInline.forEach(x=>{w=x.call({lexer:this},b),typeof w=="number"&&w>=0&&(v=Math.min(v,w))}),v<1/0&&v>=0&&(y=e.substring(0,v+1))}if(m=this.tokenizer.inlineText(y)){e=e.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(o=m.raw.slice(-1)),s=!0;let v=r.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=m.raw,v.text+=m.text):r.push(m);continue}if(e){let v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return r}},l(ug,"l"),ug),F7=(MC=class{constructor(e){Ln(this,"options");Ln(this,"parser");this.options=e||Sm}space(e){return""}code({text:e,lang:r,escaped:n}){var s;let a=(s=(r||"").match(Jo.notSpaceStart))==null?void 0:s[0],i=e.replace(Jo.endingNewline,"")+`
|
||
`;return a?'<pre><code class="language-'+zh(a)+'">'+(n?i:zh(i,!0))+`</code></pre>
|
||
`:"<pre><code>"+(n?i:zh(i,!0))+`</code></pre>
|
||
`}blockquote({tokens:e}){return`<blockquote>
|
||
${this.parser.parse(e)}</blockquote>
|
||
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
|
||
`}hr(e){return`<hr>
|
||
`}list(e){let r=e.ordered,n=e.start,a="";for(let o=0;o<e.items.length;o++){let u=e.items[o];a+=this.listitem(u)}let i=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+i+s+`>
|
||
`+a+"</"+i+`>
|
||
`}listitem(e){var n;let r="";if(e.task){let a=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=a+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=a+" "+zh(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:a+" ",text:a+" ",escaped:!0}):r+=a+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
|
||
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
||
`}table(e){let r="",n="";for(let i=0;i<e.header.length;i++)n+=this.tablecell(e.header[i]);r+=this.tablerow({text:n});let a="";for(let i=0;i<e.rows.length;i++){let s=e.rows[i];n="";for(let o=0;o<s.length;o++)n+=this.tablecell(s[o]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
||
<thead>
|
||
`+r+`</thead>
|
||
`+a+`</table>
|
||
`}tablerow({text:e}){return`<tr>
|
||
${e}</tr>
|
||
`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
|
||
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${zh(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let a=this.parser.parseInline(n),i=nbe(e);if(i===null)return a;e=i;let s='<a href="'+e+'"';return r&&(s+=' title="'+zh(r)+'"'),s+=">"+a+"</a>",s}image({href:e,title:r,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let i=nbe(e);if(i===null)return zh(n);e=i;let s=`<img src="${e}" alt="${n}"`;return r&&(s+=` title="${zh(r)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:zh(e.text)}},l(MC,"P"),MC),IW=(PC=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},l(PC,"$"),PC),Wu=(hg=class{constructor(e){Ln(this,"options");Ln(this,"renderer");Ln(this,"textRenderer");this.options=e||Sm,this.options.renderer=this.options.renderer||new F7,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new IW}static parse(e,r){return new hg(r).parse(e)}static parseInline(e,r){return new hg(r).parseInline(e)}parse(e,r=!0){var a,i;let n="";for(let s=0;s<e.length;s++){let o=e[s];if((i=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&i[o.type]){let h=o,d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){n+=d||"";continue}}let u=o;switch(u.type){case"space":{n+=this.renderer.space(u);continue}case"hr":{n+=this.renderer.hr(u);continue}case"heading":{n+=this.renderer.heading(u);continue}case"code":{n+=this.renderer.code(u);continue}case"table":{n+=this.renderer.table(u);continue}case"blockquote":{n+=this.renderer.blockquote(u);continue}case"list":{n+=this.renderer.list(u);continue}case"html":{n+=this.renderer.html(u);continue}case"def":{n+=this.renderer.def(u);continue}case"paragraph":{n+=this.renderer.paragraph(u);continue}case"text":{let h=u,d=this.renderer.text(h);for(;s+1<e.length&&e[s+1].type==="text";)h=e[++s],d+=`
|
||
`+this.renderer.text(h);r?n+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):n+=d;continue}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}parseInline(e,r=this.renderer){var a,i;let n="";for(let s=0;s<e.length;s++){let o=e[s];if((i=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&i[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=h||"";continue}}let u=o;switch(u.type){case"escape":{n+=r.text(u);break}case"html":{n+=r.html(u);break}case"link":{n+=r.link(u);break}case"image":{n+=r.image(u);break}case"strong":{n+=r.strong(u);break}case"em":{n+=r.em(u);break}case"codespan":{n+=r.codespan(u);break}case"br":{n+=r.br(u);break}case"del":{n+=r.del(u);break}case"text":{n+=r.text(u);break}default:{let h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return n}},l(hg,"l"),hg),p3=(dg=class{constructor(e){Ln(this,"options");Ln(this,"block");this.options=e||Sm}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Hu.lex:Hu.lexInline}provideParser(){return this.block?Wu.parse:Wu.parseInline}},l(dg,"S"),Ln(dg,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ln(dg,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),dg),G8t=(RC=class{constructor(...e){Ln(this,"defaults",wW());Ln(this,"options",this.setOptions);Ln(this,"parse",this.parseMarkdown(!0));Ln(this,"parseInline",this.parseMarkdown(!1));Ln(this,"Parser",Wu);Ln(this,"Renderer",F7);Ln(this,"TextRenderer",IW);Ln(this,"Lexer",Hu);Ln(this,"Tokenizer",D7);Ln(this,"Hooks",p3);this.use(...e)}walkTokens(e,r){var a,i;let n=[];for(let s of e)switch(n=n.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let u of o.header)n=n.concat(this.walkTokens(u.tokens,r));for(let u of o.rows)for(let h of u)n=n.concat(this.walkTokens(h.tokens,r));break}case"list":{let o=s;n=n.concat(this.walkTokens(o.items,r));break}default:{let o=s;(i=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&i[o.type]?this.defaults.extensions.childTokens[o.type].forEach(u=>{let h=o[u].flat(1/0);n=n.concat(this.walkTokens(h,r))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let a=X({},n);if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=r.renderers[i.name];s?r.renderers[i.name]=function(...o){let u=i.renderer.apply(this,o);return u===!1&&(u=s.apply(this,o)),u}:r.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[i.level];s?s.unshift(i.tokenizer):r[i.level]=[i.tokenizer],i.start&&(i.level==="block"?r.startBlock?r.startBlock.push(i.start):r.startBlock=[i.start]:i.level==="inline"&&(r.startInline?r.startInline.push(i.start):r.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(r.childTokens[i.name]=i.childTokens)}),a.extensions=r),n.renderer){let i=this.defaults.renderer||new F7(this.defaults);for(let s in n.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,u=n.renderer[o],h=i[o];i[o]=(...d)=>{let f=u.apply(i,d);return f===!1&&(f=h.apply(i,d)),f||""}}a.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new D7(this.defaults);for(let s in n.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,u=n.tokenizer[o],h=i[o];i[o]=(...d)=>{let f=u.apply(i,d);return f===!1&&(f=h.apply(i,d)),f}}a.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new p3;for(let s in n.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,u=n.hooks[o],h=i[o];p3.passThroughHooks.has(s)?i[o]=d=>{if(this.defaults.async&&p3.passThroughHooksRespectAsync.has(s))return nt(this,null,function*(){let p=yield u.call(i,d);return h.call(i,p)});let f=u.call(i,d);return h.call(i,f)}:i[o]=(...d)=>{if(this.defaults.async)return nt(this,null,function*(){let p=yield u.apply(i,d);return p===!1&&(p=yield h.apply(i,d)),p});let f=u.apply(i,d);return f===!1&&(f=h.apply(i,d)),f}}a.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,s=n.walkTokens;a.walkTokens=function(o){let u=[];return u.push(s.call(this,o)),i&&(u=u.concat(i.call(this,o))),u}}this.defaults=X(X({},this.defaults),a)}),this}setOptions(e){return this.defaults=X(X({},this.defaults),e),this}lexer(e,r){return Hu.lex(e,r!=null?r:this.defaults)}parser(e,r){return Wu.parse(e,r!=null?r:this.defaults)}parseMarkdown(e){return(r,n)=>{let a=X({},n),i=X(X({},this.defaults),a),s=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&a.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return nt(this,null,function*(){let o=i.hooks?yield i.hooks.preprocess(r):r,u=yield(i.hooks?yield i.hooks.provideLexer():e?Hu.lex:Hu.lexInline)(o,i),h=i.hooks?yield i.hooks.processAllTokens(u):u;i.walkTokens&&(yield Promise.all(this.walkTokens(h,i.walkTokens)));let d=yield(i.hooks?yield i.hooks.provideParser():e?Wu.parse:Wu.parseInline)(h,i);return i.hooks?yield i.hooks.postprocess(d):d}).catch(s);try{i.hooks&&(r=i.hooks.preprocess(r));let o=(i.hooks?i.hooks.provideLexer():e?Hu.lex:Hu.lexInline)(r,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let u=(i.hooks?i.hooks.provideParser():e?Wu.parse:Wu.parseInline)(o,i);return i.hooks&&(u=i.hooks.postprocess(u)),u}catch(o){return s(o)}}}onError(e,r){return n=>{if(n.message+=`
|
||
Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+zh(n.message+"",!0)+"</pre>";return r?Promise.resolve(a):a}if(r)return Promise.reject(n);throw n}}},l(RC,"B"),RC),_m=new G8t;function ra(t,e){return _m.parse(t,e)}l(ra,"k$1"),ra.options=ra.setOptions=function(t){return _m.setOptions(t),ra.defaults=_m.defaults,V2e(ra.defaults),ra},ra.getDefaults=wW,ra.defaults=Sm,ra.use=function(...t){return _m.use(...t),ra.defaults=_m.defaults,V2e(ra.defaults),ra},ra.walkTokens=function(t,e){return _m.walkTokens(t,e)},ra.parseInline=_m.parseInline,ra.Parser=Wu,ra.parser=Wu.parse,ra.Renderer=F7,ra.TextRenderer=IW,ra.Lexer=Hu,ra.lexer=Hu.lex,ra.Tokenizer=D7,ra.Hooks=p3,ra.parse=ra,ra.options,ra.setOptions,ra.use,ra.walkTokens,ra.parseInline,Wu.parse,Hu.lex;function sbe(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var a=n.reduce(function(o,u){var h=u.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(d){var f,p;return(p=(f=d.match(/[\t ]/g))===null||f===void 0?void 0:f.length)!==null&&p!==void 0?p:0})):o},[]);if(a.length){var i=new RegExp(`
|
||
[ ]{`.concat(Math.min.apply(Math,a),"}"),"g");n=n.map(function(o){return o.replace(i,`
|
||
`)})}n[0]=n[0].replace(/^\r?\n/,"");var s=n[0];return e.forEach(function(o,u){var h=s.match(/(?:^|\n)( *)$/),d=h?h[1]:"",f=o;typeof o=="string"&&o.includes(`
|
||
`)&&(f=String(o).split(`
|
||
`).map(function(p,g){return g===0?p:"".concat(d).concat(p)}).join(`
|
||
`)),s+=f+n[u+1]}),s}l(sbe,"dedent");function obe(t,{markdownAutoWrap:e}){const n=t.replace(/<br\/>/g,`
|
||
`).replace(/\n{2,}/g,`
|
||
`);return sbe(n)}l(obe,"preprocessMarkdown"),_(obe,"preprocessMarkdown");function lbe(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(e=>{var r,n;return(n=(r=e.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(a=>({content:a,type:"normal"})))!=null?n:[]})}l(lbe,"nonMarkdownToLines"),_(lbe,"nonMarkdownToLines");function cbe(t,e={}){const r=obe(t,e),n=ra.lexer(r),a=[[]];let i=0;function s(o,u="normal"){o.type==="text"?o.text.split(`
|
||
`).forEach((d,f)=>{f!==0&&(i++,a.push([])),d.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&a[i].push({content:p,type:u})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{s(h,o.type)}):o.type==="html"&&a[i].push({content:o.text,type:"normal"})}return l(s,"processNode"),_(s,"processNode"),n.forEach(o=>{var u;o.type==="paragraph"?(u=o.tokens)==null||u.forEach(h=>{s(h)}):o.type==="html"?a[i].push({content:o.text,type:"normal"}):a[i].push({content:o.raw,type:"normal"})}),a}l(cbe,"markdownToLines"),_(cbe,"markdownToLines");function ube(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}l(ube,"nonMarkdownToHTML"),_(ube,"nonMarkdownToHTML");function hbe(t,{markdownAutoWrap:e}={}){const r=ra.lexer(t);function n(a){var i,s,o;return a.type==="text"?e===!1?a.text.replace(/\n */g,"<br/>").replace(/ /g," "):a.text.replace(/\n */g,"<br/>"):a.type==="strong"?`<strong>${(i=a.tokens)==null?void 0:i.map(n).join("")}</strong>`:a.type==="em"?`<em>${(s=a.tokens)==null?void 0:s.map(n).join("")}</em>`:a.type==="paragraph"?`<p>${(o=a.tokens)==null?void 0:o.map(n).join("")}</p>`:a.type==="space"?"":a.type==="html"?`${a.text}`:a.type==="escape"?a.text:(Le.warn(`Unsupported markdown: ${a.type}`),a.raw)}return l(n,"output"),_(n,"output"),r.map(n).join("")}l(hbe,"markdownToHTML"),_(hbe,"markdownToHTML");function dbe(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}l(dbe,"splitTextToChars"),_(dbe,"splitTextToChars");function fbe(t,e){const r=dbe(e.content);return LW(t,[],r,e.type)}l(fbe,"splitWordToFitWidth"),_(fbe,"splitWordToFitWidth");function LW(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[a,...i]=r,s=[...e,a];return t([{content:s.join(""),type:n}])?LW(t,s,i,n):(e.length===0&&a&&(e.push(a),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}l(LW,"splitWordToFitWidthRecursion"),_(LW,"splitWordToFitWidthRecursion");function pbe(t,e){if(t.some(({content:r})=>r.includes(`
|
||
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return B7(t,e)}l(pbe,"splitLineToFitWidth"),_(pbe,"splitLineToFitWidth");function B7(t,e,r=[],n=[]){var o;if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let a="";t[0].content===" "&&(a=" ",t.shift());const i=(o=t.shift())!=null?o:{content:" ",type:"normal"},s=[...n];if(a!==""&&s.push({content:a,type:"normal"}),s.push(i),e(s))return B7(t,e,r,s);if(n.length>0)r.push(n),t.unshift(i);else if(i.content){const[u,h]=fbe(e,i);r.push([u]),h.content&&t.unshift(h)}return B7(t,e,r)}l(B7,"splitLineToFitWidthRecursion"),_(B7,"splitLineToFitWidthRecursion");function $W(t,e){e&&t.attr("style",e)}l($W,"applyStyle"),_($W,"applyStyle");var gbe=16384;function mbe(s,o,u,h){return nt(this,arguments,function*(t,e,r,n,a=!1,i=Ar()){const d=t.append("foreignObject");d.attr("width",`${Math.min(10*r,gbe)}px`),d.attr("height",`${Math.min(10*r,gbe)}px`);const f=d.append("xhtml:div"),p=Mi(e.label)?yield C8(e.label.replace(or.lineBreakRegex,`
|
||
`),i):mn(e.label,i),g=e.isNode?"nodeLabel":"edgeLabel",m=f.append("span");m.html(p),$W(m,e.labelStyle),m.attr("class",`${g} ${n}`),$W(f,e.labelStyle),f.style("display","table-cell"),f.style("white-space","nowrap"),f.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(f.style("max-width",r+"px"),f.style("text-align","center")),f.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&f.attr("class","labelBkg");let y=f.node().getBoundingClientRect();return y.width===r&&(f.style("display","table"),f.style("white-space","break-spaces"),f.style("width",r+"px"),y=f.node().getBoundingClientRect()),d.node()})}l(mbe,"addHtmlSpan"),_(mbe,"addHtmlSpan");function z7(t,e,r,n=!1){const a=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return n&&a.attr("text-anchor","middle"),a}l(z7,"createTspan"),_(z7,"createTspan");function ybe(t,e,r){const n=t.append("text"),a=z7(n,1,e);H7(a,r);const i=a.node().getComputedTextLength();return n.remove(),i}l(ybe,"computeWidthOfText"),_(ybe,"computeWidthOfText");function vbe(t,e,r){var s;const n=t.append("text"),a=z7(n,1,e);H7(a,[{content:r,type:"normal"}]);const i=(s=a.node())==null?void 0:s.getBoundingClientRect();return i&&n.remove(),i}l(vbe,"computeDimensionOfText"),_(vbe,"computeDimensionOfText");function bbe(t,e,r,n=!1,a=!1){const s=e.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),u=s.append("text").attr("y","-10.1");a&&u.attr("text-anchor","middle");let h=0;for(const d of r){const f=_(g=>ybe(s,1.1,g)<=t,"checkWidth"),p=f(d)?[d]:pbe(d,f);for(const g of p){const m=z7(u,h,1.1,a);H7(m,g),h++}}if(n){const d=u.node().getBBox(),f=2;return o.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),s.node()}else return u.node()}l(bbe,"createFormattedText"),_(bbe,"createFormattedText");function MW(t){const e=/&(amp|lt|gt);/g;return t.replace(e,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}l(MW,"decodeHTMLEntities"),_(MW,"decodeHTMLEntities");function H7(t,e){t.text(""),e.forEach((r,n)=>{const a=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?a.text(MW(r.content)):a.text(" "+MW(r.content))})}l(H7,"updateTextContentAndStyles"),_(H7,"updateTextContentAndStyles");function xbe(r){return nt(this,arguments,function*(t,e={}){const n=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,s,o)=>(n.push(nt(this,null,function*(){const u=`${s}:${o}`;return(yield o8t(u))?yield hf(u,void 0,{class:"label-icon"}):`<i class='${mn(i,e).replace(":"," ")}'></i>`})),i));const a=yield Promise.all(n);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>{var i;return(i=a.shift())!=null?i:""})})}l(xbe,"replaceIconSubstring"),_(xbe,"replaceIconSubstring");var Oo=_((f,...p)=>nt(this,[f,...p],function*(t,e="",{style:r="",isTitle:n=!1,classes:a="",useHtmlLabels:i=!0,markdown:s=!0,isNode:o=!0,width:u=200,addSvgBackground:h=!1}={},d){if(Le.debug("XYZ createText",e,r,n,a,i,o,"addSvgBackground: ",h),i){const g=s?hbe(e,d):ube(e),m=yield xbe(uf(g),d),y=e.replace(/\\\\/g,"\\"),v={isNode:o,label:Mi(e)?y:m,labelStyle:r.replace("fill:","color:")};return yield mbe(t,v,u,a,h,d)}else{const g=uf(e.replace(/<br\s*\/?>/g,"<br/>")),m=s?cbe(g.replace("<br>","<br/>"),d):lbe(g),y=bbe(u,t,m,e?h:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Yt(y).attr("style",v)}else{const v=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Yt(y).select("rect").attr("style",v.replace(/background:/g,"fill:"));const b=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Yt(y).select("text").attr("style",b)}return n?Yt(y).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Yt(y).selectAll("tspan.text-outer-tspan").classed("row",!0),y}}),"createText");function PW(t,e,r){if(t&&t.length){const[n,a]=e,i=Math.PI/180*r,s=Math.cos(i),o=Math.sin(i);for(const u of t){const[h,d]=u;u[0]=(h-n)*s-(d-a)*o+n,u[1]=(h-n)*o+(d-a)*s+a}}}l(PW,"t");function q8t(t,e){return t[0]===e[0]&&t[1]===e[1]}l(q8t,"e");function Y8t(t,e,r,n=1){const a=r,i=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(a)for(const h of s)PW(h,o,a);const u=function(h,d,f){const p=[];for(const w of h){const x=[...w];q8t(x[0],x[x.length-1])||x.push([x[0][0],x[0][1]]),x.length>2&&p.push(x)}const g=[];d=Math.max(d,.1);const m=[];for(const w of p)for(let x=0;x<w.length-1;x++){const T=w[x],C=w[x+1];if(T[1]!==C[1]){const S=Math.min(T[1],C[1]);m.push({ymin:S,ymax:Math.max(T[1],C[1]),x:S===T[1]?T[0]:C[0],islope:(C[0]-T[0])/(C[1]-T[1])})}}if(m.sort((w,x)=>w.ymin<x.ymin?-1:w.ymin>x.ymin?1:w.x<x.x?-1:w.x>x.x?1:w.ymax===x.ymax?0:(w.ymax-x.ymax)/Math.abs(w.ymax-x.ymax)),!m.length)return g;let y=[],v=m[0].ymin,b=0;for(;y.length||m.length;){if(m.length){let w=-1;for(let x=0;x<m.length&&!(m[x].ymin>v);x++)w=x;m.splice(0,w+1).forEach(x=>{y.push({s:v,edge:x})})}if(y=y.filter(w=>!(w.edge.ymax<=v)),y.sort((w,x)=>w.edge.x===x.edge.x?0:(w.edge.x-x.edge.x)/Math.abs(w.edge.x-x.edge.x)),(f!==1||b%d==0)&&y.length>1)for(let w=0;w<y.length;w+=2){const x=w+1;if(x>=y.length)break;const T=y[w].edge,C=y[x].edge;g.push([[Math.round(T.x),v],[Math.round(C.x),v]])}v+=f,y.forEach(w=>{w.edge.x=w.edge.x+f*w.edge.islope}),b++}return g}(s,i,n);if(a){for(const h of s)PW(h,o,-a);(function(h,d,f){const p=[];h.forEach(g=>p.push(...g)),PW(p,d,f)})(u,o,-a)}return u}l(Y8t,"s");function g3(t,e){var r;const n=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let i=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(i=a),Y8t(t,a,n,i||1)}l(g3,"n");const Cre=class Cre{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=g3(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){const n=[];for(const a of e)n.push(...this.helper.doubleLineOps(a[0][0],a[0][1],a[1][0],a[1][1],r));return n}};l(Cre,"o");let m3=Cre;function W7(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}l(W7,"a");const Sre=class Sre extends m3{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const a=g3(e,Object.assign({},r,{hachureGap:n})),i=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(i),u=.5*n*Math.sin(i);for(const[h,d]of a)W7([h,d])&&s.push([[h[0]-o,h[1]+u],[...d]],[[h[0]+o,h[1]-u],[...d]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}};l(Sre,"h");let RW=Sre;const _re=class _re extends m3{fillPolygons(e,r){const n=this._fillPolygons(e,r),a=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),i=this._fillPolygons(e,a);return n.ops=n.ops.concat(i.ops),n}};l(_re,"r");let OW=_re,U8t=(OC=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=g3(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){const n=[];let a=r.hachureGap;a<0&&(a=4*r.strokeWidth),a=Math.max(a,.1);let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const s=a/4;for(const o of e){const u=W7(o),h=u/a,d=Math.ceil(h)-1,f=u-d*a,p=(o[0][0]+o[1][0])/2-a/4,g=Math.min(o[0][1],o[1][1]);for(let m=0;m<d;m++){const y=g+f+m*a,v=p-s+2*Math.random()*s,b=y-s+2*Math.random()*s,w=this.helper.ellipse(v,b,i,i,r);n.push(...w.ops)}}return{type:"fillSketch",ops:n}}},l(OC,"i"),OC),j8t=(DC=class{constructor(e){this.helper=e}fillPolygons(e,r){const n=g3(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){const n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,a=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,i=[];return e.forEach(s=>{const o=W7(s),u=Math.floor(o/(n+a)),h=(o+a-u*(n+a))/2;let d=s[0],f=s[1];d[0]>f[0]&&(d=s[1],f=s[0]);const p=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let g=0;g<u;g++){const m=g*(n+a),y=m+n,v=[d[0]+m*Math.cos(p)+h*Math.cos(p),d[1]+m*Math.sin(p)+h*Math.sin(p)],b=[d[0]+y*Math.cos(p)+h*Math.cos(p),d[1]+y*Math.sin(p)+h*Math.sin(p)];i.push(...this.helper.doubleLineOps(v[0],v[1],b[0],b[1],r))}}),i}},l(DC,"c"),DC);const kre=class kre{constructor(e){this.helper=e}fillPolygons(e,r){const n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,a=r.zigzagOffset<0?n:r.zigzagOffset,i=g3(e,r=Object.assign({},r,{hachureGap:n+a}));return{type:"fillSketch",ops:this.zigzagLines(i,a,r)}}zigzagLines(e,r,n){const a=[];return e.forEach(i=>{const s=W7(i),o=Math.round(s/(2*r));let u=i[0],h=i[1];u[0]>h[0]&&(u=i[1],h=i[0]);const d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f<o;f++){const p=2*f*r,g=2*(f+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[u[0]+p*Math.cos(d),u[1]+p*Math.sin(d)],v=[u[0]+g*Math.cos(d),u[1]+g*Math.sin(d)],b=[y[0]+m*Math.cos(d+Math.PI/4),y[1]+m*Math.sin(d+Math.PI/4)];a.push(...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],n),...this.helper.doubleLineOps(b[0],b[1],v[0],v[1],n))}}),a}};l(kre,"l");let DW=kre;const Hl={};let K8t=(FC=class{constructor(e){this.seed=e}next(){return this.seed?(ph(2,31)-1&(this.seed=Math.imul(48271,this.seed)))/ph(2,31):Math.random()}},l(FC,"p"),FC);const X8t=0,FW=1,wbe=2,V7={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function BW(t,e){return t.type===e}l(BW,"k");function zW(t){const e=[],r=function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:X8t,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:FW,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:wbe,text:""},o}(t);let n="BOD",a=0,i=r[a];for(;!BW(i,wbe);){let s=0;const o=[];if(n==="BOD"){if(i.text!=="M"&&i.text!=="m")return zW("M0,0"+t);a++,s=V7[i.text],n=i.text}else BW(i,FW)?s=V7[n]:(a++,s=V7[i.text],n=i.text);if(!(a+s<r.length))throw new Error("Path data ended short");for(let u=a;u<a+s;u++){const h=r[u];if(!BW(h,FW))throw new Error("Param not a number: "+n+","+h.text);o[o.length]=+h.text}if(typeof V7[n]!="number")throw new Error("Bad segment: "+n);{const u={key:n,data:o};e.push(u),a+=s,i=r[a],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}l(zW,"b");function Tbe(t){let e=0,r=0,n=0,a=0;const i=[];for(const{key:s,data:o}of t)switch(s){case"M":i.push({key:"M",data:[...o]}),[e,r]=o,[n,a]=o;break;case"m":e+=o[0],r+=o[1],i.push({key:"M",data:[e,r]}),n=e,a=r;break;case"L":i.push({key:"L",data:[...o]}),[e,r]=o;break;case"l":e+=o[0],r+=o[1],i.push({key:"L",data:[e,r]});break;case"C":i.push({key:"C",data:[...o]}),e=o[4],r=o[5];break;case"c":{const u=o.map((h,d)=>d%2?h+r:h+e);i.push({key:"C",data:u}),e=u[4],r=u[5];break}case"Q":i.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{const u=o.map((h,d)=>d%2?h+r:h+e);i.push({key:"Q",data:u}),e=u[2],r=u[3];break}case"A":i.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],i.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":i.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],i.push({key:"H",data:[e]});break;case"V":i.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],i.push({key:"V",data:[r]});break;case"S":i.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{const u=o.map((h,d)=>d%2?h+r:h+e);i.push({key:"S",data:u}),e=u[2],r=u[3];break}case"T":i.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],i.push({key:"T",data:[e,r]});break;case"Z":case"z":i.push({key:"Z",data:[]}),e=n,r=a}return i}l(Tbe,"y$2");function Ebe(t){const e=[];let r="",n=0,a=0,i=0,s=0,o=0,u=0;for(const{key:h,data:d}of t){switch(h){case"M":e.push({key:"M",data:[...d]}),[n,a]=d,[i,s]=d;break;case"C":e.push({key:"C",data:[...d]}),n=d[4],a=d[5],o=d[2],u=d[3];break;case"L":e.push({key:"L",data:[...d]}),[n,a]=d;break;case"H":n=d[0],e.push({key:"L",data:[n,a]});break;case"V":a=d[0],e.push({key:"L",data:[n,a]});break;case"S":{let f=0,p=0;r==="C"||r==="S"?(f=n+(n-o),p=a+(a-u)):(f=n,p=a),e.push({key:"C",data:[f,p,...d]}),o=d[0],u=d[1],n=d[2],a=d[3];break}case"T":{const[f,p]=d;let g=0,m=0;r==="Q"||r==="T"?(g=n+(n-o),m=a+(a-u)):(g=n,m=a);const y=n+2*(g-n)/3,v=a+2*(m-a)/3,b=f+2*(g-f)/3,w=p+2*(m-p)/3;e.push({key:"C",data:[y,v,b,w,f,p]}),o=g,u=m,n=f,a=p;break}case"Q":{const[f,p,g,m]=d,y=n+2*(f-n)/3,v=a+2*(p-a)/3,b=g+2*(f-g)/3,w=m+2*(p-m)/3;e.push({key:"C",data:[y,v,b,w,g,m]}),o=f,u=p,n=g,a=m;break}case"A":{const f=Math.abs(d[0]),p=Math.abs(d[1]),g=d[2],m=d[3],y=d[4],v=d[5],b=d[6];f===0||p===0?(e.push({key:"C",data:[n,a,v,b,v,b]}),n=v,a=b):(n!==v||a!==b)&&(Cbe(n,a,v,b,f,p,g,m,y).forEach(function(w){e.push({key:"C",data:w})}),n=v,a=b);break}case"Z":e.push({key:"Z",data:[]}),n=i,a=s}r=h}return e}l(Ebe,"m");function y3(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}l(y3,"w$1");function Cbe(t,e,r,n,a,i,s,o,u,h){const d=(f=s,Math.PI*f/180);var f;let p=[],g=0,m=0,y=0,v=0;if(h)[g,m,y,v]=h;else{[t,e]=y3(t,e,-d),[r,n]=y3(r,n,-d);const O=(t-r)/2,M=(e-n)/2;let P=O*O/(a*a)+M*M/(i*i);P>1&&(P=Math.sqrt(P),a*=P,i*=P);const z=a*a,D=i*i,B=z*D-z*M*M-D*O*O,W=z*M*M+D*O*O,U=(o===u?-1:1)*Math.sqrt(Math.abs(B/W));y=U*a*M/i+(t+r)/2,v=U*-i*O/a+(e+n)/2,g=Math.asin(parseFloat(((e-v)/i).toFixed(9))),m=Math.asin(parseFloat(((n-v)/i).toFixed(9))),t<y&&(g=Math.PI-g),r<y&&(m=Math.PI-m),g<0&&(g=2*Math.PI+g),m<0&&(m=2*Math.PI+m),u&&g>m&&(g-=2*Math.PI),!u&&m>g&&(m-=2*Math.PI)}let b=m-g;if(Math.abs(b)>120*Math.PI/180){const O=m,M=r,P=n;m=u&&m>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,p=Cbe(r=y+a*Math.cos(m),n=v+i*Math.sin(m),M,P,a,i,s,0,u,[m,O,y,v])}b=m-g;const w=Math.cos(g),x=Math.sin(g),T=Math.cos(m),C=Math.sin(m),S=Math.tan(b/4),E=4/3*a*S,k=4/3*i*S,A=[t,e],I=[t+E*x,e-k*w],L=[r+E*C,n-k*T],R=[r,n];if(I[0]=2*A[0]-I[0],I[1]=2*A[1]-I[1],h)return[I,L,R].concat(p);{p=[I,L,R].concat(p);const O=[];for(let M=0;M<p.length;M+=3){const P=y3(p[M][0],p[M][1],d),z=y3(p[M+1][0],p[M+1][1],d),D=y3(p[M+2][0],p[M+2][1],d);O.push([P[0],P[1],z[0],z[1],D[0],D[1]])}return O}}l(Cbe,"x$2");const Z8t={randOffset:l(function(t,e){return Kr(t,e)},"randOffset"),randOffsetWithRange:l(function(t,e,r){return q7(t,e,r)},"randOffsetWithRange"),ellipse:l(function(t,e,r,n,a){const i=kbe(r,n,a);return HW(t,e,a,i).opset},"ellipse"),doubleLineOps:l(function(t,e,r,n,a){return Q0(t,e,r,n,a,!0)},"doubleLineOps")};function Sbe(t,e,r,n,a){return{type:"path",ops:Q0(t,e,r,n,a)}}l(Sbe,"v");function G7(t,e,r){const n=(t||[]).length;if(n>2){const a=[];for(let i=0;i<n-1;i++)a.push(...Q0(t[i][0],t[i][1],t[i+1][0],t[i+1][1],r));return e&&a.push(...Q0(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:a}}return n===2?Sbe(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}l(G7,"S$1");function Q8t(t,e,r,n,a){return function(i,s){return G7(i,!0,s)}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],a)}l(Q8t,"O");function _be(t,e){if(t.length){const r=typeof t[0][0]=="number"?[t]:t,n=Y7(r[0],1*(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:Y7(r[0],1.5*(1+.22*e.roughness),Ibe(e));for(let i=1;i<r.length;i++){const s=r[i];if(s.length){const o=Y7(s,1*(1+.2*e.roughness),e),u=e.disableMultiStroke?[]:Y7(s,1.5*(1+.22*e.roughness),Ibe(e));for(const h of o)h.op!=="move"&&n.push(h);for(const h of u)h.op!=="move"&&a.push(h)}}return{type:"path",ops:n.concat(a)}}return{type:"path",ops:[]}}l(_be,"L");function kbe(t,e,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),a=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),i=2*Math.PI/a;let s=Math.abs(t/2),o=Math.abs(e/2);const u=1-r.curveFitting;return s+=Kr(s*u,r),o+=Kr(o*u,r),{increment:i,rx:s,ry:o}}l(kbe,"T$1");function HW(t,e,r,n){const[a,i]=$be(n.increment,t,e,n.rx,n.ry,1,n.increment*q7(.1,q7(.4,1,r),r),r);let s=U7(a,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=$be(n.increment,t,e,n.rx,n.ry,1.5,0,r),u=U7(o,null,r);s=s.concat(u)}return{estimatedPoints:i,opset:{type:"path",ops:s}}}l(HW,"D$1");function Abe(t,e,r,n,a,i,s,o,u){const h=t,d=e;let f=Math.abs(r/2),p=Math.abs(n/2);f+=Kr(.01*f,u),p+=Kr(.01*p,u);let g=a,m=i;for(;g<0;)g+=2*Math.PI,m+=2*Math.PI;m-g>2*Math.PI&&(g=0,m=2*Math.PI);const y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(m-g)/2),b=Mbe(v,h,d,f,p,g,m,1,u);if(!u.disableMultiStroke){const w=Mbe(v,h,d,f,p,g,m,1.5,u);b.push(...w)}return s&&(o?b.push(...Q0(h,d,h+f*Math.cos(g),d+p*Math.sin(g),u),...Q0(h,d,h+f*Math.cos(m),d+p*Math.sin(m),u)):b.push({op:"lineTo",data:[h,d]},{op:"lineTo",data:[h+f*Math.cos(g),d+p*Math.sin(g)]})),{type:"path",ops:b}}l(Abe,"A");function Nbe(t,e){const r=Ebe(Tbe(zW(t))),n=[];let a=[0,0],i=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":i=[o[0],o[1]],a=[o[0],o[1]];break;case"L":n.push(...Q0(i[0],i[1],o[0],o[1],e)),i=[o[0],o[1]];break;case"C":{const[u,h,d,f,p,g]=o;n.push(...J8t(u,h,d,f,p,g,i,e)),i=[p,g];break}case"Z":n.push(...Q0(i[0],i[1],a[0],a[1],e)),i=[a[0],a[1]]}return{type:"path",ops:n}}l(Nbe,"_");function WW(t,e){const r=[];for(const n of t)if(n.length){const a=e.maxRandomnessOffset||0,i=n.length;if(i>2){r.push({op:"move",data:[n[0][0]+Kr(a,e),n[0][1]+Kr(a,e)]});for(let s=1;s<i;s++)r.push({op:"lineTo",data:[n[s][0]+Kr(a,e),n[s][1]+Kr(a,e)]})}}return{type:"fillPath",ops:r}}l(WW,"I");function Hw(t,e){return function(r,n){let a=r.fillStyle||"hachure";if(!Hl[a])switch(a){case"zigzag":Hl[a]||(Hl[a]=new RW(n));break;case"cross-hatch":Hl[a]||(Hl[a]=new OW(n));break;case"dots":Hl[a]||(Hl[a]=new U8t(n));break;case"dashed":Hl[a]||(Hl[a]=new j8t(n));break;case"zigzag-line":Hl[a]||(Hl[a]=new DW(n));break;default:a="hachure",Hl[a]||(Hl[a]=new m3(n))}return Hl[a]}(e,Z8t).fillPolygons(t,e)}l(Hw,"C");function Ibe(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}l(Ibe,"z");function Lbe(t){return t.randomizer||(t.randomizer=new K8t(t.seed||0)),t.randomizer.next()}l(Lbe,"W");function q7(t,e,r,n=1){return r.roughness*n*(Lbe(r)*(e-t)+t)}l(q7,"E");function Kr(t,e,r=1){return q7(-t,t,e,r)}l(Kr,"G");function Q0(t,e,r,n,a,i=!1){const s=i?a.disableMultiStrokeFill:a.disableMultiStroke,o=VW(t,e,r,n,a,!0,!1);if(s)return o;const u=VW(t,e,r,n,a,!0,!0);return o.concat(u)}l(Q0,"$$1");function VW(t,e,r,n,a,i,s){const o=Math.pow(t-r,2)+Math.pow(e-n,2),u=Math.sqrt(o);let h=1;h=u<200?1:u>500?.4:-.0016668*u+1.233334;let d=a.maxRandomnessOffset||0;d*d*100>o&&(d=u/10);const f=d/2,p=.2+.2*Lbe(a);let g=a.bowing*a.maxRandomnessOffset*(n-e)/200,m=a.bowing*a.maxRandomnessOffset*(t-r)/200;g=Kr(g,a,h),m=Kr(m,a,h);const y=[],v=l(()=>Kr(f,a,h),"M"),b=l(()=>Kr(d,a,h),"k"),w=a.preserveVertices;return s?y.push({op:"move",data:[t+(w?0:v()),e+(w?0:v())]}):y.push({op:"move",data:[t+(w?0:Kr(d,a,h)),e+(w?0:Kr(d,a,h))]}),s?y.push({op:"bcurveTo",data:[g+t+(r-t)*p+v(),m+e+(n-e)*p+v(),g+t+2*(r-t)*p+v(),m+e+2*(n-e)*p+v(),r+(w?0:v()),n+(w?0:v())]}):y.push({op:"bcurveTo",data:[g+t+(r-t)*p+b(),m+e+(n-e)*p+b(),g+t+2*(r-t)*p+b(),m+e+2*(n-e)*p+b(),r+(w?0:b()),n+(w?0:b())]}),y}l(VW,"R");function Y7(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+Kr(e,r),t[0][1]+Kr(e,r)]),n.push([t[0][0]+Kr(e,r),t[0][1]+Kr(e,r)]);for(let a=1;a<t.length;a++)n.push([t[a][0]+Kr(e,r),t[a][1]+Kr(e,r)]),a===t.length-1&&n.push([t[a][0]+Kr(e,r),t[a][1]+Kr(e,r)]);return U7(n,null,r)}l(Y7,"j");function U7(t,e,r){const n=t.length,a=[];if(n>3){const i=[],s=1-r.curveTightness;a.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+2<n;o++){const u=t[o];i[0]=[u[0],u[1]],i[1]=[u[0]+(s*t[o+1][0]-s*t[o-1][0])/6,u[1]+(s*t[o+1][1]-s*t[o-1][1])/6],i[2]=[t[o+1][0]+(s*t[o][0]-s*t[o+2][0])/6,t[o+1][1]+(s*t[o][1]-s*t[o+2][1])/6],i[3]=[t[o+1][0],t[o+1][1]],a.push({op:"bcurveTo",data:[i[1][0],i[1][1],i[2][0],i[2][1],i[3][0],i[3][1]]})}}else n===3?(a.push({op:"move",data:[t[1][0],t[1][1]]}),a.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):n===2&&a.push(...VW(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return a}l(U7,"q");function $be(t,e,r,n,a,i,s,o){const u=[],h=[];if(o.roughness===0){t/=4,h.push([e+n*Math.cos(-t),r+a*Math.sin(-t)]);for(let d=0;d<=2*Math.PI;d+=t){const f=[e+n*Math.cos(d),r+a*Math.sin(d)];u.push(f),h.push(f)}h.push([e+n*Math.cos(0),r+a*Math.sin(0)]),h.push([e+n*Math.cos(t),r+a*Math.sin(t)])}else{const d=Kr(.5,o)-Math.PI/2;h.push([Kr(i,o)+e+.9*n*Math.cos(d-t),Kr(i,o)+r+.9*a*Math.sin(d-t)]);const f=2*Math.PI+d-.01;for(let p=d;p<f;p+=t){const g=[Kr(i,o)+e+n*Math.cos(p),Kr(i,o)+r+a*Math.sin(p)];u.push(g),h.push(g)}h.push([Kr(i,o)+e+n*Math.cos(d+2*Math.PI+.5*s),Kr(i,o)+r+a*Math.sin(d+2*Math.PI+.5*s)]),h.push([Kr(i,o)+e+.98*n*Math.cos(d+s),Kr(i,o)+r+.98*a*Math.sin(d+s)]),h.push([Kr(i,o)+e+.9*n*Math.cos(d+.5*s),Kr(i,o)+r+.9*a*Math.sin(d+.5*s)])}return[h,u]}l($be,"F");function Mbe(t,e,r,n,a,i,s,o,u){const h=i+Kr(.1,u),d=[];d.push([Kr(o,u)+e+.9*n*Math.cos(h-t),Kr(o,u)+r+.9*a*Math.sin(h-t)]);for(let f=h;f<=s;f+=t)d.push([Kr(o,u)+e+n*Math.cos(f),Kr(o,u)+r+a*Math.sin(f)]);return d.push([e+n*Math.cos(s),r+a*Math.sin(s)]),d.push([e+n*Math.cos(s),r+a*Math.sin(s)]),U7(d,null,u)}l(Mbe,"V");function J8t(t,e,r,n,a,i,s,o){const u=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let d=[0,0];const f=o.disableMultiStroke?1:2,p=o.preserveVertices;for(let g=0;g<f;g++)g===0?u.push({op:"move",data:[s[0],s[1]]}):u.push({op:"move",data:[s[0]+(p?0:Kr(h[0],o)),s[1]+(p?0:Kr(h[0],o))]}),d=p?[a,i]:[a+Kr(h[g],o),i+Kr(h[g],o)],u.push({op:"bcurveTo",data:[t+Kr(h[g],o),e+Kr(h[g],o),r+Kr(h[g],o),n+Kr(h[g],o),d[0],d[1]]});return u}l(J8t,"Z");function v3(t){return[...t]}l(v3,"Q");function Pbe(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(r===3)n.push(v3(t[0]),v3(t[1]),v3(t[2]),v3(t[2]));else{const a=[];a.push(t[0],t[0]);for(let o=1;o<t.length;o++)a.push(t[o]),o===t.length-1&&a.push(t[o]);const i=[],s=1-e;n.push(v3(a[0]));for(let o=1;o+2<a.length;o++){const u=a[o];i[0]=[u[0],u[1]],i[1]=[u[0]+(s*a[o+1][0]-s*a[o-1][0])/6,u[1]+(s*a[o+1][1]-s*a[o-1][1])/6],i[2]=[a[o+1][0]+(s*a[o][0]-s*a[o+2][0])/6,a[o+1][1]+(s*a[o][1]-s*a[o+2][1])/6],i[3]=[a[o+1][0],a[o+1][1]],n.push(i[1],i[2],i[3])}}return n}l(Pbe,"H");function j7(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}l(j7,"N");function e7t(t,e,r){const n=j7(e,r);if(n===0)return j7(t,e);let a=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n;return a=Math.max(0,Math.min(1,a)),j7(t,km(e,r,a))}l(e7t,"B");function km(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}l(km,"J");function GW(t,e,r,n){const a=n||[];if(function(o,u){const h=o[u+0],d=o[u+1],f=o[u+2],p=o[u+3];let g=3*d[0]-2*h[0]-p[0];g*=g;let m=3*d[1]-2*h[1]-p[1];m*=m;let y=3*f[0]-2*p[0]-h[0];y*=y;let v=3*f[1]-2*p[1]-h[1];return v*=v,g<y&&(g=y),m<v&&(m=v),g+m}(t,e)<r){const o=t[e+0];a.length?(i=a[a.length-1],s=o,Math.sqrt(j7(i,s))>1&&a.push(o)):a.push(o),a.push(t[e+3])}else{const u=t[e+0],h=t[e+1],d=t[e+2],f=t[e+3],p=km(u,h,.5),g=km(h,d,.5),m=km(d,f,.5),y=km(p,g,.5),v=km(g,m,.5),b=km(y,v,.5);GW([u,p,y,b],0,r,a),GW([b,v,m,f],0,r,a)}var i,s;return a}l(GW,"K$1");function t7t(t,e){return K7(t,0,t.length,e)}l(t7t,"U");function K7(t,e,r,n,a){const i=a||[],s=t[e],o=t[r-1];let u=0,h=1;for(let d=e+1;d<r-1;++d){const f=e7t(t[d],s,o);f>u&&(u=f,h=d)}return Math.sqrt(u)>n?(K7(t,e,h+1,n,i),K7(t,h,r,n,i)):(i.length||i.push(s),i.push(o)),i}l(K7,"X");function qW(t,e=.15,r){const n=[],a=(t.length-1)/3;for(let i=0;i<a;i++)GW(t,3*i,e,n);return r&&r>0?K7(n,0,n.length,r):n}l(qW,"Y");const yc="none",Are=class Are{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2147483648)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,a,i){const s=this._o(i);return this._d("line",[Sbe(e,r,n,a,s)],s)}rectangle(e,r,n,a,i){const s=this._o(i),o=[],u=Q8t(e,r,n,a,s);if(s.fill){const h=[[e,r],[e+n,r],[e+n,r+a],[e,r+a]];s.fillStyle==="solid"?o.push(WW([h],s)):o.push(Hw([h],s))}return s.stroke!==yc&&o.push(u),this._d("rectangle",o,s)}ellipse(e,r,n,a,i){const s=this._o(i),o=[],u=kbe(n,a,s),h=HW(e,r,s,u);if(s.fill)if(s.fillStyle==="solid"){const d=HW(e,r,s,u).opset;d.type="fillPath",o.push(d)}else o.push(Hw([h.estimatedPoints],s));return s.stroke!==yc&&o.push(h.opset),this._d("ellipse",o,s)}circle(e,r,n,a){const i=this.ellipse(e,r,n,n,a);return i.shape="circle",i}linearPath(e,r){const n=this._o(r);return this._d("linearPath",[G7(e,!1,n)],n)}arc(e,r,n,a,i,s,o=!1,u){const h=this._o(u),d=[],f=Abe(e,r,n,a,i,s,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const g=Abe(e,r,n,a,i,s,!0,!1,p);g.type="fillPath",d.push(g)}else d.push(function(p,g,m,y,v,b,w){const x=p,T=g;let C=Math.abs(m/2),S=Math.abs(y/2);C+=Kr(.01*C,w),S+=Kr(.01*S,w);let E=v,k=b;for(;E<0;)E+=2*Math.PI,k+=2*Math.PI;k-E>2*Math.PI&&(E=0,k=2*Math.PI);const A=(k-E)/w.curveStepCount,I=[];for(let L=E;L<=k;L+=A)I.push([x+C*Math.cos(L),T+S*Math.sin(L)]);return I.push([x+C*Math.cos(k),T+S*Math.sin(k)]),I.push([x,T]),Hw([I],w)}(e,r,n,a,i,s,h));return h.stroke!==yc&&d.push(f),this._d("arc",d,h)}curve(e,r){const n=this._o(r),a=[],i=_be(e,n);if(n.fill&&n.fill!==yc)if(n.fillStyle==="solid"){const s=_be(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=e;if(o.length){const u=typeof o[0][0]=="number"?[o]:o;for(const h of u)h.length<3?s.push(...h):h.length===3?s.push(...qW(Pbe([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):s.push(...qW(Pbe(h),10,(1+n.roughness)/2))}s.length&&a.push(Hw([s],n))}return n.stroke!==yc&&a.push(i),this._d("curve",a,n)}polygon(e,r){const n=this._o(r),a=[],i=G7(e,!0,n);return n.fill&&(n.fillStyle==="solid"?a.push(WW([e],n)):a.push(Hw([e],n))),n.stroke!==yc&&a.push(i),this._d("polygon",a,n)}path(e,r){const n=this._o(r),a=[];if(!e)return this._d("path",a,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const i=n.fill&&n.fill!=="transparent"&&n.fill!==yc,s=n.stroke!==yc,o=!!(n.simplification&&n.simplification<1),u=function(d,f,p){const g=Ebe(Tbe(zW(d))),m=[];let y=[],v=[0,0],b=[];const w=l(()=>{b.length>=4&&y.push(...qW(b,f)),b=[]},"i"),x=l(()=>{w(),y.length&&(m.push(y),y=[])},"c");for(const{key:C,data:S}of g)switch(C){case"M":x(),v=[S[0],S[1]],y.push(v);break;case"L":w(),y.push([S[0],S[1]]);break;case"C":if(!b.length){const E=y.length?y[y.length-1]:v;b.push([E[0],E[1]])}b.push([S[0],S[1]]),b.push([S[2],S[3]]),b.push([S[4],S[5]]);break;case"Z":w(),y.push([v[0],v[1]])}if(x(),!p)return m;const T=[];for(const C of m){const S=t7t(C,p);S.length&&T.push(S)}return T}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),h=Nbe(e,n);if(i)if(n.fillStyle==="solid")if(u.length===1){const d=Nbe(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));a.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else a.push(WW(u,n));else a.push(Hw(u,n));return s&&(o?u.forEach(d=>{a.push(G7(d,!1,n))}):a.push(h)),this._d("path",a,n)}opsToPath(e,r){let n="";for(const a of e.ops){const i=typeof r=="number"&&r>=0?a.data.map(s=>+s.toFixed(r)):a.data;switch(a.op){case"move":n+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":n+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":n+=`L${i[0]} ${i[1]} `}}return n.trim()}toPaths(e){const r=e.sets||[],n=e.options||this.defaultOptions,a=[];for(const i of r){let s=null;switch(i.type){case"path":s={d:this.opsToPath(i),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:yc};break;case"fillPath":s={d:this.opsToPath(i),stroke:yc,strokeWidth:0,fill:n.fill||yc};break;case"fillSketch":s=this.fillSketch(i,n)}s&&a.push(s)}return a}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||yc,strokeWidth:n,fill:yc}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}};l(Are,"et");let Ww=Are;const Nre=class Nre{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new Ww(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":a.save(),a.strokeStyle=n.stroke==="none"?"transparent":n.stroke,a.lineWidth=n.strokeWidth,n.strokeLineDash&&a.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(a.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(a,s,i),a.restore();break;case"fillPath":{a.save(),a.fillStyle=n.fill||"";const o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(a,s,i,o),a.restore();break}case"fillSketch":this.fillSketch(a,s,n)}}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=a,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,a="nonzero"){e.beginPath();for(const i of r.ops){const s=typeof n=="number"&&n>=0?i.data.map(o=>+o.toFixed(n)):i.data;switch(i.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(a):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,a,i){const s=this.gen.line(e,r,n,a,i);return this.draw(s),s}rectangle(e,r,n,a,i){const s=this.gen.rectangle(e,r,n,a,i);return this.draw(s),s}ellipse(e,r,n,a,i){const s=this.gen.ellipse(e,r,n,a,i);return this.draw(s),s}circle(e,r,n,a){const i=this.gen.circle(e,r,n,a);return this.draw(i),i}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,a,i,s,o=!1,u){const h=this.gen.arc(e,r,n,a,i,s,o,u);return this.draw(h),h}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){const n=this.gen.path(e,r);return this.draw(n),n}};l(Nre,"st");let YW=Nre;const X7="http://www.w3.org/2000/svg",Ire=class Ire{constructor(e,r){this.svg=e,this.gen=new Ww(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),a=this.svg.ownerDocument||window.document,i=a.createElementNS(X7,"g"),s=e.options.fixedDecimalPlaceDigits;for(const o of r){let u=null;switch(o.type){case"path":u=a.createElementNS(X7,"path"),u.setAttribute("d",this.opsToPath(o,s)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=a.createElementNS(X7,"path"),u.setAttribute("d",this.opsToPath(o,s)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(a,o,n)}u&&i.appendChild(u)}return i}fillSketch(e,r,n){let a=n.fillWeight;a<0&&(a=n.strokeWidth/2);const i=e.createElementNS(X7,"path");return i.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),i.setAttribute("stroke",n.fill||""),i.setAttribute("stroke-width",a+""),i.setAttribute("fill","none"),n.fillLineDash&&i.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&i.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,a,i){const s=this.gen.line(e,r,n,a,i);return this.draw(s)}rectangle(e,r,n,a,i){const s=this.gen.rectangle(e,r,n,a,i);return this.draw(s)}ellipse(e,r,n,a,i){const s=this.gen.ellipse(e,r,n,a,i);return this.draw(s)}circle(e,r,n,a){const i=this.gen.circle(e,r,n,a);return this.draw(i)}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,a,i,s,o=!1,u){const h=this.gen.arc(e,r,n,a,i,s,o,u);return this.draw(h)}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n)}path(e,r){const n=this.gen.path(e,r);return this.draw(n)}};l(Ire,"ot");let UW=Ire;var Sr={canvas:l((t,e)=>new YW(t,e),"canvas"),svg:l((t,e)=>new UW(t,e),"svg"),generator:l(t=>new Ww(t),"generator"),newSeed:l(()=>Ww.newSeed(),"newSeed")},qr=_((t,e,r)=>nt(this,null,function*(){var g,m,y;let n;const a=e.useHtmlLabels||Ph((g=ft())==null?void 0:g.htmlLabels);r?n=r:n="node default";const i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=i.insert("g").attr("class","label").attr("style",Ms(e.labelStyle));let o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];const u=!!e.icon||!!e.img,h=e.labelType==="markdown",d=yield Oo(s,mn(uf(o),ft()),{useHtmlLabels:a,width:e.width||((m=ft().flowchart)==null?void 0:m.wrappingWidth),classes:h?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:h},ft());let f=d.getBBox();const p=((y=e==null?void 0:e.padding)!=null?y:0)/2;if(a){const v=d.children[0],b=Yt(d);yield yW(v,o),f=v.getBoundingClientRect(),b.attr("width",f.width),b.attr("height",f.height)}return a?s.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):s.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:i,bbox:f,halfPadding:p,label:s}}),"labelHelper"),jW=_((t,e,r)=>nt(this,null,function*(){var u,h,d;const n=(u=r.useHtmlLabels)!=null?u:ta(ft()),a=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),i=yield Oo(a,mn(uf(e),ft()),{useHtmlLabels:n,width:r.width||((d=(h=ft())==null?void 0:h.flowchart)==null?void 0:d.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=i.getBBox();const o=r.padding/2;if(ta(ft())){const f=i.children[0],p=Yt(i);s=f.getBoundingClientRect(),p.attr("width",s.width),p.attr("height",s.height)}return n?a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):a.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&a.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:a}}),"insertLabel"),Ir=_((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),Fr=_((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function kn(t){const e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}l(kn,"createPathFromPoints"),_(kn,"createPathFromPoints");function J0(t,e,r,n,a,i){const s=[],u=r-t,h=n-e,d=u/i,f=2*Math.PI/d,p=e+h/2;for(let g=0;g<=50;g++){const m=g/50,y=t+m*u,v=p+a*Math.sin(f*(y-t));s.push({x:y,y:v})}return s}l(J0,"generateFullSineWavePoints"),_(J0,"generateFullSineWavePoints");function b3(t,e,r,n,a,i){const s=[],o=a*Math.PI/180,d=(i*Math.PI/180-o)/(n-1);for(let f=0;f<n;f++){const p=o+f*d,g=t+r*Math.cos(p),m=e+r*Math.sin(p);s.push({x:-g,y:-m})}return s}l(b3,"generateCirclePoints"),_(b3,"generateCirclePoints");function KW(t){var u,h,d;const e=Array.from(t.childNodes).filter(f=>f.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=e.map(f=>f.getAttribute("d")).filter(f=>f!==null).join(" ");r.setAttribute("d",n);const a=e.find(f=>f.getAttribute("fill")!=="none"),i=e.find(f=>f.getAttribute("stroke")!=="none"),s=_((f,p)=>{var g;return(g=f==null?void 0:f.getAttribute(p))!=null?g:void 0},"getAttr");if(a){const f={fill:s(a,"fill"),"fill-opacity":(u=s(a,"fill-opacity"))!=null?u:"1"};Object.entries(f).forEach(([p,g])=>{g&&r.setAttribute(p,g)})}if(i){const f={stroke:s(i,"stroke"),"stroke-width":(h=s(i,"stroke-width"))!=null?h:"1","stroke-opacity":(d=s(i,"stroke-opacity"))!=null?d:"1"};Object.entries(f).forEach(([p,g])=>{g&&r.setAttribute(p,g)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}l(KW,"mergePaths"),_(KW,"mergePaths");var r7t=_((t,e)=>{var r=t.x,n=t.y,a=e.x-r,i=e.y-n,s=t.width/2,o=t.height/2,u,h;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),u=i===0?0:o*a/i,h=o):(a<0&&(s=-s),u=s,h=a===0?0:s*i/a),{x:r+u,y:n+h}},"intersectRect"),Am=r7t,n7t=_((t,e,r,n=!1,a=!1)=>nt(this,null,function*(){let i=e||"";typeof i=="object"&&(i=i[0]);const s=ft(),o=ta(s);return yield Oo(t,i,{style:r,isTitle:n,useHtmlLabels:o,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},s)}),"createLabel"),ep=n7t,tp=_((t,e,r,n,a)=>["M",t+a,e,"H",t+r-a,"A",a,a,0,0,1,t+r,e+a,"V",e+n-a,"A",a,a,0,0,1,t+r-a,e+n,"H",t+a,"A",a,a,0,0,1,t,e+n-a,"V",e+a,"A",a,a,0,0,1,t+a,e,"Z"].join(" "),"createRoundedRectPathD"),a7t=_((t,e)=>nt(this,null,function*(){var O;const r=ft(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:i,clusterBorder:s}=n,o=s,{labelStyles:u,nodeStyles:h,borderStyles:d,backgroundStyles:f}=Er(e),p=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),g=Ph(r.flowchart.htmlLabels),m=e.direction==="LR",y=p.insert("g").attr("class","cluster-label swimlane-label"),v=yield Oo(y,e.label,{style:e.labelStyle,useHtmlLabels:g,isNode:!0,width:e.width});let b=v.getBBox();if(g){const M=v.children[0],P=Yt(v);b=M.getBoundingClientRect(),P.attr("width",b.width),P.attr("height",b.height)}const w=(O=e.padding)!=null?O:0,x=e.width<=b.width+w?b.width+w:e.width;e.width<=b.width+w?e.diff=(x-e.width)/2-w:e.diff=-w;const T=e.height,C=e.y-T/2,S=e.y+T/2,E=e.x-x/2,k=e.swimlaneContentTop!==void 0?e.swimlaneContentTop:C+T/3,A=m?4:0,I=b.height+2*A;let L,R;if(m){const M=Math.max(I,b.height+2*A),P=E+M,z=Math.max(0,x-M);if(e.look==="handDrawn"){const W=Sr.svg(p),U=_r(e,{roughness:.7,fill:i,stroke:o,fillWeight:3,seed:a}),j=_r(e,{roughness:.7,fill:"none",stroke:o,seed:a}),V=W.rectangle(E,C,M,T,U);L=p.insert(()=>V,":first-child");const Y=W.rectangle(P,C,z,T,j);R=p.insert(()=>Y,":first-child"),L.select("path:nth-child(2)").attr("style",d.join(";")),L.select("path").attr("style",f.join(";").replace("fill","stroke"))}else L=p.insert("rect",":first-child"),R=p.insert("rect",":first-child"),L.attr("class","swimlane-title").attr("style",h).attr("x",E).attr("y",C).attr("width",M).attr("height",T).attr("fill",i).attr("stroke",o),R.attr("class","swimlane-body").attr("style",h).attr("x",P).attr("y",C).attr("width",z).attr("height",T).attr("fill","none").attr("stroke",o);const D=E+M/2,B=e.y;y.attr("transform",`translate(${D}, ${B}) rotate(-90) translate(${-b.width/2}, ${-b.height/2})`)}else{const M=Math.max(0,k-C),P=Math.min(I,M),z=C+P,D=Math.max(0,S-z),B=e.x-x/2;if(e.look==="handDrawn"){const j=Sr.svg(p),V=_r(e,{roughness:.7,fill:i,stroke:o,fillWeight:3,seed:a}),Y=_r(e,{roughness:.7,fill:"none",stroke:o,seed:a}),H=j.rectangle(B,C,x,P,V);L=p.insert(()=>H,":first-child");const q=j.rectangle(B,z,x,D,Y);R=p.insert(()=>q,":first-child"),L.select("path:nth-child(2)").attr("style",d.join(";")),L.select("path").attr("style",f.join(";").replace("fill","stroke"))}else L=p.insert("rect",":first-child"),R=p.insert("rect",":first-child"),L.attr("class","swimlane-title").attr("style",h).attr("x",B).attr("y",C).attr("width",x).attr("height",P).attr("fill",i).attr("stroke",o),R.attr("class","swimlane-body").attr("style",h).attr("x",B).attr("y",z).attr("width",x).attr("height",D).attr("fill","none").attr("stroke",o);const W=e.x-b.width/2,U=C+(P-b.height)/2;y.attr("transform",`translate(${W}, ${U})`)}if(Le.trace("Swimlane data ",e,JSON.stringify(e)),u){const M=y.select("span");M&&M.attr("style",u)}return e.offsetX=0,e.width=x,e.height=T,e.offsetY=b.height-w/2,e.intersect=function(M){return Am(e,M)},{cluster:p,labelBBox:b}}),"swimlane"),Rbe=_((t,e)=>nt(this,null,function*(){Le.info("Creating subgraph rect for ",e.id,e);const r=ft(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:i,clusterBorder:s}=n,{labelStyles:o,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Er(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),p=ta(r),g=f.insert("g").attr("class","cluster-label ");let m;e.labelType==="markdown"?m=yield Oo(g,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width}):m=yield ep(g,e.label,e.labelStyle||"",!1,!0);let y=m.getBBox();if(ta(r)){const E=m.children[0],k=Yt(m);y=E.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}const v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height,w=e.x-v/2,x=e.y-b/2;Le.trace("Data ",e,JSON.stringify(e));let T;if(e.look==="handDrawn"){const E=Sr.svg(f),k=_r(e,{roughness:.7,fill:i,stroke:s,fillWeight:3,seed:a}),A=E.path(tp(w,x,v,b,0),k);T=f.insert(()=>(Le.debug("Rough node insert CXC",A),A),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",d.join(";").replace("fill","stroke"))}else T=f.insert("rect",":first-child"),T.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",w).attr("y",x).attr("width",v).attr("height",b);const{subGraphTitleTopMargin:C}=zw(r);if(g.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+C})`),o){const E=g.select("span");E&&E.attr("style",o)}const S=T.node().getBBox();return e.offsetX=0,e.width=S.width,e.height=S.height,e.offsetY=y.height-e.padding/2,e.intersect=function(E){return Am(e,E)},{cluster:f,labelBBox:y}}),"rect"),i7t=_((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),n=r.insert("rect",":first-child"),a=0*e.padding,i=a/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+a).attr("height",e.height+a).attr("fill","none");const s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return Am(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),s7t=_((t,e)=>nt(this,null,function*(){const r=ft(),{themeVariables:n,handDrawnSeed:a}=r,{altBackground:i,compositeBackground:s,compositeTitleBackground:o,nodeBorder:u}=n,h=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),d=h.insert("g",":first-child"),f=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const g=yield ep(f,e.label,e.labelStyle,void 0,!0);let m=g.getBBox();if(ta(r)){const A=g.children[0],I=Yt(g);m=A.getBoundingClientRect(),I.attr("width",m.width),I.attr("height",m.height)}const y=0*e.padding,v=y/2,b=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+y;e.width<=m.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;const w=e.height+y,x=e.height+y-m.height-6,T=e.x-b/2,C=e.y-w/2;e.width=b;const S=e.y-e.height/2-v+m.height+2;let E;if(e.look==="handDrawn"){const A=e.cssClasses.includes("statediagram-cluster-alt"),I=Sr.svg(h),L=e.rx||e.ry?I.path(tp(T,C,b,w,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:u,seed:a}):I.rectangle(T,C,b,w,{seed:a});E=h.insert(()=>L,":first-child");const R=I.rectangle(T,S,b,x,{fill:A?i:s,fillStyle:A?"hachure":"solid",stroke:u,seed:a});E=h.insert(()=>L,":first-child"),p=h.insert(()=>R)}else E=d.insert("rect",":first-child"),E.attr("class","outer").attr("x",T).attr("y",C).attr("width",b).attr("height",w).attr("data-look",e.look),p.attr("class","inner").attr("x",T).attr("y",S).attr("width",b).attr("height",x);f.attr("transform",`translate(${e.x-m.width/2}, ${C+1-(ta(r)?0:3)})`);const k=E.node().getBBox();return e.height=k.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(A){return Am(e,A)},{cluster:h,labelBBox:m}}),"roundedWithTitle"),o7t=_((t,e)=>nt(this,null,function*(){Le.info("Creating subgraph rect for ",e.id,e);const r=ft(),{themeVariables:n,handDrawnSeed:a}=r,{clusterBkg:i,clusterBorder:s}=n,{labelStyles:o,nodeStyles:u,borderStyles:h,backgroundStyles:d}=Er(e),f=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),p=ta(r),g=f.insert("g").attr("class","cluster-label "),m=yield Oo(g,e.label,{style:e.labelStyle,useHtmlLabels:p,isNode:!0,width:e.width});let y=m.getBBox();if(ta(r)){const E=m.children[0],k=Yt(m);y=E.getBoundingClientRect(),k.attr("width",y.width),k.attr("height",y.height)}const v=e.width<=y.width+e.padding?y.width+e.padding:e.width;e.width<=y.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height,w=e.x-v/2,x=e.y-b/2;Le.trace("Data ",e,JSON.stringify(e));let T;if(e.look==="handDrawn"){const E=Sr.svg(f),k=_r(e,{roughness:.7,fill:i,stroke:s,fillWeight:4,seed:a}),A=E.path(tp(w,x,v,b,e.rx),k);T=f.insert(()=>(Le.debug("Rough node insert CXC",A),A),":first-child"),T.select("path:nth-child(2)").attr("style",h.join(";")),T.select("path").attr("style",d.join(";").replace("fill","stroke"))}else T=f.insert("rect",":first-child"),T.attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",w).attr("y",x).attr("width",v).attr("height",b);const{subGraphTitleTopMargin:C}=zw(r);if(g.attr("transform",`translate(${e.x-y.width/2}, ${e.y-e.height/2+C})`),o){const E=g.select("span");E&&E.attr("style",o)}const S=T.node().getBBox();return e.offsetX=0,e.width=S.width,e.height=S.height,e.offsetY=y.height-e.padding/2,e.intersect=function(E){return Am(e,E)},{cluster:f,labelBBox:y}}),"kanbanSection"),l7t=_((t,e)=>{const r=ft(),{themeVariables:n,handDrawnSeed:a}=r,{nodeBorder:i}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),o=s.insert("g",":first-child"),u=0*e.padding,h=e.width+u;e.diff=-e.padding;const d=e.height+u,f=e.x-h/2,p=e.y-d/2;e.width=h;let g;if(e.look==="handDrawn"){const v=Sr.svg(s).rectangle(f,p,h,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:a});g=s.insert(()=>v,":first-child")}else{g=o.insert("rect",":first-child");let y="outer";e.look,y="divider",g.attr("class",y).attr("x",f).attr("y",p).attr("width",h).attr("height",d).attr("data-look",e.look)}const m=g.node().getBBox();return e.height=m.height,e.offsetX=0,e.offsetY=0,e.intersect=function(y){return Am(e,y)},{cluster:s,labelBBox:{}}},"divider"),c7t=Rbe,u7t={rect:Rbe,squareRect:c7t,roundedWithTitle:s7t,noteGroup:i7t,divider:l7t,kanbanSection:o7t,swimlane:a7t},Obe=new Map,Z7=_((t,e)=>nt(this,null,function*(){const r=e.shape||"rect",n=yield u7t[r](t,e);return Obe.set(e.id,n),n}),"insertCluster"),Dbe=_(()=>{Obe=new Map},"clear");function Fbe(t,e){return t.intersect(e)}l(Fbe,"intersectNode$1"),_(Fbe,"intersectNode");var h7t=Fbe;function Bbe(t,e,r,n){var a=t.x,i=t.y,s=a-n.x,o=i-n.y,u=Math.sqrt(e*e*o*o+r*r*s*s),h=Math.abs(e*r*s/u);n.x<a&&(h=-h);var d=Math.abs(e*r*o/u);return n.y<i&&(d=-d),{x:a+h,y:i+d}}l(Bbe,"intersectEllipse$1"),_(Bbe,"intersectEllipse");var zbe=Bbe;function Hbe(t,e,r){return zbe(t,e,e,r)}l(Hbe,"intersectCircle$1"),_(Hbe,"intersectCircle");var d7t=Hbe;function Wbe(t,e,r,n){{const a=e.y-t.y,i=t.x-e.x,s=e.x*t.y-t.x*e.y,o=a*r.x+i*r.y+s,u=a*n.x+i*n.y+s,h=1e-6;if(o!==0&&u!==0&&XW(o,u))return;const d=n.y-r.y,f=r.x-n.x,p=n.x*r.y-r.x*n.y,g=d*t.x+f*t.y+p,m=d*e.x+f*e.y+p;if(Math.abs(g)<h&&Math.abs(m)<h&&XW(g,m))return;const y=a*f-d*i;if(y===0)return;const v=Math.abs(y/2);let b=i*p-f*s;const w=b<0?(b-v)/y:(b+v)/y;b=d*s-a*p;const x=b<0?(b-v)/y:(b+v)/y;return{x:w,y:x}}}l(Wbe,"intersectLine$1"),_(Wbe,"intersectLine");function XW(t,e){return t*e>0}l(XW,"sameSign$1"),_(XW,"sameSign");var f7t=Wbe;function Vbe(t,e,r){let n=t.x,a=t.y,i=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(d){s=Math.min(s,d.x),o=Math.min(o,d.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let u=n-t.width/2-s,h=a-t.height/2-o;for(let d=0;d<e.length;d++){let f=e[d],p=e[d<e.length-1?d+1:0],g=f7t(t,r,{x:u+f.x,y:h+f.y},{x:u+p.x,y:h+p.y});g&&i.push(g)}return i.length?(i.length>1&&i.sort(function(d,f){let p=d.x-r.x,g=d.y-r.y,m=Math.sqrt(p*p+g*g),y=f.x-r.x,v=f.y-r.y,b=Math.sqrt(y*y+v*v);return m<b?-1:m===b?0:1}),i[0]):t}l(Vbe,"intersectPolygon$1"),_(Vbe,"intersectPolygon");var p7t=Vbe,Tr={node:h7t,circle:d7t,ellipse:zbe,polygon:p7t,rect:Am};function Gbe(t,e){const{labelStyles:r}=Er(e);e.labelStyle=r;const n=Fr(e);let a=n;n||(a="anchor");const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=1,{cssStyles:o}=e,u=Sr.svg(i),h=_r(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(h.roughness=0);const d=u.circle(0,0,s*2,h),f=i.insert(()=>d,":first-child");return f.attr("class","anchor").attr("style",Ms(o)),Ir(e,f),e.intersect=function(p){return Le.info("Circle intersect",e,s,p),Tr.circle(e,s,p)},i}l(Gbe,"anchor"),_(Gbe,"anchor");function ZW(t,e,r,n,a,i,s){const u=(t+r)/2,h=(e+n)/2,d=Math.atan2(n-e,r-t),f=(r-t)/2,p=(n-e)/2,g=f/a,m=p/i,y=Math.sqrt(ph(g,2)+ph(m,2));if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const v=Math.sqrt(1-ph(y,2)),b=u+v*i*Math.sin(d)*(s?-1:1),w=h-v*a*Math.cos(d)*(s?-1:1),x=Math.atan2((e-w)/i,(t-b)/a);let C=Math.atan2((n-w)/i,(r-b)/a)-x;s&&C<0&&(C+=2*Math.PI),!s&&C>0&&(C-=2*Math.PI);const S=[];for(let E=0;E<20;E++){const k=E/19,A=x+k*C,I=b+a*Math.cos(A),L=w+i*Math.sin(A);S.push({x:I,y:L})}return S}l(ZW,"generateArcPoints"),_(ZW,"generateArcPoints");function qbe(t,e,r){const[n,a]=[e,r].sort((i,s)=>s-i);return a*(1-Math.sqrt(1-ph(t/n/2,2)))}l(qbe,"calculateArcSagitta"),_(qbe,"calculateArcSagitta");function Ybe(t,e){return nt(this,null,function*(){var A;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(A=e.padding)!=null?A:0,i=e.look==="neo"?16:a,s=e.look==="neo"?12:a,o=_(I=>I+s,"calcTotalHeight"),u=_(I=>{const L=I/2;return[L/(2.5+I/50),L]},"calcEllipseRadius"),{shapeSvg:h,bbox:d}=yield qr(t,e,Fr(e)),f=o(e!=null&&e.height?e==null?void 0:e.height:d.height),[p,g]=u(f),m=qbe(f,p,g),v=(e!=null&&e.width?e==null?void 0:e.width:d.width)+i*2+m-m,b=f,{cssStyles:w}=e,x=[{x:v/2,y:-b/2},{x:-v/2,y:-b/2},...ZW(-v/2,-b/2,-v/2,b/2,p,g,!1),{x:v/2,y:b/2},...ZW(v/2,b/2,v/2,-b/2,p,g,!0)],T=Sr.svg(h),C=_r(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=kn(x),E=T.path(S,C),k=h.insert(()=>E,":first-child");return k.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${p/2}, 0)`),Ir(e,k),e.intersect=function(I){return Tr.polygon(e,x,I)},h})}l(Ybe,"bowTieRect"),_(Ybe,"bowTieRect");function df(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}l(df,"insertPolygonShape$1"),_(df,"insertPolygonShape");var Q7=12;function Ube(t,e){return nt(this,null,function*(){var w,x,T;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(w=e.padding)!=null?w:0,i=e.look==="neo"?28:a,s=e.look==="neo"?24:a,{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=((x=e==null?void 0:e.width)!=null?x:u.width)+(e.look==="neo"?i*2:i+Q7),d=((T=e==null?void 0:e.height)!=null?T:u.height)+(e.look==="neo"?s*2:s),f=0,p=h,g=-d,m=0,y=[{x:f+Q7,y:g},{x:p,y:g},{x:p,y:m},{x:f,y:m},{x:f,y:g+Q7},{x:f+Q7,y:g}];let v;const{cssStyles:b}=e;if(e.look==="handDrawn"){const C=Sr.svg(o),S=_r(e,{}),E=kn(y),k=C.path(E,S);v=o.insert(()=>k,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),b&&v.attr("style",b)}else v=df(o,h,d,y);return n&&v.attr("style",n),Ir(e,v),e.intersect=function(C){return Tr.polygon(e,y,C)},o})}l(Ube,"card"),_(Ube,"card");function jbe(t,e){var p,g;const{nodeStyles:r}=Er(e);e.label="";const n=t.insert("g").attr("class",Fr(e)).attr("id",(p=e.domId)!=null?p:e.id),{cssStyles:a}=e,i=Math.max(28,(g=e.width)!=null?g:0),s=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}],o=Sr.svg(n),u=_r(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const h=kn(s),d=o.path(h,u),f=n.insert(()=>d,":first-child");return a&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",a),r&&e.look!=="handDrawn"&&f.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(m){return Tr.polygon(e,s,m)},n}l(jbe,"choice$1"),_(jbe,"choice");function QW(t,e,r){return nt(this,null,function*(){var g;const{labelStyles:n,nodeStyles:a}=Er(e);e.labelStyle=n;const{shapeSvg:i,bbox:s,halfPadding:o}=yield qr(t,e,Fr(e)),u=16,h=(g=r==null?void 0:r.padding)!=null?g:o,d=e.look==="neo"?s.width/2+u*2:s.width/2+h;let f;const{cssStyles:p}=e;if(e.look==="handDrawn"){const m=Sr.svg(i),y=_r(e,{}),v=m.circle(0,0,d*2,y);f=i.insert(()=>v,":first-child"),f.attr("class","basic label-container").attr("style",Ms(p))}else f=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",d).attr("cx",0).attr("cy",0);return Ir(e,f),e.calcIntersect=function(m,y){const v=m.width/2;return Tr.circle(m,v,y)},e.intersect=function(m){return Le.info("Circle intersect",e,d,m),Tr.circle(e,d,m)},i})}l(QW,"circle$4"),_(QW,"circle");function Kbe(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,a={x:n/2*e,y:n/2*r},i={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},o={x:n/2*e,y:-(n/2)*r};return`M ${i.x},${i.y} L ${o.x},${o.y}
|
||
M ${a.x},${a.y} L ${s.x},${s.y}`}l(Kbe,"createLine"),_(Kbe,"createLine");function Xbe(t,e){var g,m;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",Fr(e)).attr("id",(g=e.domId)!=null?g:e.id),i=Math.max(30,(m=e==null?void 0:e.width)!=null?m:0),{cssStyles:s}=e,o=Sr.svg(a),u=_r(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const h=o.circle(0,0,i*2,u),d=Kbe(i),f=o.path(d,u),p=a.insert(()=>h,":first-child");return p.insert(()=>f),p.attr("class","outer-path"),s&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",n),Ir(e,p),e.intersect=function(y){return Le.info("crossedCircle intersect",e,{radius:i,point:y}),Tr.circle(e,i,y)},a}l(Xbe,"crossedCircle"),_(Xbe,"crossedCircle");function ff(t,e,r,n=100,a=0,i=180){const s=[],o=a*Math.PI/180,d=(i*Math.PI/180-o)/(n-1);for(let f=0;f<n;f++){const p=o+f*d,g=t+r*Math.cos(p),m=e+r*Math.sin(p);s.push({x:-g,y:-m})}return s}l(ff,"generateCirclePoints2"),_(ff,"generateCirclePoints");function Zbe(t,e){return nt(this,null,function*(){var E,k,A,I,L;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i,label:s}=yield qr(t,e,Fr(e)),o=e.look==="neo"?18:(E=e.padding)!=null?E:0,u=e.look==="neo"?12:(k=e.padding)!=null?k:0,h=i.width+o,d=i.height+u,f=Math.max(5,d*.1),{cssStyles:p}=e,g=[...ff(h/2,-d/2,f,30,-90,0),{x:-h/2-f,y:f},...ff(h/2+f*2,-f,f,20,-180,-270),...ff(h/2+f*2,f,f,20,-90,-180),{x:-h/2-f,y:-d/2},...ff(h/2,d/2,f,20,0,90)],m=[{x:h/2,y:-d/2-f},{x:-h/2,y:-d/2-f},...ff(h/2,-d/2,f,20,-90,0),{x:-h/2-f,y:-f},...ff(h/2+h*.1,-f,f,20,-180,-270),...ff(h/2+h*.1,f,f,20,-90,-180),{x:-h/2-f,y:d/2},...ff(h/2,d/2,f,20,0,90),{x:-h/2,y:d/2+f},{x:h/2,y:d/2+f}],y=Sr.svg(a),v=_r(e,{fill:"none"});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=kn(g).replace("Z",""),x=y.path(w,v),T=kn(m),C=y.path(T,X({},v)),S=a.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>x,":first-child"),S.attr("class","text"),p&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${f}, 0)`),s.attr("transform",`translate(${-h/2+f-(i.x-((A=i.left)!=null?A:0))},${-d/2+((I=e.padding)!=null?I:0)/2-(i.y-((L=i.top)!=null?L:0))})`),Ir(e,S),e.intersect=function(R){return Tr.polygon(e,m,R)},a})}l(Zbe,"curlyBraceLeft"),_(Zbe,"curlyBraceLeft");function pf(t,e,r,n=100,a=0,i=180){const s=[],o=a*Math.PI/180,d=(i*Math.PI/180-o)/(n-1);for(let f=0;f<n;f++){const p=o+f*d,g=t+r*Math.cos(p),m=e+r*Math.sin(p);s.push({x:g,y:m})}return s}l(pf,"generateCirclePoints3"),_(pf,"generateCirclePoints");function Qbe(t,e){return nt(this,null,function*(){var E,k,A,I,L,R;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i,label:s}=yield qr(t,e,Fr(e)),o=e.look==="neo"?18:(E=e.padding)!=null?E:0,u=e.look==="neo"?12:(k=e.padding)!=null?k:0,h=i.width+(e.look==="neo"?o*2:o),d=i.height+(e.look==="neo"?u*2:u),f=Math.max(5,d*.1),{cssStyles:p}=e,g=[...pf(h/2,-d/2,f,20,-90,0),{x:h/2+f,y:-f},...pf(h/2+f*2,-f,f,20,-180,-270),...pf(h/2+f*2,f,f,20,-90,-180),{x:h/2+f,y:d/2},...pf(h/2,d/2,f,20,0,90)],m=[{x:-h/2,y:-d/2-f},{x:h/2,y:-d/2-f},...pf(h/2,-d/2,f,20,-90,0),{x:h/2+f,y:-f},...pf(h/2+f*2,-f,f,20,-180,-270),...pf(h/2+f*2,f,f,20,-90,-180),{x:h/2+f,y:d/2},...pf(h/2,d/2,f,20,0,90),{x:h/2,y:d/2+f},{x:-h/2,y:d/2+f}],y=Sr.svg(a),v=_r(e,{fill:"none"});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const w=kn(g).replace("Z",""),x=y.path(w,v),T=kn(m),C=y.path(T,X({},v)),S=a.insert("g",":first-child");return S.insert(()=>C,":first-child").attr("stroke-opacity",0),S.insert(()=>x,":first-child"),S.attr("class","text"),p&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${-f}, 0)`),s.attr("transform",`translate(${-h/2+((A=e.padding)!=null?A:0)/2-(i.x-((I=i.left)!=null?I:0))},${-d/2+((L=e.padding)!=null?L:0)/2-(i.y-((R=i.top)!=null?R:0))})`),Ir(e,S),e.intersect=function(O){return Tr.polygon(e,m,O)},a})}l(Qbe,"curlyBraceRight"),_(Qbe,"curlyBraceRight");function ao(t,e,r,n=100,a=0,i=180){const s=[],o=a*Math.PI/180,d=(i*Math.PI/180-o)/(n-1);for(let f=0;f<n;f++){const p=o+f*d,g=t+r*Math.cos(p),m=e+r*Math.sin(p);s.push({x:-g,y:-m})}return s}l(ao,"generateCirclePoints4"),_(ao,"generateCirclePoints");function Jbe(t,e){return nt(this,null,function*(){var L,R,O,M,P,z;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i,label:s}=yield qr(t,e,Fr(e)),o=e.look==="neo"?18:(L=e.padding)!=null?L:0,u=e.look==="neo"?12:(R=e.padding)!=null?R:0,h=i.width+(e.look==="neo"?o*2:o),d=i.height+(e.look==="neo"?u*2:u),f=Math.max(5,d*.1),{cssStyles:p}=e,g=[...ao(h/2,-d/2,f,30,-90,0),{x:-h/2-f,y:f},...ao(h/2+f*2,-f,f,20,-180,-270),...ao(h/2+f*2,f,f,20,-90,-180),{x:-h/2-f,y:-d/2},...ao(h/2,d/2,f,20,0,90)],m=[...ao(-h/2+f+f/2,-d/2,f,20,-90,-180),{x:h/2-f/2,y:f},...ao(-h/2-f/2,-f,f,20,0,90),...ao(-h/2-f/2,f,f,20,-90,0),{x:h/2-f/2,y:-f},...ao(-h/2+f+f/2,d/2,f,30,-180,-270)],y=[{x:h/2,y:-d/2-f},{x:-h/2,y:-d/2-f},...ao(h/2,-d/2,f,20,-90,0),{x:-h/2-f,y:-f},...ao(h/2+f*2,-f,f,20,-180,-270),...ao(h/2+f*2,f,f,20,-90,-180),{x:-h/2-f,y:d/2},...ao(h/2,d/2,f,20,0,90),{x:-h/2,y:d/2+f},{x:h/2-f-f/2,y:d/2+f},...ao(-h/2+f+f/2,-d/2,f,20,-90,-180),{x:h/2-f/2,y:f},...ao(-h/2-f/2,-f,f,20,0,90),...ao(-h/2-f/2,f,f,20,-90,0),{x:h/2-f/2,y:-f},...ao(-h/2+f+f/2,d/2,f,30,-180,-270)],v=Sr.svg(a),b=_r(e,{fill:"none"});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const x=kn(g).replace("Z",""),T=v.path(x,b),S=kn(m).replace("Z",""),E=v.path(S,b),k=kn(y),A=v.path(k,X({},b)),I=a.insert("g",":first-child");return I.insert(()=>A,":first-child").attr("stroke-opacity",0),I.insert(()=>T,":first-child"),I.insert(()=>E,":first-child"),I.attr("class","text"),p&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",n),I.attr("transform",`translate(${f-f/4}, 0)`),s.attr("transform",`translate(${-h/2+((O=e.padding)!=null?O:0)/2-(i.x-((M=i.left)!=null?M:0))},${-d/2+((P=e.padding)!=null?P:0)/2-(i.y-((z=i.top)!=null?z:0))})`),Ir(e,I),e.intersect=function(D){return Tr.polygon(e,y,D)},a})}l(Jbe,"curlyBraces"),_(Jbe,"curlyBraces");function exe(t,e){return nt(this,null,function*(){var A,I,L;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(A=e.padding)!=null?A:0,i=e.look==="neo"?16:a,s=e.look==="neo"?12:a,o=20,u=5,{shapeSvg:h,bbox:d}=yield qr(t,e,Fr(e)),f=Math.max(o,(d.width+i*2)*1.25,(I=e==null?void 0:e.width)!=null?I:0),p=Math.max(u,d.height+s*2,(L=e==null?void 0:e.height)!=null?L:0),g=p/2,{cssStyles:m}=e,y=Sr.svg(h),v=_r(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=f,w=p,x=b-g,T=w/4,C=[{x,y:0},{x:T,y:0},{x:0,y:w/2},{x:T,y:w},{x,y:w},...b3(-x,-w/2,g,50,270,90)],S=kn(C),E=y.path(S,v),k=h.insert(()=>E,":first-child");return k.attr("class","basic label-container outer-path"),m&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),n&&e.look!=="handDrawn"&&k.selectChildren("path").attr("style",n),k.attr("transform",`translate(${-f/2}, ${-p/2})`),Ir(e,k),e.intersect=function(R){return Tr.polygon(e,C,R)},h})}l(exe,"curvedTrapezoid"),_(exe,"curvedTrapezoid");var g7t=_((t,e,r,n,a,i)=>[`M${t},${e+i}`,`a${a},${i} 0,0,0 ${r},0`,`a${a},${i} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${i} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),m7t=_((t,e,r,n,a,i)=>[`M${t},${e+i}`,`M${t+r},${e+i}`,`a${a},${i} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${i} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),y7t=_((t,e,r,n,a,i)=>[`M${t-r/2},${-n/2}`,`a${a},${i} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),txe=8,rxe=8;function nxe(t,e){return nt(this,null,function*(){var v,b,w,x,T,C,S;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(v=e.padding)!=null?v:0,i=e.look==="neo"?24:a,s=e.look==="neo"?24:a;if(e.width||e.height){const E=(b=e.width)!=null?b:0;e.width=((w=e.width)!=null?w:0)-s,e.width<rxe&&(e.width=rxe);const A=E/2/(2.5+E/50);e.height=((x=e.height)!=null?x:0)-i-A*3,e.height<txe&&(e.height=txe)}const{shapeSvg:o,bbox:u,label:h}=yield qr(t,e,Fr(e)),d=(e.width?e.width:u.width)+s,f=d/2,p=f/(2.5+d/50),g=(e.height?e.height:u.height)+i+p;let m;const{cssStyles:y}=e;if(e.look==="handDrawn"){const E=Sr.svg(o),k=m7t(0,0,d,g,f,p),A=y7t(0,p,d,g,f,p),I=_r(e,{}),L=E.path(k,I),R=E.path(A,_r(e,{fill:"none"}));m=o.insert(()=>R,":first-child"),m=o.insert(()=>L,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{const E=g7t(0,0,d,g,f,p);m=o.insert("path",":first-child").attr("d",E).attr("class","basic label-container outer-path").attr("style",Ms(y)).attr("style",n)}return m.attr("label-offset-y",p),m.attr("transform",`translate(${-d/2}, ${-(g/2+p)})`),Ir(e,m),h.attr("transform",`translate(${-(u.width/2)-(u.x-((T=u.left)!=null?T:0))}, ${-(u.height/2)+((C=e.padding)!=null?C:0)/1.5-(u.y-((S=u.top)!=null?S:0))})`),e.intersect=function(E){var I,L,R,O,M,P;const k=Tr.rect(e,E),A=k.x-((I=e.x)!=null?I:0);if(f!=0&&(Math.abs(A)<((L=e.width)!=null?L:0)/2||Math.abs(A)==((R=e.width)!=null?R:0)/2&&Math.abs(k.y-((O=e.y)!=null?O:0))>((M=e.height)!=null?M:0)/2-p)){let z=p*p*(1-A*A/(f*f));z>0&&(z=Math.sqrt(z)),z=p-z,E.y-((P=e.y)!=null?P:0)>0&&(z=-z),k.y+=z}return k},o})}l(nxe,"cylinder$1"),_(nxe,"cylinder");function Vw(t,e,r){return nt(this,null,function*(){const{labelStyles:n,nodeStyles:a}=Er(e);e.labelStyle=n;const{shapeSvg:i,bbox:s}=yield qr(t,e,Fr(e)),o=Math.max(s.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),u=Math.max(s.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),h=-o/2,d=-u/2;let f,{rx:p,ry:g}=e;const{cssStyles:m}=e;if(r!=null&&r.rx&&r.ry&&(p=r.rx,g=r.ry),e.look==="handDrawn"){const y=Sr.svg(i),v=_r(e,{}),b=p||g?y.path(tp(h,d,o,u,p||0),v):y.rectangle(h,d,o,u,v);f=i.insert(()=>b,":first-child"),f.attr("class","basic label-container").attr("style",Ms(m))}else f=i.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",a).attr("rx",Ms(p)).attr("ry",Ms(g)).attr("x",h).attr("y",d).attr("width",o).attr("height",u);return Ir(e,f),e.calcIntersect=function(y,v){return Tr.rect(y,v)},e.intersect=function(y){return Tr.rect(e,y)},i})}l(Vw,"drawRect$2"),_(Vw,"drawRect");function axe(t,e){return nt(this,null,function*(){var g,m,y;const{cssClasses:r,labelPaddingX:n,labelPaddingY:a,padding:i,width:s,height:o}=e,u={rx:0,ry:0,labelPaddingX:n!=null?n:(i!=null?i:0)*2,labelPaddingY:(g=a!=null?a:i)!=null?g:0},h=yield Vw(t,e,u);if(e.look==="handDrawn"){const v=Sr.svg(h),b=_r(e,{}),w=h.select(".basic.label-container > path:nth-child(2)"),x=w.node();if(!x)return h;let T=null;if(x instanceof SVGGraphicsElement)T=x.getBBox();else return h;return h.insert(()=>v.line(T.x,T.y,T.x+T.width,T.y,b),".basic.label-container g.label"),h.insert(()=>v.line(T.x,T.y+T.height,T.x+T.width,T.y+T.height,b),".basic.label-container g.label"),w.remove(),h}const d=h.select(".basic.label-container"),f=(m=Number(d.attr("width"))||s)!=null?m:0,p=(y=Number(d.attr("height"))||o)!=null?y:0;return f>0&&p>0&&d.attr("stroke-dasharray",`${f} ${p}`),h})}l(axe,"datastore"),_(axe,"datastore");function ixe(t,e){return nt(this,null,function*(){var T,C,S,E,k,A;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=e.look==="neo"?16:(T=e.padding)!=null?T:0,i=e.look==="neo"?16:(C=e.padding)!=null?C:0,{shapeSvg:s,bbox:o,label:u}=yield qr(t,e,Fr(e)),h=o.width+a,d=o.height+i,f=d*.2,p=-h/2,g=-d/2-f/2,{cssStyles:m}=e,y=Sr.svg(s),v=_r(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=[{x:p,y:g+f},{x:-p,y:g+f},{x:-p,y:-g},{x:p,y:-g},{x:p,y:g},{x:-p,y:g},{x:-p,y:g+f}],w=y.polygon(b.map(I=>[I.x,I.y]),v),x=s.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),m&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),u.attr("transform",`translate(${p+((S=e.padding)!=null?S:0)/2-(o.x-((E=o.left)!=null?E:0))}, ${g+f+((k=e.padding)!=null?k:0)/2-(o.y-((A=o.top)!=null?A:0))})`),Ir(e,x),e.intersect=function(I){return Tr.rect(e,I)},s})}l(ixe,"dividedRectangle"),_(ixe,"dividedRectangle");function sxe(t,e){return nt(this,null,function*(){var g,m,y;const{labelStyles:r,nodeStyles:n}=Er(e),a=e.look==="neo"?12:5;e.labelStyle=r;const i=(g=e.padding)!=null?g:0,s=e.look==="neo"?16:i,{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=(e!=null&&e.width?(e==null?void 0:e.width)/2:u.width/2)+(s!=null?s:0),d=h-a;let f;const{cssStyles:p}=e;if(e.look==="handDrawn"){const v=Sr.svg(o),b=_r(e,{roughness:.2,strokeWidth:2.5}),w=_r(e,{roughness:.2,strokeWidth:1.5}),x=v.circle(0,0,h*2,b),T=v.circle(0,0,d*2,w);f=o.insert("g",":first-child"),f.attr("class",Ms(e.cssClasses)).attr("style",Ms(p)),(m=f.node())==null||m.appendChild(x),(y=f.node())==null||y.appendChild(T)}else{f=o.insert("g",":first-child");const v=f.insert("circle",":first-child"),b=f.insert("circle");f.attr("class","basic label-container").attr("style",n),v.attr("class","outer-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0),b.attr("class","inner-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0)}return Ir(e,f),e.intersect=function(v){return Le.info("DoubleCircle intersect",e,h,v),Tr.circle(e,h,v)},o})}l(sxe,"doublecircle$1"),_(sxe,"doublecircle");function oxe(t,e,{config:{themeVariables:r}}){var g;const{labelStyles:n,nodeStyles:a}=Er(e);e.label="",e.labelStyle=n;const i=t.insert("g").attr("class",Fr(e)).attr("id",(g=e.domId)!=null?g:e.id),s=7,{cssStyles:o}=e,u=Sr.svg(i),{nodeBorder:h}=r,d=_r(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(d.roughness=0);const f=u.circle(0,0,s*2,d),p=i.insert(()=>f,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",a),Ir(e,p),e.intersect=function(m){return Le.info("filledCircle intersect",e,{radius:s,point:m}),Tr.circle(e,s,m)},i}l(oxe,"filledCircle"),_(oxe,"filledCircle");var lxe=10,cxe=10;function uxe(t,e){return nt(this,null,function*(){var x,T,C,S,E,k;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(x=e.padding)!=null?x:0,i=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.height=(T=e==null?void 0:e.height)!=null?T:0,e.height<lxe&&(e.height=lxe),e.width=((C=e==null?void 0:e.width)!=null?C:0)-i-i/2,e.width<cxe&&(e.width=cxe));const{shapeSvg:s,bbox:o,label:u}=yield qr(t,e,Fr(e)),h=(e!=null&&e.width?e==null?void 0:e.width:o.width)+(i!=null?i:0),d=e!=null&&e.height?e==null?void 0:e.height:h+o.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:g}=e,m=Sr.svg(s),y=_r(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=kn(p),b=m.path(v,y),w=s.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",g),n&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",n),e.width=h,e.height=d,Ir(e,w),u.attr("transform",`translate(${-o.width/2-(o.x-((S=o.left)!=null?S:0))}, ${-d/2+((E=e.padding)!=null?E:0)/2+(o.y-((k=o.top)!=null?k:0))})`),e.intersect=function(A){return Le.info("Triangle intersect",e,p,A),Tr.polygon(e,p,A)},s})}l(uxe,"flippedTriangle"),_(uxe,"flippedTriangle");function hxe(t,e,{dir:r,config:{state:n,themeVariables:a}}){var b,w,x,T,C,S;const{nodeStyles:i}=Er(e);e.label="";const s=t.insert("g").attr("class",Fr(e)).attr("id",(b=e.domId)!=null?b:e.id),{cssStyles:o}=e;let u=Math.max(70,(w=e==null?void 0:e.width)!=null?w:0),h=Math.max(10,(x=e==null?void 0:e.height)!=null?x:0);r==="LR"&&(u=Math.max(10,(T=e==null?void 0:e.width)!=null?T:0),h=Math.max(70,(C=e==null?void 0:e.height)!=null?C:0));const d=-1*u/2,f=-1*h/2,p=Sr.svg(s),g=_r(e,{stroke:a.lineColor,fill:a.lineColor});e.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=p.rectangle(d,f,u,h,g),y=s.insert(()=>m,":first-child");o&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",i),Ir(e,y);const v=(S=n==null?void 0:n.padding)!=null?S:0;return e.width&&e.height&&(e.width+=v/2||0,e.height+=v/2||0),e.intersect=function(E){return Tr.rect(e,E)},s}l(hxe,"forkJoin$1"),_(hxe,"forkJoin");function dxe(t,e){return nt(this,null,function*(){var T,C,S,E;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=15,i=10,s=e.look==="neo"?16:(T=e.padding)!=null?T:0,o=e.look==="neo"?12:(C=e.padding)!=null?C:0;(e.width||e.height)&&(e.height=((S=e==null?void 0:e.height)!=null?S:0)-o*2,e.height<i&&(e.height=i),e.width=((E=e==null?void 0:e.width)!=null?E:0)-s*2,e.width<a&&(e.width=a));const{shapeSvg:u,bbox:h}=yield qr(t,e,Fr(e)),d=(e!=null&&e.width?e==null?void 0:e.width:Math.max(a,h.width))+s*2,f=(e!=null&&e.height?e==null?void 0:e.height:Math.max(i,h.height))+o*2,p=f/2,{cssStyles:g}=e,m=Sr.svg(u),y=_r(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=[{x:-d/2,y:-f/2},{x:d/2-p,y:-f/2},...b3(-d/2+p,0,p,50,90,270),{x:d/2-p,y:f/2},{x:-d/2,y:f/2}],b=kn(v),w=m.path(b,y),x=u.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),g&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",g),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Ir(e,x),e.intersect=function(k){return Le.info("Pill intersect",e,{radius:p,point:k}),Tr.polygon(e,v,k)},u})}l(dxe,"halfRoundedRectangle"),_(dxe,"halfRoundedRectangle");var v7t=_((t,e,r,n,a)=>[`M${t+a},${e}`,`L${t+r-a},${e}`,`L${t+r},${e-n/2}`,`L${t+r-a},${e-n}`,`L${t+a},${e-n}`,`L${t},${e-n/2}`,"Z"].join(" "),"createHexagonPathD");function fxe(t,e){return nt(this,null,function*(){var w,x,T,C;const{labelStyles:r,nodeStyles:n}=Er(e),a=e.look==="neo"?3.5:4;e.labelStyle=r;const i=(w=e.padding)!=null?w:0,s=70,o=32,u=e.look==="neo"?s:i,h=e.look==="neo"?o:i;if(e.width||e.height){const E=((x=e.height)!=null?x:0)/a;e.width=((T=e==null?void 0:e.width)!=null?T:0)-2*E-h,e.height=((C=e.height)!=null?C:0)-u}const{shapeSvg:d,bbox:f}=yield qr(t,e,Fr(e)),p=(e!=null&&e.height?e==null?void 0:e.height:f.height)+u,g=p/a,m=(e!=null&&e.width?e==null?void 0:e.width:f.width)+2*g+h,y=[{x:g,y:0},{x:m-g,y:0},{x:m,y:-p/2},{x:m-g,y:-p},{x:g,y:-p},{x:0,y:-p/2}];let v;const{cssStyles:b}=e;if(e.look==="handDrawn"){const S=Sr.svg(d),E=_r(e,{}),k=v7t(0,0,m,p,g),A=S.path(k,E);v=d.insert(()=>A,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),b&&v.attr("style",b)}else v=df(d,m,p,y);return n&&v.attr("style",n),e.width=m,e.height=p,Ir(e,v),e.intersect=function(S){return Tr.polygon(e,y,S)},d})}l(fxe,"hexagon$1"),_(fxe,"hexagon");function pxe(t,e){return nt(this,null,function*(){var m,y;const{labelStyles:r,nodeStyles:n}=Er(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=yield qr(t,e,Fr(e)),i=Math.max(30,(m=e==null?void 0:e.width)!=null?m:0),s=Math.max(30,(y=e==null?void 0:e.height)!=null?y:0),{cssStyles:o}=e,u=Sr.svg(a),h=_r(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:0,y:0},{x:i,y:0},{x:0,y:s},{x:i,y:s}],f=kn(d),p=u.path(f,h),g=a.insert(()=>p,":first-child");return g.attr("class","basic label-container outer-path"),o&&e.look!=="handDrawn"&&g.selectChildren("path").attr("style",o),n&&e.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),g.attr("transform",`translate(${-i/2}, ${-s/2})`),Ir(e,g),e.intersect=function(v){return Le.info("Pill intersect",e,{points:d}),Tr.polygon(e,d,v)},a})}l(pxe,"hourglass"),_(pxe,"hourglass");function gxe(a,i,s){return nt(this,arguments,function*(t,e,{config:{themeVariables:r,flowchart:n}}){var P,z,D,B;const{labelStyles:o}=Er(e);e.labelStyle=o;const u=(P=e.assetHeight)!=null?P:48,h=(z=e.assetWidth)!=null?z:48,d=Math.max(u,h),f=n==null?void 0:n.wrappingWidth;e.width=Math.max(d,f!=null?f:0);const{shapeSvg:p,bbox:g,label:m}=yield qr(t,e,"icon-shape default"),y=e.pos==="t",v=d,b=d,{nodeBorder:w}=r,{stylesMap:x}=Dw(e),T=-b/2,C=-v/2,S=e.label?8:0,E=Sr.svg(p),k=_r(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const A=E.rectangle(T,C,b,v,k),I=Math.max(b,g.width),L=v+g.height+S,R=E.rectangle(-I/2,-L/2,I,L,Ne(X({},k),{fill:"transparent",stroke:"none"})),O=p.insert(()=>A,":first-child"),M=p.insert(()=>R);if(e.icon){const W=p.append("g");W.html(`<g>${yield hf(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const U=W.node().getBBox(),j=U.width,V=U.height,Y=U.x,H=U.y;W.attr("transform",`translate(${-j/2-Y},${y?g.height/2+S/2-V/2-H:-g.height/2-S/2-V/2-H})`),W.attr("style",`color: ${(D=x.get("stroke"))!=null?D:w};`)}return m.attr("transform",`translate(${-g.width/2-(g.x-((B=g.left)!=null?B:0))},${y?-L/2:L/2-g.height})`),O.attr("transform",`translate(0,${y?g.height/2+S/2:-g.height/2-S/2})`),Ir(e,M),e.intersect=function(W){var q,Z,K;if(Le.info("iconSquare intersect",e,W),!e.label)return Tr.rect(e,W);const U=(q=e.x)!=null?q:0,j=(Z=e.y)!=null?Z:0,V=(K=e.height)!=null?K:0;let Y=[];return y?Y=[{x:U-g.width/2,y:j-V/2},{x:U+g.width/2,y:j-V/2},{x:U+g.width/2,y:j-V/2+g.height+S},{x:U+b/2,y:j-V/2+g.height+S},{x:U+b/2,y:j+V/2},{x:U-b/2,y:j+V/2},{x:U-b/2,y:j-V/2+g.height+S},{x:U-g.width/2,y:j-V/2+g.height+S}]:Y=[{x:U-b/2,y:j-V/2},{x:U+b/2,y:j-V/2},{x:U+b/2,y:j-V/2+v},{x:U+g.width/2,y:j-V/2+v},{x:U+g.width/2/2,y:j+V/2},{x:U-g.width/2,y:j+V/2},{x:U-g.width/2,y:j-V/2+v},{x:U-b/2,y:j-V/2+v}],Tr.polygon(e,Y,W)},p})}l(gxe,"icon"),_(gxe,"icon");function mxe(a,i,s){return nt(this,arguments,function*(t,e,{config:{themeVariables:r,flowchart:n}}){var j,V,Y,H;const{labelStyles:o}=Er(e);e.labelStyle=o;const u=(j=e.assetHeight)!=null?j:48,h=(V=e.assetWidth)!=null?V:48,d=Math.max(u,h),f=n==null?void 0:n.wrappingWidth;e.width=Math.max(d,f!=null?f:0);const{shapeSvg:p,bbox:g,label:m}=yield qr(t,e,"icon-shape default"),y=20,v=e.label?8:0,b=e.pos==="t",{nodeBorder:w,mainBkg:x}=r,{stylesMap:T}=Dw(e),C=Sr.svg(p),S=_r(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const E=T.get("fill");S.stroke=E!=null?E:x;const k=p.append("g");e.icon&&k.html(`<g>${yield hf(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const A=k.node().getBBox(),I=A.width,L=A.height,R=A.x,O=A.y,M=Math.max(I,L)*Math.SQRT2+y*2,P=C.circle(0,0,M,S),z=Math.max(M,g.width),D=M+g.height+v,B=C.rectangle(-z/2,-D/2,z,D,Ne(X({},S),{fill:"transparent",stroke:"none"})),W=p.insert(()=>P,":first-child"),U=p.insert(()=>B);return k.attr("transform",`translate(${-I/2-R},${b?g.height/2+v/2-L/2-O:-g.height/2-v/2-L/2-O})`),k.attr("style",`color: ${(Y=T.get("stroke"))!=null?Y:w};`),m.attr("transform",`translate(${-g.width/2-(g.x-((H=g.left)!=null?H:0))},${b?-D/2:D/2-g.height})`),W.attr("transform",`translate(0,${b?g.height/2+v/2:-g.height/2-v/2})`),Ir(e,U),e.intersect=function(q){return Le.info("iconSquare intersect",e,q),Tr.rect(e,q)},p})}l(mxe,"iconCircle"),_(mxe,"iconCircle");function yxe(a,i,s){return nt(this,arguments,function*(t,e,{config:{themeVariables:r,flowchart:n}}){var B,W,U,j;const{labelStyles:o}=Er(e);e.labelStyle=o;const u=(B=e.assetHeight)!=null?B:48,h=(W=e.assetWidth)!=null?W:48,d=Math.max(u,h),f=n==null?void 0:n.wrappingWidth;e.width=Math.max(d,f!=null?f:0);const{shapeSvg:p,bbox:g,halfPadding:m,label:y}=yield qr(t,e,"icon-shape default"),v=e.pos==="t",b=d+m*2,w=d+m*2,{nodeBorder:x,mainBkg:T}=r,{stylesMap:C}=Dw(e),S=-w/2,E=-b/2,k=e.label?8:0,A=Sr.svg(p),I=_r(e,{});e.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");const L=C.get("fill");I.stroke=L!=null?L:T;const R=A.path(tp(S,E,w,b,5),I),O=Math.max(w,g.width),M=b+g.height+k,P=A.rectangle(-O/2,-M/2,O,M,Ne(X({},I),{fill:"transparent",stroke:"none"})),z=p.insert(()=>R,":first-child").attr("class","icon-shape2"),D=p.insert(()=>P);if(e.icon){const V=p.append("g");V.html(`<g>${yield hf(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const Y=V.node().getBBox(),H=Y.width,q=Y.height,Z=Y.x,K=Y.y;V.attr("transform",`translate(${-H/2-Z},${v?g.height/2+k/2-q/2-K:-g.height/2-k/2-q/2-K})`),V.attr("style",`color: ${(U=C.get("stroke"))!=null?U:x};`)}return y.attr("transform",`translate(${-g.width/2-(g.x-((j=g.left)!=null?j:0))},${v?-M/2:M/2-g.height})`),z.attr("transform",`translate(0,${v?g.height/2+k/2:-g.height/2-k/2})`),Ir(e,D),e.intersect=function(V){var re,Q,te;if(Le.info("iconSquare intersect",e,V),!e.label)return Tr.rect(e,V);const Y=(re=e.x)!=null?re:0,H=(Q=e.y)!=null?Q:0,q=(te=e.height)!=null?te:0;let Z=[];return v?Z=[{x:Y-g.width/2,y:H-q/2},{x:Y+g.width/2,y:H-q/2},{x:Y+g.width/2,y:H-q/2+g.height+k},{x:Y+w/2,y:H-q/2+g.height+k},{x:Y+w/2,y:H+q/2},{x:Y-w/2,y:H+q/2},{x:Y-w/2,y:H-q/2+g.height+k},{x:Y-g.width/2,y:H-q/2+g.height+k}]:Z=[{x:Y-w/2,y:H-q/2},{x:Y+w/2,y:H-q/2},{x:Y+w/2,y:H-q/2+b},{x:Y+g.width/2,y:H-q/2+b},{x:Y+g.width/2/2,y:H+q/2},{x:Y-g.width/2,y:H+q/2},{x:Y-g.width/2,y:H-q/2+b},{x:Y-w/2,y:H-q/2+b}],Tr.polygon(e,Z,V)},p})}l(yxe,"iconRounded"),_(yxe,"iconRounded");function vxe(a,i,s){return nt(this,arguments,function*(t,e,{config:{themeVariables:r,flowchart:n}}){var B,W,U,j;const{labelStyles:o}=Er(e);e.labelStyle=o;const u=(B=e.assetHeight)!=null?B:48,h=(W=e.assetWidth)!=null?W:48,d=Math.max(u,h),f=n==null?void 0:n.wrappingWidth;e.width=Math.max(d,f!=null?f:0);const{shapeSvg:p,bbox:g,halfPadding:m,label:y}=yield qr(t,e,"icon-shape default"),v=e.pos==="t",b=d+m*2,w=d+m*2,{nodeBorder:x,mainBkg:T}=r,{stylesMap:C}=Dw(e),S=-w/2,E=-b/2,k=e.label?8:0,A=Sr.svg(p),I=_r(e,{});e.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");const L=C.get("fill");I.stroke=L!=null?L:T;const R=A.path(tp(S,E,w,b,.1),I),O=Math.max(w,g.width),M=b+g.height+k,P=A.rectangle(-O/2,-M/2,O,M,Ne(X({},I),{fill:"transparent",stroke:"none"})),z=p.insert(()=>R,":first-child"),D=p.insert(()=>P);if(e.icon){const V=p.append("g");V.html(`<g>${yield hf(e.icon,{height:d,width:d,fallbackPrefix:""})}</g>`);const Y=V.node().getBBox(),H=Y.width,q=Y.height,Z=Y.x,K=Y.y;V.attr("transform",`translate(${-H/2-Z},${v?g.height/2+k/2-q/2-K:-g.height/2-k/2-q/2-K})`),V.attr("style",`color: ${(U=C.get("stroke"))!=null?U:x};`)}return y.attr("transform",`translate(${-g.width/2-(g.x-((j=g.left)!=null?j:0))},${v?-M/2:M/2-g.height})`),z.attr("transform",`translate(0,${v?g.height/2+k/2:-g.height/2-k/2})`),Ir(e,D),e.intersect=function(V){var re,Q,te;if(Le.info("iconSquare intersect",e,V),!e.label)return Tr.rect(e,V);const Y=(re=e.x)!=null?re:0,H=(Q=e.y)!=null?Q:0,q=(te=e.height)!=null?te:0;let Z=[];return v?Z=[{x:Y-g.width/2,y:H-q/2},{x:Y+g.width/2,y:H-q/2},{x:Y+g.width/2,y:H-q/2+g.height+k},{x:Y+w/2,y:H-q/2+g.height+k},{x:Y+w/2,y:H+q/2},{x:Y-w/2,y:H+q/2},{x:Y-w/2,y:H-q/2+g.height+k},{x:Y-g.width/2,y:H-q/2+g.height+k}]:Z=[{x:Y-w/2,y:H-q/2},{x:Y+w/2,y:H-q/2},{x:Y+w/2,y:H-q/2+b},{x:Y+g.width/2,y:H-q/2+b},{x:Y+g.width/2/2,y:H+q/2},{x:Y-g.width/2,y:H+q/2},{x:Y-g.width/2,y:H-q/2+b},{x:Y-w/2,y:H-q/2+b}],Tr.polygon(e,Z,V)},p})}l(vxe,"iconSquare"),_(vxe,"iconSquare");function bxe(n,a,i){return nt(this,arguments,function*(t,e,{config:{flowchart:r}}){var O,M,P,z;const s=new Image;s.src=(O=e==null?void 0:e.img)!=null?O:"",yield s.decode();const o=Number(s.naturalWidth.toString().replace("px","")),u=Number(s.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/u;const{labelStyles:h}=Er(e);e.labelStyle=h;const d=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const f=Math.max(e.label&&d!=null?d:0,(M=e==null?void 0:e.assetWidth)!=null?M:o),p=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:f,g=e.constraint==="on"?p/e.imageAspectRatio:(P=e==null?void 0:e.assetHeight)!=null?P:u;e.width=Math.max(p,d!=null?d:0);const{shapeSvg:m,bbox:y,label:v}=yield qr(t,e,"image-shape default"),b=e.pos==="t",w=-p/2,x=-g/2,T=e.label?8:0,C=Sr.svg(m),S=_r(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const E=C.rectangle(w,x,p,g,S),k=Math.max(p,y.width),A=g+y.height+T,I=C.rectangle(-k/2,-A/2,k,A,Ne(X({},S),{fill:"none",stroke:"none"})),L=m.insert(()=>E,":first-child"),R=m.insert(()=>I);if(e.img){const D=m.append("image");D.attr("href",e.img),D.attr("width",p),D.attr("height",g),D.attr("preserveAspectRatio","none"),D.attr("transform",`translate(${-p/2},${b?A/2-g:-A/2})`)}return v.attr("transform",`translate(${-y.width/2-(y.x-((z=y.left)!=null?z:0))},${b?-g/2-y.height/2-T/2:g/2-y.height/2+T/2})`),L.attr("transform",`translate(0,${b?y.height/2+T/2:-y.height/2-T/2})`),Ir(e,R),e.intersect=function(D){var Y,H,q;if(Le.info("iconSquare intersect",e,D),!e.label)return Tr.rect(e,D);const B=(Y=e.x)!=null?Y:0,W=(H=e.y)!=null?H:0,U=(q=e.height)!=null?q:0;let j=[];return b?j=[{x:B-y.width/2,y:W-U/2},{x:B+y.width/2,y:W-U/2},{x:B+y.width/2,y:W-U/2+y.height+T},{x:B+p/2,y:W-U/2+y.height+T},{x:B+p/2,y:W+U/2},{x:B-p/2,y:W+U/2},{x:B-p/2,y:W-U/2+y.height+T},{x:B-y.width/2,y:W-U/2+y.height+T}]:j=[{x:B-p/2,y:W-U/2},{x:B+p/2,y:W-U/2},{x:B+p/2,y:W-U/2+g},{x:B+y.width/2,y:W-U/2+g},{x:B+y.width/2/2,y:W+U/2},{x:B-y.width/2,y:W+U/2},{x:B-y.width/2,y:W-U/2+g},{x:B-p/2,y:W-U/2+g}],Tr.polygon(e,j,D)},m})}l(bxe,"imageSquare"),_(bxe,"imageSquare");function xxe(t,e){return nt(this,null,function*(){var m,y,v;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(m=e.padding)!=null?m:0,i=a,s=e.look==="neo"?a*2:a,{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=Math.max(u.width+(s!=null?s:0)*2,(y=e==null?void 0:e.width)!=null?y:0),d=Math.max(u.height+(i!=null?i:0)*2,(v=e==null?void 0:e.height)!=null?v:0),f=[{x:0,y:0},{x:h,y:0},{x:h+3*d/6,y:-d},{x:-3*d/6,y:-d}];let p;const{cssStyles:g}=e;if(e.look==="handDrawn"){const b=Sr.svg(o),w=_r(e,{}),x=kn(f),T=b.path(x,w);p=o.insert(()=>T,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),g&&p.attr("style",g)}else p=df(o,h,d,f);return n&&p.attr("style",n),e.width=h,e.height=d,Ir(e,p),e.intersect=function(b){return Tr.polygon(e,f,b)},o})}l(xxe,"inv_trapezoid$1"),_(xxe,"inv_trapezoid");function wxe(t,e){return nt(this,null,function*(){var u,h;const{shapeSvg:r,bbox:n,label:a}=yield qr(t,e,"label"),i=r.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),a.attr("transform",`translate(${-(n.width/2)-(n.x-((u=n.left)!=null?u:0))}, ${-(n.height/2)-(n.y-((h=n.top)!=null?h:0))})`),Ir(e,i),e.intersect=function(d){return Tr.rect(e,d)},r})}l(wxe,"labelRect$1"),_(wxe,"labelRect");function Txe(t,e){return nt(this,null,function*(){var m,y,v;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(m=e.padding)!=null?m:0,i=a,s=e.look==="neo"?a*2:a,{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=((y=e==null?void 0:e.height)!=null?y:u.height)+i,d=((v=e==null?void 0:e.width)!=null?v:u.width)+s,f=[{x:0,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:g}=e;if(e.look==="handDrawn"){const b=Sr.svg(o),w=_r(e,{}),x=kn(f),T=b.path(x,w);p=o.insert(()=>T,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),g&&p.attr("style",g)}else p=df(o,d,h,f);return n&&p.attr("style",n),e.width=d,e.height=h,Ir(e,p),e.intersect=function(b){return Tr.polygon(e,f,b)},o})}l(Txe,"lean_left$1"),_(Txe,"lean_left");function Exe(t,e){return nt(this,null,function*(){var m,y,v;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(m=e.padding)!=null?m:0,i=a,s=e.look==="neo"?a*2:a,{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=((y=e==null?void 0:e.height)!=null?y:u.height)+i,d=((v=e==null?void 0:e.width)!=null?v:u.width)+s,f=[{x:-3*h/6,y:0},{x:d,y:0},{x:d+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:g}=e;if(e.look==="handDrawn"){const b=Sr.svg(o),w=_r(e,{}),x=kn(f),T=b.path(x,w);p=o.insert(()=>T,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),g&&p.attr("style",g)}else p=df(o,d,h,f);return n&&p.attr("style",n),e.width=d,e.height=h,Ir(e,p),e.intersect=function(b){return Tr.polygon(e,f,b)},o})}l(Exe,"lean_right$1"),_(Exe,"lean_right");function Cxe(t,e){var y,v,b;const{labelStyles:r,nodeStyles:n}=Er(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",Fr(e)).attr("id",(y=e.domId)!=null?y:e.id),{cssStyles:i}=e,s=Math.max(35,(v=e==null?void 0:e.width)!=null?v:0),o=Math.max(35,(b=e==null?void 0:e.height)!=null?b:0),u=7,h=[{x:s,y:0},{x:0,y:o+u/2},{x:s-2*u,y:o+u/2},{x:0,y:2*o},{x:s,y:o-u/2},{x:2*u,y:o-u/2}],d=Sr.svg(a),f=_r(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=kn(h),g=d.path(p,f),m=a.insert(()=>g,":first-child");return m.attr("class","outer-path"),i&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",i),n&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(-${s/2},${-o})`),Ir(e,m),e.intersect=function(w){return Le.info("lightningBolt intersect",e,w),Tr.polygon(e,h,w)},a}l(Cxe,"lightningBolt"),_(Cxe,"lightningBolt");var b7t=_((t,e,r,n,a,i,s)=>[`M${t},${e+i}`,`a${a},${i} 0,0,0 ${r},0`,`a${a},${i} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${i} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+i+s}`,`a${a},${i} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),x7t=_((t,e,r,n,a,i,s)=>[`M${t},${e+i}`,`M${t+r},${e+i}`,`a${a},${i} 0,0,0 ${-r},0`,`l0,${n}`,`a${a},${i} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+i+s}`,`a${a},${i} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),w7t=_((t,e,r,n,a,i)=>[`M${t-r/2},${-n/2}`,`a${a},${i} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Sxe=10,_xe=10;function kxe(t,e){return nt(this,null,function*(){var b,w,x,T,C,S;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(b=e.padding)!=null?b:0,i=e.look==="neo"?16:a,s=e.look==="neo"?24:a;if(e.width||e.height){const E=(w=e.width)!=null?w:0;e.width=((x=e.width)!=null?x:0)-i,e.width<_xe&&(e.width=_xe);const A=E/2/(2.5+E/50);e.height=((T=e.height)!=null?T:0)-s-A*3,e.height<Sxe&&(e.height=Sxe)}const{shapeSvg:o,bbox:u,label:h}=yield qr(t,e,Fr(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+i*2,f=d/2,p=f/(2.5+d/50),g=(e!=null&&e.height?e==null?void 0:e.height:u.height)+p+s*2,m=g*.1;let y;const{cssStyles:v}=e;if(e.look==="handDrawn"){const E=Sr.svg(o),k=x7t(0,0,d,g,f,p,m),A=w7t(0,p,d,g,f,p),I=_r(e,{}),L=E.path(k,I),R=E.path(A,I);o.insert(()=>R,":first-child").attr("class","line"),y=o.insert(()=>L,":first-child"),y.attr("class","basic label-container"),v&&y.attr("style",v)}else{const E=b7t(0,0,d,g,f,p,m);y=o.insert("path",":first-child").attr("d",E).attr("class","basic label-container outer-path").attr("style",Ms(v)).attr("style",n)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-d/2}, ${-(g/2+p)})`),Ir(e,y),h.attr("transform",`translate(${-(u.width/2)-(u.x-((C=u.left)!=null?C:0))}, ${-(u.height/2)+p-(u.y-((S=u.top)!=null?S:0))})`),e.intersect=function(E){var I,L,R,O,M,P;const k=Tr.rect(e,E),A=k.x-((I=e.x)!=null?I:0);if(f!=0&&(Math.abs(A)<((L=e.width)!=null?L:0)/2||Math.abs(A)==((R=e.width)!=null?R:0)/2&&Math.abs(k.y-((O=e.y)!=null?O:0))>((M=e.height)!=null?M:0)/2-p)){let z=p*p*(1-A*A/(f*f));z>0&&(z=Math.sqrt(z)),z=p-z,E.y-((P=e.y)!=null?P:0)>0&&(z=-z),k.y+=z}return k},o})}l(kxe,"linedCylinder"),_(kxe,"linedCylinder");function Axe(t,e){return nt(this,null,function*(){var T,C,S,E,k,A;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(T=e.padding)!=null?T:0,i=e.look==="neo"?16:a,s=e.look==="neo"?12:a;if(e.width||e.height){const I=e.width;e.width=(I!=null?I:0)*10/11-i*2,e.width<10&&(e.width=10),e.height=((C=e==null?void 0:e.height)!=null?C:0)-s*2,e.height<10&&(e.height=10)}const{shapeSvg:o,bbox:u,label:h}=yield qr(t,e,Fr(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+(i!=null?i:0)*2,f=(e!=null&&e.height?e==null?void 0:e.height:u.height)+(s!=null?s:0)*2,p=e.look==="neo"?f/4:f/8,g=f+p,{cssStyles:m}=e,y=Sr.svg(o),v=_r(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=[{x:-d/2-d/2*.1,y:-g/2},{x:-d/2-d/2*.1,y:g/2},...J0(-d/2-d/2*.1,g/2,d/2+d/2*.1,g/2,p,.8),{x:d/2+d/2*.1,y:-g/2},{x:-d/2-d/2*.1,y:-g/2},{x:-d/2,y:-g/2},{x:-d/2,y:g/2*1.1},{x:-d/2,y:-g/2}],w=y.polygon(b.map(I=>[I.x,I.y]),v),x=o.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),m&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-d/2+((S=e.padding)!=null?S:0)+d/2*.1/2-(u.x-((E=u.left)!=null?E:0))},${-f/2+((k=e.padding)!=null?k:0)-p/2-(u.y-((A=u.top)!=null?A:0))})`),Ir(e,x),e.intersect=function(I){return Tr.polygon(e,b,I)},o})}l(Axe,"linedWaveEdgedRect"),_(Axe,"linedWaveEdgedRect");function Nxe(t,e){return nt(this,null,function*(){var L,R,O,M,P;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(L=e.padding)!=null?L:0,i=e.look==="neo"?16:a,s=e.look==="neo"?12:a,o=e.look==="neo"?10:5;(e.width||e.height)&&(e.width=Math.max(((R=e==null?void 0:e.width)!=null?R:0)-i*2-2*o,10),e.height=Math.max(((O=e==null?void 0:e.height)!=null?O:0)-s*2-2*o,10));const{shapeSvg:u,bbox:h,label:d}=yield qr(t,e,Fr(e)),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+i*2+2*o,p=(e!=null&&e.height?e==null?void 0:e.height:h.height)+s*2+2*o,g=f-2*o,m=p-2*o,y=-g/2,v=-m/2,{cssStyles:b}=e,w=Sr.svg(u),x=_r(e,{}),T=[{x:y-o,y:v+o},{x:y-o,y:v+m+o},{x:y+g-o,y:v+m+o},{x:y+g-o,y:v+m},{x:y+g,y:v+m},{x:y+g,y:v+m-o},{x:y+g+o,y:v+m-o},{x:y+g+o,y:v-o},{x:y+o,y:v-o},{x:y+o,y:v},{x:y,y:v},{x:y,y:v+o}],C=[{x:y,y:v+o},{x:y+g-o,y:v+o},{x:y+g-o,y:v+m},{x:y+g,y:v+m},{x:y+g,y:v},{x:y,y:v}];e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=kn(T);let E=w.path(S,x);const k=kn(C);let A=w.path(k,x);e.look!=="handDrawn"&&(E=KW(E),A=KW(A));const I=u.insert("g",":first-child");return I.insert(()=>E),I.insert(()=>A),I.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",n),d.attr("transform",`translate(${-(h.width/2)-o-(h.x-((M=h.left)!=null?M:0))}, ${-(h.height/2)+o-(h.y-((P=h.top)!=null?P:0))})`),Ir(e,I),e.intersect=function(z){return Tr.polygon(e,T,z)},u})}l(Nxe,"multiRect"),_(Nxe,"multiRect");function Ixe(t,e){return nt(this,null,function*(){var M,P,z,D,B,W,U;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i,label:s}=yield qr(t,e,Fr(e)),o=(M=e.padding)!=null?M:0,u=e.look==="neo"?16:o,h=e.look==="neo"?12:o;let d=!0;(e.width||e.height)&&(d=!1,e.width=((P=e==null?void 0:e.width)!=null?P:0)-u*2,e.height=((z=e==null?void 0:e.height)!=null?z:0)-h*3);const f=Math.max(i.width,(D=e==null?void 0:e.width)!=null?D:0)+u*2,p=Math.max(i.height,(B=e==null?void 0:e.height)!=null?B:0)+h*3,g=e.look==="neo"?p/4:p/8,m=p+(d?g/2:-g/2),y=-f/2,v=-m/2,b=10,{cssStyles:w}=e,x=J0(y-b,v+m+b,y+f-b,v+m+b,g,.8),T=x==null?void 0:x[x.length-1],C=[{x:y-b,y:v+b},{x:y-b,y:v+m+b},...x,{x:y+f-b,y:T.y-b},{x:y+f,y:T.y-b},{x:y+f,y:T.y-2*b},{x:y+f+b,y:T.y-2*b},{x:y+f+b,y:v-b},{x:y+b,y:v-b},{x:y+b,y:v},{x:y,y:v},{x:y,y:v+b}],S=[{x:y,y:v+b},{x:y+f-b,y:v+b},{x:y+f-b,y:T.y-b},{x:y+f,y:T.y-b},{x:y+f,y:v},{x:y,y:v}],E=Sr.svg(a),k=_r(e,{});e.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const A=kn(C),I=E.path(A,k),L=kn(S),R=E.path(L,k),O=a.insert(()=>I,":first-child");return O.insert(()=>R),O.attr("class","basic label-container outer-path"),w&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",w),n&&e.look!=="handDrawn"&&O.selectAll("path").attr("style",n),O.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-(i.width/2)-b-(i.x-((W=i.left)!=null?W:0))}, ${-(i.height/2)+b-g/2-(i.y-((U=i.top)!=null?U:0))})`),Ir(e,O),e.intersect=function(j){return Tr.polygon(e,C,j)},a})}l(Ixe,"multiWaveEdgedRectangle"),_(Ixe,"multiWaveEdgedRectangle");function Lxe(n,a,i){return nt(this,arguments,function*(t,e,{config:{themeVariables:r}}){var C,S,E,k,A,I;const{labelStyles:s,nodeStyles:o}=Er(e);e.labelStyle=s,e.useHtmlLabels||ta(Ar())||(e.centerLabel=!0);const{shapeSvg:h,bbox:d,label:f}=yield qr(t,e,Fr(e)),p=Math.max(d.width+((C=e.padding)!=null?C:0)*2,(S=e==null?void 0:e.width)!=null?S:0),g=Math.max(d.height+((E=e.padding)!=null?E:0)*2,(k=e==null?void 0:e.height)!=null?k:0),m=-p/2,y=-g/2,{cssStyles:v}=e,b=Sr.svg(h),w=_r(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const x=b.rectangle(m,y,p,g,w),T=h.insert(()=>x,":first-child");return T.attr("class","basic label-container outer-path"),f.attr("class","label noteLabel"),v&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",v),o&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",o),f.attr("transform",`translate(${-d.width/2-(d.x-((A=d.left)!=null?A:0))}, ${-(d.height/2)-(d.y-((I=d.top)!=null?I:0))})`),Ir(e,T),e.intersect=function(L){return Tr.rect(e,L)},h})}l(Lxe,"note$1"),_(Lxe,"note");var T7t=_((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");function $xe(t,e){return nt(this,null,function*(){var g,m;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i}=yield qr(t,e,Fr(e)),s=i.width+((g=e.padding)!=null?g:0),o=i.height+((m=e.padding)!=null?m:0),u=s+o,h=.5,d=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}];let f;const{cssStyles:p}=e;if(e.look==="handDrawn"){const y=Sr.svg(a),v=_r(e,{}),b=T7t(0,0,u),w=y.path(b,v);f=a.insert(()=>w,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&f.attr("style",p)}else f=df(a,u,u,d),f.attr("transform",`translate(${-u/2+h}, ${u/2})`);return n&&f.attr("style",n),Ir(e,f),e.calcIntersect=function(y,v){const b=y.width,w=[{x:b/2,y:0},{x:b,y:-b/2},{x:b/2,y:-b},{x:0,y:-b/2}],x=Tr.polygon(y,w,v);return{x:x.x-.5,y:x.y-.5}},e.intersect=function(y){return this.calcIntersect(e,y)},a})}l($xe,"question$1"),_($xe,"question");function Mxe(t,e){return nt(this,null,function*(){var S,E,k,A,I;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(S=e.padding)!=null?S:0,i=e.look==="neo"?21:a!=null?a:0,s=e.look==="neo"?12:a!=null?a:0,{shapeSvg:o,bbox:u,label:h}=yield qr(t,e,Fr(e)),d=((E=e==null?void 0:e.width)!=null?E:u.width)+(e.look==="neo"?i*2:i),f=((k=e==null?void 0:e.height)!=null?k:u.height)+(e.look==="neo"?s*2:s),p=-d/2,g=-f/2,m=g/2,y=[{x:p+m,y:g},{x:p,y:0},{x:p+m,y:-g},{x:-p,y:-g},{x:-p,y:g}],{cssStyles:v}=e,b=Sr.svg(o),w=_r(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const x=kn(y),T=b.path(x,w),C=o.insert(()=>T,":first-child");return C.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",v),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),C.attr("transform",`translate(${-m/2},0)`),h.attr("transform",`translate(${-m/2-u.width/2-(u.x-((A=u.left)!=null?A:0))}, ${-(u.height/2)-(u.y-((I=u.top)!=null?I:0))})`),Ir(e,C),e.intersect=function(L){return Tr.polygon(e,y,L)},o})}l(Mxe,"rect_left_inv_arrow$1"),_(Mxe,"rect_left_inv_arrow");function Pxe(t,e){return nt(this,null,function*(){const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;let a;e.cssClasses?a="node "+e.cssClasses:a="node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("g"),o=i.insert("g").attr("class","label").attr("style",n),u=e.description,h=e.label,d=yield ep(o,h,e.labelStyle,!0,!0);let f={width:0,height:0};if(ta(ft())){const k=d.children[0],A=Yt(d);f=k.getBoundingClientRect(),A.attr("width",f.width),A.attr("height",f.height)}Le.info("Text 2",u);const p=u||[],g=d.getBBox(),m=yield ep(o,Array.isArray(p)?p.join("<br/>"):p,e.labelStyle,!0,!0),y=m.children[0],v=Yt(m);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height);const b=(e.padding||0)/2;Yt(m).attr("transform","translate( "+(f.width>g.width?0:(g.width-f.width)/2)+", "+(g.height+b+5)+")"),Yt(d).attr("transform","translate( "+(f.width<g.width?0:-(g.width-f.width)/2)+", 0)"),f=o.node().getBBox(),o.attr("transform","translate("+-f.width/2+", "+(-f.height/2-b+3)+")");const w=f.width+(e.padding||0),x=f.height+(e.padding||0),T=-f.width/2-b,C=-f.height/2-b;let S,E;if(e.look==="handDrawn"){const k=Sr.svg(i),A=_r(e,{}),I=k.path(tp(T,C,w,x,e.rx||0),A),L=k.line(-f.width/2-b,-f.height/2-b+g.height+b,f.width/2+b,-f.height/2-b+g.height+b,A);E=i.insert(()=>(Le.debug("Rough node insert CXC",I),L),":first-child"),S=i.insert(()=>(Le.debug("Rough node insert CXC",I),I),":first-child")}else S=s.insert("rect",":first-child"),E=s.insert("line"),S.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-b).attr("y",-f.height/2-b).attr("width",f.width+(e.padding||0)).attr("height",f.height+(e.padding||0)),E.attr("class","divider").attr("x1",-f.width/2-b).attr("x2",f.width/2+b).attr("y1",-f.height/2-b+g.height+b).attr("y2",-f.height/2-b+g.height+b);return Ir(e,S),e.intersect=function(k){return Tr.rect(e,k)},i})}l(Pxe,"rectWithTitle$1"),_(Pxe,"rectWithTitle");function Rxe(n,a,i){return nt(this,arguments,function*(t,e,{config:{themeVariables:r}}){var u,h,d;const s=(u=r==null?void 0:r.radius)!=null?u:5,o={rx:s,ry:s,labelPaddingX:((h=e==null?void 0:e.padding)!=null?h:0)*1,labelPaddingY:((d=e==null?void 0:e.padding)!=null?d:0)*1};return Vw(t,e,o)})}l(Rxe,"roundedRect"),_(Rxe,"roundedRect");var Nm=8;function Oxe(t,e){return nt(this,null,function*(){var C,S,E,k,A,I;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=e.look==="neo"?16:(C=e.padding)!=null?C:0,i=e.look==="neo"?12:(S=e.padding)!=null?S:0,{shapeSvg:s,bbox:o,label:u}=yield qr(t,e,Fr(e)),h=((E=e==null?void 0:e.width)!=null?E:o.width)+a*2+(e.look==="neo"?Nm:Nm*2),d=((k=e==null?void 0:e.height)!=null?k:o.height)+i*2,f=h-Nm,p=d,g=Nm-h/2,m=-d/2,{cssStyles:y}=e,v=Sr.svg(s),b=_r(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const w=[{x:g,y:m},{x:g+f,y:m},{x:g+f,y:m+p},{x:g-Nm,y:m+p},{x:g-Nm,y:m},{x:g,y:m},{x:g,y:m+p}],x=v.polygon(w.map(L=>[L.x,L.y]),b),T=s.insert(()=>x,":first-child");return T.attr("class","basic label-container outer-path").attr("style",Ms(y)),n&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),y&&e.look!=="handDrawn"&&T.selectAll("path").attr("style",n),u.attr("transform",`translate(${Nm/2-o.width/2-(o.x-((A=o.left)!=null?A:0))}, ${-(o.height/2)-(o.y-((I=o.top)!=null?I:0))})`),Ir(e,T),e.intersect=function(L){return Tr.rect(e,L)},s})}l(Oxe,"shadedProcess"),_(Oxe,"shadedProcess");function Dxe(t,e){return nt(this,null,function*(){var E,k,A,I,L,R,O;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(E=e.padding)!=null?E:0,i=e.look==="neo"?16:a,s=e.look==="neo"?12:a;(e.width||e.height)&&(e.width=Math.max(((k=e==null?void 0:e.width)!=null?k:0)-i*2,10),e.height=Math.max(((A=e==null?void 0:e.height)!=null?A:0)/1.5-s*2,10));const{shapeSvg:o,bbox:u,label:h}=yield qr(t,e,Fr(e)),d=(e!=null&&e.width?e==null?void 0:e.width:u.width)+i*2,f=((e!=null&&e.height?e==null?void 0:e.height:u.height)+s*2)*1.5,p=d,g=f/1.5,m=-p/2,y=-g/2,{cssStyles:v}=e,b=Sr.svg(o),w=_r(e,{});e.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const x=[{x:m,y},{x:m,y:y+g},{x:m+p,y:y+g},{x:m+p,y:y-g/2}],T=kn(x),C=b.path(T,w),S=o.insert(()=>C,":first-child");return S.attr("class","basic label-container outer-path"),v&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",v),n&&e.look!=="handDrawn"&&S.selectChildren("path").attr("style",n),S.attr("transform",`translate(0, ${g/4})`),h.attr("transform",`translate(${-p/2+((I=e.padding)!=null?I:0)-(u.x-((L=u.left)!=null?L:0))}, ${-g/4+((R=e.padding)!=null?R:0)-(u.y-((O=u.top)!=null?O:0))})`),Ir(e,S),e.intersect=function(M){return Tr.polygon(e,x,M)},o})}l(Dxe,"slopedRect"),_(Dxe,"slopedRect");function Fxe(t,e){return nt(this,null,function*(){var s,o;const r=(s=e.padding)!=null?s:0,n=e.look==="neo"?16:r*2,a=e.look==="neo"?12:r,i={rx:0,ry:0,labelPaddingX:(o=e.labelPaddingX)!=null?o:n,labelPaddingY:a};return Vw(t,e,i)})}l(Fxe,"squareRect2"),_(Fxe,"squareRect");function Bxe(t,e){return nt(this,null,function*(){var x;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(x=e.padding)!=null?x:0,i=e.look==="neo"?20:a,s=e.look==="neo"?12:a,{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=u.height+(e.look==="neo"?s*2:s),d=u.width+h/4+(e.look==="neo"?i*2:i),f=h/2,{cssStyles:p}=e,g=Sr.svg(o),m=_r(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-d/2+f,y:-h/2},{x:d/2-f,y:-h/2},...b3(-d/2+f,0,f,50,90,270),{x:d/2-f,y:h/2},...b3(d/2-f,0,f,50,270,450)],v=kn(y),b=g.path(v,m),w=o.insert(()=>b,":first-child");return w.attr("class","basic label-container outer-path"),p&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",p),n&&e.look!=="handDrawn"&&w.selectChildren("path").attr("style",n),Ir(e,w),e.intersect=function(T){return Tr.polygon(e,y,T)},o})}l(Bxe,"stadium$1"),_(Bxe,"stadium");function zxe(t,e){return nt(this,null,function*(){const r={rx:e.look==="neo"?3:5,ry:e.look==="neo"?3:5};return Vw(t,e,r)})}l(zxe,"state$2"),_(zxe,"state");function Hxe(t,e,{config:{themeVariables:r}}){var w,x,T,C,S,E,k;const{labelStyles:n,nodeStyles:a}=Er(e);e.labelStyle=n;const{cssStyles:i}=e,{lineColor:s,stateBorder:o,nodeBorder:u,nodeShadow:h}=r;(e.width||e.height)&&(((w=e.width)!=null?w:0)<14&&(e.width=14),((x=e.height)!=null?x:0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const d=t.insert("g").attr("class","node default").attr("id",(T=e.domId)!=null?T:e.id),f=Sr.svg(d),p=_r(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const g=f.circle(0,0,e.width,Ne(X({},p),{stroke:s,strokeWidth:2})),m=o!=null?o:u,y=((C=e.width)!=null?C:0)*5/14,v=f.circle(0,0,y,Ne(X({},p),{fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"})),b=d.insert(()=>g,":first-child");if(b.insert(()=>v),e.look!=="handDrawn"&&b.attr("class","outer-path"),i&&b.selectAll("path").attr("style",i),a&&b.selectAll("path").attr("style",a),e.width<25&&h&&e.look!=="handDrawn"){const A=(k=(E=(S=t.node())==null?void 0:S.ownerSVGElement)==null?void 0:E.id)!=null?k:"",I=A?`${A}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${I})`)}return Ir(e,b),e.intersect=function(A){var I;return Tr.circle(e,((I=e.width)!=null?I:0)/2,A)},d}l(Hxe,"stateEnd"),_(Hxe,"stateEnd");function Wxe(t,e,{config:{themeVariables:r}}){var o,u,h,d,f,p,g,m,y,v,b;const{lineColor:n,nodeShadow:a}=r;(e.width||e.height)&&(((o=e.width)!=null?o:0)<14&&(e.width=14),((u=e.height)!=null?u:0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if(e.look==="handDrawn"){const x=Sr.svg(i).circle(0,0,e.width,aAt(n));s=i.insert(()=>x),s.attr("class","state-start").attr("r",((h=e.width)!=null?h:7)/2).attr("width",(d=e.width)!=null?d:14).attr("height",(f=e.height)!=null?f:14)}else s=i.insert("circle",":first-child"),s.attr("class","state-start").attr("r",((p=e.width)!=null?p:7)/2).attr("width",(g=e.width)!=null?g:14).attr("height",(m=e.height)!=null?m:14);if(e.width<25&&a&&e.look!=="handDrawn"){const w=(b=(v=(y=t.node())==null?void 0:y.ownerSVGElement)==null?void 0:v.id)!=null?b:"",x=w?`${w}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${x})`)}return Ir(e,s),e.intersect=function(w){var x;return Tr.circle(e,((x=e.width)!=null?x:7)/2,w)},i}l(Wxe,"stateStart"),_(Wxe,"stateStart");var Gw=8;function Vxe(t,e){return nt(this,null,function*(){var v,b,w;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(v=e==null?void 0:e.padding)!=null?v:8,i=e.look==="neo"?28:a,s=e.look==="neo"?12:a,{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=((b=e==null?void 0:e.width)!=null?b:u.width)+2*Gw+i,d=((w=e==null?void 0:e.height)!=null?w:u.height)+s,f=h-2*Gw,p=d,g=-h/2,m=-d/2,y=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(e.look==="handDrawn"){const x=Sr.svg(o),T=_r(e,{}),C=x.rectangle(g,m,f+16,p,T),S=x.line(g+Gw,m,g+Gw,m+p,T),E=x.line(g+Gw+f,m,g+Gw+f,m+p,T);o.insert(()=>S,":first-child"),o.insert(()=>E,":first-child");const k=o.insert(()=>C,":first-child"),{cssStyles:A}=e;k.attr("class","basic label-container").attr("style",Ms(A)),Ir(e,k)}else{const x=df(o,f,p,y);n&&x.attr("style",n),Ir(e,x)}return e.intersect=function(x){return Tr.polygon(e,y,x)},o})}l(Vxe,"subroutine$1"),_(Vxe,"subroutine");var JW=.2;function Gxe(t,e){return nt(this,null,function*(){var L,R,O;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(L=e.padding)!=null?L:0,i=e.look==="neo"?16:a,s=e.look==="neo"?12:a;(e.width||e.height)&&(e.height=Math.max(((R=e==null?void 0:e.height)!=null?R:0)-s*2,10),e.width=Math.max(((O=e==null?void 0:e.width)!=null?O:0)-i*2-JW*(e.height+s*2),10));const{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=(e!=null&&e.height?e==null?void 0:e.height:u.height)+s*2,d=JW*h,f=JW*h,g=(e!=null&&e.width?e==null?void 0:e.width:u.width)+i*2+d-d,m=h,y=-g/2,v=-m/2,{cssStyles:b}=e,w=Sr.svg(o),x=_r(e,{}),T=[{x:y-d/2,y:v},{x:y+g+d/2,y:v},{x:y+g+d/2,y:v+m},{x:y-d/2,y:v+m}],C=[{x:y+g-d/2,y:v+m},{x:y+g+d/2,y:v+m},{x:y+g+d/2,y:v+m-f}];e.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const S=kn(T),E=w.path(S,x),k=kn(C),A=w.path(k,Ne(X({},x),{fillStyle:"solid"})),I=o.insert(()=>A,":first-child");return I.insert(()=>E,":first-child"),I.attr("class","basic label-container outer-path"),b&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",b),n&&e.look!=="handDrawn"&&I.selectAll("path").attr("style",n),Ir(e,I),e.intersect=function(M){return Tr.polygon(e,T,M)},o})}l(Gxe,"taggedRect"),_(Gxe,"taggedRect");function qxe(t,e){return nt(this,null,function*(){var A,I,L,R,O,M,P,z;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i,label:s}=yield qr(t,e,Fr(e)),o=Math.max(i.width+((A=e.padding)!=null?A:0)*2,(I=e==null?void 0:e.width)!=null?I:0),u=Math.max(i.height+((L=e.padding)!=null?L:0)*2,(R=e==null?void 0:e.height)!=null?R:0),h=u/8,d=.2*o,f=.2*u,p=u+h,{cssStyles:g}=e,m=Sr.svg(a),y=_r(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=[{x:-o/2-o/2*.1,y:p/2},...J0(-o/2-o/2*.1,p/2,o/2+o/2*.1,p/2,h,.8),{x:o/2+o/2*.1,y:-p/2},{x:-o/2-o/2*.1,y:-p/2}],b=-o/2+o/2*.1,w=-p/2-f*.4,x=[{x:b+o-d,y:(w+u)*1.3},{x:b+o,y:w+u-f},{x:b+o,y:(w+u)*.9},...J0(b+o,(w+u)*1.25,b+o-d,(w+u)*1.3,-u*.02,.5)],T=kn(v),C=m.path(T,y),S=kn(x),E=m.path(S,Ne(X({},y),{fillStyle:"solid"})),k=a.insert(()=>E,":first-child");return k.insert(()=>C,":first-child"),k.attr("class","basic label-container outer-path"),g&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-h/2})`),s.attr("transform",`translate(${-o/2+((O=e.padding)!=null?O:0)-(i.x-((M=i.left)!=null?M:0))},${-u/2+((P=e.padding)!=null?P:0)-h/2-(i.y-((z=i.top)!=null?z:0))})`),Ir(e,k),e.intersect=function(D){return Tr.polygon(e,v,D)},a})}l(qxe,"taggedWaveEdgedRectangle"),_(qxe,"taggedWaveEdgedRectangle");function Yxe(t,e){return nt(this,null,function*(){var f,p;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i}=yield qr(t,e,Fr(e)),s=Math.max(i.width+((f=e.padding)!=null?f:0),(e==null?void 0:e.width)||0),o=Math.max(i.height+((p=e.padding)!=null?p:0),(e==null?void 0:e.height)||0),u=-s/2,h=-o/2,d=a.insert("rect",":first-child");return d.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",s).attr("height",o),Ir(e,d),e.intersect=function(g){return Tr.rect(e,g)},a})}l(Yxe,"text$2"),_(Yxe,"text");var E7t=_((t,e,r,n,a,i)=>`M${t},${e}
|
||
a${a},${i} 0,0,1 0,${-n}
|
||
l${r},0
|
||
a${a},${i} 0,0,1 0,${n}
|
||
M${r},${-n}
|
||
a${a},${i} 0,0,0 0,${n}
|
||
l${-r},0`,"createCylinderPathD"),C7t=_((t,e,r,n,a,i)=>[`M${t},${e}`,`M${t+r},${e}`,`a${a},${i} 0,0,0 0,${-n}`,`l${-r},0`,`a${a},${i} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),S7t=_((t,e,r,n,a,i)=>[`M${t+r/2},${-n/2}`,`a${a},${i} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),Uxe=5,jxe=10;function Kxe(t,e){return nt(this,null,function*(){var y,v,b,w,x,T;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(y=e.padding)!=null?y:0,i=e.look==="neo"?12:a/2;if(e.width||e.height){const C=(v=e.height)!=null?v:0;e.height=((b=e.height)!=null?b:0)-i,e.height<Uxe&&(e.height=Uxe);const E=C/2/(2.5+C/50);e.width=((w=e.width)!=null?w:0)-i-E*3,e.width<jxe&&(e.width=jxe)}const{shapeSvg:s,bbox:o,label:u}=yield qr(t,e,Fr(e)),h=(e.height?e.height:o.height)+i,d=h/2,f=d/(2.5+h/50),p=(e.width?e.width:o.width)+f+i,{cssStyles:g}=e;let m;if(e.look==="handDrawn"){const C=Sr.svg(s),S=C7t(0,0,p,h,f,d),E=S7t(0,0,p,h,f,d),k=C.path(S,_r(e,{})),A=C.path(E,_r(e,{fill:"none"}));m=s.insert(()=>A,":first-child"),m=s.insert(()=>k,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{const C=E7t(0,0,p,h,f,d);m=s.insert("path",":first-child").attr("d",C).attr("class","basic label-container").attr("style",Ms(g)).attr("style",n),m.attr("class","basic label-container outer-path"),g&&m.selectAll("path").attr("style",g),n&&m.selectAll("path").attr("style",n)}return m.attr("label-offset-x",f),m.attr("transform",`translate(${-p/2}, ${h/2} )`),u.attr("transform",`translate(${-(o.width/2)-f-(o.x-((x=o.left)!=null?x:0))}, ${-(o.height/2)-(o.y-((T=o.top)!=null?T:0))})`),Ir(e,m),e.intersect=function(C){var k,A,I,L,R,O;const S=Tr.rect(e,C),E=S.y-((k=e.y)!=null?k:0);if(d!=0&&(Math.abs(E)<((A=e.height)!=null?A:0)/2||Math.abs(E)==((I=e.height)!=null?I:0)/2&&Math.abs(S.x-((L=e.x)!=null?L:0))>((R=e.width)!=null?R:0)/2-f)){let M=f*f*(1-E*E/(d*d));M!=0&&(M=Math.sqrt(Math.abs(M))),M=f-M,C.x-((O=e.x)!=null?O:0)>0&&(M=-M),S.x+=M}return S},s})}l(Kxe,"tiltedCylinder"),_(Kxe,"tiltedCylinder");function Xxe(t,e){return nt(this,null,function*(){var m,y,v;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(m=e.padding)!=null?m:0,i=(e.look==="neo",a),s=e.look==="neo"?a*2:a,{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=((y=e==null?void 0:e.height)!=null?y:u.height)+i,d=((v=e==null?void 0:e.width)!=null?v:u.width)+s,f=[{x:-3*h/6,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:0,y:-h}];let p;const{cssStyles:g}=e;if(e.look==="handDrawn"){const b=Sr.svg(o),w=_r(e,{}),x=kn(f),T=b.path(x,w);p=o.insert(()=>T,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),g&&p.attr("style",g)}else p=df(o,d,h,f);return n&&p.attr("style",n),e.width=d,e.height=h,Ir(e,p),e.intersect=function(b){return Tr.polygon(e,f,b)},o})}l(Xxe,"trapezoid$1"),_(Xxe,"trapezoid");function Zxe(t,e){return nt(this,null,function*(){var T,C,S;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(T=e.padding)!=null?T:0,i=e.look==="neo"?16:a,s=e.look==="neo"?12:a,o=15,u=5;(e.width||e.height)&&(e.height=((C=e.height)!=null?C:0)-s*2,e.height<u&&(e.height=u),e.width=((S=e.width)!=null?S:0)-i*2,e.width<o&&(e.width=o));const{shapeSvg:h,bbox:d}=yield qr(t,e,Fr(e)),f=(e!=null&&e.width?e==null?void 0:e.width:d.width)+i*2,p=(e!=null&&e.height?e==null?void 0:e.height:d.height)+s*2,{cssStyles:g}=e,m=Sr.svg(h),y=_r(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=[{x:-f/2*.8,y:-p/2},{x:f/2*.8,y:-p/2},{x:f/2,y:-p/2*.6},{x:f/2,y:p/2},{x:-f/2,y:p/2},{x:-f/2,y:-p/2*.6}],b=kn(v),w=m.path(b,y),x=h.insert(()=>w,":first-child");return x.attr("class","basic label-container outer-path"),g&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",g),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),Ir(e,x),e.intersect=function(E){return Tr.polygon(e,v,E)},h})}l(Zxe,"trapezoidalPentagon"),_(Zxe,"trapezoidalPentagon");var Qxe=10,Jxe=10;function ewe(t,e){return nt(this,null,function*(){var T,C,S,E,k,A,I;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(T=e.padding)!=null?T:0,i=e.look==="neo"?a*2:a;(e.width||e.height)&&(e.width=(((C=e==null?void 0:e.width)!=null?C:0)-i)/2,e.width<Jxe&&(e.width=Jxe),e.height=(S=e==null?void 0:e.height)!=null?S:0,e.height<Qxe&&(e.height=Qxe));const{shapeSvg:s,bbox:o,label:u}=yield qr(t,e,Fr(e)),h=Ph((E=ft().flowchart)==null?void 0:E.htmlLabels),d=(e!=null&&e.width?e==null?void 0:e.width:o.width)+i,f=e!=null&&e.height?e==null?void 0:e.height:d+o.height,p=f,g=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-f}],{cssStyles:m}=e,y=Sr.svg(s),v=_r(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=kn(g),w=y.path(b,v),x=s.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return m&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",m),n&&e.look!=="handDrawn"&&x.selectChildren("path").attr("style",n),e.width=d,e.height=f,Ir(e,x),u.attr("transform",`translate(${-o.width/2-(o.x-((k=o.left)!=null?k:0))}, ${f/2-(o.height+((A=e.padding)!=null?A:0)/(h?2:1)-(o.y-((I=o.top)!=null?I:0)))})`),e.intersect=function(L){return Le.info("Triangle intersect",e,g,L),Tr.polygon(e,g,L)},s})}l(ewe,"triangle"),_(ewe,"triangle");function twe(t,e){return nt(this,null,function*(){var A,I,L,R,O,M,P;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(A=e.padding)!=null?A:0,i=e.look==="neo"?16:a,s=e.look==="neo"?12:a;let o=!0;(e.width||e.height)&&(o=!1,e.width=((I=e==null?void 0:e.width)!=null?I:0)-i*2,e.width<10&&(e.width=10),e.height=((L=e==null?void 0:e.height)!=null?L:0)-s*2,e.height<10&&(e.height=10));const{shapeSvg:u,bbox:h,label:d}=yield qr(t,e,Fr(e)),f=(e!=null&&e.width?e==null?void 0:e.width:h.width)+(i!=null?i:0)*2,p=(e!=null&&e.height?e==null?void 0:e.height:h.height)+(s!=null?s:0)*2,g=e.look==="neo"?p/4:p/8,m=p+(o?g:-g),{cssStyles:y}=e,b=14-f,w=b>0?b/2:0,x=Sr.svg(u),T=_r(e,{});e.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");const C=[{x:-f/2-w,y:m/2},...J0(-f/2-w,m/2,f/2+w,m/2,g,.8),{x:f/2+w,y:-m/2},{x:-f/2-w,y:-m/2}],S=kn(C),E=x.path(S,T),k=u.insert(()=>E,":first-child");return k.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-g/2})`),d.attr("transform",`translate(${-f/2+((R=e.padding)!=null?R:0)-(h.x-((O=h.left)!=null?O:0))},${-p/2+((M=e.padding)!=null?M:0)-g-(h.y-((P=h.top)!=null?P:0))})`),Ir(e,k),e.intersect=function(z){return Tr.polygon(e,C,z)},u})}l(twe,"waveEdgedRectangle"),_(twe,"waveEdgedRectangle");function rwe(t,e){return nt(this,null,function*(){var T,C,S;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=(T=e.padding)!=null?T:0,i=e.look==="neo"?16:a,s=e.look==="neo"?20:a;if(e.width||e.height){e.width=(C=e==null?void 0:e.width)!=null?C:0,e.width<20&&(e.width=20),e.height=(S=e==null?void 0:e.height)!=null?S:0,e.height<10&&(e.height=10);const E=Math.min(e.height*.2,e.height/4);e.height=Math.ceil(e.height-s-E*2.2222222222222223),e.width=e.width-i*2}const{shapeSvg:o,bbox:u}=yield qr(t,e,Fr(e)),h=(e!=null&&e.width?e==null?void 0:e.width:u.width)+i*2,d=(e!=null&&e.height?e==null?void 0:e.height:u.height)+s,f=d/8,p=d+f*2,{cssStyles:g}=e,m=Sr.svg(o),y=_r(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const v=[{x:-h/2,y:p/2},...J0(-h/2,p/2,h/2,p/2,f,1),{x:h/2,y:-p/2},...J0(h/2,-p/2,-h/2,-p/2,f,-1)],b=kn(v),w=m.path(b,y),x=o.insert(()=>w,":first-child");return x.attr("class","basic label-container"),g&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",g),n&&e.look!=="handDrawn"&&x.selectAll("path").attr("style",n),Ir(e,x),e.intersect=function(E){return Tr.polygon(e,v,E)},o})}l(rwe,"waveRectangle"),_(rwe,"waveRectangle");var vi=10;function nwe(t,e){return nt(this,null,function*(){var S,E,k,A,I,L;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=e.look==="neo"?16:(S=e.padding)!=null?S:0,i=e.look==="neo"?12:(E=e.padding)!=null?E:0;(e.width||e.height)&&(e.width=Math.max(((k=e==null?void 0:e.width)!=null?k:0)-a*2-vi,10),e.height=Math.max(((A=e==null?void 0:e.height)!=null?A:0)-i*2-vi,10));const{shapeSvg:s,bbox:o,label:u}=yield qr(t,e,Fr(e)),h=(e!=null&&e.width?e==null?void 0:e.width:o.width)+a*2+vi,d=(e!=null&&e.height?e==null?void 0:e.height:o.height)+i*2+vi,f=h-vi,p=d-vi,g=-f/2,m=-p/2,{cssStyles:y}=e,v=Sr.svg(s),b=_r(e,{}),w=[{x:g-vi,y:m-vi},{x:g-vi,y:m+p},{x:g+f,y:m+p},{x:g+f,y:m-vi}],x=`M${g-vi},${m-vi} L${g+f},${m-vi} L${g+f},${m+p} L${g-vi},${m+p} L${g-vi},${m-vi}
|
||
M${g-vi},${m} L${g+f},${m}
|
||
M${g},${m-vi} L${g},${m+p}`;e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const T=v.path(x,b),C=s.insert(()=>T,":first-child");return C.attr("transform",`translate(${vi/2}, ${vi/2})`),C.attr("class","basic label-container outer-path"),y&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",y),n&&e.look!=="handDrawn"&&C.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(o.width/2)+vi/2-(o.x-((I=o.left)!=null?I:0))}, ${-(o.height/2)+vi/2-(o.y-((L=o.top)!=null?L:0))})`),Ir(e,C),e.intersect=function(R){return Tr.polygon(e,w,R)},s})}l(nwe,"windowPane"),_(nwe,"windowPane");var awe=new Set(["redux-color","redux-dark-color"]),_7t=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);function eV(t,e){return nt(this,null,function*(){var Z,K,re,Q,te,ee,J,ae,se;const r=e;r.alias&&(e.label=r.alias);const{theme:n,themeVariables:a}=Ar(),{rowEven:i,rowOdd:s,nodeBorder:o,borderColorArray:u}=a;if(e.look==="handDrawn"){const{themeVariables:fe}=Ar(),{background:ve}=fe,de=Ne(X({},e),{id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ve}`]});yield eV(t,de)}const h=Ar();e.useHtmlLabels=h.htmlLabels;let d=(K=(Z=h.er)==null?void 0:Z.diagramPadding)!=null?K:10,f=(Q=(re=h.er)==null?void 0:re.entityPadding)!=null?Q:6;const{cssStyles:p}=e,{labelStyles:g,nodeStyles:m}=Er(e);if(r.attributes.length===0&&e.label){const fe={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5};Qo(e.label,h)+fe.labelPaddingX*2<h.er.minEntityWidth&&(e.width=h.er.minEntityWidth);const ve=yield Vw(t,e,fe);if(n!=null&&awe.has(n)){const de=(te=r.colorIndex)!=null?te:0;ve.attr("data-color-id",`color-${de%u.length}`)}if(!Ph(h.htmlLabels)){const de=ve.select("text"),Ee=(ee=de.node())==null?void 0:ee.getBBox();de.attr("transform",`translate(${-Ee.width/2}, 0)`)}return ve}h.htmlLabels||(d*=1.25,f*=1.25);let y=Fr(e);y||(y="node default");const v=t.insert("g").attr("class",y).attr("id",e.domId||e.id),b=yield qw(v,(J=e.label)!=null?J:"",h,0,0,["name"],g);b.height+=f;let w=0;const x=[],T=[];let C=0,S=0,E=0,k=0,A=!0,I=!0;for(const fe of r.attributes){const ve=yield qw(v,fe.type,h,0,w,["attribute-type"],g);C=Math.max(C,ve.width+d);const de=yield qw(v,fe.name,h,0,w,["attribute-name"],g);S=Math.max(S,de.width+d);const Ee=yield qw(v,fe.keys.join(),h,0,w,["attribute-keys"],g);E=Math.max(E,Ee.width+d);const Ce=yield qw(v,fe.comment,h,0,w,["attribute-comment"],g);k=Math.max(k,Ce.width+d);const De=Math.max(ve.height,de.height,Ee.height,Ce.height)+f;T.push({yOffset:w,rowHeight:De}),w+=De}let L=4;E<=d&&(A=!1,E=0,L--),k<=d&&(I=!1,k=0,L--);const R=v.node().getBBox();if(b.width+d*2-(C+S+E+k)>0){const fe=b.width+d*2-(C+S+E+k);C+=fe/L,S+=fe/L,E>0&&(E+=fe/L),k>0&&(k+=fe/L)}const O=C+S+E+k,M=Sr.svg(v),P=_r(e,{});e.look!=="handDrawn"&&(P.roughness=0,P.fillStyle="solid");let z=0;T.length>0&&(z=T.reduce((fe,ve)=>{var de;return fe+((de=ve==null?void 0:ve.rowHeight)!=null?de:0)},0));const D=Math.max(R.width+d*2,(e==null?void 0:e.width)||0,O),B=Math.max((z!=null?z:0)+b.height,(e==null?void 0:e.height)||0),W=-D/2,U=-B/2;if(v.selectAll("g:not(:first-child)").each((fe,ve,de)=>{const Ee=Yt(de[ve]),Ce=Ee.attr("transform");let De=0,ce=0;if(Ce){const ye=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ce);ye&&(De=parseFloat(ye[1]),ce=parseFloat(ye[2]),Ee.attr("class").includes("attribute-name")?De+=C:Ee.attr("class").includes("attribute-keys")?De+=C+S:Ee.attr("class").includes("attribute-comment")&&(De+=C+S+E))}Ee.attr("transform",`translate(${W+d/2+De}, ${ce+U+b.height+f/2})`)}),v.select(".name").attr("transform","translate("+-b.width/2+", "+(U+f/2)+")"),n!=null&&awe.has(n)){const fe=(ae=r.colorIndex)!=null?ae:0;v.attr("data-color-id",`color-${fe%u.length}`)}const j=M.rectangle(W,U,D,B,P),V=v.insert(()=>j,":first-child").attr("class","outer-path").attr("style",p.join(""));x.push(0);for(const[fe,ve]of T.entries()){const Ee=(fe+1)%2===0&&ve.yOffset!==0,Ce=M.rectangle(W,b.height+U+(ve==null?void 0:ve.yOffset),D,ve==null?void 0:ve.rowHeight,Ne(X({},P),{fill:Ee?i:s,stroke:o}));v.insert(()=>Ce,"g.label").attr("style",p.join("")).attr("class",`row-rect-${Ee?"even":"odd"}`)}const Y=1e-4;let H=Yw(W,b.height+U,D+W,b.height+U,Y),q=M.polygon(H.map(fe=>[fe.x,fe.y]),P);if(v.insert(()=>q).attr("class","divider"),H=Yw(C+W,b.height+U,C+W,B+U,Y),q=M.polygon(H.map(fe=>[fe.x,fe.y]),P),v.insert(()=>q).attr("class","divider"),A){const fe=C+S+W;H=Yw(fe,b.height+U,fe,B+U,Y),q=M.polygon(H.map(ve=>[ve.x,ve.y]),P),v.insert(()=>q).attr("class","divider")}if(I){const fe=C+S+E+W;H=Yw(fe,b.height+U,fe,B+U,Y),q=M.polygon(H.map(ve=>[ve.x,ve.y]),P),v.insert(()=>q).attr("class","divider")}for(const fe of x){const ve=b.height+U+fe;H=Yw(W,ve,D+W,ve,Y),q=M.polygon(H.map(de=>[de.x,de.y]),P),v.insert(()=>q).attr("class","divider")}if(Ir(e,V),m&&e.look!=="handDrawn")if(n!=null&&_7t.has(n))v.selectAll("path").attr("style",m);else{const fe=m.split(";"),ve=(se=fe==null?void 0:fe.filter(de=>de.includes("stroke")))==null?void 0:se.map(de=>`${de}`).join("; ");v.selectAll("path").attr("style",ve!=null?ve:""),v.selectAll(".row-rect-even path").attr("style",m)}return e.intersect=function(fe){return Tr.rect(e,fe)},v})}l(eV,"erBox"),_(eV,"erBox");function qw(o,u,h){return nt(this,arguments,function*(t,e,r,n=0,a=0,i=[],s=""){const d=t.insert("g").attr("class",`label ${i.join(" ")}`).attr("transform",`translate(${n}, ${a})`).attr("style",s);e!==U0(e)&&(e=U0(e),e=e.replaceAll("<","<").replaceAll(">",">"));const f=d.node().appendChild(yield Oo(d,e,{width:Qo(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let g=f.children[0];for(g.textContent=g.textContent.replaceAll("<","<").replaceAll(">",">");g.childNodes[0];)g=g.childNodes[0],g.textContent=g.textContent.replaceAll("<","<").replaceAll(">",">")}let p=f.getBBox();if(Ph(r.htmlLabels)){const g=f.children[0];g.style.textAlign="start";const m=Yt(f);p=g.getBoundingClientRect(),m.attr("width",p.width),m.attr("height",p.height)}return p})}l(qw,"addText"),_(qw,"addText");function Yw(t,e,r,n,a){return t===r?[{x:t-a/2,y:e},{x:t+a/2,y:e},{x:r+a/2,y:n},{x:r-a/2,y:n}]:[{x:t,y:e-a/2},{x:t,y:e+a/2},{x:r,y:n+a/2},{x:r,y:n-a/2}]}l(Yw,"lineToPolygon"),_(Yw,"lineToPolygon");function iwe(s,o,u,h){return nt(this,arguments,function*(t,e,r,n,a=(i=>(i=r.class.padding)!=null?i:12)()){const d=n?0:3,f=t.insert("g").attr("class",Fr(e)).attr("id",e.domId||e.id);let p=null,g=null,m=null,y=null,v=0,b=0,w=0;if(p=f.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const E=e.annotations[0];yield x3(p,{text:`«${E}»`},0),v=p.node().getBBox().height}g=f.insert("g").attr("class","label-group text"),yield x3(g,e,0,["font-weight: bolder"]);const x=g.node().getBBox();b=x.height,m=f.insert("g").attr("class","members-group text");let T=0;for(const E of e.members){const k=yield x3(m,E,T,[E.parseClassifier()]);T+=k+d}w=m.node().getBBox().height,w<=0&&(w=a/2),y=f.insert("g").attr("class","methods-group text");let C=0;for(const E of e.methods){const k=yield x3(y,E,C,[E.parseClassifier()]);C+=k+d}let S=f.node().getBBox();if(p!==null){const E=p.node().getBBox();p.attr("transform",`translate(${-E.width/2})`)}return g.attr("transform",`translate(${-x.width/2}, ${v})`),S=f.node().getBBox(),m.attr("transform",`translate(0, ${v+b+a*2})`),S=f.node().getBBox(),y.attr("transform",`translate(0, ${v+b+(w?w+a*4:a*2)})`),S=f.node().getBBox(),{shapeSvg:f,bbox:S}})}l(iwe,"textHelper"),_(iwe,"textHelper");function x3(a,i,s){return nt(this,arguments,function*(t,e,r,n=[]){var m;const o=t.insert("g").attr("class","label").attr("style",n.join("; ")),u=Ar();let h="useHtmlLabels"in e?e.useHtmlLabels:(m=Ph(u.htmlLabels))!=null?m:!0,d="";"text"in e?d=e.text:d=e.label,!h&&d.startsWith("\\")&&(d=d.substring(1)),Mi(d)&&(h=!0);const f=yield Oo(o,Fz(uf(d)),{width:Qo(d,u)+50,classes:"markdown-node-label",useHtmlLabels:h},u);let p,g=1;if(h){const y=f.children[0],v=Yt(f);g=y.innerHTML.split("<br>").length,y.innerHTML.includes("</math>")&&(g+=y.innerHTML.split("<mrow>").length-1);const b=y.getElementsByTagName("img");if(b){const w=d.replace(/<img[^>]*>/g,"").trim()==="";yield Promise.all([...b].map(x=>new Promise(T=>{function C(){var S,E;if(x.style.display="flex",x.style.flexDirection="column",w){const k=(E=(S=u.fontSize)==null?void 0:S.toString())!=null?E:window.getComputedStyle(document.body).fontSize,I=parseInt(k,10)*5+"px";x.style.minWidth=I,x.style.maxWidth=I}else x.style.width="100%";T(x)}l(C,"setupImage"),_(C,"setupImage"),setTimeout(()=>{x.complete&&C()}),x.addEventListener("error",C),x.addEventListener("load",C)})))}p=y.getBoundingClientRect(),v.attr("width",p.width),v.attr("height",p.height)}else{n.includes("font-weight: bolder")&&Yt(f).selectAll("tspan").attr("font-weight",""),g=f.children.length;const y=f.children[0];(f.textContent===""||f.textContent.includes(">"))&&(y.textContent=d[0]+d.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),d[1]===" "&&(y.textContent=y.textContent[0]+" "+y.textContent.substring(1))),y.textContent==="undefined"&&(y.textContent=""),p=f.getBBox()}return o.attr("transform","translate(0,"+(-p.height/(2*g)+r)+")"),p.height})}l(x3,"addText2"),_(x3,"addText");function swe(t,e){return nt(this,null,function*(){var M,P,z,D,B,W,U,j,V,Y,H;const r=ft(),{themeVariables:n}=r,{useGradient:a}=n,i=(M=r.class.padding)!=null?M:12,s=i,o=(z=(P=e.useHtmlLabels)!=null?P:Ph(r.htmlLabels))!=null?z:!0,u=e;u.annotations=(D=u.annotations)!=null?D:[],u.members=(B=u.members)!=null?B:[],u.methods=(W=u.methods)!=null?W:[];const{shapeSvg:h,bbox:d}=yield iwe(t,e,r,o,s),{labelStyles:f,nodeStyles:p}=Er(e);e.labelStyle=f,e.cssStyles=u.styles||"";const g=((U=u.styles)==null?void 0:U.join(";"))||p||"";e.cssStyles||(e.cssStyles=g.replaceAll("!important","").split(";"));const m=u.members.length===0&&u.methods.length===0&&!((j=r.class)!=null&&j.hideEmptyMembersBox),y=Sr.svg(h),v=_r(e,{});e.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const b=Math.max((V=e.width)!=null?V:0,d.width);let w=Math.max((Y=e.height)!=null?Y:0,d.height);const x=((H=e.height)!=null?H:0)>d.height;u.members.length===0&&u.methods.length===0?w+=s:u.members.length>0&&u.methods.length===0&&(w+=s*2);const T=-b/2,C=-w/2;let S=m?i*2:u.members.length===0&&u.methods.length===0?-i:0;x&&(S=i*2);const E=y.rectangle(T-i,C-i-(m?i:u.members.length===0&&u.methods.length===0?-i/2:0),b+2*i,w+2*i+S,v),k=h.insert(()=>E,":first-child");k.attr("class","basic label-container outer-path");const A=k.node().getBBox(),I=h.select(".annotation-group").node().getBBox().height-(m?i/2:0)||0,L=h.select(".label-group").node().getBBox().height-(m?i/2:0)||0,R=h.select(".members-group").node().getBBox().height-(m?i/2:0)||0,O=(I+L+C+i-(C-i-(m?i:u.members.length===0&&u.methods.length===0?-i/2:0)))/2;if(h.selectAll(".text").each((q,Z,K)=>{var ae,se;const re=Yt(K[Z]),Q=re.attr("transform");let te=0;if(Q){const ve=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Q);ve&&(te=parseFloat(ve[2]))}let ee=te+C+i-(m?i:u.members.length===0&&u.methods.length===0?-i/2:0);if(re.attr("class").includes("methods-group")){const fe=Math.max(R,s/2);x?ee=Math.max(O,I+L+fe+C+s*2+i)+s*2:ee=I+L+fe+C+s*4+i}u.members.length===0&&u.methods.length===0&&((ae=r.class)!=null&&ae.hideEmptyMembersBox)&&(u.annotations.length>0?ee=te-s:ee=te),o||(ee-=4);let J=T;(re.attr("class").includes("label-group")||re.attr("class").includes("annotation-group"))&&(J=-((se=re.node())==null?void 0:se.getBBox().width)/2||0,h.selectAll("text").each(function(fe,ve,de){window.getComputedStyle(de[ve]).textAnchor==="middle"&&(J=0)})),re.attr("transform",`translate(${J}, ${ee})`)}),u.members.length>0||u.methods.length>0||m){const q=I+L+C+i,Z=y.line(A.x,q,A.x+A.width,q+.001,v);h.insert(()=>Z).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",g)}if(m||u.members.length>0||u.methods.length>0){const q=I+L+R+C+s*2+i,Z=y.line(A.x,x?Math.max(O,q):q,A.x+A.width,(x?Math.max(O,q):q)+.001,v);h.insert(()=>Z).attr("class",`divider${e.look==="neo"&&!a?" neo-line":""}`).attr("style",g)}if(u.look!=="handDrawn"&&h.selectAll("path").attr("style",g),k.select(":nth-child(2)").attr("style",g),h.selectAll(".divider").select("path").attr("style",g),e.labelStyle?h.selectAll("span").attr("style",e.labelStyle):h.selectAll("span").attr("style",g),!o){const q=RegExp(/color\s*:\s*([^;]*)/),Z=q.exec(g);if(Z){const K=Z[0].replace("color","fill");h.selectAll("tspan").attr("style",K)}else if(f){const K=q.exec(f);if(K){const re=K[0].replace("color","fill");h.selectAll("tspan").attr("style",re)}}}return Ir(e,k),e.intersect=function(q){return Tr.rect(e,q)},h})}l(swe,"classBox"),_(swe,"classBox");function owe(t,e){return nt(this,null,function*(){var A,I,L,R,O,M;const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const a=e,i=e,s=20,o=20,u="verifyMethod"in e,h=Fr(e),{themeVariables:d}=ft(),{borderColorArray:f,requirementEdgeLabelBackground:p}=d,g=t.insert("g").attr("class",h).attr("id",(A=e.domId)!=null?A:e.id);let m;u?m=yield Hh(g,`<<${a.type}>>`,0,e.labelStyle):m=yield Hh(g,"<<Element>>",0,e.labelStyle);let y=m;const v=yield Hh(g,a.name,y,e.labelStyle+"; font-weight: bold;");if(y+=v+o,u){const P=yield Hh(g,`${a.requirementId?`ID: ${a.requirementId}`:""}`,y,e.labelStyle);y+=P;const z=yield Hh(g,`${a.text?`Text: ${a.text}`:""}`,y,e.labelStyle);y+=z;const D=yield Hh(g,`${a.risk?`Risk: ${a.risk}`:""}`,y,e.labelStyle);y+=D,yield Hh(g,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:""}`,y,e.labelStyle)}else{const P=yield Hh(g,`${i.type?`Type: ${i.type}`:""}`,y,e.labelStyle);y+=P,yield Hh(g,`${i.docRef?`Doc Ref: ${i.docRef}`:""}`,y,e.labelStyle)}const b=((L=(I=g.node())==null?void 0:I.getBBox().width)!=null?L:200)+s,w=((O=(R=g.node())==null?void 0:R.getBBox().height)!=null?O:200)+s,x=-b/2,T=-w/2,C=Sr.svg(g),S=_r(e,{});e.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const E=C.rectangle(x,T,b,w,S),k=g.insert(()=>E,":first-child");if(k.attr("class","basic label-container outer-path").attr("style",n),f!=null&&f.length){const P=(M=e.colorIndex)!=null?M:0;g.attr("data-color-id",`color-${P%f.length}`)}if(g.selectAll(".label").each((P,z,D)=>{const B=Yt(D[z]),W=B.attr("transform");let U=0,j=0;if(W){const q=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(W);q&&(U=parseFloat(q[1]),j=parseFloat(q[2]))}const V=j-w/2;let Y=x+s/2;(z===0||z===1)&&(Y=U),B.attr("transform",`translate(${Y}, ${V+s})`)}),y>m+v+o){const P=T+m+v+o;let z;if(e.look==="neo"){const W=[[x,P],[x+b,P],[x+b,P+.001],[x,P+.001]];z=C.polygon(W,S)}else z=C.line(x,P,x+b,P,S);g.insert(()=>z).attr("class","divider")}return Ir(e,k),e.intersect=function(P){return Tr.rect(e,P)},n&&e.look!=="handDrawn"&&(p||f!=null&&f.length)&&g.selectAll("path").attr("style",n),g})}l(owe,"requirementBox"),_(owe,"requirementBox");function Hh(t,e,r,n=""){return nt(this,null,function*(){var h;if(e==="")return 0;const a=t.insert("g").attr("class","label").attr("style",n),i=ft(),s=(h=i.htmlLabels)!=null?h:!0,o=yield Oo(a,Fz(uf(e)),{width:Qo(e,i)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},i);let u;if(s){const d=o.children[0],f=Yt(o);u=d.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{const d=o.children[0];for(const f of d.children)n&&f.setAttribute("style",n);u=o.getBBox(),u.height+=6}return a.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height})}l(Hh,"addText3"),_(Hh,"addText");var k7t=_(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");function lwe(n,a,i){return nt(this,arguments,function*(t,e,{config:r}){var P,z,D;const{labelStyles:s,nodeStyles:o}=Er(e);e.labelStyle=s||"";const u=10,h=e.width;e.width=((P=e.width)!=null?P:200)-10;const{shapeSvg:d,bbox:f,label:p}=yield qr(t,e,Fr(e)),g=e.padding||10;let m="",y;"ticket"in e&&e.ticket&&((z=r==null?void 0:r.kanban)!=null&&z.ticketBaseUrl)&&(m=(D=r==null?void 0:r.kanban)==null?void 0:D.ticketBaseUrl.replace("#TICKET#",e.ticket),y=d.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank"));const v={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let b,w;y?{label:b,bbox:w}=yield jW(y,"ticket"in e&&e.ticket||"",v):{label:b,bbox:w}=yield jW(d,"ticket"in e&&e.ticket||"",v);const{label:x,bbox:T}=yield jW(d,"assigned"in e&&e.assigned||"",v);e.width=h;const C=10,S=(e==null?void 0:e.width)||0,E=Math.max(w.height,T.height)/2,k=Math.max(f.height+C*2,(e==null?void 0:e.height)||0)+E,A=-S/2,I=-k/2;p.attr("transform","translate("+(g-S/2)+", "+(-E-f.height/2)+")"),b.attr("transform","translate("+(g-S/2)+", "+(-E+f.height/2)+")"),x.attr("transform","translate("+(g+S/2-T.width-2*u)+", "+(-E+f.height/2)+")");let L;const{rx:R,ry:O}=e,{cssStyles:M}=e;if(e.look==="handDrawn"){const B=Sr.svg(d),W=_r(e,{}),U=R||O?B.path(tp(A,I,S,k,R||0),W):B.rectangle(A,I,S,k,W);L=d.insert(()=>U,":first-child"),L.attr("class","basic label-container").attr("style",M||null)}else{L=d.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",o).attr("rx",R!=null?R:5).attr("ry",O!=null?O:5).attr("x",A).attr("y",I).attr("width",S).attr("height",k);const B="priority"in e&&e.priority;if(B){const W=d.append("line"),U=A+2,j=I+Math.floor((R!=null?R:0)/2),V=I+k-Math.floor((R!=null?R:0)/2);W.attr("x1",U).attr("y1",j).attr("x2",U).attr("y2",V).attr("stroke-width","4").attr("stroke",k7t(B))}}return Ir(e,L),e.height=k,e.intersect=function(B){return Tr.rect(e,B)},d})}l(lwe,"kanbanItem"),_(lwe,"kanbanItem");function cwe(t,e){return nt(this,null,function*(){const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i,halfPadding:s,label:o}=yield qr(t,e,Fr(e)),u=i.width+10*s,h=i.height+8*s,d=.15*u,{cssStyles:f}=e,p=i.width+20,g=i.height+20,m=Math.max(u,p),y=Math.max(h,g);o.attr("transform",`translate(${-i.width/2}, ${-i.height/2})`);let v;const b=`M0 0
|
||
a${d},${d} 1 0,0 ${m*.25},${-1*y*.1}
|
||
a${d},${d} 1 0,0 ${m*.25},0
|
||
a${d},${d} 1 0,0 ${m*.25},0
|
||
a${d},${d} 1 0,0 ${m*.25},${y*.1}
|
||
|
||
a${d},${d} 1 0,0 ${m*.15},${y*.33}
|
||
a${d*.8},${d*.8} 1 0,0 0,${y*.34}
|
||
a${d},${d} 1 0,0 ${-1*m*.15},${y*.33}
|
||
|
||
a${d},${d} 1 0,0 ${-1*m*.25},${y*.15}
|
||
a${d},${d} 1 0,0 ${-1*m*.25},0
|
||
a${d},${d} 1 0,0 ${-1*m*.25},0
|
||
a${d},${d} 1 0,0 ${-1*m*.25},${-1*y*.15}
|
||
|
||
a${d},${d} 1 0,0 ${-1*m*.1},${-1*y*.33}
|
||
a${d*.8},${d*.8} 1 0,0 0,${-1*y*.34}
|
||
a${d},${d} 1 0,0 ${m*.1},${-1*y*.33}
|
||
H0 V0 Z`;if(e.look==="handDrawn"){const w=Sr.svg(a),x=_r(e,{}),T=w.path(b,x);v=a.insert(()=>T,":first-child"),v.attr("class","basic label-container").attr("style",Ms(f))}else v=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",b);return v.attr("transform",`translate(${-m/2}, ${-y/2})`),Ir(e,v),e.calcIntersect=function(w,x){return Tr.rect(w,x)},e.intersect=function(w){return Le.info("Bang intersect",e,w),Tr.rect(e,w)},a})}l(cwe,"bang"),_(cwe,"bang");function uwe(t,e){return nt(this,null,function*(){const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i,halfPadding:s,label:o}=yield qr(t,e,Fr(e)),u=i.width+2*s,h=i.height+2*s,d=.15*u,f=.25*u,p=.35*u,g=.2*u,{cssStyles:m}=e;let y;const v=`M0 0
|
||
a${d},${d} 0 0,1 ${u*.25},${-1*u*.1}
|
||
a${p},${p} 1 0,1 ${u*.4},${-1*u*.1}
|
||
a${f},${f} 1 0,1 ${u*.35},${u*.2}
|
||
|
||
a${d},${d} 1 0,1 ${u*.15},${h*.35}
|
||
a${g},${g} 1 0,1 ${-1*u*.15},${h*.65}
|
||
|
||
a${f},${d} 1 0,1 ${-1*u*.25},${u*.15}
|
||
a${p},${p} 1 0,1 ${-1*u*.5},0
|
||
a${d},${d} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
||
|
||
a${d},${d} 1 0,1 ${-1*u*.1},${-1*h*.35}
|
||
a${g},${g} 1 0,1 ${u*.1},${-1*h*.65}
|
||
H0 V0 Z`;if(e.look==="handDrawn"){const b=Sr.svg(a),w=_r(e,{}),x=b.path(v,w);y=a.insert(()=>x,":first-child"),y.attr("class","basic label-container").attr("style",Ms(m))}else y=a.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",v);return o.attr("transform",`translate(${-i.width/2}, ${-i.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),Ir(e,y),e.calcIntersect=function(b,w){return Tr.rect(b,w)},e.intersect=function(b){return Le.info("Cloud intersect",e,b),Tr.rect(e,b)},a})}l(uwe,"cloud"),_(uwe,"cloud");function hwe(t,e){return nt(this,null,function*(){const{labelStyles:r,nodeStyles:n}=Er(e);e.labelStyle=r;const{shapeSvg:a,bbox:i,halfPadding:s,label:o}=yield qr(t,e,Fr(e)),u=i.width+8*s,h=i.height+2*s,d=5,f=e.look==="neo"?`
|
||
M${-u/2} ${h/2-d}
|
||
v${-h+2*d}
|
||
q0,-${d} ${d},-${d}
|
||
h${u-2*d}
|
||
q${d},0 ${d},${d}
|
||
v${h-d}
|
||
H${-u/2}
|
||
Z
|
||
`:`
|
||
M${-u/2} ${h/2-d}
|
||
v${-h+2*d}
|
||
q0,-${d} ${d},-${d}
|
||
h${u-2*d}
|
||
q${d},0 ${d},${d}
|
||
v${h-2*d}
|
||
q0,${d} ${-d},${d}
|
||
h${-(u-2*d)}
|
||
q${-d},0 ${-d},${-d}
|
||
Z
|
||
`;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",f);return a.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),o.attr("transform",`translate(${-i.width/2}, ${-i.height/2})`),a.append(()=>o.node()),Ir(e,p),e.calcIntersect=function(g,m){return Tr.rect(g,m)},e.intersect=function(g){return Tr.rect(e,g)},a})}l(hwe,"defaultMindmapNode"),_(hwe,"defaultMindmapNode");function dwe(t,e){return nt(this,null,function*(){var n;const r={padding:(n=e.padding)!=null?n:0};return QW(t,e,r)})}l(dwe,"mindmapCircle"),_(dwe,"mindmapCircle");var A7t=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Fxe},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Rxe},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Bxe},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Vxe},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:nxe},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:axe},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:QW},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:cwe},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:uwe},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:$xe},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:fxe},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Exe},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Txe},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Xxe},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:xxe},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:sxe},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Yxe},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Ube},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Oxe},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Wxe},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Hxe},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:hxe},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:pxe},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Zbe},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Qbe},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Jbe},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Cxe},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:twe},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:dxe},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Kxe},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:kxe},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:exe},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ixe},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ewe},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:nwe},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:oxe},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Zxe},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:uxe},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Dxe},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Ixe},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Nxe},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ybe},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Xbe},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:qxe},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Gxe},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:rwe},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Mxe},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Axe}],N7t=_(()=>{const e=[...Object.entries({state:zxe,choice:jbe,note:Lxe,rectWithTitle:Pxe,labelRect:wxe,iconSquare:vxe,iconCircle:mxe,icon:gxe,iconRounded:yxe,imageSquare:bxe,anchor:Gbe,kanbanItem:lwe,mindmapCircle:dwe,defaultMindmapNode:hwe,classBox:swe,erBox:eV,requirementBox:owe}),...A7t.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(a=>[a,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),fwe=N7t();function pwe(t){return t in fwe}l(pwe,"isValidShape"),_(pwe,"isValidShape");var J7=new Map;function w3(t,e,r){return nt(this,null,function*(){let n,a;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const i=e.shape?fwe[e.shape]:void 0;if(!i)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s!=null?s:null),a=yield i(n,e,r)}else a=yield i(t,e,r),n=a;return n.attr("data-look",Ms(e.look)),e.tooltip&&a.attr("title",e.tooltip),J7.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n})}l(w3,"insertNode$1"),_(w3,"insertNode");var I7t=_((t,e)=>{J7.set(e.id,t)},"setNodeElem"),gwe=_(()=>{J7.clear()},"clear"),eN=_(t=>{const e=J7.get(t.id);Le.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode"),Wh=_((t,e)=>{var a,i;if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=(a=t.x)!=null?a:0,n=(i=t.y)!=null?i:0;return"translate("+-(r+t.width/2)+", "+-(n+t.height/2)+")"},"computeLabelTransform"),Ps={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},mwe={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function T3(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=ei(t),e=ei(e);const[r,n]=[t.x,t.y],[a,i]=[e.x,e.y],s=a-r,o=i-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}l(T3,"calculateDeltaAndAngle$1"),_(T3,"calculateDeltaAndAngle");var ei=_(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),ywe=_(t=>({x:_(function(e,r,n){let a=0;const i=ei(n[0]).x<ei(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ps,t.arrowTypeStart)){const{angle:g,deltaX:m}=T3(n[0],n[1]);a=Ps[t.arrowTypeStart]*Math.cos(g)*(m>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Ps,t.arrowTypeEnd)){const{angle:g,deltaX:m}=T3(n[n.length-1],n[n.length-2]);a=Ps[t.arrowTypeEnd]*Math.cos(g)*(m>=0?1:-1)}const s=Math.abs(ei(e).x-ei(n[n.length-1]).x),o=Math.abs(ei(e).y-ei(n[n.length-1]).y),u=Math.abs(ei(e).x-ei(n[0]).x),h=Math.abs(ei(e).y-ei(n[0]).y),d=Ps[t.arrowTypeStart],f=Ps[t.arrowTypeEnd],p=1;if(s<f&&s>0&&o<f){let g=f+p-s;g*=i==="right"?-1:1,a-=g}if(u<d&&u>0&&h<d){let g=d+p-u;g*=i==="right"?-1:1,a+=g}return ei(e).x+a},"x"),y:_(function(e,r,n){let a=0;const i=ei(n[0]).y<ei(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ps,t.arrowTypeStart)){const{angle:g,deltaY:m}=T3(n[0],n[1]);a=Ps[t.arrowTypeStart]*Math.abs(Math.sin(g))*(m>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Ps,t.arrowTypeEnd)){const{angle:g,deltaY:m}=T3(n[n.length-1],n[n.length-2]);a=Ps[t.arrowTypeEnd]*Math.abs(Math.sin(g))*(m>=0?1:-1)}const s=Math.abs(ei(e).y-ei(n[n.length-1]).y),o=Math.abs(ei(e).x-ei(n[n.length-1]).x),u=Math.abs(ei(e).y-ei(n[0]).y),h=Math.abs(ei(e).x-ei(n[0]).x),d=Ps[t.arrowTypeStart],f=Ps[t.arrowTypeEnd],p=1;if(s<f&&s>0&&o<f){let g=f+p-s;g*=i==="up"?-1:1,a-=g}if(u<d&&u>0&&h<d){let g=d+p-u;g*=i==="up"?-1:1,a+=g}return ei(e).y+a},"y")}),"getLineFunctionsWithOffset"),L7t=_((t,e,r,n,a,i=!1,s)=>{e.arrowTypeStart&&vwe(t,"start",e.arrowTypeStart,r,n,a,i,s),e.arrowTypeEnd&&vwe(t,"end",e.arrowTypeEnd,r,n,a,i,s)},"addEdgeMarkers"),$7t={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},M7t=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],vwe=_((t,e,r,n,a,i,s=!1,o)=>{var m;const u=$7t[r],h=u&&M7t.includes(u.type);if(!u){Le.warn(`Unknown arrow type: ${r}`);return}const d=u.type,g=`${a}_${i}-${d}${e==="start"?"Start":"End"}${s&&h?"-margin":""}`;if(o&&o.trim()!==""){const y=o.replace(/[^\dA-Za-z]/g,"_"),v=`${g}_${y}`;if(!document.getElementById(v)){const b=document.getElementById(g);if(b){const w=b.cloneNode(!0);w.id=v,w.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",o),u.fill&&T.setAttribute("fill",o)}),(m=b.parentNode)==null||m.appendChild(w)}}t.attr(`marker-${e}`,`url(${n}#${v})`)}else t.attr(`marker-${e}`,`url(${n}#${g})`)},"addEdgeMarker"),P7t=_(t=>{var e,r;return typeof t=="string"?t:(r=(e=ft())==null?void 0:e.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),E3=new Map,Oi=new Map,bwe=_(()=>{E3.clear(),Oi.clear()},"clear"),C3=_(t=>t?typeof t=="string"?t:t.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),tN=_((t,e)=>nt(this,null,function*(){const r=ft();let n=ta(r);const{labelStyles:a}=Er(e);e.labelStyle=a;const i=t.insert("g").attr("class","edgeLabel"),s=i.insert("g").attr("class","label").attr("data-id",e.id),o=e.labelType==="markdown",h=yield Oo(t,e.label,{style:C3(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);s.node().appendChild(h),Le.info("abc82",e,e.labelType);let d=h.getBBox(),f=d;if(n){const g=h.children[0],m=Yt(h);d=g.getBoundingClientRect(),f=d,m.attr("width",d.width),m.attr("height",d.height)}else{const g=Yt(h).select("text").node();g&&typeof g.getBBox=="function"&&(f=g.getBBox())}s.attr("transform",Wh(f,n)),E3.set(e.id,i),e.width=d.width,e.height=d.height;let p;if(e.startLabelLeft){const g=t.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=yield ep(m,e.startLabelLeft,C3(e.labelStyle)||"",!1,!1);p=y;let v=y.getBBox();if(n){const b=y.children[0],w=Yt(y);v=b.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)}m.attr("transform",Wh(v,n)),Oi.get(e.id)||Oi.set(e.id,{}),Oi.get(e.id).startLeft=g,S3(p,e.startLabelLeft)}if(e.startLabelRight){const g=t.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=yield ep(m,e.startLabelRight,C3(e.labelStyle)||"",!1,!1);p=y;let v=y.getBBox();if(n){const b=y.children[0],w=Yt(y);v=b.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)}m.attr("transform",Wh(v,n)),Oi.get(e.id)||Oi.set(e.id,{}),Oi.get(e.id).startRight=g,S3(p,e.startLabelRight)}if(e.endLabelLeft){const g=t.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=yield ep(g,e.endLabelLeft,C3(e.labelStyle)||"",!1,!1);p=y;let v=y.getBBox();if(n){const b=y.children[0],w=Yt(y);v=b.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)}m.attr("transform",Wh(v,n)),Oi.get(e.id)||Oi.set(e.id,{}),Oi.get(e.id).endLeft=g,S3(p,e.endLabelLeft)}if(e.endLabelRight){const g=t.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=yield ep(g,e.endLabelRight,C3(e.labelStyle)||"",!1,!1);p=y;let v=y.getBBox();if(n){const b=y.children[0],w=Yt(y);v=b.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)}m.attr("transform",Wh(v,n)),Oi.get(e.id)||Oi.set(e.id,{}),Oi.get(e.id).endRight=g,S3(p,e.endLabelRight)}return h}),"insertEdgeLabel");function S3(t,e){ta(ft())&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}l(S3,"setTerminalWidth$1"),_(S3,"setTerminalWidth");var xwe=_((t,e)=>{Le.debug("Moving label abc88 ",t.id,t.label,E3.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=ft(),{subGraphTitleTotalMargin:a}=zw(n);if(t.label){const i=E3.get(t.id);let s=t.x,o=t.y;if(r){const u=Wr.calcLabelPosition(r);Le.debug("Moving label "+t.label+" from (",s,",",o,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(s=u.x,o=u.y)}i.attr("transform",`translate(${s}, ${o+a/2})`)}if(t.startLabelLeft){const i=Oi.get(t.id).startLeft;let s=t.x,o=t.y;if(r){const u=Wr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=u.x,o=u.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){const i=Oi.get(t.id).startRight;let s=t.x,o=t.y;if(r){const u=Wr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=u.x,o=u.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){const i=Oi.get(t.id).endLeft;let s=t.x,o=t.y;if(r){const u=Wr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=u.x,o=u.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){const i=Oi.get(t.id).endRight;let s=t.x,o=t.y;if(r){const u=Wr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,o=u.y}i.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),R7t=_((t,e)=>{var s;if(!(t!=null&&t.isLabelEdge)||!((s=t==null?void 0:t.id)!=null&&s.endsWith("-to-label"))||!Array.isArray(e)||e.length!==2)return e;const[r,n]=e,a=Math.abs(n.x-r.x),i=Math.abs(n.y-r.y);return a<.001||i<.001?e:i>=a?[r,{x:r.x,y:n.y},n]:[r,{x:n.x,y:r.y},n]},"orthogonalizeToLabelClippedPoints"),O7t=_((t,e)=>{const r=t.x,n=t.y,a=Math.abs(e.x-r),i=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return a>=s||i>=o},"outsideNode"),D7t=_((t,e,r)=>{Le.debug(`intersection calc abc89:
|
||
outsidePoint: ${JSON.stringify(e)}
|
||
insidePoint : ${JSON.stringify(r)}
|
||
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,a=t.y,i=Math.abs(n-r.x),s=t.width/2;let o=r.x<e.x?s-i:s+i;const u=t.height/2,h=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*s>Math.abs(n-e.x)*u){let f=r.y<e.y?e.y-u-a:a-u-e.y;o=d*f/h;const p={x:r.x<e.x?r.x+o:r.x-d+o,y:r.y<e.y?r.y+h-f:r.y-h+f};return o===0&&(p.x=e.x,p.y=e.y),d===0&&(p.x=e.x),h===0&&(p.y=e.y),Le.debug(`abc89 top/bottom calc, Q ${h}, q ${f}, R ${d}, r ${o}`,p),p}else{r.x<e.x?o=e.x-s-n:o=n-s-e.x;let f=h*o/d,p=r.x<e.x?r.x+d-o:r.x-d+o,g=r.y<e.y?r.y+f:r.y-f;return Le.debug(`sides calc abc89, Q ${h}, q ${f}, R ${d}, r ${o}`,{_x:p,_y:g}),o===0&&(p=e.x,g=e.y),d===0&&(p=e.x),h===0&&(g=e.y),{x:p,y:g}}},"intersection"),wwe=_((t,e)=>{Le.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],a=!1;return t.forEach(i=>{if(Le.info("abc88 checking point",i,e),!O7t(e,i)&&!a){const s=D7t(e,n,i);Le.debug("abc88 inside",i,n,s),Le.debug("abc88 intersection",s,e);let o=!1;r.forEach(u=>{o=o||u.x===s.x&&u.y===s.y}),r.some(u=>u.x===s.x&&u.y===s.y)?Le.warn("abc88 no intersect",s,r):r.push(s),a=!0}else Le.warn("abc88 outside",i,n),n=i,a||r.push(i)}),Le.debug("returning points",r),r},"cutPathAtIntersect");function Twe(t){const e=[],r=[];for(let n=1;n<t.length-1;n++){const a=t[n-1],i=t[n],s=t[n+1];(a.x===i.x&&i.y===s.y&&Math.abs(i.x-s.x)>5&&Math.abs(i.y-a.y)>5||a.y===i.y&&i.x===s.x&&Math.abs(i.x-a.x)>5&&Math.abs(i.y-s.y)>5)&&(e.push(i),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}l(Twe,"extractCornerPoints"),_(Twe,"extractCornerPoints");var Ewe=_(function(t,e,r){const n=e.x-t.x,a=e.y-t.y,i=Math.sqrt(n*n+a*a),s=r/i;return{x:e.x-s*n,y:e.y-s*a}},"findAdjacentPoint"),F7t=_(function(t){const{cornerPointPositions:e}=Twe(t),r=[];for(let n=0;n<t.length;n++)if(e.includes(n)){const a=t[n-1],i=t[n+1],s=t[n],o=Ewe(a,s,5),u=Ewe(i,s,5),h=u.x-o.x,d=u.y-o.y;r.push(o);const f=Math.sqrt(2)*2;let p={x:s.x,y:s.y};if(Math.abs(i.x-a.x)>10&&Math.abs(i.y-a.y)>=10){Le.debug("Corner point fixing",Math.abs(i.x-a.x),Math.abs(i.y-a.y));const g=5;s.x===o.x?p={x:h<0?o.x-g+f:o.x+g-f,y:d<0?o.y-f:o.y+f}:p={x:h<0?o.x-f:o.x+f,y:d<0?o.y-g+f:o.y+g-f}}else Le.debug("Corner point skipping fixing",Math.abs(i.x-a.x),Math.abs(i.y-a.y));r.push(p,u)}else r.push(t[n]);return r},"fixCorners"),B7t=_((t,e,r)=>{const n=t-e-r,a=2,i=2,s=a+i,o=Math.floor(n/s),u=Array(o).fill(`${a} ${i}`).join(" ");return`0 ${e} ${u} ${r}`},"generateDashArray"),tV=_(function(t,e,r,n,a,i,s,o=!1){var B;if(!s)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:u,layout:h}=ft();let d=e.points,f=!1;const p=a;var g=i;const m=[];for(const W in e.cssCompiledStyles)tW(W)||m.push(e.cssCompiledStyles[W]);if(h==="swimlane"){if(g.intersect&&p.intersect&&Array.isArray(d)&&d.length>=2)if(d.length===2)d=[p.intersect(d[0]),g.intersect(d[1])];else{const W=d.slice(1,-1),U=W[0],j=W[W.length-1],V=.5,Y=Math.abs(d[d.length-1].x-j.x)<V&&Math.abs(d[d.length-1].y-j.y)<V,H=p.intersect(U),q=Y?j:g.intersect(j),Z=Math.abs(q.x-j.x)<V&&Math.abs(q.y-j.y)<V,re=Math.abs(H.x-U.x)<V&&Math.abs(H.y-U.y)<V?[]:[H],Q=Z?[]:[q];d=[...re,...W,...Q]}d=R7t(e,d)}else g.intersect&&p.intersect&&!o&&(d=d.slice(1,e.points.length-1),d.unshift(p.intersect(d[0])),d.push(g.intersect(d[d.length-1])));const y=btoa(JSON.stringify(d));e.toCluster&&(Le.info("to cluster abc88",r.get(e.toCluster)),d=wwe(e.points,r.get(e.toCluster).node),f=!0),e.fromCluster&&(Le.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(d,null,2)),d=wwe(d.reverse(),r.get(e.fromCluster).node).reverse(),f=!0);let v=d.filter(W=>!Number.isNaN(W.y));const b=P7t(e.curve);b!=="rounded"&&(v=F7t(v));let w=Z4;switch(b){case"linear":w=Z4;break;case"basis":w=J4;break;case"cardinal":w=X1e;break;case"bumpX":w=q1e;break;case"bumpY":w=Y1e;break;case"catmullRom":w=Q1e;break;case"monotoneX":w=oye;break;case"monotoneY":w=lye;break;case"natural":w=hye;break;case"step":w=dye;break;case"stepAfter":w=pye;break;case"stepBefore":w=fye;break;case"rounded":w=Z4;break;default:w=J4}const{x,y:T}=ywe(e),C=Q4().x(x).y(T).curve(w);let S;switch(e.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-invisible";break;default:S="edge-thickness-normal"}switch(e.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break;default:S+=" edge-pattern-solid"}let E,k=b==="rounded"?Cwe(Swe(v,e),5):C(v);const A=Array.isArray(e.style)?e.style:[e.style];let I=A.find(W=>W==null?void 0:W.startsWith("stroke:")),L="";e.animate&&(L="edge-animation-fast"),e.animation&&(L="edge-animation-"+e.animation);let R=!1;if(e.look==="handDrawn"){const W=Sr.svg(t);Object.assign([],v);const U=W.path(k,{roughness:.3,seed:u});S+=" transition",E=Yt(U).select("path").attr("id",`${s}-${e.id}`).attr("class"," "+S+(e.classes?" "+e.classes:"")+(L?" "+L:"")).attr("style",A?A.reduce((V,Y)=>V+";"+Y,""):"");let j=E.attr("d");E.attr("d",j),t.node().appendChild(E.node())}else{const W=m.join(";"),U=A?A.reduce((Z,K)=>Z+K+";",""):"",j=(W?W+";"+U+";":U)+";"+(A?A.reduce((Z,K)=>Z+";"+K,""):"");E=t.append("path").attr("d",k).attr("id",`${s}-${e.id}`).attr("class"," "+S+(e.classes?" "+e.classes:"")+(L?" "+L:"")).attr("style",j),I=(B=j.match(/stroke:([^;]+)/))==null?void 0:B[1],R=e.animate===!0||!!e.animation||W.includes("animation");const V=E.node(),Y=typeof V.getTotalLength=="function"?V.getTotalLength():0,H=mwe[e.arrowTypeStart]||0,q=mwe[e.arrowTypeEnd]||0;if(e.look==="neo"&&!R){const K=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?B7t(Y,H,q):`0 ${H} ${Y-H-q} ${q}`}; stroke-dashoffset: 0;`;E.attr("style",K+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",e.id),E.attr("data-points",y),E.attr("data-look",Ms(e.look)),e.showPoints&&v.forEach(W=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",W.x).attr("cy",W.y)});let O="";(ft().flowchart.arrowMarkerAbsolute||ft().state.arrowMarkerAbsolute)&&(O=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),Le.info("arrowTypeStart",e.arrowTypeStart),Le.info("arrowTypeEnd",e.arrowTypeEnd);const M=!R&&(e==null?void 0:e.look)==="neo";L7t(E,e,O,s,n,M,I);const P=Math.floor(d.length/2),z=d[P];Wr.isLabelCoordinateInPath(z,E.attr("d"))||(f=!0);let D={};return f&&(D.updatedPath=d),D.originalPath=e.points,D},"insertEdge");function Cwe(t,e){if(t.length<2)return"";let r="";const n=t.length,a=1e-5;for(let i=0;i<n;i++){const s=t[i],o=t[i-1],u=t[i+1];if(i===0)r+=`M${s.x},${s.y}`;else if(i===n-1)r+=`L${s.x},${s.y}`;else{const h=s.x-o.x,d=s.y-o.y,f=u.x-s.x,p=u.y-s.y,g=Math.hypot(h,d),m=Math.hypot(f,p);if(g<a||m<a){r+=`L${s.x},${s.y}`;continue}const y=h/g,v=d/g,b=f/m,w=p/m,x=y*b+v*w,T=Math.max(-1,Math.min(1,x)),C=Math.acos(T);if(C<a||Math.abs(Math.PI-C)<a){r+=`L${s.x},${s.y}`;continue}const S=Math.min(e/Math.sin(C/2),g/2,m/2),E=s.x-y*S,k=s.y-v*S,A=s.x+b*S,I=s.y+w*S;r+=`L${E},${k}`,r+=`Q${s.x},${s.y} ${A},${I}`}}return r}l(Cwe,"generateRoundedPath"),_(Cwe,"generateRoundedPath");function rV(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,n=e.y-t.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}l(rV,"calculateDeltaAndAngle"),_(rV,"calculateDeltaAndAngle");function Swe(t,e){const r=t.map(a=>X({},a));if(t.length>=2&&Ps[e.arrowTypeStart]){const a=Ps[e.arrowTypeStart],i=t[0],s=t[1],{angle:o}=rV(i,s),u=a*Math.cos(o),h=a*Math.sin(o);r[0].x=i.x+u,r[0].y=i.y+h}const n=t.length;if(n>=2&&Ps[e.arrowTypeEnd]){const a=Ps[e.arrowTypeEnd],i=t[n-1],s=t[n-2],{angle:o}=rV(s,i),u=a*Math.cos(o),h=a*Math.sin(o);r[n-1].x=i.x-u,r[n-1].y=i.y-h}return r}l(Swe,"applyMarkerOffsetsToPoints"),_(Swe,"applyMarkerOffsetsToPoints");var z7t=_((t,e,r,n)=>{e.forEach(a=>{cNt[a](t,r,n)})},"insertMarkers"),H7t=_((t,e,r)=>{Le.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),W7t=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),V7t=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),G7t=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),q7t=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Y7t=_((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),U7t=_((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),j7t=_((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),K7t=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),X7t=_((t,e,r)=>{const n=Ar(),{themeVariables:a}=n,{transitionColor:i}=a;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${i}`)},"barbNeo"),Z7t=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Q7t=_((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const a=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),a.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),J7t=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),eNt=_((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const a=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");a.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),a.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),tNt=_((t,e,r)=>{const n=Ar(),{themeVariables:a}=n,{strokeWidth:i}=a;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${i}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${i}`)},"only_one_neo"),rNt=_((t,e,r)=>{const n=Ar(),{themeVariables:a}=n,{strokeWidth:i,mainBkg:s}=a,o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");o.append("circle").attr("fill",s!=null?s:"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${i}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${i}`);const u=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",s!=null?s:"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${i}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${i}`)},"zero_or_one_neo"),nNt=_((t,e,r)=>{const n=Ar(),{themeVariables:a}=n,{strokeWidth:i}=a;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${i}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${i}`)},"one_or_more_neo"),aNt=_((t,e,r)=>{const n=Ar(),{themeVariables:a}=n,{strokeWidth:i,mainBkg:s}=a,o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");o.append("circle").attr("fill",s!=null?s:"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${i}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${i}`);const u=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",s!=null?s:"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${i}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${i}`)},"zero_or_more_neo"),iNt=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
||
L20,10
|
||
M20,10
|
||
L0,20`)},"requirement_arrow"),sNt=_((t,e,r)=>{const n=Ar(),{themeVariables:a}=n,{strokeWidth:i}=a;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${i}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
||
L20,10
|
||
M20,10
|
||
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),oNt=_((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),lNt=_((t,e,r)=>{const n=Ar(),{themeVariables:a}=n,{strokeWidth:i}=a,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${i}`)},"requirement_contains_neo"),cNt={extension:H7t,composition:W7t,aggregation:V7t,dependency:G7t,lollipop:q7t,point:Y7t,circle:U7t,cross:j7t,barb:K7t,barbNeo:X7t,only_one:Z7t,zero_or_one:Q7t,one_or_more:J7t,zero_or_more:eNt,only_one_neo:tNt,zero_or_one_neo:rNt,one_or_more_neo:nNt,zero_or_more_neo:aNt,requirement_arrow:iNt,requirement_contains:oNt,requirement_arrow_neo:sNt,requirement_contains_neo:lNt},nV=z7t,uNt={common:or,getConfig:Ar,insertCluster:Z7,insertEdge:tV,insertEdgeLabel:tN,insertMarkers:nV,insertNode:w3,interpolateToCurve:dW,labelHelper:qr,log:Le,positionEdgeLabel:xwe},_3={},_we=_(t=>{for(const e of t)_3[e.name]=e},"registerLayoutLoaders"),hNt=_(()=>{_we([{name:"dagre",loader:_(()=>nt(this,null,function*(){return yield Promise.resolve().then(function(){return EHt})}),"loader")},{name:"swimlane",loader:_(()=>nt(this,null,function*(){return yield Promise.resolve().then(function(){return RHt})}),"loader")},{name:"cose-bilkent",loader:_(()=>nt(this,null,function*(){return yield Promise.resolve().then(function(){return wjt})}),"loader")}])},"registerDefaultLayoutLoaders");hNt();var Uw=_((t,e,r)=>nt(this,null,function*(){if(!(t.layoutAlgorithm in _3))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const f of t.nodes){const p=f.domId||f.id;f.domId=`${t.diagramId}-${p}`}const n=_3[t.layoutAlgorithm],a=yield n.loader(),{theme:i,themeVariables:s}=t.config,{useGradient:o,gradientStart:u,gradientStop:h}=s,d=e.attr("id");if(e.append("defs").append("filter").attr("id",`${d}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i!=null&&i.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${d}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i!=null&&i.includes("dark")?"#FFFFFF":"#000000"}`),o){const f=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");f.append("svg:stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),f.append("svg:stop").attr("offset","100%").attr("stop-color",h).attr("stop-opacity",1)}return a.render(t,e,uNt,{algorithm:n.algorithm},r)}),"render"),k3=_((t="",{fallback:e="dagre"}={})=>{if(t in _3)return t;if(e in _3)return Le.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),aV="comm",kwe="rule",Awe="decl",dNt="@media",fNt="@import",pNt="@supports",gNt="@namespace",iV="@keyframes",Nwe="@layer",mNt="@scope",yNt=Math.abs,A3=String.fromCharCode;function Iwe(t){return t.trim()}l(Iwe,"trim");function sV(t,e,r){return t.replace(e,r)}l(sV,"replace");function jw(t,e){return t.charCodeAt(e)|0}l(jw,"charat");function Kw(t,e,r){return t.slice(e,r)}l(Kw,"substr");function Vh(t){return t.length}l(Vh,"strlen");function Lwe(t){return t.length}l(Lwe,"sizeof");function rN(t,e){return e.push(t),t}l(rN,"append");var nN=1,Xw=1,$we=0,Xc=0,ji=0,Zw="";function oV(t,e,r,n,a,i,s,o){return{value:t,root:e,parent:r,type:n,props:a,children:i,line:nN,column:Xw,length:s,return:"",siblings:o}}l(oV,"node");function vNt(){return ji}l(vNt,"char");function bNt(){return ji=Xc>0?jw(Zw,--Xc):0,Xw--,ji===10&&(Xw=1,nN--),ji}l(bNt,"prev");function Vu(){return ji=Xc<$we?jw(Zw,Xc++):0,Xw++,ji===10&&(Xw=1,nN++),ji}l(Vu,"next$1");function rp(){return jw(Zw,Xc)}l(rp,"peek");function aN(){return Xc}l(aN,"caret");function iN(t,e){return Kw(Zw,t,e)}l(iN,"slice$1");function N3(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}l(N3,"token");function xNt(t){return nN=Xw=1,$we=Vh(Zw=t),Xc=0,[]}l(xNt,"alloc");function wNt(t){return Zw="",t}l(wNt,"dealloc");function lV(t){return Iwe(iN(Xc-1,cV(t===91?t+2:t===40?t+1:t)))}l(lV,"delimit");function TNt(t){for(;(ji=rp())&&ji<33;)Vu();return N3(t)>2||N3(ji)>3?"":" "}l(TNt,"whitespace");function ENt(t,e){for(;--e&&Vu()&&!(ji<48||ji>102||ji>57&&ji<65||ji>70&&ji<97););return iN(t,aN()+(e<6&&rp()==32&&Vu()==32))}l(ENt,"escaping");function cV(t){for(;Vu();)switch(ji){case t:return Xc;case 34:case 39:t!==34&&t!==39&&cV(ji);break;case 40:t===41&&cV(t);break;case 92:Vu();break}return Xc}l(cV,"delimiter");function CNt(t,e){for(;Vu()&&t+ji!==57;)if(t+ji===84&&rp()===47)break;return"/*"+iN(e,Xc-1)+"*"+A3(t===47?t:Vu())}l(CNt,"commenter");function SNt(t){for(;!N3(rp());)Vu();return iN(t,Xc)}l(SNt,"identifier");function _Nt(t){return wNt(sN("",null,null,null,[""],t=xNt(t),0,[0],t))}l(_Nt,"compile");function sN(t,e,r,n,a,i,s,o,u){for(var h=0,d=0,f=s,p=0,g=0,m=0,y=1,v=1,b=1,w=0,x=0,T="",C=a,S=i,E=n,k=T;v;)switch(m=x,x=Vu()){case 40:m!=108&&jw(k,f-1)==58?(w++,k+="("):k+=lV(x);break;case 41:w--,k+=")";break;case 34:case 39:case 91:k+=lV(x);break;case 9:case 10:case 13:case 32:if(w>0){k+=A3(x);break}k+=TNt(m);break;case 92:k+=ENt(aN()-1,7);continue;case 47:switch(rp()){case 42:case 47:rN(kNt(CNt(Vu(),aN()),e,r,u),u),(N3(m||1)==5||N3(rp()||1)==5)&&Vh(k)&&Kw(k,-1,void 0)!==" "&&(k+=" ");break;default:k+="/"}break;case 123*y:o[h++]=Vh(k)*b;case 125*y:case 59:case 0:if(w>0&&x){k+=A3(x);break}switch(x){case 0:case 125:v=0;case 59+d:b==-1&&(k=sV(k,/\f/g,"")),g>0&&(Vh(k)-f||y===0)&&rN(g>32?Pwe(k+";",n,r,f-1,u):Pwe(sV(k," ","")+";",n,r,f-2,u),u);break;case 59:k+=";";default:if(rN(E=Mwe(k,e,r,h,d,a,o,T,C=[],S=[],f,i),i),x===123)if(d===0)sN(k,e,E,E,C,i,f,o,S);else{switch(p){case 99:if(jw(k,3)===110)break;case 108:if(jw(k,2)===97)break;default:d=0;case 100:case 109:case 115:}d?sN(t,E,E,n&&rN(Mwe(t,E,E,0,0,a,o,T,a,C=[],f,S),S),a,S,f,o,n?C:S):sN(k,E,E,E,[""],S,0,o,S)}}h=d=g=0,y=b=1,T=k="",f=s;break;case 58:f=1+Vh(k),g=m;default:if(y<1){if(x==123)--y;else if(x==125&&y++==0&&bNt()==125)continue}switch(k+=A3(x),x*y){case 38:b=d>0?1:(k+="\f",-1);break;case 44:if(w>0)break;o[h++]=(Vh(k)-1)*b,b=1;break;case 64:rp()===45&&(k+=lV(Vu())),p=rp(),d=f=Vh(T=k+=SNt(aN())),x++;break;case 45:m===45&&Vh(k)==2&&(y=0)}}return i}l(sN,"parse$3");function Mwe(t,e,r,n,a,i,s,o,u,h,d,f){for(var p=a-1,g=a===0?i:[""],m=Lwe(g),y=0,v=0,b=0;y<n;++y)for(var w=0,x=Kw(t,p+1,p=yNt(v=s[y])),T=t;w<m;++w)(T=Iwe(v>0?g[w]+" "+x:sV(x,/&\f/g,g[w])))&&(u[b++]=T);return oV(t,e,r,a===0?kwe:o,u,h,d,f)}l(Mwe,"ruleset");function kNt(t,e,r,n){return oV(t,e,r,aV,A3(vNt()),Kw(t,2,-2),0,n)}l(kNt,"comment");function Pwe(t,e,r,n,a){return oV(t,e,r,Awe,Kw(t,0,n),Kw(t,n+1,-1),n,a)}l(Pwe,"declaration");function uV(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}l(uV,"serialize");function ANt(t,e,r,n){switch(t.type){case Nwe:if(t.children.length)break;case fNt:case gNt:case Awe:return t.return=t.return||t.value;case aV:return"";case iV:return t.return=t.value+"{"+uV(t.children,n)+"}";case kwe:if(!Vh(t.value=t.props.join(",")))return""}return Vh(r=uV(t.children,n))?t.return=t.value+"{"+r+"}":""}l(ANt,"stringify");function NNt(t){var e=Lwe(t);return function(r,n,a,i){for(var s="",o=0;o<e;o++)s+=t[o](r,n,a,i)||"";return s}}l(NNt,"middleware");var Rwe="c4",INt=_(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),LNt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return mKt});return{id:Rwe,diagram:t}}),"loader"),$Nt={id:Rwe,detector:INt,loader:LNt},MNt=$Nt,Owe="flowchart",PNt=_((t,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),RNt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Dj});return{id:Owe,diagram:t}}),"loader"),ONt={id:Owe,detector:PNt,loader:RNt},DNt=ONt,Dwe="flowchart-v2",FNt=_((t,e)=>{var r,n,a;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((a=e==null?void 0:e.flowchart)==null?void 0:a.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),BNt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Dj});return{id:Dwe,diagram:t}}),"loader"),zNt={id:Dwe,detector:FNt,loader:BNt},HNt=zNt,Fwe="swimlane",WNt=_(t=>/^\s*swimlane-beta\b/.test(t),"detector"),VNt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return LKt});return{id:Fwe,diagram:t}}),"loader"),GNt={id:Fwe,detector:WNt,loader:VNt},qNt=GNt,Bwe="er",YNt=_(t=>/^\s*erDiagram/.test(t),"detector"),UNt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return BKt});return{id:Bwe,diagram:t}}),"loader"),jNt={id:Bwe,detector:YNt,loader:UNt},KNt=jNt,zwe="gitGraph",XNt=_(t=>/^\s*gitGraph/.test(t),"detector"),ZNt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Gur});return{id:zwe,diagram:t}}),"loader"),QNt={id:zwe,detector:XNt,loader:ZNt},JNt=QNt,Hwe="gantt",eIt=_(t=>/^\s*gantt/.test(t),"detector"),tIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Ghr});return{id:Hwe,diagram:t}}),"loader"),rIt={id:Hwe,detector:eIt,loader:tIt},nIt=rIt,Wwe="info",aIt=_(t=>/^\s*info/.test(t),"detector"),iIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Qhr});return{id:Wwe,diagram:t}}),"loader"),sIt={id:Wwe,detector:aIt,loader:iIt},Vwe="pie",oIt=_(t=>/^\s*pie/.test(t),"detector"),lIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return gdr});return{id:Vwe,diagram:t}}),"loader"),cIt={id:Vwe,detector:oIt,loader:lIt},Gwe="quadrantChart",uIt=_(t=>/^\s*quadrantChart/.test(t),"detector"),hIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Edr});return{id:Gwe,diagram:t}}),"loader"),dIt={id:Gwe,detector:uIt,loader:hIt},fIt=dIt,qwe="xychart",pIt=_(t=>/^\s*xychart(-beta)?/.test(t),"detector"),gIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Fdr});return{id:qwe,diagram:t}}),"loader"),mIt={id:qwe,detector:pIt,loader:gIt},yIt=mIt,Ywe="requirement",vIt=_(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),bIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Ydr});return{id:Ywe,diagram:t}}),"loader"),xIt={id:Ywe,detector:vIt,loader:bIt},wIt=xIt,Uwe="sequence",TIt=_(t=>/^\s*sequenceDiagram/.test(t),"detector"),EIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Hfr});return{id:Uwe,diagram:t}}),"loader"),CIt={id:Uwe,detector:TIt,loader:EIt},SIt=CIt,jwe="class",_It=_((t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),kIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Ufr});return{id:jwe,diagram:t}}),"loader"),AIt={id:jwe,detector:_It,loader:kIt},NIt=AIt,Kwe="classDiagram",IIt=_((t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),LIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Kfr});return{id:Kwe,diagram:t}}),"loader"),$It={id:Kwe,detector:IIt,loader:LIt},MIt=$It,Xwe="state",PIt=_((t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),RIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return F0r});return{id:Xwe,diagram:t}}),"loader"),OIt={id:Xwe,detector:PIt,loader:RIt},DIt=OIt,Zwe="stateDiagram",FIt=_((t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),BIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return z0r});return{id:Zwe,diagram:t}}),"loader"),zIt={id:Zwe,detector:FIt,loader:BIt},HIt=zIt,Qwe="journey",WIt=_(t=>/^\s*journey/.test(t),"detector"),VIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return lpr});return{id:Qwe,diagram:t}}),"loader"),GIt={id:Qwe,detector:WIt,loader:VIt},qIt=GIt,YIt=_((t,e,r)=>{Le.debug(`rendering svg for syntax error
|
||
`);const n=$o(e),a=n.append("g");n.attr("viewBox","0 0 2412 512"),yi(n,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Jwe={draw:YIt},UIt=Jwe,jIt={db:{},renderer:Jwe,parser:{parse:_(()=>{},"parse")}},KIt=jIt,eTe="flowchart-elk",XIt=_((t,e={})=>{var r;return/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),ZIt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Dj});return{id:eTe,diagram:t}}),"loader"),QIt={id:eTe,detector:XIt,loader:ZIt},JIt=QIt,tTe="timeline",eLt=_(t=>/^\s*timeline/.test(t),"detector"),tLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Dpr});return{id:tTe,diagram:t}}),"loader"),rLt={id:tTe,detector:eLt,loader:tLt},nLt=rLt,rTe="mindmap",aLt=_(t=>/^\s*mindmap/.test(t),"detector"),iLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Jpr});return{id:rTe,diagram:t}}),"loader"),sLt={id:rTe,detector:aLt,loader:iLt},oLt=sLt,nTe="kanban",lLt=_(t=>/^\s*kanban/.test(t),"detector"),cLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return bgr});return{id:nTe,diagram:t}}),"loader"),uLt={id:nTe,detector:lLt,loader:cLt},hLt=uLt,aTe="sankey",dLt=_(t=>/^\s*sankey(-beta)?/.test(t),"detector"),fLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return amr});return{id:aTe,diagram:t}}),"loader"),pLt={id:aTe,detector:dLt,loader:fLt},gLt=pLt,iTe="packet",mLt=_(t=>/^\s*packet(-beta)?/.test(t),"detector"),yLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return gmr});return{id:iTe,diagram:t}}),"loader"),vLt={id:iTe,detector:mLt,loader:yLt},sTe="radar",bLt=_(t=>/^\s*radar-beta/.test(t),"detector"),xLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Omr});return{id:sTe,diagram:t}}),"loader"),wLt={id:sTe,detector:bLt,loader:xLt},oTe="block",TLt=_(t=>/^\s*block(-beta)?/.test(t),"detector"),ELt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return cyr});return{id:oTe,diagram:t}}),"loader"),CLt={id:oTe,detector:TLt,loader:ELt},SLt=CLt,lTe="treeView",_Lt=_(t=>/^\s*treeView-beta/.test(t),"detector"),kLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Myr});return{id:lTe,diagram:t}}),"loader"),ALt={id:lTe,detector:_Lt,loader:kLt},NLt=ALt,cTe="architecture",ILt=_(t=>/^\s*architecture/.test(t),"detector"),LLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return nvr});return{id:cTe,diagram:t}}),"loader"),$Lt={id:cTe,detector:ILt,loader:LLt},MLt=$Lt,uTe="eventmodeling",PLt=_(t=>/^\s*eventmodeling/.test(t),"detector"),RLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return bvr});return{id:uTe,diagram:t}}),"loader"),OLt={id:uTe,detector:PLt,loader:RLt},DLt=OLt,hTe="ishikawa",FLt=_(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),BLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Ovr});return{id:hTe,diagram:t}}),"loader"),zLt={id:hTe,detector:FLt,loader:BLt},dTe="venn",HLt=_(t=>/^\s*venn-beta/.test(t),"detector"),WLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return w2r});return{id:dTe,diagram:t}}),"loader"),VLt={id:dTe,detector:HLt,loader:WLt},GLt=VLt,fTe="treemap",qLt=_(t=>/^\s*treemap/.test(t),"detector"),YLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return $2r});return{id:fTe,diagram:t}}),"loader"),ULt={id:fTe,detector:qLt,loader:YLt},pTe="wardley",jLt=_(t=>/^\s*wardley-beta/i.test(t),"detector"),KLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return G2r});return{id:pTe,diagram:t}}),"loader"),XLt={id:pTe,detector:jLt,loader:KLt},ZLt=XLt,gTe="cynefin",QLt=_(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),JLt=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return obr});return{id:gTe,diagram:t}}),"loader"),e$t={id:gTe,detector:QLt,loader:JLt},mTe="railroad",t$t=_(t=>/^\s*railroad-beta/i.test(t),"detector"),r$t=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return $br});return{id:mTe,diagram:t}}),"loader"),n$t={id:mTe,detector:t$t,loader:r$t},yTe="railroadEbnf",a$t=_(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),i$t=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Hbr});return{id:yTe,diagram:t}}),"loader"),s$t={id:yTe,detector:a$t,loader:i$t},vTe="railroadAbnf",o$t=_(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),l$t=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return Zbr});return{id:vTe,diagram:t}}),"loader"),c$t={id:vTe,detector:o$t,loader:l$t},bTe="railroadPeg",u$t=_(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),h$t=_(()=>nt(this,null,function*(){const{diagram:t}=yield Promise.resolve().then(function(){return oxr});return{id:bTe,diagram:t}}),"loader"),d$t={id:bTe,detector:u$t,loader:h$t},xTe=!1,oN=_(()=>{xTe||(xTe=!0,k8("error",KIt,t=>t.toLowerCase().trim()==="error"),k8("---",{db:{clear:_(()=>{},"clear")},styles:{},renderer:{draw:_(()=>{},"draw")},parser:{parse:_(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:_(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Az(JIt,oLt,MLt),Az(MNt,hLt,MIt,NIt,KNt,nIt,sIt,cIt,wIt,SIt,qNt,HNt,DNt,nLt,JNt,HIt,DIt,qIt,fIt,gLt,vLt,yIt,SLt,DLt,NLt,wLt,zLt,ULt,n$t,s$t,c$t,d$t,GLt,ZLt,e$t))},"addDiagrams"),f$t=_(()=>nt(this,null,function*(){Le.debug("Loading registered diagrams");const e=(yield Promise.allSettled(Object.entries(im).map(i=>nt(this,[i],function*([r,{detector:n,loader:a}]){if(a)try{zz(r)}catch(s){try{const{diagram:o,id:u}=yield a();k8(u,o,n)}catch(o){throw Le.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete im[r],o}}})))).filter(r=>r.status==="rejected");if(e.length>0){Le.error(`Failed to load ${e.length} external diagrams`);for(const r of e)Le.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}}),"loadRegisteredDiagrams"),p$t="graphics-document document";function wTe(t,e){t.attr("role",p$t),e!==""&&t.attr("aria-roledescription",e)}l(wTe,"setA11yDiagramInfo"),_(wTe,"setA11yDiagramInfo");function TTe(t,e,r,n){if(t.insert!==void 0){if(r){const a=`chart-desc-${n}`;t.attr("aria-describedby",a),t.insert("desc",":first-child").attr("id",a).text(r)}if(e){const a=`chart-title-${n}`;t.attr("aria-labelledby",a),t.insert("title",":first-child").attr("id",a).text(e)}}}l(TTe,"addSVGa11yTitleDescription"),_(TTe,"addSVGa11yTitleDescription");var hV=(fg=class{constructor(e,r,n,a,i){this.type=e,this.text=r,this.db=n,this.parser=a,this.renderer=i}static fromText(n){return nt(this,arguments,function*(e,r={}){var d,f;const a=Ar(),i=kz(e,a);e=HAt(e)+`
|
||
`;try{zz(i)}catch(p){const g=lCt(i);if(!g)throw new rme(`Diagram ${i} not found.`);const{id:m,diagram:y}=yield g();k8(m,y)}const{db:s,parser:o,renderer:u,init:h}=zz(i);return o.parser&&(o.parser.yy=s),(d=s.clear)==null||d.call(s),h==null||h(a),r.title&&((f=s.setDiagramTitle)==null||f.call(s,r.title)),yield o.parse(e),new fg(i,e,s,o,u)})}render(e,r){return nt(this,null,function*(){yield this.renderer.draw(this.text,e,r,this)})}getParser(){return this.parser}getType(){return this.type}},l(fg,"_Diagram"),_(fg,"Diagram"),fg),ETe=[],g$t=_(()=>{ETe.forEach(t=>{t()}),ETe=[]},"attachFunctions"),m$t=_(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function CTe(t){var s;const e=t.match(tme);if(!e)return{text:t,metadata:{}};const r=e[1],n=r?e[2].split(`
|
||
`).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
|
||
`):e[2];let a=(s=_7(n,{schema:S7}))!=null?s:{};a=typeof a=="object"&&!Array.isArray(a)?a:{};const i={};return a.displayMode&&(i.displayMode=a.displayMode.toString()),a.title&&(i.title=a.title.toString()),a.config&&(i.config=a.config),{text:t.slice(e[0].length),metadata:i}}l(CTe,"extractFrontMatter"),_(CTe,"extractFrontMatter");var y$t=_(t=>t.replace(/\r\n?/g,`
|
||
`).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),v$t=_(t=>{const{text:e,metadata:r}=CTe(t),{displayMode:n,title:a,config:i={}}=r;return n&&(i.gantt||(i.gantt={}),i.gantt.displayMode=n),{title:a,config:i,text:e}},"processFrontmatter"),b$t=_(t=>{var n;const e=(n=Wr.detectInit(t))!=null?n:{},r=Wr.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:a})=>a==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:LAt(t),directive:e}},"processDirectives");function dV(t){const e=y$t(t),r=v$t(e),n=b$t(r.text),a=Ga(r.config,n.directive);return t=m$t(n.text),{code:t,title:r.title,config:a}}l(dV,"preprocessDiagram"),_(dV,"preprocessDiagram");function STe(t){const e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}l(STe,"toBase64"),_(STe,"toBase64");var x$t=5e4,w$t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",T$t="sandbox",E$t="loose",C$t="http://www.w3.org/2000/svg",S$t="http://www.w3.org/1999/xlink",_$t="http://www.w3.org/1999/xhtml",k$t="100%",A$t="100%",N$t="border:0;margin:0;",I$t="margin:0",L$t="allow-top-navigation-by-user-activation allow-popups",$$t='The "iframe" tag is not supported by your browser.',M$t=["foreignobject"],P$t=["dominant-baseline"];function fV(t){var r;const e=dV(t);return T8(),iCt((r=e.config)!=null?r:{}),e}l(fV,"processAndSetConfigs"),_(fV,"processAndSetConfigs");function _Te(t,e){return nt(this,null,function*(){oN();try{const{code:r,config:n}=fV(t);return{diagramType:(yield ITe(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}})}l(_Te,"parse$2"),_(_Te,"parse");var kTe=_((t,e,r=[])=>{const n=Uge(`{ ${r.join(" !important; ")} !important; }`);return`.${t} ${e} ${n}`},"cssImportantStyles"),R$t=_((t,e=new Map)=>{const r=new CSSStyleSheet;if(t.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),t.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const o=ta(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(u=>{T2e(u.styles)||o.forEach(h=>{r.insertRule(kTe(u.id,h,u.styles),r.cssRules.length)}),T2e(u.textStyles)||r.insertRule(kTe(u.id,"tspan",((u==null?void 0:u.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let n="";if(t.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const a=new CSSStyleSheet;a.replaceSync(t.themeCSS),n=Lz(a)+`
|
||
`}else n+=`${t.themeCSS}
|
||
`;return n+Lz(r)},"createCssStyles"),O$t=_((t,e)=>uV(_Nt(`${t}{${e}}`),NNt([_(l(function(n,a,i,s){if(n.type==="rule"&&Array.isArray(n.props)){if(n.parent&&n.parent.type===iV)return;n.props=n.props.map(o=>o.startsWith(t)?o:`${t} ${o}`)}else n.type.startsWith("@")&&([...[dNt,pNt,Nwe,mNt,"@container","@starting-style"],iV].includes(n.type)||(Le.warn(`Removing unsupported at-rule ${n.type} from CSS`),n.type=aV))},"addNamespace"),"addNamespace"),ANt])),"compileCSS"),D$t=_((t,e,r,n)=>{const a=R$t(t,r),i=CCt(e,a,Ne(X({},t.themeVariables),{theme:t.theme,look:t.look}),n);return O$t(n,i)},"createUserStyles"),F$t=_((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=uf(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),B$t=_((t="",e)=>{var a,i;const r=(i=(a=e==null?void 0:e.viewBox)==null?void 0:a.baseVal)!=null&&i.height?e.viewBox.baseVal.height+"px":A$t,n=STe(`<body style="${I$t}">${t}</body>`);return`<iframe style="width:${k$t};height:${r};${N$t}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${L$t}">
|
||
${$$t}
|
||
</iframe>`},"putIntoIFrame"),ATe=_((t,e,r,n,a)=>{const i=t.append("div");i.attr("id",r),n&&i.attr("style",n);const s=i.append("svg").attr("id",e).attr("width","100%").attr("xmlns",C$t);return a&&s.attr("xmlns:xlink",a),s.append("g"),t},"appendDivSvgG");function pV(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}l(pV,"sandboxedIframe"),_(pV,"sandboxedIframe");var z$t=_((t,e,r,n)=>{var a,i,s;(a=t.getElementById(e))==null||a.remove(),(i=t.getElementById(r))==null||i.remove(),(s=t.getElementById(n))==null||s.remove()},"removeExistingElements"),H$t=_(function(t,e,r){return nt(this,null,function*(){var R,O,M,P,z,D,B;oN();const n=fV(e);e=n.code;const a=Ar();Le.debug(a),e.length>((R=a==null?void 0:a.maxTextSize)!=null?R:x$t)&&(e=w$t);const i=`#${t}`,s="i"+t,o="#"+s,u="d"+t,h="#"+u,d=_(()=>{const U=Yt(p?o:h).node();U&&"remove"in U&&U.remove()},"removeTempElements");let f=Yt(document.body);const p=a.securityLevel===T$t,g=a.securityLevel===E$t,m=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const W=pV(Yt(r),s);f=Yt(W.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Yt(r);ATe(f,t,u,`font-family: ${m}`,S$t)}else{if(z$t(document,t,u,s),p){const W=pV(Yt(document.body),s);f=Yt(W.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=Yt("body");ATe(f,t,u)}let y,v;try{y=yield hV.fromText(e,{title:n.title})}catch(W){if(a.suppressErrorRendering)throw d(),W;y=yield hV.fromText("error"),v=W}const b=f.select(h).node(),w=y.type,x=b.firstChild,T=x.firstChild,C=(M=(O=y.renderer).getClasses)==null?void 0:M.call(O,e,y),S=D$t(a,w,C,i),E=document.createElement("style");E.innerHTML=S,x.insertBefore(E,T);try{yield y.renderer.draw(e,t,"11.16.0",y)}catch(W){throw a.suppressErrorRendering?d():UIt.draw(e,t,"11.16.0"),W}const k=f.select(`${h} svg`),A=(z=(P=y.db).getAccTitle)==null?void 0:z.call(P),I=(B=(D=y.db).getAccDescription)==null?void 0:B.call(D);LTe(w,k,A,I),f.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",_$t);let L=f.select(h).node().innerHTML;if(Le.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),L=F$t(L,p,Ph(a.arrowMarkerAbsolute)),p){const W=f.select(h+" svg").node();L=B$t(L,W)}else g||(L=Zd.sanitize(L,{ADD_TAGS:M$t,ADD_ATTR:P$t,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(g$t(),v)throw v;return d(),{diagramType:w,svg:L,bindFunctions:y.db.bindFunctions}})},"render");function NTe(t={}){var n;const e=$i({},t);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),nCt(e),e!=null&&e.theme&&e.theme in Jd?e.themeVariables=Jd[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Jd.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?rCt(e):jge();gz(r.logLevel),oN()}l(NTe,"initialize"),_(NTe,"initialize");var ITe=_((t,e={})=>{const{code:r}=dV(t);return hV.fromText(r,e)},"getDiagramFromText");function LTe(t,e,r,n){wTe(e,t),TTe(e,r,n,e.attr("id"))}l(LTe,"addA11yInfo"),_(LTe,"addA11yInfo");var Im=Object.freeze({render:H$t,parse:_Te,getDiagramFromText:ITe,initialize:NTe,getConfig:Ar,setConfig:Kge,getSiteConfig:jge,updateSiteConfig:aCt,reset:_(()=>{T8()},"reset"),globalReset:_(()=>{T8(vw)},"globalReset"),defaultConfig:vw});gz(Ar().logLevel),T8(Ar());var W$t=_((t,e,r)=>{Le.warn(t),mW(t)?(r&&r(t.str,t.hash),e.push(Ne(X({},t),{message:t.str,error:t}))):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),$Te=_(function(){return nt(this,arguments,function*(t={querySelector:".mermaid"}){try{yield V$t(t)}catch(e){if(mW(e)&&Le.error(e.str),vc.parseError&&vc.parseError(e),!t.suppressErrors)throw Le.error("Use the suppressErrors option to suppress these errors"),e}})},"run"),V$t=_(function(){return nt(this,arguments,function*({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=Im.getConfig();Le.debug(`${t?"":"No "}Callback function found`);let a;if(r)a=r;else if(e)a=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");Le.debug(`Found ${a.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(Le.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),Im.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const i=new Wr.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const o=[];for(const u of Array.from(a)){if(Le.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const h=`mermaid-${i.next()}`;s=u.innerHTML,s=sbe(Wr.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=Wr.detectInit(s);d&&Le.debug("Detected early reinit: ",d);try{const{svg:f,bindFunctions:p}=yield OTe(h,s,u);u.innerHTML=f,t&&(yield t(h)),p&&p(u)}catch(f){W$t(f,o,vc.parseError)}}if(o.length>0)throw o[0]})},"runThrowsErrors"),MTe=_(function(t){Im.initialize(t)},"initialize"),G$t=_(function(t,e,r){return nt(this,null,function*(){Le.warn("mermaid.init is deprecated. Please use run instead."),t&&MTe(t);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),yield $Te(n)})},"init"),q$t=_((r,...n)=>nt(this,[r,...n],function*(t,{lazyLoad:e=!0}={}){oN(),Az(...t),e===!1&&(yield f$t())}),"registerExternalDiagrams"),PTe=_(function(){if(vc.startOnLoad){const{startOnLoad:t}=Im.getConfig();t&&vc.run().catch(e=>Le.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document!="undefined"&&window.addEventListener("load",PTe,!1);var Y$t=_(function(t){vc.parseError=t},"setParseErrorHandler"),lN=[],gV=!1,RTe=_(()=>nt(this,null,function*(){if(!gV){for(gV=!0;lN.length>0;){const t=lN.shift();if(t)try{yield t()}catch(e){Le.error("Error executing queue",e)}}gV=!1}}),"executeQueue"),U$t=_((t,e)=>nt(this,null,function*(){return new Promise((r,n)=>{const a=_(()=>new Promise((i,s)=>{Im.parse(t,e).then(o=>{i(o),r(o)},o=>{var u;Le.error("Error parsing",o),(u=vc.parseError)==null||u.call(vc,o),s(o),n(o)})}),"performCall");lN.push(a),RTe().catch(n)})}),"parse"),OTe=_((t,e,r)=>new Promise((n,a)=>{const i=_(()=>new Promise((s,o)=>{Im.render(t,e,r).then(u=>{s(u),n(u)},u=>{var h;Le.error("Error parsing",u),(h=vc.parseError)==null||h.call(vc,u),o(u),a(u)})}),"performCall");lN.push(i),RTe().catch(a)}),"render"),j$t=_(()=>Object.keys(im).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),vc={startOnLoad:!0,mermaidAPI:Im,parse:U$t,render:OTe,init:G$t,run:$Te,registerExternalDiagrams:q$t,registerLayoutLoaders:_we,initialize:MTe,parseError:void 0,contentLoaded:PTe,setParseErrorHandler:Y$t,detectType:kz,registerIconPacks:xW,getRegisteredDiagramsMetadata:j$t},K$t=vc;var X$t=Object.freeze({__proto__:null,default:K$t});const LR=class LR extends Error{constructor(e,r){var n="KaTeX parse error: "+e,a,i,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;a=s.start,i=s.end,a===o.length?n+=" at end of input: ":n+=" at position "+(a+1)+": ";var u=o.slice(a,i).replace(/[^]/g,"$&̲"),h;a>15?h="…"+o.slice(a-15,a):h=o.slice(0,a);var d;i+15<o.length?d=o.slice(i,i+15)+"…":d=o.slice(i),n+=h+u+d}super(n),this.name="ParseError",this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,LR.prototype),this.position=a,a!=null&&i!=null&&(this.length=i-a),this.rawMessage=e}};l(LR,"ParseError");let hr=LR;var Z$t=/([A-Z])/g,Q$t=l(t=>t.replace(Z$t,"-$1").toLowerCase(),"hyphenate"),J$t={"&":"&",">":">","<":"<",'"':""","'":"'"},eMt=/[&><"']/g,Do=l(t=>String(t).replace(eMt,e=>J$t[e]),"escape$1"),cN=l(t=>t.type==="ordgroup"||t.type==="color"?t.body.length===1?cN(t.body[0]):t:t.type==="font"?cN(t.body):t,"getBaseElem"),tMt=new Set(["mathord","textord","atom"]),gf=l(t=>tMt.has(cN(t).type),"isCharacterBox"),rMt=l(t=>{var e=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t);return e?e[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1])?null:e[1].toLowerCase():"_relative"},"protocolFromUrl"),uN={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:l(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:l((t,e)=>(e.push(t),e),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:l(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:l(t=>Math.max(0,t),"processor"),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:l(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand <n>",cliProcessor:l(t=>t==="Infinity"?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};function nMt(t){if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}l(nMt,"getImplicitDefault");function aMt(t){if(t.default!==void 0)return t.default;var e=Array.isArray(t.type)?t.type[0]:t.type;return nMt(e)}l(aMt,"getDefaultValue");function iMt(t,e,r,n){var a=r[e];t[e]=a!==void 0?n.processor?n.processor(a):a:aMt(n)}l(iMt,"applySetting");const Lre=class Lre{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r of Object.keys(uN)){var n=uN[r];n&&iMt(this,r,e,n)}}reportNonstrict(e,r,n){var a=this.strict;if(typeof a=="function"&&(a=a(e,r,n)),!(!a||a==="ignore")){if(a===!0||a==="error")throw new hr("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);a==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var a=this.strict;if(typeof a=="function")try{a=a(e,r,n)}catch(i){a="error"}return!a||a==="ignore"?!1:a===!0||a==="error"?!0:a==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+a+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var r=rMt(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}};l(Lre,"Settings");let I3=Lre;const $re=class $re{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return qh[sMt[this.id]]}sub(){return qh[oMt[this.id]]}fracNum(){return qh[lMt[this.id]]}fracDen(){return qh[cMt[this.id]]}cramp(){return qh[uMt[this.id]]}text(){return qh[hMt[this.id]]}isTight(){return this.size>=2}};l($re,"Style");let Gh=$re;var mV=0,hN=1,Qw=2,mf=3,L3=4,Zc=5,Jw=6,el=7,qh=[new Gh(mV,0,!1),new Gh(hN,0,!0),new Gh(Qw,1,!1),new Gh(mf,1,!0),new Gh(L3,2,!1),new Gh(Zc,2,!0),new Gh(Jw,3,!1),new Gh(el,3,!0)],sMt=[L3,Zc,L3,Zc,Jw,el,Jw,el],oMt=[Zc,Zc,Zc,Zc,el,el,el,el],lMt=[Qw,mf,L3,Zc,Jw,el,Jw,el],cMt=[mf,mf,Zc,Zc,el,el,el,el],uMt=[hN,hN,mf,mf,Zc,Zc,el,el],hMt=[mV,hN,Qw,mf,Qw,mf,Qw,mf],nn={DISPLAY:qh[mV],TEXT:qh[Qw],SCRIPT:qh[L3],SCRIPTSCRIPT:qh[Jw]},yV=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function dMt(t){for(var e=0;e<yV.length;e++)for(var r=yV[e],n=0;n<r.blocks.length;n++){var a=r.blocks[n];if(t>=a[0]&&t<=a[1])return r.name}return null}l(dMt,"scriptFromCodepoint");var dN=[];yV.forEach(t=>t.blocks.forEach(e=>dN.push(...e)));function DTe(t){for(var e=0;e<dN.length;e+=2)if(t>=dN[e]&&t<=dN[e+1])return!0;return!1}l(DTe,"supportedCodepoint");var us=l(t=>t+" "+t,"doubleBrushStroke"),eT=80,fMt=l(function(e,r){return"M95,"+(622+e+r)+`
|
||
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
||
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
||
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
||
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
|
||
c69,-144,104.5,-217.7,106.5,-221
|
||
l`+e/2.075+" -"+e+`
|
||
c5.3,-9.3,12,-14,20,-14
|
||
H400000v`+(40+e)+`H845.2724
|
||
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
|
||
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
|
||
M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},"sqrtMain"),pMt=l(function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119
|
||
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
|
||
c340,-704.7,510.7,-1060.3,512,-1067
|
||
l`+e/2.084+" -"+e+`
|
||
c4.7,-7.3,11,-11,19,-11
|
||
H40000v`+(40+e)+`H1012.3
|
||
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
|
||
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
|
||
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
|
||
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
|
||
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},"sqrtSize1"),gMt=l(function(e,r){return"M983 "+(10+e+r)+`
|
||
l`+e/3.13+" -"+e+`
|
||
c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
|
||
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
|
||
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
|
||
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
||
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
||
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
||
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
||
M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},"sqrtSize2"),mMt=l(function(e,r){return"M424,"+(2398+e+r)+`
|
||
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
||
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
||
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
||
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
|
||
l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
|
||
v`+(40+e)+`H1014.6
|
||
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
|
||
c-2,6,-10,9,-24,9
|
||
c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`
|
||
h400000v`+(40+e)+"h-400000z"},"sqrtSize3"),yMt=l(function(e,r){return"M473,"+(2713+e+r)+`
|
||
c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
|
||
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
|
||
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
|
||
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
|
||
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
|
||
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
|
||
606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},"sqrtSize4"),vMt=l(function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),bMt=l(function(e,r,n){var a=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
|
||
H742v`+a+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
||
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
||
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
||
219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},"sqrtTall"),xMt=l(function(e,r,n){r=1e3*r;var a="";switch(e){case"sqrtMain":a=fMt(r,eT);break;case"sqrtSize1":a=pMt(r,eT);break;case"sqrtSize2":a=gMt(r,eT);break;case"sqrtSize3":a=mMt(r,eT);break;case"sqrtSize4":a=yMt(r,eT);break;case"sqrtTall":a=bMt(r,eT,n)}return a},"sqrtPath"),wMt=l(function(e,r){switch(e){case"⎜":return us("M291 0 H417 V"+r+" H291z");case"∣":return us("M145 0 H188 V"+r+" H145z");case"∥":return us("M145 0 H188 V"+r+" H145z")+us("M367 0 H410 V"+r+" H367z");case"⎟":return us("M457 0 H583 V"+r+" H457z");case"⎢":return us("M319 0 H403 V"+r+" H319z");case"⎥":return us("M263 0 H347 V"+r+" H263z");case"⎪":return us("M384 0 H504 V"+r+" H384z");case"⏐":return us("M312 0 H355 V"+r+" H312z");case"‖":return us("M257 0 H300 V"+r+" H257z")+us("M478 0 H521 V"+r+" H478z");default:return""}},"innerPath"),FTe={doubleleftarrow:`M262 157
|
||
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
||
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
||
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
||
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
|
||
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
|
||
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
|
||
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
|
||
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
|
||
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
|
||
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
|
||
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
|
||
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
|
||
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
|
||
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
|
||
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
|
||
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
|
||
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
|
||
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
|
||
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
|
||
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
|
||
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
|
||
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
|
||
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
|
||
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
|
||
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
|
||
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
|
||
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
|
||
435 0h399565z`,leftgroupunder:`M400000 262
|
||
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
|
||
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
|
||
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
|
||
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
|
||
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
|
||
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
|
||
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
|
||
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
|
||
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
|
||
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
|
||
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
|
||
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
|
||
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
|
||
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
|
||
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
|
||
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
|
||
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
|
||
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:us("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:us("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:us("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:us("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
|
||
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
|
||
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
|
||
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:us("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334
|
||
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
|
||
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
|
||
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
|
||
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
|
||
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
|
||
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
|
||
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
|
||
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
|
||
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
|
||
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
|
||
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
|
||
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
|
||
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
|
||
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
|
||
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
|
||
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
|
||
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
|
||
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
|
||
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
|
||
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
|
||
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
|
||
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
|
||
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
|
||
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
|
||
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
|
||
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
|
||
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
|
||
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
|
||
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
|
||
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
|
||
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
|
||
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
|
||
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
|
||
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
|
||
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
|
||
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
|
||
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
|
||
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
|
||
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
|
||
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
|
||
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
|
||
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
|
||
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
|
||
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
|
||
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
|
||
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
|
||
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:us("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:us("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:us("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
|
||
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
|
||
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
|
||
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
|
||
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
|
||
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
|
||
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
|
||
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
|
||
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
|
||
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
|
||
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
|
||
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
|
||
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
|
||
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
|
||
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
|
||
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
|
||
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
|
||
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
|
||
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
|
||
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
|
||
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
|
||
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
|
||
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
|
||
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
|
||
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
|
||
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
|
||
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
|
||
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
|
||
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
|
||
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
|
||
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
|
||
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
|
||
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
|
||
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
|
||
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
|
||
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
|
||
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
|
||
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
|
||
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
|
||
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
|
||
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
|
||
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
|
||
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
|
||
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
|
||
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
|
||
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
|
||
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
|
||
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
|
||
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
|
||
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
|
||
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
|
||
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
|
||
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
|
||
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
|
||
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
|
||
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
|
||
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
|
||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
|
||
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
|
||
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
|
||
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
|
||
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
|
||
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
|
||
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
|
||
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
|
||
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},TMt=l(function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 v84 h347 v-84
|
||
H403z M403 1759 V0 H319 V1759 v`+r+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
|
||
M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
|
||
M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
|
||
c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
|
||
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
|
||
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
|
||
MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
|
||
M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
|
||
M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
|
||
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
|
||
-36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
|
||
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
|
||
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
|
||
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
|
||
l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
|
||
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
|
||
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
|
||
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
|
||
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
|
||
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
|
||
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
||
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
||
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
||
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim");function EMt(t){return"toText"in t}l(EMt,"isMathDomNode");const Mre=class Mre{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e}toText(){return this.children.map(e=>{if(EMt(e))return e.toText();throw new Error("Expected MathDomNode with toText, got "+e.constructor.name)}).join("")}};l(Mre,"DocumentFragment");let np=Mre;var vV={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},CMt={ex:!0,em:!0,mu:!0},BTe=l(function(e){return typeof e!="string"&&(e=e.unit),e in vV||e in CMt||e==="ex"},"validUnit"),oi=l(function(e,r){var n;if(e.unit in vV)n=vV[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var a;if(r.style.isTight()?a=r.havingStyle(r.style.text()):a=r,e.unit==="ex")n=a.fontMetrics().xHeight;else if(e.unit==="em")n=a.fontMetrics().quad;else throw new hr("Invalid unit: '"+e.unit+"'");a!==r&&(n*=a.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},"calculateSize"),dr=l(function(e){return+e.toFixed(4)+"em"},"makeEm"),ap=l(function(e){return e.filter(r=>r).join(" ")},"createClass"),bV=l(function(e){var r="";for(var n of Object.keys(e)){var a=e[n];a!==void 0&&(r+=Q$t(n)+":"+a+";")}return r},"cssStyleToString"),zTe=l(function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var a=r.getColor();a&&(this.style.color=a)}},"initNode"),HTe=l(function(e){var r=document.createElement(e);r.className=ap(this.classes),Object.assign(r.style,this.style);for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r},"toNode"),SMt=/[\s"'>/=\x00-\x1f]/,WTe=l(function(e){var r="<"+e;this.classes.length&&(r+=' class="'+Do(ap(this.classes))+'"');var n=bV(this.style);n&&(r+=' style="'+Do(n)+'"');for(var a of Object.keys(this.attributes)){if(SMt.test(a))throw new hr("Invalid attribute name '"+a+"'");r+=" "+a+'="'+Do(this.attributes[a])+'"'}r+=">";for(var i=0;i<this.children.length;i++)r+=this.children[i].toMarkup();return r+="</"+e+">",r},"toMarkup");const Pre=class Pre{constructor(e,r,n,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,zTe.call(this,e,n,a),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return HTe.call(this,"span")}toMarkup(){return WTe.call(this,"span")}};l(Pre,"Span");let ip=Pre,fN=(BC=class{constructor(e,r,n,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,zTe.call(this,r,a),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return HTe.call(this,"a")}toMarkup(){return WTe.call(this,"a")}},l(BC,"Anchor"),BC);const Rre=class Rre{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="mord",Object.assign(e.style,this.style),e}toMarkup(){var e='<img src="'+Do(this.src)+'"'+(' alt="'+Do(this.alt)+'"'),r=bV(this.style);return r&&(e+=' style="'+Do(r)+'"'),e+="'/>",e}};l(Rre,"Img");let xV=Rre;var _Mt={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};const Ore=class Ore{constructor(e,r,n,a,i,s,o,u){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=r||0,this.depth=n||0,this.italic=a||0,this.skew=i||0,this.width=s||0,this.classes=o||[],this.style=u||{},this.maxFontSize=0;var h=dMt(this.text.charCodeAt(0));h&&this.classes.push(h+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=_Mt[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),r=null;return this.italic>0&&(r=document.createElement("span"),r.style.marginRight=dr(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=ap(this.classes)),Object.keys(this.style).length>0&&(r=r||document.createElement("span"),Object.assign(r.style,this.style)),r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="<span";this.classes.length&&(e=!0,r+=' class="',r+=Do(ap(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+dr(this.italic)+";"),n+=bV(this.style),n&&(e=!0,r+=' style="'+Do(n)+'"');var a=Do(this.text);return e?(r+=">",r+=a,r+="</span>",r):a}};l(Ore,"SymbolNode");let tl=Ore;const Dre=class Dre{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var r of Object.keys(this.attributes))e+=" "+r+'="'+Do(this.attributes[r])+'"';e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}};l(Dre,"SvgNode");let Gu=Dre;const Fre=class Fre{constructor(e,r){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=r}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",FTe[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+Do(this.alternate)+'"/>':'<path d="'+Do(FTe[this.pathName])+'"/>'}};l(Fre,"PathNode");let Yh=Fre;const Bre=class Bre{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="<line";for(var r of Object.keys(this.attributes))e+=" "+r+'="'+Do(this.attributes[r])+'"';return e+="/>",e}};l(Bre,"LineNode");let $3=Bre;function kMt(t){if(t instanceof tl)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}l(kMt,"assertSymbolDomNode");function AMt(t){if(t instanceof ip)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}l(AMt,"assertSpan");var NMt=l(t=>t instanceof ip||t instanceof fN||t instanceof np,"hasHtmlDomChildren"),Uh={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},pN={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},VTe={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function GTe(t,e){Uh[t]=e}l(GTe,"setFontMetrics");function wV(t,e,r){if(!Uh[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),a=Uh[e][n];if(!a&&t[0]in VTe&&(n=VTe[t[0]].charCodeAt(0),a=Uh[e][n]),!a&&r==="text"&&DTe(n)&&(a=Uh[e][77]),a)return{depth:a[0],height:a[1],italic:a[2],skew:a[3],width:a[4]}}l(wV,"getCharacterMetrics");var TV={};function IMt(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!TV[e]){var r=TV[e]={cssEmPerMu:pN.quad[e]/18};for(var n in pN)pN.hasOwnProperty(n)&&(r[n]=pN[n][e])}return TV[e]}l(IMt,"getGlobalMetrics");var ti={math:{},text:{}};function he(t,e,r,n,a,i){ti[t][a]={font:e,group:r,replace:n},i&&n&&(ti[t][n]=ti[t][a])}l(he,"defineSymbol");var Te="math",nr="text",Be="main",mt="ams",ri="accent-token",Cr="bin",rl="close",tT="inner",Br="mathord",Ki="op-token",bc="open",M3="punct",xt="rel",yf="spacing",At="textord";he(Te,Be,xt,"≡","\\equiv",!0),he(Te,Be,xt,"≺","\\prec",!0),he(Te,Be,xt,"≻","\\succ",!0),he(Te,Be,xt,"∼","\\sim",!0),he(Te,Be,xt,"⊥","\\perp"),he(Te,Be,xt,"⪯","\\preceq",!0),he(Te,Be,xt,"⪰","\\succeq",!0),he(Te,Be,xt,"≃","\\simeq",!0),he(Te,Be,xt,"∣","\\mid",!0),he(Te,Be,xt,"≪","\\ll",!0),he(Te,Be,xt,"≫","\\gg",!0),he(Te,Be,xt,"≍","\\asymp",!0),he(Te,Be,xt,"∥","\\parallel"),he(Te,Be,xt,"⋈","\\bowtie",!0),he(Te,Be,xt,"⌣","\\smile",!0),he(Te,Be,xt,"⊑","\\sqsubseteq",!0),he(Te,Be,xt,"⊒","\\sqsupseteq",!0),he(Te,Be,xt,"≐","\\doteq",!0),he(Te,Be,xt,"⌢","\\frown",!0),he(Te,Be,xt,"∋","\\ni",!0),he(Te,Be,xt,"∝","\\propto",!0),he(Te,Be,xt,"⊢","\\vdash",!0),he(Te,Be,xt,"⊣","\\dashv",!0),he(Te,Be,xt,"∋","\\owns"),he(Te,Be,M3,".","\\ldotp"),he(Te,Be,M3,"⋅","\\cdotp"),he(Te,Be,M3,"⋅","·"),he(nr,Be,At,"⋅","·"),he(Te,Be,At,"#","\\#"),he(nr,Be,At,"#","\\#"),he(Te,Be,At,"&","\\&"),he(nr,Be,At,"&","\\&"),he(Te,Be,At,"ℵ","\\aleph",!0),he(Te,Be,At,"∀","\\forall",!0),he(Te,Be,At,"ℏ","\\hbar",!0),he(Te,Be,At,"∃","\\exists",!0),he(Te,Be,At,"∇","\\nabla",!0),he(Te,Be,At,"♭","\\flat",!0),he(Te,Be,At,"ℓ","\\ell",!0),he(Te,Be,At,"♮","\\natural",!0),he(Te,Be,At,"♣","\\clubsuit",!0),he(Te,Be,At,"℘","\\wp",!0),he(Te,Be,At,"♯","\\sharp",!0),he(Te,Be,At,"♢","\\diamondsuit",!0),he(Te,Be,At,"ℜ","\\Re",!0),he(Te,Be,At,"♡","\\heartsuit",!0),he(Te,Be,At,"ℑ","\\Im",!0),he(Te,Be,At,"♠","\\spadesuit",!0),he(Te,Be,At,"§","\\S",!0),he(nr,Be,At,"§","\\S"),he(Te,Be,At,"¶","\\P",!0),he(nr,Be,At,"¶","\\P"),he(Te,Be,At,"†","\\dag"),he(nr,Be,At,"†","\\dag"),he(nr,Be,At,"†","\\textdagger"),he(Te,Be,At,"‡","\\ddag"),he(nr,Be,At,"‡","\\ddag"),he(nr,Be,At,"‡","\\textdaggerdbl"),he(Te,Be,rl,"⎱","\\rmoustache",!0),he(Te,Be,bc,"⎰","\\lmoustache",!0),he(Te,Be,rl,"⟯","\\rgroup",!0),he(Te,Be,bc,"⟮","\\lgroup",!0),he(Te,Be,Cr,"∓","\\mp",!0),he(Te,Be,Cr,"⊖","\\ominus",!0),he(Te,Be,Cr,"⊎","\\uplus",!0),he(Te,Be,Cr,"⊓","\\sqcap",!0),he(Te,Be,Cr,"∗","\\ast"),he(Te,Be,Cr,"⊔","\\sqcup",!0),he(Te,Be,Cr,"◯","\\bigcirc",!0),he(Te,Be,Cr,"∙","\\bullet",!0),he(Te,Be,Cr,"‡","\\ddagger"),he(Te,Be,Cr,"≀","\\wr",!0),he(Te,Be,Cr,"⨿","\\amalg"),he(Te,Be,Cr,"&","\\And"),he(Te,Be,xt,"⟵","\\longleftarrow",!0),he(Te,Be,xt,"⇐","\\Leftarrow",!0),he(Te,Be,xt,"⟸","\\Longleftarrow",!0),he(Te,Be,xt,"⟶","\\longrightarrow",!0),he(Te,Be,xt,"⇒","\\Rightarrow",!0),he(Te,Be,xt,"⟹","\\Longrightarrow",!0),he(Te,Be,xt,"↔","\\leftrightarrow",!0),he(Te,Be,xt,"⟷","\\longleftrightarrow",!0),he(Te,Be,xt,"⇔","\\Leftrightarrow",!0),he(Te,Be,xt,"⟺","\\Longleftrightarrow",!0),he(Te,Be,xt,"↦","\\mapsto",!0),he(Te,Be,xt,"⟼","\\longmapsto",!0),he(Te,Be,xt,"↗","\\nearrow",!0),he(Te,Be,xt,"↩","\\hookleftarrow",!0),he(Te,Be,xt,"↪","\\hookrightarrow",!0),he(Te,Be,xt,"↘","\\searrow",!0),he(Te,Be,xt,"↼","\\leftharpoonup",!0),he(Te,Be,xt,"⇀","\\rightharpoonup",!0),he(Te,Be,xt,"↙","\\swarrow",!0),he(Te,Be,xt,"↽","\\leftharpoondown",!0),he(Te,Be,xt,"⇁","\\rightharpoondown",!0),he(Te,Be,xt,"↖","\\nwarrow",!0),he(Te,Be,xt,"⇌","\\rightleftharpoons",!0),he(Te,mt,xt,"≮","\\nless",!0),he(Te,mt,xt,"","\\@nleqslant"),he(Te,mt,xt,"","\\@nleqq"),he(Te,mt,xt,"⪇","\\lneq",!0),he(Te,mt,xt,"≨","\\lneqq",!0),he(Te,mt,xt,"","\\@lvertneqq"),he(Te,mt,xt,"⋦","\\lnsim",!0),he(Te,mt,xt,"⪉","\\lnapprox",!0),he(Te,mt,xt,"⊀","\\nprec",!0),he(Te,mt,xt,"⋠","\\npreceq",!0),he(Te,mt,xt,"⋨","\\precnsim",!0),he(Te,mt,xt,"⪹","\\precnapprox",!0),he(Te,mt,xt,"≁","\\nsim",!0),he(Te,mt,xt,"","\\@nshortmid"),he(Te,mt,xt,"∤","\\nmid",!0),he(Te,mt,xt,"⊬","\\nvdash",!0),he(Te,mt,xt,"⊭","\\nvDash",!0),he(Te,mt,xt,"⋪","\\ntriangleleft"),he(Te,mt,xt,"⋬","\\ntrianglelefteq",!0),he(Te,mt,xt,"⊊","\\subsetneq",!0),he(Te,mt,xt,"","\\@varsubsetneq"),he(Te,mt,xt,"⫋","\\subsetneqq",!0),he(Te,mt,xt,"","\\@varsubsetneqq"),he(Te,mt,xt,"≯","\\ngtr",!0),he(Te,mt,xt,"","\\@ngeqslant"),he(Te,mt,xt,"","\\@ngeqq"),he(Te,mt,xt,"⪈","\\gneq",!0),he(Te,mt,xt,"≩","\\gneqq",!0),he(Te,mt,xt,"","\\@gvertneqq"),he(Te,mt,xt,"⋧","\\gnsim",!0),he(Te,mt,xt,"⪊","\\gnapprox",!0),he(Te,mt,xt,"⊁","\\nsucc",!0),he(Te,mt,xt,"⋡","\\nsucceq",!0),he(Te,mt,xt,"⋩","\\succnsim",!0),he(Te,mt,xt,"⪺","\\succnapprox",!0),he(Te,mt,xt,"≆","\\ncong",!0),he(Te,mt,xt,"","\\@nshortparallel"),he(Te,mt,xt,"∦","\\nparallel",!0),he(Te,mt,xt,"⊯","\\nVDash",!0),he(Te,mt,xt,"⋫","\\ntriangleright"),he(Te,mt,xt,"⋭","\\ntrianglerighteq",!0),he(Te,mt,xt,"","\\@nsupseteqq"),he(Te,mt,xt,"⊋","\\supsetneq",!0),he(Te,mt,xt,"","\\@varsupsetneq"),he(Te,mt,xt,"⫌","\\supsetneqq",!0),he(Te,mt,xt,"","\\@varsupsetneqq"),he(Te,mt,xt,"⊮","\\nVdash",!0),he(Te,mt,xt,"⪵","\\precneqq",!0),he(Te,mt,xt,"⪶","\\succneqq",!0),he(Te,mt,xt,"","\\@nsubseteqq"),he(Te,mt,Cr,"⊴","\\unlhd"),he(Te,mt,Cr,"⊵","\\unrhd"),he(Te,mt,xt,"↚","\\nleftarrow",!0),he(Te,mt,xt,"↛","\\nrightarrow",!0),he(Te,mt,xt,"⇍","\\nLeftarrow",!0),he(Te,mt,xt,"⇏","\\nRightarrow",!0),he(Te,mt,xt,"↮","\\nleftrightarrow",!0),he(Te,mt,xt,"⇎","\\nLeftrightarrow",!0),he(Te,mt,xt,"△","\\vartriangle"),he(Te,mt,At,"ℏ","\\hslash"),he(Te,mt,At,"▽","\\triangledown"),he(Te,mt,At,"◊","\\lozenge"),he(Te,mt,At,"Ⓢ","\\circledS"),he(Te,mt,At,"®","\\circledR"),he(nr,mt,At,"®","\\circledR"),he(Te,mt,At,"∡","\\measuredangle",!0),he(Te,mt,At,"∄","\\nexists"),he(Te,mt,At,"℧","\\mho"),he(Te,mt,At,"Ⅎ","\\Finv",!0),he(Te,mt,At,"⅁","\\Game",!0),he(Te,mt,At,"‵","\\backprime"),he(Te,mt,At,"▲","\\blacktriangle"),he(Te,mt,At,"▼","\\blacktriangledown"),he(Te,mt,At,"■","\\blacksquare"),he(Te,mt,At,"⧫","\\blacklozenge"),he(Te,mt,At,"★","\\bigstar"),he(Te,mt,At,"∢","\\sphericalangle",!0),he(Te,mt,At,"∁","\\complement",!0),he(Te,mt,At,"ð","\\eth",!0),he(nr,Be,At,"ð","ð"),he(Te,mt,At,"╱","\\diagup"),he(Te,mt,At,"╲","\\diagdown"),he(Te,mt,At,"□","\\square"),he(Te,mt,At,"□","\\Box"),he(Te,mt,At,"◊","\\Diamond"),he(Te,mt,At,"¥","\\yen",!0),he(nr,mt,At,"¥","\\yen",!0),he(Te,mt,At,"✓","\\checkmark",!0),he(nr,mt,At,"✓","\\checkmark"),he(Te,mt,At,"ℶ","\\beth",!0),he(Te,mt,At,"ℸ","\\daleth",!0),he(Te,mt,At,"ℷ","\\gimel",!0),he(Te,mt,At,"ϝ","\\digamma",!0),he(Te,mt,At,"ϰ","\\varkappa"),he(Te,mt,bc,"┌","\\@ulcorner",!0),he(Te,mt,rl,"┐","\\@urcorner",!0),he(Te,mt,bc,"└","\\@llcorner",!0),he(Te,mt,rl,"┘","\\@lrcorner",!0),he(Te,mt,xt,"≦","\\leqq",!0),he(Te,mt,xt,"⩽","\\leqslant",!0),he(Te,mt,xt,"⪕","\\eqslantless",!0),he(Te,mt,xt,"≲","\\lesssim",!0),he(Te,mt,xt,"⪅","\\lessapprox",!0),he(Te,mt,xt,"≊","\\approxeq",!0),he(Te,mt,Cr,"⋖","\\lessdot"),he(Te,mt,xt,"⋘","\\lll",!0),he(Te,mt,xt,"≶","\\lessgtr",!0),he(Te,mt,xt,"⋚","\\lesseqgtr",!0),he(Te,mt,xt,"⪋","\\lesseqqgtr",!0),he(Te,mt,xt,"≑","\\doteqdot"),he(Te,mt,xt,"≓","\\risingdotseq",!0),he(Te,mt,xt,"≒","\\fallingdotseq",!0),he(Te,mt,xt,"∽","\\backsim",!0),he(Te,mt,xt,"⋍","\\backsimeq",!0),he(Te,mt,xt,"⫅","\\subseteqq",!0),he(Te,mt,xt,"⋐","\\Subset",!0),he(Te,mt,xt,"⊏","\\sqsubset",!0),he(Te,mt,xt,"≼","\\preccurlyeq",!0),he(Te,mt,xt,"⋞","\\curlyeqprec",!0),he(Te,mt,xt,"≾","\\precsim",!0),he(Te,mt,xt,"⪷","\\precapprox",!0),he(Te,mt,xt,"⊲","\\vartriangleleft"),he(Te,mt,xt,"⊴","\\trianglelefteq"),he(Te,mt,xt,"⊨","\\vDash",!0),he(Te,mt,xt,"⊪","\\Vvdash",!0),he(Te,mt,xt,"⌣","\\smallsmile"),he(Te,mt,xt,"⌢","\\smallfrown"),he(Te,mt,xt,"≏","\\bumpeq",!0),he(Te,mt,xt,"≎","\\Bumpeq",!0),he(Te,mt,xt,"≧","\\geqq",!0),he(Te,mt,xt,"⩾","\\geqslant",!0),he(Te,mt,xt,"⪖","\\eqslantgtr",!0),he(Te,mt,xt,"≳","\\gtrsim",!0),he(Te,mt,xt,"⪆","\\gtrapprox",!0),he(Te,mt,Cr,"⋗","\\gtrdot"),he(Te,mt,xt,"⋙","\\ggg",!0),he(Te,mt,xt,"≷","\\gtrless",!0),he(Te,mt,xt,"⋛","\\gtreqless",!0),he(Te,mt,xt,"⪌","\\gtreqqless",!0),he(Te,mt,xt,"≖","\\eqcirc",!0),he(Te,mt,xt,"≗","\\circeq",!0),he(Te,mt,xt,"≜","\\triangleq",!0),he(Te,mt,xt,"∼","\\thicksim"),he(Te,mt,xt,"≈","\\thickapprox"),he(Te,mt,xt,"⫆","\\supseteqq",!0),he(Te,mt,xt,"⋑","\\Supset",!0),he(Te,mt,xt,"⊐","\\sqsupset",!0),he(Te,mt,xt,"≽","\\succcurlyeq",!0),he(Te,mt,xt,"⋟","\\curlyeqsucc",!0),he(Te,mt,xt,"≿","\\succsim",!0),he(Te,mt,xt,"⪸","\\succapprox",!0),he(Te,mt,xt,"⊳","\\vartriangleright"),he(Te,mt,xt,"⊵","\\trianglerighteq"),he(Te,mt,xt,"⊩","\\Vdash",!0),he(Te,mt,xt,"∣","\\shortmid"),he(Te,mt,xt,"∥","\\shortparallel"),he(Te,mt,xt,"≬","\\between",!0),he(Te,mt,xt,"⋔","\\pitchfork",!0),he(Te,mt,xt,"∝","\\varpropto"),he(Te,mt,xt,"◀","\\blacktriangleleft"),he(Te,mt,xt,"∴","\\therefore",!0),he(Te,mt,xt,"∍","\\backepsilon"),he(Te,mt,xt,"▶","\\blacktriangleright"),he(Te,mt,xt,"∵","\\because",!0),he(Te,mt,xt,"⋘","\\llless"),he(Te,mt,xt,"⋙","\\gggtr"),he(Te,mt,Cr,"⊲","\\lhd"),he(Te,mt,Cr,"⊳","\\rhd"),he(Te,mt,xt,"≂","\\eqsim",!0),he(Te,Be,xt,"⋈","\\Join"),he(Te,mt,xt,"≑","\\Doteq",!0),he(Te,mt,Cr,"∔","\\dotplus",!0),he(Te,mt,Cr,"∖","\\smallsetminus"),he(Te,mt,Cr,"⋒","\\Cap",!0),he(Te,mt,Cr,"⋓","\\Cup",!0),he(Te,mt,Cr,"⩞","\\doublebarwedge",!0),he(Te,mt,Cr,"⊟","\\boxminus",!0),he(Te,mt,Cr,"⊞","\\boxplus",!0),he(Te,mt,Cr,"⋇","\\divideontimes",!0),he(Te,mt,Cr,"⋉","\\ltimes",!0),he(Te,mt,Cr,"⋊","\\rtimes",!0),he(Te,mt,Cr,"⋋","\\leftthreetimes",!0),he(Te,mt,Cr,"⋌","\\rightthreetimes",!0),he(Te,mt,Cr,"⋏","\\curlywedge",!0),he(Te,mt,Cr,"⋎","\\curlyvee",!0),he(Te,mt,Cr,"⊝","\\circleddash",!0),he(Te,mt,Cr,"⊛","\\circledast",!0),he(Te,mt,Cr,"⋅","\\centerdot"),he(Te,mt,Cr,"⊺","\\intercal",!0),he(Te,mt,Cr,"⋒","\\doublecap"),he(Te,mt,Cr,"⋓","\\doublecup"),he(Te,mt,Cr,"⊠","\\boxtimes",!0),he(Te,mt,xt,"⇢","\\dashrightarrow",!0),he(Te,mt,xt,"⇠","\\dashleftarrow",!0),he(Te,mt,xt,"⇇","\\leftleftarrows",!0),he(Te,mt,xt,"⇆","\\leftrightarrows",!0),he(Te,mt,xt,"⇚","\\Lleftarrow",!0),he(Te,mt,xt,"↞","\\twoheadleftarrow",!0),he(Te,mt,xt,"↢","\\leftarrowtail",!0),he(Te,mt,xt,"↫","\\looparrowleft",!0),he(Te,mt,xt,"⇋","\\leftrightharpoons",!0),he(Te,mt,xt,"↶","\\curvearrowleft",!0),he(Te,mt,xt,"↺","\\circlearrowleft",!0),he(Te,mt,xt,"↰","\\Lsh",!0),he(Te,mt,xt,"⇈","\\upuparrows",!0),he(Te,mt,xt,"↿","\\upharpoonleft",!0),he(Te,mt,xt,"⇃","\\downharpoonleft",!0),he(Te,Be,xt,"⊶","\\origof",!0),he(Te,Be,xt,"⊷","\\imageof",!0),he(Te,mt,xt,"⊸","\\multimap",!0),he(Te,mt,xt,"↭","\\leftrightsquigarrow",!0),he(Te,mt,xt,"⇉","\\rightrightarrows",!0),he(Te,mt,xt,"⇄","\\rightleftarrows",!0),he(Te,mt,xt,"↠","\\twoheadrightarrow",!0),he(Te,mt,xt,"↣","\\rightarrowtail",!0),he(Te,mt,xt,"↬","\\looparrowright",!0),he(Te,mt,xt,"↷","\\curvearrowright",!0),he(Te,mt,xt,"↻","\\circlearrowright",!0),he(Te,mt,xt,"↱","\\Rsh",!0),he(Te,mt,xt,"⇊","\\downdownarrows",!0),he(Te,mt,xt,"↾","\\upharpoonright",!0),he(Te,mt,xt,"⇂","\\downharpoonright",!0),he(Te,mt,xt,"⇝","\\rightsquigarrow",!0),he(Te,mt,xt,"⇝","\\leadsto"),he(Te,mt,xt,"⇛","\\Rrightarrow",!0),he(Te,mt,xt,"↾","\\restriction"),he(Te,Be,At,"‘","`"),he(Te,Be,At,"$","\\$"),he(nr,Be,At,"$","\\$"),he(nr,Be,At,"$","\\textdollar"),he(Te,Be,At,"%","\\%"),he(nr,Be,At,"%","\\%"),he(Te,Be,At,"_","\\_"),he(nr,Be,At,"_","\\_"),he(nr,Be,At,"_","\\textunderscore"),he(Te,Be,At,"∠","\\angle",!0),he(Te,Be,At,"∞","\\infty",!0),he(Te,Be,At,"′","\\prime"),he(Te,Be,At,"△","\\triangle"),he(Te,Be,At,"Γ","\\Gamma",!0),he(Te,Be,At,"Δ","\\Delta",!0),he(Te,Be,At,"Θ","\\Theta",!0),he(Te,Be,At,"Λ","\\Lambda",!0),he(Te,Be,At,"Ξ","\\Xi",!0),he(Te,Be,At,"Π","\\Pi",!0),he(Te,Be,At,"Σ","\\Sigma",!0),he(Te,Be,At,"Υ","\\Upsilon",!0),he(Te,Be,At,"Φ","\\Phi",!0),he(Te,Be,At,"Ψ","\\Psi",!0),he(Te,Be,At,"Ω","\\Omega",!0),he(Te,Be,At,"A","Α"),he(Te,Be,At,"B","Β"),he(Te,Be,At,"E","Ε"),he(Te,Be,At,"Z","Ζ"),he(Te,Be,At,"H","Η"),he(Te,Be,At,"I","Ι"),he(Te,Be,At,"K","Κ"),he(Te,Be,At,"M","Μ"),he(Te,Be,At,"N","Ν"),he(Te,Be,At,"O","Ο"),he(Te,Be,At,"P","Ρ"),he(Te,Be,At,"T","Τ"),he(Te,Be,At,"X","Χ"),he(Te,Be,At,"¬","\\neg",!0),he(Te,Be,At,"¬","\\lnot"),he(Te,Be,At,"⊤","\\top"),he(Te,Be,At,"⊥","\\bot"),he(Te,Be,At,"∅","\\emptyset"),he(Te,mt,At,"∅","\\varnothing"),he(Te,Be,Br,"α","\\alpha",!0),he(Te,Be,Br,"β","\\beta",!0),he(Te,Be,Br,"γ","\\gamma",!0),he(Te,Be,Br,"δ","\\delta",!0),he(Te,Be,Br,"ϵ","\\epsilon",!0),he(Te,Be,Br,"ζ","\\zeta",!0),he(Te,Be,Br,"η","\\eta",!0),he(Te,Be,Br,"θ","\\theta",!0),he(Te,Be,Br,"ι","\\iota",!0),he(Te,Be,Br,"κ","\\kappa",!0),he(Te,Be,Br,"λ","\\lambda",!0),he(Te,Be,Br,"μ","\\mu",!0),he(Te,Be,Br,"ν","\\nu",!0),he(Te,Be,Br,"ξ","\\xi",!0),he(Te,Be,Br,"ο","\\omicron",!0),he(Te,Be,Br,"π","\\pi",!0),he(Te,Be,Br,"ρ","\\rho",!0),he(Te,Be,Br,"σ","\\sigma",!0),he(Te,Be,Br,"τ","\\tau",!0),he(Te,Be,Br,"υ","\\upsilon",!0),he(Te,Be,Br,"ϕ","\\phi",!0),he(Te,Be,Br,"χ","\\chi",!0),he(Te,Be,Br,"ψ","\\psi",!0),he(Te,Be,Br,"ω","\\omega",!0),he(Te,Be,Br,"ε","\\varepsilon",!0),he(Te,Be,Br,"ϑ","\\vartheta",!0),he(Te,Be,Br,"ϖ","\\varpi",!0),he(Te,Be,Br,"ϱ","\\varrho",!0),he(Te,Be,Br,"ς","\\varsigma",!0),he(Te,Be,Br,"φ","\\varphi",!0),he(Te,Be,Cr,"∗","*",!0),he(Te,Be,Cr,"+","+"),he(Te,Be,Cr,"−","-",!0),he(Te,Be,Cr,"⋅","\\cdot",!0),he(Te,Be,Cr,"∘","\\circ",!0),he(Te,Be,Cr,"÷","\\div",!0),he(Te,Be,Cr,"±","\\pm",!0),he(Te,Be,Cr,"×","\\times",!0),he(Te,Be,Cr,"∩","\\cap",!0),he(Te,Be,Cr,"∪","\\cup",!0),he(Te,Be,Cr,"∖","\\setminus",!0),he(Te,Be,Cr,"∧","\\land"),he(Te,Be,Cr,"∨","\\lor"),he(Te,Be,Cr,"∧","\\wedge",!0),he(Te,Be,Cr,"∨","\\vee",!0),he(Te,Be,At,"√","\\surd"),he(Te,Be,bc,"⟨","\\langle",!0),he(Te,Be,bc,"∣","\\lvert"),he(Te,Be,bc,"∥","\\lVert"),he(Te,Be,rl,"?","?"),he(Te,Be,rl,"!","!"),he(Te,Be,rl,"⟩","\\rangle",!0),he(Te,Be,rl,"∣","\\rvert"),he(Te,Be,rl,"∥","\\rVert"),he(Te,Be,xt,"=","="),he(Te,Be,xt,":",":"),he(Te,Be,xt,"≈","\\approx",!0),he(Te,Be,xt,"≅","\\cong",!0),he(Te,Be,xt,"≥","\\ge"),he(Te,Be,xt,"≥","\\geq",!0),he(Te,Be,xt,"←","\\gets"),he(Te,Be,xt,">","\\gt",!0),he(Te,Be,xt,"∈","\\in",!0),he(Te,Be,xt,"","\\@not"),he(Te,Be,xt,"⊂","\\subset",!0),he(Te,Be,xt,"⊃","\\supset",!0),he(Te,Be,xt,"⊆","\\subseteq",!0),he(Te,Be,xt,"⊇","\\supseteq",!0),he(Te,mt,xt,"⊈","\\nsubseteq",!0),he(Te,mt,xt,"⊉","\\nsupseteq",!0),he(Te,Be,xt,"⊨","\\models"),he(Te,Be,xt,"←","\\leftarrow",!0),he(Te,Be,xt,"≤","\\le"),he(Te,Be,xt,"≤","\\leq",!0),he(Te,Be,xt,"<","\\lt",!0),he(Te,Be,xt,"→","\\rightarrow",!0),he(Te,Be,xt,"→","\\to"),he(Te,mt,xt,"≱","\\ngeq",!0),he(Te,mt,xt,"≰","\\nleq",!0),he(Te,Be,yf," ","\\ "),he(Te,Be,yf," ","\\space"),he(Te,Be,yf," ","\\nobreakspace"),he(nr,Be,yf," ","\\ "),he(nr,Be,yf," "," "),he(nr,Be,yf," ","\\space"),he(nr,Be,yf," ","\\nobreakspace"),he(Te,Be,yf,"","\\nobreak"),he(Te,Be,yf,"","\\allowbreak"),he(Te,Be,M3,",",","),he(Te,Be,M3,";",";"),he(Te,mt,Cr,"⊼","\\barwedge",!0),he(Te,mt,Cr,"⊻","\\veebar",!0),he(Te,Be,Cr,"⊙","\\odot",!0),he(Te,Be,Cr,"⊕","\\oplus",!0),he(Te,Be,Cr,"⊗","\\otimes",!0),he(Te,Be,At,"∂","\\partial",!0),he(Te,Be,Cr,"⊘","\\oslash",!0),he(Te,mt,Cr,"⊚","\\circledcirc",!0),he(Te,mt,Cr,"⊡","\\boxdot",!0),he(Te,Be,Cr,"△","\\bigtriangleup"),he(Te,Be,Cr,"▽","\\bigtriangledown"),he(Te,Be,Cr,"†","\\dagger"),he(Te,Be,Cr,"⋄","\\diamond"),he(Te,Be,Cr,"⋆","\\star"),he(Te,Be,Cr,"◃","\\triangleleft"),he(Te,Be,Cr,"▹","\\triangleright"),he(Te,Be,bc,"{","\\{"),he(nr,Be,At,"{","\\{"),he(nr,Be,At,"{","\\textbraceleft"),he(Te,Be,rl,"}","\\}"),he(nr,Be,At,"}","\\}"),he(nr,Be,At,"}","\\textbraceright"),he(Te,Be,bc,"{","\\lbrace"),he(Te,Be,rl,"}","\\rbrace"),he(Te,Be,bc,"[","\\lbrack",!0),he(nr,Be,At,"[","\\lbrack",!0),he(Te,Be,rl,"]","\\rbrack",!0),he(nr,Be,At,"]","\\rbrack",!0),he(Te,Be,bc,"(","\\lparen",!0),he(Te,Be,rl,")","\\rparen",!0),he(nr,Be,At,"<","\\textless",!0),he(nr,Be,At,">","\\textgreater",!0),he(Te,Be,bc,"⌊","\\lfloor",!0),he(Te,Be,rl,"⌋","\\rfloor",!0),he(Te,Be,bc,"⌈","\\lceil",!0),he(Te,Be,rl,"⌉","\\rceil",!0),he(Te,Be,At,"\\","\\backslash"),he(Te,Be,At,"∣","|"),he(Te,Be,At,"∣","\\vert"),he(nr,Be,At,"|","\\textbar",!0),he(Te,Be,At,"∥","\\|"),he(Te,Be,At,"∥","\\Vert"),he(nr,Be,At,"∥","\\textbardbl"),he(nr,Be,At,"~","\\textasciitilde"),he(nr,Be,At,"\\","\\textbackslash"),he(nr,Be,At,"^","\\textasciicircum"),he(Te,Be,xt,"↑","\\uparrow",!0),he(Te,Be,xt,"⇑","\\Uparrow",!0),he(Te,Be,xt,"↓","\\downarrow",!0),he(Te,Be,xt,"⇓","\\Downarrow",!0),he(Te,Be,xt,"↕","\\updownarrow",!0),he(Te,Be,xt,"⇕","\\Updownarrow",!0),he(Te,Be,Ki,"∐","\\coprod"),he(Te,Be,Ki,"⋁","\\bigvee"),he(Te,Be,Ki,"⋀","\\bigwedge"),he(Te,Be,Ki,"⨄","\\biguplus"),he(Te,Be,Ki,"⋂","\\bigcap"),he(Te,Be,Ki,"⋃","\\bigcup"),he(Te,Be,Ki,"∫","\\int"),he(Te,Be,Ki,"∫","\\intop"),he(Te,Be,Ki,"∬","\\iint"),he(Te,Be,Ki,"∭","\\iiint"),he(Te,Be,Ki,"∏","\\prod"),he(Te,Be,Ki,"∑","\\sum"),he(Te,Be,Ki,"⨂","\\bigotimes"),he(Te,Be,Ki,"⨁","\\bigoplus"),he(Te,Be,Ki,"⨀","\\bigodot"),he(Te,Be,Ki,"∮","\\oint"),he(Te,Be,Ki,"∯","\\oiint"),he(Te,Be,Ki,"∰","\\oiiint"),he(Te,Be,Ki,"⨆","\\bigsqcup"),he(Te,Be,Ki,"∫","\\smallint"),he(nr,Be,tT,"…","\\textellipsis"),he(Te,Be,tT,"…","\\mathellipsis"),he(nr,Be,tT,"…","\\ldots",!0),he(Te,Be,tT,"…","\\ldots",!0),he(Te,Be,tT,"⋯","\\@cdots",!0),he(Te,Be,tT,"⋱","\\ddots",!0),he(Te,Be,At,"⋮","\\varvdots"),he(nr,Be,At,"⋮","\\varvdots"),he(Te,Be,ri,"ˊ","\\acute"),he(Te,Be,ri,"ˋ","\\grave"),he(Te,Be,ri,"¨","\\ddot"),he(Te,Be,ri,"~","\\tilde"),he(Te,Be,ri,"ˉ","\\bar"),he(Te,Be,ri,"˘","\\breve"),he(Te,Be,ri,"ˇ","\\check"),he(Te,Be,ri,"^","\\hat"),he(Te,Be,ri,"⃗","\\vec"),he(Te,Be,ri,"˙","\\dot"),he(Te,Be,ri,"˚","\\mathring"),he(Te,Be,Br,"","\\@imath"),he(Te,Be,Br,"","\\@jmath"),he(Te,Be,At,"ı","ı"),he(Te,Be,At,"ȷ","ȷ"),he(nr,Be,At,"ı","\\i",!0),he(nr,Be,At,"ȷ","\\j",!0),he(nr,Be,At,"ß","\\ss",!0),he(nr,Be,At,"æ","\\ae",!0),he(nr,Be,At,"œ","\\oe",!0),he(nr,Be,At,"ø","\\o",!0),he(nr,Be,At,"Æ","\\AE",!0),he(nr,Be,At,"Œ","\\OE",!0),he(nr,Be,At,"Ø","\\O",!0),he(nr,Be,ri,"ˊ","\\'"),he(nr,Be,ri,"ˋ","\\`"),he(nr,Be,ri,"ˆ","\\^"),he(nr,Be,ri,"˜","\\~"),he(nr,Be,ri,"ˉ","\\="),he(nr,Be,ri,"˘","\\u"),he(nr,Be,ri,"˙","\\."),he(nr,Be,ri,"¸","\\c"),he(nr,Be,ri,"˚","\\r"),he(nr,Be,ri,"ˇ","\\v"),he(nr,Be,ri,"¨",'\\"'),he(nr,Be,ri,"˝","\\H"),he(nr,Be,ri,"◯","\\textcircled");var qTe={"--":!0,"---":!0,"``":!0,"''":!0};he(nr,Be,At,"–","--",!0),he(nr,Be,At,"–","\\textendash"),he(nr,Be,At,"—","---",!0),he(nr,Be,At,"—","\\textemdash"),he(nr,Be,At,"‘","`",!0),he(nr,Be,At,"‘","\\textquoteleft"),he(nr,Be,At,"’","'",!0),he(nr,Be,At,"’","\\textquoteright"),he(nr,Be,At,"“","``",!0),he(nr,Be,At,"“","\\textquotedblleft"),he(nr,Be,At,"”","''",!0),he(nr,Be,At,"”","\\textquotedblright"),he(Te,Be,At,"°","\\degree",!0),he(nr,Be,At,"°","\\degree"),he(nr,Be,At,"°","\\textdegree",!0),he(Te,Be,At,"£","\\pounds"),he(Te,Be,At,"£","\\mathsterling",!0),he(nr,Be,At,"£","\\pounds"),he(nr,Be,At,"£","\\textsterling",!0),he(Te,mt,At,"✠","\\maltese"),he(nr,mt,At,"✠","\\maltese");for(var YTe='0123456789/@."',EV=0;EV<YTe.length;EV++){var UTe=YTe.charAt(EV);he(Te,Be,At,UTe,UTe)}for(var jTe='0123456789!@*()-=+";:?/.,',CV=0;CV<jTe.length;CV++){var KTe=jTe.charAt(CV);he(nr,Be,At,KTe,KTe)}for(var gN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",SV=0;SV<gN.length;SV++){var mN=gN.charAt(SV);he(Te,Be,Br,mN,mN),he(nr,Be,At,mN,mN)}he(Te,mt,At,"C","ℂ"),he(nr,mt,At,"C","ℂ"),he(Te,mt,At,"H","ℍ"),he(nr,mt,At,"H","ℍ"),he(Te,mt,At,"N","ℕ"),he(nr,mt,At,"N","ℕ"),he(Te,mt,At,"P","ℙ"),he(nr,mt,At,"P","ℙ"),he(Te,mt,At,"Q","ℚ"),he(nr,mt,At,"Q","ℚ"),he(Te,mt,At,"R","ℝ"),he(nr,mt,At,"R","ℝ"),he(Te,mt,At,"Z","ℤ"),he(nr,mt,At,"Z","ℤ"),he(Te,Be,Br,"h","ℎ"),he(nr,Be,Br,"h","ℎ");for(var Jr,nl=0;nl<gN.length;nl++){var bi=gN.charAt(nl);Jr=String.fromCharCode(55349,56320+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56372+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56424+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56580+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56684+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56736+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56788+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56840+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56944+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),nl<26&&(Jr=String.fromCharCode(55349,56632+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr),Jr=String.fromCharCode(55349,56476+nl),he(Te,Be,Br,bi,Jr),he(nr,Be,At,bi,Jr))}Jr="𝕜",he(Te,Be,Br,"k",Jr),he(nr,Be,At,"k",Jr);for(var Lm=0;Lm<10;Lm++){var sp=Lm.toString();Jr=String.fromCharCode(55349,57294+Lm),he(Te,Be,Br,sp,Jr),he(nr,Be,At,sp,Jr),Jr=String.fromCharCode(55349,57314+Lm),he(Te,Be,Br,sp,Jr),he(nr,Be,At,sp,Jr),Jr=String.fromCharCode(55349,57324+Lm),he(Te,Be,Br,sp,Jr),he(nr,Be,At,sp,Jr),Jr=String.fromCharCode(55349,57334+Lm),he(Te,Be,Br,sp,Jr),he(nr,Be,At,sp,Jr)}for(var _V="ÐÞþ",kV=0;kV<_V.length;kV++){var yN=_V.charAt(kV);he(Te,Be,Br,yN,yN),he(nr,Be,At,yN,yN)}var AV={mathClass:"mathbf",textClass:"textbf",font:"Main-Bold"},XTe={mathClass:"mathnormal",textClass:"textit",font:"Math-Italic"},ZTe={mathClass:"boldsymbol",textClass:"boldsymbol",font:"Main-BoldItalic"},LMt={mathClass:"mathscr",textClass:"textscr",font:"Script-Regular"},$m={mathClass:"",textClass:"",font:""},QTe={mathClass:"mathfrak",textClass:"textfrak",font:"Fraktur-Regular"},JTe={mathClass:"mathbb",textClass:"textbb",font:"AMS-Regular"},eEe={mathClass:"mathboldfrak",textClass:"textboldfrak",font:"Fraktur-Regular"},NV={mathClass:"mathsf",textClass:"textsf",font:"SansSerif-Regular"},IV={mathClass:"mathboldsf",textClass:"textboldsf",font:"SansSerif-Bold"},tEe={mathClass:"mathitsf",textClass:"textitsf",font:"SansSerif-Italic"},LV={mathClass:"mathtt",textClass:"texttt",font:"Typewriter-Regular"},rEe=[AV,AV,XTe,XTe,ZTe,ZTe,LMt,$m,$m,$m,QTe,QTe,JTe,JTe,eEe,eEe,NV,NV,IV,IV,tEe,tEe,$m,$m,LV,LV],$Mt=[AV,$m,NV,IV,LV],MMt=l(t=>{var e=t.charCodeAt(0),r=t.charCodeAt(1),n=(e-55296)*1024+(r-56320)+65536;if(119808<=n&&n<120484){var a=Math.floor((n-119808)/26);return rEe[a]}else if(120782<=n&&n<=120831){var i=Math.floor((n-120782)/10);return $Mt[i]}else{if(n===120485||n===120486)return rEe[0];if(120486<n&&n<120782)return $m;throw new hr("Unsupported character: "+t)}},"wideCharacterFont"),vN=l(function(e,r,n){if(ti[n][e]){var a=ti[n][e].replace;a&&(e=a)}return{value:e,metrics:wV(e,r,n)}},"lookupSymbol"),al=l(function(e,r,n,a,i){var s=vN(e,r,n),o=s.metrics;e=s.value;var u;if(o){var h=o.italic;(n==="text"||a&&a.font==="mathit")&&(h=0),u=new tl(e,o.height,o.depth,h,o.skew,o.width,i)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+e+"' in style '"+r+"' and mode '"+n+"'")),u=new tl(e,0,0,0,0,0,i);if(a){u.maxFontSize=a.sizeMultiplier,a.style.isTight()&&u.classes.push("mtight");var d=a.getColor();d&&(u.style.color=d)}return u},"makeSymbol"),$V=l(function(e,r,n,a){return a===void 0&&(a=[]),n.font==="boldsymbol"&&vN(e,"Main-Bold",r).metrics?al(e,"Main-Bold",r,n,a.concat(["mathbf"])):e==="\\"||ti[r][e].font==="main"?al(e,"Main-Regular",r,n,a):al(e,"AMS-Regular",r,n,a.concat(["amsrm"]))},"mathsym"),PMt=l(function(e,r,n){return n!=="textord"&&vN(e,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},"boldSymbol"),bN=l(function(e,r,n){var a=e.mode,i=e.text,s=["mord"],{font:o,fontFamily:u,fontWeight:h,fontShape:d}=r,f=a==="math"||a==="text"&&!!o,p=f?o:u,g="",m="";if(i.charCodeAt(0)===55349){var y=MMt(i);g=y.font,m=y[a+"Class"]}if(g)return al(i,g,a,r,s.concat(m));if(p){var v,b;if(p==="boldsymbol"){var w=PMt(i,a,n);v=w.fontName,b=[w.fontClass]}else f?(v=PV[o].fontName,b=[o]):(v=xN(u,h,d),b=[u,h,d]);if(vN(i,v,a).metrics)return al(i,v,a,r,s.concat(b));if(qTe.hasOwnProperty(i)&&v.slice(0,10)==="Typewriter"){for(var x=[],T=0;T<i.length;T++)x.push(al(i[T],v,a,r,s.concat(b)));return vf(x)}}if(n==="mathord")return al(i,"Math-Italic",a,r,s.concat(["mathnormal"]));if(n==="textord"){var C=ti[a][i]&&ti[a][i].font;if(C==="ams"){var S=xN("amsrm",h,d);return al(i,S,a,r,s.concat("amsrm",h,d))}else if(C==="main"||!C){var E=xN("textrm",h,d);return al(i,E,a,r,s.concat(h,d))}else{var k=xN(C,h,d);return al(i,k,a,r,s.concat(k,h,d))}}else throw new Error("unexpected type: "+n+" in makeOrd")},"makeOrd"),RMt=l((t,e)=>{if(ap(t.classes)!==ap(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize||t.italic!==0&&t.hasClass("mathnormal"))return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(t.style))if(t.style[n]!==e.style[n])return!1;for(var a of Object.keys(e.style))if(t.style[a]!==e.style[a])return!1;return!0},"canCombine"),nEe=l(t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof tl&&n instanceof tl&&RMt(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t},"tryCombineChars"),MV=l(function(e){for(var r=0,n=0,a=0,i=0;i<e.children.length;i++){var s=e.children[i];s.height>r&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>a&&(a=s.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=a},"sizeElementFromChildren"),sr=l(function(e,r,n,a){var i=new ip(e,r,n,a);return MV(i),i},"makeSpan"),op=l((t,e,r,n)=>new ip(t,e,r,n),"makeSvgSpan"),rT=l(function(e,r,n){var a=sr([e],[],r);return a.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),a.style.borderBottomWidth=dr(a.height),a.maxFontSize=1,a},"makeLineSpan"),OMt=l(function(e,r,n,a){var i=new fN(e,r,n,a);return MV(i),i},"makeAnchor"),vf=l(function(e){var r=new np(e);return MV(r),r},"makeFragment"),nT=l(function(e,r){return e instanceof np?sr([],[e],r):e},"wrapFragment"),DMt=l(function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],a=-r[0].shift-r[0].elem.depth,i=a,s=1;s<r.length;s++){var o=-r[s].shift-i-r[s].elem.depth,u=o-(r[s-1].elem.height+r[s-1].elem.depth);i=i+o,n.push({type:"kern",size:u}),n.push(r[s])}return{children:n,depth:a}}var h;if(e.positionType==="top"){for(var d=e.positionData,f=0;f<e.children.length;f++){var p=e.children[f];d-=p.type==="kern"?p.size:p.elem.height+p.elem.depth}h=d}else if(e.positionType==="bottom")h=-e.positionData;else{var g=e.children[0];if(g.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")h=-g.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")h=-g.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:h}},"getVListChildrenAndDepth"),Zn=l(function(e,r){for(var{children:n,depth:a}=DMt(e),i=0,s=0;s<n.length;s++){var o=n[s];if(o.type==="elem"){var u=o.elem;i=Math.max(i,u.maxFontSize,u.height)}}i+=2;var h=sr(["pstrut"],[]);h.style.height=dr(i);for(var d=[],f=a,p=a,g=a,m=0;m<n.length;m++){var y=n[m];if(y.type==="kern")g+=y.size;else{var v=y.elem,b=y.wrapperClasses||[],w=y.wrapperStyle||{},x=sr(b,[h,v],void 0,w);x.style.top=dr(-i-g-v.depth),y.marginLeft&&(x.style.marginLeft=y.marginLeft),y.marginRight&&(x.style.marginRight=y.marginRight),d.push(x),g+=v.height+v.depth}f=Math.min(f,g),p=Math.max(p,g)}var T=sr(["vlist"],d);T.style.height=dr(p);var C;if(f<0){var S=sr([],[]),E=sr(["vlist"],[S]);E.style.height=dr(-f);var k=sr(["vlist-s"],[new tl("")]);C=[sr(["vlist-r"],[T,k]),sr(["vlist-r"],[E])]}else C=[sr(["vlist-r"],[T])];var A=sr(["vlist-t"],C);return C.length===2&&A.classes.push("vlist-t2"),A.height=p,A.depth=-f,A},"makeVList"),aEe=l((t,e)=>{var r=sr(["mspace"],[],e),n=oi(t,e);return r.style.marginRight=dr(n),r},"makeGlue"),xN=l((t,e,r)=>{var n,a;switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return e==="textbf"&&r==="textit"?a="BoldItalic":e==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",n+"-"+a},"retrieveTextFontName"),PV={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},iEe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},sEe=l(function(e,r){var[n,a,i]=iEe[e],s=new Yh(n),o=new Gu([s],{width:dr(a),height:dr(i),style:"width:"+dr(a),viewBox:"0 0 "+1e3*a+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),u=op(["overlay"],[o],r);return u.height=i,u.style.height=dr(i),u.style.width=dr(a),u},"staticSvg"),li={number:3,unit:"mu"},Mm={number:4,unit:"mu"},bf={number:5,unit:"mu"},FMt={mord:{mop:li,mbin:Mm,mrel:bf,minner:li},mop:{mord:li,mop:li,mrel:bf,minner:li},mbin:{mord:Mm,mop:Mm,mopen:Mm,minner:Mm},mrel:{mord:bf,mop:bf,mopen:bf,minner:bf},mopen:{},mclose:{mop:li,mbin:Mm,mrel:bf,minner:li},mpunct:{mord:li,mop:li,mrel:bf,mopen:li,mclose:li,mpunct:li,minner:li},minner:{mord:li,mop:li,mbin:Mm,mrel:bf,mopen:li,mpunct:li,minner:li}},BMt={mord:{mop:li},mop:{mord:li,mop:li},mbin:{},mrel:{},mopen:{},mclose:{mop:li},mpunct:{},minner:{mop:li}},oEe={},wN={},TN={};function xr(t){for(var{type:e,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:a},u=0;u<r.length;++u)oEe[r[u]]=o;e&&(i&&(wN[e]=i),s&&(TN[e]=s))}l(xr,"defineFunction");function Pm(t){var{type:e,htmlBuilder:r,mathmlBuilder:n}=t;xr({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}l(Pm,"defineFunctionBuilders");var EN=l(function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},"normalizeArgument"),Xi=l(function(e){return e.type==="ordgroup"?e.body:[e]},"ordargument"),zMt=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),HMt=new Set(["rightmost","mrel","mclose","mpunct"]),WMt={display:nn.DISPLAY,text:nn.TEXT,script:nn.SCRIPT,scriptscript:nn.SCRIPTSCRIPT},VMt={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},hs=l(function(e,r,n,a){a===void 0&&(a=[null,null]);for(var i=[],s=0;s<e.length;s++){var o=Qn(e[s],r);if(o instanceof np){var u=o.children;i.push(...u)}else i.push(o)}if(nEe(i),!n)return i;var h=r;if(e.length===1){var d=e[0];d.type==="sizing"?h=r.havingSize(d.size):d.type==="styling"&&(h=r.havingStyle(WMt[d.style]))}var f=sr([a[0]||"leftmost"],[],r),p=sr([a[1]||"rightmost"],[],r),g=n==="root";return RV(i,(m,y)=>{var v=y.classes[0],b=m.classes[0];v==="mbin"&&HMt.has(b)?y.classes[0]="mord":b==="mbin"&&zMt.has(v)&&(m.classes[0]="mord")},{node:f},p,g),RV(i,(m,y)=>{var v,b,w=DV(y),x=DV(m),T=w&&x?m.hasClass("mtight")?(v=BMt[w])==null?void 0:v[x]:(b=FMt[w])==null?void 0:b[x]:null;if(T)return aEe(T,h)},{node:f},p,g),i},"buildExpression"),RV=l(function(e,r,n,a,i){a&&e.push(a);for(var s=0;s<e.length;s++){var o=e[s],u=lEe(o);if(u){RV(u.children,r,n,null,i);continue}var h=!o.hasClass("mspace");if(h){var d=r(o,n.node);d&&(n.insertAfter?n.insertAfter(d):(e.unshift(d),s++))}h?n.node=o:i&&o.hasClass("newline")&&(n.node=sr(["leftmost"])),n.insertAfter=(f=>p=>{e.splice(f+1,0,p),s++})(s)}a&&e.pop()},"traverseNonSpaceNodes"),lEe=l(function(e){return e instanceof np||e instanceof fN||e instanceof ip&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),OV=l(function(e,r){var n=lEe(e);if(n){var a=n.children;if(a.length){if(r==="right")return OV(a[a.length-1],"right");if(r==="left")return OV(a[0],"left")}}return e},"getOutermostNode"),DV=l(function(e,r){if(!e)return null;r&&(e=OV(e,r));var n=e.classes[0];return VMt[n]||null},"getTypeOfDomTree"),P3=l(function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return sr(r.concat(n))},"makeNullDelimiter"),Qn=l(function(e,r,n){if(!e)return sr();if(wN[e.type]){var a=wN[e.type](e,r);if(n&&r.size!==n.size){a=sr(r.sizingClasses(n),[a],r);var i=r.sizeMultiplier/n.sizeMultiplier;a.height*=i,a.depth*=i}return a}else throw new hr("Got group of unknown type: '"+e.type+"'")},"buildGroup");function CN(t,e){var r=sr(["base"],t,e),n=sr(["strut"]);return n.style.height=dr(r.height+r.depth),r.depth&&(n.style.verticalAlign=dr(-r.depth)),r.children.unshift(n),r}l(CN,"buildHTMLUnbreakable");function FV(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=hs(t,e,"root"),a;n.length===2&&n[1].hasClass("tag")&&(a=n.pop());for(var i=[],s=[],o=0;o<n.length;o++)if(s.push(n[o]),n[o].hasClass("mbin")||n[o].hasClass("mrel")||n[o].hasClass("allowbreak")){for(var u=!1;o<n.length-1&&n[o+1].hasClass("mspace")&&!n[o+1].hasClass("newline");)o++,s.push(n[o]),n[o].hasClass("nobreak")&&(u=!0);u||(i.push(CN(s,e)),s=[])}else n[o].hasClass("newline")&&(s.pop(),s.length>0&&(i.push(CN(s,e)),s=[]),i.push(n[o]));s.length>0&&i.push(CN(s,e));var h;r?(h=CN(hs(r,e,!0),e),h.classes=["tag"],i.push(h)):a&&i.push(a);var d=sr(["katex-html"],i);if(d.setAttribute("aria-hidden","true"),h){var f=h.children[0];f.style.height=dr(d.height+d.depth),d.depth&&(f.style.verticalAlign=dr(-d.depth))}return d}l(FV,"buildHTML");function cEe(t){return new np(t)}l(cEe,"newDocumentFragment");const zre=class zre{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=ap(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof xi&&this.children[n+1]instanceof xi){for(var a=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof xi;)a+=this.children[++n].toText();e.appendChild(new xi(a).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="',e+=Do(this.attributes[r]),e+='"');this.classes.length>0&&(e+=' class ="'+Do(ap(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}};l(zre,"MathNode");let ur=zre;const Hre=class Hre{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Do(this.toText())}toText(){return this.text}};l(Hre,"TextNode");let xi=Hre;const Wre=class Wre{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character=" ":e>=-.05556&&e<=-.05555?this.character=" ":e>=-.1667&&e<=-.1666?this.character=" ":e>=-.2223&&e<=-.2222?this.character=" ":e>=-.2778&&e<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",dr(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+dr(this.width)+'"/>'}toText(){return this.character?this.character:" "}};l(Wre,"SpaceNode");let SN=Wre;var GMt=new Set(["\\imath","\\jmath"]),qMt=new Set(["mrow","mtable"]),Qc=l(function(e,r,n){return ti[r][e]&&ti[r][e].replace&&e.charCodeAt(0)!==55349&&!(qTe.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=ti[r][e].replace),new xi(e)},"makeText"),BV=l(function(e){return e.length===1?e[0]:new ur("mrow",e)},"makeRow"),YMt={mathit:"italic",boldsymbol:l(t=>t.type==="textord"?"bold":"bold-italic","boldsymbol"),mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},zV=l((t,e)=>{if(t.mode==="text"){if(e.fontFamily==="texttt")return"monospace";if(e.fontFamily==="textsf")return e.fontShape==="textit"&&e.fontWeight==="textbf"?"sans-serif-bold-italic":e.fontShape==="textit"?"sans-serif-italic":e.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(e.fontShape==="textit"&&e.fontWeight==="textbf")return"bold-italic";if(e.fontShape==="textit")return"italic";if(e.fontWeight==="textbf")return"bold"}var r=e.font;if(!r||r==="mathnormal")return null;var n=t.mode,a=YMt[r];if(a)return typeof a=="function"?a(t):a;var i=t.text;if(GMt.has(i))return null;if(ti[n][i]){var s=ti[n][i].replace;s&&(i=s)}var o=PV[r].fontName;return wV(i,o,n)?PV[r].variant:null},"getVariant");function HV(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof xi&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof xi&&r.text===","}else return!1}l(HV,"isNumberPunctuation");var xc=l(function(e,r,n){if(e.length===1){var a=Sa(e[0],r);return n&&a instanceof ur&&a.type==="mo"&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var i=[],s,o=0;o<e.length;o++){var u=Sa(e[o],r);if(u instanceof ur&&s instanceof ur){if(u.type==="mtext"&&s.type==="mtext"&&u.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...u.children);continue}else if(u.type==="mn"&&s.type==="mn"){s.children.push(...u.children);continue}else if(HV(u)&&s.type==="mn"){s.children.push(...u.children);continue}else if(u.type==="mn"&&HV(s))u.children=[...s.children,...u.children],i.pop();else if((u.type==="msup"||u.type==="msub")&&u.children.length>=1&&(s.type==="mn"||HV(s))){var h=u.children[0];h instanceof ur&&h.type==="mn"&&(h.children=[...s.children,...h.children],i.pop())}else if(s.type==="mi"&&s.children.length===1){var d=s.children[0];if(d instanceof xi&&d.text==="̸"&&(u.type==="mo"||u.type==="mi"||u.type==="mn")){var f=u.children[0];f instanceof xi&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(u),s=u}return i},"buildExpression"),lp=l(function(e,r,n){return BV(xc(e,r,n))},"buildExpressionRow"),Sa=l(function(e,r){if(!e)return new ur("mrow");if(TN[e.type])return TN[e.type](e,r);throw new hr("Got group of unknown type: '"+e.type+"'")},"buildGroup");function uEe(t,e,r,n,a){var i=xc(t,r),s;i.length===1&&i[0]instanceof ur&&qMt.has(i[0].type)?s=i[0]:s=new ur("mrow",i);var o=new ur("annotation",[new xi(e)]);o.setAttribute("encoding","application/x-tex");var u=new ur("semantics",[s,o]),h=new ur("math",[u]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var d=a?"katex":"katex-mathml";return sr([d],[h])}l(uEe,"buildMathML");var UMt=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],hEe=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dEe=l(function(e,r){return r.size<2?e:UMt[e-1][r.size-1]},"sizeAtStyle");const u0=class u0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||u0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=hEe[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,e),new u0(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:dEe(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:hEe[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=dEe(u0.BASESIZE,e);return this.size===r&&this.textSize===u0.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==u0.BASESIZE?["sizing","reset-size"+this.size,"size"+u0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=IMt(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};l(u0,"Options");let _N=u0;_N.BASESIZE=6;var fEe=l(function(e){return new _N({style:e.displayMode?nn.DISPLAY:nn.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),pEe=l(function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=sr(n,[e])}return e},"displayWrap"),jMt=l(function(e,r,n){var a=fEe(n),i;if(n.output==="mathml")return uEe(e,r,a,n.displayMode,!0);if(n.output==="html"){var s=FV(e,a);i=sr(["katex"],[s])}else{var o=uEe(e,r,a,n.displayMode,!1),u=FV(e,a);i=sr(["katex"],[o,u])}return pEe(i,n)},"buildTree"),KMt=l(function(e,r,n){var a=fEe(n),i=FV(e,a),s=sr(["katex"],[i]);return pEe(s,n)},"buildHTMLTree"),XMt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},kN=l(function(e){var r=new ur("mo",[new xi(XMt[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},"stretchyMathML"),ZMt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},QMt=new Set(["widehat","widecheck","widetilde","utilde"]),AN=l(function(e,r){function n(){var o=4e5,u=e.label.slice(1);if(QMt.has(u)&&"base"in e){var h=e.base.type==="ordgroup"?e.base.body.length:1,d,f,p;if(h>5)u==="widehat"||u==="widecheck"?(d=420,o=2364,p=.42,f=u+"4"):(d=312,o=2340,p=.34,f="tilde4");else{var g=[1,1,2,2,3,3][h];u==="widehat"||u==="widecheck"?(o=[0,1062,2364,2364,2364][g],d=[0,239,300,360,420][g],p=[0,.24,.3,.3,.36,.42][g],f=u+g):(o=[0,600,1033,2339,2340][g],d=[0,260,286,306,312][g],p=[0,.26,.286,.3,.306,.34][g],f="tilde"+g)}var m=new Yh(f),y=new Gu([m],{width:"100%",height:dr(p),viewBox:"0 0 "+o+" "+d,preserveAspectRatio:"none"});return{span:op([],[y],r),minWidth:0,height:p}}else{var v=[],b=ZMt[u];if(!b)throw new Error('No SVG data for "'+u+'".');var[w,x,T]=b,C=T/1e3,S=w.length,E,k;if(S===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+u+'".');E=["hide-tail"],k=[b[3]]}else if(S===2)E=["halfarrow-left","halfarrow-right"],k=["xMinYMin","xMaxYMin"];else if(S===3)E=["brace-left","brace-center","brace-right"],k=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
||
`+S+" children.");for(var A=0;A<S;A++){var I=new Yh(w[A]),L=new Gu([I],{width:"400em",height:dr(C),viewBox:"0 0 "+o+" "+T,preserveAspectRatio:k[A]+" slice"}),R=op([E[A]],[L],r);if(S===1)return{span:R,minWidth:x,height:C};R.style.height=dr(C),v.push(R)}return{span:sr(["stretchy"],v,r),minWidth:x,height:C}}}l(n,"buildSvgSpan_");var{span:a,minWidth:i,height:s}=n();return a.height=s,a.style.height=dr(s),i>0&&(a.style.minWidth=dr(i)),a},"stretchySvg"),JMt=l(function(e,r,n,a,i){var s,o=e.height+e.depth+n+a;if(/fbox|color|angl/.test(r)){if(s=sr(["stretchy",r],[],i),r==="fbox"){var u=i.color&&i.getColor();u&&(s.style.borderColor=u)}}else{var h=[];/^[bx]cancel$/.test(r)&&h.push(new $3({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&h.push(new $3({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new Gu(h,{width:"100%",height:dr(o)});s=op([],[d],i)}return s.height=o,s.style.height=dr(o),s},"stretchyEnclose"),ePt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},tPt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function rPt(t){return t in ePt}l(rPt,"isAtom");function on(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}l(on,"assertNodeType");function NN(t){var e=IN(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}l(NN,"assertSymbolNodeType");function IN(t){return t&&(t.type==="atom"||tPt.hasOwnProperty(t.type))?t:null}l(IN,"checkSymbolNodeType");var gEe=l(t=>{if(t instanceof tl)return t;if(NMt(t)&&t.children.length===1)return gEe(t.children[0])},"getBaseSymbol"),WV=l((t,e)=>{var r,n,a;t&&t.type==="supsub"?(n=on(t.base,"accent"),r=n.base,t.base=r,a=AMt(Qn(t,e)),t.base=n):(n=on(t,"accent"),r=n.base);var i=Qn(r,e.havingCrampedStyle()),s=n.isShifty&&gf(r),o=0;if(s){var u,h;o=(u=(h=gEe(i))==null?void 0:h.skew)!=null?u:0}var d=n.label==="\\c",f=d?i.height+i.depth:Math.min(i.height,e.fontMetrics().xHeight),p;if(n.isStretchy)p=AN(n,e),p=Zn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+dr(2*o)+")",marginLeft:dr(2*o)}:void 0}]});else{var g,m;n.label==="\\vec"?(g=sEe("vec",e),m=iEe.vec[1]):(g=bN({mode:n.mode,text:n.label},e,"textord"),g=kMt(g),g.italic=0,m=g.width,d&&(f+=g.depth)),p=sr(["accent-body"],[g]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),f=i.height);var v=o;y||(v-=m/2),p.style.left=dr(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=Zn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}var b=sr(["mord","accent"],[p],e);return a?(a.children[0]=b,a.height=Math.max(b.height,a.height),a.classes[0]="mord",a):b},"htmlBuilder$a"),mEe=l((t,e)=>{var r=t.isStretchy?kN(t.label):new ur("mo",[Qc(t.label,t.mode)]),n=new ur("mover",[Sa(t.base,e),r]);return n.setAttribute("accent","true"),n},"mathmlBuilder$9"),nPt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));xr({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:l((t,e)=>{var r=EN(e[0]),n=!nPt.test(t.funcName),a=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:a,base:r}},"handler"),htmlBuilder:WV,mathmlBuilder:mEe}),xr({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:l((t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},"handler"),htmlBuilder:WV,mathmlBuilder:mEe}),xr({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:l((t,e)=>{var{parser:r,funcName:n}=t,a=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:a}},"handler"),htmlBuilder:l((t,e)=>{var r=Qn(t.base,e),n=AN(t,e),a=t.label==="\\utilde"?.12:0,i=Zn({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:a},{type:"elem",elem:r}]});return sr(["mord","accentunder"],[i],e)},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=kN(t.label),n=new ur("munder",[Sa(t.base,e),r]);return n.setAttribute("accentunder","true"),n},"mathmlBuilder")});var LN=l(t=>{var e=new ur("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e},"paddedNode");xr({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:a}=t;return{type:"xArrow",mode:n.mode,label:a,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),a=nT(Qn(t.body,n,e),e),i=t.label.slice(0,2)==="\\x"?"x":"cd";a.classes.push(i+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=nT(Qn(t.below,n,e),e),s.classes.push(i+"-arrow-pad"));var o=AN(t,e),u=-e.fontMetrics().axisHeight+.5*o.height,h=-e.fontMetrics().axisHeight-.5*o.height-.111;(a.depth>.25||t.label==="\\xleftequilibrium")&&(h-=a.depth);var d;if(s){var f=-e.fontMetrics().axisHeight+s.height+.5*o.height+.111;d=Zn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:o,shift:u,wrapperClasses:["svg-align"]},{type:"elem",elem:s,shift:f}]})}else d=Zn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:h},{type:"elem",elem:o,shift:u,wrapperClasses:["svg-align"]}]});return sr(["mrel","x-arrow"],[d],e)},mathmlBuilder(t,e){var r=kN(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var a=LN(Sa(t.body,e));if(t.below){var i=LN(Sa(t.below,e));n=new ur("munderover",[r,i,a])}else n=new ur("mover",[r,a])}else if(t.below){var s=LN(Sa(t.below,e));n=new ur("munder",[r,s])}else n=LN(),n=new ur("mover",[r,n]);return n}});function yEe(t,e){var r=hs(t.body,e,!0);return sr([t.mclass],r,e)}l(yEe,"htmlBuilder$9");function vEe(t,e){var r,n=xc(t.body,e);return t.mclass==="minner"?r=new ur("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new ur("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new ur("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}l(vEe,"mathmlBuilder$8"),xr({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,a=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Xi(a),isCharacterBox:gf(a)}},htmlBuilder:yEe,mathmlBuilder:vEe});var $N=l(t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"},"binrelClass");xr({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:$N(e[0]),body:Xi(e[1]),isCharacterBox:gf(e[1])}}}),xr({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,a=e[1],i=e[0],s;n!=="\\stackrel"?s=$N(a):s="mrel";var o={type:"op",mode:a.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Xi(a)},u={type:"supsub",mode:i.mode,base:o,sup:n==="\\underset"?null:i,sub:n==="\\underset"?i:null};return{type:"mclass",mode:r.mode,mclass:s,body:[u],isCharacterBox:gf(u)}},htmlBuilder:yEe,mathmlBuilder:vEe}),xr({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:$N(e[0]),body:Xi(e[0])}},htmlBuilder(t,e){var r=hs(t.body,e,!0),n=sr([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=xc(t.body,e),n=new ur("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var aPt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},bEe=l(()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),"newCell"),xEe=l(t=>t.type==="textord"&&t.text==="@","isStartOfArrow"),iPt=l((t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e,"isLabelEnd");function sPt(t,e,r){var n=aPt[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var a=r.callFunction("\\\\cdleft",[e[0]],[]),i={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[i],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),u={type:"ordgroup",mode:"math",body:[a,s,o]};return r.callFunction("\\\\cdparent",[u],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[h],[])}default:return{type:"textord",text:" ",mode:"math"}}}l(sPt,"cdArrow");function oPt(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new hr("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],a=[n],i=0;i<e.length;i++){for(var s=e[i],o=bEe(),u=0;u<s.length;u++)if(!xEe(s[u]))o.body.push(s[u]);else{n.push(o),u+=1;var h=NN(s[u]).text,d=new Array(2);if(d[0]={type:"ordgroup",mode:"math",body:[]},d[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(h))if("<>AV".includes(h))for(var f=0;f<2;f++){for(var p=!0,g=u+1;g<s.length;g++){if(iPt(s[g],h)){p=!1,u=g;break}if(xEe(s[g]))throw new hr("Missing a "+h+" character to complete a CD arrow.",s[g]);d[f].body.push(s[g])}if(p)throw new hr("Missing a "+h+" character to complete a CD arrow.",s[u])}else throw new hr('Expected one of "<>AV=|." after @',s[u]);var m=sPt(h,d,t),y={type:"styling",body:[m],mode:"math",style:"display",resetFont:!0};n.push(y),o=bEe()}i%2===0?n.push(o):n.shift(),n=[],a.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var v=new Array(a[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(a.length+1).fill([])}}l(oPt,"parseCD"),xr({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=nT(Qn(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=dr(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new ur("mrow",[Sa(t.label,e)]);return r=new ur("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new ur("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),xr({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=nT(Qn(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new ur("mrow",[Sa(t.fragment,e)])}}),xr({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=on(e[0],"ordgroup"),a=n.body,i="",s=0;s<a.length;s++){var o=on(a[s],"textord");i+=o.text}var u=parseInt(i),h;if(isNaN(u))throw new hr("\\@char has non-numeric argument "+i);if(u<0||u>=1114111)throw new hr("\\@char with invalid code point "+i);return u<=65535?h=String.fromCharCode(u):(u-=65536,h=String.fromCharCode((u>>10)+55296,(u&1023)+56320)),{type:"textord",mode:r.mode,text:h}}});var wEe=l((t,e)=>{var r=hs(t.body,e.withColor(t.color),!1);return vf(r)},"htmlBuilder$8"),TEe=l((t,e)=>{var r=xc(t.body,e.withColor(t.color)),n=new ur("mstyle",r);return n.setAttribute("mathcolor",t.color),n},"mathmlBuilder$7");xr({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=on(e[0],"color-token").color,a=e[1];return{type:"color",mode:r.mode,color:n,body:Xi(a)}},htmlBuilder:wEe,mathmlBuilder:TEe}),xr({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,a=on(e[0],"color-token").color;r.gullet.macros.set("\\current@color",a);var i=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:a,body:i}},htmlBuilder:wEe,mathmlBuilder:TEe}),xr({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,a=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,i=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:i,size:a&&on(a,"size").value}},htmlBuilder(t,e){var r=sr(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=dr(oi(t.size,e)))),r},mathmlBuilder(t,e){var r=new ur("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",dr(oi(t.size,e)))),r}});var VV={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},EEe=l(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new hr("Expected a control sequence",t);return e},"checkControlSequence"),lPt=l(t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},"getRHS"),CEe=l((t,e,r,n)=>{var a=t.gullet.macros.get(r.text);a==null&&(r.noexpand=!0,a={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,a,n)},"letCommand");xr({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(VV[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=VV[n.text]),on(e.parseFunction(),"internal");throw new hr("Invalid token after macro prefix",n)}}),xr({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),a=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new hr("Expected a control sequence",n);for(var i=0,s,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),o[i].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new hr('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==i+1)throw new hr('Argument number "'+n.text+'" out of order');i++,o.push([])}else{if(n.text==="EOF")throw new hr("Expected a macro definition");o[i].push(n.text)}var{tokens:u}=e.gullet.consumeArg();return s&&u.unshift(s),(r==="\\edef"||r==="\\xdef")&&(u=e.gullet.expandTokens(u),u.reverse()),e.gullet.macros.set(a,{tokens:u,numArgs:i,delimiters:o},r===VV[r]),{type:"internal",mode:e.mode}}}),xr({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=EEe(e.gullet.popToken());e.gullet.consumeSpaces();var a=lPt(e);return CEe(e,n,a,r==="\\\\globallet"),{type:"internal",mode:e.mode}}}),xr({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=EEe(e.gullet.popToken()),a=e.gullet.popToken(),i=e.gullet.popToken();return CEe(e,n,i,r==="\\\\globalfuture"),e.gullet.pushToken(i),e.gullet.pushToken(a),{type:"internal",mode:e.mode}}});var R3=l(function(e,r,n){var a=ti.math[e]&&ti.math[e].replace,i=wV(a||e,r,n);if(!i)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return i},"getMetrics"),GV=l(function(e,r,n,a){var i=n.havingBaseStyle(r),s=sr(a.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=i.sizeMultiplier,s},"styleWrap"),SEe=l(function(e,r,n){var a=r.havingBaseStyle(n),i=(1-r.sizeMultiplier/a.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=dr(i),e.height-=i,e.depth+=i},"centerSpan"),cPt=l(function(e,r,n,a,i,s){var o=al(e,"Main-Regular",i,a),u=GV(o,r,a,s);return SEe(u,a,r),u},"makeSmallDelim"),uPt=l(function(e,r,n,a){return al(e,"Size"+r+"-Regular",n,a)},"mathrmSize"),_Ee=l(function(e,r,n,a,i,s){var o=uPt(e,r,i,a),u=GV(sr(["delimsizing","size"+r],[o],a),nn.TEXT,a,s);return n&&SEe(u,a,nn.TEXT),u},"makeLargeDelim"),qV=l(function(e,r,n){var a;r==="Size1-Regular"?a="delim-size1":a="delim-size4";var i=sr(["delimsizinginner",a],[sr([],[al(e,r,n)])]);return{type:"elem",elem:i}},"makeGlyphSpan"),YV=l(function(e,r,n){var a=Uh["Size4-Regular"][e.charCodeAt(0)]?Uh["Size4-Regular"][e.charCodeAt(0)][4]:Uh["Size1-Regular"][e.charCodeAt(0)][4],i=new Yh("inner",wMt(e,Math.round(1e3*r))),s=new Gu([i],{width:dr(a),height:dr(r),style:"width:"+dr(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=op([],[s],n);return o.height=r,o.style.height=dr(r),o.style.width=dr(a),{type:"elem",elem:o}},"makeInner"),UV=.008,MN={type:"kern",size:-1*UV},hPt=new Set(["|","\\lvert","\\rvert","\\vert"]),dPt=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),kEe=l(function(e,r,n,a,i,s){var o,u,h,d,f="",p=0;o=h=d=e,u=null;var g="Size1-Regular";e==="\\uparrow"?h=d="⏐":e==="\\Uparrow"?h=d="‖":e==="\\downarrow"?o=h="⏐":e==="\\Downarrow"?o=h="‖":e==="\\updownarrow"?(o="\\uparrow",h="⏐",d="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",h="‖",d="\\Downarrow"):hPt.has(e)?(h="∣",f="vert",p=333):dPt.has(e)?(h="∥",f="doublevert",p=556):e==="["||e==="\\lbrack"?(o="⎡",h="⎢",d="⎣",g="Size4-Regular",f="lbrack",p=667):e==="]"||e==="\\rbrack"?(o="⎤",h="⎥",d="⎦",g="Size4-Regular",f="rbrack",p=667):e==="\\lfloor"||e==="⌊"?(h=o="⎢",d="⎣",g="Size4-Regular",f="lfloor",p=667):e==="\\lceil"||e==="⌈"?(o="⎡",h=d="⎢",g="Size4-Regular",f="lceil",p=667):e==="\\rfloor"||e==="⌋"?(h=o="⎥",d="⎦",g="Size4-Regular",f="rfloor",p=667):e==="\\rceil"||e==="⌉"?(o="⎤",h=d="⎥",g="Size4-Regular",f="rceil",p=667):e==="("||e==="\\lparen"?(o="⎛",h="⎜",d="⎝",g="Size4-Regular",f="lparen",p=875):e===")"||e==="\\rparen"?(o="⎞",h="⎟",d="⎠",g="Size4-Regular",f="rparen",p=875):e==="\\{"||e==="\\lbrace"?(o="⎧",u="⎨",d="⎩",h="⎪",g="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="⎫",u="⎬",d="⎭",h="⎪",g="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o="⎧",d="⎩",h="⎪",g="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o="⎫",d="⎭",h="⎪",g="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o="⎧",d="⎭",h="⎪",g="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(o="⎫",d="⎩",h="⎪",g="Size4-Regular");var m=R3(o,g,i),y=m.height+m.depth,v=R3(h,g,i),b=v.height+v.depth,w=R3(d,g,i),x=w.height+w.depth,T=0,C=1;if(u!==null){var S=R3(u,g,i);T=S.height+S.depth,C=2}var E=y+x+T,k=Math.max(0,Math.ceil((r-E)/(C*b))),A=E+k*C*b,I=a.fontMetrics().axisHeight;n&&(I*=a.sizeMultiplier);var L=A/2-I,R=[];if(f.length>0){var O=A-y-x,M=Math.round(A*1e3),P=TMt(f,Math.round(O*1e3)),z=new Yh(f,P),D=dr(p/1e3),B=dr(M/1e3),W=new Gu([z],{width:D,height:B,viewBox:"0 0 "+p+" "+M}),U=op([],[W],a);U.height=M/1e3,U.style.width=D,U.style.height=B,R.push({type:"elem",elem:U})}else{if(R.push(qV(d,g,i)),R.push(MN),u===null){var j=A-y-x+2*UV;R.push(YV(h,j,a))}else{var V=(A-y-x-T)/2+2*UV;R.push(YV(h,V,a)),R.push(MN),R.push(qV(u,g,i)),R.push(MN),R.push(YV(h,V,a))}R.push(MN),R.push(qV(o,g,i))}var Y=a.havingBaseStyle(nn.TEXT),H=Zn({positionType:"bottom",positionData:L,children:R});return GV(sr(["delimsizing","mult"],[H],Y),nn.TEXT,a,s)},"makeStackedDelim"),jV=80,KV=.08,XV=l(function(e,r,n,a,i){var s=xMt(e,a,n),o=new Yh(e,s),u=new Gu([o],{width:"400em",height:dr(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return op(["hide-tail"],[u],i)},"sqrtSvg"),fPt=l(function(e,r){var n=r.havingBaseSizing(),a=$Ee("\\surd",e*n.sizeMultiplier,LEe,n),i=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,u,h,d,f;return a.type==="small"?(d=1e3+1e3*s+jV,e<1?i=1:e<1.4&&(i=.7),u=(1+s+KV)/i,h=(1+s)/i,o=XV("sqrtMain",u,d,s,r),o.style.minWidth="0.853em",f=.833/i):a.type==="large"?(d=(1e3+jV)*O3[a.size],h=(O3[a.size]+s)/i,u=(O3[a.size]+s+KV)/i,o=XV("sqrtSize"+a.size,u,d,s,r),o.style.minWidth="1.02em",f=1/i):(u=e+s+KV,h=e+s,d=Math.floor(1e3*e+s)+jV,o=XV("sqrtTall",u,d,s,r),o.style.minWidth="0.742em",f=1.056),o.height=h,o.style.height=dr(u),{span:o,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*i}},"makeSqrtImage"),AEe=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),pPt=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),NEe=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),O3=[0,1.2,1.8,2.4,3],IEe=l(function(e,r,n,a,i){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),AEe.has(e)||NEe.has(e))return _Ee(e,r,!1,n,a,i);if(pPt.has(e))return kEe(e,O3[r],!1,n,a,i);throw new hr("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),gPt=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],mPt=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"stack"}],LEe=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],yPt=l(function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";var r=e.type;throw new Error("Add support for delim type '"+r+"' here.")},"delimTypeToFont"),$Ee=l(function(e,r,n,a){for(var i=Math.min(2,3-a.style.size),s=i;s<n.length;s++){var o=n[s];if(o.type==="stack")break;var u=R3(e,yPt(o),"math"),h=u.height+u.depth;if(o.type==="small"){var d=a.havingBaseStyle(o.style);h*=d.sizeMultiplier}if(h>r)return o}return n[n.length-1]},"traverseSequence"),ZV=l(function(e,r,n,a,i,s){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;NEe.has(e)?o=gPt:AEe.has(e)?o=LEe:o=mPt;var u=$Ee(e,r,o,a);return u.type==="small"?cPt(e,u.style,n,a,i,s):u.type==="large"?_Ee(e,u.size,n,a,i,s):kEe(e,r,n,a,i,s)},"makeCustomSizedDelim"),QV=l(function(e,r,n,a,i,s){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,u=901,h=5/a.fontMetrics().ptPerEm,d=Math.max(r-o,n+o),f=Math.max(d/500*u,2*d-h);return ZV(e,f,!0,a,i,s)},"makeLeftRightDelim"),MEe={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},vPt=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function PEe(t){return"isMiddle"in t}l(PEe,"isMiddleDelimNode");function PN(t,e){var r=IN(t);if(r&&vPt.has(r.text))return r;throw r?new hr("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new hr("Invalid delimiter type '"+t.type+"'",t)}l(PN,"checkDelimiter"),xr({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:l((t,e)=>{var r=PN(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:MEe[t.funcName].size,mclass:MEe[t.funcName].mclass,delim:r.text}},"handler"),htmlBuilder:l((t,e)=>t.delim==="."?sr([t.mclass]):IEe(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:l(t=>{var e=[];t.delim!=="."&&e.push(Qc(t.delim,t.mode));var r=new ur("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=dr(O3[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r},"mathmlBuilder")});function REe(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}l(REe,"assertParsed"),xr({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:l((t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new hr("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:PN(e[0],t).text,color:r}},"handler")}),xr({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:l((t,e)=>{var r=PN(e[0],t),n=t.parser;++n.leftrightDepth;var a=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var i=on(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:a,left:r.text,right:i.delim,rightColor:i.color}},"handler"),htmlBuilder:l((t,e)=>{REe(t);for(var r=hs(t.body,e,!0,["mopen","mclose"]),n=0,a=0,i=!1,s=0;s<r.length;s++){var o=r[s];PEe(o)?i=!0:(n=Math.max(r[s].height,n),a=Math.max(r[s].depth,a))}n*=e.sizeMultiplier,a*=e.sizeMultiplier;var u;if(t.left==="."?u=P3(e,["mopen"]):u=QV(t.left,n,a,e,t.mode,["mopen"]),r.unshift(u),i)for(var h=1;h<r.length;h++){var d=r[h];if(PEe(d)){var f=d.isMiddle;r[h]=QV(f.delim,n,a,f.options,t.mode,[])}}var p;if(t.right===".")p=P3(e,["mclose"]);else{var g=t.rightColor?e.withColor(t.rightColor):e;p=QV(t.right,n,a,g,t.mode,["mclose"])}return r.push(p),sr(["minner"],r,e)},"htmlBuilder"),mathmlBuilder:l((t,e)=>{REe(t);var r=xc(t.body,e);if(t.left!=="."){var n=new ur("mo",[Qc(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var a=new ur("mo",[Qc(t.right,t.mode)]);a.setAttribute("fence","true"),t.rightColor&&a.setAttribute("mathcolor",t.rightColor),r.push(a)}return BV(r)},"mathmlBuilder")}),xr({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:l((t,e)=>{var r=PN(e[0],t);if(!t.parser.leftrightDepth)throw new hr("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},"handler"),htmlBuilder:l((t,e)=>{var r;return t.delim==="."?r=P3(e,[]):(r=IEe(t.delim,1,e,t.mode,[]),r.isMiddle={delim:t.delim,options:e}),r},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?Qc("|","text"):Qc(t.delim,t.mode),n=new ur("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n},"mathmlBuilder")});var RN=l((t,e)=>{var r=nT(Qn(t.body,e),e),n=t.label.slice(1),a=e.sizeMultiplier,i,s,o=gf(t.body);if(n==="sout")i=sr(["stretchy","sout"]),i.height=e.fontMetrics().defaultRuleThickness/a,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var u=oi({number:.6,unit:"pt"},e),h=oi({number:.35,unit:"ex"},e),d=e.havingBaseSizing();a=a/d.sizeMultiplier;var f=r.height+r.depth+u+h;r.style.paddingLeft=dr(f/2+u);var p=Math.floor(1e3*f*a),g=vMt(p),m=new Gu([new Yh("phase",g)],{width:"400em",height:dr(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=op(["hide-tail"],[m],e),i.style.height=dr(f),s=r.depth+u+h}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y,v,b=0;/box/.test(n)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),y=e.fontMetrics().fboxsep+(n==="colorbox"?0:b),v=y):n==="angl"?(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),y=4*b,v=Math.max(0,.25-r.depth)):(y=o?.2:0,v=y),i=JMt(r,n,y,v,e),/fbox|boxed|fcolorbox/.test(n)?(i.style.borderStyle="solid",i.style.borderWidth=dr(b)):n==="angl"&&b!==.049&&(i.style.borderTopWidth=dr(b),i.style.borderRightWidth=dr(b)),s=r.depth+v,t.backgroundColor&&(i.style.backgroundColor=t.backgroundColor,t.borderColor&&(i.style.borderColor=t.borderColor))}var w;if(t.backgroundColor)w=Zn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:s},{type:"elem",elem:r,shift:0}]});else{var x=/cancel|phase/.test(n)?["svg-align"]:[];w=Zn({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:i,shift:s,wrapperClasses:x}]})}return/cancel/.test(n)&&(w.height=r.height,w.depth=r.depth),/cancel/.test(n)&&!o?sr(["mord","cancel-lap"],[w],e):sr(["mord"],[w],e)},"htmlBuilder$7"),ON=l((t,e)=>{var r,n=new ur(t.label.includes("colorbox")?"mpadded":"menclose",[Sa(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var a=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+dr(a)+" solid "+t.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n},"mathmlBuilder$6");xr({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(t,e,r){var{parser:n,funcName:a}=t,i=on(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:a,backgroundColor:i,body:s}},htmlBuilder:RN,mathmlBuilder:ON}),xr({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(t,e,r){var{parser:n,funcName:a}=t,i=on(e[0],"color-token").color,s=on(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:a,backgroundColor:s,borderColor:i,body:o}},htmlBuilder:RN,mathmlBuilder:ON}),xr({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}}),xr({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,a=e[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:RN,mathmlBuilder:ON}),xr({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var a=e[0];return{type:"enclose",mode:r.mode,label:n,body:a}},htmlBuilder:RN,mathmlBuilder:ON}),xr({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var OEe={};function jh(t){for(var{type:e,names:r,props:n,handler:a,htmlBuilder:i,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:a},u=0;u<r.length;++u)OEe[r[u]]=o;i&&(wN[e]=i),s&&(TN[e]=s)}l(jh,"defineEnvironment");var DEe={};function Ke(t,e){DEe[t]=e}l(Ke,"defineMacro");const $R=class $R{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new $R(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}};l($R,"SourceLocation");let Wl=$R;const MR=class MR{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new MR(r,Wl.range(this,e))}};l(MR,"Token");let wc=MR;function FEe(t){var e=[];t.consumeSpaces();var r=t.fetch().text;for(r==="\\relax"&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);r==="\\hline"||r==="\\hdashline";)t.consume(),e.push(r==="\\hdashline"),t.consumeSpaces(),r=t.fetch().text;return e}l(FEe,"getHLines");var DN=l(t=>{var e=t.parser.settings;if(!e.displayMode)throw new hr("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),bPt=new Set(["gather","gather*"]);function JV(t){if(!t.includes("ed"))return!t.includes("*")}l(JV,"getAutoTag");function cp(t,e,r){var{hskipBeforeAndAfter:n,addJot:a,cols:i,arraystretch:s,colSeparationType:o,autoTag:u,singleRow:h,emptySingleRow:d,maxNumCols:f,leqno:p}=e;if(t.gullet.beginGroup(),h||t.gullet.macros.set("\\cr","\\\\\\relax"),!s){var g=t.gullet.expandMacroAsText("\\arraystretch");if(g==null)s=1;else if(s=parseFloat(g),!s||s<0)throw new hr("Invalid \\arraystretch: "+g)}t.gullet.beginGroup();var m=[],y=[m],v=[],b=[],w=u!=null?[]:void 0;function x(){u&&t.gullet.macros.set("\\@eqnsw","1",!0)}l(x,"beginRow");function T(){w&&(t.gullet.macros.get("\\df@tag")?(w.push(t.subparse([new wc("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):w.push(!!u&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(l(T,"endRow"),x(),b.push(FEe(t));;){var C=t.parseExpression(!1,h?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup();var S={type:"ordgroup",mode:t.mode,body:C};r&&(S={type:"styling",mode:t.mode,style:r,resetFont:!0,body:[S]}),m.push(S);var E=t.fetch().text;if(E==="&"){if(f&&m.length===f){if(h||o)throw new hr("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(E==="\\end"){T(),m.length===1&&S.type==="styling"&&S.body.length===1&&S.body[0].type==="ordgroup"&&S.body[0].body.length===0&&(y.length>1||!d)&&y.pop(),b.length<y.length+1&&b.push([]);break}else if(E==="\\\\"){t.consume();var k=void 0;t.gullet.future().text!==" "&&(k=t.parseSizeGroup(!0)),v.push(k?k.value:null),T(),b.push(FEe(t)),m=[],y.push(m),x()}else throw new hr("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:a,arraystretch:s,body:y,cols:i,rowGaps:v,hskipBeforeAndAfter:n,hLinesBeforeRow:b,colSeparationType:o,tags:w,leqno:p}}l(cp,"parseArray");function eG(t){return t.slice(0,1)==="d"?"display":"text"}l(eG,"dCellStyle");var Kh=l(function(e,r){var n,a,i=e.body.length,s=e.hLinesBeforeRow,o=0,u=new Array(i),h=[],d=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,p=5*f;if(e.colSeparationType&&e.colSeparationType==="small"){var g=r.havingStyle(nn.SCRIPT).sizeMultiplier;p=.2778*(g/r.sizeMultiplier)}var m=e.colSeparationType==="CD"?oi({number:3,unit:"ex"},r):12*f,y=3*f,v=e.arraystretch*m,b=.7*v,w=.3*v,x=0;function T(We){for(var me=0;me<We.length;++me)me>0&&(x+=.25),h.push({pos:x,isDashed:We[me]})}for(l(T,"setHLinePos"),T(s[0]),n=0;n<e.body.length;++n){var C=e.body[n],S=b,E=w;o<C.length&&(o=C.length);var k={cells:new Array(C.length),height:0,depth:0,pos:0};for(a=0;a<C.length;++a){var A=Qn(C[a],r);E<A.depth&&(E=A.depth),S<A.height&&(S=A.height),k.cells[a]=A}var I=e.rowGaps[n],L=0;I&&(L=oi(I,r),L>0&&(L+=w,E<L&&(E=L),L=0)),e.addJot&&n<e.body.length-1&&(E+=y),k.height=S,k.depth=E,x+=S,k.pos=x,x+=E+L,u[n]=k,T(s[n+1])}var R=x/2+r.fontMetrics().axisHeight,O=e.cols||[],M=[],P,z,D=[];if(e.tags&&e.tags.some(We=>We))for(n=0;n<i;++n){var B=u[n],W=B.pos-R,U=e.tags[n],j=void 0;U===!0?j=sr(["eqn-num"],[],r):U===!1?j=sr([],[],r):j=sr([],hs(U,r,!0),r),j.depth=B.depth,j.height=B.height,D.push({type:"elem",elem:j,shift:W})}for(a=0,z=0;a<o||z<O.length;++a,++z){for(var V,Y=O[z],H=!0;((q=Y)==null?void 0:q.type)==="separator";){var q;if(H||(P=sr(["arraycolsep"],[]),P.style.width=dr(r.fontMetrics().doubleRuleSep),M.push(P)),Y.separator==="|"||Y.separator===":"){var Z=Y.separator==="|"?"solid":"dashed",K=sr(["vertical-separator"],[],r);K.style.height=dr(x),K.style.borderRightWidth=dr(d),K.style.borderRightStyle=Z,K.style.margin="0 "+dr(-d/2);var re=x-R;re&&(K.style.verticalAlign=dr(-re)),M.push(K)}else throw new hr("Invalid separator type: "+Y.separator);z++,Y=O[z],H=!1}if(!(a>=o)){var Q=void 0;if(a>0||e.hskipBeforeAndAfter){var te,ee;Q=(te=(ee=Y)==null?void 0:ee.pregap)!=null?te:p,Q!==0&&(P=sr(["arraycolsep"],[]),P.style.width=dr(Q),M.push(P))}var J=[];for(n=0;n<i;++n){var ae=u[n],se=ae.cells[a];if(se){var fe=ae.pos-R;se.depth=ae.depth,se.height=ae.height,J.push({type:"elem",elem:se,shift:fe})}}var ve=Zn({positionType:"individualShift",children:J}),de=sr(["col-align-"+(((V=Y)==null?void 0:V.align)||"c")],[ve]);if(M.push(de),a<o-1||e.hskipBeforeAndAfter){var Ee,Ce;Q=(Ee=(Ce=Y)==null?void 0:Ce.postgap)!=null?Ee:p,Q!==0&&(P=sr(["arraycolsep"],[]),P.style.width=dr(Q),M.push(P))}}}var De=sr(["mtable"],M);if(h.length>0){for(var ce=rT("hline",r,d),Ie=rT("hdashline",r,d),ye=[{type:"elem",elem:De,shift:0}];h.length>0;){var pe=h.pop(),Ae=pe.pos-R;pe.isDashed?ye.push({type:"elem",elem:Ie,shift:Ae}):ye.push({type:"elem",elem:ce,shift:Ae})}De=Zn({positionType:"individualShift",children:ye})}if(D.length===0)return sr(["mord"],[De],r);var Ve=Zn({positionType:"individualShift",children:D}),ze=sr(["tag"],[Ve],r);return vf([De,ze])},"htmlBuilder"),xPt={c:"center ",l:"left ",r:"right "},Xh=l(function(e,r){for(var n=[],a=new ur("mtd",[],["mtr-glue"]),i=new ur("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var o=e.body[s],u=[],h=0;h<o.length;h++)u.push(new ur("mtd",[Sa(o[h],r)]));e.tags&&e.tags[s]&&(u.unshift(a),u.push(a),e.leqno?u.unshift(i):u.push(i)),n.push(new ur("mtr",u))}var d=new ur("mtable",n),f=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);d.setAttribute("rowspacing",dr(f));var p="",g="";if(e.cols&&e.cols.length>0){var m=e.cols,y="",v=!1,b=0,w=m.length;m[0].type==="separator"&&(p+="top ",b=1),m[m.length-1].type==="separator"&&(p+="bottom ",w-=1);for(var x=b;x<w;x++){var T=m[x];T.type==="align"?(g+=xPt[T.align],v&&(y+="none "),v=!0):T.type==="separator"&&v&&(y+=T.separator==="|"?"solid ":"dashed ",v=!1)}d.setAttribute("columnalign",g.trim()),/[sd]/.test(y)&&d.setAttribute("columnlines",y.trim())}if(e.colSeparationType==="align"){for(var C=e.cols||[],S="",E=1;E<C.length;E++)S+=E%2?"0em ":"1em ";d.setAttribute("columnspacing",S.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?d.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?d.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?d.setAttribute("columnspacing","0.5em"):d.setAttribute("columnspacing","1em");var k="",A=e.hLinesBeforeRow;p+=A[0].length>0?"left ":"",p+=A[A.length-1].length>0?"right ":"";for(var I=1;I<A.length-1;I++)k+=A[I].length===0?"none ":A[I][0]?"dashed ":"solid ";return/[sd]/.test(k)&&d.setAttribute("rowlines",k.trim()),p!==""&&(d=new ur("menclose",[d]),d.setAttribute("notation",p.trim())),e.arraystretch&&e.arraystretch<1&&(d=new ur("mstyle",[d]),d.setAttribute("scriptlevel","1")),d},"mathmlBuilder"),BEe=l(function(e,r){e.envName.includes("ed")||DN(e);var n=[],a=e.envName.includes("at")?"alignat":"align",i=e.envName==="split",s=cp(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:JV(e.envName),emptySingleRow:!0,colSeparationType:a,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},"display"),o=0,u=0,h={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var d="",f=0;f<r[0].body.length;f++){var p=on(r[0].body[f],"textord");d+=p.text}o=Number(d),u=o*2}var g=!u;s.body.forEach(function(b){for(var w=1;w<b.length;w+=2){var x=on(b[w],"styling"),T=on(x.body[0],"ordgroup");T.body.unshift(h)}if(g)u<b.length&&(u=b.length);else{var C=b.length/2;if(o<C)throw new hr("Too many math in a row: "+("expected "+o+", but got "+C),b[0])}});for(var m=0;m<u;++m){var y="r",v=0;m%2===1?y="l":m>0&&g&&(v=1),n[m]={type:"align",align:y,pregap:v,postgap:0}}return s.colSeparationType=g?"align":"alignat",s},"alignedHandler");jh({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=IN(e[0]),n=r?[e[0]]:on(e[0],"ordgroup").body,a=n.map(function(s){var o=NN(s),u=o.text;if("lcr".includes(u))return{type:"align",align:u};if(u==="|")return{type:"separator",separator:"|"};if(u===":")return{type:"separator",separator:":"};throw new hr("Unknown column alignment: "+u,s)}),i={cols:a,hskipBeforeAndAfter:!0,maxNumCols:a.length};return cp(t.parser,i,eG(t.envName))},htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var a=t.parser;if(a.consumeSpaces(),a.fetch().text==="["){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,!"lcr".includes(r))throw new hr("Expected l or c or r",a.nextToken);a.consume(),a.consumeSpaces(),a.expect("]"),a.consume(),n.cols=[{type:"align",align:r}]}}var i=cp(t.parser,n,eG(t.envName)),s=Math.max(0,...i.body.map(o=>o.length));return i.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=cp(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=IN(e[0]),n=r?[e[0]]:on(e[0],"ordgroup").body,a=n.map(function(o){var u=NN(o),h=u.text;if("lc".includes(h))return{type:"align",align:h};throw new hr("Unknown column alignment: "+h,o)});if(a.length>1)throw new hr("{subarray} can contain only one column");var i={cols:a,hskipBeforeAndAfter:!1,arraystretch:.5},s=cp(t.parser,i,"script");if(s.body.length>0&&s.body[0].length>1)throw new hr("{subarray} can contain only one column");return s},htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=cp(t.parser,e,eG(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.includes("r")?".":"\\{",right:t.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:BEe,htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){bPt.has(t.envName)&&DN(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:JV(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return cp(t.parser,e,"display")},htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:BEe,htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){DN(t);var e={autoTag:JV(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return cp(t.parser,e,"display")},htmlBuilder:Kh,mathmlBuilder:Xh}),jh({type:"array",names:["CD"],props:{numArgs:0},handler(t){return DN(t),oPt(t.parser)},htmlBuilder:Kh,mathmlBuilder:Xh}),Ke("\\nonumber","\\gdef\\@eqnsw{0}"),Ke("\\notag","\\nonumber"),xr({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new hr(t.funcName+" valid only within array environment")}});var zEe=OEe;xr({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,a=e[0];if(a.type!=="ordgroup")throw new hr("Invalid environment name",a);for(var i="",s=0;s<a.body.length;++s)i+=on(a.body[s],"textord").text;if(n==="\\begin"){if(!zEe.hasOwnProperty(i))throw new hr("No such environment: "+i,a);var o=zEe[i],{args:u,optArgs:h}=r.parseArguments("\\begin{"+i+"}",o),d={mode:r.mode,envName:i,parser:r},f=o.handler(d,u,h);r.expect("\\end",!1);var p=r.nextToken,g=on(r.parseFunction(),"environment");if(g.name!==i)throw new hr("Mismatch: \\begin{"+i+"} matched by \\end{"+g.name+"}",p);return f}return{type:"environment",mode:r.mode,name:i,nameGroup:a}}});var HEe=l((t,e)=>{var r=t.font,n=e.withFont(r);return Qn(t.body,n)},"htmlBuilder$5"),WEe=l((t,e)=>{var r=t.font,n=e.withFont(r);return Sa(t.body,n)},"mathmlBuilder$4"),VEe={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};xr({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:l((t,e)=>{var{parser:r,funcName:n}=t,a=EN(e[0]),i=n;return i in VEe&&(i=VEe[i]),{type:"font",mode:r.mode,font:i.slice(1),body:a}},"handler"),htmlBuilder:HEe,mathmlBuilder:WEe}),xr({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:l((t,e)=>{var{parser:r}=t,n=e[0];return{type:"mclass",mode:r.mode,mclass:$N(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:gf(n)}},"handler")}),xr({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:l((t,e)=>{var{parser:r,funcName:n,breakOnTokenText:a}=t,{mode:i}=r,s=r.parseExpression(!0,a);return{type:"font",mode:i,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:s}}},"handler"),htmlBuilder:HEe,mathmlBuilder:WEe});var wPt=l((t,e)=>{var r=e.style,n=r.fracNum(),a=r.fracDen(),i;i=e.havingStyle(n);var s=Qn(t.numer,i,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm;s.height=s.height<o?o:s.height,s.depth=s.depth<u?u:s.depth}i=e.havingStyle(a);var h=Qn(t.denom,i,e),d,f,p;t.hasBarLine?(t.barSize?(f=oi(t.barSize,e),d=rT("frac-line",e,f)):d=rT("frac-line",e),f=d.height,p=d.height):(d=null,f=0,p=e.fontMetrics().defaultRuleThickness);var g,m,y;r.size===nn.DISPLAY.size?(g=e.fontMetrics().num1,f>0?m=3*p:m=7*p,y=e.fontMetrics().denom1):(f>0?(g=e.fontMetrics().num2,m=p):(g=e.fontMetrics().num3,m=3*p),y=e.fontMetrics().denom2);var v;if(d){var w=e.fontMetrics().axisHeight;g-s.depth-(w+.5*f)<m&&(g+=m-(g-s.depth-(w+.5*f))),w-.5*f-(h.height-y)<m&&(y+=m-(w-.5*f-(h.height-y)));var x=-(w-.5*f);v=Zn({positionType:"individualShift",children:[{type:"elem",elem:h,shift:y},{type:"elem",elem:d,shift:x},{type:"elem",elem:s,shift:-g}]})}else{var b=g-s.depth-(h.height-y);b<m&&(g+=.5*(m-b),y+=.5*(m-b)),v=Zn({positionType:"individualShift",children:[{type:"elem",elem:h,shift:y},{type:"elem",elem:s,shift:-g}]})}i=e.havingStyle(r),v.height*=i.sizeMultiplier/e.sizeMultiplier,v.depth*=i.sizeMultiplier/e.sizeMultiplier;var T;r.size===nn.DISPLAY.size?T=e.fontMetrics().delim1:r.size===nn.SCRIPTSCRIPT.size?T=e.havingStyle(nn.SCRIPT).fontMetrics().delim2:T=e.fontMetrics().delim2;var C,S;return t.leftDelim==null?C=P3(e,["mopen"]):C=ZV(t.leftDelim,T,!0,e.havingStyle(r),t.mode,["mopen"]),t.continued?S=sr([]):t.rightDelim==null?S=P3(e,["mclose"]):S=ZV(t.rightDelim,T,!0,e.havingStyle(r),t.mode,["mclose"]),sr(["mord"].concat(i.sizingClasses(e)),[C,sr(["mfrac"],[v]),S],e)},"htmlBuilder$4"),TPt=l((t,e)=>{var r=new ur("mfrac",[Sa(t.numer,e),Sa(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=oi(t.barSize,e);r.setAttribute("linethickness",dr(n))}if(t.leftDelim!=null||t.rightDelim!=null){var a=[];if(t.leftDelim!=null){var i=new ur("mo",[new xi(t.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),a.push(i)}if(a.push(r),t.rightDelim!=null){var s=new ur("mo",[new xi(t.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),a.push(s)}return BV(a)}return r},"mathmlBuilder$3"),GEe=l((t,e)=>{if(!e)return t;var r={type:"styling",mode:t.mode,style:e,body:[t]};return r},"wrapWithStyle");xr({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:l((t,e)=>{var{parser:r,funcName:n}=t,a=e[0],i=e[1],s,o=null,u=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",u=")";break;case"\\\\bracefrac":s=!1,o="\\{",u="\\}";break;case"\\\\brackfrac":s=!1,o="[",u="]";break;default:throw new Error("Unrecognized genfrac command")}var h=n==="\\cfrac",d=null;return h||n.startsWith("\\d")?d="display":n.startsWith("\\t")&&(d="text"),GEe({type:"genfrac",mode:r.mode,numer:a,denom:i,continued:h,hasBarLine:s,leftDelim:o,rightDelim:u,barSize:null},d)},"handler"),htmlBuilder:wPt,mathmlBuilder:TPt}),xr({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,a;switch(r){case"\\over":a="\\frac";break;case"\\choose":a="\\binom";break;case"\\atop":a="\\\\atopfrac";break;case"\\brace":a="\\\\bracefrac";break;case"\\brack":a="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:a,token:n}}});var qEe=["display","text","script","scriptscript"],YEe=l(function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r},"delimFromValue");xr({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],a=e[5],i=EN(e[0]),s=i.type==="atom"&&i.family==="open"?YEe(i.text):null,o=EN(e[1]),u=o.type==="atom"&&o.family==="close"?YEe(o.text):null,h=on(e[2],"size"),d,f=null;h.isBlank?d=!0:(f=h.value,d=f.number>0);var p=null,g=e[3];if(g.type==="ordgroup"){if(g.body.length>0){var m=on(g.body[0],"textord");p=qEe[Number(m.text)]}}else g=on(g,"textord"),p=qEe[Number(g.text)];return GEe({type:"genfrac",mode:r.mode,numer:n,denom:a,continued:!1,hasBarLine:d,barSize:f,leftDelim:s,rightDelim:u},p)}}),xr({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:a}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:on(e[0],"size").value,token:a}}}),xr({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:l((t,e)=>{var{parser:r,funcName:n}=t,a=e[0],i=on(e[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var s=e[2],o=i.number>0;return{type:"genfrac",mode:r.mode,numer:a,denom:s,continued:!1,hasBarLine:o,barSize:i,leftDelim:null,rightDelim:null}},"handler")});var UEe=l((t,e)=>{var r=e.style,n,a;t.type==="supsub"?(n=t.sup?Qn(t.sup,e.havingStyle(r.sup()),e):Qn(t.sub,e.havingStyle(r.sub()),e),a=on(t.base,"horizBrace")):a=on(t,"horizBrace");var i=Qn(a.base,e.havingBaseStyle(nn.DISPLAY)),s=AN(a,e),o;if(a.isOver?o=Zn({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:s,wrapperClasses:["svg-align"]}]}):o=Zn({positionType:"bottom",positionData:i.depth+.1+s.height,children:[{type:"elem",elem:s,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:i}]}),n){var u=sr(["minner",a.isOver?"mover":"munder"],[o],e);a.isOver?o=Zn({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]}):o=Zn({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]})}return sr(["minner",a.isOver?"mover":"munder"],[o],e)},"htmlBuilder$3"),EPt=l((t,e)=>{var r=kN(t.label);return new ur(t.isOver?"mover":"munder",[Sa(t.base,e),r])},"mathmlBuilder$2");xr({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:e[0]}},htmlBuilder:UEe,mathmlBuilder:EPt}),xr({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:l((t,e)=>{var{parser:r}=t,n=e[1],a=on(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:a})?{type:"href",mode:r.mode,href:a,body:Xi(n)}:r.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:l((t,e)=>{var r=hs(t.body,e,!1);return OMt(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=lp(t.body,e);return r instanceof ur||(r=new ur("mrow",[r])),r.setAttribute("href",t.href),r},"mathmlBuilder")}),xr({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:l((t,e)=>{var{parser:r}=t,n=on(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var a=[],i=0;i<n.length;i++){var s=n[i];s==="~"&&(s="\\textasciitilde"),a.push({type:"textord",mode:"text",text:s})}var o={type:"text",mode:r.mode,font:"\\texttt",body:a};return{type:"href",mode:r.mode,href:n,body:Xi(o)}},"handler")}),xr({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:Xi(e[0])}},htmlBuilder(t,e){var r=hs(t.body,e.withFont(""),!1);return vf(r)},mathmlBuilder(t,e){return new ur("mrow",xc(t.body,e.withFont("")))}}),xr({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:l((t,e)=>{var{parser:r,funcName:n,token:a}=t,i=on(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,u={};switch(n){case"\\htmlClass":u.class=i,o={command:"\\htmlClass",class:i};break;case"\\htmlId":u.id=i,o={command:"\\htmlId",id:i};break;case"\\htmlStyle":u.style=i,o={command:"\\htmlStyle",style:i};break;case"\\htmlData":{for(var h=i.split(","),d=0;d<h.length;d++){var f=h[d],p=f.indexOf("=");if(p<0)throw new hr("\\htmlData key/value '"+f+"' missing equals sign");var g=f.slice(0,p),m=f.slice(p+1);u["data-"+g.trim()]=m}o={command:"\\htmlData",attributes:u};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(o)?{type:"html",mode:r.mode,attributes:u,body:Xi(s)}:r.formatUnsupportedCmd(n)},"handler"),htmlBuilder:l((t,e)=>{var r=hs(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var a=sr(n,r,e);for(var i in t.attributes)i!=="class"&&t.attributes.hasOwnProperty(i)&&a.setAttribute(i,t.attributes[i]);return a},"htmlBuilder"),mathmlBuilder:l((t,e)=>lp(t.body,e),"mathmlBuilder")}),xr({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:l((t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:Xi(e[0]),mathml:Xi(e[1])}},"handler"),htmlBuilder:l((t,e)=>{var r=hs(t.html,e,!1);return vf(r)},"htmlBuilder"),mathmlBuilder:l((t,e)=>lp(t.mathml,e),"mathmlBuilder")});var tG=l(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new hr("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!BTe(n))throw new hr("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n},"sizeData");xr({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:l((t,e,r)=>{var{parser:n}=t,a={number:0,unit:"em"},i={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var u=on(r[0],"raw").string,h=u.split(","),d=0;d<h.length;d++){var f=h[d].split("=");if(f.length===2){var p=f[1].trim();switch(f[0].trim()){case"alt":o=p;break;case"width":a=tG(p);break;case"height":i=tG(p);break;case"totalheight":s=tG(p);break;default:throw new hr("Invalid key: '"+f[0]+"' in \\includegraphics.")}}}var g=on(e[0],"url").url;return o===""&&(o=g,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:g})?{type:"includegraphics",mode:n.mode,alt:o,width:a,height:i,totalheight:s,src:g}:n.formatUnsupportedCmd("\\includegraphics")},"handler"),htmlBuilder:l((t,e)=>{var r=oi(t.height,e),n=0;t.totalheight.number>0&&(n=oi(t.totalheight,e)-r);var a=0;t.width.number>0&&(a=oi(t.width,e));var i={height:dr(r+n)};a>0&&(i.width=dr(a)),n>0&&(i.verticalAlign=dr(-n));var s=new xV(t.src,t.alt,i);return s.height=r,s.depth=n,s},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=new ur("mglyph",[]);r.setAttribute("alt",t.alt);var n=oi(t.height,e),a=0;if(t.totalheight.number>0&&(a=oi(t.totalheight,e)-n,r.setAttribute("valign",dr(-a))),r.setAttribute("height",dr(n+a)),t.width.number>0){var i=oi(t.width,e);r.setAttribute("width",dr(i))}return r.setAttribute("src",t.src),r},"mathmlBuilder")}),xr({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,a=on(e[0],"size");if(r.settings.strict){var i=n[1]==="m",s=a.value.unit==="mu";i?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+a.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:a.value}},htmlBuilder(t,e){return aEe(t.dimension,e)},mathmlBuilder(t,e){var r=oi(t.dimension,e);return new SN(r)}}),xr({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:l((t,e)=>{var{parser:r,funcName:n}=t,a=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:a}},"handler"),htmlBuilder:l((t,e)=>{var r;t.alignment==="clap"?(r=sr([],[Qn(t.body,e)]),r=sr(["inner"],[r],e)):r=sr(["inner"],[Qn(t.body,e)]);var n=sr(["fix"],[]),a=sr([t.alignment],[r,n],e),i=sr(["strut"]);return i.style.height=dr(a.height+a.depth),a.depth&&(i.style.verticalAlign=dr(-a.depth)),a.children.unshift(i),a=sr(["thinbox"],[a],e),sr(["mord","vbox"],[a],e)},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=new ur("mpadded",[Sa(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r},"mathmlBuilder")}),xr({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,a=n.mode;n.switchMode("math");var i=r==="\\("?"\\)":"$",s=n.parseExpression(!1,i);return n.expect(i),n.switchMode(a),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:s}}}),xr({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new hr("Mismatched "+t.funcName)}});var jEe=l((t,e)=>{switch(e.style.size){case nn.DISPLAY.size:return t.display;case nn.TEXT.size:return t.text;case nn.SCRIPT.size:return t.script;case nn.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle");xr({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:l((t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:Xi(e[0]),text:Xi(e[1]),script:Xi(e[2]),scriptscript:Xi(e[3])}},"handler"),htmlBuilder:l((t,e)=>{var r=jEe(t,e),n=hs(r,e,!1);return vf(n)},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=jEe(t,e);return lp(r,e)},"mathmlBuilder")});var KEe=l((t,e,r,n,a,i,s)=>{t=sr([],[t]);var o=r&&gf(r),u,h;if(e){var d=Qn(e,n.havingStyle(a.sup()),n);h={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(r){var f=Qn(r,n.havingStyle(a.sub()),n);u={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var p;if(h&&u){var g=n.fontMetrics().bigOpSpacing5+u.elem.height+u.elem.depth+u.kern+t.depth+s;p=Zn({positionType:"bottom",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:dr(-i)},{type:"kern",size:u.kern},{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:dr(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(u){var m=t.height-s;p=Zn({positionType:"top",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:dr(-i)},{type:"kern",size:u.kern},{type:"elem",elem:t}]})}else if(h){var y=t.depth+s;p=Zn({positionType:"bottom",positionData:y,children:[{type:"elem",elem:t},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:dr(i)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return t;var v=[p];if(u&&i!==0&&!o){var b=sr(["mspace"],[],n);b.style.marginRight=dr(i),v.unshift(b)}return sr(["mop","op-limits"],v,n)},"assembleSupSub"),XEe=new Set(["\\smallint"]),aT=l((t,e)=>{var r,n,a=!1,i;t.type==="supsub"?(r=t.sup,n=t.sub,i=on(t.base,"op"),a=!0):i=on(t,"op");var s=e.style,o=!1;s.size===nn.DISPLAY.size&&i.symbol&&!XEe.has(i.name)&&(o=!0);var u,h;if(i.symbol){var d=o?"Size2-Regular":"Size1-Regular",f="";if((i.name==="\\oiint"||i.name==="\\oiiint")&&(f=i.name.slice(1),i.name=f==="oiint"?"\\iint":"\\iiint"),u=al(i.name,d,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),h=u.italic,f.length>0){var p=sEe(f+"Size"+(o?"2":"1"),e);u=Zn({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:p,shift:o?.08:0}]}),i.name="\\"+f,u.classes.unshift("mop"),u.italic=h}}else if(i.body){var g=hs(i.body,e,!0);g.length===1&&g[0]instanceof tl?(u=g[0],u.classes[0]="mop"):u=sr(["mop"],g,e)}else{for(var m=[],y=1;y<i.name.length;y++)m.push($V(i.name[y],i.mode,e));u=sr(["mop"],m,e)}var v=0,b=0;if((u instanceof tl||i.name==="\\oiint"||i.name==="\\oiiint")&&!i.suppressBaseShift){var w;v=(u.height-u.depth)/2-e.fontMetrics().axisHeight,b=(w=u.italic)!=null?w:0}return a?KEe(u,r,n,e,s,b,v):(v&&(u.style.position="relative",u.style.top=dr(v)),u)},"htmlBuilder$2"),D3=l((t,e)=>{var r;if(t.symbol)r=new ur("mo",[Qc(t.name,t.mode)]),XEe.has(t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new ur("mo",xc(t.body,e));else{r=new ur("mi",[new xi(t.name.slice(1))]);var n=new ur("mo",[Qc("","text")]);t.parentIsSupSub?r=new ur("mrow",[r,n]):r=cEe([r,n])}return r},"mathmlBuilder$1"),CPt={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};xr({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:l((t,e)=>{var{parser:r,funcName:n}=t,a=n;return a.length===1&&(a=CPt[a]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:a}},"handler"),htmlBuilder:aT,mathmlBuilder:D3}),xr({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:l((t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Xi(n)}},"handler"),htmlBuilder:aT,mathmlBuilder:D3});var SPt={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};xr({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:aT,mathmlBuilder:D3}),xr({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:aT,mathmlBuilder:D3}),xr({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=SPt[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:aT,mathmlBuilder:D3});var ZEe=l((t,e)=>{var r,n,a=!1,i;t.type==="supsub"?(r=t.sup,n=t.sub,i=on(t.base,"operatorname"),a=!0):i=on(t,"operatorname");var s;if(i.body.length>0){for(var o=i.body.map(f=>{var p="text"in f?f.text:void 0;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),u=hs(o,e.withFont("mathrm"),!0),h=0;h<u.length;h++){var d=u[h];d instanceof tl&&(d.text=d.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=sr(["mop"],u,e)}else s=sr(["mop"],[],e);return a?KEe(s,r,n,e,e.style,0,0):s},"htmlBuilder$1"),_Pt=l((t,e)=>{for(var r=xc(t.body,e.withFont("mathrm")),n=!0,a=0;a<r.length;a++){var i=r[a];if(!(i instanceof SN))if(i instanceof ur)switch(i.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var s=i.children[0];i.children.length===1&&s instanceof xi?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var o=r.map(d=>d.toText()).join("");r=[new xi(o)]}var u=new ur("mi",r);u.setAttribute("mathvariant","normal");var h=new ur("mo",[Qc("","text")]);return t.parentIsSupSub?new ur("mrow",[u,h]):cEe([u,h])},"mathmlBuilder");xr({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:l((t,e)=>{var{parser:r,funcName:n}=t,a=e[0];return{type:"operatorname",mode:r.mode,body:Xi(a),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:ZEe,mathmlBuilder:_Pt}),Ke("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Pm({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?vf(hs(t.body,e,!1)):sr(["mord"],hs(t.body,e,!0),e)},mathmlBuilder(t,e){return lp(t.body,e,!0)}}),xr({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Qn(t.body,e.havingCrampedStyle()),n=rT("overline-line",e),a=e.fontMetrics().defaultRuleThickness,i=Zn({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*a},{type:"elem",elem:n},{type:"kern",size:a}]});return sr(["mord","overline"],[i],e)},mathmlBuilder(t,e){var r=new ur("mo",[new xi("‾")]);r.setAttribute("stretchy","true");var n=new ur("mover",[Sa(t.body,e),r]);return n.setAttribute("accent","true"),n}}),xr({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:l((t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:Xi(n)}},"handler"),htmlBuilder:l((t,e)=>{var r=hs(t.body,e.withPhantom(),!1);return vf(r)},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=xc(t.body,e);return new ur("mphantom",r)},"mathmlBuilder")}),Ke("\\hphantom","\\smash{\\phantom{#1}}"),xr({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:l((t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},"handler"),htmlBuilder:l((t,e)=>{var r=sr(["inner"],[Qn(t.body,e.withPhantom())]),n=sr(["fix"],[]);return sr(["mord","rlap"],[r,n],e)},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=xc(Xi(t.body),e),n=new ur("mphantom",r),a=new ur("mpadded",[n]);return a.setAttribute("width","0px"),a},"mathmlBuilder")}),xr({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=on(e[0],"size").value,a=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:a}},htmlBuilder(t,e){var r=Qn(t.body,e),n=oi(t.dy,e);return Zn({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new ur("mpadded",[Sa(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}}),xr({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}}),xr({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,a=r[0],i=on(e[0],"size"),s=on(e[1],"size");return{type:"rule",mode:n.mode,shift:a&&on(a,"size").value,width:i.value,height:s.value}},htmlBuilder(t,e){var r=sr(["mord","rule"],[],e),n=oi(t.width,e),a=oi(t.height,e),i=t.shift?oi(t.shift,e):0;return r.style.borderRightWidth=dr(n),r.style.borderTopWidth=dr(a),r.style.bottom=dr(i),r.width=n,r.height=a+i,r.depth=-i,r.maxFontSize=a*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=oi(t.width,e),n=oi(t.height,e),a=t.shift?oi(t.shift,e):0,i=e.color&&e.getColor()||"black",s=new ur("mspace");s.setAttribute("mathbackground",i),s.setAttribute("width",dr(r)),s.setAttribute("height",dr(n));var o=new ur("mpadded",[s]);return a>=0?o.setAttribute("height",dr(a)):(o.setAttribute("height",dr(a)),o.setAttribute("depth",dr(-a))),o.setAttribute("voffset",dr(a)),o}});function QEe(t,e,r){for(var n=hs(t,e,!1),a=e.sizeMultiplier/r.sizeMultiplier,i=0;i<n.length;i++){var s=n[i].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[i].classes,e.sizingClasses(r)):n[i].classes[s+1]==="reset-size"+e.size&&(n[i].classes[s+1]="reset-size"+r.size),n[i].height*=a,n[i].depth*=a}return vf(n)}l(QEe,"sizingGroup");var JEe=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],kPt=l((t,e)=>{var r=e.havingSize(t.size);return QEe(t.body,r,e)},"htmlBuilder");xr({type:"sizing",names:JEe,props:{numArgs:0,allowedInText:!0},handler:l((t,e)=>{var{breakOnTokenText:r,funcName:n,parser:a}=t,i=a.parseExpression(!1,r);return{type:"sizing",mode:a.mode,size:JEe.indexOf(n)+1,body:i}},"handler"),htmlBuilder:kPt,mathmlBuilder:l((t,e)=>{var r=e.havingSize(t.size),n=xc(t.body,r),a=new ur("mstyle",n);return a.setAttribute("mathsize",dr(r.sizeMultiplier)),a},"mathmlBuilder")}),xr({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:l((t,e,r)=>{var{parser:n}=t,a=!1,i=!1,s=r[0]&&on(r[0],"ordgroup");if(s)for(var o,u=0;u<s.body.length;++u){var h=s.body[u];if(o=NN(h).text,o==="t")a=!0;else if(o==="b")i=!0;else{a=!1,i=!1;break}}else a=!0,i=!0;var d=e[0];return{type:"smash",mode:n.mode,body:d,smashHeight:a,smashDepth:i}},"handler"),htmlBuilder:l((t,e)=>{var r=sr([],[Qn(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0),t.smashDepth&&(r.depth=0),t.smashHeight&&t.smashDepth)return sr(["mord","smash"],[r],e);if(r.children)for(var n=0;n<r.children.length;n++)t.smashHeight&&(r.children[n].height=0),t.smashDepth&&(r.children[n].depth=0);var a=Zn({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return sr(["mord"],[a],e)},"htmlBuilder"),mathmlBuilder:l((t,e)=>{var r=new ur("mpadded",[Sa(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r},"mathmlBuilder")}),xr({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,a=r[0],i=e[0];return{type:"sqrt",mode:n.mode,body:i,index:a}},htmlBuilder(t,e){var r=Qn(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=nT(r,e);var n=e.fontMetrics(),a=n.defaultRuleThickness,i=a;e.style.id<nn.TEXT.id&&(i=e.fontMetrics().xHeight);var s=a+i/4,o=r.height+r.depth+s+a,{span:u,ruleWidth:h,advanceWidth:d}=fPt(o,e),f=u.height-h;f>r.height+r.depth+s&&(s=(s+f-r.height-r.depth)/2);var p=u.height-r.height-s-h;r.style.paddingLeft=dr(d);var g=Zn({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:u},{type:"kern",size:h}]});if(t.index){var m=e.havingStyle(nn.SCRIPTSCRIPT),y=Qn(t.index,m,e),v=.6*(g.height-g.depth),b=Zn({positionType:"shift",positionData:-v,children:[{type:"elem",elem:y}]}),w=sr(["root"],[b]);return sr(["mord","sqrt"],[w,g],e)}else return sr(["mord","sqrt"],[g],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new ur("mroot",[Sa(r,e),Sa(n,e)]):new ur("msqrt",[Sa(r,e)])}});var rG={display:nn.DISPLAY,text:nn.TEXT,script:nn.SCRIPT,scriptscript:nn.SCRIPTSCRIPT};function APt(t){return t in rG}l(APt,"isStyleStr"),xr({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:a}=t,i=a.parseExpression(!0,r),s=n.slice(1,n.length-5);if(!APt(s))throw new Error("Unknown style: "+s);return{type:"styling",mode:a.mode,style:s,body:i}},htmlBuilder(t,e){var r=rG[t.style],n=e.havingStyle(r);return t.resetFont&&(n=n.withFont("")),QEe(t.body,n,e)},mathmlBuilder(t,e){var r=rG[t.style],n=e.havingStyle(r);t.resetFont&&(n=n.withFont(""));var a=xc(t.body,n),i=new ur("mstyle",a),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[t.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});var NPt=l(function(e,r){var n=e.base;if(n)if(n.type==="op"){var a=n.limits&&(r.style.size===nn.DISPLAY.size||n.alwaysHandleSupSub);return a?aT:null}else if(n.type==="operatorname"){var i=n.alwaysHandleSupSub&&(r.style.size===nn.DISPLAY.size||n.limits);return i?ZEe:null}else{if(n.type==="accent")return gf(n.base)?WV:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?UEe:null}else return null}else return null},"htmlBuilderDelegate");Pm({type:"supsub",htmlBuilder(t,e){var r=NPt(t,e);if(r)return r(t,e);var{base:n,sup:a,sub:i}=t,s=Qn(n,e),o,u,h=e.fontMetrics(),d=0,f=0,p=n&&gf(n);if(a){var g=e.havingStyle(e.style.sup());o=Qn(a,g,e),p||(d=s.height-g.fontMetrics().supDrop*g.sizeMultiplier/e.sizeMultiplier)}if(i){var m=e.havingStyle(e.style.sub());u=Qn(i,m,e),p||(f=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/e.sizeMultiplier)}var y;e.style===nn.DISPLAY?y=h.sup1:e.style.cramped?y=h.sup3:y=h.sup2;var v=e.sizeMultiplier,b=dr(.5/h.ptPerEm/v),w=null;if(u){var x=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");if(s instanceof tl||x){var T;w=dr(-((T=s.italic)!=null?T:0))}}var C;if(o&&u){d=Math.max(d,y,o.depth+.25*h.xHeight),f=Math.max(f,h.sub2);var S=h.defaultRuleThickness,E=4*S;if(d-o.depth-(u.height-f)<E){f=E-(d-o.depth)+u.height;var k=.8*h.xHeight-(d-o.depth);k>0&&(d+=k,f-=k)}var A=[{type:"elem",elem:u,shift:f,marginRight:b,marginLeft:w},{type:"elem",elem:o,shift:-d,marginRight:b}];C=Zn({positionType:"individualShift",children:A})}else if(u){f=Math.max(f,h.sub1,u.height-.8*h.xHeight);var I=[{type:"elem",elem:u,marginLeft:w,marginRight:b}];C=Zn({positionType:"shift",positionData:f,children:I})}else if(o)d=Math.max(d,y,o.depth+.25*h.xHeight),C=Zn({positionType:"shift",positionData:-d,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var L=DV(s,"right")||"mord";return sr([L],[s,sr(["msupsub"],[C])],e)},mathmlBuilder(t,e){var r=!1,n,a;t.base&&t.base.type==="horizBrace"&&(a=!!t.sup,a===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var i=[Sa(t.base,e)];t.sub&&i.push(Sa(t.sub,e)),t.sup&&i.push(Sa(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub)if(t.sup){var h=t.base;h&&h.type==="op"&&h.limits&&e.style===nn.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(e.style===nn.DISPLAY||h.limits)?s="munderover":s="msubsup"}else{var u=t.base;u&&u.type==="op"&&u.limits&&(e.style===nn.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||e.style===nn.DISPLAY)?s="munder":s="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===nn.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===nn.DISPLAY)?s="mover":s="msup"}return new ur(s,i)}}),Pm({type:"atom",htmlBuilder(t,e){return $V(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new ur("mo",[Qc(t.text,t.mode)]);if(t.family==="bin"){var n=zV(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});var eCe={mi:"italic",mn:"normal",mtext:"normal"};Pm({type:"mathord",htmlBuilder(t,e){return bN(t,e,"mathord")},mathmlBuilder(t,e){var r=new ur("mi",[Qc(t.text,t.mode,e)]),n=zV(t,e)||"italic";return n!==eCe[r.type]&&r.setAttribute("mathvariant",n),r}}),Pm({type:"textord",htmlBuilder(t,e){return bN(t,e,"textord")},mathmlBuilder(t,e){var r=Qc(t.text,t.mode,e),n=zV(t,e)||"normal",a;return t.mode==="text"?a=new ur("mtext",[r]):/[0-9]/.test(t.text)?a=new ur("mn",[r]):t.text==="\\prime"?a=new ur("mo",[r]):a=new ur("mi",[r]),n!==eCe[a.type]&&a.setAttribute("mathvariant",n),a}});var nG={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},aG={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Pm({type:"spacing",htmlBuilder(t,e){if(aG.hasOwnProperty(t.text)){var r=aG[t.text].className||"";if(t.mode==="text"){var n=bN(t,e,"textord");return n.classes.push(r),n}else return sr(["mspace",r],[$V(t.text,t.mode,e)],e)}else{if(nG.hasOwnProperty(t.text))return sr(["mspace",nG[t.text]],[],e);throw new hr('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(aG.hasOwnProperty(t.text))r=new ur("mtext",[new xi(" ")]);else{if(nG.hasOwnProperty(t.text))return new ur("mspace");throw new hr('Unknown type of space "'+t.text+'"')}return r}});var tCe=l(()=>{var t=new ur("mtd",[]);return t.setAttribute("width","50%"),t},"pad");Pm({type:"tag",mathmlBuilder(t,e){var r=new ur("mtable",[new ur("mtr",[tCe(),new ur("mtd",[lp(t.body,e)]),tCe(),new ur("mtd",[lp(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var rCe={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},nCe={"\\textbf":"textbf","\\textmd":"textmd"},IPt={"\\textit":"textit","\\textup":"textup"},aCe=l((t,e)=>{var r=t.font;if(r){if(rCe[r])return e.withTextFontFamily(rCe[r]);if(nCe[r])return e.withTextFontWeight(nCe[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(IPt[r])},"optionsWithFont");xr({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,a=e[0];return{type:"text",mode:r.mode,body:Xi(a),font:n}},htmlBuilder(t,e){var r=aCe(t,e),n=hs(t.body,r,!0);return sr(["mord","text"],n,r)},mathmlBuilder(t,e){var r=aCe(t,e);return lp(t.body,r)}}),xr({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Qn(t.body,e),n=rT("underline-line",e),a=e.fontMetrics().defaultRuleThickness,i=Zn({positionType:"top",positionData:r.height,children:[{type:"kern",size:a},{type:"elem",elem:n},{type:"kern",size:3*a},{type:"elem",elem:r}]});return sr(["mord","underline"],[i],e)},mathmlBuilder(t,e){var r=new ur("mo",[new xi("‾")]);r.setAttribute("stretchy","true");var n=new ur("munder",[Sa(t.body,e),r]);return n.setAttribute("accentunder","true"),n}}),xr({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Qn(t.body,e),n=e.fontMetrics().axisHeight,a=.5*(r.height-n-(r.depth+n));return Zn({positionType:"shift",positionData:a,children:[{type:"elem",elem:r}]})},mathmlBuilder(t,e){var r=new ur("mpadded",[Sa(t.body,e)],["vcenter"]);return new ur("mrow",[r])}}),xr({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new hr("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=iCe(t),n=[],a=e.havingStyle(e.style.text()),i=0;i<r.length;i++){var s=r[i];s==="~"&&(s="\\textasciitilde"),n.push(al(s,"Typewriter-Regular",t.mode,a,["mord","texttt"]))}return sr(["mord","text"].concat(a.sizingClasses(e)),nEe(n),a)},mathmlBuilder(t,e){var r=new xi(iCe(t)),n=new ur("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var iCe=l(t=>t.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),up=oEe,sCe=`[ \r
|
||
]`,LPt="\\\\[a-zA-Z@]+",$Pt="\\\\[^\uD800-\uDFFF]",MPt="("+LPt+")"+sCe+"*",PPt=`\\\\(
|
||
|[ \r ]+
|
||
?)[ \r ]*`,iG="[̀-ͯ]",RPt=new RegExp(iG+"+$"),OPt="("+sCe+"+)|"+(PPt+"|")+"([!-\\[\\]-‧-豈-]"+(iG+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(iG+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+MPt)+("|"+$Pt+")");let oCe=(zC=class{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(OPt,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new wc("EOF",new Wl(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new hr("Unexpected character: '"+e[r]+"'",new wc(e[r],new Wl(this,r,r+1)));var a=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[a]===14){var i=e.indexOf(`
|
||
`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new wc(a,new Wl(this,r,this.tokenRegex.lastIndex))}},l(zC,"Lexer"),zC);const Vre=class Vre{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new hr("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var a=0;a<this.undefStack.length;a++)delete this.undefStack[a][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}};l(Vre,"Namespace");let sG=Vre;var DPt=DEe;Ke("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}}),Ke("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}}),Ke("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}}),Ke("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}}),Ke("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}}),Ke("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Ke("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var lCe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Ke("\\char",function(t){var e=t.popToken(),r,n=0;if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new hr("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=lCe[e.text],n==null||n>=r)throw new hr("Invalid base-"+r+" digit "+e.text);for(var a;(a=lCe[t.future().text])!=null&&a<r;)n*=r,n+=a,t.popToken()}return"\\@char{"+n+"}"});var oG=l((t,e,r,n)=>{var a=t.consumeArg().tokens;if(a.length!==1)throw new hr("\\newcommand's first argument must be a macro name");var i=a[0].text,s=t.isDefined(i);if(s&&!e)throw new hr("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!s&&!r)throw new hr("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");var o=0;if(a=t.consumeArg().tokens,a.length===1&&a[0].text==="["){for(var u="",h=t.expandNextToken();h.text!=="]"&&h.text!=="EOF";)u+=h.text,h=t.expandNextToken();if(!u.match(/^\s*[0-9]+\s*$/))throw new hr("Invalid number of arguments: "+u);o=parseInt(u),a=t.consumeArg().tokens}return s&&n||t.macros.set(i,{tokens:a,numArgs:o}),""},"newcommand");Ke("\\newcommand",t=>oG(t,!1,!0,!1)),Ke("\\renewcommand",t=>oG(t,!0,!1,!1)),Ke("\\providecommand",t=>oG(t,!0,!0,!0)),Ke("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""}),Ke("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""}),Ke("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),up[r],ti.math[r],ti.text[r]),""}),Ke("\\bgroup","{"),Ke("\\egroup","}"),Ke("~","\\nobreakspace"),Ke("\\lq","`"),Ke("\\rq","'"),Ke("\\aa","\\r a"),Ke("\\AA","\\r A"),Ke("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),Ke("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Ke("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),Ke("ℬ","\\mathscr{B}"),Ke("ℰ","\\mathscr{E}"),Ke("ℱ","\\mathscr{F}"),Ke("ℋ","\\mathscr{H}"),Ke("ℐ","\\mathscr{I}"),Ke("ℒ","\\mathscr{L}"),Ke("ℳ","\\mathscr{M}"),Ke("ℛ","\\mathscr{R}"),Ke("ℭ","\\mathfrak{C}"),Ke("ℌ","\\mathfrak{H}"),Ke("ℨ","\\mathfrak{Z}"),Ke("\\Bbbk","\\Bbb{k}"),Ke("\\llap","\\mathllap{\\textrm{#1}}"),Ke("\\rlap","\\mathrlap{\\textrm{#1}}"),Ke("\\clap","\\mathclap{\\textrm{#1}}"),Ke("\\mathstrut","\\vphantom{(}"),Ke("\\underbar","\\underline{\\text{#1}}"),Ke("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),Ke("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),Ke("\\ne","\\neq"),Ke("≠","\\neq"),Ke("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),Ke("∉","\\notin"),Ke("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),Ke("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),Ke("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),Ke("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),Ke("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),Ke("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),Ke("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),Ke("⟂","\\perp"),Ke("‼","\\mathclose{!\\mkern-0.8mu!}"),Ke("∌","\\notni"),Ke("⌜","\\ulcorner"),Ke("⌝","\\urcorner"),Ke("⌞","\\llcorner"),Ke("⌟","\\lrcorner"),Ke("©","\\copyright"),Ke("®","\\textregistered"),Ke("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Ke("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Ke("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Ke("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Ke("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Ke("⋮","\\vdots"),Ke("\\varGamma","\\mathit{\\Gamma}"),Ke("\\varDelta","\\mathit{\\Delta}"),Ke("\\varTheta","\\mathit{\\Theta}"),Ke("\\varLambda","\\mathit{\\Lambda}"),Ke("\\varXi","\\mathit{\\Xi}"),Ke("\\varPi","\\mathit{\\Pi}"),Ke("\\varSigma","\\mathit{\\Sigma}"),Ke("\\varUpsilon","\\mathit{\\Upsilon}"),Ke("\\varPhi","\\mathit{\\Phi}"),Ke("\\varPsi","\\mathit{\\Psi}"),Ke("\\varOmega","\\mathit{\\Omega}"),Ke("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Ke("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Ke("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Ke("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Ke("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Ke("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Ke("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Ke("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var cCe={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},FPt=new Set(["bin","rel"]);Ke("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in cCe?e=cCe[r]:(r.slice(0,4)==="\\not"||r in ti.math&&FPt.has(ti.math[r].group))&&(e="\\dotsb"),e});var lG={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Ke("\\dotso",function(t){var e=t.future().text;return e in lG?"\\ldots\\,":"\\ldots"}),Ke("\\dotsc",function(t){var e=t.future().text;return e in lG&&e!==","?"\\ldots\\,":"\\ldots"}),Ke("\\cdots",function(t){var e=t.future().text;return e in lG?"\\@cdots\\,":"\\@cdots"}),Ke("\\dotsb","\\cdots"),Ke("\\dotsm","\\cdots"),Ke("\\dotsi","\\!\\cdots"),Ke("\\dotsx","\\ldots\\,"),Ke("\\DOTSI","\\relax"),Ke("\\DOTSB","\\relax"),Ke("\\DOTSX","\\relax"),Ke("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Ke("\\,","\\tmspace+{3mu}{.1667em}"),Ke("\\thinspace","\\,"),Ke("\\>","\\mskip{4mu}"),Ke("\\:","\\tmspace+{4mu}{.2222em}"),Ke("\\medspace","\\:"),Ke("\\;","\\tmspace+{5mu}{.2777em}"),Ke("\\thickspace","\\;"),Ke("\\!","\\tmspace-{3mu}{.1667em}"),Ke("\\negthinspace","\\!"),Ke("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Ke("\\negthickspace","\\tmspace-{5mu}{.277em}"),Ke("\\enspace","\\kern.5em "),Ke("\\enskip","\\hskip.5em\\relax"),Ke("\\quad","\\hskip1em\\relax"),Ke("\\qquad","\\hskip2em\\relax"),Ke("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Ke("\\tag@paren","\\tag@literal{({#1})}"),Ke("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new hr("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Ke("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Ke("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Ke("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Ke("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Ke("\\newline","\\\\\\relax"),Ke("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var uCe=dr(Uh["Main-Regular"][84][1]-.7*Uh["Main-Regular"][65][1]);Ke("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+uCe+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Ke("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+uCe+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Ke("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Ke("\\@hspace","\\hskip #1\\relax"),Ke("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Ke("\\ordinarycolon",":"),Ke("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Ke("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Ke("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Ke("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Ke("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Ke("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Ke("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Ke("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Ke("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Ke("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Ke("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Ke("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Ke("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Ke("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Ke("∷","\\dblcolon"),Ke("∹","\\eqcolon"),Ke("≔","\\coloneqq"),Ke("≕","\\eqqcolon"),Ke("⩴","\\Coloneqq"),Ke("\\ratio","\\vcentcolon"),Ke("\\coloncolon","\\dblcolon"),Ke("\\colonequals","\\coloneqq"),Ke("\\coloncolonequals","\\Coloneqq"),Ke("\\equalscolon","\\eqqcolon"),Ke("\\equalscoloncolon","\\Eqqcolon"),Ke("\\colonminus","\\coloneq"),Ke("\\coloncolonminus","\\Coloneq"),Ke("\\minuscolon","\\eqcolon"),Ke("\\minuscoloncolon","\\Eqcolon"),Ke("\\coloncolonapprox","\\Colonapprox"),Ke("\\coloncolonsim","\\Colonsim"),Ke("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ke("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ke("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Ke("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Ke("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Ke("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Ke("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Ke("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Ke("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Ke("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Ke("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Ke("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Ke("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Ke("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Ke("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Ke("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Ke("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Ke("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Ke("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Ke("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Ke("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Ke("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Ke("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Ke("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Ke("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Ke("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Ke("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Ke("\\imath","\\html@mathml{\\@imath}{ı}"),Ke("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Ke("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Ke("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Ke("⟦","\\llbracket"),Ke("⟧","\\rrbracket"),Ke("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Ke("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Ke("⦃","\\lBrace"),Ke("⦄","\\rBrace"),Ke("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Ke("⦵","\\minuso"),Ke("\\darr","\\downarrow"),Ke("\\dArr","\\Downarrow"),Ke("\\Darr","\\Downarrow"),Ke("\\lang","\\langle"),Ke("\\rang","\\rangle"),Ke("\\uarr","\\uparrow"),Ke("\\uArr","\\Uparrow"),Ke("\\Uarr","\\Uparrow"),Ke("\\N","\\mathbb{N}"),Ke("\\R","\\mathbb{R}"),Ke("\\Z","\\mathbb{Z}"),Ke("\\alef","\\aleph"),Ke("\\alefsym","\\aleph"),Ke("\\Alpha","\\mathrm{A}"),Ke("\\Beta","\\mathrm{B}"),Ke("\\bull","\\bullet"),Ke("\\Chi","\\mathrm{X}"),Ke("\\clubs","\\clubsuit"),Ke("\\cnums","\\mathbb{C}"),Ke("\\Complex","\\mathbb{C}"),Ke("\\Dagger","\\ddagger"),Ke("\\diamonds","\\diamondsuit"),Ke("\\empty","\\emptyset"),Ke("\\Epsilon","\\mathrm{E}"),Ke("\\Eta","\\mathrm{H}"),Ke("\\exist","\\exists"),Ke("\\harr","\\leftrightarrow"),Ke("\\hArr","\\Leftrightarrow"),Ke("\\Harr","\\Leftrightarrow"),Ke("\\hearts","\\heartsuit"),Ke("\\image","\\Im"),Ke("\\infin","\\infty"),Ke("\\Iota","\\mathrm{I}"),Ke("\\isin","\\in"),Ke("\\Kappa","\\mathrm{K}"),Ke("\\larr","\\leftarrow"),Ke("\\lArr","\\Leftarrow"),Ke("\\Larr","\\Leftarrow"),Ke("\\lrarr","\\leftrightarrow"),Ke("\\lrArr","\\Leftrightarrow"),Ke("\\Lrarr","\\Leftrightarrow"),Ke("\\Mu","\\mathrm{M}"),Ke("\\natnums","\\mathbb{N}"),Ke("\\Nu","\\mathrm{N}"),Ke("\\Omicron","\\mathrm{O}"),Ke("\\plusmn","\\pm"),Ke("\\rarr","\\rightarrow"),Ke("\\rArr","\\Rightarrow"),Ke("\\Rarr","\\Rightarrow"),Ke("\\real","\\Re"),Ke("\\reals","\\mathbb{R}"),Ke("\\Reals","\\mathbb{R}"),Ke("\\Rho","\\mathrm{P}"),Ke("\\sdot","\\cdot"),Ke("\\sect","\\S"),Ke("\\spades","\\spadesuit"),Ke("\\sub","\\subset"),Ke("\\sube","\\subseteq"),Ke("\\supe","\\supseteq"),Ke("\\Tau","\\mathrm{T}"),Ke("\\thetasym","\\vartheta"),Ke("\\weierp","\\wp"),Ke("\\Zeta","\\mathrm{Z}"),Ke("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Ke("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Ke("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Ke("\\bra","\\mathinner{\\langle{#1}|}"),Ke("\\ket","\\mathinner{|{#1}\\rangle}"),Ke("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Ke("\\Bra","\\left\\langle#1\\right|"),Ke("\\Ket","\\left|#1\\right\\rangle");var hCe=l(t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,a=e.consumeArg().tokens,i=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var u=l(f=>p=>{t&&(p.macros.set("|",s),a.length&&p.macros.set("\\|",o));var g=f;if(!f&&a.length){var m=p.future();m.text==="|"&&(p.popToken(),g=!0)}return{tokens:g?a:n,numArgs:0}},"midMacro");e.macros.set("|",u(!1)),a.length&&e.macros.set("\\|",u(!0));var h=e.consumeArg().tokens,d=e.expandTokens([...i,...h,...r]);return e.macros.endGroup(),{tokens:d.reverse(),numArgs:0}},"braketHelper");Ke("\\bra@ket",hCe(!1)),Ke("\\bra@set",hCe(!0)),Ke("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Ke("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Ke("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Ke("\\angln","{\\angl n}"),Ke("\\blue","\\textcolor{##6495ed}{#1}"),Ke("\\orange","\\textcolor{##ffa500}{#1}"),Ke("\\pink","\\textcolor{##ff00af}{#1}"),Ke("\\red","\\textcolor{##df0030}{#1}"),Ke("\\green","\\textcolor{##28ae7b}{#1}"),Ke("\\gray","\\textcolor{gray}{#1}"),Ke("\\purple","\\textcolor{##9d38bd}{#1}"),Ke("\\blueA","\\textcolor{##ccfaff}{#1}"),Ke("\\blueB","\\textcolor{##80f6ff}{#1}"),Ke("\\blueC","\\textcolor{##63d9ea}{#1}"),Ke("\\blueD","\\textcolor{##11accd}{#1}"),Ke("\\blueE","\\textcolor{##0c7f99}{#1}"),Ke("\\tealA","\\textcolor{##94fff5}{#1}"),Ke("\\tealB","\\textcolor{##26edd5}{#1}"),Ke("\\tealC","\\textcolor{##01d1c1}{#1}"),Ke("\\tealD","\\textcolor{##01a995}{#1}"),Ke("\\tealE","\\textcolor{##208170}{#1}"),Ke("\\greenA","\\textcolor{##b6ffb0}{#1}"),Ke("\\greenB","\\textcolor{##8af281}{#1}"),Ke("\\greenC","\\textcolor{##74cf70}{#1}"),Ke("\\greenD","\\textcolor{##1fab54}{#1}"),Ke("\\greenE","\\textcolor{##0d923f}{#1}"),Ke("\\goldA","\\textcolor{##ffd0a9}{#1}"),Ke("\\goldB","\\textcolor{##ffbb71}{#1}"),Ke("\\goldC","\\textcolor{##ff9c39}{#1}"),Ke("\\goldD","\\textcolor{##e07d10}{#1}"),Ke("\\goldE","\\textcolor{##a75a05}{#1}"),Ke("\\redA","\\textcolor{##fca9a9}{#1}"),Ke("\\redB","\\textcolor{##ff8482}{#1}"),Ke("\\redC","\\textcolor{##f9685d}{#1}"),Ke("\\redD","\\textcolor{##e84d39}{#1}"),Ke("\\redE","\\textcolor{##bc2612}{#1}"),Ke("\\maroonA","\\textcolor{##ffbde0}{#1}"),Ke("\\maroonB","\\textcolor{##ff92c6}{#1}"),Ke("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Ke("\\maroonD","\\textcolor{##ca337c}{#1}"),Ke("\\maroonE","\\textcolor{##9e034e}{#1}"),Ke("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Ke("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Ke("\\purpleC","\\textcolor{##aa87ff}{#1}"),Ke("\\purpleD","\\textcolor{##7854ab}{#1}"),Ke("\\purpleE","\\textcolor{##543b78}{#1}"),Ke("\\mintA","\\textcolor{##f5f9e8}{#1}"),Ke("\\mintB","\\textcolor{##edf2df}{#1}"),Ke("\\mintC","\\textcolor{##e0e5cc}{#1}"),Ke("\\grayA","\\textcolor{##f6f7f7}{#1}"),Ke("\\grayB","\\textcolor{##f0f1f2}{#1}"),Ke("\\grayC","\\textcolor{##e3e5e6}{#1}"),Ke("\\grayD","\\textcolor{##d6d8da}{#1}"),Ke("\\grayE","\\textcolor{##babec2}{#1}"),Ke("\\grayF","\\textcolor{##888d93}{#1}"),Ke("\\grayG","\\textcolor{##626569}{#1}"),Ke("\\grayH","\\textcolor{##3b3e40}{#1}"),Ke("\\grayI","\\textcolor{##21242c}{#1}"),Ke("\\kaBlue","\\textcolor{##314453}{#1}"),Ke("\\kaGreen","\\textcolor{##71B307}{#1}");var dCe={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};const Gre=class Gre{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new sG(DPt,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new oCe(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,a;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:a,end:n}=this.consumeArg(["]"])}else({tokens:a,start:r,end:n}=this.consumeArg());return this.pushToken(new wc("EOF",n.loc)),this.pushTokens(a),new wc("",Wl.range(r,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var a=this.future(),i,s=0,o=0;do{if(i=this.popToken(),r.push(i),i.text==="{")++s;else if(i.text==="}"){if(--s,s===-1)throw new hr("Extra }",i)}else if(i.text==="EOF")throw new hr("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",i);if(e&&n)if((s===0||s===1&&e[o]==="{")&&i.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return a.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:a,end:i}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new hr("The length of delimiters doesn't match the number of args!");for(var n=r[0],a=0;a<n.length;a++){var i=this.popToken();if(n[a]!==i.text)throw new hr("Use of the macro doesn't match its definition",i)}}for(var s=[],o=0;o<e;o++)s.push(this.consumeArg(r&&r[o+1]).tokens);return s}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new hr("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,a=r.noexpand?null:this._getExpansion(n);if(a==null||e&&a.unexpandable){if(e&&a==null&&n[0]==="\\"&&!this.isDefined(n))throw new hr("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var i=a.tokens,s=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var u=i[o];if(u.text==="#"){if(o===0)throw new hr("Incomplete placeholder at end of macro body",u);if(u=i[--o],u.text==="#")i.splice(o+1,1);else if(/^[1-9]$/.test(u.text))i.splice(o,2,...s[+u.text-1]);else throw new hr("Not a valid argument number",u)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new wc(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),r.push(a)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var a=typeof r=="function"?r(this):r;if(typeof a=="string"){var i=0;if(a.includes("#"))for(var s=a.replace(/##/g,"");s.includes("#"+(i+1));)++i;for(var o=new oCe(a,this.settings),u=[],h=o.lex();h.text!=="EOF";)u.push(h),h=o.lex();u.reverse();var d={tokens:u,numArgs:i};return d}return a}isDefined(e){return this.macros.has(e)||up.hasOwnProperty(e)||ti.math.hasOwnProperty(e)||ti.text.hasOwnProperty(e)||dCe.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:up.hasOwnProperty(e)&&!up[e].primitive}};l(Gre,"MacroExpander");let cG=Gre;var fCe=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,FN=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),uG={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},pCe={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};let gCe=(Hy=class{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new cG(e,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new hr("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new wc("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var a=this.fetch();if(Hy.endOfExpression.has(a.text)||r&&a.text===r||e&&up[a.text]&&up[a.text].infix)break;var i=this.parseAtom(r);if(i){if(i.type==="internal")continue}else break;n.push(i)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,a=0;a<e.length;a++){var i=e[a];if(i.type==="infix"){if(r!==-1)throw new hr("only one infix operator per group",i.token);r=a,n=i.replaceWith}}if(r!==-1&&n){var s,o,u=e.slice(0,r),h=e.slice(r+1);u.length===1&&u[0].type==="ordgroup"?s=u[0]:s={type:"ordgroup",mode:this.mode,body:u},h.length===1&&h[0].type==="ordgroup"?o=h[0]:o={type:"ordgroup",mode:this.mode,body:h};var d;return n==="\\\\abovefrac"?d=this.callFunction(n,[s,e[r],o],[]):d=this.callFunction(n,[s,o],[]),[d]}else return e}handleSupSubscript(e){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var a;do{var i;a=this.parseGroup(e)}while(((i=a)==null?void 0:i.type)==="internal");if(!a)throw new hr("Expected group after '"+n+"'",r);return a}formatUnsupportedCmd(e){for(var r=[],n=0;n<e.length;n++)r.push({type:"textord",mode:"text",text:e[n]});var a={type:"text",mode:this.mode,body:r},i={type:"color",mode:this.mode,color:this.settings.errorColor,body:[a]};return i}parseAtom(e){var r=this.parseGroup("atom",e);if((r==null?void 0:r.type)==="internal"||this.mode==="text")return r;for(var n,a;;){this.consumeSpaces();var i=this.fetch();if(i.text==="\\limits"||i.text==="\\nolimits"){if(r&&r.type==="op"){var s=i.text==="\\limits";r.limits=s,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=i.text==="\\limits");else throw new hr("Limit controls must follow a math operator",i);this.consume()}else if(i.text==="^"){if(n)throw new hr("Double superscript",i);n=this.handleSupSubscript("superscript")}else if(i.text==="_"){if(a)throw new hr("Double subscript",i);a=this.handleSupSubscript("subscript")}else if(i.text==="'"){if(n)throw new hr("Double superscript",i);var o={type:"textord",mode:this.mode,text:"\\prime"},u=[o];for(this.consume();this.fetch().text==="'";)u.push(o),this.consume();this.fetch().text==="^"&&u.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:u}}else if(FN[i.text]){var h=fCe.test(i.text),d=[];for(d.push(new wc(FN[i.text])),this.consume();;){var f=this.fetch().text;if(!FN[f]||fCe.test(f)!==h)break;d.unshift(new wc(FN[f])),this.consume()}var p=this.subparse(d);h?a={type:"ordgroup",mode:"math",body:p}:n={type:"ordgroup",mode:"math",body:p}}else break}return n||a?{type:"supsub",mode:this.mode,base:r,sup:n,sub:a}:r}parseFunction(e,r){var n=this.fetch(),a=n.text,i=up[a];if(!i)return null;if(this.consume(),r&&r!=="atom"&&!i.allowedInArgument)throw new hr("Got function '"+a+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!i.allowedInText)throw new hr("Can't use function '"+a+"' in text mode",n);if(this.mode==="math"&&i.allowedInMath===!1)throw new hr("Can't use function '"+a+"' in math mode",n);var{args:s,optArgs:o}=this.parseArguments(a,i);return this.callFunction(a,s,o,n,e)}callFunction(e,r,n,a,i){var s={funcName:e,parser:this,token:a,breakOnTokenText:i},o=up[e];if(o&&o.handler)return o.handler(s,r,n);throw new hr("No function handler for "+e)}parseArguments(e,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var a=[],i=[],s=0;s<n;s++){var o=r.argTypes&&r.argTypes[s],u=s<r.numOptionalArgs;("primitive"in r&&r.primitive&&o==null||r.type==="sqrt"&&s===1&&i[0]==null)&&(o="primitive");var h=this.parseGroupOfType("argument to '"+e+"'",o,u);if(u)i.push(h);else if(h!=null)a.push(h);else throw new hr("Null argument, please report this as a bug")}return{args:a,optArgs:i}}parseGroupOfType(e,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var a=this.parseArgumentGroup(n,"text");return a!=null?{type:"styling",mode:a.mode,body:[a],style:"text",resetFont:!0}:null}case"raw":{var i=this.parseStringGroup("raw",n);return i!=null?{type:"raw",mode:"text",string:i.text}:null}case"primitive":{if(n)throw new hr("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new hr("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new hr("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var a="",i;(i=this.fetch()).text!=="EOF";)a+=i.text,this.consume();return this.consume(),n.text=a,n}parseRegexGroup(e,r){for(var n=this.fetch(),a=n,i="",s;(s=this.fetch()).text!=="EOF"&&e.test(i+s.text);)a=s,i+=a.text,this.consume();if(i==="")throw new hr("Invalid "+r+": '"+n.text+"'",n);return n.range(a,i)}parseColorGroup(e){var r=this.parseStringGroup("color",e);if(r==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new hr("Invalid color: '"+r.text+"'",r);var a=n[0];return/^[0-9a-f]{6}$/i.test(a)&&(a="#"+a),{type:"color-token",mode:this.mode,color:a}}parseSizeGroup(e){var r,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",e),!r)return null;!e&&r.text.length===0&&(r.text="0pt",n=!0);var a=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!a)throw new hr("Invalid size: '"+r.text+"'",r);var i={number:+(a[1]+a[2]),unit:a[3]};if(!BTe(i))throw new hr("Invalid unit: '"+i.unit+"'",r);return{type:"size",mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,r){var n=this.gullet.scanArgument(e);if(n==null)return null;var a=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var i=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:i};return r&&this.switchMode(a),s}parseGroup(e,r){var n=this.fetch(),a=n.text,i;if(a==="{"||a==="\\begingroup"){this.consume();var s=a==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,s),u=this.fetch();this.expect(s),this.gullet.endGroup(),i={type:"ordgroup",mode:this.mode,loc:Wl.range(n,u),body:o,semisimple:a==="\\begingroup"||void 0}}else if(i=this.parseFunction(r,e)||this.parseSymbol(),i==null&&a[0]==="\\"&&!dCe.hasOwnProperty(a)){if(this.settings.throwOnError)throw new hr("Undefined control sequence: "+a,n);i=this.formatUnsupportedCmd(a),this.consume()}return i}formLigatures(e){for(var r=e.length-1,n=0;n<r;++n){var a=e[n];if(a.type==="textord"){var i=a.text,s=e[n+1];if(!(!s||s.type!=="textord")){if(i==="-"&&s.text==="-"){var o=e[n+2];n+1<r&&o&&o.type==="textord"&&o.text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:Wl.range(a,o),text:"---"}),r-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:Wl.range(a,s),text:"--"}),r-=1)}(i==="'"||i==="`")&&s.text===i&&(e.splice(n,2,{type:"textord",mode:"text",loc:Wl.range(a,s),text:i+i}),r-=1)}}}}parseSymbol(){var e=this.fetch(),r=e.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),a=n.charAt(0)==="*";if(a&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new hr(`\\verb assertion failed --
|
||
please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:a}}pCe.hasOwnProperty(r[0])&&!ti[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=pCe[r[0]]+r.slice(1));var i=RPt.exec(r);i&&(r=r.substring(0,i.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var s;if(ti[this.mode][r]){this.settings.strict&&this.mode==="math"&&_V.includes(r)&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=ti[this.mode][r].group,u=Wl.range(e),h;rPt(o)?h={type:"atom",mode:this.mode,family:o,loc:u,text:r}:h={type:o,mode:this.mode,loc:u,text:r},s=h}else if(r.charCodeAt(0)>=128)this.settings.strict&&(DTe(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:Wl.range(e),text:r};else return null;if(this.consume(),i)for(var d=0;d<i[0].length;d++){var f=i[0][d];if(!uG[f])throw new hr("Unknown accent ' "+f+"'",e);var p=uG[f][this.mode]||uG[f].text;if(!p)throw new hr("Accent "+f+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:Wl.range(e),label:p,isStretchy:!1,isShifty:!0,base:s}}return s}},l(Hy,"Parser"),Hy);gCe.endOfExpression=new Set(["}","\\endgroup","\\end","\\right","&"]);var hG=l(function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new gCe(e,r);delete n.gullet.macros.current["\\df@tag"];var a=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new hr("\\tag works only in display equations");a=[{type:"tag",mode:"text",body:a,tag:n.subparse([new wc("\\df@tag")])}]}return a},"parseTree"),dG=l(function(e,r,n){r.textContent="";var a=BN(e,n).toNode();r.appendChild(a)},"render");typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),dG=l(function(){throw new hr("KaTeX doesn't work in quirks mode.")},"render"));var mCe=l(function(e,r){var n=BN(e,r).toMarkup();return n},"renderToString"),yCe=l(function(e,r){var n=new I3(r);return hG(e,n)},"generateParseTree"),vCe=l(function(e,r,n){if(n.throwOnError||!(e instanceof hr))throw e;var a=sr(["katex-error"],[new tl(r)]);return a.setAttribute("title",e.toString()),a.setAttribute("style","color:"+n.errorColor),a},"renderError"),BN=l(function(e,r){var n=new I3(r);try{var a=hG(e,n);return jMt(a,e,n)}catch(i){return vCe(i,e,n)}},"renderToDomTree"),bCe=l(function(e,r){var n=new I3(r);try{var a=hG(e,n);return KMt(a,e,n)}catch(i){return vCe(i,e,n)}},"renderToHTMLTree"),xCe="0.16.47",wCe={Span:ip,Anchor:fN,SymbolNode:tl,SvgNode:Gu,PathNode:Yh,LineNode:$3},BPt={version:xCe,render:dG,renderToString:mCe,ParseError:hr,SETTINGS_SCHEMA:uN,__parse:yCe,__renderToDomTree:BN,__renderToHTMLTree:bCe,__setFontMetrics:GTe,__defineSymbol:he,__defineFunction:xr,__defineMacro:Ke,__domTree:wCe},zPt=Object.freeze({__proto__:null,ParseError:hr,SETTINGS_SCHEMA:uN,__defineFunction:xr,__defineMacro:Ke,__defineSymbol:he,__domTree:wCe,__parse:yCe,__renderToDomTree:BN,__renderToHTMLTree:bCe,__setFontMetrics:GTe,default:BPt,get render(){return dG},renderToString:mCe,version:xCe}),TCe=typeof global=="object"&&global&&global.Object===Object&&global,HPt=typeof self=="object"&&self&&self.Object===Object&&self,Zh=TCe||HPt||Function("return this")(),Jc=Zh.Symbol,ECe=Object.prototype,WPt=ECe.hasOwnProperty,VPt=ECe.toString,F3=Jc?Jc.toStringTag:void 0;function GPt(t){var e=WPt.call(t,F3),r=t[F3];try{t[F3]=void 0;var n=!0}catch(i){}var a=VPt.call(t);return n&&(e?t[F3]=r:delete t[F3]),a}l(GPt,"getRawTag$1");var qPt=Object.prototype,YPt=qPt.toString;function UPt(t){return YPt.call(t)}l(UPt,"objectToString$1");var jPt="[object Null]",KPt="[object Undefined]",CCe=Jc?Jc.toStringTag:void 0;function Rm(t){return t==null?t===void 0?KPt:jPt:CCe&&CCe in Object(t)?GPt(t):UPt(t)}l(Rm,"baseGetTag$1");function Qh(t){return t!=null&&typeof t=="object"}l(Qh,"isObjectLike$1");var XPt="[object Symbol]";function Om(t){return typeof t=="symbol"||Qh(t)&&Rm(t)==XPt}l(Om,"isSymbol$1");function iT(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}l(iT,"arrayMap$1");var Zi=Array.isArray,SCe=Jc?Jc.prototype:void 0,_Ce=SCe?SCe.toString:void 0;function kCe(t){if(typeof t=="string")return t;if(Zi(t))return iT(t,kCe)+"";if(Om(t))return _Ce?_Ce.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}l(kCe,"baseToString$1");var ZPt=/\s/;function QPt(t){for(var e=t.length;e--&&ZPt.test(t.charAt(e)););return e}l(QPt,"trimmedEndIndex$1");var JPt=/^\s+/;function eRt(t){return t&&t.slice(0,QPt(t)+1).replace(JPt,"")}l(eRt,"baseTrim$1");function Tc(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}l(Tc,"isObject$1");var ACe=NaN,tRt=/^[-+]0x[0-9a-f]+$/i,rRt=/^0b[01]+$/i,nRt=/^0o[0-7]+$/i,aRt=parseInt;function iRt(t){if(typeof t=="number")return t;if(Om(t))return ACe;if(Tc(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Tc(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=eRt(t);var r=rRt.test(t);return r||nRt.test(t)?aRt(t.slice(2),r?2:8):tRt.test(t)?ACe:+t}l(iRt,"toNumber$1");var NCe=1/0,sRt=17976931348623157e292;function zN(t){if(!t)return t===0?t:0;if(t=iRt(t),t===NCe||t===-NCe){var e=t<0?-1:1;return e*sRt}return t===t?t:0}l(zN,"toFinite$1");function oRt(t){var e=zN(t),r=e%1;return e===e?r?e-r:e:0}l(oRt,"toInteger$1");function Dm(t){return t}l(Dm,"identity$3");var lRt="[object AsyncFunction]",cRt="[object Function]",uRt="[object GeneratorFunction]",hRt="[object Proxy]";function B3(t){if(!Tc(t))return!1;var e=Rm(t);return e==cRt||e==uRt||e==lRt||e==hRt}l(B3,"isFunction$1");var fG=Zh["__core-js_shared__"],ICe=function(){var t=/[^.]+$/.exec(fG&&fG.keys&&fG.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function dRt(t){return!!ICe&&ICe in t}l(dRt,"isMasked$1");var fRt=Function.prototype,pRt=fRt.toString;function Fm(t){if(t!=null){try{return pRt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}l(Fm,"toSource$1");var gRt=/[\\^$.*+?()[\]{}|]/g,mRt=/^\[object .+?Constructor\]$/,yRt=Function.prototype,vRt=Object.prototype,bRt=yRt.toString,xRt=vRt.hasOwnProperty,wRt=RegExp("^"+bRt.call(xRt).replace(gRt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function TRt(t){if(!Tc(t)||dRt(t))return!1;var e=B3(t)?wRt:mRt;return e.test(Fm(t))}l(TRt,"baseIsNative$1");function ERt(t,e){return t==null?void 0:t[e]}l(ERt,"getValue$2");function Bm(t,e){var r=ERt(t,e);return TRt(r)?r:void 0}l(Bm,"getNative$1");var pG=Bm(Zh,"WeakMap"),LCe=Object.create,CRt=function(){function t(){}return l(t,"object"),function(e){if(!Tc(e))return{};if(LCe)return LCe(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function SRt(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}l(SRt,"apply$1");function _Rt(){}l(_Rt,"noop$3");function $Ce(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}l($Ce,"copyArray$2");var kRt=800,ARt=16,NRt=Date.now;function IRt(t){var e=0,r=0;return function(){var n=NRt(),a=ARt-(n-r);if(r=n,a>0){if(++e>=kRt)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}l(IRt,"shortOut$1");function sT(t){return function(){return t}}l(sT,"constant$3");var HN=function(){try{var t=Bm(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),LRt=HN?function(t,e){return HN(t,"toString",{configurable:!0,enumerable:!1,value:sT(e),writable:!0})}:Dm,MCe=IRt(LRt);function PCe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}l(PCe,"arrayEach$1");function RCe(t,e,r,n){for(var a=t.length,i=r+-1;++i<a;)if(e(t[i],i,t))return i;return-1}l(RCe,"baseFindIndex$1");function $Rt(t){return t!==t}l($Rt,"baseIsNaN$1");function MRt(t,e,r){for(var n=r-1,a=t.length;++n<a;)if(t[n]===e)return n;return-1}l(MRt,"strictIndexOf$1");function PRt(t,e,r){return e===e?MRt(t,e,r):RCe(t,$Rt,r)}l(PRt,"baseIndexOf$1");function RRt(t,e){var r=t==null?0:t.length;return!!r&&PRt(t,e,0)>-1}l(RRt,"arrayIncludes$1");var ORt=9007199254740991,DRt=/^(?:0|[1-9]\d*)$/;function WN(t,e){var r=typeof t;return e=e==null?ORt:e,!!e&&(r=="number"||r!="symbol"&&DRt.test(t))&&t>-1&&t%1==0&&t<e}l(WN,"isIndex$1");function VN(t,e,r){e=="__proto__"&&HN?HN(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}l(VN,"baseAssignValue$1");function oT(t,e){return t===e||t!==t&&e!==e}l(oT,"eq$1");var FRt=Object.prototype,BRt=FRt.hasOwnProperty;function GN(t,e,r){var n=t[e];(!(BRt.call(t,e)&&oT(n,r))||r===void 0&&!(e in t))&&VN(t,e,r)}l(GN,"assignValue$1");function z3(t,e,r,n){var a=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var o=e[i],u=void 0;u===void 0&&(u=t[o]),a?VN(r,o,u):GN(r,o,u)}return r}l(z3,"copyObject$1");var OCe=Math.max;function DCe(t,e,r){return e=OCe(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=OCe(n.length-e,0),s=Array(i);++a<i;)s[a]=n[e+a];a=-1;for(var o=Array(e+1);++a<e;)o[a]=n[a];return o[e]=r(s),SRt(t,this,o)}}l(DCe,"overRest$1");function qN(t,e){return MCe(DCe(t,e,Dm),t+"")}l(qN,"baseRest$1");var zRt=9007199254740991;function gG(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=zRt}l(gG,"isLength$1");function hp(t){return t!=null&&gG(t.length)&&!B3(t)}l(hp,"isArrayLike$1");function H3(t,e,r){if(!Tc(r))return!1;var n=typeof e;return(n=="number"?hp(r)&&WN(e,r.length):n=="string"&&e in r)?oT(r[e],t):!1}l(H3,"isIterateeCall$1");function HRt(t){return qN(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,s&&H3(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),e=Object(e);++n<a;){var o=r[n];o&&t(e,o,n,i)}return e})}l(HRt,"createAssigner$1");var WRt=Object.prototype;function YN(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||WRt;return t===r}l(YN,"isPrototype$1");function VRt(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}l(VRt,"baseTimes$1");var GRt="[object Arguments]";function FCe(t){return Qh(t)&&Rm(t)==GRt}l(FCe,"baseIsArguments$1");var BCe=Object.prototype,qRt=BCe.hasOwnProperty,YRt=BCe.propertyIsEnumerable,lT=FCe(function(){return arguments}())?FCe:function(t){return Qh(t)&&qRt.call(t,"callee")&&!YRt.call(t,"callee")};function URt(){return!1}l(URt,"stubFalse$1");var zCe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,HCe=zCe&&typeof module=="object"&&module&&!module.nodeType&&module,jRt=HCe&&HCe.exports===zCe,WCe=jRt?Zh.Buffer:void 0,KRt=WCe?WCe.isBuffer:void 0,cT=KRt||URt,XRt="[object Arguments]",ZRt="[object Array]",QRt="[object Boolean]",JRt="[object Date]",e9t="[object Error]",t9t="[object Function]",r9t="[object Map]",n9t="[object Number]",a9t="[object Object]",i9t="[object RegExp]",s9t="[object Set]",o9t="[object String]",l9t="[object WeakMap]",c9t="[object ArrayBuffer]",u9t="[object DataView]",h9t="[object Float32Array]",d9t="[object Float64Array]",f9t="[object Int8Array]",p9t="[object Int16Array]",g9t="[object Int32Array]",m9t="[object Uint8Array]",y9t="[object Uint8ClampedArray]",v9t="[object Uint16Array]",b9t="[object Uint32Array]",qa={};qa[h9t]=qa[d9t]=qa[f9t]=qa[p9t]=qa[g9t]=qa[m9t]=qa[y9t]=qa[v9t]=qa[b9t]=!0,qa[XRt]=qa[ZRt]=qa[c9t]=qa[QRt]=qa[u9t]=qa[JRt]=qa[e9t]=qa[t9t]=qa[r9t]=qa[n9t]=qa[a9t]=qa[i9t]=qa[s9t]=qa[o9t]=qa[l9t]=!1;function x9t(t){return Qh(t)&&gG(t.length)&&!!qa[Rm(t)]}l(x9t,"baseIsTypedArray$1");function UN(t){return function(e){return t(e)}}l(UN,"baseUnary$1");var VCe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,W3=VCe&&typeof module=="object"&&module&&!module.nodeType&&module,w9t=W3&&W3.exports===VCe,mG=w9t&&TCe.process,uT=function(){try{var t=W3&&W3.require&&W3.require("util").types;return t||mG&&mG.binding&&mG.binding("util")}catch(e){}}(),GCe=uT&&uT.isTypedArray,jN=GCe?UN(GCe):x9t,T9t=Object.prototype,E9t=T9t.hasOwnProperty;function qCe(t,e){var r=Zi(t),n=!r&&lT(t),a=!r&&!n&&cT(t),i=!r&&!n&&!a&&jN(t),s=r||n||a||i,o=s?VRt(t.length,String):[],u=o.length;for(var h in t)(e||E9t.call(t,h))&&!(s&&(h=="length"||a&&(h=="offset"||h=="parent")||i&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||WN(h,u)))&&o.push(h);return o}l(qCe,"arrayLikeKeys$1");function YCe(t,e){return function(r){return t(e(r))}}l(YCe,"overArg$1");var C9t=YCe(Object.keys,Object),S9t=Object.prototype,_9t=S9t.hasOwnProperty;function UCe(t){if(!YN(t))return C9t(t);var e=[];for(var r in Object(t))_9t.call(t,r)&&r!="constructor"&&e.push(r);return e}l(UCe,"baseKeys$1");function Ec(t){return hp(t)?qCe(t):UCe(t)}l(Ec,"keys$1");function k9t(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}l(k9t,"nativeKeysIn$1");var A9t=Object.prototype,N9t=A9t.hasOwnProperty;function I9t(t){if(!Tc(t))return k9t(t);var e=YN(t),r=[];for(var n in t)n=="constructor"&&(e||!N9t.call(t,n))||r.push(n);return r}l(I9t,"baseKeysIn$1");function zm(t){return hp(t)?qCe(t,!0):I9t(t)}l(zm,"keysIn$1");var L9t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$9t=/^\w*$/;function yG(t,e){if(Zi(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Om(t)?!0:$9t.test(t)||!L9t.test(t)||e!=null&&t in Object(e)}l(yG,"isKey$1");var V3=Bm(Object,"create");function M9t(){this.__data__=V3?V3(null):{},this.size=0}l(M9t,"hashClear$1");function P9t(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}l(P9t,"hashDelete$1");var R9t="__lodash_hash_undefined__",O9t=Object.prototype,D9t=O9t.hasOwnProperty;function F9t(t){var e=this.__data__;if(V3){var r=e[t];return r===R9t?void 0:r}return D9t.call(e,t)?e[t]:void 0}l(F9t,"hashGet$1");var B9t=Object.prototype,z9t=B9t.hasOwnProperty;function H9t(t){var e=this.__data__;return V3?e[t]!==void 0:z9t.call(e,t)}l(H9t,"hashHas$1");var W9t="__lodash_hash_undefined__";function V9t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=V3&&e===void 0?W9t:e,this}l(V9t,"hashSet$1");function Hm(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(Hm,"Hash$1"),Hm.prototype.clear=M9t,Hm.prototype.delete=P9t,Hm.prototype.get=F9t,Hm.prototype.has=H9t,Hm.prototype.set=V9t;function G9t(){this.__data__=[],this.size=0}l(G9t,"listCacheClear$1");function KN(t,e){for(var r=t.length;r--;)if(oT(t[r][0],e))return r;return-1}l(KN,"assocIndexOf$1");var q9t=Array.prototype,Y9t=q9t.splice;function U9t(t){var e=this.__data__,r=KN(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Y9t.call(e,r,1),--this.size,!0}l(U9t,"listCacheDelete$1");function j9t(t){var e=this.__data__,r=KN(e,t);return r<0?void 0:e[r][1]}l(j9t,"listCacheGet$1");function K9t(t){return KN(this.__data__,t)>-1}l(K9t,"listCacheHas$1");function X9t(t,e){var r=this.__data__,n=KN(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}l(X9t,"listCacheSet$1");function xf(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(xf,"ListCache$1"),xf.prototype.clear=G9t,xf.prototype.delete=U9t,xf.prototype.get=j9t,xf.prototype.has=K9t,xf.prototype.set=X9t;var G3=Bm(Zh,"Map");function Z9t(){this.size=0,this.__data__={hash:new Hm,map:new(G3||xf),string:new Hm}}l(Z9t,"mapCacheClear$1");function Q9t(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}l(Q9t,"isKeyable$1");function XN(t,e){var r=t.__data__;return Q9t(e)?r[typeof e=="string"?"string":"hash"]:r.map}l(XN,"getMapData$1");function J9t(t){var e=XN(this,t).delete(t);return this.size-=e?1:0,e}l(J9t,"mapCacheDelete$1");function eOt(t){return XN(this,t).get(t)}l(eOt,"mapCacheGet$1");function tOt(t){return XN(this,t).has(t)}l(tOt,"mapCacheHas$1");function rOt(t,e){var r=XN(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}l(rOt,"mapCacheSet$1");function wf(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(wf,"MapCache$1"),wf.prototype.clear=Z9t,wf.prototype.delete=J9t,wf.prototype.get=eOt,wf.prototype.has=tOt,wf.prototype.set=rOt;var nOt="Expected a function";function vG(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(nOt);var r=l(function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=t.apply(this,n);return r.cache=i.set(a,s)||i,s},"memoized");return r.cache=new(vG.Cache||wf),r}l(vG,"memoize$2"),vG.Cache=wf;var aOt=500;function iOt(t){var e=vG(t,function(n){return r.size===aOt&&r.clear(),n}),r=e.cache;return e}l(iOt,"memoizeCapped$1");var sOt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oOt=/\\(\\)?/g,lOt=iOt(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(sOt,function(r,n,a,i){e.push(a?i.replace(oOt,"$1"):n||r)}),e});function jCe(t){return t==null?"":kCe(t)}l(jCe,"toString$2");function ZN(t,e){return Zi(t)?t:yG(t,e)?[t]:lOt(jCe(t))}l(ZN,"castPath$1");function q3(t){if(typeof t=="string"||Om(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}l(q3,"toKey$1");function QN(t,e){e=ZN(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[q3(e[r++])];return r&&r==n?t:void 0}l(QN,"baseGet$1");function cOt(t,e,r){var n=t==null?void 0:QN(t,e);return n===void 0?r:n}l(cOt,"get$2");function bG(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}l(bG,"arrayPush$1");var KCe=Jc?Jc.isConcatSpreadable:void 0;function uOt(t){return Zi(t)||lT(t)||!!(KCe&&t&&t[KCe])}l(uOt,"isFlattenable$1");function xG(t,e,r,n,a){var i=-1,s=t.length;for(r||(r=uOt),a||(a=[]);++i<s;){var o=t[i];r(o)?bG(a,o):n||(a[a.length]=o)}return a}l(xG,"baseFlatten$1");function hT(t){var e=t==null?0:t.length;return e?xG(t):[]}l(hT,"flatten$1");function hOt(t){return MCe(DCe(t,void 0,hT),t+"")}l(hOt,"flatRest");var wG=YCe(Object.getPrototypeOf,Object),dOt="[object Object]",fOt=Function.prototype,pOt=Object.prototype,XCe=fOt.toString,gOt=pOt.hasOwnProperty,mOt=XCe.call(Object);function yOt(t){if(!Qh(t)||Rm(t)!=dOt)return!1;var e=wG(t);if(e===null)return!0;var r=gOt.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&XCe.call(r)==mOt}l(yOt,"isPlainObject");function vOt(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a<i;)r=e(r,t[a],a,t);return r}l(vOt,"arrayReduce$1");function bOt(){this.__data__=new xf,this.size=0}l(bOt,"stackClear$1");function xOt(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}l(xOt,"stackDelete$1");function wOt(t){return this.__data__.get(t)}l(wOt,"stackGet$1");function TOt(t){return this.__data__.has(t)}l(TOt,"stackHas$1");var EOt=200;function COt(t,e){var r=this.__data__;if(r instanceof xf){var n=r.__data__;if(!G3||n.length<EOt-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new wf(n)}return r.set(t,e),this.size=r.size,this}l(COt,"stackSet$1");function qu(t){var e=this.__data__=new xf(t);this.size=e.size}l(qu,"Stack$1"),qu.prototype.clear=bOt,qu.prototype.delete=xOt,qu.prototype.get=wOt,qu.prototype.has=TOt,qu.prototype.set=COt;function SOt(t,e){return t&&z3(e,Ec(e),t)}l(SOt,"baseAssign$1");function _Ot(t,e){return t&&z3(e,zm(e),t)}l(_Ot,"baseAssignIn$1");var ZCe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,QCe=ZCe&&typeof module=="object"&&module&&!module.nodeType&&module,kOt=QCe&&QCe.exports===ZCe,JCe=kOt?Zh.Buffer:void 0,eSe=JCe?JCe.allocUnsafe:void 0;function tSe(t,e){if(e)return t.slice();var r=t.length,n=eSe?eSe(r):new t.constructor(r);return t.copy(n),n}l(tSe,"cloneBuffer$1");function rSe(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var s=t[r];e(s,r,t)&&(i[a++]=s)}return i}l(rSe,"arrayFilter$1");function nSe(){return[]}l(nSe,"stubArray$1");var AOt=Object.prototype,NOt=AOt.propertyIsEnumerable,aSe=Object.getOwnPropertySymbols,TG=aSe?function(t){return t==null?[]:(t=Object(t),rSe(aSe(t),function(e){return NOt.call(t,e)}))}:nSe;function IOt(t,e){return z3(t,TG(t),e)}l(IOt,"copySymbols$1");var LOt=Object.getOwnPropertySymbols,iSe=LOt?function(t){for(var e=[];t;)bG(e,TG(t)),t=wG(t);return e}:nSe;function $Ot(t,e){return z3(t,iSe(t),e)}l($Ot,"copySymbolsIn$1");function sSe(t,e,r){var n=e(t);return Zi(t)?n:bG(n,r(t))}l(sSe,"baseGetAllKeys$1");function EG(t){return sSe(t,Ec,TG)}l(EG,"getAllKeys$1");function MOt(t){return sSe(t,zm,iSe)}l(MOt,"getAllKeysIn$1");var CG=Bm(Zh,"DataView"),SG=Bm(Zh,"Promise"),dT=Bm(Zh,"Set"),oSe="[object Map]",POt="[object Object]",lSe="[object Promise]",cSe="[object Set]",uSe="[object WeakMap]",hSe="[object DataView]",ROt=Fm(CG),OOt=Fm(G3),DOt=Fm(SG),FOt=Fm(dT),BOt=Fm(pG),eu=Rm;(CG&&eu(new CG(new ArrayBuffer(1)))!=hSe||G3&&eu(new G3)!=oSe||SG&&eu(SG.resolve())!=lSe||dT&&eu(new dT)!=cSe||pG&&eu(new pG)!=uSe)&&(eu=l(function(t){var e=Rm(t),r=e==POt?t.constructor:void 0,n=r?Fm(r):"";if(n)switch(n){case ROt:return hSe;case OOt:return oSe;case DOt:return lSe;case FOt:return cSe;case BOt:return uSe}return e},"getTag$1"));var zOt=Object.prototype,HOt=zOt.hasOwnProperty;function WOt(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&HOt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}l(WOt,"initCloneArray$1");var JN=Zh.Uint8Array;function _G(t){var e=new t.constructor(t.byteLength);return new JN(e).set(new JN(t)),e}l(_G,"cloneArrayBuffer$1");function VOt(t,e){var r=e?_G(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}l(VOt,"cloneDataView$1");var GOt=/\w*$/;function qOt(t){var e=new t.constructor(t.source,GOt.exec(t));return e.lastIndex=t.lastIndex,e}l(qOt,"cloneRegExp$1");var dSe=Jc?Jc.prototype:void 0,fSe=dSe?dSe.valueOf:void 0;function YOt(t){return fSe?Object(fSe.call(t)):{}}l(YOt,"cloneSymbol$1");function pSe(t,e){var r=e?_G(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}l(pSe,"cloneTypedArray$1");var UOt="[object Boolean]",jOt="[object Date]",KOt="[object Map]",XOt="[object Number]",ZOt="[object RegExp]",QOt="[object Set]",JOt="[object String]",eDt="[object Symbol]",tDt="[object ArrayBuffer]",rDt="[object DataView]",nDt="[object Float32Array]",aDt="[object Float64Array]",iDt="[object Int8Array]",sDt="[object Int16Array]",oDt="[object Int32Array]",lDt="[object Uint8Array]",cDt="[object Uint8ClampedArray]",uDt="[object Uint16Array]",hDt="[object Uint32Array]";function dDt(t,e,r){var n=t.constructor;switch(e){case tDt:return _G(t);case UOt:case jOt:return new n(+t);case rDt:return VOt(t,r);case nDt:case aDt:case iDt:case sDt:case oDt:case lDt:case cDt:case uDt:case hDt:return pSe(t,r);case KOt:return new n;case XOt:case JOt:return new n(t);case ZOt:return qOt(t);case QOt:return new n;case eDt:return YOt(t)}}l(dDt,"initCloneByTag$1");function gSe(t){return typeof t.constructor=="function"&&!YN(t)?CRt(wG(t)):{}}l(gSe,"initCloneObject$1");var fDt="[object Map]";function pDt(t){return Qh(t)&&eu(t)==fDt}l(pDt,"baseIsMap$1");var mSe=uT&&uT.isMap,gDt=mSe?UN(mSe):pDt,mDt="[object Set]";function yDt(t){return Qh(t)&&eu(t)==mDt}l(yDt,"baseIsSet$1");var ySe=uT&&uT.isSet,vDt=ySe?UN(ySe):yDt,bDt=1,xDt=2,wDt=4,vSe="[object Arguments]",TDt="[object Array]",EDt="[object Boolean]",CDt="[object Date]",SDt="[object Error]",bSe="[object Function]",_Dt="[object GeneratorFunction]",kDt="[object Map]",ADt="[object Number]",xSe="[object Object]",NDt="[object RegExp]",IDt="[object Set]",LDt="[object String]",$Dt="[object Symbol]",MDt="[object WeakMap]",PDt="[object ArrayBuffer]",RDt="[object DataView]",ODt="[object Float32Array]",DDt="[object Float64Array]",FDt="[object Int8Array]",BDt="[object Int16Array]",zDt="[object Int32Array]",HDt="[object Uint8Array]",WDt="[object Uint8ClampedArray]",VDt="[object Uint16Array]",GDt="[object Uint32Array]",La={};La[vSe]=La[TDt]=La[PDt]=La[RDt]=La[EDt]=La[CDt]=La[ODt]=La[DDt]=La[FDt]=La[BDt]=La[zDt]=La[kDt]=La[ADt]=La[xSe]=La[NDt]=La[IDt]=La[LDt]=La[$Dt]=La[HDt]=La[WDt]=La[VDt]=La[GDt]=!0,La[SDt]=La[bSe]=La[MDt]=!1;function Y3(t,e,r,n,a,i){var s,o=e&bDt,u=e&xDt,h=e&wDt;if(s!==void 0)return s;if(!Tc(t))return t;var d=Zi(t);if(d){if(s=WOt(t),!o)return $Ce(t,s)}else{var f=eu(t),p=f==bSe||f==_Dt;if(cT(t))return tSe(t,o);if(f==xSe||f==vSe||p&&!a){if(s=u||p?{}:gSe(t),!o)return u?$Ot(t,_Ot(s,t)):IOt(t,SOt(s,t))}else{if(!La[f])return a?t:{};s=dDt(t,f,o)}}i||(i=new qu);var g=i.get(t);if(g)return g;i.set(t,s),vDt(t)?t.forEach(function(v){s.add(Y3(v,e,r,v,t,i))}):gDt(t)&&t.forEach(function(v,b){s.set(b,Y3(v,e,r,b,t,i))});var m=h?u?MOt:EG:u?zm:Ec,y=d?void 0:m(t);return PCe(y||t,function(v,b){y&&(b=v,v=t[b]),GN(s,b,Y3(v,e,r,b,t,i))}),s}l(Y3,"baseClone$1");var qDt=4;function YDt(t){return Y3(t,qDt)}l(YDt,"clone$3");var UDt=1,jDt=4;function KDt(t){return Y3(t,UDt|jDt)}l(KDt,"cloneDeep");var XDt="__lodash_hash_undefined__";function ZDt(t){return this.__data__.set(t,XDt),this}l(ZDt,"setCacheAdd$1");function QDt(t){return this.__data__.has(t)}l(QDt,"setCacheHas$1");function U3(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new wf;++e<r;)this.add(t[e])}l(U3,"SetCache$1"),U3.prototype.add=U3.prototype.push=ZDt,U3.prototype.has=QDt;function JDt(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}l(JDt,"arraySome$1");function wSe(t,e){return t.has(e)}l(wSe,"cacheHas$1");var eFt=1,tFt=2;function TSe(t,e,r,n,a,i){var s=r&eFt,o=t.length,u=e.length;if(o!=u&&!(s&&u>o))return!1;var h=i.get(t),d=i.get(e);if(h&&d)return h==e&&d==t;var f=-1,p=!0,g=r&tFt?new U3:void 0;for(i.set(t,e),i.set(e,t);++f<o;){var m=t[f],y=e[f];if(n)var v=s?n(y,m,f,e,t,i):n(m,y,f,t,e,i);if(v!==void 0){if(v)continue;p=!1;break}if(g){if(!JDt(e,function(b,w){if(!wSe(g,w)&&(m===b||a(m,b,r,n,i)))return g.push(w)})){p=!1;break}}else if(!(m===y||a(m,y,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}l(TSe,"equalArrays$1");function rFt(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}l(rFt,"mapToArray$1");function kG(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}l(kG,"setToArray$1");var nFt=1,aFt=2,iFt="[object Boolean]",sFt="[object Date]",oFt="[object Error]",lFt="[object Map]",cFt="[object Number]",uFt="[object RegExp]",hFt="[object Set]",dFt="[object String]",fFt="[object Symbol]",pFt="[object ArrayBuffer]",gFt="[object DataView]",ESe=Jc?Jc.prototype:void 0,AG=ESe?ESe.valueOf:void 0;function mFt(t,e,r,n,a,i,s){switch(r){case gFt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case pFt:return!(t.byteLength!=e.byteLength||!i(new JN(t),new JN(e)));case iFt:case sFt:case cFt:return oT(+t,+e);case oFt:return t.name==e.name&&t.message==e.message;case uFt:case dFt:return t==e+"";case lFt:var o=rFt;case hFt:var u=n&nFt;if(o||(o=kG),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=aFt,s.set(t,e);var d=TSe(o(t),o(e),n,a,i,s);return s.delete(t),d;case fFt:if(AG)return AG.call(t)==AG.call(e)}return!1}l(mFt,"equalByTag$1");var yFt=1,vFt=Object.prototype,bFt=vFt.hasOwnProperty;function xFt(t,e,r,n,a,i){var s=r&yFt,o=EG(t),u=o.length,h=EG(e),d=h.length;if(u!=d&&!s)return!1;for(var f=u;f--;){var p=o[f];if(!(s?p in e:bFt.call(e,p)))return!1}var g=i.get(t),m=i.get(e);if(g&&m)return g==e&&m==t;var y=!0;i.set(t,e),i.set(e,t);for(var v=s;++f<u;){p=o[f];var b=t[p],w=e[p];if(n)var x=s?n(w,b,p,e,t,i):n(b,w,p,t,e,i);if(!(x===void 0?b===w||a(b,w,r,n,i):x)){y=!1;break}v||(v=p=="constructor")}if(y&&!v){var T=t.constructor,C=e.constructor;T!=C&&"constructor"in t&&"constructor"in e&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(y=!1)}return i.delete(t),i.delete(e),y}l(xFt,"equalObjects$1");var wFt=1,CSe="[object Arguments]",SSe="[object Array]",eI="[object Object]",TFt=Object.prototype,_Se=TFt.hasOwnProperty;function EFt(t,e,r,n,a,i){var s=Zi(t),o=Zi(e),u=s?SSe:eu(t),h=o?SSe:eu(e);u=u==CSe?eI:u,h=h==CSe?eI:h;var d=u==eI,f=h==eI,p=u==h;if(p&&cT(t)){if(!cT(e))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new qu),s||jN(t)?TSe(t,e,r,n,a,i):mFt(t,e,u,r,n,a,i);if(!(r&wFt)){var g=d&&_Se.call(t,"__wrapped__"),m=f&&_Se.call(e,"__wrapped__");if(g||m){var y=g?t.value():t,v=m?e.value():e;return i||(i=new qu),a(y,v,r,n,i)}}return p?(i||(i=new qu),xFt(t,e,r,n,a,i)):!1}l(EFt,"baseIsEqualDeep$1");function NG(t,e,r,n,a){return t===e?!0:t==null||e==null||!Qh(t)&&!Qh(e)?t!==t&&e!==e:EFt(t,e,r,n,NG,a)}l(NG,"baseIsEqual$1");var CFt=1,SFt=2;function _Ft(t,e,r,n){var a=r.length,i=a;if(t==null)return!i;for(t=Object(t);a--;){var s=r[a];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<i;){s=r[a];var o=s[0],u=t[o],h=s[1];if(s[2]){if(u===void 0&&!(o in t))return!1}else{var d=new qu,f;if(!(f===void 0?NG(h,u,CFt|SFt,n,d):f))return!1}}return!0}l(_Ft,"baseIsMatch$1");function kSe(t){return t===t&&!Tc(t)}l(kSe,"isStrictComparable$1");function kFt(t){for(var e=Ec(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,kSe(a)]}return e}l(kFt,"getMatchData$1");function ASe(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}l(ASe,"matchesStrictComparable$1");function AFt(t){var e=kFt(t);return e.length==1&&e[0][2]?ASe(e[0][0],e[0][1]):function(r){return r===t||_Ft(r,t,e)}}l(AFt,"baseMatches$1");function NFt(t,e){return t!=null&&e in Object(t)}l(NFt,"baseHasIn$1");function NSe(t,e,r){e=ZN(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var s=q3(e[n]);if(!(i=t!=null&&r(t,s)))break;t=t[s]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&gG(a)&&WN(s,a)&&(Zi(t)||lT(t)))}l(NSe,"hasPath$1");function ISe(t,e){return t!=null&&NSe(t,e,NFt)}l(ISe,"hasIn$1");var IFt=1,LFt=2;function $Ft(t,e){return yG(t)&&kSe(e)?ASe(q3(t),e):function(r){var n=cOt(r,t);return n===void 0&&n===e?ISe(r,t):NG(e,n,IFt|LFt)}}l($Ft,"baseMatchesProperty$1");function MFt(t){return function(e){return e==null?void 0:e[t]}}l(MFt,"baseProperty$1");function PFt(t){return function(e){return QN(e,t)}}l(PFt,"basePropertyDeep$1");function RFt(t){return yG(t)?MFt(q3(t)):PFt(t)}l(RFt,"property$1");function dp(t){return typeof t=="function"?t:t==null?Dm:typeof t=="object"?Zi(t)?$Ft(t[0],t[1]):AFt(t):RFt(t)}l(dp,"baseIteratee$1");function OFt(t){return function(e,r,n){for(var a=-1,i=Object(e),s=n(e),o=s.length;o--;){var u=s[++a];if(r(i[u],u,i)===!1)break}return e}}l(OFt,"createBaseFor$1");var IG=OFt();function LG(t,e){return t&&IG(t,e,Ec)}l(LG,"baseForOwn$1");function DFt(t,e){return function(r,n){if(r==null)return r;if(!hp(r))return t(r,n);for(var a=r.length,i=-1,s=Object(r);++i<a&&n(s[i],i,s)!==!1;);return r}}l(DFt,"createBaseEach$1");var tI=DFt(LG),LSe=Object.prototype,FFt=LSe.hasOwnProperty,BFt=qN(function(t,e){t=Object(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&H3(e[0],e[1],a)&&(n=1);++r<n;)for(var i=e[r],s=zm(i),o=-1,u=s.length;++o<u;){var h=s[o],d=t[h];(d===void 0||oT(d,LSe[h])&&!FFt.call(t,h))&&(t[h]=i[h])}return t});function $G(t,e,r){(r!==void 0&&!oT(t[e],r)||r===void 0&&!(e in t))&&VN(t,e,r)}l($G,"assignMergeValue");function $Se(t){return Qh(t)&&hp(t)}l($Se,"isArrayLikeObject$1");function MG(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}l(MG,"safeGet");function zFt(t){return z3(t,zm(t))}l(zFt,"toPlainObject");function HFt(t,e,r,n,a,i,s){var o=MG(t,r),u=MG(e,r),h=s.get(u);if(h){$G(t,r,h);return}var d=i?i(o,u,r+"",t,e,s):void 0,f=d===void 0;if(f){var p=Zi(u),g=!p&&cT(u),m=!p&&!g&&jN(u);d=u,p||g||m?Zi(o)?d=o:$Se(o)?d=$Ce(o):g?(f=!1,d=tSe(u,!0)):m?(f=!1,d=pSe(u,!0)):d=[]:yOt(u)||lT(u)?(d=o,lT(o)?d=zFt(o):(!Tc(o)||B3(o))&&(d=gSe(u))):f=!1}f&&(s.set(u,d),a(d,u,n,i,s),s.delete(u)),$G(t,r,d)}l(HFt,"baseMergeDeep");function MSe(t,e,r,n,a){t!==e&&IG(e,function(i,s){if(a||(a=new qu),Tc(i))HFt(t,e,s,r,MSe,n,a);else{var o=n?n(MG(t,s),i,s+"",t,e,a):void 0;o===void 0&&(o=i),$G(t,s,o)}},zm)}l(MSe,"baseMerge");function rI(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}l(rI,"last$1");function PG(t){return typeof t=="function"?t:Dm}l(PG,"castFunction$1");function Zt(t,e){var r=Zi(t)?PCe:tI;return r(t,PG(e))}l(Zt,"forEach$1");function WFt(t,e){var r=[];return tI(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}l(WFt,"baseFilter$1");function Tf(t,e){var r=Zi(t)?rSe:WFt;return r(t,dp(e))}l(Tf,"filter$2");function VFt(t){return function(e,r,n){var a=Object(e);if(!hp(e)){var i=dp(r);e=Ec(e),r=l(function(o){return i(a[o],o,a)},"predicate")}var s=t(e,r,n);return s>-1?a[i?e[s]:s]:void 0}}l(VFt,"createFind$1");var GFt=Math.max;function qFt(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:oRt(r);return a<0&&(a=GFt(n+a,0)),RCe(t,dp(e),a)}l(qFt,"findIndex$1");var RG=VFt(qFt);function PSe(t,e){var r=-1,n=hp(t)?Array(t.length):[];return tI(t,function(a,i,s){n[++r]=e(a,i,s)}),n}l(PSe,"baseMap$1");function Qi(t,e){var r=Zi(t)?iT:PSe;return r(t,dp(e))}l(Qi,"map$1");function YFt(t,e){return t==null?t:IG(t,PG(e),zm)}l(YFt,"forIn");function UFt(t,e){return t&&LG(t,PG(e))}l(UFt,"forOwn");function jFt(t,e){return t>e}l(jFt,"baseGt");var KFt=Object.prototype,XFt=KFt.hasOwnProperty;function ZFt(t,e){return t!=null&&XFt.call(t,e)}l(ZFt,"baseHas$1");function RSe(t,e){return t!=null&&NSe(t,e,ZFt)}l(RSe,"has$1");function QFt(t,e){return iT(e,function(r){return t[r]})}l(QFt,"baseValues$1");function Ef(t){return t==null?[]:QFt(t,Ec(t))}l(Ef,"values$1");var JFt="[object Map]",eBt="[object Set]",tBt=Object.prototype,rBt=tBt.hasOwnProperty;function OSe(t){if(t==null)return!0;if(hp(t)&&(Zi(t)||typeof t=="string"||typeof t.splice=="function"||cT(t)||jN(t)||lT(t)))return!t.length;var e=eu(t);if(e==JFt||e==eBt)return!t.size;if(YN(t))return!UCe(t).length;for(var r in t)if(rBt.call(t,r))return!1;return!0}l(OSe,"isEmpty$1");function Di(t){return t===void 0}l(Di,"isUndefined$1");function DSe(t,e){return t<e}l(DSe,"baseLt$1");function nI(t,e){var r={};return e=dp(e),LG(t,function(n,a,i){VN(r,a,e(n,a,i))}),r}l(nI,"mapValues");function OG(t,e,r){for(var n=-1,a=t.length;++n<a;){var i=t[n],s=e(i);if(s!=null&&(o===void 0?s===s&&!Om(s):r(s,o)))var o=s,u=i}return u}l(OG,"baseExtremum$1");function Wm(t){return t&&t.length?OG(t,Dm,jFt):void 0}l(Wm,"max$2");var DG=HRt(function(t,e,r){MSe(t,e,r)});function j3(t){return t&&t.length?OG(t,Dm,DSe):void 0}l(j3,"min$3");function FG(t,e){return t&&t.length?OG(t,dp(e),DSe):void 0}l(FG,"minBy");function nBt(t,e,r,n){if(!Tc(t))return t;e=ZN(e,t);for(var a=-1,i=e.length,s=i-1,o=t;o!=null&&++a<i;){var u=q3(e[a]),h=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(a!=s){var d=o[u];h=void 0,h===void 0&&(h=Tc(d)?d:WN(e[a+1])?[]:{})}GN(o,u,h),o=o[u]}return t}l(nBt,"baseSet$1");function aBt(t,e,r){for(var n=-1,a=e.length,i={};++n<a;){var s=e[n],o=QN(t,s);r(o,s)&&nBt(i,ZN(s,t),o)}return i}l(aBt,"basePickBy$1");function iBt(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}l(iBt,"baseSortBy");function sBt(t,e){if(t!==e){var r=t!==void 0,n=t===null,a=t===t,i=Om(t),s=e!==void 0,o=e===null,u=e===e,h=Om(e);if(!o&&!h&&!i&&t>e||i&&s&&u&&!o&&!h||n&&s&&u||!r&&u||!a)return 1;if(!n&&!i&&!h&&t<e||h&&r&&a&&!n&&!i||o&&r&&a||!s&&a||!u)return-1}return 0}l(sBt,"compareAscending");function oBt(t,e,r){for(var n=-1,a=t.criteria,i=e.criteria,s=a.length,o=r.length;++n<s;){var u=sBt(a[n],i[n]);if(u){if(n>=o)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return t.index-e.index}l(oBt,"compareMultiple");function lBt(t,e,r){e.length?e=iT(e,function(i){return Zi(i)?function(s){return QN(s,i.length===1?i[0]:i)}:i}):e=[Dm];var n=-1;e=iT(e,UN(dp));var a=PSe(t,function(i,s,o){var u=iT(e,function(h){return h(i)});return{criteria:u,index:++n,value:i}});return iBt(a,function(i,s){return oBt(i,s,r)})}l(lBt,"baseOrderBy");function cBt(t,e){return aBt(t,e,function(r,n){return ISe(t,n)})}l(cBt,"basePick");var aI=hOt(function(t,e){return t==null?{}:cBt(t,e)}),uBt=Math.ceil,hBt=Math.max;function dBt(t,e,r,n){for(var a=-1,i=hBt(uBt((e-t)/(r||1)),0),s=Array(i);i--;)s[++a]=t,t+=r;return s}l(dBt,"baseRange");function fBt(t){return function(e,r,n){return n&&typeof n!="number"&&H3(e,r,n)&&(r=n=void 0),e=zN(e),r===void 0?(r=e,e=0):r=zN(r),n=n===void 0?e<r?1:-1:zN(n),dBt(e,r,n)}}l(fBt,"createRange");var fT=fBt();function pBt(t,e,r,n,a){return a(t,function(i,s,o){r=n?(n=!1,i):e(r,i,s,o)}),r}l(pBt,"baseReduce$1");function K3(t,e,r){var n=Zi(t)?vOt:pBt,a=arguments.length<3;return n(t,dp(e),r,a,tI)}l(K3,"reduce$1");var X3=qN(function(t,e){if(t==null)return[];var r=e.length;return r>1&&H3(t,e[0],e[1])?e=[]:r>2&&H3(e[0],e[1],e[2])&&(e=[e[0]]),lBt(t,xG(e),[])}),gBt=1/0,mBt=dT&&1/kG(new dT([,-0]))[1]==gBt?function(t){return new dT(t)}:_Rt,yBt=200;function vBt(t,e,r){var n=-1,a=RRt,i=t.length,s=!0,o=[],u=o;if(i>=yBt){var h=mBt(t);if(h)return kG(h);s=!1,a=wSe,u=new U3}else u=o;e:for(;++n<i;){var d=t[n],f=d;if(d=d!==0?d:0,s&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;o.push(d)}else a(u,f,r)||(u!==o&&u.push(f),o.push(d))}return o}l(vBt,"baseUniq$1");var bBt=qN(function(t){return vBt(xG(t,1,$Se,!0))}),xBt=0;function BG(t){var e=++xBt;return jCe(t)+e}l(BG,"uniqueId");function wBt(t,e,r){for(var n=-1,a=t.length,i=e.length,s={};++n<a;){var o=n<i?e[n]:void 0;r(s,t[n],o)}return s}l(wBt,"baseZipObject");function TBt(t,e){return wBt(t||[],e||[],GN)}l(TBt,"zipObject");var EBt="\0",Vm="\0",FSe="";const qre=class qre{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=sT(void 0),this._defaultEdgeLabelFn=sT(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Vm]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}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 B3(e)||(e=sT(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Ec(this._nodes)}sources(){var e=this;return Tf(this.nodes(),function(r){return OSe(e._in[r])})}sinks(){var e=this;return Tf(this.nodes(),function(r){return OSe(e._out[r])})}setNodes(e,r){var n=arguments,a=this;return Zt(e,function(i){n.length>1?a.setNode(i,r):a.setNode(i)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Vm,this._children[e]={},this._children[Vm][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.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=l(n=>this.removeEdge(this._edgeObjs[n]),"removeEdge");delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Zt(this.children(e),n=>{this.setParent(n)}),delete this._children[e]),Zt(Ec(this._in[e]),r),delete this._in[e],delete this._preds[e],Zt(Ec(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Di(r))r=Vm;else{r+="";for(var n=r;!Di(n);n=this.parent(n))if(n===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==Vm)return r}}children(e){if(Di(e)&&(e=Vm),this._isCompound){var r=this._children[e];if(r)return Ec(r)}else{if(e===Vm)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return Ec(r)}successors(e){var r=this._sucs[e];if(r)return Ec(r)}neighbors(e){var r=this.predecessors(e);if(r)return bBt(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;Zt(this._nodes,function(s,o){e(o)&&r.setNode(o,s)}),Zt(this._edgeObjs,function(s){r.hasNode(s.v)&&r.hasNode(s.w)&&r.setEdge(s,n.edge(s))});var a={};function i(s){var o=n.parent(s);return o===void 0||r.hasNode(o)?(a[s]=o,o):o in a?a[o]:i(o)}return l(i,"findParent"),this._isCompound&&Zt(r.nodes(),function(s){r.setParent(s,i(s))}),r}setDefaultEdgeLabel(e){return B3(e)||(e=sT(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Ef(this._edgeObjs)}setPath(e,r){var n=this,a=arguments;return K3(e,function(i,s){return a.length>1?n.setEdge(i,s,r):n.setEdge(i,s),s}),this}setEdge(){var e,r,n,a,i=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(e=s.v,r=s.w,n=s.name,arguments.length===2&&(a=arguments[1],i=!0)):(e=s,r=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],i=!0)),e=""+e,r=""+r,Di(n)||(n=""+n);var o=Z3(this._isDirected,e,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=a),this;if(!Di(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=i?a:this._defaultEdgeLabelFn(e,r,n);var u=CBt(this._isDirected,e,r,n);return e=u.v,r=u.w,Object.freeze(u),this._edgeObjs[o]=u,BSe(this._preds[r],e),BSe(this._sucs[e],r),this._in[r][o]=u,this._out[e][o]=u,this._edgeCount++,this}edge(e,r,n){var a=arguments.length===1?zG(this._isDirected,arguments[0]):Z3(this._isDirected,e,r,n);return this._edgeLabels[a]}hasEdge(e,r,n){var a=arguments.length===1?zG(this._isDirected,arguments[0]):Z3(this._isDirected,e,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,a)}removeEdge(e,r,n){var a=arguments.length===1?zG(this._isDirected,arguments[0]):Z3(this._isDirected,e,r,n),i=this._edgeObjs[a];return i&&(e=i.v,r=i.w,delete this._edgeLabels[a],delete this._edgeObjs[a],zSe(this._preds[r],e),zSe(this._sucs[e],r),delete this._in[r][a],delete this._out[e][a],this._edgeCount--),this}inEdges(e,r){var n=this._in[e];if(n){var a=Ef(n);return r?Tf(a,function(i){return i.v===r}):a}}outEdges(e,r){var n=this._out[e];if(n){var a=Ef(n);return r?Tf(a,function(i){return i.w===r}):a}}nodeEdges(e,r){var n=this.inEdges(e,r);if(n)return n.concat(this.outEdges(e,r))}};l(qre,"Graph");let Rs=qre;Rs.prototype._nodeCount=0,Rs.prototype._edgeCount=0;function BSe(t,e){t[e]?t[e]++:t[e]=1}l(BSe,"incrementOrInitEntry");function zSe(t,e){--t[e]||delete t[e]}l(zSe,"decrementOrRemoveEntry");function Z3(t,e,r,n){var a=""+e,i=""+r;if(!t&&a>i){var s=a;a=i,i=s}return a+FSe+i+FSe+(Di(n)?EBt:n)}l(Z3,"edgeArgsToId");function CBt(t,e,r,n){var a=""+e,i=""+r;if(!t&&a>i){var s=a;a=i,i=s}var o={v:a,w:i};return n&&(o.name=n),o}l(CBt,"edgeArgsToObj");function zG(t,e){return Z3(t,e.v,e.w,e.name)}l(zG,"edgeObjToId");function Cf(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:SBt(t),edges:_Bt(t)};return Di(t.graph())||(e.value=YDt(t.graph())),e}l(Cf,"write");function SBt(t){return Qi(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),a={v:e};return Di(r)||(a.value=r),Di(n)||(a.parent=n),a})}l(SBt,"writeNodes");function _Bt(t){return Qi(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return Di(e.name)||(n.name=e.name),Di(r)||(n.value=r),n})}l(_Bt,"writeEdges");var rn=new Map,fp=new Map,HSe=new Map,WSe=_(()=>{fp.clear(),HSe.clear(),rn.clear()},"clear"),Gm=_((t,e)=>{const r=fp.get(e)||[];return Le.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),kBt=_((t,e)=>{const r=fp.get(e)||[];return Le.info("Descendants of ",e," is ",r),Le.info("Edge is ",t),t.v===e||t.w===e?!1:r?r.includes(t.v)||Gm(t.v,e)||Gm(t.w,e)||r.includes(t.w):(Le.debug("Tilt, ",e,",not in descendants"),!1)},"edgeInCluster"),HG=_((t,e,r,n)=>{Le.warn("Copying children of ",t,"root",n,"data",e.node(t),n);const a=e.children(t)||[];t!==n&&a.push(t),Le.warn("Copying (nodes) clusterId",t,"nodes",a),a.forEach(i=>{if(e.children(i).length>0)HG(i,e,r,n);else{const s=e.node(i);Le.info("cp ",i," to ",n," with parent ",t),r.setNode(i,s),n!==e.parent(i)&&(Le.warn("Setting parent",i,e.parent(i)),r.setParent(i,e.parent(i))),t!==n&&i!==t?(Le.debug("Setting parent",i,t),r.setParent(i,t)):(Le.info("In copy ",t,"root",n,"data",e.node(t),n),Le.debug("Not Setting parent for node=",i,"cluster!==rootId",t!==n,"node!==clusterId",i!==t));const o=e.edges(i);Le.debug("Copying Edges",o),o.forEach(u=>{Le.info("Edge",u);const h=e.edge(u.v,u.w,u.name);Le.info("Edge data",h,n);try{if(kBt(u,n)){const d=fp.get(n)||[],f=d.includes(u.v)||Gm(u.v,n)||u.v===n,p=d.includes(u.w)||Gm(u.w,n)||u.w===n;if(f&&p)Le.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),Le.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else{const g=f?n:u.v,m=p?n:u.w;Le.info("Rebinding cross-boundary edge as ",g,m,h,u.name),e.setEdge(g,m,h,u.name)}}else Le.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",t)}catch(d){Le.error(d)}})}Le.debug("Removing node",i),e.removeNode(i)})},"copy"),VSe=_((t,e)=>{const r=e.children(t);let n=[...r];for(const a of r)HSe.set(a,t),n=[...n,...VSe(a,e)];return n},"extractDescendants"),ABt=_((t,e,r)=>{const n=t.edges().filter(u=>u.v===e||u.w===e),a=t.edges().filter(u=>u.v===r||u.w===r),i=n.map(u=>({v:u.v===e?r:u.v,w:u.w===e?e:u.w})),s=a.map(u=>({v:u.v,w:u.w}));return i.filter(u=>s.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),pT=_((t,e,r)=>{const n=e.children(t);if(Le.trace("Searching children of id ",t,n),n.length<1)return t;let a;for(const i of n){const s=pT(i,e,r),o=ABt(e,r,s);if(s)if(o.length>0)a=s;else return s}return a},"findNonClusterChild"),GSe=_(t=>!rn.has(t)||!rn.get(t).externalConnections?t:rn.has(t)?rn.get(t).id:t,"getAnchorId"),NBt=_((t,e)=>{var r;if(!t||e>10){Le.debug("Opting out, no graph ");return}else Le.debug("Opting in, graph ");t.nodes().forEach(function(n){t.children(n).length>0&&(Le.warn("Cluster identified",n," Replacement id in edges: ",pT(n,t,n)),fp.set(n,VSe(n,t)),rn.set(n,{id:pT(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){const a=t.children(n),i=t.edges();a.length>0?(Le.debug("Cluster identified",n,fp),i.forEach(s=>{const o=Gm(s.v,n),u=Gm(s.w,n);o^u&&(Le.warn("Edge: ",s," leaves cluster ",n),Le.warn("Descendants of XXX ",n,": ",fp.get(n)),rn.get(n).externalConnections=!0)})):Le.debug("Not a cluster ",n,fp)});for(let n of rn.keys()){const a=rn.get(n).id,i=t.parent(a);i!==n&&rn.has(i)&&!rn.get(i).externalConnections&&(rn.get(n).id=i);const s=t.edges().some(o=>o.v===n);if(a&&((r=rn.get(n))!=null&&r.externalConnections)&&s&&USe(t,a,n)){const o=LBt(t,n,t.parent(a));o&&(rn.get(n).id=o)}}t.edges().forEach(function(n){const a=t.edge(n);Le.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),Le.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(t.edge(n)));let i=n.v,s=n.w;if(Le.warn("Fix XXX",rn,"ids:",n.v,n.w,"Translating: ",rn.get(n.v)," --- ",rn.get(n.w)),rn.get(n.v)||rn.get(n.w)){if(Le.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),i=GSe(n.v),s=GSe(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){const o=t.parent(i);rn.get(o).externalConnections=!0,a.fromCluster=n.v}if(s!==n.w){const o=t.parent(s);rn.get(o).externalConnections=!0,a.toCluster=n.w}Le.warn("Fix Replacing with XXX",i,s,n.name),t.setEdge(i,s,a,n.name)}}),Le.warn("Adjusted Graph",Cf(t)),qSe(t,0),Le.trace(rn)},"adjustClustersAndEdges"),qSe=_((t,e)=>{var a,i,s,o;if(Le.warn("extractor - ",e,Cf(t),t.children("D")),e>10){Le.error("Bailing out");return}let r=t.nodes(),n=!1;for(const u of r){const h=t.children(u);n=n||h.length>0}if(!n){Le.debug("Done, no node has children",t.nodes());return}Le.debug("Nodes = ",r,e);for(const u of r)if(Le.debug("Extracting node",u,rn,rn.has(u)&&!rn.get(u).externalConnections,!t.parent(u),t.node(u),t.children("D")," Depth ",e),!rn.has(u))Le.debug("Not a cluster",u,e);else if((i=(a=rn.get(u))==null?void 0:a.clusterData)!=null&&i.explicitDir&&t.children(u)&&t.children(u).length>0){Le.warn("Cluster with explicit dir, creating subgraph for children",u,e);const h=rn.get(u).clusterData.dir,d=new Rs({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});HG(u,t,d,u);const f=t.node(u)||{};t.setNode(u,Ne(X({},f),{clusterNode:!0,id:u,clusterData:rn.get(u).clusterData,label:rn.get(u).label,graph:d})),Le.warn("Subgraph for cluster with explicit dir created:",u,Cf(d))}else if(!rn.get(u).externalConnections&&t.children(u)&&t.children(u).length>0){Le.warn("Cluster without external connections, without a parent and with children",u,e);let d=t.graph().rankdir==="TB"?"LR":"TB";(o=(s=rn.get(u))==null?void 0:s.clusterData)!=null&&o.dir&&(d=rn.get(u).clusterData.dir,Le.warn("Fixing dir",rn.get(u).clusterData.dir,d));const f=new Rs({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});HG(u,t,f,u);const p=t.node(u)||{};t.setNode(u,Ne(X({},p),{clusterNode:!0,id:u,clusterData:rn.get(u).clusterData,label:rn.get(u).label,graph:f})),Le.debug("Old graph after copy",Cf(t))}else Le.warn("Cluster ** ",u," **not meeting the criteria !externalConnections:",!rn.get(u).externalConnections," no parent: ",!t.parent(u)," children ",t.children(u)&&t.children(u).length>0,t.children("D"),e),Le.debug(rn);r=t.nodes(),Le.warn("New list of nodes",r);for(const u of r){const h=t.node(u);Le.warn(" Now next level",u,h),h!=null&&h.clusterNode&&qSe(h.graph,e+1)}},"extractor"),YSe=_((t,e)=>{if(e.length===0)return[];let r=Object.assign([],e);return e.forEach(n=>{const a=t.children(n),i=YSe(t,a);r=[...r,...i]}),r},"sorter"),IBt=_(t=>YSe(t,t.children()),"sortNodesByHierarchy"),USe=_((t,e,r)=>{let n=t.parent(e);for(;n&&n!==r;){const a=rn.get(n);if(a&&!a.externalConnections)return!0;n=t.parent(n)}return!1},"isNodeInExtractableCluster"),LBt=_((t,e,r)=>{var a;const n=(a=t.children(e))!=null?a:[];for(const i of n){if(i===r||Gm(i,r))continue;const s=pT(i,t,e);if(s&&!USe(t,s,e))return s}return null},"findSafeAnchorNode");const Yre=class Yre{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return jSe(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&jSe(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,n=r._prev;n!==r;)e.push(JSON.stringify(n,$Bt)),n=n._prev;return"["+e.join(", ")+"]"}};l(Yre,"List");let WG=Yre;function jSe(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}l(jSe,"unlink");function $Bt(t,e){if(t!=="_next"&&t!=="_prev")return e}l($Bt,"filterOutLinks");var MBt=sT(1);function PBt(t,e){if(t.nodeCount()<=1)return[];var r=OBt(t,e||MBt),n=RBt(r.graph,r.buckets,r.zeroIdx);return hT(Qi(n,function(a){return t.outEdges(a.v,a.w)}))}l(PBt,"greedyFAS");function RBt(t,e,r){for(var n=[],a=e[e.length-1],i=e[0],s;t.nodeCount();){for(;s=i.dequeue();)VG(t,e,r,s);for(;s=a.dequeue();)VG(t,e,r,s);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(s=e[o].dequeue(),s){n=n.concat(VG(t,e,r,s,!0));break}}}return n}l(RBt,"doGreedyFAS");function VG(t,e,r,n,a){var i=a?[]:void 0;return Zt(t.inEdges(n.v),function(s){var o=t.edge(s),u=t.node(s.v);a&&i.push({v:s.v,w:s.w}),u.out-=o,GG(e,r,u)}),Zt(t.outEdges(n.v),function(s){var o=t.edge(s),u=s.w,h=t.node(u);h.in-=o,GG(e,r,h)}),t.removeNode(n.v),i}l(VG,"removeNode");function OBt(t,e){var r=new Rs,n=0,a=0;Zt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),Zt(t.edges(),function(o){var u=r.edge(o.v,o.w)||0,h=e(o),d=u+h;r.setEdge(o.v,o.w,d),a=Math.max(a,r.node(o.v).out+=h),n=Math.max(n,r.node(o.w).in+=h)});var i=fT(a+n+3).map(function(){return new WG}),s=n+1;return Zt(r.nodes(),function(o){GG(i,s,r.node(o))}),{graph:r,buckets:i,zeroIdx:s}}l(OBt,"buildState");function GG(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}l(GG,"assignBucket");function DBt(t){var e=t.graph().acyclicer==="greedy"?PBt(t,r(t)):FBt(t);Zt(e,function(n){var a=t.edge(n);t.removeEdge(n),a.forwardName=n.name,a.reversed=!0,t.setEdge(n.w,n.v,a,BG("rev"))});function r(n){return function(a){return n.edge(a).weight}}l(r,"weightFn")}l(DBt,"run$2");function FBt(t){var e=[],r={},n={};function a(i){Object.prototype.hasOwnProperty.call(n,i)||(n[i]=!0,r[i]=!0,Zt(t.outEdges(i),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?e.push(s):a(s.w)}),delete r[i])}return l(a,"dfs"),Zt(t.nodes(),a),e}l(FBt,"dfsFAS");function BBt(t){Zt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var n=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,n)}})}l(BBt,"undo$2");function gT(t,e,r,n){var a;do a=BG(n);while(t.hasNode(a));return r.dummy=e,t.setNode(a,r),a}l(gT,"addDummyNode");function zBt(t){var e=new Rs().setGraph(t.graph());return Zt(t.nodes(),function(r){e.setNode(r,t.node(r))}),Zt(t.edges(),function(r){var n=e.edge(r.v,r.w)||{weight:0,minlen:1},a=t.edge(r);e.setEdge(r.v,r.w,{weight:n.weight+a.weight,minlen:Math.max(n.minlen,a.minlen)})}),e}l(zBt,"simplify");function KSe(t){var e=new Rs({multigraph:t.isMultigraph()}).setGraph(t.graph());return Zt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),Zt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}l(KSe,"asNonCompoundGraph");function XSe(t,e){var r=t.x,n=t.y,a=e.x-r,i=e.y-n,s=t.width/2,o=t.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),u=o*a/i,h=o):(a<0&&(s=-s),u=s,h=s*i/a),{x:r+u,y:n+h}}l(XSe,"intersectRect$1");function iI(t){var e=Qi(fT(QSe(t)+1),function(){return[]});return Zt(t.nodes(),function(r){var n=t.node(r),a=n.rank;Di(a)||(e[a][n.order]=r)}),e}l(iI,"buildLayerMatrix");function HBt(t){var e=j3(Qi(t.nodes(),function(r){return t.node(r).rank}));Zt(t.nodes(),function(r){var n=t.node(r);RSe(n,"rank")&&(n.rank-=e)})}l(HBt,"normalizeRanks");function WBt(t){var e=j3(Qi(t.nodes(),function(i){return t.node(i).rank})),r=[];Zt(t.nodes(),function(i){var s=t.node(i).rank-e;r[s]||(r[s]=[]),r[s].push(i)});var n=0,a=t.graph().nodeRankFactor;Zt(r,function(i,s){Di(i)&&s%a!==0?--n:n&&Zt(i,function(o){t.node(o).rank+=n})})}l(WBt,"removeEmptyRanks");function ZSe(t,e,r,n){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=n),gT(t,"border",a,e)}l(ZSe,"addBorderNode$1");function QSe(t){return Wm(Qi(t.nodes(),function(e){var r=t.node(e).rank;if(!Di(r))return r}))}l(QSe,"maxRank");function VBt(t,e){var r={lhs:[],rhs:[]};return Zt(t,function(n){e(n)?r.lhs.push(n):r.rhs.push(n)}),r}l(VBt,"partition");function GBt(t,e){return e()}l(GBt,"notime");function qBt(t){function e(r){var n=t.children(r),a=t.node(r);if(n.length&&Zt(n,e),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,s=a.maxRank+1;i<s;++i)JSe(t,"borderLeft","_bl",r,a,i),JSe(t,"borderRight","_br",r,a,i)}}l(e,"dfs"),Zt(t.children(),e)}l(qBt,"addBorderSegments");function JSe(t,e,r,n,a,i){var s={width:0,height:0,rank:i,borderType:e},o=a[e][i-1],u=gT(t,"border",s,r);a[e][i]=u,t.setParent(u,n),o&&t.setEdge(o,u,{weight:1})}l(JSe,"addBorderNode");function YBt(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&e4e(t)}l(YBt,"adjust");function UBt(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&jBt(t),(e==="lr"||e==="rl")&&(KBt(t),e4e(t))}l(UBt,"undo$1");function e4e(t){Zt(t.nodes(),function(e){t4e(t.node(e))}),Zt(t.edges(),function(e){t4e(t.edge(e))})}l(e4e,"swapWidthHeight");function t4e(t){var e=t.width;t.width=t.height,t.height=e}l(t4e,"swapWidthHeightOne");function jBt(t){Zt(t.nodes(),function(e){qG(t.node(e))}),Zt(t.edges(),function(e){var r=t.edge(e);Zt(r.points,qG),Object.prototype.hasOwnProperty.call(r,"y")&&qG(r)})}l(jBt,"reverseY");function qG(t){t.y=-t.y}l(qG,"reverseYOne");function KBt(t){Zt(t.nodes(),function(e){YG(t.node(e))}),Zt(t.edges(),function(e){var r=t.edge(e);Zt(r.points,YG),Object.prototype.hasOwnProperty.call(r,"x")&&YG(r)})}l(KBt,"swapXY");function YG(t){var e=t.x;t.x=t.y,t.y=e}l(YG,"swapXYOne");function XBt(t){t.graph().dummyChains=[],Zt(t.edges(),function(e){ZBt(t,e)})}l(XBt,"run$1");function ZBt(t,e){var r=e.v,n=t.node(r).rank,a=e.w,i=t.node(a).rank,s=e.name,o=t.edge(e),u=o.labelRank;if(i!==n+1){t.removeEdge(e);var h=void 0,d,f;for(f=0,++n;n<i;++f,++n)o.points=[],h={width:0,height:0,edgeLabel:o,edgeObj:e,rank:n},d=gT(t,"edge",h,"_d"),n===u&&(h.width=o.width,h.height=o.height,h.dummy="edge-label",h.labelpos=o.labelpos),t.setEdge(r,d,{weight:o.weight},s),f===0&&t.graph().dummyChains.push(d),r=d;t.setEdge(r,a,{weight:o.weight},s)}}l(ZBt,"normalizeEdge");function QBt(t){Zt(t.graph().dummyChains,function(e){var r=t.node(e),n=r.edgeLabel,a;for(t.setEdge(r.edgeObj,n);r.dummy;)a=t.successors(e)[0],t.removeNode(e),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),e=a,r=t.node(e)})}l(QBt,"undo");function UG(t){var e={};function r(n){var a=t.node(n);if(Object.prototype.hasOwnProperty.call(e,n))return a.rank;e[n]=!0;var i=j3(Qi(t.outEdges(n),function(s){return r(s.w)-t.edge(s).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),a.rank=i}l(r,"dfs"),Zt(t.sources(),r)}l(UG,"longestPath");function Q3(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}l(Q3,"slack");function r4e(t){var e=new Rs({directed:!1}),r=t.nodes()[0],n=t.nodeCount();e.setNode(r,{});for(var a,i;JBt(e,t)<n;)a=ezt(e,t),i=e.hasNode(a.v)?Q3(t,a):-Q3(t,a),tzt(e,t,i);return e}l(r4e,"feasibleTree");function JBt(t,e){function r(n){Zt(e.nodeEdges(n),function(a){var i=a.v,s=n===i?a.w:i;!t.hasNode(s)&&!Q3(e,a)&&(t.setNode(s,{}),t.setEdge(n,s,{}),r(s))})}return l(r,"dfs"),Zt(t.nodes(),r),t.nodeCount()}l(JBt,"tightTree");function ezt(t,e){return FG(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return Q3(e,r)})}l(ezt,"findMinSlackEdge");function tzt(t,e,r){Zt(t.nodes(),function(n){e.node(n).rank+=r})}l(tzt,"shiftRanks");function rzt(){}l(rzt,"CycleException"),rzt.prototype=new Error;function n4e(t,e,r){Zi(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],i={};return Zt(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);a4e(t,s,r==="post",i,n,a)}),a}l(n4e,"dfs$1");function a4e(t,e,r,n,a,i){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||i.push(e),Zt(a(e),function(s){a4e(t,s,r,n,a,i)}),r&&i.push(e))}l(a4e,"doDfs");function nzt(t,e){return n4e(t,e,"post")}l(nzt,"postorder$1");function azt(t,e){return n4e(t,e,"pre")}l(azt,"preorder"),qm.initLowLimValues=KG,qm.initCutValues=jG,qm.calcCutValue=i4e,qm.leaveEdge=o4e,qm.enterEdge=l4e,qm.exchangeEdges=c4e;function qm(t){t=zBt(t),UG(t);var e=r4e(t);KG(e),jG(e,t);for(var r,n;r=o4e(e);)n=l4e(e,t,r),c4e(e,t,r,n)}l(qm,"networkSimplex");function jG(t,e){var r=nzt(t,t.nodes());r=r.slice(0,r.length-1),Zt(r,function(n){izt(t,e,n)})}l(jG,"initCutValues");function izt(t,e,r){var n=t.node(r),a=n.parent;t.edge(r,a).cutvalue=i4e(t,e,r)}l(izt,"assignCutValue");function i4e(t,e,r){var n=t.node(r),a=n.parent,i=!0,s=e.edge(r,a),o=0;return s||(i=!1,s=e.edge(a,r)),o=s.weight,Zt(e.nodeEdges(r),function(u){var h=u.v===r,d=h?u.w:u.v;if(d!==a){var f=h===i,p=e.edge(u).weight;if(o+=f?p:-p,ozt(t,r,d)){var g=t.edge(r,d).cutvalue;o+=f?-g:g}}}),o}l(i4e,"calcCutValue");function KG(t,e){arguments.length<2&&(e=t.nodes()[0]),s4e(t,{},1,e)}l(KG,"initLowLimValues");function s4e(t,e,r,n,a){var i=r,s=t.node(n);return e[n]=!0,Zt(t.neighbors(n),function(o){Object.prototype.hasOwnProperty.call(e,o)||(r=s4e(t,e,r,o,n))}),s.low=i,s.lim=r++,a?s.parent=a:delete s.parent,r}l(s4e,"dfsAssignLowLim");function o4e(t){return RG(t.edges(),function(e){return t.edge(e).cutvalue<0})}l(o4e,"leaveEdge");function l4e(t,e,r){var n=r.v,a=r.w;e.hasEdge(n,a)||(n=r.w,a=r.v);var i=t.node(n),s=t.node(a),o=i,u=!1;i.lim>s.lim&&(o=s,u=!0);var h=Tf(e.edges(),function(d){return u===u4e(t,t.node(d.v),o)&&u!==u4e(t,t.node(d.w),o)});return FG(h,function(d){return Q3(e,d)})}l(l4e,"enterEdge");function c4e(t,e,r,n){var a=r.v,i=r.w;t.removeEdge(a,i),t.setEdge(n.v,n.w,{}),KG(t),jG(t,e),szt(t,e)}l(c4e,"exchangeEdges");function szt(t,e){var r=RG(t.nodes(),function(a){return!e.node(a).parent}),n=azt(t,r);n=n.slice(1),Zt(n,function(a){var i=t.node(a).parent,s=e.edge(a,i),o=!1;s||(s=e.edge(i,a),o=!0),e.node(a).rank=e.node(i).rank+(o?s.minlen:-s.minlen)})}l(szt,"updateRanks");function ozt(t,e,r){return t.hasEdge(e,r)}l(ozt,"isTreeEdge");function u4e(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}l(u4e,"isDescendant");function lzt(t){switch(t.graph().ranker){case"network-simplex":h4e(t);break;case"tight-tree":uzt(t);break;case"longest-path":czt(t);break;default:h4e(t)}}l(lzt,"rank");var czt=UG;function uzt(t){UG(t),r4e(t)}l(uzt,"tightTreeRanker");function h4e(t){qm(t)}l(h4e,"networkSimplexRanker");function hzt(t){var e=gT(t,"root",{},"_root"),r=dzt(t),n=Wm(Ef(r))-1,a=2*n+1;t.graph().nestingRoot=e,Zt(t.edges(),function(s){t.edge(s).minlen*=a});var i=fzt(t)+1;Zt(t.children(),function(s){d4e(t,e,a,i,n,r,s)}),t.graph().nodeRankFactor=a}l(hzt,"run");function d4e(t,e,r,n,a,i,s){var o=t.children(s);if(!o.length){s!==e&&t.setEdge(e,s,{weight:0,minlen:r});return}var u=ZSe(t,"_bt"),h=ZSe(t,"_bb"),d=t.node(s);t.setParent(u,s),d.borderTop=u,t.setParent(h,s),d.borderBottom=h,Zt(o,function(f){d4e(t,e,r,n,a,i,f);var p=t.node(f),g=p.borderTop?p.borderTop:f,m=p.borderBottom?p.borderBottom:f,y=p.borderTop?n:2*n,v=g!==m?1:a-i[s]+1;t.setEdge(u,g,{weight:y,minlen:v,nestingEdge:!0}),t.setEdge(m,h,{weight:y,minlen:v,nestingEdge:!0})}),t.parent(s)||t.setEdge(e,u,{weight:0,minlen:a+i[s]})}l(d4e,"dfs");function dzt(t){var e={};function r(n,a){var i=t.children(n);i&&i.length&&Zt(i,function(s){r(s,a+1)}),e[n]=a}return l(r,"dfs"),Zt(t.children(),function(n){r(n,1)}),e}l(dzt,"treeDepths");function fzt(t){return K3(t.edges(),function(e,r){return e+t.edge(r).weight},0)}l(fzt,"sumWeights");function pzt(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,Zt(t.edges(),function(r){var n=t.edge(r);n.nestingEdge&&t.removeEdge(r)})}l(pzt,"cleanup");function gzt(t,e,r){var n={},a;Zt(r,function(i){for(var s=t.parent(i),o,u;s;){if(o=t.parent(s),o?(u=n[o],n[o]=s):(u=a,a=s),u&&u!==s){e.setEdge(u,s);return}s=o}})}l(gzt,"addSubgraphConstraints");function mzt(t,e,r){var n=yzt(t),a=new Rs({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(i){return t.node(i)});return Zt(t.nodes(),function(i){var s=t.node(i),o=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(a.setNode(i),a.setParent(i,o||n),Zt(t[r](i),function(u){var h=u.v===i?u.w:u.v,d=a.edge(h,i),f=Di(d)?0:d.weight;a.setEdge(h,i,{weight:t.edge(u).weight+f})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),a}l(mzt,"buildLayerGraph");function yzt(t){for(var e;t.hasNode(e=BG("_root")););return e}l(yzt,"createRootNode");function vzt(t,e){for(var r=0,n=1;n<e.length;++n)r+=bzt(t,e[n-1],e[n]);return r}l(vzt,"crossCount");function bzt(t,e,r){for(var n=TBt(r,Qi(r,function(h,d){return d})),a=hT(Qi(e,function(h){return X3(Qi(t.outEdges(h),function(d){return{pos:n[d.w],weight:t.edge(d).weight}}),"pos")})),i=1;i<r.length;)i<<=1;var s=2*i-1;i-=1;var o=Qi(new Array(s),function(){return 0}),u=0;return Zt(a.forEach(function(h){var d=h.pos+i;o[d]+=h.weight;for(var f=0;d>0;)d%2&&(f+=o[d+1]),d=d-1>>1,o[d]+=h.weight;u+=h.weight*f})),u}l(bzt,"twoLayerCrossCount");function xzt(t){var e={},r=Tf(t.nodes(),function(o){return!t.children(o).length}),n=Wm(Qi(r,function(o){return t.node(o).rank})),a=Qi(fT(n+1),function(){return[]});function i(o){if(!RSe(e,o)){e[o]=!0;var u=t.node(o);a[u.rank].push(o),Zt(t.successors(o),i)}}l(i,"dfs");var s=X3(r,function(o){return t.node(o).rank});return Zt(s,i),a}l(xzt,"initOrder");function wzt(t,e){return Qi(e,function(r){var n=t.inEdges(r);if(n.length){var a=K3(n,function(i,s){var o=t.edge(s),u=t.node(s.v);return{sum:i.sum+o.weight*u.order,weight:i.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}l(wzt,"barycenter$1");function Tzt(t,e){var r={};Zt(t,function(a,i){var s=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};Di(a.barycenter)||(s.barycenter=a.barycenter,s.weight=a.weight)}),Zt(e.edges(),function(a){var i=r[a.v],s=r[a.w];!Di(i)&&!Di(s)&&(s.indegree++,i.out.push(r[a.w]))});var n=Tf(r,function(a){return!a.indegree});return Ezt(n)}l(Tzt,"resolveConflicts");function Ezt(t){var e=[];function r(i){return function(s){s.merged||(Di(s.barycenter)||Di(i.barycenter)||s.barycenter>=i.barycenter)&&Czt(i,s)}}l(r,"handleIn");function n(i){return function(s){s.in.push(i),--s.indegree===0&&t.push(s)}}for(l(n,"handleOut");t.length;){var a=t.pop();e.push(a),Zt(a.in.reverse(),r(a)),Zt(a.out,n(a))}return Qi(Tf(e,function(i){return!i.merged}),function(i){return aI(i,["vs","i","barycenter","weight"])})}l(Ezt,"doResolveConflicts");function Czt(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}l(Czt,"mergeEntries");function Szt(t,e){var r=VBt(t,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),n=r.lhs,a=X3(r.rhs,function(d){return-d.i}),i=[],s=0,o=0,u=0;n.sort(_zt(!!e)),u=f4e(i,a,u),Zt(n,function(d){u+=d.vs.length,i.push(d.vs),s+=d.barycenter*d.weight,o+=d.weight,u=f4e(i,a,u)});var h={vs:hT(i)};return o&&(h.barycenter=s/o,h.weight=o),h}l(Szt,"sort");function f4e(t,e,r){for(var n;e.length&&(n=rI(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}l(f4e,"consumeUnsortable");function _zt(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}l(_zt,"compareWithBias");function p4e(t,e,r,n){var a=t.children(e),i=t.node(e),s=i?i.borderLeft:void 0,o=i?i.borderRight:void 0,u={};s&&(a=Tf(a,function(m){return m!==s&&m!==o}));var h=wzt(t,a);Zt(h,function(m){if(t.children(m.v).length){var y=p4e(t,m.v,r,n);u[m.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&Azt(m,y)}});var d=Tzt(h,r);kzt(d,u);var f=Szt(d,n);if(s&&(f.vs=hT([s,f.vs,o]),t.predecessors(s).length)){var p=t.node(t.predecessors(s)[0]),g=t.node(t.predecessors(o)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+g.order)/(f.weight+2),f.weight+=2}return f}l(p4e,"sortSubgraph");function kzt(t,e){Zt(t,function(r){r.vs=hT(r.vs.map(function(n){return e[n]?e[n].vs:n}))})}l(kzt,"expandSubgraphs");function Azt(t,e){Di(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}l(Azt,"mergeBarycenters");function Nzt(t){var e=QSe(t),r=g4e(t,fT(1,e+1),"inEdges"),n=g4e(t,fT(e-1,-1,-1),"outEdges"),a=xzt(t);m4e(t,a);for(var i=Number.POSITIVE_INFINITY,s,o=0,u=0;u<4;++o,++u){Izt(o%2?r:n,o%4>=2),a=iI(t);var h=vzt(t,a);h<i&&(u=0,s=KDt(a),i=h)}m4e(t,s)}l(Nzt,"order");function g4e(t,e,r){return Qi(e,function(n){return mzt(t,n,r)})}l(g4e,"buildLayerGraphs");function Izt(t,e){var r=new Rs;Zt(t,function(n){var a=n.graph().root,i=p4e(n,a,r,e);Zt(i.vs,function(s,o){n.node(s).order=o}),gzt(n,r,i.vs)})}l(Izt,"sweepLayerGraphs");function m4e(t,e){Zt(e,function(r){Zt(r,function(n,a){t.node(n).order=a})})}l(m4e,"assignOrder");function Lzt(t){var e=Mzt(t);Zt(t.graph().dummyChains,function(r){for(var n=t.node(r),a=n.edgeObj,i=$zt(t,e,a.v,a.w),s=i.path,o=i.lca,u=0,h=s[u],d=!0;r!==a.w;){if(n=t.node(r),d){for(;(h=s[u])!==o&&t.node(h).maxRank<n.rank;)u++;h===o&&(d=!1)}if(!d){for(;u<s.length-1&&t.node(h=s[u+1]).minRank<=n.rank;)u++;h=s[u]}t.setParent(r,h),r=t.successors(r)[0]}})}l(Lzt,"parentDummyChains");function $zt(t,e,r,n){var a=[],i=[],s=Math.min(e[r].low,e[n].low),o=Math.max(e[r].lim,e[n].lim),u,h;u=r;do u=t.parent(u),a.push(u);while(u&&(e[u].low>s||o>e[u].lim));for(h=u,u=n;(u=t.parent(u))!==h;)i.push(u);return{path:a.concat(i.reverse()),lca:h}}l($zt,"findPath");function Mzt(t){var e={},r=0;function n(a){var i=r;Zt(t.children(a),n),e[a]={low:i,lim:r++}}return l(n,"dfs"),Zt(t.children(),n),e}l(Mzt,"postorder");function Pzt(t,e){var r={};function n(a,i){var s=0,o=0,u=a.length,h=rI(i);return Zt(i,function(d,f){var p=Ozt(t,d),g=p?t.node(p).order:u;(p||d===h)&&(Zt(i.slice(o,f+1),function(m){Zt(t.predecessors(m),function(y){var v=t.node(y),b=v.order;(b<s||g<b)&&!(v.dummy&&t.node(m).dummy)&&y4e(r,y,m)})}),o=f+1,s=g)}),i}return l(n,"visitLayer"),K3(e,n),r}l(Pzt,"findType1Conflicts");function Rzt(t,e){var r={};function n(i,s,o,u,h){var d;Zt(fT(s,o),function(f){d=i[f],t.node(d).dummy&&Zt(t.predecessors(d),function(p){var g=t.node(p);g.dummy&&(g.order<u||g.order>h)&&y4e(r,p,d)})})}l(n,"scan");function a(i,s){var o=-1,u,h=0;return Zt(s,function(d,f){if(t.node(d).dummy==="border"){var p=t.predecessors(d);p.length&&(u=t.node(p[0]).order,n(s,h,f,o,u),h=f,o=u)}n(s,h,s.length,u,i.length)}),s}return l(a,"visitLayer"),K3(e,a),r}l(Rzt,"findType2Conflicts");function Ozt(t,e){if(t.node(e).dummy)return RG(t.predecessors(e),function(r){return t.node(r).dummy})}l(Ozt,"findOtherInnerSegmentNode");function y4e(t,e,r){if(e>r){var n=e;e=r,r=n}Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var a=t[e];Object.defineProperty(a,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}l(y4e,"addConflict");function Dzt(t,e,r){if(e>r){var n=e;e=r,r=n}return!!t[e]&&Object.prototype.hasOwnProperty.call(t[e],r)}l(Dzt,"hasConflict");function Fzt(t,e,r,n){var a={},i={},s={};return Zt(e,function(o){Zt(o,function(u,h){a[u]=u,i[u]=u,s[u]=h})}),Zt(e,function(o){var u=-1;Zt(o,function(h){var d=n(h);if(d.length){d=X3(d,function(y){return s[y]});for(var f=(d.length-1)/2,p=Math.floor(f),g=Math.ceil(f);p<=g;++p){var m=d[p];i[h]===h&&u<s[m]&&!Dzt(r,h,m)&&(i[m]=h,i[h]=a[h]=a[m],u=s[m])}}})}),{root:a,align:i}}l(Fzt,"verticalAlignment");function Bzt(t,e,r,n,a){var i={},s=zzt(t,e,r,a),o=a?"borderLeft":"borderRight";function u(f,p){for(var g=s.nodes(),m=g.pop(),y={};m;)y[m]?f(m):(y[m]=!0,g.push(m),g=g.concat(p(m))),m=g.pop()}l(u,"iterate");function h(f){i[f]=s.inEdges(f).reduce(function(p,g){return Math.max(p,i[g.v]+s.edge(g))},0)}l(h,"pass1");function d(f){var p=s.outEdges(f).reduce(function(m,y){return Math.min(m,i[y.w]-s.edge(y))},Number.POSITIVE_INFINITY),g=t.node(f);p!==Number.POSITIVE_INFINITY&&g.borderType!==o&&(i[f]=Math.max(i[f],p))}return l(d,"pass2"),u(h,s.predecessors.bind(s)),u(d,s.successors.bind(s)),Zt(n,function(f){i[f]=i[r[f]]}),i}l(Bzt,"horizontalCompaction");function zzt(t,e,r,n){var a=new Rs,i=t.graph(),s=qzt(i.nodesep,i.edgesep,n);return Zt(e,function(o){var u;Zt(o,function(h){var d=r[h];if(a.setNode(d),u){var f=r[u],p=a.edge(f,d);a.setEdge(f,d,Math.max(s(t,h,u),p||0))}u=h})}),a}l(zzt,"buildBlockGraph");function Hzt(t,e){return FG(Ef(e),function(r){var n=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return YFt(r,function(i,s){var o=Yzt(t,s)/2;n=Math.max(i+o,n),a=Math.min(i-o,a)}),n-a})}l(Hzt,"findSmallestWidthAlignment");function Wzt(t,e){var r=Ef(e),n=j3(r),a=Wm(r);Zt(["u","d"],function(i){Zt(["l","r"],function(s){var o=i+s,u=t[o],h;if(u!==e){var d=Ef(u);h=s==="l"?n-j3(d):a-Wm(d),h&&(t[o]=nI(u,function(f){return f+h}))}})})}l(Wzt,"alignCoordinates");function Vzt(t,e){return nI(t.ul,function(r,n){if(e)return t[e.toLowerCase()][n];var a=X3(Qi(t,n));return(a[1]+a[2])/2})}l(Vzt,"balance");function Gzt(t){var e=iI(t),r=DG(Pzt(t,e),Rzt(t,e)),n={},a;Zt(["u","d"],function(s){a=s==="u"?e:Ef(e).reverse(),Zt(["l","r"],function(o){o==="r"&&(a=Qi(a,function(f){return Ef(f).reverse()}));var u=(s==="u"?t.predecessors:t.successors).bind(t),h=Fzt(t,a,r,u),d=Bzt(t,a,h.root,h.align,o==="r");o==="r"&&(d=nI(d,function(f){return-f})),n[s+o]=d})});var i=Hzt(t,n);return Wzt(n,i),Vzt(n,t.graph().align)}l(Gzt,"positionX");function qzt(t,e,r){return function(n,a,i){var s=n.node(a),o=n.node(i),u=0,h;if(u+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":h=-s.width/2;break;case"r":h=s.width/2;break}if(h&&(u+=r?h:-h),h=0,u+=(s.dummy?e:t)/2,u+=(o.dummy?e:t)/2,u+=o.width/2,Object.prototype.hasOwnProperty.call(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":h=o.width/2;break;case"r":h=-o.width/2;break}return h&&(u+=r?h:-h),h=0,u}}l(qzt,"sep");function Yzt(t,e){return t.node(e).width}l(Yzt,"width");function Uzt(t){t=KSe(t),jzt(t),UFt(Gzt(t),function(e,r){t.node(r).x=e})}l(Uzt,"position$1");function jzt(t){var e=iI(t),r=t.graph().ranksep,n=0;Zt(e,function(a){var i=Wm(Qi(a,function(s){return t.node(s).height}));Zt(a,function(s){t.node(s).y=n+i/2}),n+=i+r})}l(jzt,"positionY");function v4e(t,e){var r=GBt;r("layout",()=>{var n=r(" buildLayoutGraph",()=>iHt(t));r(" runLayout",()=>Kzt(n,r)),r(" updateInputGraph",()=>Xzt(t,n))})}l(v4e,"layout$3");function Kzt(t,e){e(" makeSpaceForEdgeLabels",()=>sHt(t)),e(" removeSelfEdges",()=>gHt(t)),e(" acyclic",()=>DBt(t)),e(" nestingGraph.run",()=>hzt(t)),e(" rank",()=>lzt(KSe(t))),e(" injectEdgeLabelProxies",()=>oHt(t)),e(" removeEmptyRanks",()=>WBt(t)),e(" nestingGraph.cleanup",()=>pzt(t)),e(" normalizeRanks",()=>HBt(t)),e(" assignRankMinMax",()=>lHt(t)),e(" removeEdgeLabelProxies",()=>cHt(t)),e(" normalize.run",()=>XBt(t)),e(" parentDummyChains",()=>Lzt(t)),e(" addBorderSegments",()=>qBt(t)),e(" order",()=>Nzt(t)),e(" insertSelfEdges",()=>mHt(t)),e(" adjustCoordinateSystem",()=>YBt(t)),e(" position",()=>Uzt(t)),e(" positionSelfEdges",()=>yHt(t)),e(" removeBorderNodes",()=>pHt(t)),e(" normalize.undo",()=>QBt(t)),e(" fixupEdgeLabelCoords",()=>dHt(t)),e(" undoCoordinateSystem",()=>UBt(t)),e(" translateGraph",()=>uHt(t)),e(" assignNodeIntersects",()=>hHt(t)),e(" reversePoints",()=>fHt(t)),e(" acyclic.undo",()=>BBt(t))}l(Kzt,"runLayout");function Xzt(t,e){Zt(t.nodes(),function(r){var n=t.node(r),a=e.node(r);n&&(n.x=a.x,n.y=a.y,e.children(r).length&&(n.width=a.width,n.height=a.height))}),Zt(t.edges(),function(r){var n=t.edge(r),a=e.edge(r);n.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(n.x=a.x,n.y=a.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}l(Xzt,"updateInputGraph");var Zzt=["nodesep","edgesep","ranksep","marginx","marginy"],Qzt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Jzt=["acyclicer","ranker","rankdir","align"],eHt=["width","height"],tHt={width:0,height:0},rHt=["minlen","weight","width","height","labeloffset"],nHt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},aHt=["labelpos"];function iHt(t){var e=new Rs({multigraph:!0,compound:!0}),r=ZG(t.graph());return e.setGraph(DG({},Qzt,XG(r,Zzt),aI(r,Jzt))),Zt(t.nodes(),function(n){var a=ZG(t.node(n));e.setNode(n,BFt(XG(a,eHt),tHt)),e.setParent(n,t.parent(n))}),Zt(t.edges(),function(n){var a=ZG(t.edge(n));e.setEdge(n,DG({},nHt,XG(a,rHt),aI(a,aHt)))}),e}l(iHt,"buildLayoutGraph");function sHt(t){var e=t.graph();e.ranksep/=2,Zt(t.edges(),function(r){var n=t.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}l(sHt,"makeSpaceForEdgeLabels");function oHt(t){Zt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var n=t.node(e.v),a=t.node(e.w),i={rank:(a.rank-n.rank)/2+n.rank,e};gT(t,"edge-proxy",i,"_ep")}})}l(oHt,"injectEdgeLabelProxies");function lHt(t){var e=0;Zt(t.nodes(),function(r){var n=t.node(r);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,e=Wm(e,n.maxRank))}),t.graph().maxRank=e}l(lHt,"assignRankMinMax");function cHt(t){Zt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}l(cHt,"removeEdgeLabelProxies");function uHt(t){var e=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,a=0,i=t.graph(),s=i.marginx||0,o=i.marginy||0;function u(h){var d=h.x,f=h.y,p=h.width,g=h.height;e=Math.min(e,d-p/2),r=Math.max(r,d+p/2),n=Math.min(n,f-g/2),a=Math.max(a,f+g/2)}l(u,"getExtremes"),Zt(t.nodes(),function(h){u(t.node(h))}),Zt(t.edges(),function(h){var d=t.edge(h);Object.prototype.hasOwnProperty.call(d,"x")&&u(d)}),e-=s,n-=o,Zt(t.nodes(),function(h){var d=t.node(h);d.x-=e,d.y-=n}),Zt(t.edges(),function(h){var d=t.edge(h);Zt(d.points,function(f){f.x-=e,f.y-=n}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=e),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=n)}),i.width=r-e+s,i.height=a-n+o}l(uHt,"translateGraph");function hHt(t){Zt(t.edges(),function(e){var r=t.edge(e),n=t.node(e.v),a=t.node(e.w),i,s;r.points?(i=r.points[0],s=r.points[r.points.length-1]):(r.points=[],i=a,s=n),r.points.unshift(XSe(n,i)),r.points.push(XSe(a,s))})}l(hHt,"assignNodeIntersects");function dHt(t){Zt(t.edges(),function(e){var r=t.edge(e);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}l(dHt,"fixupEdgeLabelCoords");function fHt(t){Zt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}l(fHt,"reversePointsForReversedEdges");function pHt(t){Zt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),n=t.node(r.borderTop),a=t.node(r.borderBottom),i=t.node(rI(r.borderLeft)),s=t.node(rI(r.borderRight));r.width=Math.abs(s.x-i.x),r.height=Math.abs(a.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),Zt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}l(pHt,"removeBorderNodes");function gHt(t){Zt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}l(gHt,"removeSelfEdges");function mHt(t){var e=iI(t);Zt(e,function(r){var n=0;Zt(r,function(a,i){var s=t.node(a);s.order=i+n,Zt(s.selfEdges,function(o){gT(t,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:i+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}l(mHt,"insertSelfEdges");function yHt(t){Zt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var n=t.node(r.e.v),a=n.x+n.width/2,i=n.y,s=r.x-a,o=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:a+2*s/3,y:i-o},{x:a+5*s/6,y:i-o},{x:a+s,y:i},{x:a+5*s/6,y:i+o},{x:a+2*s/3,y:i+o}],r.label.x=r.x,r.label.y=r.y}})}l(yHt,"positionSelfEdges");function XG(t,e){return nI(aI(t,e),Number)}l(XG,"selectNumberAttrs");function ZG(t){var e={};return Zt(t,function(r,n){e[n.toLowerCase()]=r}),e}l(ZG,"canonicalize");var b4e=_((t,e,r)=>Math.max(e,Math.min(r,t)),"clamp"),x4e=_((t="TB")=>{switch(t){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),vHt=_(t=>t==="flowchart"||t==="flowchart-v2"||t==="stateDiagram","shouldMergeSelfLoopSegments"),bHt=_((t,e,r,n,a)=>{const i=[],s=new Set;if(r.forEach(({start:d,end:f})=>{d!==n&&s.add(d),f!==n&&s.add(f)}),s.forEach(d=>{const f=t.node(d);typeof(f==null?void 0:f.x)=="number"&&typeof(f==null?void 0:f.y)=="number"&&i.push(f)}),i.length===0&&r.forEach(({edge:d})=>{var f;((f=d.points)!=null?f:[]).forEach(p=>{typeof(p==null?void 0:p.x)=="number"&&typeof(p==null?void 0:p.y)=="number"&&i.push(p)})}),i.length===0)return x4e(a);const o=i.reduce((d,f)=>({x:d.x+f.x/i.length,y:d.y+f.y/i.length}),{x:0,y:0}),u=o.x-e.x,h=o.y-e.y;return Math.abs(u)>Math.abs(h)?u>0?"right":"left":Math.abs(h)>0?h>0?"bottom":"top":x4e(a)},"getSelfLoopSide"),xHt=_((t,e="top",r=0,n=0)=>{const a=t.x,i=t.y-r,s=t.width/2,o=t.height/2,u=Math.max(36,Math.min(100,t.width*.8)),h=b4e(Math.max(n,t.width*.35),36,u),d=b4e(Math.min(t.width,t.height)*.45,24,48);switch(e){case"bottom":{const f=i+o;return[{x:a-h/2,y:f},{x:a-h/2,y:f+d},{x:a+h/2,y:f+d},{x:a+h/2,y:f}]}case"right":{const f=a+s;return[{x:f,y:i-h/2},{x:f+d,y:i-h/2},{x:f+d,y:i+h/2},{x:f,y:i+h/2}]}case"left":{const f=a-s;return[{x:f,y:i-h/2},{x:f-d,y:i-h/2},{x:f-d,y:i+h/2},{x:f,y:i+h/2}]}case"top":default:{const f=i-o;return[{x:a-h/2,y:f},{x:a-h/2,y:f-d},{x:a+h/2,y:f-d},{x:a+h/2,y:f}]}}},"getSelfLoopPoints"),wHt=_((t,e,r="top",n=0,a={})=>{var d,f;const s=t.x,o=t.y-n,u=(d=a.width)!=null?d:0,h=(f=a.height)!=null?f:0;switch(r){case"bottom":return{x:s,y:Math.max(...e.map(p=>p.y))+h/2+4};case"right":return{x:Math.max(...e.map(p=>p.x))+u/2+4,y:o};case"left":return{x:Math.min(...e.map(p=>p.x))-u/2-4,y:o};case"top":default:return{x:s,y:Math.min(...e.map(p=>p.y))-h/2-4}}},"getSelfLoopLabelPosition"),w4e=_((t,e=0,{mergeSelfLoops:r=!0}={})=>{var s;const n=new Map,a=[],i=(s=t.graph())==null?void 0:s.rankdir;return t.edges().forEach(o=>{const u=t.edge(o);if(r&&u.selfLoop){const h=u.selfLoop.id;n.has(h)||n.set(h,[]),n.get(h).push({edge:u,start:o.v,end:o.w})}else a.push({edge:u,start:o.v,end:o.w})}),n.forEach(o=>{var w,x,T,C,S,E,k,A;if(o.length!==3){o.forEach(I=>a.push(I));return}o.sort((I,L)=>I.edge.selfLoop.order-L.edge.selfLoop.order);const[u,h,d]=o,f=(T=(x=(w=u.edge.originalEdge)!=null?w:h.edge.originalEdge)!=null?x:d.edge.originalEdge)!=null?T:h.edge,p=t.node(f.start);if(!p){o.forEach(I=>a.push(I));return}const g={width:h.edge.width,height:h.edge.height},m=bHt(t,p,o,f.start,i),y=xHt(p,m,e,(C=g.width)!=null?C:0),v=wHt(p,y,m,e,g),b=Ne(X(X({},h.edge),f),{id:f.id,points:y,start:f.start,end:f.end,x:v.x,y:v.y,width:g.width,height:g.height,labelStyle:h.edge.labelStyle,fromCluster:(E=(S=u.edge.fromCluster)!=null?S:h.edge.fromCluster)!=null?E:d.edge.fromCluster,toCluster:(A=(k=u.edge.toCluster)!=null?k:h.edge.toCluster)!=null?A:d.edge.toCluster});delete b.selfLoop,delete b.originalEdge,a.push({edge:b,start:b.start,end:b.end})}),a},"getEdgesToRender"),T4e=_((t,e,r,n,a,i)=>nt(this,null,function*(){Le.warn("Graph in recursive render:XAX",Cf(e),a);const s=e.graph().rankdir;Le.trace("Dir in recursive render - dir:",s);const o=t.insert("g").attr("class","root");e.nodes()?Le.info("Recursive render XXX",e.nodes()):Le.info("No nodes found for",e),e.edges().length>0&&Le.info("Recursive edges",e.edge(e.edges()[0]));const u=o.insert("g").attr("class","clusters"),h=o.insert("g").attr("class","edgePaths"),d=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes"),p=vHt(r);yield Promise.all(e.nodes().map(function(w){return nt(this,null,function*(){const x=e.node(w);if(a!==void 0){const T=JSON.parse(JSON.stringify(a.clusterData));Le.trace(`Setting data for parent cluster XXX
|
||
Node.id = `,w,`
|
||
data=`,T.height,`
|
||
Parent cluster`,a.height),e.setNode(a.id,T),e.parent(w)||(Le.trace("Setting parent",w,a.id),e.setParent(w,a.id,T))}if(Le.info("(Insert) Node XXX"+w+": "+JSON.stringify(e.node(w))),x!=null&&x.clusterNode){Le.info("Cluster identified XBX",w,x.width,e.node(w));const{ranksep:T,nodesep:C}=e.graph();x.graph.setGraph(Ne(X({},x.graph.graph()),{ranksep:T+25,nodesep:C}));const S=yield T4e(f,x.graph,r,n,e.node(w),i),E=S.elem;Ir(x,E),x.diff=S.diff||0,Le.info("New compound node after recursive render XAX",w,"width",x.width,"height",x.height),I7t(E,x)}else e.children(w).length>0?(Le.trace("Cluster - the non recursive path XBX",w,x.id,x,x.width,"Graph:",e),Le.trace(pT(x.id,e)),rn.set(x.id,{id:pT(x.id,e),node:x})):(Le.trace("Node - the non recursive path XAX",w,f,e.node(w),s),yield w3(f,e.node(w),{config:i,dir:s}))})})),yield _(()=>nt(this,null,function*(){const w=e.edges().map(function(x){return nt(this,null,function*(){const T=e.edge(x.v,x.w,x.name);if(Le.info("Edge "+x.v+" -> "+x.w+": "+JSON.stringify(x)),Le.info("Edge "+x.v+" -> "+x.w+": ",x," ",JSON.stringify(e.edge(x))),Le.info("Fix",rn,"ids:",x.v,x.w,"Translating: ",rn.get(x.v),rn.get(x.w)),p&&T.selfLoop){if(T.selfLoop.order!==1)return;const C=T.id;T.id=T.selfLoop.id,yield tN(d,T),T.id=C;return}yield tN(d,T)})});yield Promise.all(w)}),"processEdges")(),Le.info("Graph before layout:",JSON.stringify(Cf(e))),Le.info("############################################# XXX"),Le.info("### Layout ### XXX"),Le.info("############################################# XXX"),v4e(e),Le.info("Graph after layout:",JSON.stringify(Cf(e)));let m=0,{subGraphTitleTotalMargin:y}=zw(i);yield Promise.all(IBt(e).map(function(w){return nt(this,null,function*(){var T;const x=e.node(w);if(Le.info("Position XBX => "+w+": ("+x.x,","+x.y,") width: ",x.width," height: ",x.height),x!=null&&x.clusterNode)x.y+=y,Le.info("A tainted cluster node XBX1",w,x.id,x.width,x.height,x.x,x.y,e.parent(w)),rn.get(x.id).node=x,eN(x);else if(e.children(w).length>0){Le.info("A pure cluster node XBX1",w,x.id,x.x,x.y,x.width,x.height,e.parent(w)),x.height+=y,e.node(x.parentId);const C=(x==null?void 0:x.padding)/2||0,S=((T=x==null?void 0:x.labelBBox)==null?void 0:T.height)||0,E=S-C||0;Le.debug("OffsetY",E,"labelHeight",S,"halfPadding",C),yield Z7(u,x),rn.get(x.id).node=x}else{const C=e.node(x.parentId);x.y+=y/2,Le.info("A regular node XBX1 - using the padding",x.id,"parent",x.parentId,x.width,x.height,x.x,x.y,"offsetY",x.offsetY,"parent",C,C==null?void 0:C.offsetY,x),eN(x)}})}));const v=y/2;return w4e(e,v,{mergeSelfLoops:p}).forEach(function({edge:w,start:x,end:T}){Le.info("Edge "+x+" -> "+T+": "+JSON.stringify(w),w),w.points.forEach(k=>k.y+=v);const C=e.node(x),S=e.node(T),E=tV(h,w,rn,r,C,S,n);xwe(w,E)}),e.nodes().forEach(function(w){const x=e.node(w);Le.info(w,x.type,x.diff),x.isGroup&&(m=x.diff)}),Le.warn("Returning from recursive render XAX",o,m),{elem:o,diff:m}}),"recursiveRender"),THt=_((t,e)=>nt(this,null,function*(){var i,s,o,u,h,d;const r=new Rs({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:((i=t.config)==null?void 0:i.nodeSpacing)||((o=(s=t.config)==null?void 0:s.flowchart)==null?void 0:o.nodeSpacing)||t.nodeSpacing,ranksep:((u=t.config)==null?void 0:u.rankSpacing)||((d=(h=t.config)==null?void 0:h.flowchart)==null?void 0:d.rankSpacing)||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");nV(n,t.markers,t.type,t.diagramId),gwe(),bwe(),Dbe(),WSe(),t.nodes.forEach(f=>{r.setNode(f.id,X({},f)),f.parentId&&r.setParent(f.id,f.parentId)}),Le.debug("Edges:",t.edges),t.edges.forEach(f=>{if(f.start===f.end){const p=f.start,g=p+"---"+p+"---1",m=p+"---"+p+"---2",y=r.node(p);r.setNode(g,{domId:g,id:g,parentId:y.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(g,y.parentId),r.setNode(m,{domId:m,id:m,parentId:y.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(m,y.parentId);const v=structuredClone(f),b=structuredClone(f),w=structuredClone(f),x=structuredClone(f);b.originalEdge=v,b.selfLoop={id:v.id,order:0},w.originalEdge=v,w.selfLoop={id:v.id,order:1},x.originalEdge=v,x.selfLoop={id:v.id,order:2},b.label="",b.arrowTypeEnd="none",b.endLabelLeft="",b.endLabelRight="",b.startLabelLeft="",b.id=p+"-cyclic-special-1",w.startLabelRight="",w.startLabelLeft="",w.endLabelLeft="",w.endLabelRight="",w.arrowTypeStart="none",w.arrowTypeEnd="none",w.id=p+"-cyclic-special-mid",x.label="",x.startLabelRight="",x.startLabelLeft="",x.arrowTypeStart="none",y.isGroup&&(b.fromCluster=p,x.toCluster=p),x.id=p+"-cyclic-special-2",x.arrowTypeStart="none",r.setEdge(p,g,b,p+"-cyclic-special-0"),r.setEdge(g,m,w,p+"-cyclic-special-1"),r.setEdge(m,p,x,p+"-cyclic-special-2")}else r.setEdge(f.start,f.end,X({},f),f.id)}),Le.warn("Graph at first:",JSON.stringify(Cf(r))),NBt(r),Le.warn("Graph after XAX:",JSON.stringify(Cf(r)));const a=ft();yield T4e(n,r,t.type,t.diagramId,void 0,a)}),"render"),EHt=Object.freeze({__proto__:null,getEdgesToRender:w4e,render:THt});function E4e(t,e){return nt(this,null,function*(){const r=new Rs({multigraph:!0,compound:!0}),n=[...e.edges],a=ft(),i=t.insert("g").attr("class","root"),s=i.insert("g").attr("class","clusters"),o=i.insert("g").attr("class","edges edgePath"),u=i.insert("g").attr("class","edgeLabels"),h=i.insert("g").attr("class","nodes"),d=new Map,f=t.node()!=null;yield Promise.all(e.nodes.map(p=>nt(this,null,function*(){var g,m;if(p.isGroup)r.setNode(p.id,X({},p));else{if(f){const y=yield w3(h,p,{config:a,dir:p.dir}),v=(m=(g=y.node())==null?void 0:g.getBBox())!=null?m:{width:0,height:0};d.set(p.id,y),p.width=v.width,p.height=v.height}r.setNode(p.id,X({},p))}})));for(const p of n)r.setEdge(p.start,p.end,X({},p),p.id),e.edges.some(m=>m.id===p.id)||e.edges.push(p);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:p}=yield Promise.resolve().then(function(){return cxr});p(t,e)}return{graph:r,groups:{clusters:s,edgePaths:o,edgeLabels:u,nodes:h,rootGroups:i},nodeElements:d}})}l(E4e,"createGraphWithElements"),_(E4e,"createGraphWithElements");var C4e=5,sI=1e-5,oI=1e-6;function lI(t){const e=[];for(let r=0;r<t.length-1;r++)e.push({a:t[r],b:t[r+1]});return e}l(lI,"buildSegmentList"),_(lI,"buildSegmentList");function S4e(t,e,r,n){const a=e.x-t.x,i=e.y-t.y,s=n.x-r.x,o=n.y-r.y,u=a*o-i*s;if(u===0)return null;const h=r.x-t.x,d=r.y-t.y,f=(h*o-d*s)/u,p=(h*i-d*a)/u;return f<=oI||f>=1-oI||p<=oI||p>=1-oI?null:{point:{x:t.x+f*a,y:t.y+f*i},tA:f,tB:p}}l(S4e,"segmentIntersection"),_(S4e,"segmentIntersection");function QG(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}l(QG,"isHorizontalSeg"),_(QG,"isHorizontalSeg");function _4e(t){const e=[];for(let r=0;r<t.length;r++){const n=t[r],a=lI(n.points);for(let i=r+1;i<t.length;i++){const s=t[i],o=lI(s.points);for(const[u,h]of a.entries())for(const[d,f]of o.entries()){const p=S4e(h.a,h.b,f.a,f.b);if(!p)continue;const g=QG(h),m=QG(f);(g!==m?g:!1)?e.push({jumpEdgeId:n.id,otherEdgeId:s.id,segIndex:u,t:p.tA,point:p.point}):e.push({jumpEdgeId:s.id,otherEdgeId:n.id,segIndex:d,t:p.tB,point:p.point})}}}return e}l(_4e,"findEdgeIntersections"),_(_4e,"findEdgeIntersections");function Yu(t){const e=Math.round(t*1e3)/1e3;return Number.isInteger(e)?`${e}`:`${e}`}l(Yu,"fmt"),_(Yu,"fmt");function mT(t){return`${Yu(t.x)},${Yu(t.y)}`}l(mT,"pointToString"),_(mT,"pointToString");function k4e(t){const e=t.b.x-t.a.x,r=t.b.y-t.a.y;return Math.abs(e)>=Math.abs(r)?e>=0?1:0:r>=0?1:0}l(k4e,"getArcSweepFlag"),_(k4e,"getArcSweepFlag");var CHt=.001;function A4e(t,e){if(t.length<2)return t.map(i=>X({},i));const r=t.map(i=>X({},i)),n=e.arrowTypeStart&&Ps[e.arrowTypeStart];if(n){const i=t[0],s=t[1],o=Math.atan2(s.y-i.y,s.x-i.x);r[0].x=i.x+n*Math.cos(o),r[0].y=i.y+n*Math.sin(o)}const a=e.arrowTypeEnd&&Ps[e.arrowTypeEnd];if(a){const i=t.length,s=t[i-2],o=t[i-1],u=Math.atan2(o.y-s.y,o.x-s.x);r[i-1].x=o.x-a*Math.cos(u),r[i-1].y=o.y-a*Math.sin(u)}return r}l(A4e,"applyMarkerOffsets"),_(A4e,"applyMarkerOffsets");function N4e(t,e,r,n,a){const i=t.point.x,s=t.point.y,o={x:i-e*t.r,y:s-r*t.r},u={x:i+e*t.r,y:s+r*t.r},h=[`L${mT(o)}`];return a==="arc"?h.push(`A${Yu(t.r)},${Yu(t.r)} 0 0 ${n} ${mT(u)}`):h.push(`M${mT(u)}`),h}l(N4e,"emitJump"),_(N4e,"emitJump");function JG(t,e,r,n){const a=e.x-t.x,i=e.y-t.y,s=r.x-e.x,o=r.y-e.y,u=Math.hypot(a,i),h=Math.hypot(s,o);if(u<sI||h<sI)return null;const d=a/u,f=i/u,p=s/h,g=o/h,m=d*p+f*g,y=Math.max(-1,Math.min(1,m)),v=Math.acos(y);if(v<sI||Math.abs(Math.PI-v)<sI)return null;const b=Math.min(n/Math.sin(v/2),u/2,h/2);return{startX:e.x-d*b,startY:e.y-f*b,endX:e.x+p*b,endY:e.y+g*b,ctrlX:e.x,ctrlY:e.y,cutLen:b}}l(JG,"computeRoundedCorner"),_(JG,"computeRoundedCorner");function I4e(t,e,r){var h,d,f,p;const n=t.points;if(n.length<2)return"";const a=A4e(n,t),i=t.curve==="rounded",s=lI(a),o=new Map;for(const g of e){const m=s[g.segIndex];if(!m)continue;const y=Math.hypot(m.b.x-m.a.x,m.b.y-m.a.y),v=(h=o.get(g.segIndex))!=null?h:[];v.push({t:g.t,point:g.point,d:g.t*y,r:r.jumpRadius}),o.set(g.segIndex,v)}const u=[`M${mT(a[0])}`];for(let g=0;g<s.length;g++){const m=s[g],y=Math.hypot(m.b.x-m.a.x,m.b.y-m.a.y),v=y===0?0:(m.b.x-m.a.x)/y,b=y===0?0:(m.b.y-m.a.y)/y,w=k4e(m);let x=0;if(i&&g>0){const E=JG(a[g-1],a[g],(d=a[g+1])!=null?d:a[g],C4e);E&&(x=E.cutLen)}let T=y,C=null;i&&g<s.length-1&&(C=JG(a[g],a[g+1],(f=a[g+2])!=null?f:a[g+1],C4e),C&&(T=y-C.cutLen));const S=[...(p=o.get(g))!=null?p:[]].sort((E,k)=>E.t-k.t);for(const E of S)E.r=Math.min(E.r,E.d-x,T-E.d);for(let E=0;E<S.length-1;E++){const k=S[E+1].d-S[E].d;if(S[E].r+S[E+1].r>k){const A=k/2;S[E].r=Math.min(S[E].r,A),S[E+1].r=Math.min(S[E+1].r,A)}}for(const E of S)E.r<CHt||u.push(...N4e(E,v,b,w,r.jumpStyle));i&&C?(u.push(`L${Yu(C.startX)},${Yu(C.startY)}`),u.push(`Q${Yu(C.ctrlX)},${Yu(C.ctrlY)} ${Yu(C.endX)},${Yu(C.endY)}`)):u.push(`L${mT(m.b)}`)}return u.join(" ")}l(I4e,"rewriteEdgePath"),_(I4e,"rewriteEdgePath");function L4e(t){return/^[\d\s+,.LMelm-]*$/.test(t)}l(L4e,"isStraightPath"),_(L4e,"isStraightPath");function $4e(t){return t?t==="linear"||t==="rounded"||t==="step"||t==="stepBefore"||t==="stepAfter":!0}l($4e,"curveSupportsLineHops"),_($4e,"curveSupportsLineHops");function M4e(t){if(!t)return null;try{const e=typeof atob=="function"?atob(t):Buffer.from(t,"base64").toString(),r=JSON.parse(e);if(!Array.isArray(r))return null;const n=[];for(const a of r)a&&typeof a.x=="number"&&typeof a.y=="number"&&n.push({x:a.x,y:a.y});return n.length>=2?n:null}catch(e){return null}}l(M4e,"decodeDataPoints"),_(M4e,"decodeDataPoints");function P4e(t,e,r){var h,d,f;if(!r.enabled)return;const n=t.node();if(!n)return;const a=new Map;for(const p of e)a.set(p.id,p);const i=[],s=new Map;for(const p of e){const g=typeof CSS!="undefined"&&CSS.escape?CSS.escape(p.id):p.id,m=n.querySelector(`path[data-id="${g}"]`);if(!m)continue;s.set(p.id,m);const y=M4e(m.getAttribute("data-points")),v=y!=null?y:p.points;i.push(Ne(X({},p),{points:v}))}const o=_4e(i);if(o.length===0)return;const u=new Map;for(const p of o){const g=(h=u.get(p.jumpEdgeId))!=null?h:[];g.push(p),u.set(p.jumpEdgeId,g)}for(const p of i){const g=u.get(p.id);if(!g||g.length===0)continue;const m=a.get(p.id),y=m==null?void 0:m.curve;if(y!==void 0&&!$4e(y))continue;const v=s.get(p.id);if(!v)continue;if(y===void 0){const S=(d=v.getAttribute("d"))!=null?d:"";if(!L4e(S))continue}const b=(f=v.getAttribute("style"))!=null?f:"",w=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(b),x=w?Number.parseFloat(w[1]):null,T=w?Number.parseFloat(w[2]):null,C=I4e(p,g,r);if(v.setAttribute("d",C),x!==null&&T!==null&&typeof v.getTotalLength=="function"){const S=v.getTotalLength(),E=Math.max(0,S-x-T),k=`0 ${x} ${E} ${T}`,A=b.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${k};`).replace(/;\s*;+/g,";");v.setAttribute("style",A)}}}l(P4e,"applyLineJumpsToSvg"),_(P4e,"applyLineJumpsToSvg");function R4e(t,e){return nt(this,null,function*(){var a,i,s,o;for(const u of t.nodes)u.isGroup?yield Z7(e.clusters,u):eN(u);const r=new Map;for(const u of t.nodes)u!=null&&u.id&&r.set(u.id,u);for(const u of t.edges){const h=u.start?(a=r.get(u.start))!=null?a:{}:{},d=u.end?(i=r.get(u.end))!=null?i:{}:{},f=tV(e.edgePaths,X({},u),{},t.type,h,d,t.diagramId);u.label&&(yield tN(e.rootGroups,u)),u.label&&O4e(u,f)}const n=(o=(s=t.config)==null?void 0:s.swimlane)==null?void 0:o.lineHops;if(n!==!1){const u=n==="gap"?"gap":"arc",h=t.edges.filter(d=>Array.isArray(d.points)&&d.points.length>=2).map(d=>({id:d.id,points:d.points,curve:d.curve,arrowTypeStart:d.arrowTypeStart,arrowTypeEnd:d.arrowTypeEnd}));P4e(e.edgePaths,h,{enabled:!0,jumpRadius:6,jumpStyle:u})}})}l(R4e,"adjustLayout"),_(R4e,"adjustLayout");function O4e(t,e){var i,s;const r=(i=e==null?void 0:e.updatedPath)!=null?i:e==null?void 0:e.originalPath,n=Ar(),{subGraphTitleTotalMargin:a}=zw({flowchart:(s=n.flowchart)!=null?s:{}});if(t.label){const o=E3.get(t.id);let u=t.x,h=t.y;if(r){const d=Wr.calcLabelPosition(r);Le.debug("Moving label "+t.label+" from (",u,",",h,") to (",d.x,",",d.y,") abc88"),e&&(u=d.x,h=d.y)}o.attr("transform",`translate(${u}, ${h+a/2})`)}if(t!=null&&t.startLabelLeft){const o=Oi.get(t.id).startLeft;let u=t==null?void 0:t.x,h=t==null?void 0:t.y;if(r){const d=Wr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);u=d.x,h=d.y}o.attr("transform",`translate(${u}, ${h})`)}if(t.startLabelRight){const o=Oi.get(t.id).startRight;let u=t.x,h=t.y;if(r){const d=Wr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);u=d.x,h=d.y}o.attr("transform",`translate(${u}, ${h})`)}if(t.endLabelLeft){const o=Oi.get(t.id).endLeft;let u=t.x,h=t.y;if(r){const d=Wr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);u=d.x,h=d.y}o.attr("transform",`translate(${u}, ${h})`)}if(t.endLabelRight){const o=Oi.get(t.id).endRight;let u=t.x,h=t.y;if(r){const d=Wr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);u=d.x,h=d.y}o.attr("transform",`translate(${u}, ${h})`)}}l(O4e,"positionEdgeLabel$1"),_(O4e,"positionEdgeLabel");var eq="__swimlane_default__",SHt=21,D4e=20;function tq(t){var e;return Math.max((e=t.padding)!=null?e:D4e,D4e)}l(tq,"topLaneHorizontalPadding"),_(tq,"topLaneHorizontalPadding");function F4e(t){const{x:e,y:r,width:n,height:a}=t,i=t.swimlaneContentTop;if(typeof e!="number"||typeof r!="number"||typeof n!="number"||typeof a!="number"||typeof i!="number"||!Number.isFinite(e)||!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(a)||!Number.isFinite(i)||n<=0||a<=0){delete t.groupTitleRect;return}const s=r-a/2,o=Math.min(i,r+a/2),u=Math.min(SHt,Math.max(0,o-s)),h=s+u;if(h<=s){delete t.groupTitleRect;return}t.groupTitleRect={left:e-n/2,right:e+n/2,top:s,bottom:h}}l(F4e,"assignTopLaneTitleRect"),_(F4e,"assignTopLaneTitleRect");function B4e(t){var i,s;const e=t.direction,r=(i=t.nodes)!=null?i:t.nodes=[];for(const o of(s=t.nodes)!=null?s:[])o.isGroup&&!o.parentId&&(o.shape="swimlane",e&&(o.direction=e));const n=r.filter(o=>!o.isGroup&&!o.parentId);if(n.length===0)return;let a=r.find(o=>o.id===eq);a?a.isGroup&&(a.shape="swimlane",e&&(a.direction=e)):(a=X({id:eq,label:"",isGroup:!0,shape:"swimlane",padding:20},e?{direction:e}:{}),r.push(a));for(const o of n)o.parentId=eq}l(B4e,"prepareLayoutForSwimlanes"),_(B4e,"prepareLayoutForSwimlanes");function z4e(t){var u,h,d;const e=new Map;for(const f of(u=t.nodes)!=null?u:[])e.set(f.id,f);const r=[];for(const f of(h=t.edges)!=null?h:[]){const p=typeof f.start=="string"?f.start:void 0,g=typeof f.end=="string"?f.end:void 0;!p||!g||f.labelNodeId||r.push({id:f.id,src:p,dst:g,ref:f})}const n=(d=t.nodes)!=null?d:[],a=n.filter(f=>f.isGroup),i=n.filter(f=>!f.isGroup);return{nodes:[...[...a].reverse(),...i].map(f=>f.id),edges:r,layout:t,nodeById:e}}l(z4e,"toGraphView"),_(z4e,"toGraphView");function H4e(t,e,r,n){var p,g,m,y,v,b,w,x,T,C,S,E,k,A,I;const{layout:a}=t,i=t.nodeById,s=(p=n==null?void 0:n.layerGap)!=null?p:100,o=(g=n==null?void 0:n.nodeGap)!=null?g:40;let u=0;for(const L of e.layers){let R=0;for(const O of L){const M=i.get(O);if(!M){R++;continue}M.layer=u,M.order=R;const P=(m=r.x[O])!=null?m:R*o,z=(y=r.y[O])!=null?y:u*s;M.x=P,M.y=z,R++}u++}const h=(v=a.nodes)!=null?v:[],d=new Map,f=[];for(const L of h){if(!(L!=null&&L.isGroup))continue;L.parentId||f.push(L);const R=h.filter(D=>D.parentId===L.id);let O=1/0,M=-1/0,P=1/0,z=-1/0;for(const D of R){const B=(b=D.x)!=null?b:r.x[D.id],W=(w=D.y)!=null?w:r.y[D.id],U=(x=D.width)!=null?x:0,j=(T=D.height)!=null?T:0;B!=null&&W!=null&&(O=Math.min(O,B-U/2),M=Math.max(M,B+U/2),P=Math.min(P,W-j/2),z=Math.max(z,W+j/2))}if(O===1/0||P===1/0)L.x=(C=L.x)!=null?C:0,L.y=(S=L.y)!=null?S:0,L.width=(E=L.width)!=null?E:0,L.height=(k=L.height)!=null?k:0;else{const D=(A=L.padding)!=null?A:20,B=L.parentId?D:2*tq(L),W=D,U=Math.max(0,M-O)+B,j=Math.max(0,z-P)+W,V=(O+M)/2,Y=(P+z)/2;L.x=V,L.y=Y,L.width=U,L.height=j,d.set(L.id,{minX:O,maxX:M,minY:P,maxY:z})}}if(f.length>0&&d.size>0){let L=1/0,R=-1/0,O=0;for(const M of f){const P=(I=M.padding)!=null?I:20;P>O&&(O=P);const z=d.get(M.id);z&&(L=Math.min(L,z.minY),R=Math.max(R,z.maxY))}if(L!==1/0&&R!==-1/0){const M=Math.max(0,R-L),z=Math.max(O,36),D=M+2*z,B=(L+R)/2;for(const H of f)H.y=B,H.height=D,H.swimlaneContentTop=L;const W=[...f].sort((H,q)=>{var re,Q;const Z=(re=H.x)!=null?re:0,K=(Q=q.x)!=null?Q:0;return Z-K}),U=[],j=[],V=[];for(const H of W){const q=d.get(H.id);if(!q)continue;const Z=Math.max(0,q.maxX-q.minX)+2*tq(H),K=(q.minX+q.maxX)/2;U.push(H.id),j.push(K),V.push(Z)}const Y=U.length;if(Y>0){const H=new Map;if(Y===1)H.set(U[0],V[0]);else{const q=[];for(let te=0;te<Y-1;te++)q.push(j[te+1]-j[te]);const Z=new Array(Y);Z[0]=0;for(let te=0;te<Y-1;te++)Z[te+1]=2*q[te]-Z[te];let K=0,re=Number.POSITIVE_INFINITY;for(let te=0;te<Y;te++){const ee=V[te];te%2===0?K=Math.max(K,ee-Z[te]):re=Math.min(re,Z[te]-ee)}let Q=K;K<=re?Q=(K+re)/2:Q=K;for(let te=0;te<Y;te++){const ee=Z[te]+(te%2===0?Q:-Q),J=Math.max(V[te],ee);H.set(U[te],J)}}for(const q of f){const Z=H.get(q.id);Z!=null&&(q.width=Z),F4e(q)}}}}}l(H4e,"writeBackToLayoutData"),_(H4e,"writeBackToLayoutData");var _Ht="[EdgeLabelNodes]";function W4e(t){var s,o,u;const e=[],r=[],n=new Map;for(const h of t.nodes)n.set(h.id,h);for(const h of t.edges){if(!h.label||h.label.length===0||h.isLayoutOnly||h.labelNodeId)continue;const d=h.start?n.get(h.start):void 0,f=h.end?n.get(h.end):void 0;if(!d||!f){Le.warn(_Ht,`Edge ${h.id} has missing source or target node`);continue}const p=`edge-label-${h.start}-${h.end}-${h.id}`,m=d.parentId!==f.parentId?f.parentId:d.parentId,y=X({id:p,label:h.label,edgeStart:(s=h.start)!=null?s:"",edgeEnd:(o=h.end)!=null?o:"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:m,isGroup:!1,labelStyle:Array.isArray(h.labelStyle)?h.labelStyle[0]:(u=h.labelStyle)!=null?u:""},d.dir?{dir:d.dir}:{});e.push(y),h.labelNodeId=p,h.label=void 0,h.text=void 0;const v={id:`${h.id}-to-label`,start:h.start,end:p,type:"normal",isLayoutOnly:!0},b={id:`${h.id}-from-label`,start:p,end:h.end,type:"normal",isLayoutOnly:!0};r.push(v,b)}const a=[...t.nodes,...e],i=[...t.edges,...r];return Ne(X({},t),{nodes:a,edges:i})}l(W4e,"createEdgeLabelNodes"),_(W4e,"createEdgeLabelNodes");var Os=.001;function rq(t){var i,s,o,u;const e=(i=t.x)!=null?i:0,r=(s=t.y)!=null?s:0,n=(o=t.width)!=null?o:0,a=(u=t.height)!=null?u:0;return n>0&&a>0?{cx:e,cy:r,rect:vT(e,r,n,a)}:void 0}l(rq,"measuredNodeRect"),_(rq,"measuredNodeRect");function nq(t){var n;if(t.isGroup)return;const e=rq(t);return e?{id:String((n=t.id)!=null?n:""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}l(nq,"nodeBoundsInfoFor"),_(nq,"nodeBoundsInfoFor");function tu(t,e,r=Os){return Math.abs(t.x-e.x)<r&&Math.abs(t.y-e.y)<r}l(tu,"samePoint"),_(tu,"samePoint");function Cn(t,e,r=Os){return Math.abs(t.x-e.x)<r}l(Cn,"sameX"),_(Cn,"sameX");function An(t,e,r=Os){return Math.abs(t.y-e.y)<r}l(An,"sameY"),_(An,"sameY");function wi(t,e,r=Os){return An(t,e,r)&&Math.abs(t.x-e.x)>r}l(wi,"isHorizontalSegment"),_(wi,"isHorizontalSegment");function Ti(t,e,r=Os){return Cn(t,e,r)&&Math.abs(t.y-e.y)>r}l(Ti,"isVerticalSegment"),_(Ti,"isVerticalSegment");function il(t,e,r,n){return Math.max(0,Math.min(Math.max(t,e),Math.max(r,n))-Math.max(Math.min(t,e),Math.min(r,n)))}l(il,"overlapLength"),_(il,"overlapLength");function Jh(t,e,r=Os){return t.horizontal&&e.horizontal&&An(t.a,e.a,r)?il(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&&Cn(t.a,e.a,r)?il(t.a.y,t.b.y,e.a.y,e.b.y):0}l(Jh,"sameAxisSegmentOverlapLength"),_(Jh,"sameAxisSegmentOverlapLength");function yT(t,e=Os){const r=[];for(let n=0;n<t.length-1;n++){const a=t[n],i=t[n+1],s=wi(a,i,e),o=Ti(a,i,e);(s||o)&&r.push({index:n,a,b:i,horizontal:s,vertical:o})}return r}l(yT,"orthogonalSegmentsForPoints"),_(yT,"orthogonalSegmentsForPoints");function Cc(t,e=Os){const r=yT(t,e);let n=0;for(let a=1;a<r.length;a++)r[a-1].horizontal!==r[a].horizontal&&n++;return n}l(Cc,"countOrthogonalBends"),_(Cc,"countOrthogonalBends");function Dn(t,e=Os){const r=[];for(const n of t){const a=r.length>0?r[r.length-1]:void 0;(!a||!tu(a,n,e))&&r.push({x:n.x,y:n.y})}return r}l(Dn,"dedupeConsecutivePoints"),_(Dn,"dedupeConsecutivePoints");function aq(t,e=Os){if(!t||t.length!==4)return;const[r,n,a,i]=t;return wi(r,n,e)&&Ti(n,a,e)&&wi(a,i,e)?{kind:"HVH",p0:r,p1:n,p2:a,p3:i}:Ti(r,n,e)&&wi(n,a,e)&&Ti(a,i,e)?{kind:"VHV",p0:r,p1:n,p2:a,p3:i}:void 0}l(aq,"classifyThreeSegmentRoute"),_(aq,"classifyThreeSegmentRoute");function cI(t,e,r,n=0){const a=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y);return i>r.left-n&&a<r.right+n&&o>r.top-n&&s<r.bottom+n}l(cI,"segmentBoundsOverlapRect"),_(cI,"segmentBoundsOverlapRect");function iq(t,e,r=0){return t.x>e.left+r&&t.x<e.right-r&&t.y>e.top+r&&t.y<e.bottom-r}l(iq,"pointInsideRect"),_(iq,"pointInsideRect");function V4e(t,e){return t.left<=e.left&&t.right>=e.right&&t.top<=e.top&&t.bottom>=e.bottom}l(V4e,"rectContainsRect"),_(V4e,"rectContainsRect");function uI(t,e){return t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top}l(uI,"rectsOverlap"),_(uI,"rectsOverlap");function sq(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}l(sq,"inflateRect"),_(sq,"inflateRect");function vT(t,e,r,n){return{left:t-r/2,right:t+r/2,top:e-n/2,bottom:e+n/2}}l(vT,"rectFromCenterSize"),_(vT,"rectFromCenterSize");function Vl(t){var e;return(e=rq(t))==null?void 0:e.rect}l(Vl,"rectOfNodeBounds"),_(Vl,"rectOfNodeBounds");function Ym(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}l(Ym,"portForRectSide"),_(Ym,"portForRectSide");function oq(t,e,r,n,a,i=Os){const s=e==="left"||e==="right",o=n==="left"||n==="right";if(s&&o){if(e==="right"&&n==="left"&&t.x<r.x||e==="left"&&n==="right"&&t.x>r.x){if(An(t,r,i))return[t,r];const f=(t.x+r.x)/2;return[t,{x:f,y:t.y},{x:f,y:r.y},r]}if(e===n){if(An(t,r,i))return;const f=e==="left"?Math.min(t.x,r.x)-a:Math.max(t.x,r.x)+a;return[t,{x:f,y:t.y},{x:f,y:r.y},r]}return}if(!s&&!o){if(e===n){if(Cn(t,r,i))return;const p=e==="top"?Math.min(t.y,r.y)-a:Math.max(t.y,r.y)+a;return[t,{x:t.x,y:p},{x:r.x,y:p},r]}if(!(e==="bottom"&&n==="top"&&t.y<r.y||e==="top"&&n==="bottom"&&t.y>r.y))return;if(Cn(t,r,i))return[t,r];const f=(t.y+r.y)/2;return[t,{x:t.x,y:f},{x:r.x,y:f},r]}if(s&&!o){const d=e==="right"&&r.x>t.x||e==="left"&&r.x<t.x,f=n==="top"&&t.y<r.y||n==="bottom"&&t.y>r.y;return d&&f?[t,{x:r.x,y:t.y},r]:void 0}const u=e==="bottom"&&r.y>t.y||e==="top"&&r.y<t.y,h=n==="left"&&t.x<r.x||n==="right"&&t.x>r.x;return u&&h?[t,{x:t.x,y:r.y},r]:void 0}l(oq,"buildOrthogonalPortPath"),_(oq,"buildOrthogonalPortPath");function lq(t,e,r,n){return e==="left"||e==="right"?[t,{x:n,y:t.y},{x:n,y:r.y},r]:[t,{x:t.x,y:n},{x:r.x,y:n},r]}l(lq,"buildSameSideTrackPath"),_(lq,"buildSameSideTrackPath");function hI(t){const e=new Map,r=[];for(const n of t){if(n.isEdgeLabel)continue;const a=nq(n);a&&(e.set(a.id,a),r.push({id:a.id,rect:a.rect}))}return{nodeInfoById:e,realNodeRects:r}}l(hI,"collectRealNodeBounds"),_(hI,"collectRealNodeBounds");function pp(t){const e=[],r=[];for(const n of t){const a=nq(n);if(!a)continue;const i={id:a.id,rect:a.rect};n.isEdgeLabel?r.push(i):e.push(i)}return{realNodeRects:e,labelNodeRects:r}}l(pp,"collectNodeRectEntries"),_(pp,"collectNodeRectEntries");function G4e(t,{includeEdgeLabels:e=!0}={}){var n,a,i,s;const r=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const u=(n=o.x)!=null?n:0,h=(a=o.y)!=null?a:0,d=(i=o.width)!=null?i:0,f=(s=o.height)!=null?s:0;r.push(X({nodeId:o.id},vT(u,h,d,f)))}return r}l(G4e,"collectLayoutNodeRects"),_(G4e,"collectLayoutNodeRects");function cq(t,e,r=Os){const n=t.start,a=t.end;if(!n||!a)return;const i=e.get(n),s=e.get(a);if(!(!i||!s))return{srcId:n,dstId:a,srcInfo:i,dstInfo:s,collinearX:Math.abs(i.cx-s.cx)<r,collinearY:Math.abs(i.cy-s.cy)<r}}l(cq,"getNodePairGeometry"),_(cq,"getNodePairGeometry");function Fi(t,e,r,n=[],a=0){for(const i of r)if(!n.includes(i.id)&&cI(t,e,i.rect,-a))return!0;return!1}l(Fi,"segmentHitsAnyRect"),_(Fi,"segmentHitsAnyRect");function uq(t,e,r,n,a=Os,i=1e-6){const s=An(t,e,a),o=Cn(t,e,a),u=An(r,n,a),h=Cn(r,n,a);if(s&&u||o&&h||!(s||o)||!(u||h))return!1;const d=s?{a:t,b:e}:{a:r,b:n},f=o?{a:t,b:e}:{a:r,b:n},p=d.a.y,g=Math.min(d.a.x,d.b.x),m=Math.max(d.a.x,d.b.x),y=f.a.x,v=Math.min(f.a.y,f.b.y),b=Math.max(f.a.y,f.b.y);if(y<g||y>m||p<v||p>b)return!1;const w=Math.abs(y-d.a.x)<i&&Math.abs(p-d.a.y)<i||Math.abs(y-d.b.x)<i&&Math.abs(p-d.b.y)<i,x=Math.abs(y-f.a.x)<i&&Math.abs(p-f.a.y)<i||Math.abs(y-f.b.x)<i&&Math.abs(p-f.b.y)<i;return!(w&&x)}l(uq,"orthogonalSegmentsCross"),_(uq,"orthogonalSegmentsCross");function q4e(t,e,r,n,a=Os){const i=An(t,e,a),s=Cn(t,e,a),o=An(r,n,a),u=Cn(r,n,a);return s&&u&&Cn(t,r,a)?il(t.y,e.y,r.y,n.y)>a:i&&o&&An(t,r,a)?il(t.x,e.x,r.x,n.x)>a:!1}l(q4e,"sameAxisSegmentsOverlap"),_(q4e,"sameAxisSegmentsOverlap");function dI(t,e,r,n,{epsilon:a=Os,skipDegenerateOther:i=!1}={}){for(const s of r){if(s===n||s.isLayoutOnly)continue;const o=s.points;if(!(!o||o.length<2))for(let u=0;u<o.length-1;u++){const h=o[u],d=o[u+1];if(!(i&&tu(h,d,a))&&(uq(t,e,h,d,a)||q4e(t,e,h,d,a)))return!0}}return!1}l(dI,"segmentConflictsWithAnyEdge"),_(dI,"segmentConflictsWithAnyEdge");function Sf(t,e,r,n,a=Os){const i=An(t,e,a),s=Cn(t,e,a),o=An(r,n,a),u=Cn(r,n,a);if(!(i&&u||s&&o))return!1;const h=i?{a:t,b:e}:{a:r,b:n},d=i?{a:r,b:n}:{a:t,b:e},f=h.a.y,p=Math.min(h.a.x,h.b.x),g=Math.max(h.a.x,h.b.x),m=d.a.x,y=Math.min(d.a.y,d.b.y),v=Math.max(d.a.y,d.b.y);return m>p+a&&m<g-a&&f>y+a&&f<v-a}l(Sf,"orthogonalSegmentsStrictlyCross"),_(Sf,"orthogonalSegmentsStrictlyCross");function hq(t,e,r){const n=Math.min(e,r),a=Math.max(e,r);return t>n+Os&&t<a-Os}l(hq,"strictlyBetween"),_(hq,"strictlyBetween");function Y4e(t,e,r){return Cn(t,e)&&Cn(e,r)?hq(e.y,t.y,r.y):An(t,e)&&An(e,r)?hq(e.x,t.x,r.x):!1}l(Y4e,"isCollinearIntermediate"),_(Y4e,"isCollinearIntermediate");function U4e(t){let e=!1;const r=[];for(let n=0;n<t.length;n++){const a=r[r.length-1],i=t[n],s=n+1<t.length?t[n+1]:void 0;if(a&&s){if(tu(a,s)){n++,e=!0;continue}if(Y4e(a,i,s)){e=!0;continue}}r.push(i)}return{points:r,changed:e}}l(U4e,"simplifyPolylineOnce"),_(U4e,"simplifyPolylineOnce");function fI(t){const e=[t[0]];for(let n=1;n<t.length;n++){const a=e[e.length-1],i=t[n];if(!Cn(a,i)&&!An(a,i)){const s=e.length>=2?e[e.length-2]:void 0,u=(s?Cn(s,a):!1)?{x:a.x,y:i.y}:{x:i.x,y:a.y};e.push(u)}e.push(i)}const r=[];for(const n of e){const a=r[r.length-1];(!a||!tu(a,n))&&r.push(n)}return r}l(fI,"orthogonalizePolyline"),_(fI,"orthogonalizePolyline");function ed(t){if(t.length<3)return t;let e=[...t];for(let r=0;r<32;r++){const n=U4e(e);if(e=n.points,!n.changed)break}return e}l(ed,"simplifyPolyline"),_(ed,"simplifyPolyline");var Yr=.001,kHt=.5,j4e=4;function dq(t,e,r){const n=t;if(n.isLayoutOnly||!n.points||n.points.length<r)return;const a=n.start?e.get(n.start):void 0,i=n.end?e.get(n.end):void 0;return{edge:n,points:n.points,srcRect:a?Vl(a):void 0,dstRect:i?Vl(i):void 0}}l(dq,"endpointContextFor"),_(dq,"endpointContextFor");function K4e(t,e,r){if(An(t,e,Yr))return{x:t.x<r.left?r.left:r.right,y:t.y};if(Cn(t,e,Yr)){const n=t.y<r.top?r.top:r.bottom;return{x:t.x,y:n}}return{x:Math.min(r.right,Math.max(r.left,t.x)),y:Math.min(r.bottom,Math.max(r.top,t.y))}}l(K4e,"segmentEnterPoint"),_(K4e,"segmentEnterPoint");function fq(t,e,r){const n=r?1:-1;let a=r?0:t.length-1;for(;a>=0&&a<t.length&&iq(t[a],e,kHt);)a+=n;if(a<0||a>=t.length)return t;const i=a-n;if(i<0||i>=t.length)return t;const s=K4e(t[a],t[i],e);return r?[s,...t.slice(a)]:[...t.slice(0,a+1),s]}l(fq,"clipEndpoint"),_(fq,"clipEndpoint");function X4e(t,e){for(const r of t){const n=dq(r,e,2);if(!n)continue;let a=[...n.points];n.srcRect&&(a=fq(a,n.srcRect,!0)),n.dstRect&&(a=fq(a,n.dstRect,!1)),a=ed(fI(a)),a=vq(a,n.srcRect,n.dstRect),n.edge.points=ed(fI(a))}}l(X4e,"clipEdgeEndpointsToNodeBoundaries"),_(X4e,"clipEdgeEndpointsToNodeBoundaries");function pq(t,e,r,n=!1){if(An(t,e,Yr)){if(e.y<r.top-Yr||e.y>r.bottom+Yr)return e;if(n){if(t.x<r.left-Yr)return{x:r.left,y:t.y};if(t.x>r.right+Yr)return{x:r.right,y:t.y}}return{x:Math.abs(e.x-r.left)<=Math.abs(e.x-r.right)?r.left:r.right,y:t.y}}if(Cn(t,e,Yr)){if(e.x<r.left-Yr||e.x>r.right+Yr)return e;if(n){if(t.y<r.top-Yr)return{x:t.x,y:r.top};if(t.y>r.bottom+Yr)return{x:t.x,y:r.bottom}}const a=Math.abs(e.y-r.top)<=Math.abs(e.y-r.bottom);return{x:t.x,y:a?r.top:r.bottom}}return e}l(pq,"snapEndpointToBoundary"),_(pq,"snapEndpointToBoundary");function pI(t,e,r){const n=t[e];for(let a=e+r;a>=0&&a<t.length;a+=r){const i=t[a];if(!tu(i,n,Yr))return i}return t[e+r]}l(pI,"firstDistinctAdjacent"),_(pI,"firstDistinctAdjacent");function gI(t,e){const r=t+j4e,n=e-j4e;return r<=n?{lo:r,hi:n}:{lo:(t+e)/2,hi:(t+e)/2}}l(gI,"cornerClearanceRange"),_(gI,"cornerClearanceRange");function gq(t,e,r){const{lo:n,hi:a}=gI(e,r);return Math.min(a,Math.max(n,t))}l(gq,"clampToCornerClearance"),_(gq,"clampToCornerClearance");function Z4e(t){const e=Math.max(...t.map(n=>n.lo)),r=Math.min(...t.map(n=>n.hi));if(!(e>r))return{lo:e,hi:r}}l(Z4e,"intersectRanges"),_(Z4e,"intersectRanges");function mq(t,e){return e==="left"||e==="right"?gI(t.top,t.bottom):gI(t.left,t.right)}l(mq,"clearanceRangeForSide"),_(mq,"clearanceRangeForSide");function mI(t,e,r){const n=t.y>=r.top-Yr&&t.y<=r.bottom+Yr,a=t.x>=r.left-Yr&&t.x<=r.right+Yr;if(An(t,e,Yr)&&n){if(Math.abs(t.x-r.left)<Yr)return"left";if(Math.abs(t.x-r.right)<Yr)return"right"}if(Cn(t,e,Yr)&&a){if(Math.abs(t.y-r.top)<Yr)return"top";if(Math.abs(t.y-r.bottom)<Yr)return"bottom"}}l(mI,"terminalSideForSegment"),_(mI,"terminalSideForSegment");function J3(t){return t==="left"||t==="right"}l(J3,"isHorizontalSide"),_(J3,"isHorizontalSide");function Q4e(t,e,r,n,a){const i=[],s=r?mI(t,e,r):void 0,o=n?mI(e,t,n):void 0;return r&&s&&J3(s)===a&&i.push(mq(r,s)),n&&o&&J3(o)===a&&i.push(mq(n,o)),i.length>0?Z4e(i):void 0}l(Q4e,"straightClearanceRange"),_(Q4e,"straightClearanceRange");function yq(t,e,r,n,a){const i=Q4e(t,e,r,n,a);if(!i)return;const s=a?t.y:t.x,o=Math.min(i.hi,Math.max(i.lo,s));if(!(Math.abs(o-s)<Yr))return a?[{x:t.x,y:o},{x:e.x,y:o}]:[{x:o,y:t.y},{x:o,y:e.y}]}l(yq,"clearStraightEndpointCornerAxis"),_(yq,"clearStraightEndpointCornerAxis");function vq(t,e,r){var i,s;if(t.length!==2)return t;const[n,a]=t;return An(n,a,Yr)?(i=yq(n,a,e,r,!0))!=null?i:t:Cn(n,a,Yr)&&(s=yq(n,a,e,r,!1))!=null?s:t}l(vq,"clearStraightEndpointCornerConnections"),_(vq,"clearStraightEndpointCornerConnections");function J4e(t,e,r){return J3(r)?{x:t.x,y:gq(t.y,e.top,e.bottom)}:{x:gq(t.x,e.left,e.right),y:t.y}}l(J4e,"cornerClearedEndpoint"),_(J4e,"cornerClearedEndpoint");function e3e(t,e,r,n,a,i){const s=t.map(o=>X({},o));for(let o=e;o>=0&&o<t.length;o+=r){const u=t[o];if(i&&!An(u,n,Yr)||!i&&!Cn(u,n,Yr))break;i?s[o].y=a.y:s[o].x=a.x}return s}l(e3e,"moveCollinearEndpointRun"),_(e3e,"moveCollinearEndpointRun");function bq(t,e,r){if(t.length<2)return t;const n=r?0:t.length-1,a=r?1:-1,i=t[n],s=pI(t,n,a);if(!s)return t;const o=mI(i,s,e);if(!o)return t;const u=J3(o),h=J4e(i,e,o);return tu(i,h,Yr)?t:e3e(t,n,a,i,h,u)}l(bq,"clearEndpointCornerConnection"),_(bq,"clearEndpointCornerConnection");function xq(t,e,r){const n=Math.min(t.x,e.x)>=r.left-Yr&&Math.max(t.x,e.x)<=r.right+Yr,a=Math.min(t.y,e.y)>=r.top-Yr&&Math.max(t.y,e.y)<=r.bottom+Yr;if(Math.abs(t.y-r.top)<Yr&&Math.abs(e.y-r.top)<Yr&&n)return"top";if(Math.abs(t.y-r.bottom)<Yr&&Math.abs(e.y-r.bottom)<Yr&&n)return"bottom";if(Math.abs(t.x-r.left)<Yr&&Math.abs(e.x-r.left)<Yr&&a)return"left";if(Math.abs(t.x-r.right)<Yr&&Math.abs(e.x-r.right)<Yr&&a)return"right"}l(xq,"borderSideForSegment"),_(xq,"borderSideForSegment");function wq(t,e,r,n){switch(t){case"top":return Cn(e,r,Yr)&&r.y<n.top-Yr;case"bottom":return Cn(e,r,Yr)&&r.y>n.bottom+Yr;case"left":return An(e,r,Yr)&&r.x<n.left-Yr;case"right":return An(e,r,Yr)&&r.x>n.right+Yr}}l(wq,"leavesOutward"),_(wq,"leavesOutward");function Tq(t,e,r){if(t.length<3)return t;if(r){const i=xq(t[0],t[1],e);return i&&wq(i,t[1],t[2],e)?t.slice(1):t}const n=t.length-1,a=xq(t[n-1],t[n],e);return a&&wq(a,t[n-1],t[n-2],e)?t.slice(0,n):t}l(Tq,"collapseOwnBorderStub"),_(Tq,"collapseOwnBorderStub");function t3e(t,e,r){let n=t;if(e){const i=pI(n,0,1);if(i){const s=pq(i,n[0],e);s!==n[0]&&(n=[s,...n.slice(1)])}n=Tq(n,e,!0)}if(r){const i=n.length-1,s=pI(n,i,-1);if(s){const o=pq(s,n[i],r,!0);o!==n[i]&&(n=[...n.slice(0,i),o])}n=Tq(n,r,!1)}const a=vq(n,e,r);return a!==n||n.length===2?a:(e&&(n=bq(n,e,!0)),r&&(n=bq(n,r,!1)),n)}l(t3e,"snapAndCollapseEndpoints"),_(t3e,"snapAndCollapseEndpoints");function Eq(t,e){for(const r of t){const n=dq(r,e,2);if(!n)continue;const a=Dn(n.points,Yr),i=t3e(a,n.srcRect,n.dstRect);if(i.length<3){n.edge.points=i;continue}const s=[i[0],X({},i[0]),...i.slice(1,-1),i[i.length-1],X({},i[i.length-1])];n.edge.points=s}}l(Eq,"prepareEdgeEndpointsForRenderer"),_(Eq,"prepareEdgeEndpointsForRenderer");function Cq(t){return new Map(t.map(e=>[e.id,e]))}l(Cq,"buildNodeMap"),_(Cq,"buildNodeMap");function r3e(t,e){let r=t.parentId,n=null;for(;r;){const a=e.get(r);if(!(a!=null&&a.isGroup))break;n=a.id,r=a.parentId}return n}l(r3e,"resolveTopLevelGroupId"),_(r3e,"resolveTopLevelGroupId");function Sq(t,e){let r=0,n=t.parentId;for(;n;){const a=e.get(n);if(!(a!=null&&a.isGroup))break;r++,n=a.parentId}return r}l(Sq,"groupDepth"),_(Sq,"groupDepth");function _q(t){var i,s;let e=1/0,r=-1/0,n=1/0,a=-1/0;for(const o of t){const u=o.x,h=o.y;if(typeof u!="number"||typeof h!="number")continue;const d=(i=o.width)!=null?i:0,f=(s=o.height)!=null?s:0;e=Math.min(e,u-d/2),r=Math.max(r,u+d/2),n=Math.min(n,h-f/2),a=Math.max(a,h+f/2)}return e===1/0||n===1/0?null:{minX:e,maxX:r,minY:n,maxY:a}}l(_q,"boundsForChildren"),_(_q,"boundsForChildren");function n3e(t,e){var n;const r=(n=t.padding)!=null?n:20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+r,t.height=Math.max(0,e.maxY-e.minY)+r}l(n3e,"applyGroupBounds"),_(n3e,"applyGroupBounds");function a3e(t){const e=Cq(t),r=t.filter(n=>n.isGroup&&n.parentId).sort((n,a)=>Sq(a,e)-Sq(n,e));for(const n of r){const a=t.filter(s=>s.parentId===n.id),i=_q(a);i&&n3e(n,i)}}l(a3e,"recomputeNestedGroupBounds"),_(a3e,"recomputeNestedGroupBounds");function yI(t,e){var u,h,d;const r=(u=t.nodes)!=null?u:[],n=(h=t.edges)!=null?h:[],a=r.filter(f=>!f.isGroup);let i=1/0,s=-1/0;for(const f of a){const p=f[e];typeof p=="number"&&(i=Math.min(i,p),s=Math.max(s,p))}if(!Number.isFinite(i)||!Number.isFinite(s))return!1;const o=_(f=>i+s-f,"mirror");for(const f of r){const p=f[e];typeof p=="number"&&(f[e]=o(p));const g=f.groupTitleRect;g&&(f.groupTitleRect=e==="x"?Ne(X({},g),{left:o(g.right),right:o(g.left)}):Ne(X({},g),{top:o(g.bottom),bottom:o(g.top)}))}for(const f of n)for(const p of(d=f.points)!=null?d:[])p[e]=o(p[e]);return!0}l(yI,"mirrorAxis"),_(yI,"mirrorAxis");function i3e(t){var r;return((r=t.nodes)!=null?r:[]).some(n=>!n.isGroup)?yI(t,"y"):!0}l(i3e,"applyBtDirectionTransform"),_(i3e,"applyBtDirectionTransform");function s3e(t,e="LR"){var O,M,P,z,D,B,W,U,j,V,Y;const r=(O=t.nodes)!=null?O:[],n=(M=t.edges)!=null?M:[],a=r.filter(H=>!H.isGroup);let i=1/0,s=1/0;for(const H of a){const q=(P=H.x)!=null?P:0,Z=(z=H.y)!=null?z:0;q<i&&(i=q),Z<s&&(s=Z)}if(!Number.isFinite(i)||!Number.isFinite(s))return!1;const o=36;let u=0,h=0;for(const H of a)u+=(D=H.width)!=null?D:0,h+=(B=H.height)!=null?B:0;const d=u/a.length,f=h/a.length,p=f>0?Math.max(1,d/f):1;for(const H of a){const q=(W=H.x)!=null?W:0,K=(((U=H.y)!=null?U:0)-s)*p+o,re=q-i;H.x=K,H.y=re}for(const H of n)if(H.points)for(const q of H.points){const Z=q.x,re=(q.y-s)*p+o,Q=Z-i;q.x=re,q.y=Q}a3e(r);const g=r.filter(H=>H.isGroup&&!H.parentId);if(g.length===0)return e==="RL"&&yI(t,"x"),!0;const m=Cq(r),y=new Map;for(const H of r){if(H.isGroup)continue;const q=r3e(H,m);if(!q)continue;const Z=(j=y.get(q))!=null?j:[];Z.push(H),y.set(q,Z)}let v=0;for(const H of g){const q=(V=H.padding)!=null?V:0;q>v&&(v=q)}const b=[];let w=1/0,x=-1/0;for(const H of g){const q=(Y=y.get(H.id))!=null?Y:[],Z=_q(q);Z&&(w=Math.min(w,Z.minX),x=Math.max(x,Z.maxX),b.push({lane:H,contentTop:Z.minY,contentBottom:Z.maxY,centerY:(Z.minY+Z.maxY)/2}))}if(w===1/0||x===-1/0)return!0;const T=Math.max(0,x-w),C=Math.max(v,10),S=T+2*C,E=o+S,I=(w+x)/2-S/2-o,L=I+E/2,R=Math.max(v,o);b.sort((H,q)=>H.centerY-q.centerY);for(let H=0;H<b.length;H++){const q=b[H];let Z,K;if(H===0?Z=q.contentTop-R:Z=(b[H-1].contentBottom+q.contentTop)/2,H===b.length-1)K=q.contentBottom+R;else{const te=b[H+1];K=(q.contentBottom+te.contentTop)/2}const re=Math.max(0,K-Z),Q=(Z+K)/2;q.lane.x=L,q.lane.y=Q,q.lane.width=E,q.lane.height=re,q.lane.swimlaneContentTop=q.contentTop,q.lane.groupTitleRect={left:I,right:I+o,top:Z,bottom:K}}return e==="RL"&&yI(t,"x"),!0}l(s3e,"applyLrDirectionTransform"),_(s3e,"applyLrDirectionTransform");var Uu=1e-6,AHt=8,vI=AHt,NHt=[0,vI,-vI,2*vI,-2*vI];function o3e(t,e){const{nodeInfoById:r,realNodeRects:n}=hI(e);for(const a of t){if(a.isLayoutOnly)continue;const i=a.points;if(!i||i.length<4)continue;const s=aq(Dn(i,Uu),Uu);if(!s)continue;const{p3:o}=s,u=s.kind==="HVH",h=cq(a,r,Uu);if(!h)continue;const{srcId:d,dstId:f,srcInfo:p,dstInfo:g,collinearX:m,collinearY:y}=h;if(m||y)continue;let v;const b=p.rect;for(const w of NHt){let x,T,C;if(u){const L=g.cy>p.cy?b.bottom:b.top,R=p.cx+w;if(R<=b.left+Uu||R>=b.right-Uu)continue;x={x:R,y:L},T={x:R,y:o.y},C={x:o.x,y:o.y}}else{const L=g.cx>p.cx?b.right:b.left,R=p.cy+w;if(R<=b.top+Uu||R>=b.bottom-Uu)continue;x={x:L,y:R},T={x:o.x,y:R},C={x:o.x,y:o.y}}const S=tu(x,T,Uu),E=tu(T,C,Uu);if(S&&E||!S&&Fi(x,T,n,[d],1)||!E&&Fi(T,C,n,[f],1))continue;const k=!S&&dI(x,T,t,a,{epsilon:Uu,skipDegenerateOther:!0}),A=!E&&dI(T,C,t,a,{epsilon:Uu,skipDegenerateOther:!0});if(!(k||A)){S?v=[T,C]:E?v=[x,T]:v=[x,T,C];break}}v&&(a.points=v)}}l(o3e,"portSwapToLShape"),_(o3e,"portSwapToLShape");function l3e(t,e){var o,u,h,d;const{realNodeRects:i,labelNodeRects:s}=pp(e.values());for(const f of t){if(f.isLayoutOnly)continue;const p=f.points;if(!p||p.length<4)continue;const g=Dn(p,.001);if(g.length<4)continue;const m=g.length-1,y=g[m],v=g[m-1],b=g[m-2],w=y.x-v.x,x=y.y-v.y,T=Math.hypot(w,x);if(T>=10||T<.001)continue;const C=v.x-b.x,S=v.y-b.y;if(Math.hypot(C,S)<.001)continue;const k=wi(v,y,.001),A=Ti(v,y,.001),I=wi(b,v,.001),L=Ti(b,v,.001);if(!(k&&L||A&&I))continue;const R=f.end,O=f.start,M=R?e.get(R):void 0;if(!M)continue;const P=(o=M.x)!=null?o:0,z=(u=M.y)!=null?u:0,D=Vl(M);if(!D)continue;let B,W;if(L){const Z=S<0;B={x:P,y:b.y},W={x:P,y:Z?D.bottom:D.top}}else{const Z=C>0;B={x:b.x,y:z},W={x:Z?D.right:D.left,y:z}}if(Fi(B,W,i,R?[R]:[],-2)||Fi(B,W,s,[],-2))continue;if(O){const Z=e.get(O),K=Z?Vl(Z):void 0;if(K&&iq(B,K,2))continue}const U=_((Z,K)=>`${Z.x.toFixed(3)},${Z.y.toFixed(3)}|${K.x.toFixed(3)},${K.y.toFixed(3)}`,"ownSegmentKey"),j=new Set;for(let Z=0;Z<g.length-1;Z++)j.add(U(g[Z],g[Z+1]));const V=_((Z,K)=>{for(const re of t){if(re===f||re.isLayoutOnly)continue;const Q=re.points;if(!(!Q||Q.length<2))for(let te=0;te<Q.length-1;te++){const ee=Q[te],J=Q[te+1];if(!j.has(U(ee,J))&&Sf(Z,K,ee,J,.001))return!0}}return!1},"segmentCrossesOtherEdge");if(V(B,W))continue;if(m-3>=0){const Z=g[m-3],K=[O,R].filter(re=>!!re);if(Fi(Z,B,i,K,-2)||V(Z,B))continue}const H=[...g.slice(0,m-2),B,W];f.points=H;const q=f.labelNodeId;if(q){const Z=e.get(q);if(Z){const K=(h=Z.width)!=null?h:0,re=(d=Z.height)!=null?d:0;if(K>0&&re>0){let Q,te,ee=-1;for(let J=0;J<H.length-1;J++){const ae=H[J],se=H[J+1],fe=Math.hypot(se.x-ae.x,se.y-ae.y),ve=An(ae,se,.001),de=Cn(ae,se,.001);(ve&&fe>=K+2||de&&fe>=re+2)&&fe>ee&&(ee=fe,Q=(ae.x+se.x)/2,te=(ae.y+se.y)/2)}Q!==void 0&&te!==void 0&&(Z.x=Q,Z.y=te)}}}}}l(l3e,"collapseShortTerminalStub"),_(l3e,"collapseShortTerminalStub");var Nr=.001,Ds=8,ln=yT,kq=_((t,e)=>Cn(t,e,Nr)||An(t,e,Nr),"orthogonallyAligned");function c3e(t,e){const a=_((g,m)=>{var C,S,E,k;const y=(C=g.x)!=null?C:0,v=(S=g.y)!=null?S:0,b=m.x-y,w=m.y-v;let x=((E=g.width)!=null?E:0)/2,T=((k=g.height)!=null?k:0)/2;return Math.abs(w)*x>Math.abs(b)*T?(w<0&&(T=-T),{x:y+(w===0?0:T*b/w),y:v+T}):(b<0&&(x=-x),{x:y+x,y:v+(b===0?0:x*w/b)})},"rectIntersect"),i=_((g,m)=>{var E,k,A;const y=Dn((E=g.points)!=null?E:[]);if(y.length<2)return;const v=m?g.start:g.end,b=v?e.get(v):void 0,w=b?Vl(b):void 0;if(!b||!v||!w)return;const x=m?y[0]:y[y.length-1],T=m?y[1]:y[y.length-2],C=a(b,x);let S=x;if(kq(T,C)&&(S=T),Cn(C,S,Nr))return{edge:g,edgeId:String((k=g.id)!=null?k:""),nodeId:v,atStart:m,orientation:"V",coord:C.x,min:Math.min(C.y,S.y),max:Math.max(C.y,S.y),boundary:C,railEnd:S,rect:w};if(An(C,S,Nr))return{edge:g,edgeId:String((A=g.id)!=null?A:""),nodeId:v,atStart:m,orientation:"H",coord:C.y,min:Math.min(C.x,S.x),max:Math.max(C.x,S.x),boundary:C,railEnd:S,rect:w}},"terminalLaneFor"),s=_((g,m)=>Math.max(0,Math.min(g.max,m.max)-Math.max(g.min,m.min)),"projectedOverlapLength"),o=_((g,m)=>g.nodeId!==m.nodeId||g.orientation!==m.orientation?!1:g.orientation==="H"?(Math.abs(g.boundary.x-g.rect.left)<1||Math.abs(g.boundary.x-g.rect.right)<1)&&Cn(g.boundary,m.boundary,1):(Math.abs(g.boundary.y-g.rect.top)<1||Math.abs(g.boundary.y-g.rect.bottom)<1)&&An(g.boundary,m.boundary,1),"sameTerminalFace"),u=_((g,m)=>g.nodeId!==m.nodeId||g.orientation!==m.orientation?!1:s(g,m)>=Ds&&Math.abs(g.coord-m.coord)<.5,"exactTerminalLaneConflict"),h=_((g,m)=>{if(g.nodeId!==m.nodeId||g.orientation!==m.orientation||g.orientation!=="H"||g.atStart===m.atStart)return!1;const y=s(g,m);if(y<Ds)return!1;const v=g.rect.bottom-g.rect.top;return y<v||y>2*v?!1:o(g,m)&&Math.abs(g.coord-m.coord)<16},"nearTerminalLaneConflict"),d=_((g,m)=>{var S;const y=Dn((S=g.edge.points)!=null?S:[]);if(y.length<2)return;const v=g.orientation==="V"?{x:g.boundary.x+m,y:g.boundary.y}:{x:g.boundary.x,y:g.boundary.y+m},b=g.orientation==="V"?{x:g.railEnd.x+m,y:g.railEnd.y}:{x:g.railEnd.x,y:g.railEnd.y+m};if(!_(()=>Math.abs(g.boundary.y-g.rect.top)<1||Math.abs(g.boundary.y-g.rect.bottom)<1?An(v,g.boundary,Nr)&&v.x>=g.rect.left+1&&v.x<=g.rect.right-1:Math.abs(g.boundary.x-g.rect.left)<1||Math.abs(g.boundary.x-g.rect.right)<1?Cn(v,g.boundary,Nr)&&v.y>=g.rect.top+1&&v.y<=g.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(g.atStart){const E=y.length>1&&tu(y[1],g.railEnd,Nr),k=y.slice(E?2:1),A=k[0];return A&&!kq(A,b)?void 0:[v,b,...k]}const x=y.length>1&&tu(y[y.length-2],g.railEnd,Nr),T=y.slice(0,x?-2:-1),C=T[T.length-1];if(!(C&&!kq(C,b)))return[...T,b,v]},"shiftedCandidate"),f=_(g=>{var I,L,R,O,M;const m=g.edge,y=Dn((I=m.points)!=null?I:[]);if(y.length!==2)return!1;const v=m.start,b=m.end,w=v?e.get(v):void 0,x=b?e.get(b):void 0;if(!w||!x)return!1;const T=(L=w.x)!=null?L:0,C=(R=w.y)!=null?R:0,S=(O=x.x)!=null?O:0,E=(M=x.y)!=null?M:0,[k,A]=y;return An(k,A,Nr)&&Math.abs(C-E)<1&&Math.abs(T-S)>1||Cn(k,A,Nr)&&Math.abs(T-S)<1&&Math.abs(C-E)>1},"laneIsStraightCollinearConnector"),p=[-7,7,-2*7,2*7,-3*7,3*7];for(let g=0;g<8;g++){const m=t.filter(v=>!v.isLayoutOnly).flatMap(v=>[i(v,!0),i(v,!1)]).filter(v=>!!v);let y=!1;for(let v=0;v<m.length&&!y;v++)for(let b=v+1;b<m.length&&!y;b++){const w=m[v],x=m[b];if(w.edge===x.edge||!(u(w,x)||h(w,x)))continue;const T=!u(w,x),C=[w,x].sort((S,E)=>{const k=f(S),A=f(E);return k!==A?Number(k)-Number(A):+!E.atStart-+!S.atStart});for(const S of C){for(const E of p){const k=d(S,E);if(!k)continue;const A=i(Ne(X({},S.edge),{points:k}),S.atStart);if(!(!A||m.some(I=>I.edge!==S.edge&&(u(A,I)||T&&h(A,I))))){S.edge.points=k,y=!0;break}}if(y)break}}if(!y)return}}l(c3e,"separateSharedRenderedTerminalLanes"),_(c3e,"separateSharedRenderedTerminalLanes");function u3e(t,e){var o;const{realNodeRects:n,labelNodeRects:a}=pp(e.values()),i=_((u,h)=>{const d=u.start,f=u.end,p=ln(h);if(p.length!==h.length-1)return!1;const g=[d,f].filter(m=>!!m);for(const m of p)if(Fi(m.a,m.b,n,g,-2)||Fi(m.a,m.b,a,[],-2))return!1;for(const m of t){if(m===u||m.isLayoutOnly)continue;const y=m.points;if(!(!y||y.length<2)){for(const v of p)for(const b of ln(Dn(y)))if(Jh(v,b,.5)>=Ds||Sf(v.a,v.b,b.a,b.b,Nr))return!1}}return!0},"candidateIsSafe"),s=_((u,h)=>{if(h+4>=u.length)return;const d=u[h],f=u[h+1],p=u[h+2],g=u[h+3],m=u[h+4],y=wi(d,f)&&Ti(f,p)&&wi(p,g)&&Ti(g,m)&&Cn(d,g,Nr)&&Cn(d,m,Nr)&&Cn(f,p,Nr)&&(f.x-d.x)*(g.x-p.x)<0,v=Ti(d,f)&&wi(f,p)&&Ti(p,g)&&wi(g,m)&&An(d,g,Nr)&&An(d,m,Nr)&&An(f,p,Nr)&&(f.y-d.y)*(g.y-p.y)<0;if(y||v)return Dn([...u.slice(0,h+1),m,...u.slice(h+5)]);if(h+5>=u.length)return;const b=u[h+5],w=Ti(d,f)&&wi(f,p)&&Ti(p,g)&&wi(g,m)&&Ti(m,b)&&Cn(d,m,Nr)&&Cn(d,b,Nr)&&Cn(p,g,Nr)&&(p.x-f.x)*(m.x-g.x)<0,x=wi(d,f)&&Ti(f,p)&&wi(p,g)&&Ti(g,m)&&wi(m,b)&&An(d,m,Nr)&&An(d,b,Nr)&&An(p,g,Nr)&&(p.y-f.y)*(m.y-g.y)<0;if(!(!w&&!x))return Dn([...u.slice(0,h+1),b,...u.slice(h+6)])},"withoutDogleg");for(let u=0;u<8;u++){let h=!1;for(const d of t){if(d.isLayoutOnly)continue;const f=Dn((o=d.points)!=null?o:[]);for(let p=0;p<=f.length-5;p++){const g=s(f,p);if(!(!g||!i(d,g))){d.points=g,h=!0;break}}if(h)break}if(!h)return}}l(u3e,"collapseRedundantRectangularDoglegs"),_(u3e,"collapseRedundantRectangularDoglegs");function Aq(t,e){const{realNodeRects:i,labelNodeRects:s}=pp(e.values()),o=t.filter(m=>!m.isLayoutOnly),u=_((m,y,v)=>{var b;return Dn(m===y?v!=null?v:[]:(b=m.points)!=null?b:[])},"pointsFor"),h=_((m,y)=>{let v=0;for(let b=0;b<o.length;b++){const w=ln(u(o[b],m,y));for(let x=b+1;x<o.length;x++){const T=ln(u(o[x],m,y));for(const C of w)for(const S of T)Sf(C.a,C.b,S.a,S.b,Nr)&&v++}}return v},"strictCrossingCount"),d=_(m=>{const y=ln(m);if(y.length!==3)return;const v=y[1];if(!(y[0].horizontal===v.horizontal||y[2].horizontal===v.horizontal))return{index:v.index,horizontal:v.horizontal,vertical:v.vertical,segment:v}},"middleRail"),f=_((m,y)=>{const v=[m.start,m.end].filter(b=>!!b);return i.filter(b=>{if(v.includes(b.id))return!1;const w=b.rect;return y.horizontal?il(y.a.x,y.b.x,w.left,w.right)>=Ds&&y.a.y>=w.top-2&&y.a.y<=w.bottom+2:il(y.a.y,y.b.y,w.top,w.bottom)>=Ds&&y.a.x>=w.left-2&&y.a.x<=w.right+2})},"blockingRectsFor"),p=_((m,y,v)=>{const b=m.map(x=>X({},x));if(y.horizontal)b[y.index].y=v,b[y.index+1].y=v;else if(y.vertical)b[y.index].x=v,b[y.index+1].x=v;else return;const w=ed(Dn(b));return ln(w).length===w.length-1?w:void 0},"candidateByMovingRail"),g=_((m,y,v)=>{const b=[m.start,m.end].filter(x=>!!x),w=ln(y);if(w.length!==y.length-1)return!1;for(const x of w)if(Fi(x.a,x.b,i,b,-2)||Fi(x.a,x.b,s,[],-2))return!1;for(const x of o)if(x!==m){for(const T of w)for(const C of ln(u(x)))if(Jh(T,C,.5)>=Ds)return!1}return h(m,y)<=v},"candidateIsSafe");for(let m=0;m<8;m++){const y=h();let v=!1;for(const b of o){const w=u(b),x=d(w);if(!x)continue;const T=f(b,x.segment);if(T.length===0)continue;const C=x.horizontal?[Math.min(...T.map(S=>S.rect.top))-20,Math.max(...T.map(S=>S.rect.bottom))+20]:[Math.min(...T.map(S=>S.rect.left))-20,Math.max(...T.map(S=>S.rect.right))+20];for(const S of C){const E=p(w,x.segment,S);if(!(!E||!g(b,E,y))){b.points=E,v=!0;break}}if(v)break}if(!v)return}}l(Aq,"liftObstacleHuggingSameSideRails"),_(Aq,"liftObstacleHuggingSameSideRails");function Nq(t,e){var u;const n=_(h=>{const d=h.groupTitleRect;if(!(!d||typeof d.left!="number"||typeof d.right!="number"||typeof d.top!="number"||typeof d.bottom!="number"||!Number.isFinite(d.left)||!Number.isFinite(d.right)||!Number.isFinite(d.top)||!Number.isFinite(d.bottom)||d.right<=d.left||d.bottom<=d.top))return{left:d.left,right:d.right,top:d.top,bottom:d.bottom}},"validTitleRect"),a=_(h=>{if(!h.isGroup||h.parentId)return;const d=h.direction,f=typeof d=="string"?d.toUpperCase():"";if(f==="LR"||f==="RL"||f==="BT")return;const p=n(h),g=h.y,m=h.height;if(!p||typeof g!="number"||typeof m!="number"||!Number.isFinite(g)||!Number.isFinite(m)||m<=0)return;const y=p.right-p.left,v=p.bottom-p.top;if(!(v<=0||y<v))return{node:h,rect:p}},"topLaneTitleFor"),i=_((h,d)=>{if(!h.horizontal)return!1;const f=h.a.y;return f<=d.top+Nr||f>=d.bottom-Nr?!1:il(h.a.x,h.b.x,d.left,d.right)>=Ds},"horizontalSegmentIntersectsTitle"),s=[...e.values()].map(a).filter(h=>!!h);if(s.length===0)return;let o=0;for(const h of t){if(h.isLayoutOnly)continue;const d=Dn((u=h.points)!=null?u:[]);for(const f of ln(d))for(const p of s)i(f,p.rect)&&(o=Math.max(o,p.rect.bottom-f.a.y+4))}if(!(o<=Nr))for(const h of s){const d=h.node.y,f=h.node.height;typeof d!="number"||typeof f!="number"||!Number.isFinite(d)||!Number.isFinite(f)||f<=0||(h.node.y=d-o/2,h.node.height=f+o,h.node.groupTitleRect=Ne(X({},h.rect),{top:h.rect.top-o,bottom:h.rect.bottom-o}))}}l(Nq,"liftTopLaneTitleBandsAboveRails"),_(Nq,"liftTopLaneTitleBandsAboveRails");function Iq(t,e){var h;const n=_(d=>{const f=d.groupTitleRect;if(!(!f||typeof f.left!="number"||typeof f.right!="number"||typeof f.top!="number"||typeof f.bottom!="number"||!Number.isFinite(f.left)||!Number.isFinite(f.right)||!Number.isFinite(f.top)||!Number.isFinite(f.bottom)||f.right<=f.left||f.bottom<=f.top))return{left:f.left,right:f.right,top:f.top,bottom:f.bottom}},"validTitleRect"),a=_(d=>{if(!d.isGroup||d.parentId||d.direction!=="LR")return;const p=n(d),g=d.x,m=d.width;if(!p||typeof g!="number"||typeof m!="number"||!Number.isFinite(g)||!Number.isFinite(m)||m<=0)return;const y=p.right-p.left,v=p.bottom-p.top;if(!(y<=0||v<y))return{node:d,rect:p}},"leftLaneTitleFor"),i=_((d,f)=>{if(!d.vertical)return!1;const p=d.a.x;return p<=f.left+Nr||p>=f.right-Nr?!1:il(d.a.y,d.b.y,f.top,f.bottom)>=Ds},"verticalSegmentIntersectsTitle"),s=_((d,f)=>{if(!d.horizontal)return!1;const p=d.a.y;return p<=f.top+Nr||p>=f.bottom-Nr?!1:il(d.a.x,d.b.x,f.left,f.right)>=Ds},"horizontalSegmentIntersectsTitle"),o=[...e.values()].map(a).filter(d=>!!d);if(o.length===0)return;let u=0;for(const d of t){if(d.isLayoutOnly)continue;const f=Dn((h=d.points)!=null?h:[]);for(const p of ln(f))for(const g of o)if(i(p,g.rect))u=Math.max(u,g.rect.right-p.a.x+4);else if(s(p,g.rect)){const m=Math.min(p.a.x,p.b.x);u=Math.max(u,g.rect.right-m+4)}}if(!(u<=Nr))for(const d of o){const f=d.node.x,p=d.node.width;typeof f!="number"||typeof p!="number"||!Number.isFinite(f)||!Number.isFinite(p)||p<=0||(d.node.x=f-u/2,d.node.width=p+u,d.node.groupTitleRect=Ne(X({},d.rect),{left:d.rect.left-u,right:d.rect.right-u}))}}l(Iq,"shiftLeftLaneTitleBandsLeftOfRails"),_(Iq,"shiftLeftLaneTitleBandsLeftOfRails");function h3e(t,e){const{realNodeRects:n}=pp(e.values()),a=t.filter(m=>!m.isLayoutOnly),i=_((m,y=new Map)=>{var v,b;return Dn((b=(v=y.get(m))!=null?v:m.points)!=null?b:[])},"replacementPointsFor"),s=_((m=new Map)=>{let y=0;for(let v=0;v<a.length;v++){const b=ln(i(a[v],m));for(let w=v+1;w<a.length;w++){const x=ln(i(a[w],m));for(const T of b)for(const C of x)Sf(T.a,T.b,C.a,C.b,Nr)&&y++}}return y},"crossingCount"),o=_((m=new Map)=>a.reduce((y,v)=>y+Cc(i(v,m)),0),"totalBends"),u=_(m=>{const y=i(m);if(y.length<4)return;const v=y[y.length-2],b=y[y.length-1];if(!(!wi(v,b,Nr)&&!Ti(v,b,Nr)))return{tailStart:v,terminal:b}},"terminalTailFor"),h=_((m,y)=>{const v=i(m);if(v.length<3)return;const b=v[0],w=v[1];let x;if(wi(b,w,Nr))x={x:w.x,y:y.tailStart.y};else if(Ti(b,w,Nr))x={x:y.tailStart.x,y:w.y};else return;const T=ed(Dn([b,w,x,y.tailStart,y.terminal]));return ln(T).length===T.length-1?T:void 0},"candidateWithDestinationTail"),d=_((m,y)=>{const v=[m.start,m.end].filter(b=>!!b);for(const b of ln(y))if(Fi(b.a,b.b,n,v,-2))return!0;return!1},"pathHasNodeHit"),f=_((m,y,v)=>{for(const b of a)if(b!==m){for(const w of ln(y))for(const x of ln(i(b,v)))if(Jh(w,x,.5)>=Ds)return!0}return!1},"pathHasSharedTrack"),p=_((m,y,v)=>!d(m,y)&&!f(m,y,v),"candidateIsSafe"),g=_(()=>{var y;const m=new Map;for(const v of a){const b=v.end;if(!b||!e.has(b)||i(v).length<4)continue;const x=(y=m.get(b))!=null?y:[];x.push(v),m.set(b,x)}return m},"edgesByDestination");for(let m=0;m<4;m++){const y=s();if(y===0)return;const v=o();let b,w=y,x=v;for(const T of g().values())for(let C=0;C<T.length;C++)for(let S=C+1;S<T.length;S++){const E=T[C],k=T[S],A=u(E),I=u(k);if(!A||!I)continue;const L=h(E,I),R=h(k,A);if(!L||!R)continue;const O=new Map([[E,L],[k,R]]);if(!p(E,L,O)||!p(k,R,O))continue;const M=s(O),P=o(O);M>=y||M>w||M===w&&P>=x||(b=O,w=M,x=P)}if(!b)return;for(const[T,C]of b)T.points=C}}l(h3e,"swapDestinationTerminalTailsToReduceCrossings"),_(h3e,"swapDestinationTerminalTailsToReduceCrossings");function d3e(t,e){const{realNodeRects:i,labelNodeRects:s}=pp(e.values()),o=t.filter(T=>!T.isLayoutOnly),u=_((T,C=new Map)=>{var S,E;return Dn((E=(S=C.get(T))!=null?S:T.points)!=null?E:[])},"replacementPointsFor"),h=_((T=new Map)=>{let C=0;for(let S=0;S<o.length;S++){const E=ln(u(o[S],T));for(let k=S+1;k<o.length;k++){const A=ln(u(o[k],T));for(const I of E)for(const L of A)Sf(I.a,I.b,L.a,L.b,Nr)&&C++}}return C},"strictCrossingCount"),d=_((T=new Map)=>o.reduce((C,S)=>C+Cc(u(S,T)),0),"totalBends"),f=_(T=>{const C=T.start,S=T.end,E=C?e.get(C):void 0,k=S?e.get(S):void 0,A=E?Vl(E):void 0,I=k?Vl(k):void 0;return A&&I?{src:A,dst:I}:void 0},"endpointRectsFor"),p=_((T,C,S)=>{if(S.index<=0||S.index+1>=C.length-1)return;const E=f(T);if(E){if(S.vertical){const k=S.a.x,A=Math.min(E.src.left,E.dst.left),I=Math.max(E.src.right,E.dst.right),L=k<A-Nr?"left":k>I+Nr?"right":void 0;return L?{edge:T,points:C,segmentIndex:S.index,axis:"vertical",side:L,coord:k,min:Math.min(S.a.y,S.b.y),max:Math.max(S.a.y,S.b.y)}:void 0}if(S.horizontal){const k=S.a.y,A=Math.min(E.src.top,E.dst.top),I=Math.max(E.src.bottom,E.dst.bottom),L=k<A-Nr?"top":k>I+Nr?"bottom":void 0;return L?{edge:T,points:C,segmentIndex:S.index,axis:"horizontal",side:L,coord:k,min:Math.min(S.a.x,S.b.x),max:Math.max(S.a.x,S.b.x)}:void 0}}},"externalRailForSegment"),g=_(()=>{const T=[];for(const C of o){const S=u(C);for(const E of ln(S)){const k=p(C,S,E);k&&T.push(k)}}return T},"collectExternalRails"),m=_((T,C)=>T.edge!==C.edge&&T.axis===C.axis&&T.side===C.side&&il(T.min,T.max,C.min,C.max)>=Ds,"railsInteract"),y=_(T=>{const C=[],S=new Set;for(const E of T){if(S.has(E))continue;const k=[E],A=[];for(S.add(E);k.length>0;){const I=k.pop();A.push(I);for(const L of T)!S.has(L)&&m(I,L)&&(S.add(L),k.push(L))}A.length>1&&C.push(A)}return C},"connectedComponents"),v=_(T=>{const C=[];for(const S of T)C.some(E=>Math.abs(E-S.coord)<Nr)||C.push(S.coord);for(;C.length<T.length;){const S=Math.min(...C),E=Math.max(...C),k=T[0].side;C.push(k==="left"||k==="top"?S-12*(T.length-C.length):E+12*(T.length-C.length))}return C},"uniqueCoordsFor"),b=_(T=>{const C=T.map(k=>k.coord),S=v(T),E=[];if(T.length<=6){const k=new Array(S.length).fill(!1),A=[],I=_(()=>{if(A.length===T.length){A.some((L,R)=>Math.abs(L-C[R])>=Nr)&&E.push([...A]);return}for(const[L,R]of S.entries())k[L]||(k[L]=!0,A.push(R),I(),A.pop(),k[L]=!1)},"visit");return I(),E}for(let k=0;k<C.length;k++)for(let A=k+1;A<C.length;A++){const I=[...C];[I[k],I[A]]=[I[A],I[k]],E.push(I)}return E},"coordinateAssignmentsFor"),w=_((T,C)=>{var k;const S=new Map;for(const[A,I]of T.entries()){const L=C[A],R=(k=S.get(I.edge))!=null?k:I.points.map(O=>({x:O.x,y:O.y}));I.axis==="vertical"?(R[I.segmentIndex].x=L,R[I.segmentIndex+1].x=L):(R[I.segmentIndex].y=L,R[I.segmentIndex+1].y=L),S.set(I.edge,R)}const E=new Map;for(const[A,I]of S){const L=ed(Dn(I));if(ln(L).length!==L.length-1)return;E.set(A,L)}return E},"replacementsForAssignment"),x=_(T=>{for(const[C,S]of T){const E=[C.start,C.end].filter(k=>!!k);for(const k of ln(S))if(Fi(k.a,k.b,i,E,-2)||Fi(k.a,k.b,s,[],-2))return!1}for(let C=0;C<o.length;C++){const S=o[C],E=T.has(S),k=ln(u(S,T));for(let A=C+1;A<o.length;A++){const I=o[A];if(!E&&!T.has(I))continue;const L=ln(u(I,T));for(const R of k)for(const O of L)if(Jh(R,O,.5)>=Ds)return!1}}return!0},"candidateIsSafe");for(let T=0;T<4;T++){const C=h();if(C===0)return;let S,E=C,k=d(),A=Number.POSITIVE_INFINITY;for(const I of y(g()))for(const L of b(I)){const R=w(I,L);if(!R||!x(R))continue;const O=h(R);if(O>=C)continue;const M=d(R),P=I.reduce((z,D,B)=>z+Math.abs(L[B]-D.coord),0);O>E||O===E&&(M>k||M===k&&P>=A)||(S=R,E=O,k=M,A=P)}if(!S)return;for(const[I,L]of S)I.points=L}}l(d3e,"reassignCrossingExternalRailChannels"),_(d3e,"reassignCrossingExternalRailChannels");function f3e(t,e){const{realNodeRects:n,labelNodeRects:a}=pp(e.values()),i=t.filter(g=>!g.isLayoutOnly),s=_((g,m,y)=>{var v;return Dn(g===m?y!=null?y:[]:(v=g.points)!=null?v:[])},"pointsFor"),o=_(g=>ln(g).reduce((m,y)=>{const v=y.a.x-y.b.x,b=y.a.y-y.b.y;return m+Math.hypot(v,b)},0),"pathLength"),u=_((g,m)=>{let y=0;for(let v=0;v<i.length;v++){const b=ln(s(i[v],g,m));for(let w=v+1;w<i.length;w++){const x=ln(s(i[w],g,m));for(const T of b)for(const C of x)Sf(T.a,T.b,C.a,C.b,Nr)&&y++}}return y},"strictCrossingCount"),h=_((g,m)=>{if(g.horizontal){const y=g.a.y;return(Math.abs(y-m.top)<1||Math.abs(y-m.bottom)<1)&&il(g.a.x,g.b.x,m.left,m.right)>=Ds}if(g.vertical){const y=g.a.x;return(Math.abs(y-m.left)<1||Math.abs(y-m.right)<1)&&il(g.a.y,g.b.y,m.top,m.bottom)>=Ds}return!1},"segmentRunsAlongRectBorder"),d=_(g=>{const m=[g.start,g.end].filter(v=>!!v),y=[];for(const v of m){const b=e.get(v),w=b?Vl(b):void 0;w&&y.push(w)}return y},"endpointRectsFor"),f=_((g,m)=>{if(m+3>=g.length)return[];const y=g[m],v=g[m+1],b=g[m+2],w=g[m+3],x=wi(y,v,Nr)&&Ti(v,b,Nr)&&wi(b,w,Nr),T=Ti(y,v,Nr)&&wi(v,b,Nr)&&Ti(b,w,Nr);if(!x&&!T)return[];if(!(x?Math.sign(v.x-y.x)!==Math.sign(w.x-b.x):Math.sign(v.y-y.y)!==Math.sign(w.y-b.y)))return[];const S=Cn(y,w,Nr)||An(y,w,Nr)?[]:[{x:y.x,y:w.y},{x:w.x,y:y.y}],E=S.length===0?[[...g.slice(0,m+1),...g.slice(m+3)]]:S.map(A=>[...g.slice(0,m+1),A,...g.slice(m+3)]),k=new Set;return E.map(A=>ed(Dn(A))).filter(A=>{if(ln(A).length!==A.length-1||!A.some(L=>tu(L,w,Nr)))return!1;const I=A.map(L=>`${L.x.toFixed(3)},${L.y.toFixed(3)}`).join("|");return k.has(I)?!1:(k.add(I),!0)})},"shortcutCandidatesAt"),p=_((g,m,y)=>{const v=[g.start,g.end].filter(w=>!!w),b=d(g);for(const w of ln(m))if(Fi(w.a,w.b,n,v,-2)||Fi(w.a,w.b,a,[],-2)||b.some(x=>h(w,x)))return!1;for(const w of i)if(w!==g){for(const x of ln(m))for(const T of ln(s(w)))if(Jh(x,T,.5)>=Ds)return!1}return u(g,m)<=y},"candidateIsSafe");for(let g=0;g<8;g++){const m=u();let y,v,b=m,w=Number.POSITIVE_INFINITY,x=Number.POSITIVE_INFINITY;for(const T of i){const C=s(T),S=Cc(C,Nr),E=o(C);for(let k=0;k<=C.length-4;k++)for(const A of f(C,k)){const I=Cc(A,Nr),L=o(A);if(!(I<S||I===S&&L<E-Nr)||!p(T,A,m))continue;const O=u(T,A);O>b||O===b&&(I>w||I===w&&L>=x)||(y=T,v=A,b=O,w=I,x=L)}}if(!y||!v)return;y.points=v}}l(f3e,"shortcutRedundantOrthogonalJogs"),_(f3e,"shortcutRedundantOrthogonalJogs");function p3e(t,e){var Ee,Ce,De;const s=[];for(const ce of e.values()){if(ce.isGroup||ce.isEdgeLabel)continue;const Ie=(Ee=ce.x)!=null?Ee:0,ye=(Ce=ce.y)!=null?Ce:0,pe=Vl(ce);pe&&s.push({id:String((De=ce.id)!=null?De:""),cx:Ie,cy:ye,rect:pe})}if(s.length===0)return;const o=new Map(s.map(ce=>[ce.id,ce])),u=s.map(ce=>({id:ce.id,rect:ce.rect})),h=["top","bottom","left","right"],d={top:Math.min(...s.map(ce=>ce.rect.top))-20,bottom:Math.max(...s.map(ce=>ce.rect.bottom))+20,left:Math.min(...s.map(ce=>ce.rect.left))-20,right:Math.max(...s.map(ce=>ce.rect.right))+20},f=t.filter(ce=>!ce.isLayoutOnly),p=new Map(f.map((ce,Ie)=>[ce,Ie])),g=_(ce=>{const Ie=ce==="left"||ce==="top"?-1:1,ye=[];for(let pe=0;pe<=2;pe++)ye.push(d[ce]+Ie*20*pe);return ye},"outwardTracksForSide"),m=_((ce,Ie=new Map)=>{var ye,pe;return Dn((pe=(ye=Ie.get(ce))!=null?ye:ce.points)!=null?pe:[])},"replacementPointsFor"),y=_((ce,Ie)=>{let ye=0;for(const pe of ce)for(const Ae of Ie)Sf(pe.a,pe.b,Ae.a,Ae.b,Nr)&&ye++;return ye},"crossingCountBetweenSegments"),v=_((ce,Ie)=>y(ln(ce),ln(Ie)),"crossingCountBetweenPaths"),b=_((ce=new Map)=>{let Ie=0;const ye=[],pe=new Set,Ae=[],Ve=_(ze=>{pe.has(ze)||(pe.add(ze),Ae.push(ze))},"addEdge");for(let ze=0;ze<f.length;ze++){const We=f[ze],me=m(We,ce);for(let Se=ze+1;Se<f.length;Se++){const ne=f[Se],xe=v(me,m(ne,ce));xe>0&&(Ie+=xe,ye.push({first:We,second:ne,count:xe}),Ve(We),Ve(ne))}}return Ae.sort((ze,We)=>{var me,Se;return((me=p.get(ze))!=null?me:0)-((Se=p.get(We))!=null?Se:0)}),{count:Ie,pairs:ye,edgeSet:pe,edges:Ae}},"crossingSnapshot"),w=_((ce,Ie)=>{const ye=new Set(Ie.keys());if(ye.size===0)return ce.count;let pe=0;for(const Ve of ce.pairs)(ye.has(Ve.first)||ye.has(Ve.second))&&(pe+=Ve.count);let Ae=0;for(let Ve=0;Ve<f.length;Ve++){const ze=f[Ve],We=ye.has(ze),me=m(ze,Ie);for(let Se=Ve+1;Se<f.length;Se++){const ne=f[Se];!We&&!ye.has(ne)||(Ae+=v(me,m(ne,Ie)))}}return ce.count-pe+Ae},"crossingCountWithReplacements"),x=_(ce=>{var Ae,Ve,ze;const Ie=new Map;for(const We of ce.pairs){const me=(Ae=Ie.get(We.first))!=null?Ae:new Set;me.add(We.second),Ie.set(We.first,me);const Se=(Ve=Ie.get(We.second))!=null?Ve:new Set;Se.add(We.first),Ie.set(We.second,Se)}const ye=[],pe=new Set;for(const We of ce.edges){if(pe.has(We))continue;const me=[We],Se=[];for(pe.add(We);me.length>0;){const ne=me.pop();Se.push(ne);for(const xe of(ze=Ie.get(ne))!=null?ze:[])pe.has(xe)||(pe.add(xe),me.push(xe))}Se.sort((ne,xe)=>{var oe,_e;return((oe=p.get(ne))!=null?oe:0)-((_e=p.get(xe))!=null?_e:0)}),Se.length>1&&ye.push(Se)}return ye},"crossingComponents"),T=_(ce=>[ce.start,ce.end].filter(Ie=>!!Ie),"endpointIdsFor"),C=_(ce=>{const Ie=[];for(const ye of x(ce)){const pe=new Set(ye),Ae=new Set(ye.flatMap(ze=>T(ze))),Ve=[...ye];for(const ze of f)pe.has(ze)||T(ze).some(We=>Ae.has(We))&&Ve.push(ze);Ve.sort((ze,We)=>{var me,Se;return((me=p.get(ze))!=null?me:0)-((Se=p.get(We))!=null?Se:0)}),Ie.push(Ve)}return Ie},"pairSearchGroups"),S=_((ce,Ie,ye)=>w(ce,new Map([[Ie,ye]])),"crossingCountWithSingleReplacement"),E=_(ce=>{var ye,pe;const Ie=new Map;for(const Ae of ce.pairs)Ie.set(Ae.first,((ye=Ie.get(Ae.first))!=null?ye:0)+Ae.count),Ie.set(Ae.second,((pe=Ie.get(Ae.second))!=null?pe:0)+Ae.count);return Ie},"currentCrossingsByEdge"),k=_(ce=>ce.slice(1).reduce((Ie,ye,pe)=>{const Ae=ce[pe];return Ie+Math.abs(ye.x-Ae.x)+Math.abs(ye.y-Ae.y)},0),"pathLength"),A=_((ce=new Map)=>f.reduce((Ie,ye)=>Ie+Cc(m(ye,ce)),0),"totalBends"),I=_((ce=new Map)=>f.reduce((Ie,ye)=>Ie+k(m(ye,ce)),0),"totalLength"),L=_((ce,Ie,ye=new Map)=>{const pe=ln(Ie);for(const Ae of f)if(Ae!==ce){for(const Ve of pe)for(const ze of ln(m(Ae,ye)))if(Jh(Ve,ze,.5)>=Ds)return!0}return!1},"pathHasSegmentConflict"),R=_((ce,Ie)=>{const ye=[ce.start,ce.end].filter(pe=>!!pe);for(const pe of ln(Ie))if(Fi(pe.a,pe.b,u,ye,-2))return!0;return!1},"pathHitsNode"),O=_((ce,Ie)=>{const ye=ed(Dn(Ie));ln(ye).length===ye.length-1&&ce.push(ye)},"pushOrthogonalCandidate"),M=_(ce=>ce==="left"||ce==="right","sideIsHorizontal"),P=_((ce,Ie,ye)=>{switch(Ie){case"left":return Math.min(ce.x,ye.x)-20;case"right":return Math.max(ce.x,ye.x)+20;case"top":return Math.min(ce.y,ye.y)-20;case"bottom":return Math.max(ce.y,ye.y)+20}},"localTrackForSameSide"),z=_((ce,Ie,ye,pe)=>{const Ae=ye==="left"||ye==="top"?-1:1,Ve=[P(Ie,ye,pe),d[ye]];for(const ze of Ve)for(let We=0;We<=2;We++)O(ce,lq(Ie,ye,pe,ze+Ae*20*We))},"addSameSideCandidates"),D=_((ce,Ie,ye,pe,Ae)=>{for(const Ve of g(ye))for(const ze of g(Ae))O(ce,[Ie,{x:Ve,y:Ie.y},{x:Ve,y:ze},{x:pe.x,y:ze},pe])},"addHorizontalToVerticalCandidates"),B=_((ce,Ie,ye,pe,Ae)=>{for(const Ve of g(ye))for(const ze of g(Ae))O(ce,[Ie,{x:Ie.x,y:Ve},{x:ze,y:Ve},{x:ze,y:pe.y},pe])},"addVerticalToHorizontalCandidates"),W=_((ce,Ie,ye,pe,Ae)=>{const Ve=[...g("top"),...g("bottom")];for(const ze of g(ye))for(const We of g(Ae))for(const me of Ve)O(ce,[Ie,{x:ze,y:Ie.y},{x:ze,y:me},{x:We,y:me},{x:We,y:pe.y},pe])},"addHorizontalPairCandidates"),U=_((ce,Ie,ye,pe,Ae)=>{const Ve=[...g("left"),...g("right")];for(const ze of g(ye))for(const We of g(Ae))for(const me of Ve)O(ce,[Ie,{x:Ie.x,y:ze},{x:me,y:ze},{x:me,y:We},{x:pe.x,y:We},pe])},"addVerticalPairCandidates"),j=_(ce=>{const Ie=new Set;return ce.map(ye=>Dn(ye)).filter(ye=>{const pe=ye.map(Ae=>`${Ae.x.toFixed(3)},${Ae.y.toFixed(3)}`).join("|");return Ie.has(pe)||ye.length<2?!1:(Ie.add(pe),!0)})},"dedupeCandidatePaths"),V=_((ce,Ie,ye,pe)=>{const Ae=[],Ve=oq(ce,Ie,ye,pe,20,Nr);Ve&&O(Ae,Ve),Ie===pe&&z(Ae,ce,Ie,ye);const ze=M(Ie),We=M(pe);return ze&&!We?D(Ae,ce,Ie,ye,pe):!ze&&We?B(Ae,ce,Ie,ye,pe):ze?W(Ae,ce,Ie,ye,pe):U(Ae,ce,Ie,ye,pe),j(Ae)},"buildCandidatesForSides"),Y=_((ce,Ie,ye,pe)=>{const Ae=[...g("left"),...g("right")],Ve=[...g("top"),...g("bottom")];for(const ze of h){const We=Ym(pe,ze),me=ze==="top"||ze==="bottom"?g(ze):Ve;for(const Se of Ae){O(ce,[Ie,ye,{x:Se,y:ye.y},{x:Se,y:We.y},We]);for(const ne of me)O(ce,[Ie,ye,{x:Se,y:ye.y},{x:Se,y:ne},{x:We.x,y:ne},We])}}},"addVerticalDepartureOuterTrackCandidates"),H=_((ce,Ie,ye,pe)=>{const Ae=[...g("left"),...g("right")],Ve=[...g("top"),...g("bottom")];for(const ze of h){const We=Ym(pe,ze),me=ze==="left"||ze==="right"?g(ze):Ae;for(const Se of Ve){O(ce,[Ie,ye,{x:ye.x,y:Se},{x:We.x,y:Se},We]);for(const ne of me)O(ce,[Ie,ye,{x:ye.x,y:Se},{x:ne,y:Se},{x:ne,y:We.y},We])}}},"addHorizontalDepartureOuterTrackCandidates"),q=_(ce=>{var me;const Ie=ce.start,ye=ce.end,pe=ye?o.get(ye):void 0;if(!Ie||!pe)return[];const Ae=Dn((me=ce.points)!=null?me:[]);if(Ae.length<4)return[];const Ve=Ae[0],ze=Ae[1],We=[];return Ti(Ve,ze,Nr)?Y(We,Ve,ze,pe):wi(Ve,ze,Nr)&&H(We,Ve,ze,pe),We},"terminalPreservingOuterTrackCandidates"),Z=_(ce=>{const Ie=ce.start,ye=ce.end,pe=Ie?o.get(Ie):void 0,Ae=ye?o.get(ye):void 0;if(!pe||!Ae)return[];const Ve=[];for(const ze of h){const We=Ym(pe,ze);for(const me of h)Ve.push(...V(We,ze,Ym(Ae,me),me))}return Ve.push(...q(ce)),Ve},"candidatePathsFor"),K=_(()=>new Map(f.map(ce=>[ce,ln(m(ce))])),"currentSegmentsByEdge"),re=_((ce,Ie,ye)=>{var Ae;const pe=new Set;for(const Ve of f){if(Ve===ce)continue;const ze=(Ae=ye.get(Ve))!=null?Ae:ln(m(Ve));Ie.some(We=>ze.some(me=>Jh(We,me,.5)>=Ds))&&pe.add(Ve)}return pe},"sharedTrackConflictsFor"),Q=_((ce,Ie,ye,pe)=>{const Ae=new Set;return Z(ce).map(ze=>ed(Dn(ze))).filter(ze=>{if(R(ce,ze))return!1;const We=ze.map(me=>`${me.x.toFixed(3)},${me.y.toFixed(3)}`).join("|");return Ae.has(We)||ze.length<2?!1:(Ae.add(We),!0)}).map(ze=>{var Se,ne;const We=ln(ze);let me=0;for(const xe of f)xe!==ce&&(me+=y(We,(Se=ye.get(xe))!=null?Se:ln(m(xe))));return{candidate:ze,candidateSegments:We,crossings:Ie.count-((ne=pe.get(ce))!=null?ne:0)+me,bends:Cc(ze,Nr),totalBends:Cc(ze),length:k(ze)}}).filter(({crossings:ze})=>ze<=Ie.count).sort((ze,We)=>ze.crossings-We.crossings||ze.bends-We.bends||ze.length-We.length).slice(0,48).map(ze=>({path:ze.candidate,segments:ze.candidateSegments,sharedTrackConflicts:re(ce,ze.candidateSegments,ye),totalBends:ze.totalBends,length:ze.length}))},"pairCandidatesFor"),te=_((ce,Ie,ye,pe,Ae,Ve)=>{var me;let ze=0;for(const Se of ce.pairs)(Se.first===Ie||Se.second===Ie||Se.first===pe||Se.second===pe)&&(ze+=Se.count);let We=y(ye.segments,Ae.segments);for(const Se of f){if(Se===Ie||Se===pe)continue;const ne=(me=Ve.get(Se))!=null?me:ln(m(Se));We+=y(ye.segments,ne)+y(Ae.segments,ne)}return ce.count-ze+We},"pairCrossingCount"),ee=_((ce,Ie)=>{for(const ye of ce.sharedTrackConflicts)if(ye!==Ie)return!1;return!0},"conflictsOnlyWith"),J=_((ce,Ie)=>ce.segments.some(ye=>Ie.segments.some(pe=>Jh(ye,pe,.5)>=Ds)),"candidatesShareTrack"),ae=_((ce,Ie,ye,pe)=>ee(Ie,ye.edge)&&ee(pe,ce.edge)&&!J(Ie,pe),"pairCandidatesAreCompatible"),se=_((ce,Ie,ye,pe,Ae)=>{var ze,We,me,Se;const Ve=te(ce.current,Ie.edge,ye,pe.edge,Ae,ce.baseSegments);if(!(Ve>=ce.current.count))return{replacements:new Map([[Ie.edge,ye.path],[pe.edge,Ae.path]]),crossings:Ve,bends:ce.currentBends-((ze=ce.baseBendsByEdge.get(Ie.edge))!=null?ze:0)-((We=ce.baseBendsByEdge.get(pe.edge))!=null?We:0)+ye.totalBends+Ae.totalBends,length:ce.currentLength-((me=ce.baseLengthByEdge.get(Ie.edge))!=null?me:0)-((Se=ce.baseLengthByEdge.get(pe.edge))!=null?Se:0)+ye.length+Ae.length}},"scorePairReplacement"),fe=_((ce,Ie)=>ce.crossings<Ie.crossings||ce.crossings===Ie.crossings&&(ce.bends<Ie.bends||ce.bends===Ie.bends&&ce.length<Ie.length),"pairScoreIsBetter"),ve=_((ce,Ie,ye,pe)=>{let Ae=pe;for(const Ve of Ie.candidates)for(const ze of ye.candidates){if(!ae(Ie,Ve,ye,ze))continue;const We=se(ce,Ie,Ve,ye,ze);We&&fe(We,Ae)&&(Ae=We)}return Ae},"bestScoreForOptionPair"),de=_(ce=>{const Ie=A(),ye=I(),pe=K(),Ae=E(ce),Ve=new Map(f.map(xe=>[xe,Cc(m(xe))])),ze=new Map(f.map(xe=>[xe,k(m(xe))])),We=new Map,me=C(ce);for(const xe of me)for(const oe of xe){if(We.has(oe))continue;const _e=Q(oe,ce,pe,Ae);_e.length>0&&We.set(oe,{edge:oe,candidates:_e})}let Se={replacements:new Map,crossings:ce.count,bends:Ie,length:ye};const ne={current:ce,currentBends:Ie,currentLength:ye,baseBendsByEdge:Ve,baseLengthByEdge:ze,baseSegments:pe};for(const xe of me){const oe=new Set(xe.filter(ue=>ce.edgeSet.has(ue))),_e=xe.map(ue=>We.get(ue)).filter(ue=>!!ue);for(let ue=0;ue<_e.length;ue++){const tt=_e[ue];for(let Re=ue+1;Re<_e.length;Re++){const et=_e[Re];!oe.has(tt.edge)&&!oe.has(et.edge)||(Se=ve(ne,tt,et,Se))}}}return Se.replacements.size>0?Se.replacements:void 0},"bestPairedReplacement");for(let ce=0;ce<4;ce++){const Ie=b(),ye=Ie.count;if(ye===0)return;let pe,Ae,Ve=ye,ze=Number.POSITIVE_INFINITY;for(const me of Ie.edges){const Se=Cc(m(me),Nr);for(const ne of Z(me)){const xe=R(me,ne),oe=!xe&&L(me,ne),_e=S(Ie,me,ne),ue=Cc(ne,Nr);xe||oe||!(_e<ye||_e===ye&&ue<Se)||_e>Ve||_e===Ve&&ue>=ze||(pe=me,Ae=ne,Ve=_e,ze=ue)}}if(pe&&Ae){pe.points=Ae;continue}const We=de(Ie);if(!We)return;for(const[me,Se]of We)me.points=Se}}l(p3e,"resolveRenderedOrthogonalCrossings"),_(p3e,"resolveRenderedOrthogonalCrossings");var gp=.001,IHt=8;function g3e(t,e){var y,v,b;const{nodeInfoById:r,realNodeRects:n}=hI(e),a=["top","bottom","left","right"],i=20,s={top:Math.min(...n.map(w=>w.rect.top))-i,bottom:Math.max(...n.map(w=>w.rect.bottom))+i,left:Math.min(...n.map(w=>w.rect.left))-i,right:Math.max(...n.map(w=>w.rect.right))+i},o=_((w,x,T,C)=>{const S=[],E=oq(w,x,T,C,i,gp);return E&&S.push(E),x===C&&S.push(lq(w,x,T,s[x])),S},"buildOrthogonalPathCandidates"),u=_((w,x)=>{for(let T=0;T<w.length-1;T++){const C=w[T],S=w[T+1];if(Fi(C,S,n,x,1))return!0}return!1},"pathHitsNode"),h=_((w,x,T=!1)=>{let C=0;const S=yT(w,gp),E=x.start,k=x.end;for(const A of t){if(A===x||A.isLayoutOnly)continue;const I=A.start,L=A.end;if(!T&&E&&k&&(I===E||I===k||L===E||L===k))continue;const R=A.points;if(!(!R||R.length<2))for(const O of S)for(const M of yT(R,gp)){if(uq(O.a,O.b,M.a,M.b,gp,gp)){C++;continue}Jh(O,M,gp)>=IHt&&C++}}return C},"pathConflictCount"),d=4,f=_((w,x)=>{const T=Math.abs(w.y-x.rect.top),C=Math.abs(w.y-x.rect.bottom),S=Math.abs(w.x-x.rect.left),E=Math.abs(w.x-x.rect.right);let k="top",A=T;return C<A&&(k="bottom",A=C),S<A&&(k="left",A=S),E<A&&(k="right",A=E),k},"nearestSideOfRect"),p=new Map,g=_((w,x,T)=>{var S;const C=(S=p.get(w))!=null?S:[];C.push({side:x,edgeId:T}),p.set(w,C)},"addFaceClaim");for(const w of t){if(w.isLayoutOnly)continue;const x=(y=w.points)!=null?y:[];if(x.length<1)continue;const T=(v=w.id)!=null?v:"",C=w.start,S=w.end;if(C){const E=r.get(C);E&&g(C,f(x[0],E),T)}if(S){const E=r.get(S);E&&g(S,f(x[x.length-1],E),T)}}const m=_((w,x,T)=>{var C,S;return(S=(C=p.get(w))==null?void 0:C.some(E=>E.edgeId!==T&&E.side===x))!=null?S:!1},"faceIsClaimed");for(const w of t){if(w.isLayoutOnly)continue;const x=w.points;if(!x||x.length<2)continue;const T=Cc(x,gp);if(T<d)continue;const C=w.start,S=w.end;if(!C||!S)continue;const E=r.get(C),k=r.get(S);if(!E||!k)continue;const A=(b=w.id)!=null?b:"",I=h(x,w,!0),L=h(x,w);let R,O=I,M=T;for(const P of a){if(m(C,P,A))continue;const z=Ym(E,P);for(const D of a){if(m(S,D,A))continue;const B=Ym(k,D);for(const W of o(z,P,B,D)){if(u(W,[C,S]))continue;const U=Cc(W,gp);if(I>0){const j=h(W,w,!0);if(j>O||j===O&&U>=M)continue;O=j,M=U,R=W;continue}h(W,w)>L||U<M&&(M=U,R=W)}}}if(R){w.points=R;const P=p.get(C);P&&p.set(C,P.filter(D=>D.edgeId!==A));const z=p.get(S);z&&p.set(S,z.filter(D=>D.edgeId!==A)),g(C,f(R[0],E),A),g(S,f(R[R.length-1],k),A)}}}l(g3e,"simplifyDetouredEdges"),_(g3e,"simplifyDetouredEdges");var Gl=.001,m3e=10,bI=7;function Lq(t,e){const r=e?0:t.length-1,n=e?1:-1,a=t[r],i=t[r+n];if(!a||!i)return;const s=i.x-a.x,o=i.y-a.y;if(!(Math.abs(s)+Math.abs(o)<Gl)){if(Math.abs(o)<=Gl){const h=a.x+Math.sign(s)*m3e;return{left:Math.min(a.x,h),right:Math.max(a.x,h),top:a.y-bI,bottom:a.y+bI}}if(Math.abs(s)<=Gl){const h=a.y+Math.sign(o)*m3e;return{left:a.x-bI,right:a.x+bI,top:Math.min(a.y,h),bottom:Math.max(a.y,h)}}return{left:Math.min(a.x,i.x),right:Math.max(a.x,i.x),top:Math.min(a.y,i.y),bottom:Math.max(a.y,i.y)}}}l(Lq,"markerClearanceRectFor"),_(Lq,"markerClearanceRectFor");function y3e(t){return{left:Math.min(t.left,t.right),right:Math.max(t.left,t.right),top:Math.min(t.top,t.bottom),bottom:Math.max(t.top,t.bottom)}}l(y3e,"normalizeRect"),_(y3e,"normalizeRect");function $q(t,e){const r=Dn(e),n=Lq(r,!0),a=Lq(r,!1);return[n,a].some(i=>i&&uI(t,y3e(i)))}l($q,"labelOverlapsOwnMarker"),_($q,"labelOverlapsOwnMarker");function xI(t,e){var m,y,v,b,w,x;const r=[];for(const T of t){if(T.isLayoutOnly)continue;const C=T.points;if(!(!C||C.length<2))for(let S=0;S<C.length-1;S++)r.push({edgeId:T.id,p1:C[S],p2:C[S+1]})}const n=[],a=[];for(const T of e.values()){const C=T.isGroup,S=T.parentId;if(C&&!S){const k=Vl(T);k&&a.push({id:T.id,rect:k});continue}if(C||T.isEdgeLabel)continue;const E=Vl(T);E&&n.push({nodeId:T.id,rect:E})}const i=3,s=1,o=12,u=_((T,C)=>{const S=sq(C,i);for(const{nodeId:E,rect:k}of n)if(E!==T&&uI(S,k))return!0;return!1},"labelOverlapsForeignNode"),h=_((T,C)=>{const S=sq(C,i);for(const E of r)if(E.edgeId!==T&&cI(E.p1,E.p2,S))return!0;return!1},"labelOverlapsForeignEdge"),d=_((T,C,S)=>u(T,S)||h(C,S),"labelOverlapsAnything"),f=[],p=_(T=>{for(const{id:C,rect:S}of a)if(V4e(S,T))return C},"findContainingLane"),g=_((T,C)=>f.some(S=>S.labelId!==T&&uI(C,S.rect)),"overlapsPlacedLabel");for(const T of t){if(T.isLayoutOnly)continue;const C=T.labelNodeId;if(!C)continue;const S=e.get(C);if(!S)continue;const E=T.points;if(!E||E.length<2)continue;const k=(m=S.width)!=null?m:0,A=(y=S.height)!=null?y:0;if(k<=0||A<=0)continue;const I=[];for(let K=0;K<E.length-1;K++){const re=E[K],Q=E[K+1],te=Math.abs(re.x-Q.x),ee=Math.abs(re.y-Q.y);te<Gl&&ee<Gl||te>=Gl&&ee>=Gl||I.push({idx:K,length:te+ee,orientation:te>=Gl?"horizontal":"vertical",midX:(re.x+Q.x)/2,midY:(re.y+Q.y)/2})}if(I.length===0)continue;const L=I.length>=3?I.filter(K=>K.idx>0&&K.idx<I.length-1):I,R=L.length>0?L:I,O=k>=A?"horizontal":"vertical",M=_(K=>[...K].sort((re,Q)=>{const te=re.orientation===O,ee=Q.orientation===O;if(te!==ee)return te?-1:1;const J=re.length>=(re.orientation==="horizontal"?k:A)+2,ae=Q.length>=(Q.orientation==="horizontal"?k:A)+2;return J!==ae?J?-1:1:Q.length-re.length}),"rankSegments"),P=I[0],z=I[I.length-1],D=[.5,.25,.75,.05,.95,.15,.85,.1,.9],B=_((K,re)=>{const Q=E[K.idx],te=E[K.idx+1];return{midX:Q.x+(te.x-Q.x)*re,midY:Q.y+(te.y-Q.y)*re}},"anchorAtT"),W=_((K,re,Q)=>Math.min(Q,Math.max(re,K)),"clamp"),U=_((K,re)=>K.midX>=re.left-Gl&&K.midX<=re.right+Gl&&K.midY>=re.top-Gl&&K.midY<=re.bottom+Gl,"pointInsideRectInclusive"),j=_(K=>{const re=vT(K.midX,K.midY,k,A),Q=p(re);if(Q)return{laneId:Q,anchor:K,rect:re};const te=a.find(({rect:de})=>U(K,de));if(!te)return;const ee=te.rect.left+k/2+s,J=te.rect.right-k/2-s,ae=te.rect.top+A/2+s,se=te.rect.bottom-A/2-s;if(ee>J||ae>se)return;const fe={midX:W(K.midX,ee,J),midY:W(K.midY,ae,se)},ve=vT(fe.midX,fe.midY,k,A);return U(K,ve)?{laneId:te.id,anchor:fe,rect:ve}:void 0},"placementForAnchor"),V=_((K,re,Q)=>K.orientation==="horizontal"?Math.abs(re.midX-Q.x):Math.abs(re.midY-Q.y),"distanceAlongSegment"),Y=_((K,re)=>{const te=(K.orientation==="horizontal"?k/2:A/2)+o;if(K===P){const ee=E[K.idx];if(V(K,re,ee)+Gl<te)return!1}if(K===z){const ee=E[K.idx+1];if(V(K,re,ee)+Gl<te)return!1}return!0},"labelClearsTerminalEndpoints"),H=_(K=>{const re=M(K);for(const Q of re)for(const te of D){const ee=B(Q,te);if(!Y(Q,ee))continue;const J=j(ee);if(J&&!$q(J.rect,E)&&!g(C,J.rect)&&!d(C,T.id,J.rect))return{laneId:J.laneId,anchor:J.anchor}}},"tryPool"),q=_((K,re,Q=!1)=>{const te=M(K);for(const ee of te){const J={midX:ee.midX,midY:ee.midY};if(re&&!Y(ee,J))continue;const ae=j(J);if(ae&&!$q(ae.rect,E)&&!g(C,ae.rect)&&!u(C,ae.rect)&&(Q||!h(T.id,ae.rect)))return{laneId:ae.laneId,anchor:ae.anchor}}},"findLaneContainingFallback"),Z=(x=(w=(b=(v=H(R))!=null?v:R.length<I.length?H(I):void 0)!=null?b:q(I,!0))!=null?w:q(I,!1))!=null?x:q(I,!1,!0);if(Z){S.x=Z.anchor.midX,S.y=Z.anchor.midY,S.parentId=Z.laneId;const K=vT(Z.anchor.midX,Z.anchor.midY,k,A),re=f.findIndex(Q=>Q.labelId===C);re>=0?f[re]={labelId:C,rect:K}:f.push({labelId:C,rect:K})}}}l(xI,"anchorLabelsToPolyline"),_(xI,"anchorLabelsToPolyline");var Mq=1e-6,LHt=8,v3e=LHt/2,$Ht=3;function Pq(t,e){return t<e?`${t}::${e}`:`${e}::${t}`}l(Pq,"pairKey"),_(Pq,"pairKey");function b3e(t,e){var s,o;const{nodeInfoById:r,realNodeRects:n}=hI(e),a=new Map;for(const u of e){const h=u.id;if(!u.isGroup&&u.isEdgeLabel){a.set(h,{w:(s=u.width)!=null?s:0,h:(o=u.height)!=null?o:0});continue}}const i=_((u,h,d,f)=>{const p=Pq(h,d);let g=0;const m=_(y=>{if(!y)return;const v=a.get(y);if(!v)return;const b=f==="x"?v.w/2:v.h/2;b>g&&(g=b)},"consider");m(u.labelNodeId);for(const y of t){if(y===u||y.isLayoutOnly)continue;const v=y.start,b=y.end;!v||!b||Pq(v,b)===p&&m(y.labelNodeId)}return g>0?g+$Ht:0},"labelClearanceFor");for(const u of t){if(u.isLayoutOnly)continue;const h=u.points;if(!aq(h,Mq))continue;const d=cq(u,r,Mq);if(!d)continue;const{srcId:f,dstId:p,srcInfo:g,dstInfo:m,collinearX:y,collinearY:v}=d;if(y===v)continue;let b,w;if(y){const E=m.cy>g.cy;b={x:g.cx,y:E?g.rect.bottom:g.rect.top},w={x:m.cx,y:E?m.rect.top:m.rect.bottom}}else{const E=m.cx>g.cx;b={x:E?g.rect.right:g.rect.left,y:g.cy},w={x:E?m.rect.left:m.rect.right,y:m.cy}}if(Fi(b,w,n,[f,p],1))continue;const T=i(u,f,p,y?"x":"y"),C=T>v3e?T:v3e,S=[0,C,-C];for(const E of S){const k=X({},b),A=X({},w);if(y){if(k.x+=E,A.x+=E,k.x<=g.rect.left||k.x>=g.rect.right||A.x<=m.rect.left||A.x>=m.rect.right)continue}else if(k.y+=E,A.y+=E,k.y<=g.rect.top||k.y>=g.rect.bottom||A.y<=m.rect.top||A.y>=m.rect.bottom)continue;if(!Fi(k,A,n,[f,p],1)&&!dI(k,A,t,u,{epsilon:Mq})){u.points=[k,A];break}}}}l(b3e,"straightenCollinearSiblingDetours"),_(b3e,"straightenCollinearSiblingDetours");function Rq(t,e){const{realNodeRects:u,labelNodeRects:h}=pp(e.values()),d=_((C,S)=>yT(S,.001).map(E=>Ne(X({},E),{edge:C,interior:E.index>=1&&E.index<=S.length-3})),"segmentsFor"),f=_(()=>{const C=[];for(const S of t){if(S.isLayoutOnly)continue;const E=S.points;!E||E.length<2||C.push(...d(S,Dn(E)))}return C},"allSegments"),p=_((C,S)=>C.horizontal&&S.horizontal?il(C.a.x,C.b.x,S.a.x,S.b.x)>=8&&Math.abs(C.a.y-S.a.y)<7:C.vertical&&S.vertical?il(C.a.y,C.b.y,S.a.y,S.b.y)>=8&&Math.abs(C.a.x-S.a.x)<7:!1,"hasCrowdedParallelTrack"),g=_((C,S)=>{const E=C.start,k=C.end,A=d(C,S);if(A.length!==S.length-1)return!1;const I=[E,k].filter(R=>!!R),L=C.labelNodeId?[C.labelNodeId]:[];for(const R of A)if(Fi(R.a,R.b,u,I,-2)||Fi(R.a,R.b,h,L,-2))return!1;for(const R of t){if(R===C||R.isLayoutOnly)continue;const O=R.points;if(!(!O||O.length<2)){for(const M of A)for(const P of d(R,Dn(O)))if(p(M,P)||Sf(M.a,M.b,P.a,P.b,.001))return!1}}return!0},"candidateIsSafe"),m=_((C,S)=>{var A;const E=Dn((A=C.edge.points)!=null?A:[]);if(E.length<4||C.index>=E.length-1)return;const k=E.map(I=>X({},I));if(C.horizontal)k[C.index].y+=S,k[C.index+1].y+=S;else if(C.vertical)k[C.index].x+=S,k[C.index+1].x+=S;else return;return d(C.edge,k).length===k.length-1?k:void 0},"shiftedCandidate"),y=_((C,S)=>{var E,k;return{x:(E=C.x)!=null?E:(S.left+S.right)/2,y:(k=C.y)!=null?k:(S.top+S.bottom)/2}},"nodeCenter"),v=_(C=>{var O;const S=C.edge,E=Dn((O=S.points)!=null?O:[]);if(E.length!==4||C.index!==1)return;const k=S.start?e.get(S.start):void 0,A=S.end?e.get(S.end):void 0,I=k?Vl(k):void 0,L=A?Vl(A):void 0,R=E.slice(C.index+2);if(!(!k||!A||!I||!L||R.length===0))return{sourceCenter:y(k,I),targetCenter:y(A,L),sourceRect:I,tail:R}},"sourceDetourContextFor"),b=_((C,S,E,k,A,I)=>{const L=k.y>=E.y,R=L?A.bottom:A.top,O=R+(L?20:-20);if(L&&C.b.y<=O+.001||!L&&C.b.y>=O-.001)return;const M=C.a.x+S;return Dn([{x:E.x,y:R},{x:E.x,y:O},{x:M,y:O},{x:M,y:C.b.y},...I],.001)},"verticalSourceDetour"),w=_((C,S,E,k,A,I)=>{const L=k.x>=E.x,R=L?A.right:A.left,O=R+(L?20:-20);if(L&&C.b.x<=O+.001||!L&&C.b.x>=O-.001)return;const M=C.a.y+S;return Dn([{x:R,y:E.y},{x:O,y:E.y},{x:O,y:M},{x:C.b.x,y:M},...I],.001)},"horizontalSourceDetour"),x=_((C,S)=>{const E=v(C);if(E){if(C.vertical)return b(C,S,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail);if(C.horizontal)return w(C,S,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail)}},"sourceDetourCandidate"),T=[-7,7,-2*7,2*7,-3*7,3*7];for(let C=0;C<12;C++){const S=f();let E=!1;for(let k=0;k<S.length&&!E;k++)for(let A=k+1;A<S.length&&!E;A++){const I=S[k],L=S[A];if(I.edge===L.edge||!p(I,L))continue;const R=[I,L].filter(O=>O.interior);for(const O of R){for(const M of T){const P=m(O,M);if(P&&g(O.edge,P)){O.edge.points=P,E=!0;break}const z=x(O,M);if(z&&g(O.edge,z)){O.edge.points=z,E=!0;break}}if(E)break}}if(!E)return}}l(Rq,"nudgeSharedInteriorSubpaths"),_(Rq,"nudgeSharedInteriorSubpaths");function x3e(t,e,r,n){const a=e.x-t.x,i=e.y-t.y,s=n.x-r.x,o=n.y-r.y,u=a*o-i*s;if(Math.abs(u)<1e-10)return!1;const h=r.x-t.x,d=r.y-t.y,f=(h*o-d*s)/u,p=(h*i-d*a)/u,g=.01;return f>g&&f<1-g&&p>g&&p<1-g}l(x3e,"segmentsIntersect"),_(x3e,"segmentsIntersect");function w3e(t){var o,u,h;const e=(o=t.nodes)!=null?o:[],r=(u=t.edges)!=null?u:[],n=[];if(!r.length||!e.length)return n;const a=G4e(e),i=[];for(const d of r){if(d.isLayoutOnly)continue;const f=d.points;if(!f||f.length<2)continue;const p=d.start,g=d.end,m=d.labelNodeId,y=(h=d.id)!=null?h:`${p}->${g}`;for(const v of a)if(!(v.nodeId===p||v.nodeId===g)&&!(m&&v.nodeId===m)){for(let b=0;b<f.length-1;b++)if(cI(f[b],f[b+1],v,-1)){n.push({type:"edge-node-overlap",edgeId:y,targetId:v.nodeId,detail:`segment ${b} passes through node "${v.nodeId}"`});break}}for(let v=0;v<f.length-1;v++)i.push({edgeId:y,start:p,end:g,p1:f[v],p2:f[v+1]})}const s=new Set;for(let d=0;d<i.length;d++)for(let f=d+1;f<i.length;f++){const p=i[d],g=i[f];if(p.edgeId!==g.edgeId&&!(p.start===g.start||p.start===g.end||p.end===g.start||p.end===g.end)&&x3e(p.p1,p.p2,g.p1,g.p2)){const m=p.edgeId<g.edgeId?`${p.edgeId}|${g.edgeId}`:`${g.edgeId}|${p.edgeId}`;s.has(m)||(s.add(m),n.push({type:"edge-edge-crossing",edgeId:p.edgeId,targetId:g.edgeId,detail:`edges "${p.edgeId}" and "${g.edgeId}" cross`}))}}if(n.length>0){const d=n.filter(p=>p.type==="edge-node-overlap").length,f=n.filter(p=>p.type==="edge-edge-crossing").length;Le.warn(`[SWIMLANE_VALIDATE] ${n.length} issue(s) detected: ${d} edge-node overlap(s), ${f} edge crossing(s)`);for(const p of n)Le.warn(`[SWIMLANE_VALIDATE] ${p.type}: ${p.detail}`)}return n}l(w3e,"validateSwimlanesLayout"),_(w3e,"validateSwimlanesLayout");function T3e(t,e){var o,u;const r=(o=t.nodes)!=null?o:[],n=(u=t.edges)!=null?u:[],a=r.filter(h=>!h.isGroup);if((e==="LR"||e==="RL")&&a.length>0&&!s3e(t,e)||e==="BT"&&a.length>0&&!i3e(t))return;for(const h of n){if(h.isLayoutOnly)continue;const d=h.points;!d||d.length<2||(h.points=ed(fI(d)))}g3e(n,r),b3e(n,r),o3e(n,r);const i=new Map;for(const h of r)i.set(String(h.id),h);xI(n,i),X4e(n,i),l3e(n,i),Rq(n,i),c3e(n,i),u3e(n,i),Aq(n,i),h3e(n,i);const s=_(()=>{p3e(n,i),d3e(n,i),f3e(n,i),xI(n,i),Eq(n,i),Aq(n,i),xI(n,i),Eq(n,i)},"finalizeRenderedEdges");s(),Rq(n,i),s(),Nq(n,i),Iq(n,i),Nq(n,i),Iq(n,i)}l(T3e,"postProcessSwimlaneLayout"),_(T3e,"postProcessSwimlaneLayout");function mp(t){const e=new Map(t.nodeById),r=new Set,n=[];for(const i of t.edges){if(!e.has(i.src)||!e.has(i.dst))continue;const s=`${i.id}:${i.src}->${i.dst}`;r.has(s)||(r.add(s),n.push(i))}return{nodes:[...e.keys()],edges:n,layout:t.layout,nodeById:e}}l(mp,"normalizeGraph"),_(mp,"normalizeGraph");function Oq(t,e){return t.edges.filter(r=>r.dst===e)}l(Oq,"incoming"),_(Oq,"incoming");function E3e(t){const e=new Map;for(const r of t.nodes)e.set(r,[]);for(const r of t.edges)e.get(r.src).push(r.dst);return e}l(E3e,"buildSuccessorMap"),_(E3e,"buildSuccessorMap");function Dq(t){const e=E3e(t);for(const r of e.values())r.sort((n,a)=>n.localeCompare(a));return e}l(Dq,"buildSortedSuccessorMap"),_(Dq,"buildSortedSuccessorMap");function Fq(t){var r;const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,((r=e.get(n.dst))!=null?r:0)+1);return e}l(Fq,"buildInDegreeMap"),_(Fq,"buildInDegreeMap");function Bq(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,r)=>e.localeCompare(r))}l(Bq,"sortedZeroInDegreeNodes"),_(Bq,"sortedZeroInDegreeNodes");function wI(t,e=()=>!0){const r=new Map,n=new Map;for(const a of t.nodes)r.set(a,[]),n.set(a,[]);for(const a of t.edges)e(a)&&(n.get(a.src).push(a.dst),r.get(a.dst).push(a.src));return{preds:r,succs:n}}l(wI,"buildPredecessorSuccessorMaps"),_(wI,"buildPredecessorSuccessorMaps");function zq(t,e,r,n){var s,o,u,h;let a=0;for(const d of t.nodes)n!=null&&n.skipGroups&&((s=t.nodeById.get(d))!=null&&s.isGroup)||(a=Math.max(a,(o=r[d])!=null?o:0));const i=Array.from({length:a+1},()=>[]);for(const d of e)n!=null&&n.skipGroups&&((u=t.nodeById.get(d))!=null&&u.isGroup)||i[Math.max(0,(h=r[d])!=null?h:0)].push(d);return i}l(zq,"buildLayersFromRanks"),_(zq,"buildLayersFromRanks");function e5(t){var i,s,o;const e=Fq(t),r=Bq(e),n=[],a=Dq(t);for(;r.length;){const u=r.shift();n.push(u);for(const h of(i=a.get(u))!=null?i:[])if(e.set(h,((s=e.get(h))!=null?s:0)-1),((o=e.get(h))!=null?o:0)===0){let d=0;for(;d<r.length&&r[d]<h;)d++;r.splice(d,0,h)}}return n.length===t.nodes.length?n:null}l(e5,"topoSortIfAcyclic"),_(e5,"topoSortIfAcyclic");function bT(t){const e=new Map;let r=0;for(const n of t)e.set(n,r),r++;return e}l(bT,"buildLayerIndex"),_(bT,"buildLayerIndex");function Hq(t){const e=new Array(t.length),r=_((n,a)=>{if(a-n<=1)return 0;const i=n+a>>1;let s=r(n,i)+r(i,a),o=n,u=i,h=n;for(;o<i||u<a;)u>=a||o<i&&t[o]<=t[u]?e[h++]=t[o++]:(e[h++]=t[u++],s+=i-o);for(let d=n;d<a;d++)t[d]=e[d];return s},"count");return r(0,t.length)}l(Hq,"countInversions"),_(Hq,"countInversions");function C3e(t){const e=mp(t),r=new Map;for(const d of e.nodes)r.set(d,[]);for(const d of e.edges)r.get(d.src).push(d);for(const d of r.values())d.sort((f,p)=>f.dst===p.dst?f.id.localeCompare(p.id):f.dst.localeCompare(p.dst));const n=Object.create(null);for(const d of e.nodes)n[d]=0;const a=[],i=_(d=>{var f;n[d]=1;for(const p of(f=r.get(d))!=null?f:[]){const g=p.dst;n[g]===0?i(g):n[g]===1&&a.push(p)}n[d]=2},"dfs"),s=[...e.nodes].sort((d,f)=>d.localeCompare(f));for(const d of s)n[d]===0&&i(d);const o=new Set(a.map(d=>`${d.id}:${d.src}->${d.dst}`)),u=e.edges.map(d=>o.has(`${d.id}:${d.src}->${d.dst}`)?{id:d.id,src:d.dst,dst:d.src,weight:d.weight,ref:d.ref}:d);return{acyclic:{nodes:[...e.nodes],edges:u,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:a}}l(C3e,"removeCycles_DFS"),_(C3e,"removeCycles_DFS");function S3e(t){const e=new Map,r=_(n=>{if(e.has(n))return e.get(n);const a=t.nodeById.get(n);if(!a)return e.set(n,null),null;const i=a.parentId;if(!i)return e.set(n,null),null;const s=r(i),o=s!=null?s:i;return e.set(n,o),o},"resolve");for(const n of t.nodes)r(n);return e}l(S3e,"buildTopLaneMap"),_(S3e,"buildTopLaneMap");function _f(t){const e=S3e(t);return r=>{var n;return(n=e.get(r))!=null?n:null}}l(_f,"createTopLaneResolver"),_(_f,"createTopLaneResolver");function TI(t){var r;const e=[];for(const n of(r=t.layout.nodes)!=null?r:[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}l(TI,"buildTopLaneOrder"),_(TI,"buildTopLaneOrder");function Wq(t,e){const r=TI(t);if(!e||e.length===0)return r;const n=new Set(r),a=new Set,i=[];for(const s of e)!n.has(s)||a.has(s)||(a.add(s),i.push(s));for(const s of r)a.has(s)||i.push(s);return i}l(Wq,"resolveTopLaneOrder"),_(Wq,"resolveTopLaneOrder");var MHt={EPSILON:1e-6},EI={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},_3e={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function k3e(t,e){var C,S,E,k;const r=mp(t),n=(C=e==null?void 0:e.laneOf)!=null?C:()=>null,a=e==null?void 0:e.rankHint,{preds:i}=wI(r);for(const A of i.values())A.sort((I,L)=>I.localeCompare(L));const s=(S=e5(r))!=null?S:[...r.nodes].sort((A,I)=>A.localeCompare(I)),o=new Map;for(const[A,I]of s.entries())o.set(I,A);const u=new Map,h=new Map;for(const A of r.nodes)h.set(A,[]);for(const A of s){const I=((E=i.get(A))!=null?E:[]).filter(L=>u.has(L));if(I.length>0){const L=A3e(A,I,{laneOf:n,rankHint:a,topoIndex:o});u.set(A,L),h.get(L).push(A)}else u.has(A)||u.set(A,null)}for(const A of r.nodes)u.has(A)||u.set(A,null);const d=new Set;for(const A of r.nodes)((k=u.get(A))!=null?k:null)===null&&d.add(A);const f=[...d].sort((A,I)=>{var O,M;const L=(O=o.get(A))!=null?O:0,R=(M=o.get(I))!=null?M:0;return L===R?A.localeCompare(I):L-R}),p=N3e(r),g=new Map;for(const[A,I]of p.entries())g.set(A,[...I].sort((L,R)=>L.localeCompare(R)));const m=I3e(g),y=L3e(g),v=new Map;for(const A of r.nodes)v.set(A,[]);for(const A of y)for(const I of A.nodes){const L=v.get(I);L?L.push(A.id):v.set(I,[A.id])}const b=[],w=[],x=new Set,T=_(A=>{var I;if(!x.has(A)){x.add(A),b.push(A);for(const L of(I=h.get(A))!=null?I:[])T(L);w.push(A)}},"walk");for(const A of f)T(A);for(const A of s)T(A);return{parent:u,children:h,roots:f,componentOf:m,blocks:y,nodeBlocks:v,adjacency:g,preorder:b,postorder:w,topologicalOrder:s}}l(k3e,"buildDrivingTree"),_(k3e,"buildDrivingTree");function A3e(t,e,r){const n=r.laneOf(t);return[...e].sort((i,s)=>{var y,v,b,w;const o=r.laneOf(i),u=r.laneOf(s),h=o!=null&&o===n,d=u!=null&&u===n;if(h!==d)return h?-1:1;const f=(y=r.rankHint)==null?void 0:y[i],p=(v=r.rankHint)==null?void 0:v[s];if(f!=null&&p!=null&&f!==p)return p-f;const g=(b=r.topoIndex.get(i))!=null?b:0,m=(w=r.topoIndex.get(s))!=null?w:0;return g!==m?g-m:i.localeCompare(s)})[0]}l(A3e,"chooseParent"),_(A3e,"chooseParent");function N3e(t){const e=new Map;for(const r of t.nodes)e.set(r,new Set);for(const r of t.edges)e.get(r.src).add(r.dst),e.get(r.dst).add(r.src);return e}l(N3e,"buildAdjacency"),_(N3e,"buildAdjacency");function I3e(t){var n;const e=new Map;let r=0;for(const a of t.keys()){if(e.has(a))continue;const i=[a];for(;i.length>0;){const s=i.pop();if(!e.has(s)){e.set(s,r);for(const o of(n=t.get(s))!=null?n:[])e.has(o)||i.push(o)}}r++}return e}l(I3e,"assignComponents"),_(I3e,"assignComponents");function L3e(t){const e=new Map,r=new Map,n=[],a=[];let i=0;const s=_((o,u)=>{var h,d,f,p,g,m,y,v,b;e.set(o,++i),r.set(o,i);for(const w of(h=t.get(o))!=null?h:[])w!==u&&(e.has(w)?((m=e.get(w))!=null?m:0)<((y=e.get(o))!=null?y:0)&&(n.push([o,w]),r.set(o,Math.min((v=r.get(o))!=null?v:i,(b=e.get(w))!=null?b:i))):(n.push([o,w]),s(w,o),r.set(o,Math.min((d=r.get(o))!=null?d:i,(f=r.get(w))!=null?f:i)),((p=r.get(w))!=null?p:0)>=((g=e.get(o))!=null?g:0)&&a.push($3e(o,w,n,a.length))))},"visit");for(const o of t.keys())e.has(o)||s(o,null);return a}l(L3e,"computeBlocks"),_(L3e,"computeBlocks");function $3e(t,e,r,n){const a=[],i=new Set;for(;r.length>0;){const s=r.pop();if(a.push(s),i.add(s[0]),i.add(s[1]),s[0]===t&&s[1]===e||s[0]===e&&s[1]===t)break}return{id:n,edges:a,nodes:[...i]}}l($3e,"popBlock"),_($3e,"popBlock");function M3e(t,e,r){var w,x,T;const n=[...t.nodes],a=new Map;for(const[C,S]of n.entries())a.set(S,C);const i=n.length,s=new Array(i).fill(-1),o=new Array(i).fill(0),u=[],h=new Set;for(const C of n){const S=(w=r.parent.get(C))!=null?w:null,E=a.get(C);E!=null&&S==null&&(s[E]=-1,o[E]=0,h.has(C)||(h.add(C),u.push(C)))}for(;u.length>0;){const C=u.shift(),S=a.get(C);if(S==null)continue;const E=(x=r.children.get(C))!=null?x:[];for(const k of E){if(h.has(k))continue;const A=a.get(k);A!=null&&(s[A]=S,o[A]=o[S]+1,h.add(k),u.push(k))}}for(const C of n){if(h.has(C))continue;const S=a.get(C);S!=null&&(s[S]=-1,o[S]=0,h.add(C))}const d=Math.max(1,Math.ceil(Math.log2(Math.max(1,i)))+1),f=Array.from({length:d},()=>new Array(i).fill(-1));for(let C=0;C<i;C++)f[0][C]=s[C];for(let C=1;C<d;C++)for(let S=0;S<i;S++){const E=f[C-1][S];f[C][S]=E===-1?-1:f[C-1][E]}const p=_((C,S)=>{if(C===-1||S===-1)return-1;o[C]<o[S]&&([C,S]=[S,C]);const E=o[C]-o[S];for(let k=0;k<d;k++)if(E>>k&1&&(C=f[k][C],C===-1))return-1;if(C===S)return C;for(let k=d-1;k>=0;k--){const A=f[k][C],I=f[k][S];A===-1||I===-1||A!==I&&(C=A,S=I)}return f[0][C]},"lcaIndex"),g=Array.from({length:i},()=>new Map);for(const C of t.edges){let S=C.src,E=C.dst,k=e[S],A=e[E];if(k==null||A==null||(k>A&&([S,E]=[E,S],[k,A]=[A,k]),k==null||A==null||k===A))continue;const I=a.get(S),L=a.get(E);if(I==null||L==null)continue;const R=p(I,L);if(R===-1)continue;const O=g[R];for(let M=k;M<A;M++)O.set(M,((T=O.get(M))!=null?T:0)+1)}const m=new Map,y=_((C,S)=>{var E;if(S.size!==0)for(const[k,A]of S)C.set(k,((E=C.get(k))!=null?E:0)+A)},"mergeInto"),v=new Set,b=_(C=>{var I,L;const S=a.get(C);v.add(C);const E=S==null?void 0:g[S],k=E?new Map(E):new Map,A=(I=r.children.get(C))!=null?I:[];for(const R of A){const O=b(R),M=e[C];if(M!=null){let P=m.get(C);P||(P=new Map,m.set(C,P));let z=(L=O.get(M))!=null?L:0;const D=e[R];D!=null&&D>M&&(z+=1),P.set(R,z)}y(k,O)}return k},"dfs");for(const C of r.roots)v.has(C)||b(C);for(const C of n)v.has(C)||b(C);return m}l(M3e,"computeSubtreeCrossCounts"),_(M3e,"computeSubtreeCrossCounts");function P3e(t,e,r){const n=new Map,a=_(i=>{var u,h;let s=(u=r[i])!=null?u:0;const o=[...(h=e.get(i))!=null?h:[]];o.sort(Vq(r));for(const d of o){a(d);const f=n.get(d);f!=null&&(s=Math.min(s,f))}n.set(i,s)},"annotate");for(const i of t)a(i);return n}l(P3e,"annotateMinimumLayers"),_(P3e,"annotateMinimumLayers");function Vq(t){return(e,r)=>{var i,s;const n=(i=t[e])!=null?i:0,a=(s=t[r])!=null?s:0;return n===a?e.localeCompare(r):n-a}}l(Vq,"compareByRankThenId"),_(Vq,"compareByRankThenId");function R3e(t,e,r,n){var u,h;let a=0;for(const d of e){const f=(u=r[d])!=null?u:0;f>a&&(a=f)}const i=Array.from({length:a+1},()=>[]),s=new Set,o=_(d=>{var p;if(s.has(d))return;s.add(d);const f=(p=r[d])!=null?p:0;i[f]||(i[f]=[]),i[f].push(d);for(const g of n(d))o(g)},"emit");for(const d of t)o(d);for(const d of e)if(!s.has(d)){const f=(h=r[d])!=null?h:0;i[f]||(i[f]=[]),i[f].push(d),s.add(d)}return i}l(R3e,"emitNodesInTreeOrder"),_(R3e,"emitNodesInTreeOrder");function O3e(t){const e=[];for(const r of t){const n=new Set,a=[];for(const i of r)n.has(i)||(n.add(i),a.push(i));e.push(a)}return e}l(O3e,"deduplicateLayers"),_(O3e,"deduplicateLayers");function D3e(t,e,r,n){return a=>{var d,f,p;const i=(d=t.get(a))!=null?d:[];if(i.length===0)return[];const s=(f=e[a])!=null?f:0,o=[],u=[],h=r.get(a);for(const g of i){const m=(p=n.get(g))!=null?p:s;m>s?o.push({child:g,min:m}):u.push(g)}return o.sort((g,m)=>g.min===m.min?g.child.localeCompare(m.child):g.min-m.min),u.sort((g,m)=>{var x,T,C,S;const y=(x=h==null?void 0:h.get(g))!=null?x:0,v=(T=h==null?void 0:h.get(m))!=null?T:0;if(y!==v)return y-v;const b=(C=n.get(g))!=null?C:s,w=(S=n.get(m))!=null?S:s;return b!==w?b-w:g.localeCompare(m)}),[...o.map(g=>g.child),...u]}}l(D3e,"createChildOrderer"),_(D3e,"createChildOrderer");function CI(t,e,r){const n=k3e(t,{rankHint:e,laneOf:r}),{children:a,roots:i}=n;for(const f of t.nodes)a.has(f)||a.set(f,[]);const s=M3e(t,e,n),o=[...i].sort(Vq(e)),u=P3e(o,a,e),h=D3e(a,e,s,u);let d=R3e(o,t.nodes,e,h);return d=O3e(d),d}l(CI,"buildMultitreeLayerOrder"),_(CI,"buildMultitreeLayerOrder");function F3e(t,e,r){const n=new Set(t),a=new Set(e),i=bT(e),s=[];for(const o of r)n.has(o.src)&&a.has(o.dst)&&s.push(i.get(o.dst));return Hq(s)}l(F3e,"countCrossingsBetweenAdjacent"),_(F3e,"countCrossingsBetweenAdjacent");function Gq(t,e,r){const n=[];for(const i of e){const s=r[i.src],o=r[i.dst];if(s==null||o==null||s===o)continue;let u=i.src,h=i.dst,d=s,f=o;s>o&&(u=i.dst,h=i.src,d=o,f=s);for(let p=d;p<f;p++)n.push({id:`${i.id}@${p}`,src:u,dst:h,ref:i.ref})}let a=0;for(let i=0;i+1<t.length;i++)a+=F3e(t[i],t[i+1],n);return a}l(Gq,"totalCrossings"),_(Gq,"totalCrossings");function B3e(t,e){var u,h,d;const r=X({},e),{preds:n}=wI(t),a=_f(t),i=CI(t,r,a);let s=Gq(i,t.edges,r);const o=EI.MAX_CROSSING_OPTIMIZATION_PASSES;for(let f=0;f<o;f++){let p=!1;const g=[...t.nodes].sort((m,y)=>{var v,b;return((v=r[y])!=null?v:0)-((b=r[m])!=null?b:0)});for(const m of g){const y=(u=r[m])!=null?u:0;if(y===0)continue;let v=0;for(const T of(h=n.get(m))!=null?h:[])v=Math.max(v,((d=r[T])!=null?d:0)+1);if(v>=y)continue;const b=y;r[m]=v;const w=CI(t,r,a),x=Gq(w,t.edges,r);x<s?(s=x,p=!0):r[m]=b}if(!p)break}return r}l(B3e,"optimizeRanksByCrossings"),_(B3e,"optimizeRanksByCrossings");function z3e(t,e){var a,i;const r=_f(t),n=[...t.nodes].sort((s,o)=>{var u,h;return((u=e[s])!=null?u:0)-((h=e[o])!=null?h:0)||s.localeCompare(o)});for(const s of n){const o=r(s);if(!o)continue;const u=t.edges.filter(b=>b.src===s);if(u.length===0)continue;let h=!1,d=0;for(const b of u){const w=r(b.dst);w==null||w===o?h=!0:d++}if(d===0||h)continue;let f=0,p=!1;for(const b of t.edges){if(b.dst!==s)continue;const w=r(b.src);w&&(w===o?p=!0:f++)}if(f>0||!p)continue;const g=(a=e[s])!=null?a:0,m=g+d;let y=0;for(const b of t.edges)b.dst===s&&(y=Math.max(y,((i=e[b.src])!=null?i:0)+1));const v=Math.max(g,y,m);v!==g&&(e[s]=v)}}l(z3e,"adjustCrossLaneSources"),_(z3e,"adjustCrossLaneSources");function H3e(t,e){var u,h,d,f,p,g;const r=mp(t),n=(u=e5(r))!=null?u:[...r.nodes].sort(),a=(h=e==null?void 0:e.compactSingleInput)!=null?h:!1,i=_f(r);let s=Object.create(null);for(const m of n){const y=Oq(r,m),v=e!=null&&e.ignoreCrossLaneEdges?y.filter(b=>{const w=i(b.src),x=i(m);return!w||!x?!0:w===x}):y;if(v.length===0)s[m]=0;else if(a&&v.length===1){const b=v[0].src,w=i(b),x=i(m);w!==x?s[m]=(d=s[b])!=null?d:0:s[m]=((f=s[b])!=null?f:0)+1}else{let b=-1/0;for(const w of v)b=Math.max(b,((p=s[w.src])!=null?p:0)+1);s[m]=b===-1/0?0:b}}return(g=e==null?void 0:e.optimizeRanksByCrossings)!=null&&g&&(s=B3e(r,s)),e!=null&&e.ignoreCrossLaneEdges&&z3e(r,s),{layers:CI(r,s,i),rankOf:s,dummy:new Set}}l(H3e,"assignLayers_LongestPath"),_(H3e,"assignLayers_LongestPath");function W3e(t,e){var m,y,v,b,w,x;const r=mp(t),n=H3e(r,{compactSingleInput:e==null?void 0:e.compactSingleInput,ignoreCrossLaneEdges:e==null?void 0:e.ignoreCrossLaneEdges,optimizeRanksByCrossings:e==null?void 0:e.optimizeRanksByCrossings}),a=X({},n.rankOf),i=_f(r),{preds:s,succs:o}=wI(r,T=>{if(e!=null&&e.ignoreCrossLaneEdges){const C=i(T.src),S=i(T.dst);if(C&&S&&C!==S)return!1}return!0}),u=(m=e5(r))!=null?m:[...r.nodes],h=[...u].reverse(),d=_((T,C)=>{var A,I,L;let S=0;for(const R of(A=s.get(T))!=null?A:[])S=Math.max(S,((I=a[R])!=null?I:0)+1);let E=Number.POSITIVE_INFINITY;const k=(L=o.get(T))!=null?L:[];return k.length>0&&(E=Math.min(...k.map(R=>{var O;return((O=a[R])!=null?O:0)-1}))),Number.isFinite(E)||(E=Math.max(S,C)),Math.min(Math.max(C,S),E)},"clampFeasible"),f=EI.GRAVITY_ITERATIONS,p=_(T=>{var S,E,k,A;let C=!1;for(const I of T){const L=(S=s.get(I))!=null?S:[],R=(E=o.get(I))!=null?E:[];if(L.length===0&&R.length===0)continue;const O=L.length>0?L.reduce((D,B)=>{var W;return D+((W=a[B])!=null?W:0)+1},0)/L.length:(k=a[I])!=null?k:0,M=R.length>0?R.reduce((D,B)=>{var W;return D+((W=a[B])!=null?W:0)-1},0)/R.length:(A=a[I])!=null?A:0,P=Math.round((O+M)/2),z=d(I,P);z!==a[I]&&(a[I]=z,C=!0)}return C},"relaxOrder");for(let T=0;T<f;T++){const C=p(u),S=p(h);if(!C&&!S)break}for(const T of u){let C=0;for(const S of(y=s.get(T))!=null?y:[])C=Math.max(C,((v=a[S])!=null?v:0)+1);((b=a[T])!=null?b:0)<C&&(a[T]=C)}for(const T of h){const C=(w=o.get(T))!=null?w:[];if(C.length>0){const S=Math.min(...C.map(E=>{var k;return((k=a[E])!=null?k:0)-1}));((x=a[T])!=null?x:0)>S&&(a[T]=S)}}return{layers:zq(r,u,a),rankOf:a,dummy:new Set}}l(W3e,"assignLayers_Gravity"),_(W3e,"assignLayers_Gravity");function V3e(t){var i,s,o;const e=Fq(t),r=Dq(t);let n=Bq(e);const a=[];for(;n.length>0;){const u=[];for(const h of n){a.push(h);for(const d of(i=r.get(h))!=null?i:[])e.set(d,((s=e.get(d))!=null?s:0)-1),((o=e.get(d))!=null?o:0)===0&&u.push(d)}n=u.sort((h,d)=>h.localeCompare(d))}return a.length===t.nodes.length?a:null}l(V3e,"topoSortByGenerationIfAcyclic"),_(V3e,"topoSortByGenerationIfAcyclic");function G3e(t,e){var d,f,p,g;const r=mp(t),n=(e==null?void 0:e.direction)==="LR"?(d=V3e(r))!=null?d:[...r.nodes].sort():(f=e5(r))!=null?f:[...r.nodes].sort(),a=_f(r),i=_(m=>{var y;return(y=a(m))!=null?y:m},"laneOf"),s=Object.create(null),o=new Map,u=_((m,y)=>{var b;return((b=e==null?void 0:e.ignoreCrossLaneEdges)!=null?b:!0)?i(m)===i(y)?1:0:1},"edgeWeight");for(const m of n){const y=r.nodeById.get(m);if(y!=null&&y.isGroup)continue;const v=Oq(r,m);let b=0;if(v.length>0)for(const C of v){const S=C.src,E=(p=s[S])!=null?p:0;b=Math.max(b,E+u(S,m))}const w=i(m),x=(g=o.get(w))!=null?g:0,T=Math.max(b,x);s[m]=T,o.set(w,T+1)}return{layers:zq(r,n,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}l(G3e,"assignLayers_LaneAwareCompact"),_(G3e,"assignLayers_LaneAwareCompact");function q3e(t,e){var g,m;const r=mp(e),{rankOf:n}=t,a=t.layers.map(y=>[...y]),i=new Set(t.dummy?[...t.dummy]:[]);let s=0;const o=new Map(r.nodeById),u=_(y=>{const v=`placeholder-${s++}`,b={id:v,isGroup:!1,isDummy:!0,width:0,height:0};for(o.set(v,b),i.add(v);a.length<=y;)a.push([]);return a[y].push(v),n[v]=y,v},"addDummyAt"),h=[...r.edges].sort((y,v)=>y.id===v.id?y.src===v.src?y.dst.localeCompare(v.dst):y.src.localeCompare(v.src):y.id.localeCompare(v.id)),d=[];for(const y of h){const v=(g=n[y.src])!=null?g:0,b=(m=n[y.dst])!=null?m:0;if(b-v<=1){d.push(y);continue}let w=y.src;for(let T=v+1,C=0;T<b;T++,C++){const S=u(T);d.push({id:`${y.id}#${C}`,src:w,dst:S,weight:y.weight,ref:y.ref}),w=S}const x=b-v-2;d.push({id:`${y.id}#${Math.max(x+1,0)}`,src:w,dst:y.dst,weight:y.weight,ref:y.ref})}const p={nodes:[...r.nodes,...[...i].filter(y=>!r.nodes.includes(y))],edges:d,layout:r.layout,nodeById:o};return{layering:{layers:a,rankOf:n,dummy:i},graphWithDummies:p}}l(q3e,"makeProperLayering"),_(q3e,"makeProperLayering");function qq(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const r=[...t].sort((n,a)=>n-a);return e%2===1?r[(e-1)/2]:.5*(r[e/2-1]+r[e/2])}l(qq,"median$1"),_(qq,"median");function Yq(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((r,n)=>r+n,0)/t.length}l(Yq,"barycenter"),_(Yq,"barycenter");function Y3e(t,e,r,n){const a=new Map;for(const i of t)a.set(i,[]);for(const i of r)n==="down"?e.has(i.src)&&a.has(i.dst)&&a.get(i.dst).push(e.get(i.src)):e.has(i.dst)&&a.has(i.src)&&a.get(i.src).push(e.get(i.dst));return a}l(Y3e,"neighborPositionsFor"),_(Y3e,"neighborPositionsFor");function U3e(t,e,r){var i,s;const n=(i=r.get(t))!=null?i:0,a=(s=r.get(e))!=null?s:0;return n!==a?n-a:t.localeCompare(e)}l(U3e,"currentOrderTieBreak"),_(U3e,"currentOrderTieBreak");function Uq(t,e,r){const n=new Set(t),a=new Set(e),i=bT(t),s=bT(e),o=[];for(const h of r)n.has(h.src)&&a.has(h.dst)&&o.push({u:i.get(h.src),v:s.get(h.dst)});o.sort((h,d)=>h.u===d.u?h.v-d.v:h.u-d.u);const u=o.map(h=>h.v);return Hq(u)}l(Uq,"countCrossingsBetweenAdjacent2"),_(Uq,"countCrossingsBetweenAdjacent");function SI(t,e,r){return[...t].sort((n,a)=>{var o,u;const i=qq((o=e.get(n))!=null?o:[]),s=qq((u=e.get(a))!=null?u:[]);return i===s?U3e(n,a,r):isFinite(i)?isFinite(s)?i-s:-1:1})}l(SI,"sortByHeuristic"),_(SI,"sortByHeuristic");function jq(t,e,r,n,a,i){var p,g,m;const s=bT(t),o=bT(e),u=Y3e(e,s,r,n);if(!a||!i||i.length===0)return SI(e,u,o);const h=new Map;for(const y of e){const v=a(y),b=(p=h.get(v))!=null?p:[];b.push(y),h.set(v,b)}const d=[];for(const y of i){const v=h.get(y);if(!v||v.length===0)continue;const b=SI(v,u,o);d.push(...b)}const f=h.get(null);if(f&&f.length>0){const y=SI(f,u,o);for(const v of y){const b=Yq((g=u.get(v))!=null?g:[]);let w=d.length;if(isFinite(b))for(const[x,T]of d.entries()){const C=Yq((m=u.get(T))!=null?m:[]);if(b<C){w=x;break}}d.splice(w,0,v)}}return d}l(jq,"reorderLayer"),_(jq,"reorderLayer");function Kq(t,e,r,n,a){const i=[...e],s=new Set(t),o=new Set(e),u=n?new Set(n):null,h=r.filter(y=>s.has(y.src)&&o.has(y.dst)),d=u?r.filter(y=>o.has(y.src)&&u.has(y.dst)):void 0,f=_(y=>{let v=Uq(t,y,h);return d&&n&&(v+=Uq(y,n,d)),v},"crossingScore"),p=a?new Map:null;if(a&&p)for(const y of e)p.set(y,a(y));let g=!0,m=f(i);for(;g;){g=!1;for(let y=0;y+1<i.length;y++){if(p){const w=p.get(i[y]),x=p.get(i[y+1]);if(w!==x)continue}const v=m;[i[y],i[y+1]]=[i[y+1],i[y]];const b=f(i);b<v?(m=b,g=!0):[i[y],i[y+1]]=[i[y+1],i[y]]}}return i}l(Kq,"transposeImprove"),_(Kq,"transposeImprove");function j3e(t,e,r){const n=t.layers.map(o=>[...o]),a=e.edges,i=_f(e),s=Wq(e,r==null?void 0:r.laneOrder);for(let o=0;o<3;o++){for(let u=1;u<n.length;u++)n[u]=jq(n[u-1],n[u],a,"down",i,s),n[u]=Kq(n[u-1],n[u],a,n[u+1],i);for(let u=n.length-2;u>=0;u--)n[u]=jq(n[u+1],n[u],a,"up",i,s),n[u]=Kq(n[u+1],n[u],a,n[u-1],i)}return{layers:n}}l(j3e,"orderLayers"),_(j3e,"orderLayers");function K3e(t,e,r){var I,L,R,O,M,P,z,D,B,W,U,j,V;const n=(I=r==null?void 0:r.layerGap)!=null?I:_3e.DEFAULT_LAYER_GAP,a=(L=r==null?void 0:r.nodeGap)!=null?L:_3e.DEFAULT_NODE_GAP,i=(R=r==null?void 0:r.laneGap)!=null?R:a*2,s=(O=r==null?void 0:r.direction)!=null?O:"TB",o=s==="LR"||s==="RL",u=t.layers,h=Object.create(null),d=Object.create(null),f=_(Y=>e.nodeById.get(Y),"getNode"),p=_(Y=>{var H,q;return(q=(H=f(Y))==null?void 0:H.width)!=null?q:0},"getWidth"),g=_(Y=>{var H,q;return(q=(H=f(Y))==null?void 0:H.height)!=null?q:0},"getHeight"),m=_f(e),y=Wq(e,r==null?void 0:r.laneOrder),v=u.map(Y=>Y.reduce((H,q)=>Math.max(H,g(q)),0)),b=[];if(o)for(let Y=0;Y+1<u.length;Y++){const H=u[Y].reduce((ee,J)=>Math.max(ee,p(J)),0),q=u[Y+1].reduce((ee,J)=>Math.max(ee,p(J)),0),Z=v[Y],K=v[Y+1],re=Z/2+K/2,Q=(H+q)/2,te=Math.max(0,Q-re-n);b.push(te)}const w=new Set;for(const Y of u)for(const H of Y)w.add(m(H));const x=w.has(null),T=y.filter(Y=>w.has(Y)),C=[...x?[null]:[],...T],S=Object.create(null);for(const Y of T)S[Y]=0;x&&(S.null=0);for(const Y of u){const H=Object.create(null),q=[];for(const Z of Y){const K=m(Z);K===null?q.push(Z):(H[K]||(H[K]=[])).push(Z)}for(const[Z,K]of Object.entries(H)){const re=K.reduce((Q,te)=>Q+p(te),0)+a*Math.max(0,K.length-1);S[Z]=Math.max((M=S[Z])!=null?M:0,re)}if(x&&q.length){const Z=q.reduce((K,re)=>K+p(re),0)+a*Math.max(0,q.length-1);S.null=Math.max((P=S.null)!=null?P:0,Z)}}const E=new Map;{const Y=C.map(Z=>{var K;return(K=Z===null?S.null:S[Z])!=null?K:0});let q=-(Y.reduce((Z,K)=>Z+K,0)+i*Math.max(0,C.length-1))/2;for(let Z=0;Z<C.length;Z++){const K=C[Z],re=(z=Y[Z])!=null?z:0,Q=q+re/2;E.set(K,Q),q+=re,Z<C.length-1&&(q+=i)}}let k=0;for(const[Y,H]of u.entries()){const q=(D=v[Y])!=null?D:0,Z=new Map;for(const re of H){const Q=m(re),te=(B=Z.get(Q))!=null?B:[];te.push(re),Z.set(Q,te)}for(const re of C){const Q=(W=Z.get(re))!=null?W:[];if(Q.length===0)continue;const te=E.get(re);if(Q.length===1){const ee=Q[0];h[ee]=te,d[ee]=k+q/2}else{const ee=Q.map(se=>p(se)),J=ee.reduce((se,fe)=>se+fe,0)+a*(Q.length-1);let ae=te-J/2;for(const[se,fe]of Q.entries()){const ve=ee[se];h[fe]=ae+ve/2,d[fe]=k+q/2,ae+=ve+a}}}const K=(U=b[Y])!=null?U:0;k+=q+n+K}const A=new Map;for(const Y of e.edges){const H=Y.ref.id;A.has(H)||A.set(H,[]),A.get(H).push(Y)}for(const[,Y]of A){if(Y.length===0)continue;const H=Y[0].ref,q=H.start,Z=H.end;if(q==null||Z==null)continue;const K=Math.round((((j=h[q])!=null?j:0)+((V=h[Z])!=null?V:0))/2),re=new Set;for(const Q of Y)re.add(Q.src),re.add(Q.dst);for(const Q of re){if(Q===q||Q===Z)continue;const te=e.nodeById.get(Q);te!=null&&te.isDummy&&(h[Q]=K)}}return{x:h,y:d}}l(K3e,"assignCoordinates"),_(K3e,"assignCoordinates");var X3e=8;function Z3e(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=Math.imul(e,16777619);return e>>>0}l(Z3e,"hashString$2"),_(Z3e,"hashString");function Q3e(t){let e=t>>>0;return()=>{e+=1831565813;let r=e;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}}l(Q3e,"mulberry32"),_(Q3e,"mulberry32");function J3e(t,e){const r=[...t],n=Q3e(e);for(let a=r.length-1;a>0;a--){const i=Math.floor(n()*(a+1));[r[a],r[i]]=[r[i],r[a]]}return r}l(J3e,"deterministicShuffle"),_(J3e,"deterministicShuffle");function e5e(t,e){var n;let r=0;for(const[a,i]of t.entries())r+=Math.abs(a-((n=e.get(i))!=null?n:a));return r}l(e5e,"sourceDistance"),_(e5e,"sourceDistance");function Xq(t,e){const r=new Map;for(const[a,i]of t.entries())r.set(i,a);let n=0;for(const{a,b:i,weight:s}of e){const o=r.get(a),u=r.get(i);o==null||u==null||(n+=s*Math.abs(o-u))}return n}l(Xq,"laneArrangementCost"),_(Xq,"laneArrangementCost");function t5e(t){var i;const e=TI(t);if(e.length<2)return[];const r=new Map(e.map((s,o)=>[s,o])),n=_f(t),a=new Map;for(const s of(i=t.layout.edges)!=null?i:[]){if(s.isLayoutOnly)continue;const o=typeof s.start=="string"?s.start:void 0,u=typeof s.end=="string"?s.end:void 0;if(!o||!u||!t.nodeById.has(o)||!t.nodeById.has(u))continue;const h=n(o),d=n(u);if(!h||!d||h===d)continue;const f=r.get(h),p=r.get(d);if(f==null||p==null)continue;const[g,m]=f<=p?[h,d]:[d,h],y=`${g}\0${m}`,v=a.get(y);v?v.weight++:a.set(y,{a:g,b:m,weight:1})}return[...a.values()]}l(t5e,"buildWeightedLaneEdges"),_(t5e,"buildWeightedLaneEdges");function Zq(t,e,r){const n=[...t];let a=Xq(n,e),i=!0,s=0;const o=Math.max(1,n.length);for(;i&&s<o;){i=!1,s++;for(let u=0;u+1<n.length;u++){[n[u],n[u+1]]=[n[u+1],n[u]];const h=Xq(n,e);h<a?(a=h,i=!0):[n[u],n[u+1]]=[n[u+1],n[u]]}}return{order:n,cost:a,sourceDistance:e5e(n,r)}}l(Zq,"greedySwitch"),_(Zq,"greedySwitch");function r5e(t,e){return t.cost!==e.cost?t.cost<e.cost:t.sourceDistance<e.sourceDistance}l(r5e,"isBetterCandidate"),_(r5e,"isBetterCandidate");function n5e(t,e,r){const n=[...e].sort((a,i)=>a.a===i.a?a.b.localeCompare(i.b):a.a.localeCompare(i.a)).map(({a,b:i,weight:s})=>`${a}:${i}:${s}`).join("|");return Z3e(`${t.join("|")}#${n}#${r}`)}l(n5e,"seedForRestart"),_(n5e,"seedForRestart");function a5e(t,e={}){var o;const r=TI(t);if(r.length<2)return r;const n=t5e(t);if(n.length===0)return r;const a=new Map(r.map((u,h)=>[u,h]));let i=Zq(r,n,a);const s=Math.max(0,(o=e.restarts)!=null?o:X3e);for(let u=0;u<s;u++){const h=n5e(r,n,u),d=J3e(r,h),f=Zq(d,n,a);r5e(f,i)&&(i=f)}return i.order}l(a5e,"optimizeTopLaneOrder"),_(a5e,"optimizeTopLaneOrder");function i5e(t,e){var g,m,y,v;const r=(g=e==null?void 0:e.ignoreCrossLaneEdges)!=null?g:!0,n=(m=e==null?void 0:e.optimizeRanksByCrossings)!=null?m:!0,a=mp(t),i=e!=null&&e.automaticLaneOrdering?a5e(a,{restarts:X3e}):void 0,s=C3e(a),o=s.acyclic,u=r?G3e(o,{compactSingleInput:(y=e==null?void 0:e.compactSingleInput)!=null?y:EI.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:e==null?void 0:e.direction}):W3e(o,{compactSingleInput:(v=e==null?void 0:e.compactSingleInput)!=null?v:EI.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:n}),{layering:h,graphWithDummies:d}=q3e(u,o),f=j3e(h,d,{laneOrder:i}),p=K3e(f,d,{layerGap:e==null?void 0:e.layerGap,nodeGap:e==null?void 0:e.nodeGap,direction:e==null?void 0:e.direction,laneOrder:i});return{acyclic:o,reversed:s.reversed,layering:h,ordered:f,coordinates:p}}l(i5e,"sugiyamaLayout"),_(i5e,"sugiyamaLayout");var dn=MHt.EPSILON,PHt=8,Um=15,xT=15,_I=25,ru=20,Qq=10;function Jq(t,e,r){var d,f;const n=(d=t.x)!=null?d:0,a=(f=t.y)!=null?f:0,i=e.x-n,s=e.y-a,o=Math.abs(i),u=Math.abs(s);return o<dn&&u<dn?r:u>dn&&u*3>=o?s>0?"bottom":"top":o>dn?i>0?"right":"left":r}l(Jq,"chooseOrthogonalSide"),_(Jq,"chooseOrthogonalSide");function eY(t,e){return Math.abs(t.to-e.from)<dn||Math.abs(t.to-e.to)<dn?t.to:t.from}l(eY,"sharedLineEndpointCoord"),_(eY,"sharedLineEndpointCoord");function jm(t,e){return t.orient==="vertical"?{x:t.coord,y:e}:{x:e,y:t.coord}}l(jm,"pointOnLine"),_(jm,"pointOnLine");function s5e(t,e){var Ie,ye,pe,Ae,Ve,ze,We,me,Se,ne,xe,oe,_e,ue,tt,Re,et,Xe,ot,Ge,ht,Je,St,He,dt,Oe,vt,qe,Me,lt,it,Ue,we,gt,ge,ie,be,$e,le,ke,je,ut,Qe,Ze,st,Ct,Mt,Bt,Pt;const r=(Ie=t.nodes)!=null?Ie:[],n=(ye=t.edges)!=null?ye:[],a=[];for(const Pe of n)Pe.isLayoutOnly||a.push(Ne(X({},Pe),{__originalEdge:Pe}));const i=new Map,s=new Map,o=[],u=e==="LR";for(const Pe of r)i.set(Pe.id,Pe);const h=r.filter(Pe=>Pe.isGroup&&!Pe.parentId);for(const Pe of h){const at={id:Pe.id},yt=_(Tt=>{s.set(Tt.id,at),r.filter(Nt=>Nt.parentId===Tt.id).forEach(yt)},"assignLane");yt(Pe)}const d=r.filter(Pe=>!Pe.isGroup&&!Pe.isEdgeLabel).map(Pe=>{var Jt,Ht,wt,_t;const at=(Jt=Pe.width)!=null?Jt:10,yt=(Ht=Pe.height)!=null?Ht:10,Tt=(wt=Pe.x)!=null?wt:0,Nt=(_t=Pe.y)!=null?_t:0,zt=PHt;return{nodeId:Pe.id,minX:Tt-at/2-zt,maxX:Tt+at/2+zt,minY:Nt-yt/2-zt,maxY:Nt+yt/2+zt,visualXHalfExtent:u?yt/2+zt:at/2+zt}}),f=_((Pe,at,yt,Tt)=>{let Nt=o.find(zt=>zt.orientation===Pe&&Math.abs(zt.coord-at)<1);return Nt||(Nt={id:`pipe-${Pe}-${at.toFixed(0)}`,orientation:Pe,coord:at,spanMin:yt,spanMax:Tt,tracks:[]},o.push(Nt)),Nt.spanMin=Math.min(Nt.spanMin,yt),Nt.spanMax=Math.max(Nt.spanMax,Tt),Nt},"getOrAddPipe"),p=_((Pe,at)=>{var Jt,Ht,wt,_t;const yt=(Jt=Pe.width)!=null?Jt:10,Tt=(Ht=Pe.height)!=null?Ht:10,Nt=(wt=Pe.x)!=null?wt:0,zt=(_t=Pe.y)!=null?_t:0;switch(at){case"top":return{x:Nt,y:zt-Tt/2};case"bottom":return{x:Nt,y:zt+Tt/2};case"left":return{x:Nt-yt/2,y:zt};case"right":return{x:Nt+yt/2,y:zt}}},"portForSide"),g=_((Pe,at,yt)=>p(Pe,Jq(Pe,at,yt?"bottom":"top")),"getOrthogonalPort"),m=[],y=[],v=new Set,b=1e3,w=_((Pe,at,yt)=>{if(m.length===0)return 0;const Tt=Math.abs(at.y-yt.y)<dn,Nt=Math.abs(at.x-yt.x)<dn;if(!Tt&&!Nt)return 0;let zt=0;if(Tt){const Jt=at.y,Ht=Math.min(at.x,yt.x)-dn,wt=Math.max(at.x,yt.x)+dn;if(wt<=Ht)return 0;for(const _t of m)_t.edgeIndex===Pe||_t.orientation!=="vertical"||_t.pipe.coord<Ht||_t.pipe.coord>wt||_t.from-dn<=Jt&&_t.to+dn>=Jt&&(zt+=b)}else if(Nt){const Jt=at.x,Ht=Math.min(at.y,yt.y)-dn,wt=Math.max(at.y,yt.y)+dn;if(wt<=Ht)return 0;for(const _t of m)_t.edgeIndex===Pe||_t.orientation!=="horizontal"||_t.pipe.coord<Ht||_t.pipe.coord>wt||_t.from-dn<=Jt&&_t.to+dn>=Jt&&(zt+=b)}return zt},"crossingPenalty"),x=a.map((Pe,at)=>{var _t,Ot,er,Ye;if(!Pe.start||!Pe.end)return{idx:at,crossLane:0,dx:0,dy:0};const yt=i.get(Pe.start),Tt=i.get(Pe.end),Nt=s.get(Pe.start),zt=s.get(Pe.end),Jt=Nt&&zt&&Nt.id!==zt.id?1:0,Ht=yt&&Tt?Math.abs(((_t=Tt.x)!=null?_t:0)-((Ot=yt.x)!=null?Ot:0)):0,wt=yt&&Tt?Math.abs(((er=Tt.y)!=null?er:0)-((Ye=yt.y)!=null?Ye:0)):0;return{idx:at,crossLane:Jt,dx:Ht,dy:wt}}).sort((Pe,at)=>{if(Pe.crossLane!==at.crossLane)return at.crossLane-Pe.crossLane;const yt=Pe.dx+Pe.dy,Tt=at.dx+at.dy;return Math.abs(yt-Tt)>1?yt-Tt:Pe.idx-at.idx}).map(Pe=>Pe.idx),T=_((Pe,at,yt,Tt)=>{const Nt=Math.min(Pe.x,at.x),zt=Math.max(Pe.x,at.x),Jt=Math.min(Pe.y,at.y),Ht=Math.max(Pe.y,at.y);return!!d.find(_t=>yt&&_t.nodeId===yt||Tt&&_t.nodeId===Tt?!1:Math.abs(Pe.x-at.x)>dn?_t.minY<Pe.y&&_t.maxY>Pe.y&&_t.maxX>Nt&&_t.minX<zt:_t.minX<Pe.x&&_t.maxX>Pe.x&&_t.maxY>Jt&&_t.minY<Ht)},"isSegmentBlocked"),C=new Map,S=new Map;for(const Pe of a)!Pe.start||!Pe.end||Pe.start===Pe.end||(S.set(Pe.start,((pe=S.get(Pe.start))!=null?pe:0)+1),S.set(Pe.end,((Ae=S.get(Pe.end))!=null?Ae:0)+1));const E=_((Pe,at)=>Jq(Pe,at,"bottom"),"determineSide"),k=new Map;for(const[Pe,at]of a.entries()){if(!at.start||!at.end||at.start===at.end||at.points&&at.points.length>0)continue;const yt=i.get(at.start),Tt=i.get(at.end);if(!yt||!Tt)continue;const Nt=((Ve=Tt.x)!=null?Ve:0)-((ze=yt.x)!=null?ze:0),zt=((We=Tt.y)!=null?We:0)-((me=yt.y)!=null?me:0);k.set(Pe,{edgeIdx:Pe,srcId:at.start,dstId:at.end,srcSide:E(yt,{x:(Se=Tt.x)!=null?Se:0,y:(ne=Tt.y)!=null?ne:0}),dstSide:E(Tt,{x:(xe=yt.x)!=null?xe:0,y:(oe=yt.y)!=null?oe:0}),absDx:Math.abs(Nt),absDy:Math.abs(zt),dxSign:Math.sign(Nt),dySign:Math.sign(zt)})}const A=_(Pe=>Pe.srcSide==="top"||Pe.srcSide==="bottom"?Pe.absDx===0?1/0:Pe.absDy/Pe.absDx:Pe.absDy===0?1/0:Pe.absDx/Pe.absDy,"preferenceStrength"),I=_(Pe=>Pe.srcSide==="top"||Pe.srcSide==="bottom"?Pe.dxSign>=0?"right":"left":Pe.dySign>=0?"bottom":"top","secondarySide"),L=new Map;for(const Pe of k.values()){const at=`${Pe.srcId}:${Pe.srcSide}`;L.has(at)||L.set(at,[]),L.get(at).push(Pe)}const R=new Map,O=_((Pe,at)=>`${Pe}:${at}`,"loadKey");for(const Pe of k.values())R.set(O(Pe.srcId,Pe.srcSide),((_e=R.get(O(Pe.srcId,Pe.srcSide)))!=null?_e:0)+1),R.set(O(Pe.dstId,Pe.dstSide),((ue=R.get(O(Pe.dstId,Pe.dstSide)))!=null?ue:0)+1);for(const Pe of L.values())if(!(Pe.length<2)){Pe.sort((at,yt)=>{const Tt=A(at),Nt=A(yt);return Math.abs(Tt-Nt)>1e-9?Nt-Tt:at.edgeIdx-yt.edgeIdx});for(let at=1;at<Pe.length;at++){const yt=Pe[at],Tt=I(yt),Nt=(tt=R.get(O(yt.srcId,yt.srcSide)))!=null?tt:0,zt=(Re=R.get(O(yt.srcId,Tt)))!=null?Re:0;zt>=Nt||(R.set(O(yt.srcId,yt.srcSide),Nt-1),R.set(O(yt.srcId,Tt),zt+1),yt.srcSide=Tt)}}const M=_(Pe=>{const at=Pe==null?void 0:Pe.shape;return at==="question"||at==="diamond"},"isDiamondNode"),P=new Map;for(const Pe of k.values())P.has(Pe.dstId)||P.set(Pe.dstId,new Set),P.get(Pe.dstId).add(Pe.dstSide);for(const Pe of k.values()){if(!M(i.get(Pe.srcId)))continue;const at=P.get(Pe.srcId);if(!(at!=null&&at.has(Pe.srcSide)))continue;const yt=I(Pe);if(at.has(yt)||((et=R.get(O(Pe.srcId,yt)))!=null?et:0)>0)continue;const Tt=(Xe=R.get(O(Pe.srcId,Pe.srcSide)))!=null?Xe:0;R.set(O(Pe.srcId,Pe.srcSide),Math.max(0,Tt-1)),R.set(O(Pe.srcId,yt),1),Pe.srcSide=yt}for(const Pe of k.values()){const{edgeIdx:at,srcId:yt,dstId:Tt,srcSide:Nt,dstSide:zt}=Pe,Jt=i.get(yt),Ht=i.get(Tt),wt=`${yt}:${Nt}:src`,_t=Nt==="top"||Nt==="bottom"?(ot=Ht.x)!=null?ot:0:(Ge=Ht.y)!=null?Ge:0;C.has(wt)||C.set(wt,[]),C.get(wt).push({edgeIdx:at,oppositeCoord:_t});const Ot=`${Tt}:${zt}:dst`,er=zt==="top"||zt==="bottom"?(ht=Jt.x)!=null?ht:0:(Je=Jt.y)!=null?Je:0;C.has(Ot)||C.set(Ot,[]),C.get(Ot).push({edgeIdx:at,oppositeCoord:er})}const z=new Map,D=8;for(const[Pe,at]of C){if(at.length<2)continue;at.sort((en,Pn)=>en.oppositeCoord-Pn.oppositeCoord);const yt=Pe.split(":"),Tt=yt.slice(0,-2).join(":"),Nt=yt[yt.length-2],zt=yt[yt.length-1],Jt=i.get(Tt);if(!Jt)continue;const wt=Nt==="left"||Nt==="right"?(St=Jt.height)!=null?St:10:(He=Jt.width)!=null?He:10,_t=Jt.shape,er=_t==="question"||_t==="diamond"?wt*.3:wt,Ut=Math.min(20,Math.max(D,er/(at.length+1))),vr=-(Ut*(at.length-1))/2;for(const[en,Pn]of at.entries()){const ia=vr+en*Ut,Us=`${Pn.edgeIdx}:${zt}`;z.set(Us,ia)}}const B=_(Pe=>{var at;return!!((at=a[Pe])!=null&&at.labelNodeId)},"edgeHasLabelNode"),W=_((Pe,at)=>{var yt,Tt;return Pe?((yt=C.get(`${Pe}:${at}:src`))!=null?yt:[]).some(({edgeIdx:Nt})=>B(Nt))||((Tt=C.get(`${Pe}:${at}:dst`))!=null?Tt:[]).some(({edgeIdx:Nt})=>B(Nt)):!1},"faceHasLabelNode"),U=_((Pe,at,yt)=>at==="top"||at==="bottom"?{x:Pe.x+yt,y:Pe.y}:{x:Pe.x,y:Pe.y+yt},"applyPortOffset"),j=_((Pe,at,yt)=>{var Ye,Ut,rt,vr,en,Pn;const Tt=k.get(Pe),Nt={x:(Ye=yt.x)!=null?Ye:0,y:(Ut=yt.y)!=null?Ut:0},zt={x:(rt=at.x)!=null?rt:0,y:(vr=at.y)!=null?vr:0},Jt=(en=Tt==null?void 0:Tt.srcSide)!=null?en:E(at,Nt),Ht=(Pn=Tt==null?void 0:Tt.dstSide)!=null?Pn:E(yt,zt);let wt=Tt?p(at,Tt.srcSide):g(at,Nt,!0),_t=Tt?p(yt,Tt.dstSide):g(yt,zt,!1);const Ot=z.get(`${Pe}:src`),er=z.get(`${Pe}:dst`);return Ot!==void 0&&(wt=U(wt,Jt,Ot)),er!==void 0&&(_t=U(_t,Ht,er)),{pSrcPort:wt,pDstPort:_t,srcSide:Jt,dstSide:Ht}},"portsForEdge");for(const Pe of x){const at=a[Pe];if(y[Pe]=[],!at.start||!at.end||at.points&&at.points.length>0||at.start===at.end)continue;const yt=i.get(at.start),Tt=i.get(at.end);if(!yt||!Tt)continue;const{pSrcPort:Nt,pDstPort:zt,srcSide:Jt,dstSide:Ht}=j(Pe,yt,Tt),wt=X({},Nt),_t=X({},zt),Ot=Jt==="top"||Jt==="bottom",er=Ht==="top"||Ht==="bottom";if(Ot){const Qt=Nt.y>((dt=yt.y)!=null?dt:0);wt.y=Qt?Nt.y+ru:Nt.y-ru}else{const Qt=Nt.x>((Oe=yt.x)!=null?Oe:0);wt.x=Qt?Nt.x+ru:Nt.x-ru}if(er){const Qt=zt.y>((vt=Tt.y)!=null?vt:0);_t.y=Qt?zt.y+ru:zt.y-ru}else{const Qt=zt.x>((qe=Tt.x)!=null?qe:0);_t.x=Qt?zt.x+ru:zt.x-ru}const Ye=_((Qt,ar)=>{for(const wr of d)if(!ar.includes(wr.nodeId)&&Qt.x>wr.minX&&Qt.x<wr.maxX&&Qt.y>wr.minY&&Qt.y<wr.maxY)return{inside:!0,obstacle:wr};return{inside:!1}},"isPointInObstacle"),Ut=_((Qt,ar,wr,_n,ii)=>{var rs,wn,xs,kl;if(ii){const Ai=Qt.y>((rs=ar.y)!=null?rs:0);return{x:((wn=wr.x)!=null?wn:0)>=Qt.x?_n.maxX+Um:_n.minX-Um,y:Ai?_n.maxY+xT:_n.minY-xT,leavesPositiveSide:Ai}}const fa=Qt.x>((xs=ar.x)!=null?xs:0),ki=((kl=wr.y)!=null?kl:0)>=Qt.y;return{x:fa?_n.maxX+Um:_n.minX-Um,y:ki?_n.maxY+xT:_n.minY-xT,leavesPositiveSide:fa}},"obstacleDetour");let rt=[];const vr=[at.start,at.end],en=Ye(wt,vr);if(en.inside&&en.obstacle){const Qt=en.obstacle;if(Ot){const ar=Ut(Nt,yt,Tt,Qt,!0);wt.x=ar.x,wt.y=ar.y;const wr=ar.leavesPositiveSide?Math.min(Qt.minY-2,Nt.y+ru):Math.max(Qt.maxY+2,Nt.y-ru);rt=[{x:Nt.x,y:wr},{x:ar.x,y:wr},{x:ar.x,y:ar.y}]}else{const ar=Ut(Nt,yt,Tt,Qt,!1),wr=ar.leavesPositiveSide?Math.min(Qt.minX-2,Nt.x+ru):Math.max(Qt.maxX+2,Nt.x-ru);wt.x=ar.x,wt.y=ar.y,rt=[{x:wr,y:Nt.y},{x:wr,y:ar.y},{x:ar.x,y:ar.y}]}}let Pn=[];const ia=Ye(_t,vr);if(ia.inside&&ia.obstacle){const Qt=ia.obstacle;if(er){const ar=Ut(zt,Tt,yt,Qt,!0);_t.x=ar.x,_t.y=ar.y,Pn=[{x:ar.x,y:ar.y},{x:zt.x,y:ar.y}]}else{const ar=Ut(zt,Tt,yt,Qt,!1);_t.x=ar.x,_t.y=ar.y,Pn=[{x:ar.x,y:ar.y},{x:ar.x,y:zt.y}]}}if(rt.length===0&&Pn.length===0){const Qt=Um,ar=Math.abs(wt.x-_t.x)<Qt,wr=Math.abs(wt.y-_t.y)<Qt,_n=z.get(`${Pe}:src`)!==void 0||z.get(`${Pe}:dst`)!==void 0,ii=((it=(lt=C.get(`${(Me=at.start)!=null?Me:""}:${Jt}:src`))==null?void 0:lt.length)!=null?it:0)+((gt=(we=C.get(`${(Ue=at.start)!=null?Ue:""}:${Jt}:dst`))==null?void 0:we.length)!=null?gt:0),fa=((be=(ie=C.get(`${(ge=at.end)!=null?ge:""}:${Ht}:src`))==null?void 0:ie.length)!=null?be:0)+((ke=(le=C.get(`${($e=at.end)!=null?$e:""}:${Ht}:dst`))==null?void 0:le.length)!=null?ke:0),ki=ii>1||fa>1,rs=(ut=S.get((je=at.start)!=null?je:""))!=null?ut:0,wn=(Ze=S.get((Qe=at.end)!=null?Qe:""))!=null?Ze:0,xs=ii>1&&W(at.start,Jt)||fa>1&&W(at.end,Ht),kl=ii<=1||rs<=2,Ai=fa<=1||wn<=2;if((ar||wr)&&!_n&&(!ki||ki&&!xs&&kl&&Ai)&&!T(Nt,zt,at.start,at.end)){at.points=[X({},Nt),X({},wt),X({},_t),X({},zt)],v.add(Pe);const xa=wr?"horizontal":"vertical",Al=wr?Nt.y:Nt.x,wa=wr?Math.min(Nt.x,zt.x):Math.min(Nt.y,zt.y),Za=wr?Math.max(Nt.x,zt.x):Math.max(Nt.y,zt.y),nc={id:`fast-path-${xa}-${Al.toFixed(0)}-${Pe}`,orientation:xa,coord:Al,spanMin:wa,spanMax:Za,tracks:[]};m.push({edgeIndex:Pe,segmentIndex:0,orientation:xa,pipe:nc,trackIndex:0,from:wa,to:Za});continue}}const Us=f("vertical",wt.x,wt.y,wt.y);wt.x=Us.coord;const lr=f("vertical",_t.x,_t.y,_t.y);_t.x=lr.coord;let $r=Math.min(wt.x,_t.x)-50,xn=Math.max(wt.x,_t.x)+50,ka=Math.min(wt.y,_t.y)-50,di=Math.max(wt.y,_t.y)+50;for(const Qt of d){const ar=Math.min(wt.x,_t.x),wr=Math.max(wt.x,_t.x),_n=Math.min(wt.y,_t.y),ii=Math.max(wt.y,_t.y);Qt.minX<wr&&Qt.maxX>ar&&Qt.minY<ii&&Qt.maxY>_n&&($r=Math.min($r,Qt.minX-_I),xn=Math.max(xn,Qt.maxX+_I),ka=Math.min(ka,Qt.minY-_I),di=Math.max(di,Qt.maxY+_I))}for(const Qt of d){if(Qt.maxX<$r||Qt.minX>xn||Qt.maxY<ka||Qt.minY>di)continue;const ar=Um;f("horizontal",Qt.minY-ar,$r,xn),f("horizontal",Qt.maxY+ar,$r,xn);const wr=xT;f("vertical",Qt.minX-wr,ka,di),f("vertical",Qt.maxX+wr,ka,di)}f("horizontal",wt.y,$r,xn),f("horizontal",_t.y,$r,xn);const cr=o.filter(Qt=>Qt.orientation==="horizontal"&&Qt.coord>=ka&&Qt.coord<=di),ct=o.filter(Qt=>Qt.orientation==="vertical"&&Qt.coord>=$r&&Qt.coord<=xn),$t=_((Qt,ar)=>`${Qt.toFixed(1)},${ar.toFixed(1)}`,"getKey"),Et=$t(wt.x,wt.y),jt=$t(_t.x,_t.y),ir=new Map,br=new Map,tn=new Map,Gr=new Set,Dr=[];ir.set(Et,0),tn.set(Et,"n"),Dr.push({key:Et,f:Math.hypot(_t.x-wt.x,_t.y-wt.y),pt:wt}),Gr.add(Et);let Rr=[];const sa=_((Qt,ar)=>T(Qt,ar,at.start,at.end),"checkSegmentBlocked"),In={x:_t.x,y:wt.y},Sxr=sa(wt,In),_xr=sa(In,_t),kxr=Sxr||_xr,Ure={x:wt.x,y:_t.y},Axr=sa(wt,Ure),Nxr=sa(Ure,_t);if(kxr?Axr||Nxr||(Math.abs(wt.x-_t.x)<dn?Rr=[wt,_t]:Rr=[wt,Ure,_t]):Math.abs(wt.y-_t.y)<dn||Math.abs(wt.x-_t.x)<dn?Rr=[wt,_t]:Rr=[wt,In,_t],Rr.length===0)for(;Dr.length>0;){Dr.sort((wn,xs)=>wn.f-xs.f);const Qt=Dr.shift();if(Gr.delete(Qt.key),Qt.key===jt){let wn=jt,xs=_t;for(Rr=[xs];br.has(wn);){const kl=br.get(wn);Rr.unshift(kl),xs=kl,wn=$t(kl.x,kl.y)}break}const ar=Qt.pt.x,wr=Qt.pt.y,_n=ct.sort((wn,xs)=>wn.coord-xs.coord),ii=_n.findIndex(wn=>Math.abs(wn.coord-ar)<1),fa=cr.sort((wn,xs)=>wn.coord-xs.coord),ki=fa.findIndex(wn=>Math.abs(wn.coord-wr)<1),rs=[];ii>0&&rs.push({x:_n[ii-1].coord,y:wr}),ii>=0&&ii<_n.length-1&&rs.push({x:_n[ii+1].coord,y:wr}),ki>0&&rs.push({x:ar,y:fa[ki-1].coord}),ki>=0&&ki<fa.length-1&&rs.push({x:ar,y:fa[ki+1].coord});for(const wn of rs){const xs=Math.min(ar,wn.x),kl=Math.max(ar,wn.x),Ai=Math.min(wr,wn.y),Go=Math.max(wr,wn.y);if(d.some(Oc=>Oc.nodeId===at.start||Oc.nodeId===at.end?!1:xs!==kl?Oc.minY<wr&&Oc.maxY>wr&&Oc.maxX>xs&&Oc.minX<kl:Oc.minX<ar&&Oc.maxX>ar&&Oc.maxY>Ai&&Oc.minY<Go))continue;const xa=$t(wn.x,wn.y),Al=Math.abs(wn.x-ar)+Math.abs(wn.y-wr),wa=w(Pe,Qt.pt,wn);let Za=0;const nc=_t.x-wt.x,WC=_t.y-wt.y,PR=wn.x-ar,jre=wn.y-wr;(WC>10&&jre<-5||WC<-10&&jre>5)&&(Za=Math.abs(jre)*100),(nc>10&&PR<-5||nc<-10&&PR>5)&&(Za+=Math.abs(PR)*50);let Mqe=0;const Pqe=(st=tn.get(Qt.key))!=null?st:"n",Rqe=Math.abs(PR)>dn?"h":"v";Pqe!=="n"&&Pqe!==Rqe&&(Mqe=50);const Ixr=Al+wa+Za+Mqe,RR=((Ct=ir.get(Qt.key))!=null?Ct:1/0)+Ixr,Oqe=Math.abs(_t.x-wn.x)+Math.abs(_t.y-wn.y);if(RR<((Mt=ir.get(xa))!=null?Mt:1/0))if(br.set(xa,Qt.pt),ir.set(xa,RR),tn.set(xa,Rqe),!Gr.has(xa))Dr.push({key:xa,f:RR+Oqe,pt:wn}),Gr.add(xa);else{const Oc=Dr.findIndex(Lxr=>Lxr.key===xa);Oc!==-1&&(Dr[Oc].f=RR+Oqe)}}}if(Rr.length===0&&(Rr=[wt,{x:wt.x,y:_t.y},_t]),Rr.length>4){const Qt=Rr[0],ar=Rr[Rr.length-1];let wr=Math.min(Qt.x,ar.x),_n=Math.max(Qt.x,ar.x),ii=Math.min(Qt.y,ar.y),fa=Math.max(Qt.y,ar.y);for(const Ai of Rr)wr=Math.min(wr,Ai.x),_n=Math.max(_n,Ai.x),ii=Math.min(ii,Ai.y),fa=Math.max(fa,Ai.y);const ki=_n>Math.max(Qt.x,ar.x),rs=wr<Math.min(Qt.x,ar.x);if(u){const Ai=xT;if(ki){const Go=Math.max(Qt.x,ar.x),ns=Math.min(Qt.y,ar.y),xa=Math.max(Qt.y,ar.y),Al=d.filter(wa=>wa.minX<Go&&wa.maxX>Go&&wa.minY<xa&&wa.maxY>ns);if(Al.length>0){let wa=Math.max(Qt.x,ar.x);for(const Za of Al){const nc=(Za.minX+Za.maxX)/2;if(Za.visualXHalfExtent===void 0||isNaN(Za.visualXHalfExtent))continue;const WC=nc+Za.visualXHalfExtent+Ai;wa=Math.max(wa,WC)}isNaN(wa)||(_n=wa)}}if(rs){const Go=d.filter(ns=>ns.minX<Math.min(Qt.x,ar.x)+Ai&&ns.minY<Math.max(Qt.y,ar.y)&&ns.maxY>Math.min(Qt.y,ar.y));if(Go.length>0){let ns=Math.min(Qt.x,ar.x);for(const xa of Go){const wa=(xa.minX+xa.maxX)/2-xa.visualXHalfExtent-Ai;ns=Math.min(ns,wa)}wr=ns}}}const wn=_(Ai=>{const Go=ar.y>Qt.y,ns=d.filter(wa=>{const Za=Math.min(Qt.x,ar.x)<wa.maxX&&Math.max(Qt.x,ar.x)>wa.minX,nc=Math.min(Qt.y,ar.y)<wa.maxY&&Math.max(Qt.y,ar.y)>wa.minY;return Za&&nc});let xa=ns;if(u&&ns.length>0){const wa=ns.filter(Za=>Za.minX<Ai&&Za.maxX>Ai);wa.length>0&&(xa=wa)}if(xa.length===0)return ar.y;const Al=Um;if(Go){const Za=Math.max(...xa.map(nc=>nc.maxY))+Al;if(Za<ar.y-dn)return Za}else{const Za=Math.min(...xa.map(nc=>nc.minY))-Al;if(Za>ar.y+dn)return Za}return ar.y},"findBestReturnY"),xs=_(Ai=>{const Go=wn(Ai),ns={x:Ai,y:Qt.y},xa={x:Ai,y:Go},Al={x:ar.x,y:Go},wa=sa(Qt,ns),Za=sa(ns,xa),nc=sa(xa,Al),WC=Go!==ar.y?sa(Al,ar):!1;return!wa&&!Za&&!nc&&!WC?Math.abs(Go-ar.y)<dn?[Qt,ns,xa,ar]:[Qt,ns,xa,Al,ar]:null},"trySimplifyWithDetourX"),kl=ki&&!rs?xs(_n):rs&&!ki?xs(wr):null;kl&&(Rr=kl)}const Vo=[Nt,...rt,...Rr,...Pn.reverse(),zt];if(Vo.length>=3){const Qt=Vo[Vo.length-1],ar=Vo[Vo.length-2],wr=Vo[Vo.length-3],_n=Math.abs(wr.y-ar.y)<dn&&Math.abs(ar.y-Qt.y)<dn,ii=Math.abs(wr.x-ar.x)<dn&&Math.abs(ar.x-Qt.x)<dn;if(_n){const fa=Math.sign(ar.x-wr.x),ki=Math.sign(Qt.x-wr.x);fa!==0&&fa===ki&&Math.abs(ar.x-wr.x)>Math.abs(Qt.x-wr.x)&&Vo.splice(-2,1)}else if(ii){const fa=Math.sign(ar.y-wr.y),ki=Math.sign(Qt.y-wr.y);fa!==0&&fa===ki&&Math.abs(ar.y-wr.y)>Math.abs(Qt.y-wr.y)&&Vo.splice(-2,1)}}const Md=[Vo[0]];for(let Qt=1;Qt<Vo.length-1;Qt++){if(Qt===1){Md.push(Vo[Qt]);continue}const ar=Md[Md.length-1],wr=Vo[Qt],_n=Vo[Qt+1];if(Math.abs(ar.y-wr.y)<dn&&Math.abs(wr.y-_n.y)<dn){const ii=wr.x>ar.x,fa=_n.x>wr.x;if(ii!==fa){Md.push(wr);continue}continue}if(Math.abs(ar.x-wr.x)<dn&&Math.abs(wr.x-_n.x)<dn){const ii=wr.y>ar.y,fa=_n.y>wr.y;if(ii!==fa){Md.push(wr);continue}continue}Md.push(wr)}Md.push(Vo[Vo.length-1]);for(let Qt=0;Qt<Md.length-1;Qt++){const ar=Md[Qt],wr=Md[Qt+1],_n=Math.abs(ar.x-wr.x)<dn?"vertical":"horizontal",ii=_n==="vertical"?ar.x:ar.y,fa=_n==="vertical"?Math.min(ar.y,wr.y):Math.min(ar.x,wr.x),ki=_n==="vertical"?Math.max(ar.y,wr.y):Math.max(ar.x,wr.x),rs=f(_n,ii,fa,ki),wn={edgeIndex:Pe,segmentIndex:Qt,orientation:_n,pipe:rs,trackIndex:0,from:fa,to:ki};m.push(wn),y[Pe].push(m.length-1),rs.tracks[0]||(rs.tracks[0]={index:0,coord:rs.coord,segments:[]}),rs.tracks[0].segments.push({edgeIndex:Pe,segmentIndex:Qt,from:fa,to:ki})}}const V=_((Pe,at)=>Pe.from<at.to&&at.from<Pe.to,"segmentsOverlap"),Y=_((Pe,at,yt,Tt)=>{const Nt=!Tt.segments.some(Jt=>(Jt.edgeIndex!==at.edgeIndex||Jt.segmentIndex!==at.segmentIndex)&&V(Jt,Pe)),zt=!yt.segments.some(Jt=>(Jt.edgeIndex!==Pe.edgeIndex||Jt.segmentIndex!==Pe.segmentIndex)&&V(Jt,at));return Nt&&zt?(Pe.trackIndex=Tt.index,at.trackIndex=yt.index,yt.segments=[...yt.segments.filter(Jt=>Jt.edgeIndex!==Pe.edgeIndex||Jt.segmentIndex!==Pe.segmentIndex),{edgeIndex:at.edgeIndex,segmentIndex:at.segmentIndex,from:at.from,to:at.to}],Tt.segments=[...Tt.segments.filter(Jt=>Jt.edgeIndex!==at.edgeIndex||Jt.segmentIndex!==at.segmentIndex),{edgeIndex:Pe.edgeIndex,segmentIndex:Pe.segmentIndex,from:Pe.from,to:Pe.to}],!0):!1},"trySwapSegmentsAcrossTracks"),H=_(Pe=>{const at=Pe.tracks.length;return Pe.tracks[at]={index:at,coord:Pe.coord,segments:[]},at},"createNewTrack"),q=_((Pe,at)=>{const yt=Pe.pipe.tracks[Pe.trackIndex];yt.segments=yt.segments.filter(Nt=>Nt.edgeIndex!==Pe.edgeIndex||Nt.segmentIndex!==Pe.segmentIndex),Pe.trackIndex=at,Pe.pipe.tracks[at].segments.push({edgeIndex:Pe.edgeIndex,segmentIndex:Pe.segmentIndex,from:Pe.from,to:Pe.to})},"moveSegmentToTrack"),Z=_((Pe,at)=>{const yt=y[Pe.edgeIndex];for(const Tt of yt){const Nt=m[Tt];Nt.pipe===Pe.pipe&&q(Nt,at)}},"moveSegmentChainToTrack"),K=_(Pe=>{const at=y[Pe.edgeIndex],yt=at.indexOf(m.indexOf(Pe)),Tt=[];return yt>0&&Tt.push(m[at[yt-1]]),yt<at.length-1&&Tt.push(m[at[yt+1]]),Tt},"getAdjacentSegmentsAlongEdge"),re=_((Pe,at)=>{if(Pe.orientation===at.orientation)return!1;const yt=Pe.orientation==="horizontal"?Pe:at,Tt=Pe.orientation==="horizontal"?at:Pe;return Tt.pipe.coord>yt.from&&Tt.pipe.coord<yt.to&&yt.pipe.coord>Tt.from&&yt.pipe.coord<Tt.to},"haveAnyCrossing"),Q=_((Pe,at)=>{for(const yt of Pe.tracks)if(!yt.segments.some(Nt=>(Nt.edgeIndex!==at.edgeIndex||Nt.segmentIndex!==at.segmentIndex)&&V(Nt,at)))return yt.index;return-1},"findAvailableTrack"),te=_((Pe,at)=>{if(Pe.trackIndex===at.trackIndex)return V(Pe,at);const yt=K(Pe),Tt=K(at);return yt.some(Nt=>Tt.some(zt=>re(Nt,zt)))},"segmentsConflict"),ee=_((Pe,at,yt)=>{if(Y(Pe,at,Pe.pipe.tracks[Pe.trackIndex],at.pipe.tracks[at.trackIndex]))return;const Tt=Q(Pe.pipe,at);yt(at,Tt!==-1?Tt:H(Pe.pipe))},"resolveTrackConflict"),J=_(Pe=>{let at=0;for(let yt=0;yt<Pe.length;yt++)for(let Tt=yt+1;Tt<Pe.length;Tt++){const Nt=Pe[yt],zt=Pe[Tt];Nt.pipe===zt.pipe&&te(Nt,zt)&&(at++,ee(Nt,zt,Z))}return at},"resolveHandleConflicts"),ae=new Map,se=_(Pe=>{if(ae.has(Pe))return ae.get(Pe);const at=y[Pe];if(at.length===0){const Ht={dest:0,deviation:0,base:0,delta:0};return ae.set(Pe,Ht),Ht}const Tt=m[at[0]].pipe.coord;let Nt=Tt;for(let Ht=1;Ht<at.length;Ht++){const wt=m[at[Ht]];if(wt.orientation==="horizontal"){const _t=wt.from,Ot=wt.to;Nt=Math.abs(_t-Tt)>Math.abs(Ot-Tt)?_t:Ot;break}}const zt=Math.abs(Nt-Tt),Jt={dest:Nt,deviation:zt,base:Tt,delta:Nt-Tt};return ae.set(Pe,Jt),Jt},"getDestInfo"),fe=_(()=>{let Pe=0;const at=new Map;for(const[Tt,Nt]of a.entries())y[Tt].length!==0&&Nt.start&&(at.has(Nt.start)||at.set(Nt.start,[]),at.get(Nt.start).push(Tt));const yt=_(Tt=>{var _t,Ot,er,Ye;const Nt=a[Tt];if(!Nt.start||!Nt.end)return 0;const zt=i.get(Nt.start),Jt=i.get(Nt.end);if(!zt||!Jt)return 0;const Ht=((_t=Jt.x)!=null?_t:0)-((Ot=zt.x)!=null?Ot:0),wt=((er=Jt.y)!=null?er:0)-((Ye=zt.y)!=null?Ye:0);return Math.abs(Ht)+Math.abs(wt)},"getEdgeDistance");for(const Tt of at.values()){Tt.sort((zt,Jt)=>{const Ht=se(zt),wt=se(Jt);if(Math.abs(Ht.deviation-wt.deviation)>1)return Ht.deviation-wt.deviation;if(Math.abs(Ht.dest-wt.dest)>1)return Ht.dest-wt.dest;const _t=yt(zt),Ot=yt(Jt);if(Math.abs(_t-Ot)>1)return Ot-_t;const er=y[zt].length,Ye=y[Jt].length;if(er!==Ye)return er-Ye;if(er===1){const Ut=y[zt][0],rt=y[Jt][0];if(m[Ut]&&m[rt]){const vr=m[Ut],en=m[rt],Pn=Math.abs(vr.to-vr.from),ia=Math.abs(en.to-en.from);if(Math.abs(Pn-ia)>1)return Pn-ia}}return 0});const Nt=Tt.map(zt=>m[y[zt][0]]);Pe+=J(Nt)}return Pe},"fixSourceHandleCrossings"),ve=_(()=>{let Pe=0;const at=new Map;for(const[yt,Tt]of a.entries())y[yt].length!==0&&Tt.end&&(at.has(Tt.end)||at.set(Tt.end,[]),at.get(Tt.end).push(yt));for(const yt of at.values()){yt.sort((Nt,zt)=>{const Jt=_(_t=>{const Ot=y[_t];if(Ot.length<2)return 0;const er=m[Ot[Ot.length-2]];return Math.abs(er.to-er.from)},"getDist"),Ht=Jt(Nt),wt=Jt(zt);return Math.abs(Ht-wt)>.1?Ht-wt:Nt-zt});const Tt=yt.map(Nt=>m[y[Nt][y[Nt].length-1]]);Pe+=J(Tt)}return Pe},"fixTargetHandleCrossings"),de=_(()=>{let Pe=0;for(const at of o){const yt=[];for(const Tt of at.tracks)for(const Nt of Tt.segments){const zt=y[Nt.edgeIndex].find(Jt=>m[Jt].segmentIndex===Nt.segmentIndex);zt!==void 0&&yt.push(m[zt])}yt.sort((Tt,Nt)=>Tt.edgeIndex-Nt.edgeIndex||Tt.segmentIndex-Nt.segmentIndex);for(let Tt=0;Tt<yt.length;Tt++)for(let Nt=Tt+1;Nt<yt.length;Nt++){const zt=yt[Tt],Jt=yt[Nt];te(zt,Jt)&&(Pe++,ee(zt,Jt,q))}}return Pe},"fixPipeCrossings");let Ee=0;const Ce=10;for(;Ee<Ce;){let Pe=0;if(Pe+=fe(),Pe+=ve(),Pe+=de(),Pe===0)break;Ee++}const De=new Map;for(const Pe of o){const at=[];Pe.tracks.forEach(Tt=>{Tt.segments.forEach(Nt=>{at.push({edgeIndex:Nt.edgeIndex,segmentIndex:Nt.segmentIndex,trackIndex:Tt.index,from:Nt.from,to:Nt.to})})}),at.sort((Tt,Nt)=>Tt.from-Nt.from);const yt=[];if(at.length>0){let Tt=[at[0]],Nt=at[0].to;for(let zt=1;zt<at.length;zt++){const Jt=at[zt];Jt.from<Nt?(Tt.push(Jt),Nt=Math.max(Nt,Jt.to)):(yt.push(Tt),Tt=[Jt],Nt=Jt.to)}yt.push(Tt)}for(const Tt of yt){const Nt=new Set;Tt.forEach(Ut=>Nt.add(Ut.trackIndex));const zt=new Map;Tt.forEach(Ut=>{var vr;const rt=se(Ut.edgeIndex);zt.set(Ut.trackIndex,((vr=zt.get(Ut.trackIndex))!=null?vr:0)+rt.delta)});const Jt=[...Nt].filter(Ut=>{var rt;return((rt=zt.get(Ut))!=null?rt:0)<-1}),Ht=[...Nt].filter(Ut=>{var rt;return((rt=zt.get(Ut))!=null?rt:0)>1}),wt=[...Nt].filter(Ut=>{var rt;return Math.abs((rt=zt.get(Ut))!=null?rt:0)<=1});Jt.sort((Ut,rt)=>{var vr,en;return((vr=zt.get(rt))!=null?vr:0)-((en=zt.get(Ut))!=null?en:0)}),Ht.sort((Ut,rt)=>{var vr,en;return((vr=zt.get(Ut))!=null?vr:0)-((en=zt.get(rt))!=null?en:0)});const _t=_((Ut,rt)=>{Tt.filter(vr=>vr.trackIndex===Ut).forEach(vr=>{const en=v.has(vr.edgeIndex)?Pe.coord:rt;De.set(`${vr.edgeIndex}-${vr.segmentIndex}`,en)})},"assignCoord");let Ot=0;for(const Ut of Jt)Ot++,_t(Ut,Pe.coord-Ot*Qq);if(wt.length===0&&Nt.size>0){const Ut=[...Nt].sort((en,Pn)=>{var ia,Us;return Math.abs((ia=zt.get(en))!=null?ia:0)-Math.abs((Us=zt.get(Pn))!=null?Us:0)})[0],rt=Jt.indexOf(Ut);rt!==-1&&Jt.splice(rt,1);const vr=Ht.indexOf(Ut);vr!==-1&&Ht.splice(vr,1),wt.push(Ut)}let er=0;for(const Ut of wt){if(er===0)_t(Ut,Pe.coord);else{const rt=er%2===1?1:-1,vr=Math.ceil(er/2);_t(Ut,Pe.coord+rt*vr*Qq*.5)}er++}let Ye=0;for(const Ut of Ht)Ye++,_t(Ut,Pe.coord+Ye*Qq)}}for(const[Pe,at]of a.entries()){const yt=(Bt=y[Pe])!=null?Bt:[];if(yt.length===0)continue;const Tt=[],Nt=i.get(at.start),zt=i.get(at.end),{pSrcPort:Jt,pDstPort:Ht}=j(Pe,Nt,zt),wt=yt.map(er=>{var rt;const Ye=m[er],Ut=(rt=De.get(`${Ye.edgeIndex}-${Ye.segmentIndex}`))!=null?rt:Ye.pipe.coord;return{orient:Ye.orientation,coord:Ut,from:Ye.from,to:Ye.to}});Tt.push(Jt);for(let er=0;er<wt.length;er++){const Ye=wt[er],Ut=Tt[Tt.length-1],rt=Ye.orient==="vertical"?Ut.y:Ut.x,vr=Ye.orient==="vertical"?Ut.x:Ut.y,en=wt[er+1],Pn=er<wt.length-1;if(Math.abs(vr-Ye.coord)>dn&&Tt.push(jm(Ye,rt)),Pn&&en.orient===Ye.orient)if(Math.abs(Ye.coord-en.coord)>dn){const ia=Ye.orient==="vertical"?(rt+en.from)/2:eY(Ye,en);Tt.push(jm(Ye,ia),jm(en,ia))}else(er===0||er===wt.length-2)&&Tt.push(jm(Ye,eY(Ye,en)));else if(Pn)Tt.push(jm(Ye,en.coord));else{const ia=Math.abs(Ye.from-rt)<Math.abs(Ye.to-rt)?Ye.to:Ye.from;Tt.push(jm(Ye,ia))}}const _t=Tt[Tt.length-1];(Math.abs(_t.x-Ht.x)>dn||Math.abs(_t.y-Ht.y)>dn)&&Tt.push(Ht);const Ot=[];Tt.length>0&&Ot.push(Tt[0]);for(let er=1;er<Tt.length;er++){const Ye=Tt[er],Ut=Ot[Ot.length-1];(Math.abs(Ye.x-Ut.x)>dn||Math.abs(Ye.y-Ut.y)>dn)&&Ot.push(Ye)}at.points=Ot}for(const Pe of a){const at=Pe.__originalEdge;at&&Pe.points&&(at.points=Pe.points)}t.edges=((Pt=t.edges)!=null?Pt:[]).filter(Pe=>!Pe.isLayoutOnly);const ce=_((Pe,at)=>{var vr,en,Pn,ia;const yt=(vr=at.x)!=null?vr:0,Tt=(en=at.y)!=null?en:0,Nt=(Pn=at.width)!=null?Pn:0,zt=(ia=at.height)!=null?ia:0;if(Nt<=0||zt<=0)return Pe;const Jt=yt-Nt/2,Ht=yt+Nt/2,wt=Tt-zt/2,_t=Tt+zt/2;if(Pe.x<Jt||Pe.x>Ht||Pe.y<wt||Pe.y>_t)return Pe;const Ot=Pe.x-Jt,er=Ht-Pe.x,Ye=Pe.y-wt,Ut=_t-Pe.y,rt=Math.min(Ot,er,Ye,Ut);return rt===Ot?{x:Jt,y:Pe.y}:rt===er?{x:Ht,y:Pe.y}:rt===Ye?{x:Pe.x,y:wt}:{x:Pe.x,y:_t}},"nodeBoundaryClamp");for(const Pe of t.edges){const at=Pe.points;if(!at||at.length<2)continue;const yt=Pe.start,Tt=Pe.end,Nt=yt?i.get(yt):void 0,zt=Tt?i.get(Tt):void 0;Nt&&(at[0]=ce(at[0],Nt)),zt&&(at[at.length-1]=ce(at[at.length-1],zt))}return t}l(s5e,"routeEdgesOrthogonal"),_(s5e,"routeEdgesOrthogonal");function o5e(t){var e;return(e=t.direction)!=null?e:"TB"}l(o5e,"getSwimlaneDirection"),_(o5e,"getSwimlaneDirection");function l5e(t){var d,f,p,g,m,y,v,b,w,x,T,C;const e=z4e(t),r=(f=(d=t.config.flowchart)==null?void 0:d.nodeSpacing)!=null?f:40,n=(g=(p=t.config.flowchart)==null?void 0:p.rankSpacing)!=null?g:100,a=(y=(m=t.config.swimlane)==null?void 0:m.ignoreCrossLaneEdges)!=null?y:!0,i=(b=(v=t.config.swimlane)==null?void 0:v.optimizeRanksByCrossings)!=null?b:!0,s=(x=(w=t.config.swimlane)==null?void 0:w.automaticLaneOrdering)!=null?x:!1,o=o5e(t),{ordered:u,coordinates:h}=i5e(e,{nodeGap:r,layerGap:n,ignoreCrossLaneEdges:a,optimizeRanksByCrossings:i,automaticLaneOrdering:s,direction:o});H4e(e,u,h,{nodeGap:r,layerGap:n});for(const S of(T=t.edges)!=null?T:[])delete S.points;s5e(t,o);for(const S of(C=t.edges)!=null?C:[])(!S.curve||S.curve==="basis")&&(S.curve="rounded");return T3e(t,o),w3e(t),o}l(l5e,"runSwimlaneLayoutCore"),_(l5e,"runSwimlaneLayoutCore");function c5e(t,e){return nt(this,null,function*(){const r=e.select("g");nV(r,t.markers,t.type,t.diagramId),gwe(),bwe(),Dbe(),WSe(),B4e(t);const n=W4e(t);t.nodes=n.nodes,t.edges=n.edges;const{groups:a}=yield E4e(r,t);l5e(t),yield R4e(t,a)})}l(c5e,"render$1"),_(c5e,"render");var RHt=Object.freeze({__proto__:null,render:c5e});function tY(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}l(tY,"_arrayLikeToArray");function OHt(t){if(Array.isArray(t))return t}l(OHt,"_arrayWithHoles");function DHt(t){if(Array.isArray(t))return tY(t)}l(DHt,"_arrayWithoutHoles");function yp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}l(yp,"_classCallCheck");function FHt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h5e(n.key),n)}}l(FHt,"_defineProperties");function vp(t,e,r){return e&&FHt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}l(vp,"_createClass");function ql(t,e){var r=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=rY(t))||e){r&&(t=r);var n=0,a=l(function(){},"F");return{s:a,n:l(function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},"n"),e:l(function(u){throw u},"e"),f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:l(function(){r=r.call(t)},"s"),n:l(function(){var u=r.next();return s=u.done,u},"n"),e:l(function(u){o=!0,i=u},"e"),f:l(function(){try{s||r.return==null||r.return()}finally{if(o)throw i}},"f")}}l(ql,"_createForOfIteratorHelper");function u5e(t,e,r){return(e=h5e(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}l(u5e,"_defineProperty$1");function BHt(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}l(BHt,"_iterableToArray");function zHt(t,e){var r=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,a,i,s,o=[],u=!0,h=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(o.push(n.value),o.length!==e);u=!0);}catch(d){h=!0,a=d}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(h)throw a}}return o}}l(zHt,"_iterableToArrayLimit");function HHt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}l(HHt,"_nonIterableRest");function WHt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}l(WHt,"_nonIterableSpread");function Ji(t,e){return OHt(t)||zHt(t,e)||rY(t,e)||HHt()}l(Ji,"_slicedToArray");function kI(t){return DHt(t)||BHt(t)||rY(t)||WHt()}l(kI,"_toConsumableArray");function VHt(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}l(VHt,"_toPrimitive");function h5e(t){var e=VHt(t,"string");return typeof e=="symbol"?e:e+""}l(h5e,"_toPropertyKey");function ds(t){"@babel/helpers - typeof";return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ds(t)}l(ds,"_typeof");function rY(t,e){if(t){if(typeof t=="string")return tY(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tY(t,e):void 0}}l(rY,"_unsupportedIterableToArray");var fs=typeof window=="undefined"?null:window,d5e=fs?fs.navigator:null;fs&&fs.document;var GHt=ds(""),f5e=ds({}),qHt=ds(function(){}),YHt=typeof HTMLElement=="undefined"?"undefined":ds(HTMLElement),t5=l(function(e){return e&&e.instanceString&&ci(e.instanceString)?e.instanceString():null},"instanceStr"),Or=l(function(e){return e!=null&&ds(e)==GHt},"string"),ci=l(function(e){return e!=null&&ds(e)===qHt},"fn"),_a=l(function(e){return!Sc(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},"array"),Fn=l(function(e){return e!=null&&ds(e)===f5e&&!_a(e)&&e.constructor===Object},"plainObject"),UHt=l(function(e){return e!=null&&ds(e)===f5e},"object"),mr=l(function(e){return e!=null&&ds(e)===ds(1)&&!isNaN(e)},"number"),jHt=l(function(e){return mr(e)&&Math.floor(e)===e},"integer"),AI=l(function(e){if(YHt!=="undefined")return e!=null&&e instanceof HTMLElement},"htmlElement"),Sc=l(function(e){return r5(e)||p5e(e)},"elementOrCollection"),r5=l(function(e){return t5(e)==="collection"&&e._private.single},"element"),p5e=l(function(e){return t5(e)==="collection"&&!e._private.single},"collection"),nY=l(function(e){return t5(e)==="core"},"core"),g5e=l(function(e){return t5(e)==="stylesheet"},"stylesheet"),KHt=l(function(e){return t5(e)==="event"},"event"),bp=l(function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},"emptyString"),XHt=l(function(e){return typeof HTMLElement=="undefined"?!1:e instanceof HTMLElement},"domElement"),ZHt=l(function(e){return Fn(e)&&mr(e.x1)&&mr(e.x2)&&mr(e.y1)&&mr(e.y2)},"boundingBox"),QHt=l(function(e){return UHt(e)&&ci(e.then)},"promise"),JHt=l(function(){return d5e&&d5e.userAgent.match(/msie|trident|edge/i)},"ms"),wT=l(function(e,r){r||(r=l(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join("$")},"keyFn"));var n=l(function(){var i=this,s=arguments,o,u=r.apply(i,s),h=n.cache;return(o=h[u])||(o=h[u]=e.apply(i,s)),o},"memoizedFn");return n.cache={},n},"memoize"),aY=wT(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),NI=wT(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),m5e=wT(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),y5e=l(function(e){return bp(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},"capitalize"),xp=l(function(e,r){return e.slice(-1*r.length)===r},"endsWith"),ps="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",eWt="rgb[a]?\\(("+ps+"[%]?)\\s*,\\s*("+ps+"[%]?)\\s*,\\s*("+ps+"[%]?)(?:\\s*,\\s*("+ps+"))?\\)",tWt="rgb[a]?\\((?:"+ps+"[%]?)\\s*,\\s*(?:"+ps+"[%]?)\\s*,\\s*(?:"+ps+"[%]?)(?:\\s*,\\s*(?:"+ps+"))?\\)",rWt="hsl[a]?\\(("+ps+")\\s*,\\s*("+ps+"[%])\\s*,\\s*("+ps+"[%])(?:\\s*,\\s*("+ps+"))?\\)",nWt="hsl[a]?\\((?:"+ps+")\\s*,\\s*(?:"+ps+"[%])\\s*,\\s*(?:"+ps+"[%])(?:\\s*,\\s*(?:"+ps+"))?\\)",aWt="\\#[0-9a-fA-F]{3}",iWt="\\#[0-9a-fA-F]{6}",v5e=l(function(e,r){return e<r?-1:e>r?1:0},"ascending"),sWt=l(function(e,r){return-1*v5e(e,r)},"descending"),zr=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var n=e[r];if(n!=null)for(var a=Object.keys(n),i=0;i<a.length;i++){var s=a[i];t[s]=n[s]}}return t},oWt=l(function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,n,a,i,s=16;return r?(n=parseInt(e[1]+e[1],s),a=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(n=parseInt(e[1]+e[2],s),a=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[n,a,i]}},"hex2tuple"),lWt=l(function(e){var r,n,a,i,s,o,u,h;function d(m,y,v){return v<0&&(v+=1),v>1&&(v-=1),v<1/6?m+(y-m)*6*v:v<1/2?y:v<2/3?m+(y-m)*(2/3-v)*6:m}l(d,"hue2rgb");var f=new RegExp("^"+rWt+"$").exec(e);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,a=parseFloat(f[2]),a<0||a>100||(a=a/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(a===0)o=u=h=Math.round(i*255);else{var p=i<.5?i*(1+a):i+a-i*a,g=2*i-p;o=Math.round(255*d(g,p,n+1/3)),u=Math.round(255*d(g,p,n)),h=Math.round(255*d(g,p,n-1/3))}r=[o,u,h,s]}return r},"hsl2tuple"),cWt=l(function(e){var r,n=new RegExp("^"+eWt+"$").exec(e);if(n){r=[];for(var a=[],i=1;i<=3;i++){var s=n[i];if(s[s.length-1]==="%"&&(a[i]=!0),s=parseFloat(s),a[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=a[1]||a[2]||a[3],u=a[1]&&a[2]&&a[3];if(o&&!u)return;var h=n[4];if(h!==void 0){if(h=parseFloat(h),h<0||h>1)return;r.push(h)}}return r},"rgb2tuple"),uWt=l(function(e){return hWt[e.toLowerCase()]},"colorname2tuple"),b5e=l(function(e){return(_a(e)?e:null)||uWt(e)||oWt(e)||cWt(e)||lWt(e)},"color2tuple"),hWt={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},x5e=l(function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i<a;i++){var s=n[i];if(Fn(s))throw Error("Tried to set map with object key");i<n.length-1?(r[s]==null&&(r[s]={}),r=r[s]):r[s]=e.value}},"setMap"),w5e=l(function(e){for(var r=e.map,n=e.keys,a=n.length,i=0;i<a;i++){var s=n[i];if(Fn(s))throw Error("Tried to get map with object key");if(r=r[s],r==null)return r}return r},"getMap"),II=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function n5(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}l(n5,"getDefaultExportFromCjs");var iY,T5e;function a5(){if(T5e)return iY;T5e=1;function t(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}return l(t,"isObject"),iY=t,iY}l(a5,"requireIsObject");var sY,E5e;function dWt(){if(E5e)return sY;E5e=1;var t=typeof II=="object"&&II&&II.Object===Object&&II;return sY=t,sY}l(dWt,"require_freeGlobal");var oY,C5e;function LI(){if(C5e)return oY;C5e=1;var t=dWt(),e=typeof self=="object"&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return oY=r,oY}l(LI,"require_root");var lY,S5e;function fWt(){if(S5e)return lY;S5e=1;var t=LI(),e=l(function(){return t.Date.now()},"now");return lY=e,lY}l(fWt,"requireNow");var cY,_5e;function pWt(){if(_5e)return cY;_5e=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return l(e,"trimmedEndIndex"),cY=e,cY}l(pWt,"require_trimmedEndIndex");var uY,k5e;function gWt(){if(k5e)return uY;k5e=1;var t=pWt(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return l(r,"baseTrim"),uY=r,uY}l(gWt,"require_baseTrim");var hY,A5e;function dY(){if(A5e)return hY;A5e=1;var t=LI(),e=t.Symbol;return hY=e,hY}l(dY,"require_Symbol");var fY,N5e;function mWt(){if(N5e)return fY;N5e=1;var t=dY(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,a=t?t.toStringTag:void 0;function i(s){var o=r.call(s,a),u=s[a];try{s[a]=void 0;var h=!0}catch(f){}var d=n.call(s);return h&&(o?s[a]=u:delete s[a]),d}return l(i,"getRawTag"),fY=i,fY}l(mWt,"require_getRawTag");var pY,I5e;function yWt(){if(I5e)return pY;I5e=1;var t=Object.prototype,e=t.toString;function r(n){return e.call(n)}return l(r,"objectToString"),pY=r,pY}l(yWt,"require_objectToString");var gY,L5e;function $5e(){if(L5e)return gY;L5e=1;var t=dY(),e=mWt(),r=yWt(),n="[object Null]",a="[object Undefined]",i=t?t.toStringTag:void 0;function s(o){return o==null?o===void 0?a:n:i&&i in Object(o)?e(o):r(o)}return l(s,"baseGetTag"),gY=s,gY}l($5e,"require_baseGetTag");var mY,M5e;function vWt(){if(M5e)return mY;M5e=1;function t(e){return e!=null&&typeof e=="object"}return l(t,"isObjectLike"),mY=t,mY}l(vWt,"requireIsObjectLike");var yY,P5e;function i5(){if(P5e)return yY;P5e=1;var t=$5e(),e=vWt(),r="[object Symbol]";function n(a){return typeof a=="symbol"||e(a)&&t(a)==r}return l(n,"isSymbol"),yY=n,yY}l(i5,"requireIsSymbol");var vY,R5e;function bWt(){if(R5e)return vY;R5e=1;var t=gWt(),e=a5(),r=i5(),n=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function u(h){if(typeof h=="number")return h;if(r(h))return n;if(e(h)){var d=typeof h.valueOf=="function"?h.valueOf():h;h=e(d)?d+"":d}if(typeof h!="string")return h===0?h:+h;h=t(h);var f=i.test(h);return f||s.test(h)?o(h.slice(2),f?2:8):a.test(h)?n:+h}return l(u,"toNumber"),vY=u,vY}l(bWt,"requireToNumber");var bY,O5e;function xWt(){if(O5e)return bY;O5e=1;var t=a5(),e=fWt(),r=bWt(),n="Expected a function",a=Math.max,i=Math.min;function s(o,u,h){var d,f,p,g,m,y,v=0,b=!1,w=!1,x=!0;if(typeof o!="function")throw new TypeError(n);u=r(u)||0,t(h)&&(b=!!h.leading,w="maxWait"in h,p=w?a(r(h.maxWait)||0,u):p,x="trailing"in h?!!h.trailing:x);function T(O){var M=d,P=f;return d=f=void 0,v=O,g=o.apply(P,M),g}l(T,"invokeFunc");function C(O){return v=O,m=setTimeout(k,u),b?T(O):g}l(C,"leadingEdge");function S(O){var M=O-y,P=O-v,z=u-M;return w?i(z,p-P):z}l(S,"remainingWait");function E(O){var M=O-y,P=O-v;return y===void 0||M>=u||M<0||w&&P>=p}l(E,"shouldInvoke");function k(){var O=e();if(E(O))return A(O);m=setTimeout(k,S(O))}l(k,"timerExpired");function A(O){return m=void 0,x&&d?T(O):(d=f=void 0,g)}l(A,"trailingEdge");function I(){m!==void 0&&clearTimeout(m),v=0,d=y=f=m=void 0}l(I,"cancel");function L(){return m===void 0?g:A(e())}l(L,"flush");function R(){var O=e(),M=E(O);if(d=arguments,f=this,y=O,M){if(m===void 0)return C(y);if(w)return clearTimeout(m),m=setTimeout(k,u),T(y)}return m===void 0&&(m=setTimeout(k,u)),g}return l(R,"debounced"),R.cancel=I,R.flush=L,R}return l(s,"debounce"),bY=s,bY}l(xWt,"requireDebounce");var wWt=xWt(),s5=n5(wWt),xY=fs?fs.performance:null,D5e=xY&&xY.now?function(){return xY.now()}:function(){return Date.now()},TWt=function(){if(fs){if(fs.requestAnimationFrame)return function(t){fs.requestAnimationFrame(t)};if(fs.mozRequestAnimationFrame)return function(t){fs.mozRequestAnimationFrame(t)};if(fs.webkitRequestAnimationFrame)return function(t){fs.webkitRequestAnimationFrame(t)};if(fs.msRequestAnimationFrame)return function(t){fs.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(D5e())},1e3/60)}}(),$I=l(function(e){return TWt(e)},"requestAnimationFrame"),kf=D5e,Km=9261,F5e=65599,TT=5381,B5e=l(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Km,n=r,a;a=e.next(),!a.done;)n=n*F5e+a.value|0;return n},"hashIterableInts"),o5=l(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Km;return r*F5e+e|0},"hashInt"),l5=l(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:TT;return(r<<5)+r+e|0},"hashIntAlt"),EWt=l(function(e,r){return e*2097152+r},"combineHashes"),wp=l(function(e){return e[0]*2097152+e[1]},"combineHashesArray"),MI=l(function(e,r){return[o5(e[0],r[0]),l5(e[1],r[1])]},"hashArrays"),z5e=l(function(e,r){var n={value:0,done:!1},a=0,i=e.length,s={next:l(function(){return a<i?n.value=e[a++]:n.done=!0,n},"next")};return B5e(s,r)},"hashIntsArray"),Xm=l(function(e,r){var n={value:0,done:!1},a=0,i=e.length,s={next:l(function(){return a<i?n.value=e.charCodeAt(a++):n.done=!0,n},"next")};return B5e(s,r)},"hashString"),H5e=l(function(){return CWt(arguments)},"hashStrings"),CWt=l(function(e){for(var r,n=0;n<e.length;n++){var a=e[n];n===0?r=Xm(a):r=Xm(a,r)}return r},"hashStringsArray");function SWt(t,e,r,n,a){var i=a*Math.PI/180,s=Math.cos(i)*(t-r)-Math.sin(i)*(e-n)+r,o=Math.sin(i)*(t-r)+Math.cos(i)*(e-n)+n;return{x:s,y:o}}l(SWt,"rotatePoint");var _Wt=l(function(e,r,n,a,i,s){return{x:(e-n)*i+n,y:(r-a)*s+a}},"movePointByBoxAspect");function kWt(t,e,r){if(r===0)return t;var n=(e.x1+e.x2)/2,a=(e.y1+e.y2)/2,i=e.w/e.h,s=1/i,o=SWt(t.x,t.y,n,a,r),u=_Wt(o.x,o.y,n,a,i,s);return{x:u.x,y:u.y}}l(kWt,"rotatePosAndSkewByBox");var W5e=!0,AWt=console.warn!=null,NWt=console.trace!=null,wY=Number.MAX_SAFE_INTEGER||9007199254740991,V5e=l(function(){return!0},"trueify"),PI=l(function(){return!1},"falsify"),G5e=l(function(){return 0},"zeroify"),TY=l(function(){},"noop"),ni=l(function(e){throw new Error(e)},"error"),q5e=l(function(e){if(e!==void 0)W5e=!!e;else return W5e},"warnings"),na=l(function(e){q5e()&&(AWt?console.warn(e):(console.log(e),NWt&&console.trace()))},"warn"),IWt=l(function(e){return zr({},e)},"clone"),td=l(function(e){return e==null?e:_a(e)?e.slice():Fn(e)?IWt(e):e},"copy"),LWt=l(function(e){return e.slice()},"copyArray"),Y5e=l(function(e,r){for(r=e="";e++<36;r+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return r},"uuid"),$Wt={},U5e=l(function(){return $Wt},"staticEmptyObject"),io=l(function(e){var r=Object.keys(e);return function(n){for(var a={},i=0;i<r.length;i++){var s=r[i],o=n==null?void 0:n[s];a[s]=o===void 0?e[s]:o}return a}},"defaults"),Tp=l(function(e,r,n){for(var a=e.length-1;a>=0;a--)e[a]===r&&e.splice(a,1)},"removeFromArray"),EY=l(function(e){e.splice(0,e.length)},"clearArray"),MWt=l(function(e,r){for(var n=0;n<r.length;n++){var a=r[n];e.push(a)}},"push"),sl=l(function(e,r,n){return n&&(r=m5e(n,r)),e[r]},"getPrefixedProperty"),rd=l(function(e,r,n,a){n&&(r=m5e(n,r)),e[r]=a},"setPrefixedProperty"),PWt=function(){function t(){yp(this,t),this._obj={}}return l(t,"ObjectMap"),vp(t,[{key:"set",value:l(function(r,n){return this._obj[r]=n,this},"set")},{key:"delete",value:l(function(r){return this._obj[r]=void 0,this},"_delete")},{key:"clear",value:l(function(){this._obj={}},"clear")},{key:"has",value:l(function(r){return this._obj[r]!==void 0},"has")},{key:"get",value:l(function(r){return this._obj[r]},"get")}])}(),Af=typeof Map!="undefined"?Map:PWt,RWt="undefined",OWt=function(){function t(e){if(yp(this,t),this._obj=Object.create(null),this.size=0,e!=null){var r;e.instanceString!=null&&e.instanceString()===this.instanceString()?r=e.toArray():r=e;for(var n=0;n<r.length;n++)this.add(r[n])}}return l(t,"ObjectSet"),vp(t,[{key:"instanceString",value:l(function(){return"set"},"instanceString")},{key:"add",value:l(function(r){var n=this._obj;n[r]!==1&&(n[r]=1,this.size++)},"add")},{key:"delete",value:l(function(r){var n=this._obj;n[r]===1&&(n[r]=0,this.size--)},"_delete")},{key:"clear",value:l(function(){this._obj=Object.create(null)},"clear")},{key:"has",value:l(function(r){return this._obj[r]===1},"has")},{key:"toArray",value:l(function(){var r=this;return Object.keys(this._obj).filter(function(n){return r.has(n)})},"toArray")},{key:"forEach",value:l(function(r,n){return this.toArray().forEach(r,n)},"forEach")}])}(),ET=(typeof Set=="undefined"?"undefined":ds(Set))!==RWt?Set:OWt,RI=l(function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!nY(e)){ni("An element must have a core reference and parameters set");return}var a=r.group;if(a==null&&(r.data&&r.data.source!=null&&r.data.target!=null?a="edges":a="nodes"),a!=="nodes"&&a!=="edges"){ni("An element must be of type `nodes` or `edges`; you specified `"+a+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:a,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?a==="edges":!!r.pannable,active:!1,classes:new ET,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),u=e.zoom();i.position={x:(s.x-o.x)/u,y:(s.y-o.y)/u}}var h=[];_a(r.classes)?h=r.classes:Or(r.classes)&&(h=r.classes.split(/\s+/));for(var d=0,f=h.length;d<f;d++){var p=h[d];!p||p===""||i.classes.add(p)}this.createEmitter(),(n===void 0||n)&&this.restore();var g=r.style||r.css;g&&(na("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(g))},"Element"),j5e=l(function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},l(function(n,a,i){var s;Fn(n)&&!Sc(n)&&(s=n,n=s.roots||s.root,a=s.visit,i=s.directed),i=arguments.length===2&&!ci(a)?a:i,a=ci(a)?a:function(){};for(var o=this._private.cy,u=n=Or(n)?this.filter(n):n,h=[],d=[],f={},p={},g={},m=0,y,v=this.byGroup(),b=v.nodes,w=v.edges,x=0;x<u.length;x++){var T=u[x],C=T.id();T.isNode()&&(h.unshift(T),e.bfs&&(g[C]=!0,d.push(T)),p[C]=0)}for(var S=l(function(){var O=e.bfs?h.shift():h.pop(),M=O.id();if(e.dfs){if(g[M])return 0;g[M]=!0,d.push(O)}var P=p[M],z=f[M],D=z!=null?z.source():null,B=z!=null?z.target():null,W=z==null?void 0:O.same(D)?B[0]:D[0],U;if(U=a(O,z,W,m++,P),U===!0)return y=O,1;if(U===!1)return 1;for(var j=O.connectedEdges().filter(function(Z){return(!i||Z.source().same(O))&&w.has(Z)}),V=0;V<j.length;V++){var Y=j[V],H=Y.connectedNodes().filter(function(Z){return!Z.same(O)&&b.has(Z)}),q=H.id();H.length!==0&&!g[q]&&(H=H[0],h.push(H),e.bfs&&(g[q]=!0,d.push(H)),f[q]=Y,p[q]=p[M]+1)}},"_loop"),E;h.length!==0&&(E=S(),!(E!==0&&E===1)););for(var k=o.collection(),A=0;A<d.length;A++){var I=d[A],L=f[I.id()];L!=null&&k.push(L),k.push(I)}return{path:o.collection(k),found:o.collection(y)}},"searchFn")},"defineSearch"),c5={breadthFirstSearch:j5e({bfs:!0}),depthFirstSearch:j5e({dfs:!0})};c5.bfs=c5.breadthFirstSearch,c5.dfs=c5.depthFirstSearch;var OI={exports:{}},DWt=OI.exports,K5e;function FWt(){return K5e||(K5e=1,function(t,e){(function(){var r,n,a,i,s,o,u,h,d,f,p,g,m,y,v;a=Math.floor,f=Math.min,n=l(function(b,w){return b<w?-1:b>w?1:0},"defaultCmp"),d=l(function(b,w,x,T,C){var S;if(x==null&&(x=0),C==null&&(C=n),x<0)throw new Error("lo must be non-negative");for(T==null&&(T=b.length);x<T;)S=a((x+T)/2),C(w,b[S])<0?T=S:x=S+1;return[].splice.apply(b,[x,x-x].concat(w)),w},"insort"),o=l(function(b,w,x){return x==null&&(x=n),b.push(w),y(b,0,b.length-1,x)},"heappush"),s=l(function(b,w){var x,T;return w==null&&(w=n),x=b.pop(),b.length?(T=b[0],b[0]=x,v(b,0,w)):T=x,T},"heappop"),h=l(function(b,w,x){var T;return x==null&&(x=n),T=b[0],b[0]=w,v(b,0,x),T},"heapreplace"),u=l(function(b,w,x){var T;return x==null&&(x=n),b.length&&x(b[0],w)<0&&(T=[b[0],w],w=T[0],b[0]=T[1],v(b,0,x)),w},"heappushpop"),i=l(function(b,w){var x,T,C,S,E,k;for(w==null&&(w=n),S=function(){k=[];for(var A=0,I=a(b.length/2);0<=I?A<I:A>I;0<=I?A++:A--)k.push(A);return k}.apply(this).reverse(),E=[],T=0,C=S.length;T<C;T++)x=S[T],E.push(v(b,x,w));return E},"heapify"),m=l(function(b,w,x){var T;if(x==null&&(x=n),T=b.indexOf(w),T!==-1)return y(b,0,T,x),v(b,T,x)},"updateItem"),p=l(function(b,w,x){var T,C,S,E,k;if(x==null&&(x=n),C=b.slice(0,w),!C.length)return C;for(i(C,x),k=b.slice(w),S=0,E=k.length;S<E;S++)T=k[S],u(C,T,x);return C.sort(x).reverse()},"nlargest"),g=l(function(b,w,x){var T,C,S,E,k,A,I,L,R;if(x==null&&(x=n),w*10<=b.length){if(S=b.slice(0,w).sort(x),!S.length)return S;for(C=S[S.length-1],I=b.slice(w),E=0,A=I.length;E<A;E++)T=I[E],x(T,C)<0&&(d(S,T,0,null,x),S.pop(),C=S[S.length-1]);return S}for(i(b,x),R=[],k=0,L=f(w,b.length);0<=L?k<L:k>L;0<=L?++k:--k)R.push(s(b,x));return R},"nsmallest"),y=l(function(b,w,x,T){var C,S,E;for(T==null&&(T=n),C=b[x];x>w;){if(E=x-1>>1,S=b[E],T(C,S)<0){b[x]=S,x=E;continue}break}return b[x]=C},"_siftdown"),v=l(function(b,w,x){var T,C,S,E,k;for(x==null&&(x=n),C=b.length,k=w,S=b[w],T=2*w+1;T<C;)E=T+1,E<C&&!(x(b[T],b[E])<0)&&(T=E),b[w]=b[T],w=T,T=2*w+1;return b[w]=S,y(b,k,w,x)},"_siftup"),r=function(){b.push=o,b.pop=s,b.replace=h,b.pushpop=u,b.heapify=i,b.updateItem=m,b.nlargest=p,b.nsmallest=g;function b(w){this.cmp=w!=null?w:n,this.nodes=[]}return l(b,"Heap"),b.prototype.push=function(w){return o(this.nodes,w,this.cmp)},b.prototype.pop=function(){return s(this.nodes,this.cmp)},b.prototype.peek=function(){return this.nodes[0]},b.prototype.contains=function(w){return this.nodes.indexOf(w)!==-1},b.prototype.replace=function(w){return h(this.nodes,w,this.cmp)},b.prototype.pushpop=function(w){return u(this.nodes,w,this.cmp)},b.prototype.heapify=function(){return i(this.nodes,this.cmp)},b.prototype.updateItem=function(w){return m(this.nodes,w,this.cmp)},b.prototype.clear=function(){return this.nodes=[]},b.prototype.empty=function(){return this.nodes.length===0},b.prototype.size=function(){return this.nodes.length},b.prototype.clone=function(){var w;return w=new b,w.nodes=this.nodes.slice(0),w},b.prototype.toArray=function(){return this.nodes.slice(0)},b.prototype.insert=b.prototype.push,b.prototype.top=b.prototype.peek,b.prototype.front=b.prototype.peek,b.prototype.has=b.prototype.contains,b.prototype.copy=b.prototype.clone,b}(),function(b,w){return t.exports=w()}(this,function(){return r})}).call(DWt)}(OI)),OI.exports}l(FWt,"requireHeap$1");var CY,X5e;function BWt(){return X5e||(X5e=1,CY=FWt()),CY}l(BWt,"requireHeap");var zWt=BWt(),u5=n5(zWt),HWt=io({root:null,weight:l(function(e){return 1},"weight"),directed:!1}),WWt={dijkstra:l(function(e){if(!Fn(e)){var r=arguments;e={root:r[0],weight:r[1],directed:r[2]}}var n=HWt(e),a=n.root,i=n.weight,s=n.directed,o=this,u=i,h=Or(a)?this.filter(a)[0]:a[0],d={},f={},p={},g=this.byGroup(),m=g.nodes,y=g.edges;y.unmergeBy(function(P){return P.isLoop()});for(var v=l(function(z){return d[z.id()]},"getDist"),b=l(function(z,D){d[z.id()]=D,w.updateItem(z)},"setDist"),w=new u5(function(P,z){return v(P)-v(z)}),x=0;x<m.length;x++){var T=m[x];d[T.id()]=T.same(h)?0:1/0,w.push(T)}for(var C=l(function(z,D){for(var B=(s?z.edgesTo(D):z.edgesWith(D)).intersect(y),W=1/0,U,j=0;j<B.length;j++){var V=B[j],Y=u(V);(Y<W||!U)&&(W=Y,U=V)}return{edge:U,dist:W}},"distBetween");w.size()>0;){var S=w.pop(),E=v(S),k=S.id();if(p[k]=E,E!==1/0)for(var A=S.neighborhood().intersect(m),I=0;I<A.length;I++){var L=A[I],R=L.id(),O=C(S,L),M=E+O.dist;M<v(L)&&(b(L,M),f[R]={node:S,edge:O.edge})}}return{distanceTo:l(function(z){var D=Or(z)?m.filter(z)[0]:z[0];return p[D.id()]},"distanceTo"),pathTo:l(function(z){var D=Or(z)?m.filter(z)[0]:z[0],B=[],W=D,U=W.id();if(D.length>0)for(B.unshift(D);f[U];){var j=f[U];B.unshift(j.edge),B.unshift(j.node),W=j.node,U=W.id()}return o.spawn(B)},"pathTo")}},"dijkstra")},VWt={kruskal:l(function(e){e=e||function(x){return 1};for(var r=this.byGroup(),n=r.nodes,a=r.edges,i=n.length,s=new Array(i),o=n,u=l(function(T){for(var C=0;C<s.length;C++){var S=s[C];if(S.has(T))return C}},"findSetIndex"),h=0;h<i;h++)s[h]=this.spawn(n[h]);for(var d=a.sort(function(x,T){return e(x)-e(T)}),f=0;f<d.length;f++){var p=d[f],g=p.source()[0],m=p.target()[0],y=u(g),v=u(m),b=s[y],w=s[v];y!==v&&(o.merge(p),b.merge(w),s.splice(v,1))}return o},"kruskal")},GWt=io({root:null,goal:null,weight:l(function(e){return 1},"weight"),heuristic:l(function(e){return 0},"heuristic"),directed:!1}),qWt={aStar:l(function(e){var r=this.cy(),n=GWt(e),a=n.root,i=n.goal,s=n.heuristic,o=n.directed,u=n.weight;a=r.collection(a)[0],i=r.collection(i)[0];var h=a.id(),d=i.id(),f={},p={},g={},m=new u5(function(U,j){return p[U.id()]-p[j.id()]}),y=new ET,v={},b={},w=l(function(j,V){m.push(j),y.add(V)},"addToOpenSet"),x,T,C=l(function(){x=m.pop(),T=x.id(),y.delete(T)},"popFromOpenSet"),S=l(function(j){return y.has(j)},"isInOpenSet");w(a,h),f[h]=0,p[h]=s(a);for(var E=0;m.size()>0;){if(C(),E++,T===d){for(var k=[],A=i,I=d,L=b[I];k.unshift(A),L!=null&&k.unshift(L),A=v[I],A!=null;)I=A.id(),L=b[I];return{found:!0,distance:f[T],path:this.spawn(k),steps:E}}g[T]=!0;for(var R=x._private.edges,O=0;O<R.length;O++){var M=R[O];if(this.hasElementWithId(M.id())&&!(o&&M.data("source")!==T)){var P=M.source(),z=M.target(),D=P.id()!==T?P:z,B=D.id();if(this.hasElementWithId(B)&&!g[B]){var W=f[T]+u(M);if(!S(B)){f[B]=W,p[B]=W+s(D),w(D,B),v[B]=x,b[B]=M;continue}W<f[B]&&(f[B]=W,p[B]=W+s(D),v[B]=x,b[B]=M)}}}}return{found:!1,distance:void 0,path:void 0,steps:E}},"aStar")},YWt=io({weight:l(function(e){return 1},"weight"),directed:!1}),UWt={floydWarshall:l(function(e){for(var r=this.cy(),n=YWt(e),a=n.weight,i=n.directed,s=a,o=this.byGroup(),u=o.nodes,h=o.edges,d=u.length,f=d*d,p=l(function(Y){return u.indexOf(Y)},"indexOf"),g=l(function(Y){return u[Y]},"atIndex"),m=new Array(f),y=0;y<f;y++){var v=y%d,b=(y-v)/d;b===v?m[y]=0:m[y]=1/0}for(var w=new Array(f),x=new Array(f),T=0;T<h.length;T++){var C=h[T],S=C.source()[0],E=C.target()[0];if(S!==E){var k=p(S),A=p(E),I=k*d+A,L=s(C);if(m[I]>L&&(m[I]=L,w[I]=A,x[I]=C),!i){var R=A*d+k;!i&&m[R]>L&&(m[R]=L,w[R]=k,x[R]=C)}}}for(var O=0;O<d;O++)for(var M=0;M<d;M++)for(var P=M*d+O,z=0;z<d;z++){var D=M*d+z,B=O*d+z;m[P]+m[B]<m[D]&&(m[D]=m[P]+m[B],w[D]=w[P])}var W=l(function(Y){return(Or(Y)?r.filter(Y):Y)[0]},"getArgEle"),U=l(function(Y){return p(W(Y))},"indexOfArgEle"),j={distance:l(function(Y,H){var q=U(Y),Z=U(H);return m[q*d+Z]},"distance"),path:l(function(Y,H){var q=U(Y),Z=U(H),K=g(q);if(q===Z)return K.collection();if(w[q*d+Z]==null)return r.collection();var re=r.collection(),Q=q,te;for(re.merge(K);q!==Z;)Q=q,q=w[q*d+Z],te=x[Q*d+q],re.merge(te),re.merge(g(q));return re},"path")};return j},"floydWarshall")},jWt=io({weight:l(function(e){return 1},"weight"),directed:!1,root:null}),KWt={bellmanFord:l(function(e){var r=this,n=jWt(e),a=n.weight,i=n.directed,s=n.root,o=a,u=this,h=this.cy(),d=this.byGroup(),f=d.edges,p=d.nodes,g=p.length,m=new Af,y=!1,v=[];s=h.collection(s)[0],f.unmergeBy(function(de){return de.isLoop()});for(var b=f.length,w=l(function(Ee){var Ce=m.get(Ee.id());return Ce||(Ce={},m.set(Ee.id(),Ce)),Ce},"getInfo"),x=l(function(Ee){return(Or(Ee)?h.$(Ee):Ee)[0]},"getNodeFromTo"),T=l(function(Ee){return w(x(Ee)).dist},"distanceTo"),C=l(function(Ee){for(var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s,De=x(Ee),ce=[],Ie=De;;){if(Ie==null)return r.spawn();var ye=w(Ie),pe=ye.edge,Ae=ye.pred;if(ce.unshift(Ie[0]),Ie.same(Ce)&&ce.length>0)break;pe!=null&&ce.unshift(pe),Ie=Ae}return u.spawn(ce)},"pathTo"),S=0;S<g;S++){var E=p[S],k=w(E);E.same(s)?k.dist=0:k.dist=1/0,k.pred=null,k.edge=null}for(var A=!1,I=l(function(Ee,Ce,De,ce,Ie,ye){var pe=ce.dist+ye;pe<Ie.dist&&!De.same(ce.edge)&&(Ie.dist=pe,Ie.pred=Ee,Ie.edge=De,A=!0)},"checkForEdgeReplacement"),L=1;L<g;L++){A=!1;for(var R=0;R<b;R++){var O=f[R],M=O.source(),P=O.target(),z=o(O),D=w(M),B=w(P);I(M,P,O,D,B,z),i||I(P,M,O,B,D,z)}if(!A)break}if(A)for(var W=[],U=0;U<b;U++){var j=f[U],V=j.source(),Y=j.target(),H=o(j),q=w(V).dist,Z=w(Y).dist;if(q+H<Z||!i&&Z+H<q)if(y||(na("Graph contains a negative weight cycle for Bellman-Ford"),y=!0),e.findNegativeWeightCycles!==!1){var K=[];q+H<Z&&K.push(V),!i&&Z+H<q&&K.push(Y);for(var re=K.length,Q=0;Q<re;Q++){var te=K[Q],ee=[te];ee.push(w(te).edge);for(var J=w(te).pred;ee.indexOf(J)===-1;)ee.push(J),ee.push(w(J).edge),J=w(J).pred;ee=ee.slice(ee.indexOf(J));for(var ae=ee[0].id(),se=0,fe=2;fe<ee.length;fe+=2)ee[fe].id()<ae&&(ae=ee[fe].id(),se=fe);ee=ee.slice(se).concat(ee.slice(0,se)),ee.push(ee[0]);var ve=ee.map(function(de){return de.id()}).join(",");W.indexOf(ve)===-1&&(v.push(u.spawn(ee)),W.push(ve))}}else break}return{distanceTo:T,pathTo:C,hasNegativeWeightCycle:y,negativeWeightCycles:v}},"bellmanFord")},XWt=Math.sqrt(2),ZWt=l(function(e,r,n){n.length===0&&ni("Karger-Stein must be run on a connected (sub)graph");for(var a=n[e],i=a[1],s=a[2],o=r[i],u=r[s],h=n,d=h.length-1;d>=0;d--){var f=h[d],p=f[1],g=f[2];(r[p]===o&&r[g]===u||r[p]===u&&r[g]===o)&&h.splice(d,1)}for(var m=0;m<h.length;m++){var y=h[m];y[1]===u?(h[m]=y.slice(),h[m][1]=o):y[2]===u&&(h[m]=y.slice(),h[m][2]=o)}for(var v=0;v<r.length;v++)r[v]===u&&(r[v]=o);return h},"collapse"),SY=l(function(e,r,n,a){for(;n>a;){var i=Math.floor(Math.random()*r.length);r=ZWt(i,e,r),n--}return r},"contractUntil"),QWt={kargerStein:l(function(){var e=this,r=this.byGroup(),n=r.nodes,a=r.edges;a.unmergeBy(function(B){return B.isLoop()});var i=n.length,s=a.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),u=Math.floor(i/XWt);if(i<2){ni("At least 2 nodes are required for Karger-Stein algorithm");return}for(var h=[],d=0;d<s;d++){var f=a[d];h.push([d,n.indexOf(f.source()),n.indexOf(f.target())])}for(var p=1/0,g=[],m=new Array(i),y=new Array(i),v=new Array(i),b=l(function(W,U){for(var j=0;j<i;j++)U[j]=W[j]},"copyNodesMap"),w=0;w<=o;w++){for(var x=0;x<i;x++)y[x]=x;var T=SY(y,h.slice(),i,u),C=T.slice();b(y,v);var S=SY(y,T,u,2),E=SY(v,C,u,2);S.length<=E.length&&S.length<p?(p=S.length,g=S,b(y,m)):E.length<=S.length&&E.length<p&&(p=E.length,g=E,b(v,m))}for(var k=this.spawn(g.map(function(B){return a[B[0]]})),A=this.spawn(),I=this.spawn(),L=m[0],R=0;R<m.length;R++){var O=m[R],M=n[R];O===L?A.merge(M):I.merge(M)}var P=l(function(W){var U=e.spawn();return W.forEach(function(j){U.merge(j),j.connectedEdges().forEach(function(V){e.contains(V)&&!k.contains(V)&&U.merge(V)})}),U},"constructComponent"),z=[P(A),P(I)],D={cut:k,components:z,partition1:A,partition2:I};return D},"kargerStein")},_Y,JWt=l(function(e){return{x:e.x,y:e.y}},"copyPosition"),DI=l(function(e,r,n){return{x:e.x*r+n.x,y:e.y*r+n.y}},"modelToRenderedPosition"),Z5e=l(function(e,r,n){return{x:(e.x-n.x)/r,y:(e.y-n.y)/r}},"renderedToModelPosition"),CT=l(function(e){return{x:e[0],y:e[1]}},"array2point"),eVt=l(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=1/0,i=r;i<n;i++){var s=e[i];isFinite(s)&&(a=Math.min(s,a))}return a},"min"),tVt=l(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=-1/0,i=r;i<n;i++){var s=e[i];isFinite(s)&&(a=Math.max(s,a))}return a},"max"),rVt=l(function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=0,i=0,s=r;s<n;s++){var o=e[s];isFinite(o)&&(a+=o,i++)}return a/i},"mean"),nVt=l(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;a?e=e.slice(r,n):(n<e.length&&e.splice(n,e.length-n),r>0&&e.splice(0,r));for(var o=0,u=e.length-1;u>=0;u--){var h=e[u];s?isFinite(h)||(e[u]=-1/0,o++):e.splice(u,1)}i&&e.sort(function(p,g){return p-g});var d=e.length,f=Math.floor(d/2);return d%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},"median"),aVt=l(function(e){return Math.PI*e/180},"deg2rad"),FI=l(function(e,r){return Math.atan2(r,e)-Math.PI/2},"getAngleFromDisp"),kY=Math.log2||function(t){return Math.log(t)/Math.log(2)},AY=l(function(e){return e>0?1:e<0?-1:0},"signum"),Zm=l(function(e,r){return Math.sqrt(Qm(e,r))},"dist"),Qm=l(function(e,r){var n=r.x-e.x,a=r.y-e.y;return n*n+a*a},"sqdist"),iVt=l(function(e){for(var r=e.length,n=0,a=0;a<r;a++)n+=e[a];for(var i=0;i<r;i++)e[i]=e[i]/n;return e},"inPlaceSumNormalize"),Fs=l(function(e,r,n,a){return(1-a)*(1-a)*e+2*(1-a)*a*r+a*a*n},"qbezierAt"),ST=l(function(e,r,n,a){return{x:Fs(e.x,r.x,n.x,a),y:Fs(e.y,r.y,n.y,a)}},"qbezierPtAt"),sVt=l(function(e,r,n,a){var i={x:r.x-e.x,y:r.y-e.y},s=Zm(e,r),o={x:i.x/s,y:i.y/s};return n=n==null?0:n,a=a!=null?a:n*s,{x:e.x+o.x*a,y:e.y+o.y*a}},"lineAt"),h5=l(function(e,r,n){return Math.max(e,Math.min(n,r))},"bound"),ol=l(function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},"makeBoundingBox"),oVt=l(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),lVt=l(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),cVt=l(function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},"updateBoundingBox"),Q5e=l(function(e,r,n){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},"expandBoundingBoxByPoint"),BI=l(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBox"),zI=l(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,a,i,s;if(r.length===1)n=a=i=s=r[0];else if(r.length===2)n=i=r[0],s=a=r[1];else if(r.length===4){var o=Ji(r,4);n=o[0],a=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=a,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),J5e=l(function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},"assignBoundingBox"),NY=l(function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2<r.x1||r.x2<e.x1||e.y2<r.y1||r.y2<e.y1||e.y1>r.y2||r.y1>e.y2)},"boundingBoxesIntersect"),Ep=l(function(e,r,n){return e.x1<=r&&r<=e.x2&&e.y1<=n&&n<=e.y2},"inBoundingBox"),e_e=l(function(e,r){return Ep(e,r.x,r.y)},"pointInBoundingBox"),t_e=l(function(e,r){return Ep(e,r.x1,r.y1)&&Ep(e,r.x2,r.y2)},"boundingBoxInBoundingBox"),uVt=(_Y=Math.hypot)!==null&&_Y!==void 0?_Y:function(t,e){return Math.sqrt(t*t+e*e)};function hVt(t,e){if(t.length<3)throw new Error("Need at least 3 vertices");var r=l(function(k,A){return{x:k.x+A.x,y:k.y+A.y}},"add"),n=l(function(k,A){return{x:k.x-A.x,y:k.y-A.y}},"sub"),a=l(function(k,A){return{x:k.x*A,y:k.y*A}},"scale"),i=l(function(k,A){return k.x*A.y-k.y*A.x},"cross"),s=l(function(k){var A=uVt(k.x,k.y);return A===0?{x:0,y:0}:{x:k.x/A,y:k.y/A}},"normalize"),o=l(function(k){for(var A=0,I=0;I<k.length;I++){var L=k[I],R=k[(I+1)%k.length];A+=L.x*R.y-R.x*L.y}return A/2},"signedArea"),u=l(function(k,A,I,L){var R=n(A,k),O=n(L,I),M=i(R,O);if(Math.abs(M)<1e-9)return r(k,a(R,.5));var P=i(n(I,k),O)/M;return r(k,a(R,P))},"intersectLines"),h=t.map(function(E){return{x:E.x,y:E.y}});o(h)<0&&h.reverse();for(var d=h.length,f=[],p=0;p<d;p++){var g=h[p],m=h[(p+1)%d],y=n(m,g),v=s({x:y.y,y:-y.x});f.push(v)}for(var b=f.map(function(E,k){var A=r(h[k],a(E,e)),I=r(h[(k+1)%d],a(E,e));return{p1:A,p2:I}}),w=[],x=0;x<d;x++){var T=b[(x-1+d)%d],C=b[x],S=u(T.p1,T.p2,C.p1,C.p2);w.push(S)}return w}l(hVt,"inflatePolygon");function dVt(t,e,r,n,a,i){var s=wVt(t,e,r,n,a),o=hVt(s,i),u=ol();return o.forEach(function(h){return Q5e(u,h.x,h.y)}),u}l(dVt,"miterBox");var r_e=l(function(e,r,n,a,i,s,o){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",h=u==="auto"?Sp(i,s):u,d=i/2,f=s/2;h=Math.min(h,d,f);var p=h!==d,g=h!==f,m;if(p){var y=n-d+h-o,v=a-f-o,b=n+d-h+o,w=v;if(m=Cp(e,r,n,a,y,v,b,w,!1),m.length>0)return m}if(g){var x=n+d+o,T=a-f+h-o,C=x,S=a+f-h+o;if(m=Cp(e,r,n,a,x,T,C,S,!1),m.length>0)return m}if(p){var E=n-d+h-o,k=a+f+o,A=n+d-h+o,I=k;if(m=Cp(e,r,n,a,E,k,A,I,!1),m.length>0)return m}if(g){var L=n-d-o,R=a-f+h-o,O=L,M=a+f-h+o;if(m=Cp(e,r,n,a,L,R,O,M,!1),m.length>0)return m}var P;{var z=n-d+h,D=a-f+h;if(P=d5(e,r,n,a,z,D,h+o),P.length>0&&P[0]<=z&&P[1]<=D)return[P[0],P[1]]}{var B=n+d-h,W=a-f+h;if(P=d5(e,r,n,a,B,W,h+o),P.length>0&&P[0]>=B&&P[1]<=W)return[P[0],P[1]]}{var U=n+d-h,j=a+f-h;if(P=d5(e,r,n,a,U,j,h+o),P.length>0&&P[0]>=U&&P[1]>=j)return[P[0],P[1]]}{var V=n-d+h,Y=a+f-h;if(P=d5(e,r,n,a,V,Y,h+o),P.length>0&&P[0]<=V&&P[1]>=Y)return[P[0],P[1]]}return[]},"roundRectangleIntersectLine"),fVt=l(function(e,r,n,a,i,s,o){var u=o,h=Math.min(n,i),d=Math.max(n,i),f=Math.min(a,s),p=Math.max(a,s);return h-u<=e&&e<=d+u&&f-u<=r&&r<=p+u},"inLineVicinity"),pVt=l(function(e,r,n,a,i,s,o,u,h){var d={x1:Math.min(n,o,i)-h,x2:Math.max(n,o,i)+h,y1:Math.min(a,u,s)-h,y2:Math.max(a,u,s)+h};return!(e<d.x1||e>d.x2||r<d.y1||r>d.y2)},"inBezierVicinity"),gVt=l(function(e,r,n,a){n-=a;var i=r*r-4*e*n;if(i<0)return[];var s=Math.sqrt(i),o=2*e,u=(-r+s)/o,h=(-r-s)/o;return[u,h]},"solveQuadratic"),mVt=l(function(e,r,n,a,i){var s=1e-5;e===0&&(e=s),r/=e,n/=e,a/=e;var o,u,h,d,f,p,g,m;if(u=(3*n-r*r)/9,h=-(27*a)+r*(9*n-2*(r*r)),h/=54,o=u*u*u+h*h,i[1]=0,g=r/3,o>0){f=h+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),p=h-Math.sqrt(o),p=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),i[0]=-g+f+p,g+=(f+p)/2,i[4]=i[2]=-g,g=Math.sqrt(3)*(-p+f)/2,i[3]=g,i[5]=-g;return}if(i[5]=i[3]=0,o===0){m=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),i[0]=-g+2*m,i[4]=i[2]=-(m+g);return}u=-u,d=u*u*u,d=Math.acos(h/Math.sqrt(d)),m=2*Math.sqrt(u),i[0]=-g+m*Math.cos(d/3),i[2]=-g+m*Math.cos((d+2*Math.PI)/3),i[4]=-g+m*Math.cos((d+4*Math.PI)/3)},"solveCubic"),yVt=l(function(e,r,n,a,i,s,o,u){var h=1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+a*a-4*a*s+2*a*u+4*s*s-4*s*u+u*u,d=1*9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*a*s-3*a*a-3*a*u-6*s*s+3*s*u,f=1*3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*a*a-6*a*s+a*u-a*r+2*s*s+2*s*r-u*r,p=1*n*i-n*n+n*e-i*e+a*s-a*a+a*r-s*r,g=[];mVt(h,d,f,p,g);for(var m=1e-7,y=[],v=0;v<6;v+=2)Math.abs(g[v+1])<m&&g[v]>=0&&g[v]<=1&&y.push(g[v]);y.push(1),y.push(0);for(var b=-1,w,x,T,C=0;C<y.length;C++)w=Math.pow(1-y[C],2)*n+2*(1-y[C])*y[C]*i+y[C]*y[C]*o,x=Math.pow(1-y[C],2)*a+2*(1-y[C])*y[C]*s+y[C]*y[C]*u,T=Math.pow(w-e,2)+Math.pow(x-r,2),b>=0?T<b&&(b=T):b=T;return b},"sqdistToQuadraticBezier"),vVt=l(function(e,r,n,a,i,s){var o=[e-n,r-a],u=[i-n,s-a],h=u[0]*u[0]+u[1]*u[1],d=o[0]*o[0]+o[1]*o[1],f=o[0]*u[0]+o[1]*u[1],p=f*f/h;return f<0?d:p>h?(e-i)*(e-i)+(r-s)*(r-s):d-p},"sqdistToFiniteLine"),Yl=l(function(e,r,n){for(var a,i,s,o,u,h=0,d=0;d<n.length/2;d++)if(a=n[d*2],i=n[d*2+1],d+1<n.length/2?(s=n[(d+1)*2],o=n[(d+1)*2+1]):(s=n[(d+1-n.length/2)*2],o=n[(d+1-n.length/2)*2+1]),!(a==e&&s==e))if(a>=e&&e>=s||a<=e&&e<=s)u=(e-a)/(s-a)*(o-i)+i,u>r&&h++;else continue;return h%2!==0},"pointInsidePolygonPoints"),Nf=l(function(e,r,n,a,i,s,o,u,h){var d=new Array(n.length),f;u[0]!=null?(f=Math.atan(u[1]/u[0]),u[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=u;for(var p=Math.cos(-f),g=Math.sin(-f),m=0;m<d.length/2;m++)d[m*2]=s/2*(n[m*2]*p-n[m*2+1]*g),d[m*2+1]=o/2*(n[m*2+1]*p+n[m*2]*g),d[m*2]+=a,d[m*2+1]+=i;var y;if(h>0){var v=WI(d,-h);y=HI(v)}else y=d;return Yl(e,r,y)},"pointInsidePolygon"),bVt=l(function(e,r,n,a,i,s,o,u){for(var h=new Array(n.length*2),d=0;d<u.length;d++){var f=u[d];h[d*4+0]=f.startX,h[d*4+1]=f.startY,h[d*4+2]=f.stopX,h[d*4+3]=f.stopY;var p=Math.pow(f.cx-e,2)+Math.pow(f.cy-r,2);if(p<=Math.pow(f.radius,2))return!0}return Yl(e,r,h)},"pointInsideRoundPolygon"),HI=l(function(e){for(var r=new Array(e.length/2),n,a,i,s,o,u,h,d,f=0;f<e.length/4;f++){n=e[f*4],a=e[f*4+1],i=e[f*4+2],s=e[f*4+3],f<e.length/4-1?(o=e[(f+1)*4],u=e[(f+1)*4+1],h=e[(f+1)*4+2],d=e[(f+1)*4+3]):(o=e[0],u=e[1],h=e[2],d=e[3]);var p=Cp(n,a,i,s,o,u,h,d,!0);r[f*2]=p[0],r[f*2+1]=p[1]}return r},"joinLines"),WI=l(function(e,r){for(var n=new Array(e.length*2),a,i,s,o,u=0;u<e.length/2;u++){a=e[u*2],i=e[u*2+1],u<e.length/2-1?(s=e[(u+1)*2],o=e[(u+1)*2+1]):(s=e[0],o=e[1]);var h=o-i,d=-(s-a),f=Math.sqrt(h*h+d*d),p=h/f,g=d/f;n[u*4]=a+p*r,n[u*4+1]=i+g*r,n[u*4+2]=s+p*r,n[u*4+3]=o+g*r}return n},"expandPolygon"),xVt=l(function(e,r,n,a,i,s){var o=n-e,u=a-r;o/=i,u/=s;var h=Math.sqrt(o*o+u*u),d=h-1;if(d<0)return[];var f=d/h;return[(n-e)*f+e,(a-r)*f+r]},"intersectLineEllipse"),Jm=l(function(e,r,n,a,i,s,o){return e-=i,r-=s,e/=n/2+o,r/=a/2+o,e*e+r*r<=1},"checkInEllipse"),d5=l(function(e,r,n,a,i,s,o){var u=[n-e,a-r],h=[e-i,r-s],d=u[0]*u[0]+u[1]*u[1],f=2*(h[0]*u[0]+h[1]*u[1]),p=h[0]*h[0]+h[1]*h[1]-o*o,g=f*f-4*d*p;if(g<0)return[];var m=(-f+Math.sqrt(g))/(2*d),y=(-f-Math.sqrt(g))/(2*d),v=Math.min(m,y),b=Math.max(m,y),w=[];if(v>=0&&v<=1&&w.push(v),b>=0&&b<=1&&w.push(b),w.length===0)return[];var x=w[0]*u[0]+e,T=w[0]*u[1]+r;if(w.length>1){if(w[0]==w[1])return[x,T];var C=w[1]*u[0]+e,S=w[1]*u[1]+r;return[x,T,C,S]}else return[x,T]},"intersectLineCircle"),IY=l(function(e,r,n){return r<=e&&e<=n||n<=e&&e<=r?e:e<=r&&r<=n||n<=r&&r<=e?r:n},"midOfThree"),Cp=l(function(e,r,n,a,i,s,o,u,h){var d=e-i,f=n-e,p=o-i,g=r-s,m=a-r,y=u-s,v=p*g-y*d,b=f*g-m*d,w=y*f-p*m;if(w!==0){var x=v/w,T=b/w,C=.001,S=0-C,E=1+C;return S<=x&&x<=E&&S<=T&&T<=E?[e+x*f,r+x*m]:h?[e+x*f,r+x*m]:[]}else return v===0||b===0?IY(e,n,o)===o?[o,u]:IY(e,n,i)===i?[i,s]:IY(i,o,n)===n?[n,a]:[]:[]},"finiteLinesIntersect"),wVt=l(function(e,r,n,a,i){var s=[],o=a/2,u=i/2,h=r,d=n;s.push({x:h+o*e[0],y:d+u*e[1]});for(var f=1;f<e.length/2;f++)s.push({x:h+o*e[f*2],y:d+u*e[f*2+1]});return s},"transformPoints"),f5=l(function(e,r,n,a,i,s,o,u){var h=[],d,f=new Array(n.length),p=!0;s==null&&(p=!1);var g;if(p){for(var m=0;m<f.length/2;m++)f[m*2]=n[m*2]*s+a,f[m*2+1]=n[m*2+1]*o+i;if(u>0){var y=WI(f,-u);g=HI(y)}else g=f}else g=n;for(var v,b,w,x,T=0;T<g.length/2;T++)v=g[T*2],b=g[T*2+1],T<g.length/2-1?(w=g[(T+1)*2],x=g[(T+1)*2+1]):(w=g[0],x=g[1]),d=Cp(e,r,a,i,v,b,w,x),d.length!==0&&h.push(d[0],d[1]);return h},"polygonIntersectLine"),TVt=l(function(e,r,n,a,i,s,o,u,h){var d=[],f,p=new Array(n.length*2);h.forEach(function(w,x){x===0?(p[p.length-2]=w.startX,p[p.length-1]=w.startY):(p[x*4-2]=w.startX,p[x*4-1]=w.startY),p[x*4]=w.stopX,p[x*4+1]=w.stopY,f=d5(e,r,a,i,w.cx,w.cy,w.radius),f.length!==0&&d.push(f[0],f[1])});for(var g=0;g<p.length/4;g++)f=Cp(e,r,a,i,p[g*4],p[g*4+1],p[g*4+2],p[g*4+3],!1),f.length!==0&&d.push(f[0],f[1]);if(d.length>2){for(var m=[d[0],d[1]],y=Math.pow(m[0]-e,2)+Math.pow(m[1]-r,2),v=1;v<d.length/2;v++){var b=Math.pow(d[v*2]-e,2)+Math.pow(d[v*2+1]-r,2);b<=y&&(m[0]=d[v*2],m[1]=d[v*2+1],y=b)}return m}return d},"roundPolygonIntersectLine"),VI=l(function(e,r,n){var a=[e[0]-r[0],e[1]-r[1]],i=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=(i-n)/i;return s<0&&(s=1e-5),[r[0]+s*a[0],r[1]+s*a[1]]},"shortenIntersection"),ll=l(function(e,r){var n=LY(e,r);return n=n_e(n),n},"generateUnitNgonPointsFitToSquare"),n_e=l(function(e){for(var r,n,a=e.length/2,i=1/0,s=1/0,o=-1/0,u=-1/0,h=0;h<a;h++)r=e[2*h],n=e[2*h+1],i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,n),u=Math.max(u,n);for(var d=2/(o-i),f=2/(u-s),p=0;p<a;p++)r=e[2*p]=e[2*p]*d,n=e[2*p+1]=e[2*p+1]*f,i=Math.min(i,r),o=Math.max(o,r),s=Math.min(s,n),u=Math.max(u,n);if(s<-1)for(var g=0;g<a;g++)n=e[2*g+1]=e[2*g+1]+(-1-s);return e},"fitPolygonToSquare"),LY=l(function(e,r){var n=1/e*2*Math.PI,a=e%2===0?Math.PI/2+n/2:Math.PI/2;a+=r;for(var i=new Array(e*2),s,o=0;o<e;o++)s=o*n+a,i[2*o]=Math.cos(s),i[2*o+1]=Math.sin(-s);return i},"generateUnitNgonPoints"),Sp=l(function(e,r){return Math.min(e/4,r/4,8)},"getRoundRectangleRadius"),a_e=l(function(e,r){return Math.min(e/10,r/10,8)},"getRoundPolygonRadius"),$Y=l(function(){return 8},"getCutRectangleCornerLength"),EVt=l(function(e,r,n){return[e-2*r+n,2*(r-e),e]},"bezierPtsToQuadCoeff"),MY=l(function(e,r){return{heightOffset:Math.min(15,.05*r),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},"getBarrelCurveConstants");function PY(t,e){function r(f){for(var p=[],g=0;g<f.length;g++){var m=f[g],y=f[(g+1)%f.length],v={x:y.x-m.x,y:y.y-m.y},b={x:-v.y,y:v.x},w=Math.sqrt(b.x*b.x+b.y*b.y);p.push({x:b.x/w,y:b.y/w})}return p}l(r,"getAxes");function n(f,p){var g=1/0,m=-1/0,y=ql(f),v;try{for(y.s();!(v=y.n()).done;){var b=v.value,w=b.x*p.x+b.y*p.y;g=Math.min(g,w),m=Math.max(m,w)}}catch(x){y.e(x)}finally{y.f()}return{min:g,max:m}}l(n,"project");function a(f,p){return!(f.max<p.min||p.max<f.min)}l(a,"overlaps");var i=[].concat(kI(r(t)),kI(r(e))),s=ql(i),o;try{for(s.s();!(o=s.n()).done;){var u=o.value,h=n(t,u),d=n(e,u);if(!a(h,d))return!1}}catch(f){s.e(f)}finally{s.f()}return!0}l(PY,"satPolygonIntersection");var CVt=io({dampingFactor:.8,precision:1e-6,iterations:200,weight:l(function(e){return 1},"weight")}),SVt={pageRank:l(function(e){for(var r=CVt(e),n=r.dampingFactor,a=r.precision,i=r.iterations,s=r.weight,o=this._private.cy,u=this.byGroup(),h=u.nodes,d=u.edges,f=h.length,p=f*f,g=d.length,m=new Array(p),y=new Array(f),v=(1-n)/f,b=0;b<f;b++){for(var w=0;w<f;w++){var x=b*f+w;m[x]=0}y[b]=0}for(var T=0;T<g;T++){var C=d[T],S=C.data("source"),E=C.data("target");if(S!==E){var k=h.indexOfId(S),A=h.indexOfId(E),I=s(C),L=A*f+k;m[L]+=I,y[k]+=I}}for(var R=1/f+v,O=0;O<f;O++)if(y[O]===0)for(var M=0;M<f;M++){var P=M*f+O;m[P]=R}else for(var z=0;z<f;z++){var D=z*f+O;m[D]=m[D]/y[O]+v}for(var B=new Array(f),W=new Array(f),U,j=0;j<f;j++)B[j]=1;for(var V=0;V<i;V++){for(var Y=0;Y<f;Y++)W[Y]=0;for(var H=0;H<f;H++)for(var q=0;q<f;q++){var Z=H*f+q;W[H]+=m[Z]*B[q]}iVt(W),U=B,B=W,W=U;for(var K=0,re=0;re<f;re++){var Q=U[re]-B[re];K+=Q*Q}if(K<a)break}var te={rank:l(function(J){return J=o.collection(J)[0],B[h.indexOf(J)]},"rank")};return te},"pageRank")},i_e=io({root:null,weight:l(function(e){return 1},"weight"),directed:!1,alpha:0}),_T={degreeCentralityNormalized:l(function(e){e=i_e(e);var r=this.cy(),n=this.nodes(),a=n.length;if(e.directed){for(var d={},f={},p=0,g=0,m=0;m<a;m++){var y=n[m],v=y.id();e.root=y;var b=this.degreeCentrality(e);p<b.indegree&&(p=b.indegree),g<b.outdegree&&(g=b.outdegree),d[v]=b.indegree,f[v]=b.outdegree}return{indegree:l(function(x){return p==0?0:(Or(x)&&(x=r.filter(x)),d[x.id()]/p)},"indegree"),outdegree:l(function(x){return g===0?0:(Or(x)&&(x=r.filter(x)),f[x.id()]/g)},"outdegree")}}else{for(var i={},s=0,o=0;o<a;o++){var u=n[o];e.root=u;var h=this.degreeCentrality(e);s<h.degree&&(s=h.degree),i[u.id()]=h.degree}return{degree:l(function(x){return s===0?0:(Or(x)&&(x=r.filter(x)),i[x.id()]/s)},"degree")}}},"degreeCentralityNormalized"),degreeCentrality:l(function(e){e=i_e(e);var r=this.cy(),n=this,a=e,i=a.root,s=a.weight,o=a.directed,u=a.alpha;if(i=r.collection(i)[0],o){for(var g=i.connectedEdges(),m=g.filter(function(S){return S.target().same(i)&&n.has(S)}),y=g.filter(function(S){return S.source().same(i)&&n.has(S)}),v=m.length,b=y.length,w=0,x=0,T=0;T<m.length;T++)w+=s(m[T]);for(var C=0;C<y.length;C++)x+=s(y[C]);return{indegree:Math.pow(v,1-u)*Math.pow(w,u),outdegree:Math.pow(b,1-u)*Math.pow(x,u)}}else{for(var h=i.connectedEdges().intersection(n),d=h.length,f=0,p=0;p<h.length;p++)f+=s(h[p]);return{degree:Math.pow(d,1-u)*Math.pow(f,u)}}},"degreeCentrality")};_T.dc=_T.degreeCentrality,_T.dcn=_T.degreeCentralityNormalised=_T.degreeCentralityNormalized;var s_e=io({harmonic:!0,weight:l(function(){return 1},"weight"),directed:!1,root:null}),kT={closenessCentralityNormalized:l(function(e){for(var r=s_e(e),n=r.harmonic,a=r.weight,i=r.directed,s=this.cy(),o={},u=0,h=this.nodes(),d=this.floydWarshall({weight:a,directed:i}),f=0;f<h.length;f++){for(var p=0,g=h[f],m=0;m<h.length;m++)if(f!==m){var y=d.distance(g,h[m]);n?p+=1/y:p+=y}n||(p=1/p),u<p&&(u=p),o[g.id()]=p}return{closeness:l(function(b){return u==0?0:(Or(b)?b=s.filter(b)[0].id():b=b.id(),o[b]/u)},"closeness")}},"closenessCentralityNormalized"),closenessCentrality:l(function(e){var r=s_e(e),n=r.root,a=r.weight,i=r.directed,s=r.harmonic;n=this.filter(n)[0];for(var o=this.dijkstra({root:n,weight:a,directed:i}),u=0,h=this.nodes(),d=0;d<h.length;d++){var f=h[d];if(!f.same(n)){var p=o.distanceTo(f);s?u+=1/p:u+=p}}return s?u:1/u},"closenessCentrality")};kT.cc=kT.closenessCentrality,kT.ccn=kT.closenessCentralityNormalised=kT.closenessCentralityNormalized;var _Vt=io({weight:null,directed:!1}),RY={betweennessCentrality:l(function(e){for(var r=_Vt(e),n=r.directed,a=r.weight,i=a!=null,s=this.cy(),o=this.nodes(),u={},h={},d=0,f={set:l(function(x,T){h[x]=T,T>d&&(d=T)},"set"),get:l(function(x){return h[x]},"get")},p=0;p<o.length;p++){var g=o[p],m=g.id();n?u[m]=g.outgoers().nodes():u[m]=g.openNeighborhood().nodes(),f.set(m,0)}for(var y=l(function(){for(var x=o[v].id(),T=[],C={},S={},E={},k=new u5(function(H,q){return E[H]-E[q]}),A=0;A<o.length;A++){var I=o[A].id();C[I]=[],S[I]=0,E[I]=1/0}for(S[x]=1,E[x]=0,k.push(x);!k.empty();){var L=k.pop();if(T.push(L),i)for(var R=0;R<u[L].length;R++){var O=u[L][R],M=s.getElementById(L),P=void 0;M.edgesTo(O).length>0?P=M.edgesTo(O)[0]:P=O.edgesTo(M)[0];var z=a(P);O=O.id(),E[O]>E[L]+z&&(E[O]=E[L]+z,k.nodes.indexOf(O)<0?k.push(O):k.updateItem(O),S[O]=0,C[O]=[]),E[O]==E[L]+z&&(S[O]=S[O]+S[L],C[O].push(L))}else for(var D=0;D<u[L].length;D++){var B=u[L][D].id();E[B]==1/0&&(k.push(B),E[B]=E[L]+1),E[B]==E[L]+1&&(S[B]=S[B]+S[L],C[B].push(L))}}for(var W={},U=0;U<o.length;U++)W[o[U].id()]=0;for(;T.length>0;){for(var j=T.pop(),V=0;V<C[j].length;V++){var Y=C[j][V];W[Y]=W[Y]+S[Y]/S[j]*(1+W[j])}j!=o[v].id()&&f.set(j,f.get(j)+W[j])}},"_loop"),v=0;v<o.length;v++)y();var b={betweenness:l(function(x){var T=s.collection(x).id();return f.get(T)},"betweenness"),betweennessNormalized:l(function(x){if(d==0)return 0;var T=s.collection(x).id();return f.get(T)/d},"betweennessNormalized")};return b.betweennessNormalised=b.betweennessNormalized,b},"betweennessCentrality")};RY.bc=RY.betweennessCentrality;var kVt=io({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(t){return 1}]}),AVt=l(function(e){return kVt(e)},"setOptions"),NVt=l(function(e,r){for(var n=0,a=0;a<r.length;a++)n+=r[a](e);return n},"getSimilarity"),IVt=l(function(e,r,n){for(var a=0;a<r;a++)e[a*r+a]=n},"addLoops"),o_e=l(function(e,r){for(var n,a=0;a<r;a++){n=0;for(var i=0;i<r;i++)n+=e[i*r+a];for(var s=0;s<r;s++)e[s*r+a]=e[s*r+a]/n}},"normalize"),LVt=l(function(e,r,n){for(var a=new Array(n*n),i=0;i<n;i++){for(var s=0;s<n;s++)a[i*n+s]=0;for(var o=0;o<n;o++)for(var u=0;u<n;u++)a[i*n+u]+=e[i*n+o]*r[o*n+u]}return a},"mmult"),$Vt=l(function(e,r,n){for(var a=e.slice(0),i=1;i<n;i++)e=LVt(e,a,r);return e},"expand"),MVt=l(function(e,r,n){for(var a=new Array(r*r),i=0;i<r*r;i++)a[i]=Math.pow(e[i],n);return o_e(a,r),a},"inflate"),PVt=l(function(e,r,n,a){for(var i=0;i<n;i++){var s=Math.round(e[i]*Math.pow(10,a))/Math.pow(10,a),o=Math.round(r[i]*Math.pow(10,a))/Math.pow(10,a);if(s!==o)return!1}return!0},"hasConverged"),RVt=l(function(e,r,n,a){for(var i=[],s=0;s<r;s++){for(var o=[],u=0;u<r;u++)Math.round(e[s*r+u]*1e3)/1e3>0&&o.push(n[u]);o.length!==0&&i.push(a.collection(o))}return i},"assign"),OVt=l(function(e,r){for(var n=0;n<e.length;n++)if(!r[n]||e[n].id()!==r[n].id())return!1;return!0},"isDuplicate"),DVt=l(function(e){for(var r=0;r<e.length;r++)for(var n=0;n<e.length;n++)r!=n&&OVt(e[r],e[n])&&e.splice(n,1);return e},"removeDuplicates"),l_e=l(function(e){for(var r=this.nodes(),n=this.edges(),a=this.cy(),i=AVt(e),s={},o=0;o<r.length;o++)s[r[o].id()]=o;for(var u=r.length,h=u*u,d=new Array(h),f,p=0;p<h;p++)d[p]=0;for(var g=0;g<n.length;g++){var m=n[g],y=s[m.source().id()],v=s[m.target().id()],b=NVt(m,i.attributes);d[y*u+v]+=b,d[v*u+y]+=b}IVt(d,u,i.multFactor),o_e(d,u);for(var w=!0,x=0;w&&x<i.maxIterations;)w=!1,f=$Vt(d,u,i.expandFactor),d=MVt(f,u,i.inflateFactor),PVt(d,f,h,4)||(w=!0),x++;var T=RVt(d,u,r,a);return T=DVt(T),T},"markovClustering"),FVt={markovClustering:l_e,mcl:l_e},BVt=l(function(e){return e},"identity"),c_e=l(function(e,r){return Math.abs(r-e)},"absDiff"),u_e=l(function(e,r,n){return e+c_e(r,n)},"addAbsDiff"),h_e=l(function(e,r,n){return e+Math.pow(n-r,2)},"addSquaredDiff"),zVt=l(function(e){return Math.sqrt(e)},"sqrt"),HVt=l(function(e,r,n){return Math.max(e,c_e(r,n))},"maxAbsDiff"),p5=l(function(e,r,n,a,i){for(var s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:BVt,o=a,u,h,d=0;d<e;d++)u=r(d),h=n(d),o=i(o,u,h);return s(o)},"getDistance"),AT={euclidean:l(function(e,r,n){return e>=2?p5(e,r,n,0,h_e,zVt):p5(e,r,n,0,u_e)},"euclidean"),squaredEuclidean:l(function(e,r,n){return p5(e,r,n,0,h_e)},"squaredEuclidean"),manhattan:l(function(e,r,n){return p5(e,r,n,0,u_e)},"manhattan"),max:l(function(e,r,n){return p5(e,r,n,-1/0,HVt)},"max")};AT["squared-euclidean"]=AT.squaredEuclidean,AT.squaredeuclidean=AT.squaredEuclidean;function GI(t,e,r,n,a,i){var s;return ci(t)?s=t:s=AT[t]||AT.euclidean,e===0&&ci(t)?s(a,i):s(e,r,n,a,i)}l(GI,"clusteringDistance");var WVt=io({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),OY=l(function(e){return WVt(e)},"setOptions"),qI=l(function(e,r,n,a,i){var s=i!=="kMedoids",o=s?function(f){return n[f]}:function(f){return a[f](n)},u=l(function(p){return a[p](r)},"getQ"),h=n,d=r;return GI(e,a.length,o,u,h,d)},"getDist"),DY=l(function(e,r,n){for(var a=n.length,i=new Array(a),s=new Array(a),o=new Array(r),u=null,h=0;h<a;h++)i[h]=e.min(n[h]).value,s[h]=e.max(n[h]).value;for(var d=0;d<r;d++){u=[];for(var f=0;f<a;f++)u[f]=Math.random()*(s[f]-i[f])+i[f];o[d]=u}return o},"randomCentroids"),d_e=l(function(e,r,n,a,i){for(var s=1/0,o=0,u=0;u<r.length;u++){var h=qI(n,e,r[u],a,i);h<s&&(s=h,o=u)}return o},"classify"),f_e=l(function(e,r,n){for(var a=[],i=null,s=0;s<r.length;s++)i=r[s],n[i.id()]===e&&a.push(i);return a},"buildCluster"),VVt=l(function(e,r,n){return Math.abs(r-e)<=n},"haveValuesConverged"),GVt=l(function(e,r,n){for(var a=0;a<e.length;a++)for(var i=0;i<e[a].length;i++){var s=Math.abs(e[a][i]-r[a][i]);if(s>n)return!1}return!0},"haveMatricesConverged"),qVt=l(function(e,r,n){for(var a=0;a<n;a++)if(e===r[a])return!0;return!1},"seenBefore"),p_e=l(function(e,r){var n=new Array(r);if(e.length<50)for(var a=0;a<r;a++){for(var i=e[Math.floor(Math.random()*e.length)];qVt(i,n,a);)i=e[Math.floor(Math.random()*e.length)];n[a]=i}else for(var s=0;s<r;s++)n[s]=e[Math.floor(Math.random()*e.length)];return n},"randomMedoids"),g_e=l(function(e,r,n){for(var a=0,i=0;i<r.length;i++)a+=qI("manhattan",r[i],e,n,"kMedoids");return a},"findCost"),YVt=l(function(e){var r=this.cy(),n=this.nodes(),a=null,i=OY(e),s=new Array(i.k),o={},u;i.testMode?typeof i.testCentroids=="number"?(i.testCentroids,u=DY(n,i.k,i.attributes)):ds(i.testCentroids)==="object"?u=i.testCentroids:u=DY(n,i.k,i.attributes):u=DY(n,i.k,i.attributes);for(var h=!0,d=0;h&&d<i.maxIterations;){for(var f=0;f<n.length;f++)a=n[f],o[a.id()]=d_e(a,u,i.distance,i.attributes,"kMeans");h=!1;for(var p=0;p<i.k;p++){var g=f_e(p,n,o);if(g.length!==0){for(var m=i.attributes.length,y=u[p],v=new Array(m),b=new Array(m),w=0;w<m;w++){b[w]=0;for(var x=0;x<g.length;x++)a=g[x],b[w]+=i.attributes[w](a);v[w]=b[w]/g.length,VVt(v[w],y[w],i.sensitivityThreshold)||(h=!0)}u[p]=v,s[p]=r.collection(g)}}d++}return s},"kMeans"),UVt=l(function(e){var r=this.cy(),n=this.nodes(),a=null,i=OY(e),s=new Array(i.k),o,u={},h,d=new Array(i.k);i.testMode?typeof i.testCentroids=="number"||(ds(i.testCentroids)==="object"?o=i.testCentroids:o=p_e(n,i.k)):o=p_e(n,i.k);for(var f=!0,p=0;f&&p<i.maxIterations;){for(var g=0;g<n.length;g++)a=n[g],u[a.id()]=d_e(a,o,i.distance,i.attributes,"kMedoids");f=!1;for(var m=0;m<o.length;m++){var y=f_e(m,n,u);if(y.length!==0){d[m]=g_e(o[m],y,i.attributes);for(var v=0;v<y.length;v++)h=g_e(y[v],y,i.attributes),h<d[m]&&(d[m]=h,o[m]=y[v],f=!0);s[m]=r.collection(y)}}p++}return s},"kMedoids"),jVt=l(function(e,r,n,a,i){for(var s,o,u=0;u<r.length;u++)for(var h=0;h<e.length;h++)a[u][h]=Math.pow(n[u][h],i.m);for(var d=0;d<e.length;d++)for(var f=0;f<i.attributes.length;f++){s=0,o=0;for(var p=0;p<r.length;p++)s+=a[p][d]*i.attributes[f](r[p]),o+=a[p][d];e[d][f]=s/o}},"updateCentroids"),KVt=l(function(e,r,n,a,i){for(var s=0;s<e.length;s++)r[s]=e[s].slice();for(var o,u,h,d=2/(i.m-1),f=0;f<n.length;f++)for(var p=0;p<a.length;p++){o=0;for(var g=0;g<n.length;g++)u=qI(i.distance,a[p],n[f],i.attributes,"cmeans"),h=qI(i.distance,a[p],n[g],i.attributes,"cmeans"),o+=Math.pow(u/h,d);e[p][f]=1/o}},"updateMembership"),XVt=l(function(e,r,n,a){for(var i=new Array(n.k),s=0;s<i.length;s++)i[s]=[];for(var o,u,h=0;h<r.length;h++){o=-1/0,u=-1;for(var d=0;d<r[0].length;d++)r[h][d]>o&&(o=r[h][d],u=d);i[u].push(e[h])}for(var f=0;f<i.length;f++)i[f]=a.collection(i[f]);return i},"assign"),m_e=l(function(e){var r=this.cy(),n=this.nodes(),a=OY(e),i,s,o,u,h;u=new Array(n.length);for(var d=0;d<n.length;d++)u[d]=new Array(a.k);o=new Array(n.length);for(var f=0;f<n.length;f++)o[f]=new Array(a.k);for(var p=0;p<n.length;p++){for(var g=0,m=0;m<a.k;m++)o[p][m]=Math.random(),g+=o[p][m];for(var y=0;y<a.k;y++)o[p][y]=o[p][y]/g}s=new Array(a.k);for(var v=0;v<a.k;v++)s[v]=new Array(a.attributes.length);h=new Array(n.length);for(var b=0;b<n.length;b++)h[b]=new Array(a.k);for(var w=!0,x=0;w&&x<a.maxIterations;)w=!1,jVt(s,n,o,h,a),KVt(o,u,s,n,a),GVt(o,u,a.sensitivityThreshold)||(w=!0),x++;return i=XVt(n,o,a,r),{clusters:i,degreeOfMembership:o}},"fuzzyCMeans"),ZVt={kMeans:YVt,kMedoids:UVt,fuzzyCMeans:m_e,fcm:m_e},QVt=io({distance:"euclidean",linkage:"min",mode:"threshold",threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),JVt={single:"min",complete:"max"},eGt=l(function(e){var r=QVt(e),n=JVt[r.linkage];return n!=null&&(r.linkage=n),r},"setOptions"),y_e=l(function(e,r,n,a,i){for(var s=0,o=1/0,u,h=i.attributes,d=l(function(A,I){return GI(i.distance,h.length,function(L){return h[L](A)},function(L){return h[L](I)},A,I)},"getDist"),f=0;f<e.length;f++){var p=e[f].key,g=n[p][a[p]];g<o&&(s=p,o=g)}if(i.mode==="threshold"&&o>=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var m=r[s],y=r[a[s]],v;i.mode==="dendrogram"?v={left:m,right:y,key:m.key}:v={value:m.value.concat(y.value),key:m.key},e[m.index]=v,e.splice(y.index,1),r[m.key]=v;for(var b=0;b<e.length;b++){var w=e[b];m.key===w.key?u=1/0:i.linkage==="min"?(u=n[m.key][w.key],n[m.key][w.key]>n[y.key][w.key]&&(u=n[y.key][w.key])):i.linkage==="max"?(u=n[m.key][w.key],n[m.key][w.key]<n[y.key][w.key]&&(u=n[y.key][w.key])):i.linkage==="mean"?u=(n[m.key][w.key]*m.size+n[y.key][w.key]*y.size)/(m.size+y.size):i.mode==="dendrogram"?u=d(w.value,m.value):u=d(w.value[0],m.value[0]),n[m.key][w.key]=n[w.key][m.key]=u}for(var x=0;x<e.length;x++){var T=e[x].key;if(a[T]===m.key||a[T]===y.key){for(var C=T,S=0;S<e.length;S++){var E=e[S].key;n[T][E]<n[T][C]&&(C=E)}a[T]=C}e[x].index=x}return m.key=y.key=m.index=y.index=null,!0},"mergeClosest"),NT=l(function(e,r,n){e&&(e.value?r.push(e.value):(e.left&&NT(e.left,r),e.right&&NT(e.right,r)))},"getAllChildren"),FY=l(function(e,r){if(!e)return"";if(e.left&&e.right){var n=FY(e.left,r),a=FY(e.right,r),i=r.add({group:"nodes",data:{id:n+","+a}});return r.add({group:"edges",data:{source:n,target:i.id()}}),r.add({group:"edges",data:{source:a,target:i.id()}}),i.id()}else if(e.value)return e.value.id()},"buildDendrogram"),BY=l(function(e,r,n){if(!e)return[];var a=[],i=[],s=[];return r===0?(e.left&&NT(e.left,a),e.right&&NT(e.right,i),s=a.concat(i),[n.collection(s)]):r===1?e.value?[n.collection(e.value)]:(e.left&&NT(e.left,a),e.right&&NT(e.right,i),[n.collection(a),n.collection(i)]):e.value?[n.collection(e.value)]:(e.left&&(a=BY(e.left,r-1,n)),e.right&&(i=BY(e.right,r-1,n)),a.concat(i))},"buildClustersFromTree"),v_e=l(function(e){for(var r=this.cy(),n=this.nodes(),a=eGt(e),i=a.attributes,s=l(function(x,T){return GI(a.distance,i.length,function(C){return i[C](x)},function(C){return i[C](T)},x,T)},"getDist"),o=[],u=[],h=[],d=[],f=0;f<n.length;f++){var p={value:a.mode==="dendrogram"?n[f]:[n[f]],key:f,index:f};o[f]=p,d[f]=p,u[f]=[],h[f]=0}for(var g=0;g<o.length;g++)for(var m=0;m<=g;m++){var y=void 0;a.mode==="dendrogram"?y=g===m?1/0:s(o[g].value,o[m].value):y=g===m?1/0:s(o[g].value[0],o[m].value[0]),u[g][m]=y,u[m][g]=y,y<u[g][h[g]]&&(h[g]=m)}for(var v=y_e(o,d,u,h,a);v;)v=y_e(o,d,u,h,a);var b;return a.mode==="dendrogram"?(b=BY(o[0],a.dendrogramDepth,r),a.addDendrogram&&FY(o[0],r)):(b=new Array(o.length),o.forEach(function(w,x){w.key=w.index=null,b[x]=r.collection(w.value)})),b},"hierarchicalClustering"),tGt={hierarchicalClustering:v_e,hca:v_e},rGt=io({distance:"euclidean",preference:"median",damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),nGt=l(function(e){var r=e.damping,n=e.preference;.5<=r&&r<1||ni("Damping must range on [0.5, 1). Got: ".concat(r));var a=["median","mean","min","max"];return a.some(function(i){return i===n})||mr(n)||ni("Preference must be one of [".concat(a.map(function(i){return"'".concat(i,"'")}).join(", "),"] or a number. Got: ").concat(n)),rGt(e)},"setOptions"),aGt=l(function(e,r,n,a){var i=l(function(o,u){return a[u](o)},"attr");return-GI(e,a.length,function(s){return i(r,s)},function(s){return i(n,s)},r,n)},"getSimilarity"),iGt=l(function(e,r){var n=null;return r==="median"?n=nVt(e):r==="mean"?n=rVt(e):r==="min"?n=eVt(e):r==="max"?n=tVt(e):n=r,n},"getPreference"),sGt=l(function(e,r,n){for(var a=[],i=0;i<e;i++)r[i*e+i]+n[i*e+i]>0&&a.push(i);return a},"findExemplars"),b_e=l(function(e,r,n){for(var a=[],i=0;i<e;i++){for(var s=-1,o=-1/0,u=0;u<n.length;u++){var h=n[u];r[i*e+h]>o&&(s=h,o=r[i*e+h])}s>0&&a.push(s)}for(var d=0;d<n.length;d++)a[n[d]]=n[d];return a},"assignClusters"),oGt=l(function(e,r,n){for(var a=b_e(e,r,n),i=0;i<n.length;i++){for(var s=[],o=0;o<a.length;o++)a[o]===n[i]&&s.push(o);for(var u=-1,h=-1/0,d=0;d<s.length;d++){for(var f=0,p=0;p<s.length;p++)f+=r[s[p]*e+s[d]];f>h&&(u=d,h=f)}n[i]=s[u]}return a=b_e(e,r,n),a},"assign"),x_e=l(function(e){for(var r=this.cy(),n=this.nodes(),a=nGt(e),i={},s=0;s<n.length;s++)i[n[s].id()]=s;var o,u,h,d,f,p;o=n.length,u=o*o,h=new Array(u);for(var g=0;g<u;g++)h[g]=-1/0;for(var m=0;m<o;m++)for(var y=0;y<o;y++)m!==y&&(h[m*o+y]=aGt(a.distance,n[m],n[y],a.attributes));d=iGt(h,a.preference);for(var v=0;v<o;v++)h[v*o+v]=d;f=new Array(u);for(var b=0;b<u;b++)f[b]=0;p=new Array(u);for(var w=0;w<u;w++)p[w]=0;for(var x=new Array(o),T=new Array(o),C=new Array(o),S=0;S<o;S++)x[S]=0,T[S]=0,C[S]=0;for(var E=new Array(o*a.minIterations),k=0;k<E.length;k++)E[k]=0;var A;for(A=0;A<a.maxIterations;A++){for(var I=0;I<o;I++){for(var L=-1/0,R=-1/0,O=-1,M=0,P=0;P<o;P++)x[P]=f[I*o+P],M=p[I*o+P]+h[I*o+P],M>=L?(R=L,L=M,O=P):M>R&&(R=M);for(var z=0;z<o;z++)f[I*o+z]=(1-a.damping)*(h[I*o+z]-L)+a.damping*x[z];f[I*o+O]=(1-a.damping)*(h[I*o+O]-R)+a.damping*x[O]}for(var D=0;D<o;D++){for(var B=0,W=0;W<o;W++)x[W]=p[W*o+D],T[W]=Math.max(0,f[W*o+D]),B+=T[W];B-=T[D],T[D]=f[D*o+D],B+=T[D];for(var U=0;U<o;U++)p[U*o+D]=(1-a.damping)*Math.min(0,B-T[U])+a.damping*x[U];p[D*o+D]=(1-a.damping)*(B-T[D])+a.damping*x[D]}for(var j=0,V=0;V<o;V++){var Y=p[V*o+V]+f[V*o+V]>0?1:0;E[A%a.minIterations*o+V]=Y,j+=Y}if(j>0&&(A>=a.minIterations-1||A==a.maxIterations-1)){for(var H=0,q=0;q<o;q++){C[q]=0;for(var Z=0;Z<a.minIterations;Z++)C[q]+=E[Z*o+q];(C[q]===0||C[q]===a.minIterations)&&H++}if(H===o)break}}for(var K=sGt(o,f,p),re=oGt(o,h,K),Q={},te=0;te<K.length;te++)Q[K[te]]=[];for(var ee=0;ee<n.length;ee++){var J=i[n[ee].id()],ae=re[J];ae!=null&&Q[ae].push(n[ee])}for(var se=new Array(K.length),fe=0;fe<K.length;fe++)se[fe]=r.collection(Q[K[fe]]);return se},"affinityPropagation"),lGt={affinityPropagation:x_e,ap:x_e},cGt=io({root:void 0,directed:!1}),uGt={hierholzer:l(function(e){if(!Fn(e)){var r=arguments;e={root:r[0],directed:r[1]}}var n=cGt(e),a=n.root,i=n.directed,s=this,o=!1,u,h,d;a&&(d=Or(a)?this.filter(a)[0].id():a[0].id());var f={},p={};i?s.forEach(function(w){var x=w.id();if(w.isNode()){var T=w.indegree(!0),C=w.outdegree(!0),S=T-C,E=C-T;S==1?u?o=!0:u=x:E==1?h?o=!0:h=x:(E>1||S>1)&&(o=!0),f[x]=[],w.outgoers().forEach(function(k){k.isEdge()&&f[x].push(k.id())})}else p[x]=[void 0,w.target().id()]}):s.forEach(function(w){var x=w.id();if(w.isNode()){var T=w.degree(!0);T%2&&(u?h?o=!0:h=x:u=x),f[x]=[],w.connectedEdges().forEach(function(C){return f[x].push(C.id())})}else p[x]=[w.source().id(),w.target().id()]});var g={found:!1,trail:void 0};if(o)return g;if(h&&u)if(i){if(d&&h!=d)return g;d=h}else{if(d&&h!=d&&u!=d)return g;d||(d=h)}else d||(d=s[0].id());var m=l(function(x){for(var T=x,C=[x],S,E,k;f[T].length;)S=f[T].shift(),E=p[S][0],k=p[S][1],T!=k?(f[k]=f[k].filter(function(A){return A!=S}),T=k):!i&&T!=E&&(f[E]=f[E].filter(function(A){return A!=S}),T=E),C.unshift(S),C.unshift(T);return C},"walk"),y=[],v=[];for(v=m(d);v.length!=1;)f[v[0]].length==0?(y.unshift(s.getElementById(v.shift())),y.unshift(s.getElementById(v.shift()))):v=m(v.shift()).concat(v);y.unshift(s.getElementById(v.shift()));for(var b in f)if(f[b].length)return g;return g.found=!0,g.trail=this.spawn(y,!0),g},"hierholzer")},YI=l(function(){var e=this,r={},n=0,a=0,i=[],s=[],o={},u=l(function(p,g){for(var m=s.length-1,y=[],v=e.spawn();s[m].x!=p||s[m].y!=g;)y.push(s.pop().edge),m--;y.push(s.pop().edge),y.forEach(function(b){var w=b.connectedNodes().intersection(e);v.merge(b),w.forEach(function(x){var T=x.id(),C=x.connectedEdges().intersection(e);v.merge(x),r[T].cutVertex?v.merge(C.filter(function(S){return S.isLoop()})):v.merge(C)})}),i.push(v)},"buildComponent"),h=l(function(p,g,m){p===m&&(a+=1),r[g]={id:n,low:n++,cutVertex:!1};var y=e.getElementById(g).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(g)));else{var v,b,w,x;y.forEach(function(T){v=T.source().id(),b=T.target().id(),w=v===g?b:v,w!==m&&(x=T.id(),o[x]||(o[x]=!0,s.push({x:g,y:w,edge:T})),w in r?r[g].low=Math.min(r[g].low,r[w].id):(h(p,w,g),r[g].low=Math.min(r[g].low,r[w].low),r[g].id<=r[w].low&&(r[g].cutVertex=!0,u(g,w))))})}},"biconnectedSearch");e.forEach(function(f){if(f.isNode()){var p=f.id();p in r||(a=0,h(p,p),r[p].cutVertex=a>1)}});var d=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(d),components:i}},"hopcroftTarjanBiconnected"),hGt={hopcroftTarjanBiconnected:YI,htbc:YI,htb:YI,hopcroftTarjanBiconnectedComponents:YI},UI=l(function(){var e=this,r={},n=0,a=[],i=[],s=e.spawn(e),o=l(function(h){i.push(h),r[h]={index:n,low:n++,explored:!1};var d=e.getElementById(h).connectedEdges().intersection(e);if(d.forEach(function(y){var v=y.target().id();v!==h&&(v in r||o(v),r[v].explored||(r[h].low=Math.min(r[h].low,r[v].low)))}),r[h].index===r[h].low){for(var f=e.spawn();;){var p=i.pop();if(f.merge(e.getElementById(p)),r[p].low=r[h].index,r[p].explored=!0,p===h)break}var g=f.edgesWith(f),m=f.merge(g);a.push(m),s=s.difference(m)}},"stronglyConnectedSearch");return e.forEach(function(u){if(u.isNode()){var h=u.id();h in r||o(h)}}),{cut:s,components:a}},"tarjanStronglyConnected"),dGt={tarjanStronglyConnected:UI,tsc:UI,tscc:UI,tarjanStronglyConnectedComponents:UI},w_e={};[c5,WWt,VWt,qWt,UWt,KWt,QWt,SVt,_T,kT,RY,FVt,ZVt,tGt,lGt,uGt,hGt,dGt].forEach(function(t){zr(w_e,t)});var T_e=0,E_e=1,C_e=2,ju=l(function(e){if(!(this instanceof ju))return new ju(e);this.id="Thenable/1.0.7",this.state=T_e,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api");ju.prototype={fulfill:l(function(e){return S_e(this,E_e,"fulfillValue",e)},"fulfill"),reject:l(function(e){return S_e(this,C_e,"rejectReason",e)},"reject"),then:l(function(e,r){var n=this,a=new ju;return n.onFulfilled.push(A_e(e,a,"fulfill")),n.onRejected.push(A_e(r,a,"reject")),__e(n),a.proxy},"then")};var S_e=l(function(e,r,n,a){return e.state===T_e&&(e.state=r,e[n]=a,__e(e)),e},"deliver"),__e=l(function(e){e.state===E_e?k_e(e,"onFulfilled",e.fulfillValue):e.state===C_e&&k_e(e,"onRejected",e.rejectReason)},"execute"),k_e=l(function(e,r,n){if(e[r].length!==0){var a=e[r];e[r]=[];var i=l(function(){for(var o=0;o<a.length;o++)a[o](n)},"func");typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},"execute_handlers"),A_e=l(function(e,r,n){return function(a){if(typeof e!="function")r[n].call(r,a);else{var i;try{i=e(a)}catch(s){r.reject(s);return}N_e(r,i)}}},"resolver"),N_e=l(function(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var n;if(ds(r)==="object"&&r!==null||typeof r=="function")try{n=r.then}catch(i){e.reject(i);return}if(typeof n=="function"){var a=!1;try{n.call(r,function(i){a||(a=!0,i===r?e.reject(new TypeError("circular thenable chain")):N_e(e,i))},function(i){a||(a=!0,e.reject(i))})}catch(i){a||e.reject(i)}return}e.fulfill(r)},"resolve");ju.all=function(t){return new ju(function(e,r){for(var n=new Array(t.length),a=0,i=l(function(u,h){n[u]=h,a++,a===t.length&&e(n)},"fulfill"),s=0;s<t.length;s++)(function(o){var u=t[o],h=u!=null&&u.then!=null;if(h)u.then(function(f){i(o,f)},function(f){r(f)});else{var d=u;i(o,d)}})(s)})},ju.resolve=function(t){return new ju(function(e,r){e(t)})},ju.reject=function(t){return new ju(function(e,r){r(t)})};var IT=typeof Promise!="undefined"?Promise:ju,zY=l(function(e,r,n){var a=nY(e),i=!a,s=this._private=zr({duration:1e3},r,n);if(s.target=e,s.style=s.style||s.css,s.started=!1,s.playing=!1,s.hooked=!1,s.applying=!1,s.progress=0,s.completes=[],s.frames=[],s.complete&&ci(s.complete)&&s.completes.push(s.complete),i){var o=e.position();s.startPosition=s.startPosition||{x:o.x,y:o.y},s.startStyle=s.startStyle||e.cy().style().getAnimationStartStyle(e,s.style)}if(a){var u=e.pan();s.startPan={x:u.x,y:u.y},s.startZoom=e.zoom()}this.length=1,this[0]=this},"Animation"),e1=zY.prototype;zr(e1,{instanceString:l(function(){return"animation"},"instanceString"),hook:l(function(){var e=this._private;if(!e.hooked){var r,n=e.target._private.animation;e.queue?r=n.queue:r=n.current,r.push(this),Sc(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},"hook"),play:l(function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},"play"),playing:l(function(){return this._private.playing},"playing"),apply:l(function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},"apply"),applying:l(function(){return this._private.applying},"applying"),pause:l(function(){var e=this._private;return e.playing=!1,e.started=!1,this},"pause"),stop:l(function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},"stop"),rewind:l(function(){return this.progress(0)},"rewind"),fastforward:l(function(){return this.progress(1)},"fastforward"),time:l(function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},"time"),progress:l(function(e){var r=this._private,n=r.playing;return e===void 0?r.progress:(n&&this.pause(),r.progress=e,r.started=!1,n&&this.play(),this)},"progress"),completed:l(function(){return this._private.progress===1},"completed"),reverse:l(function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=l(function(h,d){var f=e[h];f!=null&&(e[h]=e[d],e[d]=f)},"swap");if(n("zoom","startZoom"),n("pan","startPan"),n("position","startPosition"),e.style)for(var a=0;a<e.style.length;a++){var i=e.style[a],s=i.name,o=e.startStyle[s];e.startStyle[s]=i,e.style[a]=o}return r&&this.play(),this},"reverse"),promise:l(function(e){var r=this._private,n;switch(e){case"frame":n=r.frames;break;default:case"complete":case"completed":n=r.completes}return new IT(function(a,i){n.push(function(){a()})})},"promise")}),e1.complete=e1.completed,e1.run=e1.play,e1.running=e1.playing;var fGt={animated:l(function(){return l(function(){var r=this,n=r.length!==void 0,a=n?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return!1;var s=a[0];if(s)return s._private.animation.current.length>0},"animatedImpl")},"animated"),clearQueue:l(function(){return l(function(){var r=this,n=r.length!==void 0,a=n?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s<a.length;s++){var o=a[s];o._private.animation.queue=[]}return this},"clearQueueImpl")},"clearQueue"),delay:l(function(){return l(function(r,n){var a=this._private.cy||this;return a.styleEnabled()?this.animate({delay:r,duration:r,complete:n}):this},"delayImpl")},"delay"),delayAnimation:l(function(){return l(function(r,n){var a=this._private.cy||this;return a.styleEnabled()?this.animation({delay:r,duration:r,complete:n}):this},"delayAnimationImpl")},"delayAnimation"),animation:l(function(){return l(function(r,n){var a=this,i=a.length!==void 0,s=i?a:[a],o=this._private.cy||this,u=!i,h=!u;if(!o.styleEnabled())return this;var d=o.style();r=zr({},r,n);var f=Object.keys(r).length===0;if(f)return new zY(s[0],r);switch(r.duration===void 0&&(r.duration=400),r.duration){case"slow":r.duration=600;break;case"fast":r.duration=200;break}if(h&&(r.style=d.getPropsList(r.style||r.css),r.css=void 0),h&&r.renderedPosition!=null){var p=r.renderedPosition,g=o.pan(),m=o.zoom();r.position=Z5e(p,m,g)}if(u&&r.panBy!=null){var y=r.panBy,v=o.pan();r.pan={x:v.x+y.x,y:v.y+y.y}}var b=r.center||r.centre;if(u&&b!=null){var w=o.getCenterPan(b.eles,r.zoom);w!=null&&(r.pan=w)}if(u&&r.fit!=null){var x=r.fit,T=o.getFitViewport(x.eles||x.boundingBox,x.padding);T!=null&&(r.pan=T.pan,r.zoom=T.zoom)}if(u&&Fn(r.zoom)){var C=o.getZoomedViewport(r.zoom);C!=null?(C.zoomed&&(r.zoom=C.zoom),C.panned&&(r.pan=C.pan)):r.zoom=null}return new zY(s[0],r)},"animationImpl")},"animation"),animate:l(function(){return l(function(r,n){var a=this,i=a.length!==void 0,s=i?a:[a],o=this._private.cy||this;if(!o.styleEnabled())return this;n&&(r=zr({},r,n));for(var u=0;u<s.length;u++){var h=s[u],d=h.animated()&&(r.queue===void 0||r.queue),f=h.animation(r,d?{queue:!0}:void 0);f.play()}return this},"animateImpl")},"animate"),stop:l(function(){return l(function(r,n){var a=this,i=a.length!==void 0,s=i?a:[a],o=this._private.cy||this;if(!o.styleEnabled())return this;for(var u=0;u<s.length;u++){for(var h=s[u],d=h._private,f=d.animation.current,p=0;p<f.length;p++){var g=f[p],m=g._private;n&&(m.duration=0)}r&&(d.animation.queue=[]),n||(d.animation.current=[])}return o.notify("draw"),this},"stopImpl")},"stop")},HY,I_e;function jI(){if(I_e)return HY;I_e=1;var t=Array.isArray;return HY=t,HY}l(jI,"requireIsArray");var WY,L_e;function pGt(){if(L_e)return WY;L_e=1;var t=jI(),e=i5(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function a(i,s){if(t(i))return!1;var o=typeof i;return o=="number"||o=="symbol"||o=="boolean"||i==null||e(i)?!0:n.test(i)||!r.test(i)||s!=null&&i in Object(s)}return l(a,"isKey"),WY=a,WY}l(pGt,"require_isKey");var VY,$_e;function gGt(){if($_e)return VY;$_e=1;var t=$5e(),e=a5(),r="[object AsyncFunction]",n="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function s(o){if(!e(o))return!1;var u=t(o);return u==n||u==a||u==r||u==i}return l(s,"isFunction"),VY=s,VY}l(gGt,"requireIsFunction");var GY,M_e;function mGt(){if(M_e)return GY;M_e=1;var t=LI(),e=t["__core-js_shared__"];return GY=e,GY}l(mGt,"require_coreJsData");var qY,P_e;function yGt(){if(P_e)return qY;P_e=1;var t=mGt(),e=function(){var n=/[^.]+$/.exec(t&&t.keys&&t.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function r(n){return!!e&&e in n}return l(r,"isMasked"),qY=r,qY}l(yGt,"require_isMasked");var YY,R_e;function vGt(){if(R_e)return YY;R_e=1;var t=Function.prototype,e=t.toString;function r(n){if(n!=null){try{return e.call(n)}catch(a){}try{return n+""}catch(a){}}return""}return l(r,"toSource"),YY=r,YY}l(vGt,"require_toSource");var UY,O_e;function bGt(){if(O_e)return UY;O_e=1;var t=gGt(),e=yGt(),r=a5(),n=vGt(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,o=Object.prototype,u=s.toString,h=o.hasOwnProperty,d=RegExp("^"+u.call(h).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!r(p)||e(p))return!1;var g=t(p)?d:i;return g.test(n(p))}return l(f,"baseIsNative"),UY=f,UY}l(bGt,"require_baseIsNative");var jY,D_e;function xGt(){if(D_e)return jY;D_e=1;function t(e,r){return e==null?void 0:e[r]}return l(t,"getValue"),jY=t,jY}l(xGt,"require_getValue");var KY,F_e;function XY(){if(F_e)return KY;F_e=1;var t=bGt(),e=xGt();function r(n,a){var i=e(n,a);return t(i)?i:void 0}return l(r,"getNative"),KY=r,KY}l(XY,"require_getNative");var ZY,B_e;function KI(){if(B_e)return ZY;B_e=1;var t=XY(),e=t(Object,"create");return ZY=e,ZY}l(KI,"require_nativeCreate");var QY,z_e;function wGt(){if(z_e)return QY;z_e=1;var t=KI();function e(){this.__data__=t?t(null):{},this.size=0}return l(e,"hashClear"),QY=e,QY}l(wGt,"require_hashClear");var JY,H_e;function TGt(){if(H_e)return JY;H_e=1;function t(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}return l(t,"hashDelete"),JY=t,JY}l(TGt,"require_hashDelete");var eU,W_e;function EGt(){if(W_e)return eU;W_e=1;var t=KI(),e="__lodash_hash_undefined__",r=Object.prototype,n=r.hasOwnProperty;function a(i){var s=this.__data__;if(t){var o=s[i];return o===e?void 0:o}return n.call(s,i)?s[i]:void 0}return l(a,"hashGet"),eU=a,eU}l(EGt,"require_hashGet");var tU,V_e;function CGt(){if(V_e)return tU;V_e=1;var t=KI(),e=Object.prototype,r=e.hasOwnProperty;function n(a){var i=this.__data__;return t?i[a]!==void 0:r.call(i,a)}return l(n,"hashHas"),tU=n,tU}l(CGt,"require_hashHas");var rU,G_e;function SGt(){if(G_e)return rU;G_e=1;var t=KI(),e="__lodash_hash_undefined__";function r(n,a){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=t&&a===void 0?e:a,this}return l(r,"hashSet"),rU=r,rU}l(SGt,"require_hashSet");var nU,q_e;function _Gt(){if(q_e)return nU;q_e=1;var t=wGt(),e=TGt(),r=EGt(),n=CGt(),a=SGt();function i(s){var o=-1,u=s==null?0:s.length;for(this.clear();++o<u;){var h=s[o];this.set(h[0],h[1])}}return l(i,"Hash"),i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,nU=i,nU}l(_Gt,"require_Hash");var aU,Y_e;function kGt(){if(Y_e)return aU;Y_e=1;function t(){this.__data__=[],this.size=0}return l(t,"listCacheClear"),aU=t,aU}l(kGt,"require_listCacheClear");var iU,U_e;function j_e(){if(U_e)return iU;U_e=1;function t(e,r){return e===r||e!==e&&r!==r}return l(t,"eq"),iU=t,iU}l(j_e,"requireEq");var sU,K_e;function XI(){if(K_e)return sU;K_e=1;var t=j_e();function e(r,n){for(var a=r.length;a--;)if(t(r[a][0],n))return a;return-1}return l(e,"assocIndexOf"),sU=e,sU}l(XI,"require_assocIndexOf");var oU,X_e;function AGt(){if(X_e)return oU;X_e=1;var t=XI(),e=Array.prototype,r=e.splice;function n(a){var i=this.__data__,s=t(i,a);if(s<0)return!1;var o=i.length-1;return s==o?i.pop():r.call(i,s,1),--this.size,!0}return l(n,"listCacheDelete"),oU=n,oU}l(AGt,"require_listCacheDelete");var lU,Z_e;function NGt(){if(Z_e)return lU;Z_e=1;var t=XI();function e(r){var n=this.__data__,a=t(n,r);return a<0?void 0:n[a][1]}return l(e,"listCacheGet"),lU=e,lU}l(NGt,"require_listCacheGet");var cU,Q_e;function IGt(){if(Q_e)return cU;Q_e=1;var t=XI();function e(r){return t(this.__data__,r)>-1}return l(e,"listCacheHas"),cU=e,cU}l(IGt,"require_listCacheHas");var uU,J_e;function LGt(){if(J_e)return uU;J_e=1;var t=XI();function e(r,n){var a=this.__data__,i=t(a,r);return i<0?(++this.size,a.push([r,n])):a[i][1]=n,this}return l(e,"listCacheSet"),uU=e,uU}l(LGt,"require_listCacheSet");var hU,eke;function $Gt(){if(eke)return hU;eke=1;var t=kGt(),e=AGt(),r=NGt(),n=IGt(),a=LGt();function i(s){var o=-1,u=s==null?0:s.length;for(this.clear();++o<u;){var h=s[o];this.set(h[0],h[1])}}return l(i,"ListCache"),i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,hU=i,hU}l($Gt,"require_ListCache");var dU,tke;function MGt(){if(tke)return dU;tke=1;var t=XY(),e=LI(),r=t(e,"Map");return dU=r,dU}l(MGt,"require_Map");var fU,rke;function PGt(){if(rke)return fU;rke=1;var t=_Gt(),e=$Gt(),r=MGt();function n(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}return l(n,"mapCacheClear"),fU=n,fU}l(PGt,"require_mapCacheClear");var pU,nke;function RGt(){if(nke)return pU;nke=1;function t(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}return l(t,"isKeyable"),pU=t,pU}l(RGt,"require_isKeyable");var gU,ake;function ZI(){if(ake)return gU;ake=1;var t=RGt();function e(r,n){var a=r.__data__;return t(n)?a[typeof n=="string"?"string":"hash"]:a.map}return l(e,"getMapData"),gU=e,gU}l(ZI,"require_getMapData");var mU,ike;function OGt(){if(ike)return mU;ike=1;var t=ZI();function e(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}return l(e,"mapCacheDelete"),mU=e,mU}l(OGt,"require_mapCacheDelete");var yU,ske;function DGt(){if(ske)return yU;ske=1;var t=ZI();function e(r){return t(this,r).get(r)}return l(e,"mapCacheGet"),yU=e,yU}l(DGt,"require_mapCacheGet");var vU,oke;function FGt(){if(oke)return vU;oke=1;var t=ZI();function e(r){return t(this,r).has(r)}return l(e,"mapCacheHas"),vU=e,vU}l(FGt,"require_mapCacheHas");var bU,lke;function BGt(){if(lke)return bU;lke=1;var t=ZI();function e(r,n){var a=t(this,r),i=a.size;return a.set(r,n),this.size+=a.size==i?0:1,this}return l(e,"mapCacheSet"),bU=e,bU}l(BGt,"require_mapCacheSet");var xU,cke;function zGt(){if(cke)return xU;cke=1;var t=PGt(),e=OGt(),r=DGt(),n=FGt(),a=BGt();function i(s){var o=-1,u=s==null?0:s.length;for(this.clear();++o<u;){var h=s[o];this.set(h[0],h[1])}}return l(i,"MapCache"),i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=a,xU=i,xU}l(zGt,"require_MapCache");var wU,uke;function HGt(){if(uke)return wU;uke=1;var t=zGt(),e="Expected a function";function r(n,a){if(typeof n!="function"||a!=null&&typeof a!="function")throw new TypeError(e);var i=l(function(){var s=arguments,o=a?a.apply(this,s):s[0],u=i.cache;if(u.has(o))return u.get(o);var h=n.apply(this,s);return i.cache=u.set(o,h)||u,h},"memoized");return i.cache=new(r.Cache||t),i}return l(r,"memoize"),r.Cache=t,wU=r,wU}l(HGt,"requireMemoize");var TU,hke;function WGt(){if(hke)return TU;hke=1;var t=HGt(),e=500;function r(n){var a=t(n,function(s){return i.size===e&&i.clear(),s}),i=a.cache;return a}return l(r,"memoizeCapped"),TU=r,TU}l(WGt,"require_memoizeCapped");var EU,dke;function fke(){if(dke)return EU;dke=1;var t=WGt(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(e,function(s,o,u,h){i.push(u?h.replace(r,"$1"):o||s)}),i});return EU=n,EU}l(fke,"require_stringToPath");var CU,pke;function gke(){if(pke)return CU;pke=1;function t(e,r){for(var n=-1,a=e==null?0:e.length,i=Array(a);++n<a;)i[n]=r(e[n],n,e);return i}return l(t,"arrayMap"),CU=t,CU}l(gke,"require_arrayMap");var SU,mke;function VGt(){if(mke)return SU;mke=1;var t=dY(),e=gke(),r=jI(),n=i5(),a=t?t.prototype:void 0,i=a?a.toString:void 0;function s(o){if(typeof o=="string")return o;if(r(o))return e(o,s)+"";if(n(o))return i?i.call(o):"";var u=o+"";return u=="0"&&1/o==-1/0?"-0":u}return l(s,"baseToString"),SU=s,SU}l(VGt,"require_baseToString");var _U,yke;function vke(){if(yke)return _U;yke=1;var t=VGt();function e(r){return r==null?"":t(r)}return l(e,"toString"),_U=e,_U}l(vke,"requireToString");var kU,bke;function xke(){if(bke)return kU;bke=1;var t=jI(),e=pGt(),r=fke(),n=vke();function a(i,s){return t(i)?i:e(i,s)?[i]:r(n(i))}return l(a,"castPath"),kU=a,kU}l(xke,"require_castPath");var AU,wke;function NU(){if(wke)return AU;wke=1;var t=i5();function e(r){if(typeof r=="string"||t(r))return r;var n=r+"";return n=="0"&&1/r==-1/0?"-0":n}return l(e,"toKey"),AU=e,AU}l(NU,"require_toKey");var IU,Tke;function GGt(){if(Tke)return IU;Tke=1;var t=xke(),e=NU();function r(n,a){a=t(a,n);for(var i=0,s=a.length;n!=null&&i<s;)n=n[e(a[i++])];return i&&i==s?n:void 0}return l(r,"baseGet"),IU=r,IU}l(GGt,"require_baseGet");var LU,Eke;function qGt(){if(Eke)return LU;Eke=1;var t=GGt();function e(r,n,a){var i=r==null?void 0:t(r,n);return i===void 0?a:i}return l(e,"get"),LU=e,LU}l(qGt,"requireGet");var YGt=qGt(),UGt=n5(YGt),$U,Cke;function jGt(){if(Cke)return $U;Cke=1;var t=XY(),e=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(n){}}();return $U=e,$U}l(jGt,"require_defineProperty");var MU,Ske;function KGt(){if(Ske)return MU;Ske=1;var t=jGt();function e(r,n,a){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:a,writable:!0}):r[n]=a}return l(e,"baseAssignValue"),MU=e,MU}l(KGt,"require_baseAssignValue");var PU,_ke;function XGt(){if(_ke)return PU;_ke=1;var t=KGt(),e=j_e(),r=Object.prototype,n=r.hasOwnProperty;function a(i,s,o){var u=i[s];(!(n.call(i,s)&&e(u,o))||o===void 0&&!(s in i))&&t(i,s,o)}return l(a,"assignValue"),PU=a,PU}l(XGt,"require_assignValue");var RU,kke;function ZGt(){if(kke)return RU;kke=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,a){var i=typeof n;return a=a==null?t:a,!!a&&(i=="number"||i!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<a}return l(r,"isIndex"),RU=r,RU}l(ZGt,"require_isIndex");var OU,Ake;function QGt(){if(Ake)return OU;Ake=1;var t=XGt(),e=xke(),r=ZGt(),n=a5(),a=NU();function i(s,o,u,h){if(!n(s))return s;o=e(o,s);for(var d=-1,f=o.length,p=f-1,g=s;g!=null&&++d<f;){var m=a(o[d]),y=u;if(m==="__proto__"||m==="constructor"||m==="prototype")return s;if(d!=p){var v=g[m];y=h?h(v,m,g):void 0,y===void 0&&(y=n(v)?v:r(o[d+1])?[]:{})}t(g,m,y),g=g[m]}return s}return l(i,"baseSet"),OU=i,OU}l(QGt,"require_baseSet");var DU,Nke;function JGt(){if(Nke)return DU;Nke=1;var t=QGt();function e(r,n,a){return r==null?r:t(r,n,a)}return l(e,"set"),DU=e,DU}l(JGt,"requireSet");var eqt=JGt(),tqt=n5(eqt),FU,Ike;function rqt(){if(Ike)return FU;Ike=1;function t(e,r){var n=-1,a=e.length;for(r||(r=Array(a));++n<a;)r[n]=e[n];return r}return l(t,"copyArray"),FU=t,FU}l(rqt,"require_copyArray");var BU,Lke;function nqt(){if(Lke)return BU;Lke=1;var t=gke(),e=rqt(),r=jI(),n=i5(),a=fke(),i=NU(),s=vke();function o(u){return r(u)?t(u,i):n(u)?[u]:e(a(s(u)))}return l(o,"toPath"),BU=o,BU}l(nqt,"requireToPath");var aqt=nqt(),iqt=n5(aqt),sqt={data:l(function(e){var r={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:l(function(a){},"beforeGet"),beforeSet:l(function(a,i){},"beforeSet"),onSet:l(function(a){},"onSet"),canSet:l(function(a){return!0},"canSet")};return e=zr({},r,e),l(function(a,i){var s=e,o=this,u=o.length!==void 0,h=u?o:[o],d=u?o[0]:o;if(Or(a)){var f=a.indexOf(".")!==-1,p=f&&iqt(a);if(s.allowGetting&&i===void 0){var g;return d&&(s.beforeGet(d),p&&d._private[s.field][a]===void 0?g=UGt(d._private[s.field],p):g=d._private[s.field][a]),g}else if(s.allowSetting&&i!==void 0){var m=!s.immutableKeys[a];if(m){var y=u5e({},a,i);s.beforeSet(o,y);for(var v=0,b=h.length;v<b;v++){var w=h[v];s.canSet(w)&&(p&&d._private[s.field][a]===void 0?tqt(w._private[s.field],p,i):w._private[s.field][a]=i)}s.updateStyle&&o.updateStyle(),s.onSet(o),s.settingTriggersEvent&&o[s.triggerFnName](s.settingEvent)}}}else if(s.allowSetting&&Fn(a)){var x=a,T,C,S=Object.keys(x);s.beforeSet(o,x);for(var E=0;E<S.length;E++){T=S[E],C=x[T];var k=!s.immutableKeys[T];if(k)for(var A=0;A<h.length;A++){var I=h[A];s.canSet(I)&&(I._private[s.field][T]=C)}}s.updateStyle&&o.updateStyle(),s.onSet(o),s.settingTriggersEvent&&o[s.triggerFnName](s.settingEvent)}else if(s.allowBinding&&ci(a)){var L=a;o.on(s.bindingEvent,L)}else if(s.allowGetting&&a===void 0){var R;return d&&(s.beforeGet(d),R=d._private[s.field]),R}return o},"dataImpl")},"data"),removeData:l(function(e){var r={field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!1,immutableKeys:{}};return e=zr({},r,e),l(function(a){var i=e,s=this,o=s.length!==void 0,u=o?s:[s];if(Or(a)){for(var h=a.split(/\s+/),d=h.length,f=0;f<d;f++){var p=h[f];if(!bp(p)){var g=!i.immutableKeys[p];if(g)for(var m=0,y=u.length;m<y;m++)u[m]._private[i.field][p]=void 0}}i.triggerEvent&&s[i.triggerFnName](i.event)}else if(a===void 0){for(var v=0,b=u.length;v<b;v++)for(var w=u[v]._private[i.field],x=Object.keys(w),T=0;T<x.length;T++){var C=x[T],S=!i.immutableKeys[C];S&&(w[C]=void 0)}i.triggerEvent&&s[i.triggerFnName](i.event)}return s},"removeDataImpl")},"removeData")},oqt={eventAliasesOn:l(function(e){var r=e;r.addListener=r.listen=r.bind=r.on,r.unlisten=r.unbind=r.off=r.removeListener,r.trigger=r.emit,r.pon=r.promiseOn=function(n,a){var i=this,s=Array.prototype.slice.call(arguments,0);return new IT(function(o,u){var h=l(function(g){i.off.apply(i,f),o(g)},"callback"),d=s.concat([h]),f=d.concat([]);i.on.apply(i,d)})}},"eventAliasesOn")},aa={};[fGt,sqt,oqt].forEach(function(t){zr(aa,t)});var lqt={animate:aa.animate(),animation:aa.animation(),animated:aa.animated(),clearQueue:aa.clearQueue(),delay:aa.delay(),delayAnimation:aa.delayAnimation(),stop:aa.stop()},QI={classes:l(function(e){var r=this;if(e===void 0){var n=[];return r[0]._private.classes.forEach(function(m){return n.push(m)}),n}else _a(e)||(e=(e||"").match(/\S+/g)||[]);for(var a=[],i=new ET(e),s=0;s<r.length;s++){for(var o=r[s],u=o._private,h=u.classes,d=!1,f=0;f<e.length;f++){var p=e[f],g=h.has(p);if(!g){d=!0;break}}d||(d=h.size!==e.length),d&&(u.classes=i,a.push(o))}return a.length>0&&this.spawn(a).updateStyle().emit("class"),r},"classes"),addClass:l(function(e){return this.toggleClass(e,!0)},"addClass"),hasClass:l(function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},"hasClass"),toggleClass:l(function(e,r){_a(e)||(e=e.match(/\S+/g)||[]);for(var n=this,a=r===void 0,i=[],s=0,o=n.length;s<o;s++)for(var u=n[s],h=u._private.classes,d=!1,f=0;f<e.length;f++){var p=e[f],g=h.has(p),m=!1;r||a&&!g?(h.add(p),m=!0):(!r||a&&g)&&(h.delete(p),m=!0),!d&&m&&(i.push(u),d=!0)}return i.length>0&&this.spawn(i).updateStyle().emit("class"),n},"toggleClass"),removeClass:l(function(e){return this.toggleClass(e,!1)},"removeClass"),flashClass:l(function(e,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},r),n},"flashClass")};QI.className=QI.classNames=QI.classes;var Bn={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:ps,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Bn.variable="(?:[\\w-.]|(?:\\\\"+Bn.metaChar+"))+",Bn.className="(?:[\\w-]|(?:\\\\"+Bn.metaChar+"))+",Bn.value=Bn.string+"|"+Bn.number,Bn.id=Bn.variable,function(){var t,e,r;for(t=Bn.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],Bn.comparatorOp+="|@"+e;for(t=Bn.comparatorOp.split("|"),r=0;r<t.length;r++)e=t[r],!(e.indexOf("!")>=0)&&e!=="="&&(Bn.comparatorOp+="|\\!"+e)}();var ya=l(function(){return{checks:[]}},"newQuery"),kr={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},zU=[{selector:":selected",matches:l(function(e){return e.selected()},"matches")},{selector:":unselected",matches:l(function(e){return!e.selected()},"matches")},{selector:":selectable",matches:l(function(e){return e.selectable()},"matches")},{selector:":unselectable",matches:l(function(e){return!e.selectable()},"matches")},{selector:":locked",matches:l(function(e){return e.locked()},"matches")},{selector:":unlocked",matches:l(function(e){return!e.locked()},"matches")},{selector:":visible",matches:l(function(e){return e.visible()},"matches")},{selector:":hidden",matches:l(function(e){return!e.visible()},"matches")},{selector:":transparent",matches:l(function(e){return e.transparent()},"matches")},{selector:":grabbed",matches:l(function(e){return e.grabbed()},"matches")},{selector:":free",matches:l(function(e){return!e.grabbed()},"matches")},{selector:":removed",matches:l(function(e){return e.removed()},"matches")},{selector:":inside",matches:l(function(e){return!e.removed()},"matches")},{selector:":grabbable",matches:l(function(e){return e.grabbable()},"matches")},{selector:":ungrabbable",matches:l(function(e){return!e.grabbable()},"matches")},{selector:":animated",matches:l(function(e){return e.animated()},"matches")},{selector:":unanimated",matches:l(function(e){return!e.animated()},"matches")},{selector:":parent",matches:l(function(e){return e.isParent()},"matches")},{selector:":childless",matches:l(function(e){return e.isChildless()},"matches")},{selector:":child",matches:l(function(e){return e.isChild()},"matches")},{selector:":orphan",matches:l(function(e){return e.isOrphan()},"matches")},{selector:":nonorphan",matches:l(function(e){return e.isChild()},"matches")},{selector:":compound",matches:l(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},"matches")},{selector:":loop",matches:l(function(e){return e.isLoop()},"matches")},{selector:":simple",matches:l(function(e){return e.isSimple()},"matches")},{selector:":active",matches:l(function(e){return e.active()},"matches")},{selector:":inactive",matches:l(function(e){return!e.active()},"matches")},{selector:":backgrounding",matches:l(function(e){return e.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:l(function(e){return!e.backgrounding()},"matches")}].sort(function(t,e){return sWt(t.selector,e.selector)}),cqt=function(){for(var t={},e,r=0;r<zU.length;r++)e=zU[r],t[e.selector]=e.matches;return t}(),uqt=l(function(e,r){return cqt[e](r)},"stateSelectorMatches"),hqt="("+zU.map(function(t){return t.selector}).join("|")+")",LT=l(function(e){return e.replace(new RegExp("\\\\("+Bn.metaChar+")","g"),function(r,n){return n})},"cleanMetaChars"),_p=l(function(e,r,n){e[e.length-1]=n},"replaceLastQuery"),HU=[{name:"group",query:!0,regex:"("+Bn.group+")",populate:l(function(e,r,n){var a=Ji(n,1),i=a[0];r.checks.push({type:kr.GROUP,value:i==="*"?i:i+"s"})},"populate")},{name:"state",query:!0,regex:hqt,populate:l(function(e,r,n){var a=Ji(n,1),i=a[0];r.checks.push({type:kr.STATE,value:i})},"populate")},{name:"id",query:!0,regex:"\\#("+Bn.id+")",populate:l(function(e,r,n){var a=Ji(n,1),i=a[0];r.checks.push({type:kr.ID,value:LT(i)})},"populate")},{name:"className",query:!0,regex:"\\.("+Bn.className+")",populate:l(function(e,r,n){var a=Ji(n,1),i=a[0];r.checks.push({type:kr.CLASS,value:LT(i)})},"populate")},{name:"dataExists",query:!0,regex:"\\[\\s*("+Bn.variable+")\\s*\\]",populate:l(function(e,r,n){var a=Ji(n,1),i=a[0];r.checks.push({type:kr.DATA_EXIST,field:LT(i)})},"populate")},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Bn.variable+")\\s*("+Bn.comparatorOp+")\\s*("+Bn.value+")\\s*\\]",populate:l(function(e,r,n){var a=Ji(n,3),i=a[0],s=a[1],o=a[2],u=new RegExp("^"+Bn.string+"$").exec(o)!=null;u?o=o.substring(1,o.length-1):o=parseFloat(o),r.checks.push({type:kr.DATA_COMPARE,field:LT(i),operator:s,value:o})},"populate")},{name:"dataBool",query:!0,regex:"\\[\\s*("+Bn.boolOp+")\\s*("+Bn.variable+")\\s*\\]",populate:l(function(e,r,n){var a=Ji(n,2),i=a[0],s=a[1];r.checks.push({type:kr.DATA_BOOL,field:LT(s),operator:i})},"populate")},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Bn.meta+")\\s*("+Bn.comparatorOp+")\\s*("+Bn.number+")\\s*\\]\\]",populate:l(function(e,r,n){var a=Ji(n,3),i=a[0],s=a[1],o=a[2];r.checks.push({type:kr.META_COMPARE,field:LT(i),operator:s,value:parseFloat(o)})},"populate")},{name:"nextQuery",separator:!0,regex:Bn.separator,populate:l(function(e,r){var n=e.currentSubject,a=e.edgeCount,i=e.compoundCount,s=e[e.length-1];n!=null&&(s.subject=n,e.currentSubject=null),s.edgeCount=a,s.compoundCount=i,e.edgeCount=0,e.compoundCount=0;var o=e[e.length++]=ya();return o},"populate")},{name:"directedEdge",separator:!0,regex:Bn.directedEdge,populate:l(function(e,r){if(e.currentSubject==null){var n=ya(),a=r,i=ya();return n.checks.push({type:kr.DIRECTED_EDGE,source:a,target:i}),_p(e,r,n),e.edgeCount++,i}else{var s=ya(),o=r,u=ya();return s.checks.push({type:kr.NODE_SOURCE,source:o,target:u}),_p(e,r,s),e.edgeCount++,u}},"populate")},{name:"undirectedEdge",separator:!0,regex:Bn.undirectedEdge,populate:l(function(e,r){if(e.currentSubject==null){var n=ya(),a=r,i=ya();return n.checks.push({type:kr.UNDIRECTED_EDGE,nodes:[a,i]}),_p(e,r,n),e.edgeCount++,i}else{var s=ya(),o=r,u=ya();return s.checks.push({type:kr.NODE_NEIGHBOR,node:o,neighbor:u}),_p(e,r,s),u}},"populate")},{name:"child",separator:!0,regex:Bn.child,populate:l(function(e,r){if(e.currentSubject==null){var n=ya(),a=ya(),i=e[e.length-1];return n.checks.push({type:kr.CHILD,parent:i,child:a}),_p(e,r,n),e.compoundCount++,a}else if(e.currentSubject===r){var s=ya(),o=e[e.length-1],u=ya(),h=ya(),d=ya(),f=ya();return s.checks.push({type:kr.COMPOUND_SPLIT,left:o,right:u,subject:h}),h.checks=r.checks,r.checks=[{type:kr.TRUE}],f.checks.push({type:kr.TRUE}),u.checks.push({type:kr.PARENT,parent:f,child:d}),_p(e,o,s),e.currentSubject=h,e.compoundCount++,d}else{var p=ya(),g=ya(),m=[{type:kr.PARENT,parent:p,child:g}];return p.checks=r.checks,r.checks=m,e.compoundCount++,g}},"populate")},{name:"descendant",separator:!0,regex:Bn.descendant,populate:l(function(e,r){if(e.currentSubject==null){var n=ya(),a=ya(),i=e[e.length-1];return n.checks.push({type:kr.DESCENDANT,ancestor:i,descendant:a}),_p(e,r,n),e.compoundCount++,a}else if(e.currentSubject===r){var s=ya(),o=e[e.length-1],u=ya(),h=ya(),d=ya(),f=ya();return s.checks.push({type:kr.COMPOUND_SPLIT,left:o,right:u,subject:h}),h.checks=r.checks,r.checks=[{type:kr.TRUE}],f.checks.push({type:kr.TRUE}),u.checks.push({type:kr.ANCESTOR,ancestor:f,descendant:d}),_p(e,o,s),e.currentSubject=h,e.compoundCount++,d}else{var p=ya(),g=ya(),m=[{type:kr.ANCESTOR,ancestor:p,descendant:g}];return p.checks=r.checks,r.checks=m,e.compoundCount++,g}},"populate")},{name:"subject",modifier:!0,regex:Bn.subject,populate:l(function(e,r){if(e.currentSubject!=null&&e.currentSubject!==r)return na("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=r;var n=e[e.length-1],a=n.checks[0],i=a==null?null:a.type;i===kr.DIRECTED_EDGE?a.type=kr.NODE_TARGET:i===kr.UNDIRECTED_EDGE&&(a.type=kr.NODE_NEIGHBOR,a.node=a.nodes[1],a.neighbor=a.nodes[0],a.nodes=null)},"populate")}];HU.forEach(function(t){return t.regexObj=new RegExp("^"+t.regex)});var dqt=l(function(e){for(var r,n,a,i=0;i<HU.length;i++){var s=HU[i],o=s.name,u=e.match(s.regexObj);if(u!=null){n=u,r=s,a=o;var h=u[0];e=e.substring(h.length);break}}return{expr:r,match:n,name:a,remaining:e}},"consumeExpr"),fqt=l(function(e){var r=e.match(/^\s+/);if(r){var n=r[0];e=e.substring(n.length)}return e},"consumeWhitespace"),pqt=l(function(e){var r=this,n=r.inputText=e,a=r[0]=ya();for(r.length=1,n=fqt(n);;){var i=dqt(n);if(i.expr==null)return na("The selector `"+e+"`is invalid"),!1;var s=i.match.slice(1),o=i.expr.populate(r,a,s);if(o===!1)return!1;if(o!=null&&(a=o),n=i.remaining,n.match(/^\s*$/))break}var u=r[r.length-1];r.currentSubject!=null&&(u.subject=r.currentSubject),u.edgeCount=r.edgeCount,u.compoundCount=r.compoundCount;for(var h=0;h<r.length;h++){var d=r[h];if(d.compoundCount>0&&d.edgeCount>0)return na("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(d.edgeCount>1)return na("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;d.edgeCount===1&&na("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},"parse"),gqt=l(function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=l(function(d){return d==null?"":d},"clean"),r=l(function(d){return Or(d)?'"'+d+'"':e(d)},"cleanVal"),n=l(function(d){return" "+d+" "},"space"),a=l(function(d,f){var p=d.type,g=d.value;switch(p){case kr.GROUP:{var m=e(g);return m.substring(0,m.length-1)}case kr.DATA_COMPARE:{var y=d.field,v=d.operator;return"["+y+n(e(v))+r(g)+"]"}case kr.DATA_BOOL:{var b=d.operator,w=d.field;return"["+e(b)+w+"]"}case kr.DATA_EXIST:{var x=d.field;return"["+x+"]"}case kr.META_COMPARE:{var T=d.operator,C=d.field;return"[["+C+n(e(T))+r(g)+"]]"}case kr.STATE:return g;case kr.ID:return"#"+g;case kr.CLASS:return"."+g;case kr.PARENT:case kr.CHILD:return i(d.parent,f)+n(">")+i(d.child,f);case kr.ANCESTOR:case kr.DESCENDANT:return i(d.ancestor,f)+" "+i(d.descendant,f);case kr.COMPOUND_SPLIT:{var S=i(d.left,f),E=i(d.subject,f),k=i(d.right,f);return S+(S.length>0?" ":"")+E+k}case kr.TRUE:return""}},"checkToString"),i=l(function(d,f){return d.checks.reduce(function(p,g,m){return p+(f===d&&m===0?"$":"")+a(g,f)},"")},"queryToString"),s="",o=0;o<this.length;o++){var u=this[o];s+=i(u,u.subject),this.length>1&&o<this.length-1&&(s+=", ")}return this.toStringCache=s,s},"toString"),mqt={parse:pqt,toString:gqt},$ke=l(function(e,r,n){var a,i=Or(e),s=mr(e),o=Or(n),u,h,d=!1,f=!1,p=!1;switch(r.indexOf("!")>=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),d=!0),(i||o||d)&&(u=!i&&!s?"":""+e,h=""+n),d&&(e=u=u.toLowerCase(),n=h=h.toLowerCase()),r){case"*=":a=u.indexOf(h)>=0;break;case"$=":a=u.indexOf(h,u.length-h.length)>=0;break;case"^=":a=u.indexOf(h)===0;break;case"=":a=e===n;break;case">":p=!0,a=e>n;break;case">=":p=!0,a=e>=n;break;case"<":p=!0,a=e<n;break;case"<=":p=!0,a=e<=n;break;default:a=!1;break}return f&&(e!=null||!p)&&(a=!a),a},"valCmp"),yqt=l(function(e,r){switch(r){case"?":return!!e;case"!":return!e;case"^":return e===void 0}},"boolCmp"),vqt=l(function(e){return e!==void 0},"existCmp"),WU=l(function(e,r){return e.data(r)},"data"),bqt=l(function(e,r){return e[r]()},"meta"),Ei=[],Ya=l(function(e,r){return e.checks.every(function(n){return Ei[n.type](n,r)})},"matches");Ei[kr.GROUP]=function(t,e){var r=t.value;return r==="*"||r===e.group()},Ei[kr.STATE]=function(t,e){var r=t.value;return uqt(r,e)},Ei[kr.ID]=function(t,e){var r=t.value;return e.id()===r},Ei[kr.CLASS]=function(t,e){var r=t.value;return e.hasClass(r)},Ei[kr.META_COMPARE]=function(t,e){var r=t.field,n=t.operator,a=t.value;return $ke(bqt(e,r),n,a)},Ei[kr.DATA_COMPARE]=function(t,e){var r=t.field,n=t.operator,a=t.value;return $ke(WU(e,r),n,a)},Ei[kr.DATA_BOOL]=function(t,e){var r=t.field,n=t.operator;return yqt(WU(e,r),n)},Ei[kr.DATA_EXIST]=function(t,e){var r=t.field;return t.operator,vqt(WU(e,r))},Ei[kr.UNDIRECTED_EDGE]=function(t,e){var r=t.nodes[0],n=t.nodes[1],a=e.source(),i=e.target();return Ya(r,a)&&Ya(n,i)||Ya(n,a)&&Ya(r,i)},Ei[kr.NODE_NEIGHBOR]=function(t,e){return Ya(t.node,e)&&e.neighborhood().some(function(r){return r.isNode()&&Ya(t.neighbor,r)})},Ei[kr.DIRECTED_EDGE]=function(t,e){return Ya(t.source,e.source())&&Ya(t.target,e.target())},Ei[kr.NODE_SOURCE]=function(t,e){return Ya(t.source,e)&&e.outgoers().some(function(r){return r.isNode()&&Ya(t.target,r)})},Ei[kr.NODE_TARGET]=function(t,e){return Ya(t.target,e)&&e.incomers().some(function(r){return r.isNode()&&Ya(t.source,r)})},Ei[kr.CHILD]=function(t,e){return Ya(t.child,e)&&Ya(t.parent,e.parent())},Ei[kr.PARENT]=function(t,e){return Ya(t.parent,e)&&e.children().some(function(r){return Ya(t.child,r)})},Ei[kr.DESCENDANT]=function(t,e){return Ya(t.descendant,e)&&e.ancestors().some(function(r){return Ya(t.ancestor,r)})},Ei[kr.ANCESTOR]=function(t,e){return Ya(t.ancestor,e)&&e.descendants().some(function(r){return Ya(t.descendant,r)})},Ei[kr.COMPOUND_SPLIT]=function(t,e){return Ya(t.subject,e)&&Ya(t.left,e)&&Ya(t.right,e)},Ei[kr.TRUE]=function(){return!0},Ei[kr.COLLECTION]=function(t,e){var r=t.value;return r.has(e)},Ei[kr.FILTER]=function(t,e){var r=t.value;return r(e)};var xqt=l(function(e){var r=this;if(r.length===1&&r[0].checks.length===1&&r[0].checks[0].type===kr.ID)return e.getElementById(r[0].checks[0].value).collection();var n=l(function(i){for(var s=0;s<r.length;s++){var o=r[s];if(Ya(o,i))return!0}return!1},"selectorFunction");return r.text()==null&&(n=l(function(){return!0},"selectorFunction")),e.filter(n)},"filter"),wqt=l(function(e){for(var r=this,n=0;n<r.length;n++){var a=r[n];if(Ya(a,e))return!0}return!1},"matches"),Tqt={matches:wqt,filter:xqt},kp=l(function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||Or(e)&&e.match(/^\s*$/)||(Sc(e)?this.addQuery({checks:[{type:kr.COLLECTION,value:e.collection()}]}):ci(e)?this.addQuery({checks:[{type:kr.FILTER,value:e}]}):Or(e)?this.parse(e)||(this.invalid=!0):ni("A selector must be created from a string; found "))},"Selector"),Ap=kp.prototype;[mqt,Tqt].forEach(function(t){return zr(Ap,t)}),Ap.text=function(){return this.inputText},Ap.size=function(){return this.length},Ap.eq=function(t){return this[t]},Ap.sameText=function(t){return!this.invalid&&!t.invalid&&this.text()===t.text()},Ap.addQuery=function(t){this[this.length++]=t},Ap.selector=Ap.toString;var Np={allAre:l(function(e){var r=new kp(e);return this.every(function(n){return r.matches(n)})},"allAre"),is:l(function(e){var r=new kp(e);return this.some(function(n){return r.matches(n)})},"is"),some:l(function(e,r){for(var n=0;n<this.length;n++){var a=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(a)return!0}return!1},"some"),every:l(function(e,r){for(var n=0;n<this.length;n++){var a=r?e.apply(r,[this[n],n,this]):e(this[n],n,this);if(!a)return!1}return!0},"every"),same:l(function(e){if(this===e)return!0;e=this.cy().collection(e);var r=this.length,n=e.length;return r!==n?!1:r===1?this[0]===e[0]:this.every(function(a){return e.hasElementWithId(a.id())})},"same"),anySame:l(function(e){return e=this.cy().collection(e),this.some(function(r){return e.hasElementWithId(r.id())})},"anySame"),allAreNeighbors:l(function(e){e=this.cy().collection(e);var r=this.neighborhood();return e.every(function(n){return r.hasElementWithId(n.id())})},"allAreNeighbors"),contains:l(function(e){e=this.cy().collection(e);var r=this;return e.every(function(n){return r.hasElementWithId(n.id())})},"contains")};Np.allAreNeighbours=Np.allAreNeighbors,Np.has=Np.contains,Np.equal=Np.equals=Np.same;var nu=l(function(e,r){return l(function(a,i,s,o){var u=a,h=this,d;if(u==null?d="":Sc(u)&&u.length===1&&(d=u.id()),h.length===1&&d){var f=h[0]._private,p=f.traversalCache=f.traversalCache||{},g=p[r]=p[r]||[],m=Xm(d),y=g[m];return y||(g[m]=e.call(h,a,i,s,o))}else return e.call(h,a,i,s,o)},"traversalCache")},"cache"),$T={parent:l(function(e){var r=[];if(this.length===1){var n=this[0]._private.parent;if(n)return n}for(var a=0;a<this.length;a++){var i=this[a],s=i._private.parent;s&&r.push(s)}return this.spawn(r,!0).filter(e)},"parent"),parents:l(function(e){for(var r=[],n=this.parent();n.nonempty();){for(var a=0;a<n.length;a++){var i=n[a];r.push(i)}n=n.parent()}return this.spawn(r,!0).filter(e)},"parents"),commonAncestors:l(function(e){for(var r,n=0;n<this.length;n++){var a=this[n],i=a.parents();r=r||i,r=r.intersect(i)}return r.filter(e)},"commonAncestors"),orphans:l(function(e){return this.stdFilter(function(r){return r.isOrphan()}).filter(e)},"orphans"),nonorphans:l(function(e){return this.stdFilter(function(r){return r.isChild()}).filter(e)},"nonorphans"),children:nu(function(t){for(var e=[],r=0;r<this.length;r++)for(var n=this[r],a=n._private.children,i=0;i<a.length;i++)e.push(a[i]);return this.spawn(e,!0).filter(t)},"children"),siblings:l(function(e){return this.parent().children().not(this).filter(e)},"siblings"),isParent:l(function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0},"isParent"),isChildless:l(function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0},"isChildless"),isChild:l(function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null},"isChild"),isOrphan:l(function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null},"isOrphan"),descendants:l(function(e){var r=[];function n(a){for(var i=0;i<a.length;i++){var s=a[i];r.push(s),s.children().nonempty()&&n(s.children())}}return l(n,"add"),n(this.children()),this.spawn(r,!0).filter(e)},"descendants")};function VU(t,e,r,n){for(var a=[],i=new ET,s=t.cy(),o=s.hasCompoundNodes(),u=0;u<t.length;u++){var h=t[u];r?a.push(h):o&&n(a,i,h)}for(;a.length>0;){var d=a.shift();e(d),i.add(d.id()),o&&n(a,i,d)}return t}l(VU,"forEachCompound");function Mke(t,e,r){if(r.isParent())for(var n=r._private.children,a=0;a<n.length;a++){var i=n[a];e.has(i.id())||t.push(i)}}l(Mke,"addChildren"),$T.forEachDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return VU(this,t,e,Mke)};function Pke(t,e,r){if(r.isChild()){var n=r._private.parent;e.has(n.id())||t.push(n)}}l(Pke,"addParent"),$T.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return VU(this,t,e,Pke)};function Eqt(t,e,r){Pke(t,e,r),Mke(t,e,r)}l(Eqt,"addParentAndChildren"),$T.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return VU(this,t,e,Eqt)},$T.ancestors=$T.parents;var g5,Rke;g5=Rke={data:aa.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:aa.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:aa.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:aa.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:aa.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:aa.removeData({field:"rscratch",triggerEvent:!1}),id:l(function(){var e=this[0];if(e)return e._private.data.id},"id")},g5.attr=g5.data,g5.removeAttr=g5.removeData;var Cqt=Rke,JI={};function GU(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var n=0,a=r[0],i=a._private.edges,s=0;s<i.length;s++){var o=i[s];!e&&o.isLoop()||(n+=t(a,o))}return n}else return}}l(GU,"defineDegreeFunction"),zr(JI,{degree:GU(function(t,e){return e.source().same(e.target())?2:1}),indegree:GU(function(t,e){return e.target().same(t)?1:0}),outdegree:GU(function(t,e){return e.source().same(t)?1:0})});function MT(t,e){return function(r){for(var n,a=this.nodes(),i=0;i<a.length;i++){var s=a[i],o=s[t](r);o!==void 0&&(n===void 0||e(o,n))&&(n=o)}return n}}l(MT,"defineDegreeBoundsFunction"),zr(JI,{minDegree:MT("degree",function(t,e){return t<e}),maxDegree:MT("degree",function(t,e){return t>e}),minIndegree:MT("indegree",function(t,e){return t<e}),maxIndegree:MT("indegree",function(t,e){return t>e}),minOutdegree:MT("outdegree",function(t,e){return t<e}),maxOutdegree:MT("outdegree",function(t,e){return t>e})}),zr(JI,{totalDegree:l(function(e){for(var r=0,n=this.nodes(),a=0;a<n.length;a++)r+=n[a].degree(e);return r},"totalDegree")});var Ku,Oke,Dke=l(function(e,r,n){for(var a=0;a<e.length;a++){var i=e[a];if(!i.locked()){var s=i._private.position,o={x:r.x!=null?r.x-s.x:0,y:r.y!=null?r.y-s.y:0};i.isParent()&&!(o.x===0&&o.y===0)&&i.children().shift(o,n),i.dirtyBoundingBoxCache()}}},"beforePositionSet"),Fke={field:"position",bindingEvent:"position",allowBinding:!0,allowSetting:!0,settingEvent:"position",settingTriggersEvent:!0,triggerFnName:"emitAndNotify",allowGetting:!0,validKeys:["x","y"],beforeGet:l(function(e){e.updateCompoundBounds()},"beforeGet"),beforeSet:l(function(e,r){Dke(e,r,!1)},"beforeSet"),onSet:l(function(e){e.dirtyCompoundBoundsCache()},"onSet"),canSet:l(function(e){return!e.locked()},"canSet")};Ku=Oke={position:aa.data(Fke),silentPosition:aa.data(zr({},Fke,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:l(function(e,r){Dke(e,r,!0)},"beforeSet"),onSet:l(function(e){e.dirtyCompoundBoundsCache()},"onSet")})),positions:l(function(e,r){if(Fn(e))r?this.silentPosition(e):this.position(e);else if(ci(e)){var n=e,a=this.cy();a.startBatch();for(var i=0;i<this.length;i++){var s=this[i],o=void 0;(o=n(s,i))&&(r?s.silentPosition(o):s.position(o))}a.endBatch()}return this},"positions"),silentPositions:l(function(e){return this.positions(e,!0)},"silentPositions"),shift:l(function(e,r,n){var a;if(Fn(e)?(a={x:mr(e.x)?e.x:0,y:mr(e.y)?e.y:0},n=r):Or(e)&&mr(r)&&(a={x:0,y:0},a[e]=r),a!=null){var i=this.cy();i.startBatch();for(var s=0;s<this.length;s++){var o=this[s];if(!(i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this))){var u=o.position(),h={x:u.x+a.x,y:u.y+a.y};n?o.silentPosition(h):o.position(h)}}i.endBatch()}return this},"shift"),silentShift:l(function(e,r){return Fn(e)?this.shift(e,!0):Or(e)&&mr(r)&&this.shift(e,r,!0),this},"silentShift"),renderedPosition:l(function(e,r){var n=this[0],a=this.cy(),i=a.zoom(),s=a.pan(),o=Fn(e)?e:void 0,u=o!==void 0||r!==void 0&&Or(e);if(n&&n.isNode())if(u)for(var h=0;h<this.length;h++){var d=this[h];r!==void 0?d.position(e,(r-s[e])/i):o!==void 0&&d.position(Z5e(o,i,s))}else{var f=n.position();return o=DI(f,i,s),e===void 0?o:o[e]}else if(!u)return;return this},"renderedPosition"),relativePosition:l(function(e,r){var n=this[0],a=this.cy(),i=Fn(e)?e:void 0,s=i!==void 0||r!==void 0&&Or(e),o=a.hasCompoundNodes();if(n&&n.isNode())if(s)for(var u=0;u<this.length;u++){var h=this[u],d=o?h.parent():null,f=d&&d.length>0,p=f;f&&(d=d[0]);var g=p?d.position():{x:0,y:0};r!==void 0?h.position(e,r+g[e]):i!==void 0&&h.position({x:i.x+g.x,y:i.y+g.y})}else{var m=n.position(),y=o?n.parent():null,v=y&&y.length>0,b=v;v&&(y=y[0]);var w=b?y.position():{x:0,y:0};return i={x:m.x-w.x,y:m.y-w.y},e===void 0?i:i[e]}else if(!s)return;return this},"relativePosition")},Ku.modelPosition=Ku.point=Ku.position,Ku.modelPositions=Ku.points=Ku.positions,Ku.renderedPoint=Ku.renderedPosition,Ku.relativePoint=Ku.relativePosition;var Sqt=Oke,PT=l(function(e){switch(e){case"left":case"right-inside":return"left";case"right":case"left-inside":return"right";default:return"center"}},"labelHalign"),RT=l(function(e){switch(e){case"top":case"bottom-inside":return"top";case"bottom":case"top-inside":return"bottom";default:return"center"}},"labelValign"),_qt=l(function(e){switch(e){case"left":return"right";case"right":return"left";case"left-inside":return"left";case"right-inside":return"right";default:return"center"}},"labelJustification"),OT,Ip;OT=Ip={},Ip.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),n=r.zoom(),a=r.pan(),i=e.x1*n+a.x,s=e.x2*n+a.x,o=e.y1*n+a.y,u=e.y2*n+a.y;return{x1:i,x2:s,y1:o,y2:u,w:s-i,h:u-o}},Ip.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,t||r.emitAndNotify("bounds")}}),this)},Ip.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,u=s.children(),h=s.pstyle("compound-sizing-wrt-labels").value==="include",d={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=u.boundingBox({includeLabels:h,includeOverlays:!1,useCache:!1}),p=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=p.x-f.w/2,f.x2=p.x+f.w/2,f.y1=p.y-f.h/2,f.y2=p.y+f.h/2);function g(A,I,L){var R=0,O=0,M=I+L;return A>0&&M>0&&(R=I/M*A,O=L/M*A),{biasDiff:R,biasComplementDiff:O}}l(g,"computeBiasValues");function m(A,I,L,R){if(L.units==="%")switch(R){case"width":return A>0?L.pfValue*A:0;case"height":return I>0?L.pfValue*I:0;case"average":return A>0&&I>0?L.pfValue*(A+I)/2:0;case"min":return A>0&&I>0?A>I?L.pfValue*I:L.pfValue*A:0;case"max":return A>0&&I>0?A>I?L.pfValue*A:L.pfValue*I:0;default:return 0}else return L.units==="px"?L.pfValue:0}l(m,"computePaddingValues");var y=d.width.left.value;d.width.left.units==="px"&&d.width.val>0&&(y=y*100/d.width.val);var v=d.width.right.value;d.width.right.units==="px"&&d.width.val>0&&(v=v*100/d.width.val);var b=d.height.top.value;d.height.top.units==="px"&&d.height.val>0&&(b=b*100/d.height.val);var w=d.height.bottom.value;d.height.bottom.units==="px"&&d.height.val>0&&(w=w*100/d.height.val);var x=g(d.width.val-f.w,y,v),T=x.biasDiff,C=x.biasComplementDiff,S=g(d.height.val-f.h,b,w),E=S.biasDiff,k=S.biasComplementDiff;o.autoPadding=m(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,d.width.val),p.x=(-T+f.x1+f.x2+C)/2,o.autoHeight=Math.max(f.h,d.height.val),p.y=(-E+f.y1+f.y2+k)/2}l(r,"update");for(var n=0;n<this.length;n++){var a=this[n],i=a._private;(!i.compoundBoundsClean||t)&&(r(a),e.batching()||(i.compoundBoundsClean=!0))}return this};var au=l(function(e){return e===1/0||e===-1/0?0:e},"noninf"),Xu=l(function(e,r,n,a,i){a-r===0||i-n===0||r==null||n==null||a==null||i==null||(e.x1=r<e.x1?r:e.x1,e.x2=a>e.x2?a:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),Lp=l(function(e,r){return r==null?e:Xu(e,r.x1,r.y1,r.x2,r.y2)},"updateBoundsFromBox"),m5=l(function(e,r,n){return sl(e,r,n)},"prefixedProperty"),eL=l(function(e,r,n){if(!r.cy().headless()){var a=r._private,i=a.rstyle,s=i.arrowWidth/2,o=r.pstyle(n+"-arrow-shape").value,u,h;if(o!=="none"){n==="source"?(u=i.srcX,h=i.srcY):n==="target"?(u=i.tgtX,h=i.tgtY):(u=i.midX,h=i.midY);var d=a.arrowBounds=a.arrowBounds||{},f=d[n]=d[n]||{};f.x1=u-s,f.y1=h-s,f.x2=u+s,f.y2=h+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,BI(f,1),Xu(e,f.x1,f.y1,f.x2,f.y2)}}},"updateBoundsFromArrow"),qU=l(function(e,r,n){if(!r.cy().headless()){var a;n?a=n+"-":a="";var i=r._private,s=i.rstyle,o=r.pstyle(a+"label").strValue;if(o){var u=r.pstyle("text-halign"),h=r.pstyle("text-valign"),d=m5(s,"labelWidth",n),f=m5(s,"labelHeight",n),p=m5(s,"labelX",n),g=m5(s,"labelY",n),m=r.pstyle(a+"text-margin-x").pfValue,y=r.pstyle(a+"text-margin-y").pfValue,v=r.isEdge(),b=r.pstyle(a+"text-rotation"),w=r.pstyle("text-outline-width").pfValue,x=r.pstyle("text-border-width").pfValue,T=x/2,C=r.pstyle("text-background-padding").pfValue,S=2,E=f,k=d,A=k/2,I=E/2,L,R,O,M;if(v)L=p-A,R=p+A,O=g-I,M=g+I;else{switch(PT(u.value)){case"left":L=p-k,R=p;break;case"center":L=p-A,R=p+A;break;case"right":L=p,R=p+k;break}switch(RT(h.value)){case"top":O=g-E,M=g;break;case"center":O=g-I,M=g+I;break;case"bottom":O=g,M=g+E;break}}var P=m-Math.max(w,T)-C-S,z=m+Math.max(w,T)+C+S,D=y-Math.max(w,T)-C-S,B=y+Math.max(w,T)+C+S;L+=P,R+=z,O+=D,M+=B;var W=n||"main",U=i.labelBounds,j=U[W]=U[W]||{};j.x1=L,j.y1=O,j.x2=R,j.y2=M,j.w=R-L,j.h=M-O,j.leftPad=P,j.rightPad=z,j.topPad=D,j.botPad=B;var V=v&&b.strValue==="autorotate",Y=b.pfValue!=null&&b.pfValue!==0;if(V||Y){var H=V?m5(i.rstyle,"labelAngle",n):b.pfValue,q=Math.cos(H),Z=Math.sin(H),K=(L+R)/2,re=(O+M)/2;if(!v){switch(PT(u.value)){case"left":K=R;break;case"right":K=L;break}switch(RT(h.value)){case"top":re=M;break;case"bottom":re=O;break}}var Q=l(function(de,Ee){return de=de-K,Ee=Ee-re,{x:de*q-Ee*Z+K,y:de*Z+Ee*q+re}},"rotate"),te=Q(L,O),ee=Q(L,M),J=Q(R,O),ae=Q(R,M);L=Math.min(te.x,ee.x,J.x,ae.x),R=Math.max(te.x,ee.x,J.x,ae.x),O=Math.min(te.y,ee.y,J.y,ae.y),M=Math.max(te.y,ee.y,J.y,ae.y)}var se=W+"Rot",fe=U[se]=U[se]||{};fe.x1=L,fe.y1=O,fe.x2=R,fe.y2=M,fe.w=R-L,fe.h=M-O,Xu(e,L,O,R,M),Xu(i.labelBounds.all,L,O,R,M)}return e}},"updateBoundsFromLabel"),Bke=l(function(e,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,a=r.pstyle("outline-width").value,i=r.pstyle("outline-offset").value,s=a+i;zke(e,r,n,s,"outside",s/2)}},"updateBoundsFromOutline"),zke=l(function(e,r,n,a,i,s){if(!(n===0||a<=0||i==="inside")){var o=r.cy(),u=o.renderer(),h=u.nodeShapes[u.getNodeShape(r)];if(h){var d=r.position(),f=d.x,p=d.y,g=r.width(),m=r.height();if(h.hasMiterBounds){i==="center"&&(a/=2);var y=h.miterBounds(f,p,g,m,a);Lp(e,y)}else s!=null&&s>0&&zI(e,[s,s,s,s])}}},"updateBoundsFromMiter"),kqt=l(function(e,r){if(!r.cy().headless()){var n=r.pstyle("border-opacity").value,a=r.pstyle("border-width").pfValue,i=r.pstyle("border-position").value;zke(e,r,n,a,i)}},"updateBoundsFromMiterBorder"),Aqt=l(function(e,r){var n=e._private.cy,a=n.styleEnabled(),i=n.headless(),s=ol(),o=e._private,u=e.isNode(),h=e.isEdge(),d,f,p,g,m,y,v=o.rstyle,b=u&&a?e.pstyle("bounds-expansion").pfValue:[0],w=l(function(ve){return ve.pstyle("display").value!=="none"},"isDisplayed"),x=!a||w(e)&&(!h||w(e.source())&&w(e.target()));if(x){var T=0,C=0;a&&r.includeOverlays&&(T=e.pstyle("overlay-opacity").value,T!==0&&(C=e.pstyle("overlay-padding").value));var S=0,E=0;a&&r.includeUnderlays&&(S=e.pstyle("underlay-opacity").value,S!==0&&(E=e.pstyle("underlay-padding").value));var k=Math.max(C,E),A=0,I=0;if(a&&(A=e.pstyle("width").pfValue,I=A/2),u&&r.includeNodes){var L=e.position();m=L.x,y=L.y;var R=e.outerWidth(),O=R/2,M=e.outerHeight(),P=M/2;d=m-O,f=m+O,p=y-P,g=y+P,Xu(s,d,p,f,g),a&&Bke(s,e),a&&r.includeOutlines&&!i&&Bke(s,e),a&&kqt(s,e)}else if(h&&r.includeEdges)if(a&&!i){var z=e.pstyle("curve-style").strValue;if(d=Math.min(v.srcX,v.midX,v.tgtX),f=Math.max(v.srcX,v.midX,v.tgtX),p=Math.min(v.srcY,v.midY,v.tgtY),g=Math.max(v.srcY,v.midY,v.tgtY),d-=I,f+=I,p-=I,g+=I,Xu(s,d,p,f,g),z==="haystack"){var D=v.haystackPts;if(D&&D.length===2){if(d=D[0].x,p=D[0].y,f=D[1].x,g=D[1].y,d>f){var B=d;d=f,f=B}if(p>g){var W=p;p=g,g=W}Xu(s,d-I,p-I,f+I,g+I)}}else if(z==="bezier"||z==="unbundled-bezier"||xp(z,"segments")||xp(z,"taxi")){var U;switch(z){case"bezier":case"unbundled-bezier":U=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":U=v.linePts;break}if(U!=null)for(var j=0;j<U.length;j++){var V=U[j];d=V.x-I,f=V.x+I,p=V.y-I,g=V.y+I,Xu(s,d,p,f,g)}}}else{var Y=e.source(),H=Y.position(),q=e.target(),Z=q.position();if(d=H.x,f=Z.x,p=H.y,g=Z.y,d>f){var K=d;d=f,f=K}if(p>g){var re=p;p=g,g=re}d-=I,f+=I,p-=I,g+=I,Xu(s,d,p,f,g)}if(a&&r.includeEdges&&h&&(eL(s,e,"mid-source"),eL(s,e,"mid-target"),eL(s,e,"source"),eL(s,e,"target")),a){var Q=e.pstyle("ghost").value==="yes";if(Q){var te=e.pstyle("ghost-offset-x").pfValue,ee=e.pstyle("ghost-offset-y").pfValue;Xu(s,s.x1+te,s.y1+ee,s.x2+te,s.y2+ee)}}var J=o.bodyBounds=o.bodyBounds||{};J5e(J,s),zI(J,b),BI(J,1),a&&(d=s.x1,f=s.x2,p=s.y1,g=s.y2,Xu(s,d-k,p-k,f+k,g+k));var ae=o.overlayBounds=o.overlayBounds||{};J5e(ae,s),zI(ae,b),BI(ae,1);var se=o.labelBounds=o.labelBounds||{};se.all!=null?lVt(se.all):se.all=ol(),a&&r.includeLabels&&(r.includeMainLabels&&qU(s,e,null),h&&(r.includeSourceLabels&&qU(s,e,"source"),r.includeTargetLabels&&qU(s,e,"target")))}return s.x1=au(s.x1),s.y1=au(s.y1),s.x2=au(s.x2),s.y2=au(s.y2),s.w=au(s.x2-s.x1),s.h=au(s.y2-s.y1),s.w>0&&s.h>0&&x&&(zI(s,b),BI(s,1)),s},"boundingBoxImpl"),Hke=l(function(e){var r=0,n=l(function(s){return(s?1:0)<<r++},"tf"),a=0;return a+=n(e.incudeNodes),a+=n(e.includeEdges),a+=n(e.includeLabels),a+=n(e.includeMainLabels),a+=n(e.includeSourceLabels),a+=n(e.includeTargetLabels),a+=n(e.includeOverlays),a+=n(e.includeOutlines),a},"getKey"),Wke=l(function(e){var r=l(function(o){return Math.round(o)},"r");if(e.isEdge()){var n=e.source().position(),a=e.target().position();return z5e([r(n.x),r(n.y),r(a.x),r(a.y)])}else{var i=e.position();return z5e([r(i.x),r(i.y)])}},"getBoundingBoxPosKey"),Vke=l(function(e,r){var n=e._private,a,i=e.isEdge(),s=r==null?Gke:Hke(r),o=s===Gke;if(n.bbCache==null?(a=Aqt(e,y5),n.bbCache=a,n.bbCachePosKey=Wke(e)):a=n.bbCache,!o){var u=e.isNode();a=ol(),(r.includeNodes&&u||r.includeEdges&&!u)&&(r.includeOverlays?Lp(a,n.overlayBounds):Lp(a,n.bodyBounds)),r.includeLabels&&(r.includeMainLabels&&(!i||r.includeSourceLabels&&r.includeTargetLabels)?Lp(a,n.labelBounds.all):(r.includeMainLabels&&Lp(a,n.labelBounds.mainRot),r.includeSourceLabels&&Lp(a,n.labelBounds.sourceRot),r.includeTargetLabels&&Lp(a,n.labelBounds.targetRot))),a.w=a.x2-a.x1,a.h=a.y2-a.y1}return a},"cachedBoundingBoxImpl"),y5={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},Gke=Hke(y5),qke=io(y5);Ip.boundingBox=function(t){var e,r=t===void 0||t.useCache===void 0||t.useCache===!0,n=wT(function(d){var f=d._private;return f.bbCache==null||f.styleDirty||f.bbCachePosKey!==Wke(d)},function(d){return d.id()});if(r&&this.length===1&&!n(this[0]))t===void 0?t=y5:t=qke(t),e=Vke(this[0],t);else{e=ol(),t=t||y5;var a=qke(t),i=this,s=i.cy(),o=s.styleEnabled();this.edges().forEach(n),this.nodes().forEach(n),o&&this.recalculateRenderedStyle(r),this.updateCompoundBounds(!r);for(var u=0;u<i.length;u++){var h=i[u];n(h)&&h.dirtyBoundingBoxCache(),Lp(e,Vke(h,a))}}return e.x1=au(e.x1),e.y1=au(e.y1),e.x2=au(e.x2),e.y2=au(e.y2),e.w=au(e.x2-e.x1),e.h=au(e.y2-e.y1),e},Ip.dirtyBoundingBoxCache=function(){for(var t=0;t<this.length;t++){var e=this[t]._private;e.bbCache=null,e.bbCachePosKey=null,e.bodyBounds=null,e.overlayBounds=null,e.labelBounds.all=null,e.labelBounds.source=null,e.labelBounds.target=null,e.labelBounds.main=null,e.labelBounds.sourceRot=null,e.labelBounds.targetRot=null,e.labelBounds.mainRot=null,e.arrowBounds.source=null,e.arrowBounds.target=null,e.arrowBounds["mid-source"]=null,e.arrowBounds["mid-target"]=null}return this.emitAndNotify("bounds"),this},Ip.boundingBoxAt=function(t){var e=this.nodes(),r=this.cy(),n=r.hasCompoundNodes(),a=r.collection();if(n&&(a=e.filter(function(h){return h.isParent()}),e=e.not(a)),Fn(t)){var i=t;t=l(function(){return i},"fn")}var s=l(function(d,f){return d._private.bbAtOldPos=t(d,f)},"storeOldPos"),o=l(function(d){return d._private.bbAtOldPos},"getOldPos");r.startBatch(),e.forEach(s).silentPositions(t),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0));var u=oVt(this.boundingBox({useCache:!1}));return e.silentPositions(o),n&&(a.dirtyCompoundBoundsCache(),a.dirtyBoundingBoxCache(),a.updateCompoundBounds(!0)),r.endBatch(),u},OT.boundingbox=OT.bb=OT.boundingBox,OT.renderedBoundingbox=OT.renderedBoundingBox;var Nqt=Ip,v5,b5;v5=b5={};var Yke=l(function(e){e.uppercaseName=y5e(e.name),e.autoName="auto"+e.uppercaseName,e.labelName="label"+e.uppercaseName,e.outerName="outer"+e.uppercaseName,e.uppercaseOuterName=y5e(e.outerName),v5[e.name]=l(function(){var n=this[0],a=n._private,i=a.cy,s=i._private.styleEnabled;if(n)if(s){if(n.isParent())return n.updateCompoundBounds(),a[e.autoName]||0;var o=n.pstyle(e.name);switch(o.strValue){case"label":return n.recalculateRenderedStyle(),a.rstyle[e.labelName]||0;default:return o.pfValue}}else return 1},"dimImpl"),v5["outer"+e.uppercaseName]=l(function(){var n=this[0],a=n._private,i=a.cy,s=i._private.styleEnabled;if(n)if(s){var o=n[e.name](),u=n.pstyle("border-position").value,h;u==="center"?h=n.pstyle("border-width").pfValue:u==="outside"?h=2*n.pstyle("border-width").pfValue:h=0;var d=2*n.padding();return o+h+d}else return 1},"outerDimImpl"),v5["rendered"+e.uppercaseName]=l(function(){var n=this[0];if(n){var a=n[e.name]();return a*this.cy().zoom()}},"renderedDimImpl"),v5["rendered"+e.uppercaseOuterName]=l(function(){var n=this[0];if(n){var a=n[e.outerName]();return a*this.cy().zoom()}},"renderedOuterDimImpl")},"defineDimFns");Yke({name:"width"}),Yke({name:"height"}),b5.padding=function(){var t=this[0],e=t._private;return t.isParent()?(t.updateCompoundBounds(),e.autoPadding!==void 0?e.autoPadding:t.pstyle("padding").pfValue):t.pstyle("padding").pfValue},b5.paddedHeight=function(){var t=this[0];return t.height()+2*t.padding()},b5.paddedWidth=function(){var t=this[0];return t.width()+2*t.padding()};var Iqt=b5,Lqt=l(function(e,r){if(e.isEdge()&&e.takesUpSpace())return r(e)},"ifEdge"),$qt=l(function(e,r){if(e.isEdge()&&e.takesUpSpace()){var n=e.cy();return DI(r(e),n.zoom(),n.pan())}},"ifEdgeRenderedPosition"),Mqt=l(function(e,r){if(e.isEdge()&&e.takesUpSpace()){var n=e.cy(),a=n.pan(),i=n.zoom();return r(e).map(function(s){return DI(s,i,a)})}},"ifEdgeRenderedPositions"),Pqt=l(function(e){return e.renderer().getControlPoints(e)},"controlPoints"),Rqt=l(function(e){return e.renderer().getSegmentPoints(e)},"segmentPoints"),Oqt=l(function(e){return e.renderer().getSourceEndpoint(e)},"sourceEndpoint"),Dqt=l(function(e){return e.renderer().getTargetEndpoint(e)},"targetEndpoint"),Fqt=l(function(e){return e.renderer().getEdgeMidpoint(e)},"midpoint"),Uke={controlPoints:{get:Pqt,mult:!0},segmentPoints:{get:Rqt,mult:!0},sourceEndpoint:{get:Oqt},targetEndpoint:{get:Dqt},midpoint:{get:Fqt}},Bqt=l(function(e){return"rendered"+e[0].toUpperCase()+e.substr(1)},"renderedName"),zqt=Object.keys(Uke).reduce(function(t,e){var r=Uke[e],n=Bqt(e);return t[e]=function(){return Lqt(this,r.get)},r.mult?t[n]=function(){return Mqt(this,r.get)}:t[n]=function(){return $qt(this,r.get)},t},{}),Hqt=zr({},Sqt,Nqt,Iqt,zqt);var jke=l(function(e,r){this.recycle(e,r)},"Event");function x5(){return!1}l(x5,"returnFalse");function tL(){return!0}l(tL,"returnTrue"),jke.prototype={instanceString:l(function(){return"event"},"instanceString"),recycle:l(function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=x5,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?tL:x5):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var n=this.position,a=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:n.x*a+i.x,y:n.y*a+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},"recycle"),preventDefault:l(function(){this.isDefaultPrevented=tL;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},"preventDefault"),stopPropagation:l(function(){this.isPropagationStopped=tL;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},"stopPropagation"),stopImmediatePropagation:l(function(){this.isImmediatePropagationStopped=tL,this.stopPropagation()},"stopImmediatePropagation"),isDefaultPrevented:x5,isPropagationStopped:x5,isImmediatePropagationStopped:x5};var Kke=/^([^.]+)(\.(?:[^.]+))?$/,Wqt=".*",Xke={qualifierCompare:l(function(e,r){return e===r},"qualifierCompare"),eventMatches:l(function(){return!0},"eventMatches"),addEventFields:l(function(){},"addEventFields"),callbackContext:l(function(e){return e},"callbackContext"),beforeEmit:l(function(){},"beforeEmit"),afterEmit:l(function(){},"afterEmit"),bubble:l(function(){return!1},"bubble"),parent:l(function(){return null},"parent"),context:null},Zke=Object.keys(Xke),Vqt={};function rL(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vqt,e=arguments.length>1?arguments[1]:void 0,r=0;r<Zke.length;r++){var n=Zke[r];this[n]=t[n]||Xke[n]}this.context=e||this.context,this.listeners=[],this.emitting=0}l(rL,"Emitter");var $p=rL.prototype,Qke=l(function(e,r,n,a,i,s,o){ci(a)&&(i=a,a=null),o&&(s==null?s=o:s=zr({},s,o));for(var u=_a(n)?n:n.split(/\s+/),h=0;h<u.length;h++){var d=u[h];if(!bp(d)){var f=d.match(Kke);if(f){var p=f[1],g=f[2]?f[2]:null,m=r(e,d,p,g,a,i,s);if(m===!1)break}}}},"forEachEvent"),Jke=l(function(e,r){return e.addEventFields(e.context,r),new jke(r.type,r)},"makeEventObj"),Gqt=l(function(e,r,n){if(KHt(n)){r(e,n);return}else if(Fn(n)){r(e,Jke(e,n));return}for(var a=_a(n)?n:n.split(/\s+/),i=0;i<a.length;i++){var s=a[i];if(!bp(s)){var o=s.match(Kke);if(o){var u=o[1],h=o[2]?o[2]:null,d=Jke(e,{type:u,namespace:h,target:e.context});r(e,d)}}}},"forEachEventObj");$p.on=$p.addListener=function(t,e,r,n,a){return Qke(this,function(i,s,o,u,h,d,f){ci(d)&&i.listeners.push({event:s,callback:d,type:o,namespace:u,qualifier:h,conf:f})},t,e,r,n,a),this},$p.one=function(t,e,r,n){return this.on(t,e,r,n,{one:!0})},$p.removeListener=$p.off=function(t,e,r,n){var a=this;this.emitting!==0&&(this.listeners=LWt(this.listeners));for(var i=this.listeners,s=l(function(h){var d=i[h];Qke(a,function(f,p,g,m,y,v){if((d.type===g||t==="*")&&(!m&&d.namespace!==".*"||d.namespace===m)&&(!y||f.qualifierCompare(d.qualifier,y))&&(!v||d.callback===v))return i.splice(h,1),!1},t,e,r,n)},"_loop"),o=i.length-1;o>=0;o--)s(o);return this},$p.removeAllListeners=function(){return this.removeListener("*")},$p.emit=$p.trigger=function(t,e,r){var n=this.listeners,a=n.length;return this.emitting++,_a(e)||(e=[e]),Gqt(this,function(i,s){r!=null&&(n=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],a=n.length);for(var o=l(function(){var d=n[u];if(d.type===s.type&&(!d.namespace||d.namespace===s.namespace||d.namespace===Wqt)&&i.eventMatches(i.context,d,s)){var f=[s];e!=null&&MWt(f,e),i.beforeEmit(i.context,d,s),d.conf&&d.conf.one&&(i.listeners=i.listeners.filter(function(m){return m!==d}));var p=i.callbackContext(i.context,d,s),g=d.callback.apply(p,f);i.afterEmit(i.context,d,s),g===!1&&(s.stopPropagation(),s.preventDefault())}},"_loop2"),u=0;u<a;u++)o();i.bubble(i.context)&&!s.isPropagationStopped()&&i.parent(i.context).emit(s,e)},t),this.emitting--,this};var qqt={qualifierCompare:l(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},"qualifierCompare"),eventMatches:l(function(e,r,n){var a=r.qualifier;return a!=null?e!==n.target&&r5(n.target)&&a.matches(n.target):!0},"eventMatches"),addEventFields:l(function(e,r){r.cy=e.cy(),r.target=e},"addEventFields"),callbackContext:l(function(e,r,n){return r.qualifier!=null?n.target:e},"callbackContext"),beforeEmit:l(function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},"beforeEmit"),bubble:l(function(){return!0},"bubble"),parent:l(function(e){return e.isChild()?e.parent():e.cy()},"parent")},nL=l(function(e){return Or(e)?new kp(e):e},"argSelector"),e6e={createEmitter:l(function(){for(var e=0;e<this.length;e++){var r=this[e],n=r._private;n.emitter||(n.emitter=new rL(qqt,r))}return this},"createEmitter"),emitter:l(function(){return this._private.emitter},"emitter"),on:l(function(e,r,n){for(var a=nL(r),i=0;i<this.length;i++){var s=this[i];s.emitter().on(e,a,n)}return this},"on"),removeListener:l(function(e,r,n){for(var a=nL(r),i=0;i<this.length;i++){var s=this[i];s.emitter().removeListener(e,a,n)}return this},"removeListener"),removeAllListeners:l(function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},"removeAllListeners"),one:l(function(e,r,n){for(var a=nL(r),i=0;i<this.length;i++){var s=this[i];s.emitter().one(e,a,n)}return this},"one"),once:l(function(e,r,n){for(var a=nL(r),i=0;i<this.length;i++){var s=this[i];s.emitter().on(e,a,n,{once:!0,onceCollection:this})}},"once"),emit:l(function(e,r){for(var n=0;n<this.length;n++){var a=this[n];a.emitter().emit(e,r)}return this},"emit"),emitAndNotify:l(function(e,r){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,r),this},"emitAndNotify")};aa.eventAliasesOn(e6e);var t6e={nodes:l(function(e){return this.filter(function(r){return r.isNode()}).filter(e)},"nodes"),edges:l(function(e){return this.filter(function(r){return r.isEdge()}).filter(e)},"edges"),byGroup:l(function(){for(var e=this.spawn(),r=this.spawn(),n=0;n<this.length;n++){var a=this[n];a.isNode()?e.push(a):r.push(a)}return{nodes:e,edges:r}},"byGroup"),filter:l(function(e,r){if(e===void 0)return this;if(Or(e)||Sc(e))return new kp(e).filter(this);if(ci(e)){for(var n=this.spawn(),a=this,i=0;i<a.length;i++){var s=a[i],o=r?e.apply(r,[s,i,a]):e(s,i,a);o&&n.push(s)}return n}return this.spawn()},"filter"),not:l(function(e){if(e){Or(e)&&(e=this.filter(e));for(var r=this.spawn(),n=0;n<this.length;n++){var a=this[n],i=e.has(a);i||r.push(a)}return r}else return this},"not"),absoluteComplement:l(function(){var e=this.cy();return e.mutableElements().not(this)},"absoluteComplement"),intersect:l(function(e){if(Or(e)){var r=e;return this.filter(r)}for(var n=this.spawn(),a=this,i=e,s=this.length<e.length,o=s?a:i,u=s?i:a,h=0;h<o.length;h++){var d=o[h];u.has(d)&&n.push(d)}return n},"intersect"),xor:l(function(e){var r=this._private.cy;Or(e)&&(e=r.$(e));var n=this.spawn(),a=this,i=e,s=l(function(u,h){for(var d=0;d<u.length;d++){var f=u[d],p=f._private.data.id,g=h.hasElementWithId(p);g||n.push(f)}},"add");return s(a,i),s(i,a),n},"xor"),diff:l(function(e){var r=this._private.cy;Or(e)&&(e=r.$(e));var n=this.spawn(),a=this.spawn(),i=this.spawn(),s=this,o=e,u=l(function(d,f,p){for(var g=0;g<d.length;g++){var m=d[g],y=m._private.data.id,v=f.hasElementWithId(y);v?i.merge(m):p.push(m)}},"add");return u(s,o,n),u(o,s,a),{left:n,right:a,both:i}},"diff"),add:l(function(e){var r=this._private.cy;if(!e)return this;if(Or(e)){var n=e;e=r.mutableElements().filter(n)}for(var a=this.spawnSelf(),i=0;i<e.length;i++){var s=e[i],o=!this.has(s);o&&a.push(s)}return a},"add"),merge:l(function(e){var r=this._private,n=r.cy;if(!e)return this;if(e&&Or(e)){var a=e;e=n.mutableElements().filter(a)}for(var i=r.map,s=0;s<e.length;s++){var o=e[s],u=o._private.data.id,h=!i.has(u);if(h){var d=this.length++;this[d]=o,i.set(u,{ele:o,index:d})}}return this},"merge"),unmergeAt:l(function(e){var r=this[e],n=r.id(),a=this._private,i=a.map;this[e]=void 0,i.delete(n);var s=e===this.length-1;if(this.length>1&&!s){var o=this.length-1,u=this[o],h=u._private.data.id;this[o]=void 0,this[e]=u,i.set(h,{ele:u,index:e})}return this.length--,this},"unmergeAt"),unmergeOne:l(function(e){e=e[0];var r=this._private,n=e._private.data.id,a=r.map,i=a.get(n);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},"unmergeOne"),unmerge:l(function(e){var r=this._private.cy;if(!e)return this;if(e&&Or(e)){var n=e;e=r.mutableElements().filter(n)}for(var a=0;a<e.length;a++)this.unmergeOne(e[a]);return this},"unmerge"),unmergeBy:l(function(e){for(var r=this.length-1;r>=0;r--){var n=this[r];e(n)&&this.unmergeAt(r)}return this},"unmergeBy"),map:l(function(e,r){for(var n=[],a=this,i=0;i<a.length;i++){var s=a[i],o=r?e.apply(r,[s,i,a]):e(s,i,a);n.push(o)}return n},"map"),reduce:l(function(e,r){for(var n=r,a=this,i=0;i<a.length;i++)n=e(n,a[i],i,a);return n},"reduce"),max:l(function(e,r){for(var n=-1/0,a,i=this,s=0;s<i.length;s++){var o=i[s],u=r?e.apply(r,[o,s,i]):e(o,s,i);u>n&&(n=u,a=o)}return{value:n,ele:a}},"max"),min:l(function(e,r){for(var n=1/0,a,i=this,s=0;s<i.length;s++){var o=i[s],u=r?e.apply(r,[o,s,i]):e(o,s,i);u<n&&(n=u,a=o)}return{value:n,ele:a}},"min")},Un=t6e;Un.u=Un["|"]=Un["+"]=Un.union=Un.or=Un.add,Un["\\"]=Un["!"]=Un["-"]=Un.difference=Un.relativeComplement=Un.subtract=Un.not,Un.n=Un["&"]=Un["."]=Un.and=Un.intersection=Un.intersect,Un["^"]=Un["(+)"]=Un["(-)"]=Un.symmetricDifference=Un.symdiff=Un.xor,Un.fnFilter=Un.filterFn=Un.stdFilter=Un.filter,Un.complement=Un.abscomp=Un.absoluteComplement;var Yqt={isNode:l(function(){return this.group()==="nodes"},"isNode"),isEdge:l(function(){return this.group()==="edges"},"isEdge"),isLoop:l(function(){return this.isEdge()&&this.source()[0]===this.target()[0]},"isLoop"),isSimple:l(function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},"isSimple"),group:l(function(){var e=this[0];if(e)return e._private.group},"group")},r6e=l(function(e,r){var n=e.cy(),a=n.hasCompoundNodes();function i(d){var f=d.pstyle("z-compound-depth");return f.value==="auto"?a?d.zDepth():0:f.value==="bottom"?-1:f.value==="top"?wY:0}l(i,"getDepth");var s=i(e)-i(r);if(s!==0)return s;function o(d){var f=d.pstyle("z-index-compare");return f.value==="auto"&&d.isNode()?1:0}l(o,"getEleDepth");var u=o(e)-o(r);if(u!==0)return u;var h=e.pstyle("z-index").value-r.pstyle("z-index").value;return h!==0?h:e.poolIndex()-r.poolIndex()},"zIndexSort"),aL={forEach:l(function(e,r){if(ci(e))for(var n=this.length,a=0;a<n;a++){var i=this[a],s=r?e.apply(r,[i,a,this]):e(i,a,this);if(s===!1)break}return this},"forEach"),toArray:l(function(){for(var e=[],r=0;r<this.length;r++)e.push(this[r]);return e},"toArray"),slice:l(function(e,r){var n=[],a=this.length;r==null&&(r=a),e==null&&(e=0),e<0&&(e=a+e),r<0&&(r=a+r);for(var i=e;i>=0&&i<r&&i<a;i++)n.push(this[i]);return this.spawn(n)},"slice"),size:l(function(){return this.length},"size"),eq:l(function(e){return this[e]||this.spawn()},"eq"),first:l(function(){return this[0]||this.spawn()},"first"),last:l(function(){return this[this.length-1]||this.spawn()},"last"),empty:l(function(){return this.length===0},"empty"),nonempty:l(function(){return!this.empty()},"nonempty"),sort:l(function(e){if(!ci(e))return this;var r=this.toArray().sort(e);return this.spawn(r)},"sort"),sortByZIndex:l(function(){return this.sort(r6e)},"sortByZIndex"),zDepth:l(function(){var e=this[0];if(e){var r=e._private,n=r.group;if(n==="nodes"){var a=r.data.parent?e.parents().size():0;return e.isParent()?a:wY-1}else{var i=r.source,s=r.target,o=i.zDepth(),u=s.zDepth();return Math.max(o,u,0)}}},"zDepth")};aL.each=aL.forEach;var Uqt=l(function(){var e="undefined",r=(typeof Symbol=="undefined"?"undefined":ds(Symbol))!=e&&ds(Symbol.iterator)!=e;r&&(aL[Symbol.iterator]=function(){var n=this,a={value:void 0,done:!1},i=0,s=this.length;return u5e({next:l(function(){return i<s?a.value=n[i++]:(a.value=void 0,a.done=!0),a},"next")},Symbol.iterator,function(){return this})})},"defineSymbolIterator");Uqt();var jqt=io({nodeDimensionsIncludeLabels:!1}),iL={layoutDimensions:l(function(e){e=jqt(e);var r;if(!this.takesUpSpace())r={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();r={w:n.w,h:n.h}}else r={w:this.outerWidth(),h:this.outerHeight()};return(r.w===0||r.h===0)&&(r.w=r.h=1),r},"layoutDimensions"),layoutPositions:l(function(e,r,n){var a=this.nodes().filter(function(C){return!C.isParent()}),i=this.cy(),s=r.eles,o=l(function(S){return S.id()},"getMemoizeKey"),u=wT(n,o);e.emit({type:"layoutstart",layout:e}),e.animations=[];var h=l(function(S,E,k){var A={x:E.x1+E.w/2,y:E.y1+E.h/2},I={x:(k.x-A.x)*S,y:(k.y-A.y)*S};return{x:A.x+I.x,y:A.y+I.y}},"calculateSpacing"),d=r.spacingFactor&&r.spacingFactor!==1,f=l(function(){if(!d)return null;for(var S=ol(),E=0;E<a.length;E++){var k=a[E],A=u(k,E);Q5e(S,A.x,A.y)}return S},"spacingBb"),p=f(),g=wT(function(C,S){var E=u(C,S);if(d){var k=Math.abs(r.spacingFactor);E=h(k,p,E)}return r.transform!=null&&(E=r.transform(C,E)),E},o);if(r.animate){for(var m=0;m<a.length;m++){var y=a[m],v=g(y,m),b=r.animateFilter==null||r.animateFilter(y,m);if(b){var w=y.animation({position:v,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(w)}else y.position(v)}if(r.fit){var x=i.animation({fit:{boundingBox:s.boundingBoxAt(g),padding:r.padding},duration:r.animationDuration,easing:r.animationEasing});e.animations.push(x)}else if(r.zoom!==void 0&&r.pan!==void 0){var T=i.animation({zoom:r.zoom,pan:r.pan,duration:r.animationDuration,easing:r.animationEasing});e.animations.push(T)}e.animations.forEach(function(C){return C.play()}),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),IT.all(e.animations.map(function(C){return C.promise()})).then(function(){e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e})})}else a.positions(g),r.fit&&i.fit(r.eles,r.padding),r.zoom!=null&&i.zoom(r.zoom),r.pan&&i.pan(r.pan),e.one("layoutready",r.ready),e.emit({type:"layoutready",layout:e}),e.one("layoutstop",r.stop),e.emit({type:"layoutstop",layout:e});return this},"layoutPositions"),layout:l(function(e){var r=this.cy();return r.makeLayout(zr({},e,{eles:this}))},"layout")};iL.createLayout=iL.makeLayout=iL.layout;function n6e(t,e,r){var n=r._private,a=n.styleCache=n.styleCache||[],i;return(i=a[t])!=null||(i=a[t]=e(r)),i}l(n6e,"styleCache");function sL(t,e){return t=Xm(t),l(function(n){return n6e(t,e,n)},"cachedStyleFunction")}l(sL,"cacheStyleFunction");function oL(t,e){t=Xm(t);var r=l(function(a){return e.call(a)},"selfFn");return l(function(){var a=this[0];if(a)return n6e(t,r,a)},"cachedPrototypeStyleFunction")}l(oL,"cachePrototypeStyleFunction");var so={recalculateRenderedStyle:l(function(e){var r=this.cy(),n=r.renderer(),a=r.styleEnabled();return n&&a&&n.recalculateRenderedStyle(this,e),this},"recalculateRenderedStyle"),dirtyStyleCache:l(function(){var e=this.cy(),r=l(function(i){return i._private.styleCache=null},"dirty");if(e.hasCompoundNodes()){var n;n=this.spawnSelf().merge(this.descendants()).merge(this.parents()),n.merge(n.connectedEdges()),n.forEach(r)}else this.forEach(function(a){r(a),a.connectedEdges().forEach(r)});return this},"dirtyStyleCache"),updateStyle:l(function(e){var r=this._private.cy;if(!r.styleEnabled())return this;if(r.batching()){var n=r._private.batchStyleEles;return n.merge(this),this}var a=r.hasCompoundNodes(),i=this;e=!!(e||e===void 0),a&&(i=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var s=i;return e?s.emitAndNotify("style"):s.emit("style"),i.forEach(function(o){return o._private.styleDirty=!0}),this},"updateStyle"),cleanStyle:l(function(){var e=this.cy();if(e.styleEnabled())for(var r=0;r<this.length;r++){var n=this[r];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},"cleanStyle"),parsedStyle:l(function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],a=n.cy();if(a.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,a.style().apply(n));var i=n._private.style[e];return i!=null?i:r?a.style().getDefaultProperty(e):null}},"parsedStyle"),numericStyle:l(function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(e);return n.pfValue!==void 0?n.pfValue:n.value}},"numericStyle"),numericStyleUnits:l(function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},"numericStyleUnits"),renderedStyle:l(function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,e)},"renderedStyle"),style:l(function(e,r){var n=this.cy();if(!n.styleEnabled())return this;var a=!1,i=n.style();if(Fn(e)){var s=e;i.applyBypass(this,s,a),this.emitAndNotify("style")}else if(Or(e))if(r===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,r,a),this.emitAndNotify("style");else if(e===void 0){var u=this[0];return u?i.getRawStyle(u):void 0}return this},"style"),removeStyle:l(function(e){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,a=r.style(),i=this;if(e===void 0)for(var s=0;s<i.length;s++){var o=i[s];a.removeAllBypasses(o,n)}else{e=e.split(/\s+/);for(var u=0;u<i.length;u++){var h=i[u];a.removeBypasses(h,e,n)}}return this.emitAndNotify("style"),this},"removeStyle"),show:l(function(){return this.css("display","element"),this},"show"),hide:l(function(){return this.css("display","none"),this},"hide"),effectiveOpacity:l(function(){var e=this.cy();if(!e.styleEnabled())return 1;var r=e.hasCompoundNodes(),n=this[0];if(n){var a=n._private,i=n.pstyle("opacity").value;if(!r)return i;var s=a.data.parent?n.parents():null;if(s)for(var o=0;o<s.length;o++){var u=s[o],h=u.pstyle("opacity").value;i=h*i}return i}},"effectiveOpacity"),transparent:l(function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0],n=r.cy().hasCompoundNodes();if(r)return n?r.effectiveOpacity()===0:r.pstyle("opacity").value===0},"transparent"),backgrounding:l(function(){var e=this.cy();if(!e.styleEnabled())return!1;var r=this[0];return!!r._private.backgrounding},"backgrounding")};function YU(t,e){var r=t._private,n=r.data.parent?t.parents():null;if(n)for(var a=0;a<n.length;a++){var i=n[a];if(!e(i))return!1}return!0}l(YU,"checkCompound");function UU(t){var e=t.ok,r=t.edgeOkViaNode||t.ok,n=t.parentOk||t.ok;return function(){var a=this.cy();if(!a.styleEnabled())return!0;var i=this[0],s=a.hasCompoundNodes();if(i){var o=i._private;if(!e(i))return!1;if(i.isNode())return!s||YU(i,n);var u=o.source,h=o.target;return r(u)&&(!s||YU(u,r))&&(u===h||r(h)&&(!s||YU(h,r)))}}}l(UU,"defineDerivedStateFunction");var DT=sL("eleTakesUpSpace",function(t){return t.pstyle("display").value==="element"&&t.width()!==0&&(t.isNode()?t.height()!==0:!0)});so.takesUpSpace=oL("takesUpSpace",UU({ok:DT}));var Kqt=sL("eleInteractive",function(t){return t.pstyle("events").value==="yes"&&t.pstyle("visibility").value==="visible"&&DT(t)}),Xqt=sL("parentInteractive",function(t){return t.pstyle("visibility").value==="visible"&&DT(t)});so.interactive=oL("interactive",UU({ok:Kqt,parentOk:Xqt,edgeOkViaNode:DT})),so.noninteractive=function(){var t=this[0];if(t)return!t.interactive()};var Zqt=sL("eleVisible",function(t){return t.pstyle("visibility").value==="visible"&&t.pstyle("opacity").pfValue!==0&&DT(t)}),Qqt=DT;so.visible=oL("visible",UU({ok:Zqt,edgeOkViaNode:Qqt})),so.hidden=function(){var t=this[0];if(t)return!t.visible()},so.isBundledBezier=oL("isBundledBezier",function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle("curve-style").value==="bezier"&&this.takesUpSpace():!1}),so.bypass=so.css=so.style,so.renderedCss=so.renderedStyle,so.removeBypass=so.removeCss=so.removeStyle,so.pstyle=so.parsedStyle;var Mp={};function a6e(t){return function(){var e=arguments,r=[];if(e.length===2){var n=e[0],a=e[1];this.on(t.event,n,a)}else if(e.length===1&&ci(e[0])){var i=e[0];this.on(t.event,i)}else if(e.length===0||e.length===1&&_a(e[0])){for(var s=e.length===1?e[0]:null,o=0;o<this.length;o++){var u=this[o],h=!t.ableField||u._private[t.ableField],d=u._private[t.field]!=t.value;if(t.overrideAble){var f=t.overrideAble(u);if(f!==void 0&&(h=f,!f))return this}h&&(u._private[t.field]=t.value,d&&r.push(u))}var p=this.spawn(r);p.updateStyle(),p.emit(t.event),s&&p.emit(s)}return this}}l(a6e,"defineSwitchFunction");function FT(t){Mp[t.field]=function(){var e=this[0];if(e){if(t.overrideField){var r=t.overrideField(e);if(r!==void 0)return r}return e._private[t.field]}},Mp[t.on]=a6e({event:t.on,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!0}),Mp[t.off]=a6e({event:t.off,field:t.field,ableField:t.ableField,overrideAble:t.overrideAble,value:!1})}l(FT,"defineSwitchSet"),FT({field:"locked",overrideField:l(function(e){return e.cy().autolock()?!0:void 0},"overrideField"),on:"lock",off:"unlock"}),FT({field:"grabbable",overrideField:l(function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},"overrideField"),on:"grabify",off:"ungrabify"}),FT({field:"selected",ableField:"selectable",overrideAble:l(function(e){return e.cy().autounselectify()?!1:void 0},"overrideAble"),on:"select",off:"unselect"}),FT({field:"selectable",overrideField:l(function(e){return e.cy().autounselectify()?!1:void 0},"overrideField"),on:"selectify",off:"unselectify"}),Mp.deselect=Mp.unselect,Mp.grabbed=function(){var t=this[0];if(t)return t._private.grabbed},FT({field:"active",on:"activate",off:"unactivate"}),FT({field:"pannable",on:"panify",off:"unpanify"}),Mp.inactive=function(){var t=this[0];if(t)return!t._private.active};var Fo={},i6e=l(function(e){return l(function(n){for(var a=this,i=[],s=0;s<a.length;s++){var o=a[s];if(o.isNode()){for(var u=!1,h=o.connectedEdges(),d=0;d<h.length;d++){var f=h[d],p=f.source(),g=f.target();if(e.noIncomingEdges&&g===o&&p!==o||e.noOutgoingEdges&&p===o&&g!==o){u=!0;break}}u||i.push(o)}}return this.spawn(i,!0).filter(n)},"dagExtremityImpl")},"defineDagExtremity"),s6e=l(function(e){return function(r){for(var n=this,a=[],i=0;i<n.length;i++){var s=n[i];if(s.isNode())for(var o=s.connectedEdges(),u=0;u<o.length;u++){var h=o[u],d=h.source(),f=h.target();e.outgoing&&d===s?(a.push(h),a.push(f)):e.incoming&&f===s&&(a.push(h),a.push(d))}}return this.spawn(a,!0).filter(r)}},"defineDagOneHop"),o6e=l(function(e){return function(r){for(var n=this,a=[],i={};;){var s=e.outgoing?n.outgoers():n.incomers();if(s.length===0)break;for(var o=!1,u=0;u<s.length;u++){var h=s[u],d=h.id();i[d]||(i[d]=!0,a.push(h),o=!0)}if(!o)break;n=s}return this.spawn(a,!0).filter(r)}},"defineDagAllHops");Fo.clearTraversalCache=function(){for(var t=0;t<this.length;t++)this[t]._private.traversalCache=null},zr(Fo,{roots:i6e({noIncomingEdges:!0}),leaves:i6e({noOutgoingEdges:!0}),outgoers:nu(s6e({outgoing:!0}),"outgoers"),successors:o6e({outgoing:!0}),incomers:nu(s6e({incoming:!0}),"incomers"),predecessors:o6e({})}),zr(Fo,{neighborhood:nu(function(t){for(var e=[],r=this.nodes(),n=0;n<r.length;n++)for(var a=r[n],i=a.connectedEdges(),s=0;s<i.length;s++){var o=i[s],u=o.source(),h=o.target(),d=a===u?h:u;d.length>0&&e.push(d[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:l(function(e){return this.neighborhood().add(this).filter(e)},"closedNeighborhood"),openNeighborhood:l(function(e){return this.neighborhood(e)},"openNeighborhood")}),Fo.neighbourhood=Fo.neighborhood,Fo.closedNeighbourhood=Fo.closedNeighborhood,Fo.openNeighbourhood=Fo.openNeighborhood,zr(Fo,{source:nu(l(function(e){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&e?n.filter(e):n},"sourceImpl"),"source"),target:nu(l(function(e){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&e?n.filter(e):n},"targetImpl"),"target"),sources:l6e({attr:"source"}),targets:l6e({attr:"target"})});function l6e(t){return l(function(r){for(var n=[],a=0;a<this.length;a++){var i=this[a],s=i._private[t.attr];s&&n.push(s)}return this.spawn(n,!0).filter(r)},"sourceImpl")}l(l6e,"defineSourceFunction"),zr(Fo,{edgesWith:nu(c6e(),"edgesWith"),edgesTo:nu(c6e({thisIsSrc:!0}),"edgesTo")});function c6e(t){return l(function(r){var n=[],a=this._private.cy,i=t||{};Or(r)&&(r=a.$(r));for(var s=0;s<r.length;s++)for(var o=r[s]._private.edges,u=0;u<o.length;u++){var h=o[u],d=h._private.data,f=this.hasElementWithId(d.source)&&r.hasElementWithId(d.target),p=r.hasElementWithId(d.source)&&this.hasElementWithId(d.target),g=f||p;g&&((i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!f||i.thisIsTgt&&!p)||n.push(h))}return this.spawn(n,!0)},"edgesWithImpl")}l(c6e,"defineEdgesWithFunction"),zr(Fo,{connectedEdges:nu(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var a=r[n];if(a.isNode())for(var i=a._private.edges,s=0;s<i.length;s++){var o=i[s];e.push(o)}}return this.spawn(e,!0).filter(t)},"connectedEdges"),connectedNodes:nu(function(t){for(var e=[],r=this,n=0;n<r.length;n++){var a=r[n];a.isEdge()&&(e.push(a.source()[0]),e.push(a.target()[0]))}return this.spawn(e,!0).filter(t)},"connectedNodes"),parallelEdges:nu(u6e(),"parallelEdges"),codirectedEdges:nu(u6e({codirected:!0}),"codirectedEdges")});function u6e(t){var e={codirected:!1};return t=zr({},e,t),l(function(n){for(var a=[],i=this.edges(),s=t,o=0;o<i.length;o++)for(var u=i[o],h=u._private,d=h.source,f=d._private.data.id,p=h.data.target,g=d._private.edges,m=0;m<g.length;m++){var y=g[m],v=y._private.data,b=v.target,w=v.source,x=b===p&&w===f,T=f===b&&p===w;(s.codirected&&x||!s.codirected&&(x||T))&&a.push(y)}return this.spawn(a,!0).filter(n)},"parallelEdgesImpl")}l(u6e,"defineParallelEdgesFunction"),zr(Fo,{components:l(function(e){var r=this,n=r.cy(),a=n.collection(),i=e==null?r.nodes():e.nodes(),s=[];e!=null&&i.empty()&&(i=e.sources());var o=l(function(d,f){a.merge(d),i.unmerge(d),f.merge(d)},"visitInComponent");if(i.empty())return r.spawn();var u=l(function(){var d=n.collection();s.push(d);var f=i[0];o(f,d),r.bfs({directed:!1,roots:f,visit:l(function(g){return o(g,d)},"visit")}),d.forEach(function(p){p.connectedEdges().forEach(function(g){r.has(g)&&d.has(g.source())&&d.has(g.target())&&d.merge(g)})})},"_loop");do u();while(i.length>0);return s},"components"),component:l(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},"component")}),Fo.componentsOf=Fo.components;var oo=l(function(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){ni("A collection must have a reference to the core");return}var i=new Af,s=!1;if(!r)r=[];else if(r.length>0&&Fn(r[0])&&!r5(r[0])){s=!0;for(var o=[],u=new ET,h=0,d=r.length;h<d;h++){var f=r[h];f.data==null&&(f.data={});var p=f.data;if(p.id==null)p.id=Y5e();else if(e.hasElementWithId(p.id)||u.has(p.id))continue;var g=new RI(e,f,!1);o.push(g),u.add(p.id)}r=o}this.length=0;for(var m=0,y=r.length;m<y;m++){var v=r[m][0];if(v!=null){var b=v._private.data.id;(!n||!i.has(b))&&(n&&i.set(b,{index:this.length,ele:v}),this[this.length]=v,this.length++)}}this._private={eles:this,cy:e,get map(){return this.lazyMap==null&&this.rebuildMap(),this.lazyMap},set map(w){this.lazyMap=w},rebuildMap:l(function(){for(var x=this.lazyMap=new Af,T=this.eles,C=0;C<T.length;C++){var S=T[C];x.set(S.id(),{index:C,ele:S})}},"rebuildMap")},n&&(this._private.map=i),s&&!a&&this.restore()},"Collection"),$a=RI.prototype=oo.prototype=Object.create(Array.prototype);$a.instanceString=function(){return"collection"},$a.spawn=function(t,e){return new oo(this.cy(),t,e)},$a.spawnSelf=function(){return this.spawn(this)},$a.cy=function(){return this._private.cy},$a.renderer=function(){return this._private.cy.renderer()},$a.element=function(){return this[0]},$a.collection=function(){return p5e(this)?this:new oo(this._private.cy,[this])},$a.unique=function(){return new oo(this._private.cy,this,!0)},$a.hasElementWithId=function(t){return t=""+t,this._private.map.has(t)},$a.getElementById=function(t){t=""+t;var e=this._private.cy,r=this._private.map.get(t);return r?r.ele:new oo(e)},$a.$id=$a.getElementById,$a.poolIndex=function(){var t=this._private.cy,e=t._private.elements,r=this[0]._private.data.id;return e._private.map.get(r).index},$a.indexOf=function(t){var e=t[0]._private.data.id;return this._private.map.get(e).index},$a.indexOfId=function(t){return t=""+t,this._private.map.get(t).index},$a.json=function(t){var e=this.element(),r=this.cy();if(e==null&&t)return this;if(e!=null){var n=e._private;if(Fn(t)){if(r.startBatch(),t.data){e.data(t.data);var a=n.data;if(e.isEdge()){var i=!1,s={},o=t.data.source,u=t.data.target;o!=null&&o!=a.source&&(s.source=""+o,i=!0),u!=null&&u!=a.target&&(s.target=""+u,i=!0),i&&(e=e.move(s))}else{var h="parent"in t.data,d=t.data.parent;h&&(d!=null||a.parent!=null)&&d!=a.parent&&(d===void 0&&(d=null),d!=null&&(d=""+d),e=e.move({parent:d}))}}t.position&&e.position(t.position);var f=l(function(y,v,b){var w=t[y];w!=null&&w!==n[y]&&(w?e[v]():e[b]())},"checkSwitch");return f("removed","remove","restore"),f("selected","select","unselect"),f("selectable","selectify","unselectify"),f("locked","lock","unlock"),f("grabbable","grabify","ungrabify"),f("pannable","panify","unpanify"),t.classes!=null&&e.classes(t.classes),r.endBatch(),this}else if(t===void 0){var p={data:td(n.data),position:td(n.position),group:n.group,removed:n.removed,selected:n.selected,selectable:n.selectable,locked:n.locked,grabbable:n.grabbable,pannable:n.pannable,classes:null};p.classes="";var g=0;return n.classes.forEach(function(m){return p.classes+=g++===0?m:" "+m}),p}}},$a.jsons=function(){for(var t=[],e=0;e<this.length;e++){var r=this[e],n=r.json();t.push(n)}return t},$a.clone=function(){for(var t=this.cy(),e=[],r=0;r<this.length;r++){var n=this[r],a=n.json(),i=new RI(t,a,!1);e.push(i)}return new oo(t,e)},$a.copy=$a.clone,$a.restore=function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),a=n._private,i=[],s=[],o,u=0,h=r.length;u<h;u++){var d=r[u];e&&!d.removed()||(d.isNode()?i.push(d):s.push(d))}o=i.concat(s);var f,p=l(function(){o.splice(f,1),f--},"removeFromElements");for(f=0;f<o.length;f++){var g=o[f],m=g._private,y=m.data;if(g.clearTraversalCache(),!(!e&&!m.removed)){if(y.id===void 0)y.id=Y5e();else if(mr(y.id))y.id=""+y.id;else if(bp(y.id)||!Or(y.id)){ni("Can not create element with invalid string ID `"+y.id+"`"),p();continue}else if(n.hasElementWithId(y.id)){ni("Can not create second element with ID `"+y.id+"`"),p();continue}}var v=y.id;if(g.isNode()){var b=m.position;b.x==null&&(b.x=0),b.y==null&&(b.y=0)}if(g.isEdge()){for(var w=g,x=["source","target"],T=x.length,C=!1,S=0;S<T;S++){var E=x[S],k=y[E];mr(k)&&(k=y[E]=""+y[E]),k==null||k===""?(ni("Can not create edge `"+v+"` with unspecified "+E),C=!0):n.hasElementWithId(k)||(ni("Can not create edge `"+v+"` with nonexistent "+E+" `"+k+"`"),C=!0)}if(C){p();continue}var A=n.getElementById(y.source),I=n.getElementById(y.target);A.same(I)?A._private.edges.push(w):(A._private.edges.push(w),I._private.edges.push(w)),w._private.source=A,w._private.target=I}m.map=new Af,m.map.set(v,{ele:g,index:0}),m.removed=!1,e&&n.addToPool(g)}for(var L=0;L<i.length;L++){var R=i[L],O=R._private.data;mr(O.parent)&&(O.parent=""+O.parent);var M=O.parent,P=M!=null;if(P||R._private.parent){var z=R._private.parent?n.collection().merge(R._private.parent):n.getElementById(M);if(z.empty())O.parent=void 0;else if(z[0].removed())na("Node added with missing parent, reference to parent removed"),O.parent=void 0,R._private.parent=null;else{for(var D=!1,B=z;!B.empty();){if(R.same(B)){D=!0,O.parent=void 0;break}B=B.parent()}D||(z[0]._private.children.push(R),R._private.parent=z[0],a.hasCompoundNodes=!0)}}}if(o.length>0){for(var W=o.length===r.length?r:new oo(n,o),U=0;U<W.length;U++){var j=W[U];j.isNode()||(j.parallelEdges().clearTraversalCache(),j.source().clearTraversalCache(),j.target().clearTraversalCache())}var V;a.hasCompoundNodes?V=n.collection().merge(W).merge(W.connectedNodes()).merge(W.parent()):V=W,V.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(t),t?W.emitAndNotify("add"):e&&W.emit("add")}return r},$a.removed=function(){var t=this[0];return t&&t._private.removed},$a.inside=function(){var t=this[0];return t&&!t._private.removed},$a.remove=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],a={},i=r._private.cy;function s(M){for(var P=M._private.edges,z=0;z<P.length;z++)u(P[z])}l(s,"addConnectedEdges");function o(M){for(var P=M._private.children,z=0;z<P.length;z++)u(P[z])}l(o,"addChildren");function u(M){var P=a[M.id()];e&&M.removed()||P||(a[M.id()]=!0,M.isNode()?(n.push(M),s(M),o(M)):n.unshift(M))}l(u,"add");for(var h=0,d=r.length;h<d;h++){var f=r[h];u(f)}function p(M,P){var z=M._private.edges;Tp(z,P),M.clearTraversalCache()}l(p,"removeEdgeRef");function g(M){M.clearTraversalCache()}l(g,"removeParallelRef");var m=[];m.ids={};function y(M,P){P=P[0],M=M[0];var z=M._private.children,D=M.id();Tp(z,P),P._private.parent=null,m.ids[D]||(m.ids[D]=!0,m.push(M))}l(y,"removeChildRef"),r.dirtyCompoundBoundsCache(),e&&i.removeFromPool(n);for(var v=0;v<n.length;v++){var b=n[v];if(b.isEdge()){var w=b.source()[0],x=b.target()[0];p(w,b),p(x,b);for(var T=b.parallelEdges(),C=0;C<T.length;C++){var S=T[C];g(S),S.isBundledBezier()&&S.dirtyBoundingBoxCache()}}else{var E=b.parent();E.length!==0&&y(E,b)}e&&(b._private.removed=!0)}var k=i._private.elements;i._private.hasCompoundNodes=!1;for(var A=0;A<k.length;A++){var I=k[A];if(I.isParent()){i._private.hasCompoundNodes=!0;break}}var L=new oo(this.cy(),n);L.size()>0&&(t?L.emitAndNotify("remove"):e&&L.emit("remove"));for(var R=0;R<m.length;R++){var O=m[R];(!e||!O.removed())&&O.updateStyle()}return L},$a.move=function(t){var e=this._private.cy,r=this,n=!1,a=!1,i=l(function(m){return m==null?m:""+m},"toString");if(t.source!==void 0||t.target!==void 0){var s=i(t.source),o=i(t.target),u=s!=null&&e.hasElementWithId(s),h=o!=null&&e.hasElementWithId(o);(u||h)&&(e.batch(function(){r.remove(n,a),r.emitAndNotify("moveout");for(var g=0;g<r.length;g++){var m=r[g],y=m._private.data;m.isEdge()&&(u&&(y.source=s),h&&(y.target=o))}r.restore(n,a)}),r.emitAndNotify("move"))}else if(t.parent!==void 0){var d=i(t.parent),f=d===null||e.hasElementWithId(d);if(f){var p=d===null?void 0:d;e.batch(function(){var g=r.remove(n,a);g.emitAndNotify("moveout");for(var m=0;m<r.length;m++){var y=r[m],v=y._private.data;y.isNode()&&(v.parent=p)}g.restore(n,a)}),r.emitAndNotify("move")}}return this},[w_e,lqt,QI,Np,$T,Cqt,JI,Hqt,e6e,t6e,Yqt,aL,iL,so,Mp,Fo].forEach(function(t){zr($a,t)});var Jqt={add:l(function(e){var r,n=this;if(Sc(e)){var a=e;if(a._private.cy===n)r=a.restore();else{for(var i=[],s=0;s<a.length;s++){var o=a[s];i.push(o.json())}r=new oo(n,i)}}else if(_a(e)){var u=e;r=new oo(n,u)}else if(Fn(e)&&(_a(e.nodes)||_a(e.edges))){for(var h=e,d=[],f=["nodes","edges"],p=0,g=f.length;p<g;p++){var m=f[p],y=h[m];if(_a(y))for(var v=0,b=y.length;v<b;v++){var w=zr({group:m},y[v]);d.push(w)}}r=new oo(n,d)}else{var x=e;r=new RI(n,x).collection()}return r},"add"),remove:l(function(e){if(!Sc(e)){if(Or(e)){var r=e;e=this.$(r)}}return e.remove()},"remove")};function eYt(t,e,r,n){var a=4,i=.001,s=1e-7,o=10,u=11,h=1/(u-1),d=typeof Float32Array!="undefined";if(arguments.length!==4)return!1;for(var f=0;f<4;++f)if(typeof arguments[f]!="number"||isNaN(arguments[f])||!isFinite(arguments[f]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var p=d?new Float32Array(u):new Array(u);function g(I,L){return 1-3*L+3*I}l(g,"A");function m(I,L){return 3*L-6*I}l(m,"B");function y(I){return 3*I}l(y,"C");function v(I,L,R){return((g(L,R)*I+m(L,R))*I+y(L))*I}l(v,"calcBezier");function b(I,L,R){return 3*g(L,R)*I*I+2*m(L,R)*I+y(L)}l(b,"getSlope");function w(I,L){for(var R=0;R<a;++R){var O=b(L,t,r);if(O===0)return L;var M=v(L,t,r)-I;L-=M/O}return L}l(w,"newtonRaphsonIterate");function x(){for(var I=0;I<u;++I)p[I]=v(I*h,t,r)}l(x,"calcSampleValues");function T(I,L,R){var O,M,P=0;do M=L+(R-L)/2,O=v(M,t,r)-I,O>0?R=M:L=M;while(Math.abs(O)>s&&++P<o);return M}l(T,"binarySubdivide");function C(I){for(var L=0,R=1,O=u-1;R!==O&&p[R]<=I;++R)L+=h;--R;var M=(I-p[R])/(p[R+1]-p[R]),P=L+M*h,z=b(P,t,r);return z>=i?w(I,P):z===0?P:T(I,L,L+h)}l(C,"getTForX");var S=!1;function E(){S=!0,(t!==e||r!==n)&&x()}l(E,"precompute");var k=l(function(L){return S||E(),t===e&&r===n?L:L===0?0:L===1?1:v(C(L),e,n)},"f");k.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var A="generateBezier("+[t,e,r,n]+")";return k.toString=function(){return A},k}l(eYt,"generateCubicBezier");var tYt=function(){function t(n){return-n.tension*n.x-n.friction*n.v}l(t,"springAccelerationForState");function e(n,a,i){var s={x:n.x+i.dx*a,v:n.v+i.dv*a,tension:n.tension,friction:n.friction};return{dx:s.v,dv:t(s)}}l(e,"springEvaluateStateWithDerivative");function r(n,a){var i={dx:n.v,dv:t(n)},s=e(n,a*.5,i),o=e(n,a*.5,s),u=e(n,a,o),h=1/6*(i.dx+2*(s.dx+o.dx)+u.dx),d=1/6*(i.dv+2*(s.dv+o.dv)+u.dv);return n.x=n.x+h*a,n.v=n.v+d*a,n}return l(r,"springIntegrateState"),l(function n(a,i,s){var o={x:-1,v:0,tension:null,friction:null},u=[0],h=0,d=1/1e4,f=16/1e3,p,g,m;for(a=parseFloat(a)||500,i=parseFloat(i)||20,s=s||null,o.tension=a,o.friction=i,p=s!==null,p?(h=n(a,i),g=h/s*f):g=f;m=r(m||o,g),u.push(1+m.x),h+=16,Math.abs(m.x)>d&&Math.abs(m.v)>d;);return p?function(y){return u[y*(u.length-1)|0]}:h},"springRK4Factory")}(),Ma=l(function(e,r,n,a){var i=eYt(e,r,n,a);return function(s,o,u){return s+(o-s)*i(u)}},"cubicBezier"),lL={linear:l(function(e,r,n){return e+(r-e)*n},"linear"),ease:Ma(.25,.1,.25,1),"ease-in":Ma(.42,0,1,1),"ease-out":Ma(0,0,.58,1),"ease-in-out":Ma(.42,0,.58,1),"ease-in-sine":Ma(.47,0,.745,.715),"ease-out-sine":Ma(.39,.575,.565,1),"ease-in-out-sine":Ma(.445,.05,.55,.95),"ease-in-quad":Ma(.55,.085,.68,.53),"ease-out-quad":Ma(.25,.46,.45,.94),"ease-in-out-quad":Ma(.455,.03,.515,.955),"ease-in-cubic":Ma(.55,.055,.675,.19),"ease-out-cubic":Ma(.215,.61,.355,1),"ease-in-out-cubic":Ma(.645,.045,.355,1),"ease-in-quart":Ma(.895,.03,.685,.22),"ease-out-quart":Ma(.165,.84,.44,1),"ease-in-out-quart":Ma(.77,0,.175,1),"ease-in-quint":Ma(.755,.05,.855,.06),"ease-out-quint":Ma(.23,1,.32,1),"ease-in-out-quint":Ma(.86,0,.07,1),"ease-in-expo":Ma(.95,.05,.795,.035),"ease-out-expo":Ma(.19,1,.22,1),"ease-in-out-expo":Ma(1,0,0,1),"ease-in-circ":Ma(.6,.04,.98,.335),"ease-out-circ":Ma(.075,.82,.165,1),"ease-in-out-circ":Ma(.785,.135,.15,.86),spring:l(function(e,r,n){if(n===0)return lL.linear;var a=tYt(e,r,n);return function(i,s,o){return i+(s-i)*a(o)}},"spring"),"cubic-bezier":Ma};function h6e(t,e,r,n,a){if(n===1||e===r)return r;var i=a(e,r,n);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}l(h6e,"getEasedValue");function d6e(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}l(d6e,"getValue$1");function BT(t,e,r,n,a){var i=a!=null?a.type:null;r<0?r=0:r>1&&(r=1);var s=d6e(t,a),o=d6e(e,a);if(mr(s)&&mr(o))return h6e(i,s,o,r,n);if(_a(s)&&_a(o)){for(var u=[],h=0;h<o.length;h++){var d=s[h],f=o[h];if(d!=null&&f!=null){var p=h6e(i,d,f,r,n);u.push(p)}else u.push(f)}return u}}l(BT,"ease");function rYt(t,e,r,n){var a=!n,i=t._private,s=e._private,o=s.easing,u=s.startTime,h=n?t:t.cy(),d=h.style();if(!s.easingImpl)if(o==null)s.easingImpl=lL.linear;else{var f;if(Or(o)){var p=d.parse("transition-timing-function",o);f=p.value}else f=o;var g,m;Or(f)?(g=f,m=[]):(g=f[1],m=f.slice(2).map(function(W){return+W})),m.length>0?(g==="spring"&&m.push(s.duration),s.easingImpl=lL[g].apply(null,m)):s.easingImpl=lL[g]}var y=s.easingImpl,v;if(s.duration===0?v=1:v=(r-u)/s.duration,s.applying&&(v=s.progress),v<0?v=0:v>1&&(v=1),s.delay==null){var b=s.startPosition,w=s.position;if(w&&a&&!t.locked()){var x={};w5(b.x,w.x)&&(x.x=BT(b.x,w.x,v,y)),w5(b.y,w.y)&&(x.y=BT(b.y,w.y,v,y)),t.position(x)}var T=s.startPan,C=s.pan,S=i.pan,E=C!=null&&n;E&&(w5(T.x,C.x)&&(S.x=BT(T.x,C.x,v,y)),w5(T.y,C.y)&&(S.y=BT(T.y,C.y,v,y)),t.emit("pan"));var k=s.startZoom,A=s.zoom,I=A!=null&&n;I&&(w5(k,A)&&(i.zoom=h5(i.minZoom,BT(k,A,v,y),i.maxZoom)),t.emit("zoom")),(E||I)&&t.emit("viewport");var L=s.style;if(L&&L.length>0&&a){for(var R=0;R<L.length;R++){var O=L[R],M=O.name,P=O,z=s.startStyle[M],D=d.properties[z.name],B=BT(z,P,v,y,D);d.overrideBypass(t,M,B)}t.emit("style")}}return s.progress=v,v}l(rYt,"step$1");function w5(t,e){return t==null||e==null?!1:mr(t)&&mr(e)?!0:!!(t&&e)}l(w5,"valid");function nYt(t,e,r,n){var a=e._private;a.started=!0,a.startTime=r-a.progress*a.duration}l(nYt,"startAnimation");function f6e(t,e){var r=e._private.aniEles,n=[];function a(d,f){var p=d._private,g=p.animation.current,m=p.animation.queue,y=!1;if(g.length===0){var v=m.shift();v&&g.push(v)}for(var b=l(function(S){for(var E=S.length-1;E>=0;E--){var k=S[E];k()}S.splice(0,S.length)},"callbacks"),w=g.length-1;w>=0;w--){var x=g[w],T=x._private;if(T.stopped){g.splice(w,1),T.hooked=!1,T.playing=!1,T.started=!1,b(T.frames);continue}!T.playing&&!T.applying||(T.playing&&T.applying&&(T.applying=!1),T.started||nYt(d,x,t),rYt(d,x,t,f),T.applying&&(T.applying=!1),b(T.frames),T.step!=null&&T.step(t),x.completed()&&(g.splice(w,1),T.hooked=!1,T.playing=!1,T.started=!1,b(T.completes)),y=!0)}return!f&&g.length===0&&m.length===0&&n.push(d),y}l(a,"stepOne");for(var i=!1,s=0;s<r.length;s++){var o=r[s],u=a(o);i=i||u}var h=a(e,!0);(i||h)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}l(f6e,"stepAll");var aYt={animate:aa.animate(),animation:aa.animation(),animated:aa.animated(),clearQueue:aa.clearQueue(),delay:aa.delay(),delayAnimation:aa.delayAnimation(),stop:aa.stop(),addToAnimationPool:l(function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},"addToAnimationPool"),stopAnimationLoop:l(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:l(function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&$I(l(function(i){f6e(i,e),r()},"animationStep"))}l(r,"headlessStep");var n=e.renderer();n&&n.beforeRender?n.beforeRender(l(function(i,s){f6e(s,e)},"rendererAnimationStep"),n.beforeRenderPriorities.animations):r()},"startAnimationLoop")},iYt={qualifierCompare:l(function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},"qualifierCompare"),eventMatches:l(function(e,r,n){var a=r.qualifier;return a!=null?e!==n.target&&r5(n.target)&&a.matches(n.target):!0},"eventMatches"),addEventFields:l(function(e,r){r.cy=e,r.target=e},"addEventFields"),callbackContext:l(function(e,r,n){return r.qualifier!=null?n.target:e},"callbackContext")},cL=l(function(e){return Or(e)?new kp(e):e},"argSelector"),p6e={createEmitter:l(function(){var e=this._private;return e.emitter||(e.emitter=new rL(iYt,this)),this},"createEmitter"),emitter:l(function(){return this._private.emitter},"emitter"),on:l(function(e,r,n){return this.emitter().on(e,cL(r),n),this},"on"),removeListener:l(function(e,r,n){return this.emitter().removeListener(e,cL(r),n),this},"removeListener"),removeAllListeners:l(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:l(function(e,r,n){return this.emitter().one(e,cL(r),n),this},"one"),once:l(function(e,r,n){return this.emitter().one(e,cL(r),n),this},"once"),emit:l(function(e,r){return this.emitter().emit(e,r),this},"emit"),emitAndNotify:l(function(e,r){return this.emit(e),this.notify(e,r),this},"emitAndNotify")};aa.eventAliasesOn(p6e);var jU={png:l(function(e){var r=this._private.renderer;return e=e||{},r.png(e)},"png"),jpg:l(function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)},"jpg")};jU.jpeg=jU.jpg;var uL={layout:l(function(e){var r=this;if(e==null){ni("Layout options must be specified to make a layout");return}if(e.name==null){ni("A `name` must be specified to make a layout");return}var n=e.name,a=r.extension("layout",n);if(a==null){ni("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;Or(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var s=new a(zr({},e,{cy:r,eles:i}));return s},"layout")};uL.createLayout=uL.makeLayout=uL.layout;var sYt={notify:l(function(e,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var a=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();r!=null&&a.merge(r);return}if(n.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},"notify"),notifications:l(function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},"notifications"),noNotifications:l(function(e){this.notifications(!1),e(),this.notifications(!0)},"noNotifications"),batching:l(function(){return this._private.batchCount>0},"batching"),startBatch:l(function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},"startBatch"),endBatch:l(function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var a=e.batchNotifications[n];a.empty()?r.notify(n):r.notify(n,a)})}return this},"endBatch"),batch:l(function(e){return this.startBatch(),e(),this.endBatch(),this},"batch"),batchData:l(function(e){var r=this;return this.batch(function(){for(var n=Object.keys(e),a=0;a<n.length;a++){var i=n[a],s=e[i],o=r.getElementById(i);o.data(s)}})},"batchData")},oYt=io({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),KU={renderTo:l(function(e,r,n,a){var i=this._private.renderer;return i.renderTo(e,r,n,a),this},"renderTo"),renderer:l(function(){return this._private.renderer},"renderer"),forceRender:l(function(){return this.notify("draw"),this},"forceRender"),resize:l(function(){return this.invalidateSize(),this.emitAndNotify("resize"),this},"resize"),initRenderer:l(function(e){var r=this,n=r.extension("renderer",e.name);if(n==null){ni("Can not initialise: No such renderer `".concat(e.name,"` found. Did you forget to import it and `cytoscape.use()` it?"));return}e.wheelSensitivity!==void 0&&na("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");var a=oYt(e);a.cy=r,r._private.renderer=new n(a),this.notify("init")},"initRenderer"),destroyRenderer:l(function(){var e=this;e.notify("destroy");var r=e.container();if(r)for(r._cyreg=null;r.childNodes.length>0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(n){var a=n._private;a.rscratch={},a.rstyle={},a.animation.current=[],a.animation.queue=[]})},"destroyRenderer"),onRender:l(function(e){return this.on("render",e)},"onRender"),offRender:l(function(e){return this.off("render",e)},"offRender")};KU.invalidateDimensions=KU.resize;var hL={collection:l(function(e,r){return Or(e)?this.$(e):Sc(e)?e.collection():_a(e)?(r||(r={}),new oo(this,e,r.unique,r.removed)):new oo(this)},"collection"),nodes:l(function(e){var r=this.$(function(n){return n.isNode()});return e?r.filter(e):r},"nodes"),edges:l(function(e){var r=this.$(function(n){return n.isEdge()});return e?r.filter(e):r},"edges"),$:l(function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},"$"),mutableElements:l(function(){return this._private.elements},"mutableElements")};hL.elements=hL.filter=hL.$;var Bs={},T5="t",lYt="f";Bs.apply=function(t){for(var e=this,r=e._private,n=r.cy,a=n.collection(),i=0;i<t.length;i++){var s=t[i],o=e.getContextMeta(s);if(!o.empty){var u=e.getContextStyle(o),h=e.applyContextStyle(o,u,s);s._private.appliedInitStyle?e.updateTransitions(s,h.diffProps):s._private.appliedInitStyle=!0;var d=e.updateStyleHints(s);d&&a.push(s)}}return a},Bs.getPropertiesDiff=function(t,e){var r=this,n=r._private.propDiffs=r._private.propDiffs||{},a=t+"-"+e,i=n[a];if(i)return i;for(var s=[],o={},u=0;u<r.length;u++){var h=r[u],d=t[u]===T5,f=e[u]===T5,p=d!==f,g=h.mappedProperties.length>0;if(p||f&&g){var m=void 0;p&&g||p?m=h.properties:g&&(m=h.mappedProperties);for(var y=0;y<m.length;y++){for(var v=m[y],b=v.name,w=!1,x=u+1;x<r.length;x++){var T=r[x],C=e[x]===T5;if(C&&(w=T.properties[v.name]!=null,w))break}!o[b]&&!w&&(o[b]=!0,s.push(b))}}}return n[a]=s,s},Bs.getContextMeta=function(t){for(var e=this,r="",n,a=t._private.styleCxtKey||"",i=0;i<e.length;i++){var s=e[i],o=s.selector&&s.selector.matches(t);o?r+=T5:r+=lYt}return n=e.getPropertiesDiff(a,r),t._private.styleCxtKey=r,{key:r,diffPropNames:n,empty:n.length===0}},Bs.getContextStyle=function(t){var e=t.key,r=this,n=this._private.contextStyles=this._private.contextStyles||{};if(n[e])return n[e];for(var a={_private:{key:e}},i=0;i<r.length;i++){var s=r[i],o=e[i]===T5;if(o)for(var u=0;u<s.properties.length;u++){var h=s.properties[u];a[h.name]=h}}return n[e]=a,a},Bs.applyContextStyle=function(t,e,r){for(var n=this,a=t.diffPropNames,i={},s=n.types,o=0;o<a.length;o++){var u=a[o],h=e[u],d=r.pstyle(u);if(!h)if(d)d.bypass?h={name:u,deleteBypassed:!0}:h={name:u,delete:!0};else continue;if(d!==h){if(h.mapped===s.fn&&d!=null&&d.mapping!=null&&d.mapping.value===h.value){var f=d.mapping,p=f.fnValue=h.value(r);if(p===f.prevFnValue)continue}var g=i[u]={prev:d};n.applyParsedProperty(r,h),g.next=r.pstyle(u),g.next&&g.next.bypass&&(g.next=g.next.bypassed)}}return{diffProps:i}},Bs.updateStyleHints=function(t){var e=t._private,r=this,n=r.propertyGroupNames,a=r.propertyGroupKeys,i=l(function(J,ae,se){return r.getPropertiesHash(J,ae,se)},"propHash"),s=e.styleKey;if(t.removed())return!1;var o=e.group==="nodes",u=t._private.style;n=Object.keys(u);for(var h=0;h<a.length;h++){var d=a[h];e.styleKeys[d]=[Km,TT]}for(var f=l(function(J,ae){return e.styleKeys[ae][0]=o5(J,e.styleKeys[ae][0])},"updateGrKey1"),p=l(function(J,ae){return e.styleKeys[ae][1]=l5(J,e.styleKeys[ae][1])},"updateGrKey2"),g=l(function(J,ae){f(J,ae),p(J,ae)},"updateGrKey"),m=l(function(J,ae){for(var se=0;se<J.length;se++){var fe=J.charCodeAt(se);f(fe,ae),p(fe,ae)}},"updateGrKeyWStr"),y=2e9,v=l(function(J){return-128<J&&J<128&&Math.floor(J)!==J?y-(J*1024|0):J},"cleanNum"),b=0;b<n.length;b++){var w=n[b],x=u[w];if(x!=null){var T=this.properties[w],C=T.type,S=T.groupKey,E=void 0;T.hashOverride!=null?E=T.hashOverride(t,x):x.pfValue!=null&&(E=x.pfValue);var k=T.enums==null?x.value:null,A=E!=null,I=k!=null,L=A||I,R=x.units;if(C.number&&L&&!C.multiple){var O=A?E:k;g(v(O),S),!A&&R!=null&&m(R,S)}else m(x.strValue,S)}}for(var M=[Km,TT],P=0;P<a.length;P++){var z=a[P],D=e.styleKeys[z];M[0]=o5(D[0],M[0]),M[1]=l5(D[1],M[1])}e.styleKey=EWt(M[0],M[1]);var B=e.styleKeys;e.labelDimsKey=wp(B.labelDimensions);var W=i(t,["label"],B.labelDimensions);if(e.labelKey=wp(W),e.labelStyleKey=wp(MI(B.commonLabel,W)),!o){var U=i(t,["source-label"],B.labelDimensions);e.sourceLabelKey=wp(U),e.sourceLabelStyleKey=wp(MI(B.commonLabel,U));var j=i(t,["target-label"],B.labelDimensions);e.targetLabelKey=wp(j),e.targetLabelStyleKey=wp(MI(B.commonLabel,j))}if(o){var V=e.styleKeys,Y=V.nodeBody,H=V.nodeBorder,q=V.nodeOutline,Z=V.backgroundImage,K=V.compound,re=V.pie,Q=V.stripe,te=[Y,H,q,Z,K,re,Q].filter(function(ee){return ee!=null}).reduce(MI,[Km,TT]);e.nodeKey=wp(te),e.hasPie=re!=null&&re[0]!==Km&&re[1]!==TT,e.hasStripe=Q!=null&&Q[0]!==Km&&Q[1]!==TT}return s!==e.styleKey},Bs.clearStyleHints=function(t){var e=t._private;e.styleCxtKey="",e.styleKeys={},e.styleKey=null,e.labelKey=null,e.labelStyleKey=null,e.sourceLabelKey=null,e.sourceLabelStyleKey=null,e.targetLabelKey=null,e.targetLabelStyleKey=null,e.nodeKey=null,e.hasPie=null,e.hasStripe=null},Bs.applyParsedProperty=function(t,e){var r=this,n=e,a=t._private.style,i,s=r.types,o=r.properties[n.name].type,u=n.bypass,h=a[n.name],d=h&&h.bypass,f=t._private,p="mapping",g=l(function(Y){return Y==null?null:Y.pfValue!=null?Y.pfValue:Y.value},"getVal"),m=l(function(){var Y=g(h),H=g(n);r.checkTriggers(t,n.name,Y,H)},"checkTriggers");if(e.name==="curve-style"&&t.isEdge()&&(e.value!=="bezier"&&t.isLoop()||e.value==="haystack"&&(t.source().isParent()||t.target().isParent()))&&(n=e=this.parse(e.name,"bezier",u)),n.delete)return a[n.name]=void 0,m(),!0;if(n.deleteBypassed)return h?h.bypass?(h.bypassed=void 0,m(),!0):!1:(m(),!0);if(n.deleteBypass)return h?h.bypass?(a[n.name]=h.bypassed,m(),!0):!1:(m(),!0);var y=l(function(){na("Do not assign mappings to elements without corresponding data (i.e. ele `"+t.id()+"` has no mapping for property `"+n.name+"` with data field `"+n.field+"`); try a `["+n.field+"]` selector to limit scope to elements with `"+n.field+"` defined")},"printMappingErr");switch(n.mapped){case s.mapData:{for(var v=n.field.split("."),b=f.data,w=0;w<v.length&&b;w++){var x=v[w];b=b[x]}if(b==null)return y(),!1;var T;if(mr(b)){var C=n.fieldMax-n.fieldMin;C===0?T=0:T=(b-n.fieldMin)/C}else return na("Do not use continuous mappers without specifying numeric data (i.e. `"+n.field+": "+b+"` for `"+t.id()+"` is non-numeric)"),!1;if(T<0?T=0:T>1&&(T=1),o.color){var S=n.valueMin[0],E=n.valueMax[0],k=n.valueMin[1],A=n.valueMax[1],I=n.valueMin[2],L=n.valueMax[2],R=n.valueMin[3]==null?1:n.valueMin[3],O=n.valueMax[3]==null?1:n.valueMax[3],M=[Math.round(S+(E-S)*T),Math.round(k+(A-k)*T),Math.round(I+(L-I)*T),Math.round(R+(O-R)*T)];i={bypass:n.bypass,name:n.name,value:M,strValue:"rgb("+M[0]+", "+M[1]+", "+M[2]+")"}}else if(o.number){var P=n.valueMin+(n.valueMax-n.valueMin)*T;i=this.parse(n.name,P,n.bypass,p)}else return!1;if(!i)return y(),!1;i.mapping=n,n=i;break}case s.data:{for(var z=n.field.split("."),D=f.data,B=0;B<z.length&&D;B++){var W=z[B];D=D[W]}if(D!=null&&(i=this.parse(n.name,D,n.bypass,p)),!i)return y(),!1;i.mapping=n,n=i;break}case s.fn:{var U=n.value,j=n.fnValue!=null?n.fnValue:U(t);if(n.prevFnValue=j,j==null)return na("Custom function mappers may not return null (i.e. `"+n.name+"` for ele `"+t.id()+"` is null)"),!1;if(i=this.parse(n.name,j,n.bypass,p),!i)return na("Custom function mappers may not return invalid values for the property type (i.e. `"+n.name+"` for ele `"+t.id()+"` is invalid)"),!1;i.mapping=td(n),n=i;break}case void 0:break;default:return!1}return u?(d?n.bypassed=h.bypassed:n.bypassed=h,a[n.name]=n):d?h.bypassed=n:a[n.name]=n,m(),!0},Bs.cleanElements=function(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(this.clearStyleHints(n),n.dirtyCompoundBoundsCache(),n.dirtyBoundingBoxCache(),!e)n._private.style={};else for(var a=n._private.style,i=Object.keys(a),s=0;s<i.length;s++){var o=i[s],u=a[o];u!=null&&(u.bypass?u.bypassed=null:a[o]=null)}}},Bs.update=function(){var t=this._private.cy,e=t.mutableElements();e.updateStyle()},Bs.updateTransitions=function(t,e){var r=this,n=t._private,a=t.pstyle("transition-property").value,i=t.pstyle("transition-duration").pfValue,s=t.pstyle("transition-delay").pfValue;if(a.length>0&&i>0){for(var o={},u=!1,h=0;h<a.length;h++){var d=a[h],f=t.pstyle(d),p=e[d];if(p){var g=p.prev,m=g,y=p.next!=null?p.next:f,v=!1,b=void 0,w=1e-6;m&&(mr(m.pfValue)&&mr(y.pfValue)?(v=y.pfValue-m.pfValue,b=m.pfValue+w*v):mr(m.value)&&mr(y.value)?(v=y.value-m.value,b=m.value+w*v):_a(m.value)&&_a(y.value)&&(v=m.value[0]!==y.value[0]||m.value[1]!==y.value[1]||m.value[2]!==y.value[2],b=m.strValue),v&&(o[d]=y.strValue,this.applyBypass(t,d,b),u=!0))}}if(!u)return;n.transitioning=!0,new IT(function(x){s>0?t.delayAnimation(s).play().promise().then(x):x()}).then(function(){return t.animation({style:o,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(t,a),t.emitAndNotify("style"),n.transitioning=!1)},Bs.checkTrigger=function(t,e,r,n,a,i){var s=this.properties[e],o=a(s);t.removed()||o!=null&&o(r,n,t)&&i(s)},Bs.checkZOrderTrigger=function(t,e,r,n){var a=this;this.checkTrigger(t,e,r,n,function(i){return i.triggersZOrder},function(){a._private.cy.notify("zorder",t)})},Bs.checkBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBounds},function(a){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache()})},Bs.checkConnectedEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBoundsOfConnectedEdges},function(a){t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})},Bs.checkParallelEdgesBoundsTrigger=function(t,e,r,n){this.checkTrigger(t,e,r,n,function(a){return a.triggersBoundsOfParallelEdges},function(a){t.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})},Bs.checkTriggers=function(t,e,r,n){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,n),this.checkBoundsTrigger(t,e,r,n),this.checkConnectedEdgesBoundsTrigger(t,e,r,n),this.checkParallelEdgesBoundsTrigger(t,e,r,n)};var E5={};E5.applyBypass=function(t,e,r,n){var a=this,i=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;o<a.properties.length;o++){var u=a.properties[o],h=u.name,d=this.parse(h,r,!0);d&&i.push(d)}}else if(Or(e)){var f=this.parse(e,r,!0);f&&i.push(f)}else if(Fn(e)){var p=e;n=r;for(var g=Object.keys(p),m=0;m<g.length;m++){var y=g[m],v=p[y];if(v===void 0&&(v=p[NI(y)]),v!==void 0){var b=this.parse(y,v,!0);b&&i.push(b)}}}else return!1;if(i.length===0)return!1;for(var w=!1,x=0;x<t.length;x++){for(var T=t[x],C={},S=void 0,E=0;E<i.length;E++){var k=i[E];if(n){var A=T.pstyle(k.name);S=C[k.name]={prev:A}}w=this.applyParsedProperty(T,td(k))||w,n&&(S.next=T.pstyle(k.name))}w&&this.updateStyleHints(T),n&&this.updateTransitions(T,C,s)}return w},E5.overrideBypass=function(t,e,r){e=aY(e);for(var n=0;n<t.length;n++){var a=t[n],i=a._private.style[e],s=this.properties[e].type,o=s.color,u=s.mutiple,h=i?i.pfValue!=null?i.pfValue:i.value:null;!i||!i.bypass?this.applyBypass(a,e,r):(i.value=r,i.pfValue!=null&&(i.pfValue=r),o?i.strValue="rgb("+r.join(",")+")":u?i.strValue=r.join(" "):i.strValue=""+r,this.updateStyleHints(a)),this.checkTriggers(a,e,h,r)}},E5.removeAllBypasses=function(t,e){return this.removeBypasses(t,this.propertyNames,e)},E5.removeBypasses=function(t,e,r){for(var n=!0,a=0;a<t.length;a++){for(var i=t[a],s={},o=0;o<e.length;o++){var u=e[o],h=this.properties[u],d=i.pstyle(h.name);if(!(!d||!d.bypass)){var f="",p=this.parse(u,f,!0),g=s[h.name]={prev:d};this.applyParsedProperty(i,p),g.next=i.pstyle(h.name)}}this.updateStyleHints(i),r&&this.updateTransitions(i,s,n)}};var XU={};XU.getEmSizeInPixels=function(){var t=this.containerCss("font-size");return t!=null?parseFloat(t):1},XU.containerCss=function(t){var e=this._private.cy,r=e.container(),n=e.window();if(n&&r&&n.getComputedStyle)return n.getComputedStyle(r).getPropertyValue(t)};var nd={};nd.getRenderedStyle=function(t,e){return e?this.getStylePropertyValue(t,e,!0):this.getRawStyle(t,!0)},nd.getRawStyle=function(t,e){var r=this;if(t=t[0],t){for(var n={},a=0;a<r.properties.length;a++){var i=r.properties[a],s=r.getStylePropertyValue(t,i.name,e);s!=null&&(n[i.name]=s,n[NI(i.name)]=s)}return n}},nd.getIndexedStyle=function(t,e,r,n){var a=t.pstyle(e)[r][n];return a!=null?a:t.cy().style().getDefaultProperty(e)[r][0]},nd.getStylePropertyValue=function(t,e,r){var n=this;if(t=t[0],t){var a=n.properties[e];a.alias&&(a=a.pointsTo);var i=a.type,s=t.pstyle(a.name);if(s){var o=s.value,u=s.units,h=s.strValue;if(r&&i.number&&o!=null&&mr(o)){var d=t.cy().zoom(),f=l(function(v){return v*d},"getRenderedValue"),p=l(function(v,b){return f(v)+b},"getValueStringWithUnits"),g=_a(o),m=g?u.every(function(y){return y!=null}):u!=null;return m?g?o.map(function(y,v){return p(y,u[v])}).join(" "):p(o,u):g?o.map(function(y){return Or(y)?y:""+f(y)}).join(" "):""+f(o)}else if(h!=null)return h}return null}},nd.getAnimationStartStyle=function(t,e){for(var r={},n=0;n<e.length;n++){var a=e[n],i=a.name,s=t.pstyle(i);s!==void 0&&(Fn(s)?s=this.parse(i,s.strValue):s=this.parse(i,s)),s&&(r[i]=s)}return r},nd.getPropsList=function(t){var e=this,r=[],n=t,a=e.properties;if(n)for(var i=Object.keys(n),s=0;s<i.length;s++){var o=i[s],u=n[o],h=a[o]||a[aY(o)],d=this.parse(h.name,u);d&&r.push(d)}return r},nd.getNonDefaultPropertiesHash=function(t,e,r){var n=r.slice(),a,i,s,o,u,h;for(u=0;u<e.length;u++)if(a=e[u],i=t.pstyle(a,!1),i!=null)if(i.pfValue!=null)n[0]=o5(o,n[0]),n[1]=l5(o,n[1]);else for(s=i.strValue,h=0;h<s.length;h++)o=s.charCodeAt(h),n[0]=o5(o,n[0]),n[1]=l5(o,n[1]);return n},nd.getPropertiesHash=nd.getNonDefaultPropertiesHash;var dL={};dL.appendFromJson=function(t){for(var e=this,r=0;r<t.length;r++){var n=t[r],a=n.selector,i=n.style||n.css,s=Object.keys(i);e.selector(a);for(var o=0;o<s.length;o++){var u=s[o],h=i[u];e.css(u,h)}}return e},dL.fromJson=function(t){var e=this;return e.resetToDefault(),e.appendFromJson(t),e},dL.json=function(){for(var t=[],e=this.defaultLength;e<this.length;e++){for(var r=this[e],n=r.selector,a=r.properties,i={},s=0;s<a.length;s++){var o=a[s];i[o.name]=o.strValue}t.push({selector:n?n.toString():"core",style:i})}return t};var ZU={};ZU.appendFromString=function(t){var e=this,r=this,n=""+t,a,i,s;n=n.replace(/[/][*](\s|.)+?[*][/]/g,"");function o(){n.length>a.length?n=n.substr(a.length):n=""}l(o,"removeSelAndBlockFromRemaining");function u(){i.length>s.length?i=i.substr(s.length):i=""}for(l(u,"removePropAndValFromRem");;){var h=n.match(/^\s*$/);if(h)break;var d=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){na("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}a=d[0];var f=d[1];if(f!=="core"){var p=new kp(f);if(p.invalid){na("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var g=d[2],m=!1;i=g;for(var y=[];;){var v=i.match(/^\s*$/);if(v)break;var b=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!b){na("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+g),m=!0;break}s=b[0];var w=b[1],x=b[2],T=e.properties[w];if(!T){na("Skipping property: Invalid property name in: "+s),u();continue}var C=r.parse(w,x);if(!C){na("Skipping property: Invalid property definition in: "+s),u();continue}y.push({name:w,val:x}),u()}if(m){o();break}r.selector(f);for(var S=0;S<y.length;S++){var E=y[S];r.css(E.name,E.val)}o()}return r},ZU.fromString=function(t){var e=this;return e.resetToDefault(),e.appendFromString(t),e};var es={};(function(){var t=ps,e=tWt,r=nWt,n=aWt,a=iWt,i=l(function(ee){return"^"+ee+"\\s*\\(\\s*([\\w\\.]+)\\s*\\)$"},"data"),s=l(function(ee){var J=t+"|\\w+|"+e+"|"+r+"|"+n+"|"+a;return"^"+ee+"\\s*\\(([\\w\\.]+)\\s*\\,\\s*("+t+")\\s*\\,\\s*("+t+")\\s*,\\s*("+J+")\\s*\\,\\s*("+J+")\\)$"},"mapData"),o=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,"^(none)$","^(.+)$"];es.types={time:{number:!0,min:0,units:"s|ms",implicitUnits:"ms"},percent:{number:!0,min:0,max:100,units:"%",implicitUnits:"%"},percentages:{number:!0,min:0,max:100,units:"%",implicitUnits:"%",multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:["parent","origin"]},nodeSize:{number:!0,min:0,enums:["label"]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:["horizontal","leftward","rightward","vertical","upward","downward","auto"]},axisDirectionExplicit:{enums:["leftward","rightward","upward","downward"]},axisDirectionPrimary:{enums:["horizontal","vertical"]},paddingRelativeTo:{enums:["width","height","average","min","max"]},bgWH:{number:!0,min:0,allowPercent:!0,enums:["auto"],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:["inner","include-padding"],multiple:!0},bgRepeat:{enums:["repeat","repeat-x","repeat-y","no-repeat"],multiple:!0},bgFit:{enums:["none","contain","cover"],multiple:!0},bgCrossOrigin:{enums:["anonymous","use-credentials","null"],multiple:!0},bgClip:{enums:["none","node"],multiple:!0},bgContainment:{enums:["inside","over"],multiple:!0},boxSelection:{enums:["contain","overlap","none"]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:["solid","linear-gradient","radial-gradient"]},bool:{enums:["yes","no"]},bools:{enums:["yes","no"],multiple:!0},lineStyle:{enums:["solid","dotted","dashed"]},lineCap:{enums:["butt","round","square"]},linePosition:{enums:["center","inside","outside"]},lineJoin:{enums:["round","bevel","miter"]},borderStyle:{enums:["solid","dotted","dashed","double"]},curveStyle:{enums:["bezier","unbundled-bezier","haystack","segments","straight","straight-triangle","taxi","round-segments","round-taxi"]},radiusType:{enums:["arc-radius","influence-radius"],multiple:!0},fontFamily:{regex:'^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$'},fontStyle:{enums:["italic","normal","oblique"]},fontWeight:{enums:["normal","bold","bolder","lighter","100","200","300","400","500","600","800","900",100,200,300,400,500,600,700,800,900]},textDecoration:{enums:["none","underline","overline","line-through"]},textTransform:{enums:["none","uppercase","lowercase"]},textWrap:{enums:["none","wrap","ellipsis"]},textOverflowWrap:{enums:["whitespace","anywhere"]},textBackgroundShape:{enums:["rectangle","roundrectangle","round-rectangle","circle"]},nodeShape:{enums:["rectangle","roundrectangle","round-rectangle","cutrectangle","cut-rectangle","bottomroundrectangle","bottom-round-rectangle","barrel","ellipse","triangle","round-triangle","square","pentagon","round-pentagon","hexagon","round-hexagon","concavehexagon","concave-hexagon","heptagon","round-heptagon","octagon","round-octagon","tag","round-tag","star","diamond","round-diamond","vee","rhomboid","right-rhomboid","polygon"]},overlayShape:{enums:["roundrectangle","round-rectangle","ellipse"]},cornerRadius:{number:!0,min:0,units:"px|em",implicitUnits:"px",enums:["auto"]},compoundIncludeLabels:{enums:["include","exclude"]},arrowShape:{enums:["tee","triangle","triangle-tee","circle-triangle","triangle-cross","triangle-backcurve","vee","square","circle","diamond","chevron","none"]},arrowFill:{enums:["filled","hollow"]},arrowWidth:{number:!0,units:"%|px|em",implicitUnits:"px",enums:["match-line"]},display:{enums:["element","none"]},visibility:{enums:["hidden","visible"]},zCompoundDepth:{enums:["bottom","orphan","auto","top"]},zIndexCompare:{enums:["auto","manual"]},valign:{enums:["top","top-inside","center","bottom","bottom-inside"]},halign:{enums:["left","left-inside","center","right","right-inside"]},justification:{enums:["left","center","right","auto"]},textMetrics:{enums:["font","glyph"]},text:{string:!0},data:{mapping:!0,regex:i("data")},layoutData:{mapping:!0,regex:i("layoutData")},scratch:{mapping:!0,regex:i("scratch")},mapData:{mapping:!0,regex:s("mapData")},mapLayoutData:{mapping:!0,regex:s("mapLayoutData")},mapScratch:{mapping:!0,regex:s("mapScratch")},fn:{mapping:!0,fn:!0},url:{regexes:o,singleRegexMatchValue:!0},urls:{regexes:o,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:"deg|rad",implicitUnits:"rad"},textRotation:{number:!0,units:"deg|rad",implicitUnits:"rad",enums:["none","autorotate"]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:["intersection","node-position","endpoints"]},edgeEndpoint:{number:!0,multiple:!0,units:"%|px|em|deg|rad",implicitUnits:"px",enums:["inside-to-node","outside-to-node","outside-to-node-or-label","outside-to-line","outside-to-line-or-label"],singleEnum:!0,validate:l(function(ee,J){switch(ee.length){case 2:return J[0]!=="deg"&&J[0]!=="rad"&&J[1]!=="deg"&&J[1]!=="rad";case 1:return Or(ee[0])||J[0]==="deg"||J[0]==="rad";default:return!1}},"validate")},easing:{regexes:["^(spring)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$","^(cubic-bezier)\\s*\\(\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*,\\s*("+t+")\\s*\\)$"],enums:["linear","ease","ease-in","ease-out","ease-in-out","ease-in-sine","ease-out-sine","ease-in-out-sine","ease-in-quad","ease-out-quad","ease-in-out-quad","ease-in-cubic","ease-out-cubic","ease-in-out-cubic","ease-in-quart","ease-out-quart","ease-in-out-quart","ease-in-quint","ease-out-quint","ease-in-out-quint","ease-in-expo","ease-out-expo","ease-in-out-expo","ease-in-circ","ease-out-circ","ease-in-out-circ"]},gradientDirection:{enums:["to-bottom","to-top","to-left","to-right","to-bottom-right","to-bottom-left","to-top-right","to-top-left","to-right-bottom","to-left-bottom","to-right-top","to-left-top"]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:l(function(ee){var J=ee.length;return J===1||J===2||J===4},"validate")}};var u={zeroNonZero:l(function(ee,J){return(ee==null||J==null)&&ee!==J||ee==0&&J!=0?!0:ee!=0&&J==0},"zeroNonZero"),any:l(function(ee,J){return ee!=J},"any"),emptyNonEmpty:l(function(ee,J){var ae=bp(ee),se=bp(J);return ae&&!se||!ae&&se},"emptyNonEmpty")},h=es.types,d=[{name:"label",type:h.text,triggersBounds:u.any,triggersZOrder:u.emptyNonEmpty},{name:"text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any}],f=[{name:"source-label",type:h.text,triggersBounds:u.any},{name:"source-text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"source-text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"source-text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"source-text-offset",type:h.size,triggersBounds:u.any}],p=[{name:"target-label",type:h.text,triggersBounds:u.any},{name:"target-text-rotation",type:h.textRotation,triggersBounds:u.any},{name:"target-text-margin-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"target-text-margin-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"target-text-offset",type:h.size,triggersBounds:u.any}],g=[{name:"font-family",type:h.fontFamily,triggersBounds:u.any},{name:"font-style",type:h.fontStyle,triggersBounds:u.any},{name:"font-weight",type:h.fontWeight,triggersBounds:u.any},{name:"font-size",type:h.size,triggersBounds:u.any},{name:"text-transform",type:h.textTransform,triggersBounds:u.any},{name:"text-wrap",type:h.textWrap,triggersBounds:u.any},{name:"text-overflow-wrap",type:h.textOverflowWrap,triggersBounds:u.any},{name:"text-max-width",type:h.size,triggersBounds:u.any},{name:"text-outline-width",type:h.size,triggersBounds:u.any},{name:"line-height",type:h.positiveNumber,triggersBounds:u.any}],m=[{name:"text-valign",type:h.valign,triggersBounds:u.any},{name:"text-halign",type:h.halign,triggersBounds:u.any},{name:"color",type:h.color},{name:"text-outline-color",type:h.color},{name:"text-outline-opacity",type:h.zeroOneNumber},{name:"text-background-color",type:h.color},{name:"text-background-opacity",type:h.zeroOneNumber},{name:"text-background-padding",type:h.size,triggersBounds:u.any},{name:"text-border-opacity",type:h.zeroOneNumber},{name:"text-border-color",type:h.color},{name:"text-border-width",type:h.size,triggersBounds:u.any},{name:"text-border-style",type:h.borderStyle,triggersBounds:u.any},{name:"text-background-shape",type:h.textBackgroundShape,triggersBounds:u.any},{name:"text-justification",type:h.justification},{name:"text-metrics",type:h.textMetrics},{name:"box-select-labels",type:h.bool,triggersBounds:u.any}],y=[{name:"events",type:h.bool,triggersZOrder:u.any},{name:"text-events",type:h.bool,triggersZOrder:u.any},{name:"box-selection",type:h.boxSelection,triggersZOrder:u.any}],v=[{name:"display",type:h.display,triggersZOrder:u.any,triggersBounds:u.any,triggersBoundsOfConnectedEdges:u.any,triggersBoundsOfParallelEdges:l(function(ee,J,ae){return ee===J?!1:ae.pstyle("curve-style").value==="bezier"},"triggersBoundsOfParallelEdges")},{name:"visibility",type:h.visibility,triggersZOrder:u.any},{name:"opacity",type:h.zeroOneNumber,triggersZOrder:u.zeroNonZero},{name:"text-opacity",type:h.zeroOneNumber},{name:"min-zoomed-font-size",type:h.size},{name:"z-compound-depth",type:h.zCompoundDepth,triggersZOrder:u.any},{name:"z-index-compare",type:h.zIndexCompare,triggersZOrder:u.any},{name:"z-index",type:h.number,triggersZOrder:u.any}],b=[{name:"overlay-padding",type:h.size,triggersBounds:u.any},{name:"overlay-color",type:h.color},{name:"overlay-opacity",type:h.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"overlay-shape",type:h.overlayShape,triggersBounds:u.any},{name:"overlay-corner-radius",type:h.cornerRadius}],w=[{name:"underlay-padding",type:h.size,triggersBounds:u.any},{name:"underlay-color",type:h.color},{name:"underlay-opacity",type:h.zeroOneNumber,triggersBounds:u.zeroNonZero},{name:"underlay-shape",type:h.overlayShape,triggersBounds:u.any},{name:"underlay-corner-radius",type:h.cornerRadius}],x=[{name:"transition-property",type:h.propList},{name:"transition-duration",type:h.time},{name:"transition-delay",type:h.time},{name:"transition-timing-function",type:h.easing}],T=l(function(ee,J){return J.value==="label"?-ee.poolIndex():J.pfValue},"nodeSizeHashOverride"),C=[{name:"height",type:h.nodeSize,triggersBounds:u.any,hashOverride:T},{name:"width",type:h.nodeSize,triggersBounds:u.any,hashOverride:T},{name:"shape",type:h.nodeShape,triggersBounds:u.any},{name:"shape-polygon-points",type:h.polygonPointList,triggersBounds:u.any},{name:"corner-radius",type:h.cornerRadius},{name:"background-color",type:h.color},{name:"background-fill",type:h.fill},{name:"background-opacity",type:h.zeroOneNumber},{name:"background-blacken",type:h.nOneOneNumber},{name:"background-gradient-stop-colors",type:h.colors},{name:"background-gradient-stop-positions",type:h.percentages},{name:"background-gradient-direction",type:h.gradientDirection},{name:"padding",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"padding-relative-to",type:h.paddingRelativeTo,triggersBounds:u.any},{name:"bounds-expansion",type:h.boundsExpansion,triggersBounds:u.any}],S=[{name:"border-color",type:h.color},{name:"border-opacity",type:h.zeroOneNumber},{name:"border-width",type:h.size,triggersBounds:u.any},{name:"border-style",type:h.borderStyle},{name:"border-cap",type:h.lineCap},{name:"border-join",type:h.lineJoin},{name:"border-dash-pattern",type:h.numbers},{name:"border-dash-offset",type:h.number},{name:"border-position",type:h.linePosition}],E=[{name:"outline-color",type:h.color},{name:"outline-opacity",type:h.zeroOneNumber},{name:"outline-width",type:h.size,triggersBounds:u.any},{name:"outline-style",type:h.borderStyle},{name:"outline-offset",type:h.size,triggersBounds:u.any}],k=[{name:"background-image",type:h.urls},{name:"background-image-crossorigin",type:h.bgCrossOrigin},{name:"background-image-opacity",type:h.zeroOneNumbers},{name:"background-image-containment",type:h.bgContainment},{name:"background-image-smoothing",type:h.bools},{name:"background-position-x",type:h.bgPos},{name:"background-position-y",type:h.bgPos},{name:"background-width-relative-to",type:h.bgRelativeTo},{name:"background-height-relative-to",type:h.bgRelativeTo},{name:"background-repeat",type:h.bgRepeat},{name:"background-fit",type:h.bgFit},{name:"background-clip",type:h.bgClip},{name:"background-width",type:h.bgWH},{name:"background-height",type:h.bgWH},{name:"background-offset-x",type:h.bgPos},{name:"background-offset-y",type:h.bgPos}],A=[{name:"position",type:h.position,triggersBounds:u.any},{name:"compound-sizing-wrt-labels",type:h.compoundIncludeLabels,triggersBounds:u.any},{name:"min-width",type:h.size,triggersBounds:u.any},{name:"min-width-bias-left",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-width-bias-right",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-height",type:h.size,triggersBounds:u.any},{name:"min-height-bias-top",type:h.sizeMaybePercent,triggersBounds:u.any},{name:"min-height-bias-bottom",type:h.sizeMaybePercent,triggersBounds:u.any}],I=[{name:"line-style",type:h.lineStyle},{name:"line-color",type:h.color},{name:"line-fill",type:h.fill},{name:"line-cap",type:h.lineCap},{name:"line-opacity",type:h.zeroOneNumber},{name:"line-dash-pattern",type:h.numbers},{name:"line-dash-offset",type:h.number},{name:"line-outline-width",type:h.size},{name:"line-outline-color",type:h.color},{name:"line-gradient-stop-colors",type:h.colors},{name:"line-gradient-stop-positions",type:h.percentages},{name:"curve-style",type:h.curveStyle,triggersBounds:u.any,triggersBoundsOfParallelEdges:l(function(ee,J){return ee===J?!1:ee==="bezier"||J==="bezier"},"triggersBoundsOfParallelEdges")},{name:"haystack-radius",type:h.zeroOneNumber,triggersBounds:u.any},{name:"source-endpoint",type:h.edgeEndpoint,triggersBounds:u.any},{name:"target-endpoint",type:h.edgeEndpoint,triggersBounds:u.any},{name:"control-point-step-size",type:h.size,triggersBounds:u.any},{name:"control-point-distances",type:h.bidirectionalSizes,triggersBounds:u.any},{name:"control-point-weights",type:h.numbers,triggersBounds:u.any},{name:"segment-distances",type:h.bidirectionalSizes,triggersBounds:u.any},{name:"segment-weights",type:h.numbers,triggersBounds:u.any},{name:"segment-radii",type:h.numbers,triggersBounds:u.any},{name:"radius-type",type:h.radiusType,triggersBounds:u.any},{name:"taxi-turn",type:h.bidirectionalSizeMaybePercent,triggersBounds:u.any},{name:"taxi-turn-min-distance",type:h.size,triggersBounds:u.any},{name:"taxi-direction",type:h.axisDirection,triggersBounds:u.any},{name:"taxi-radius",type:h.number,triggersBounds:u.any},{name:"edge-distances",type:h.edgeDistances,triggersBounds:u.any},{name:"arrow-scale",type:h.positiveNumber,triggersBounds:u.any},{name:"loop-direction",type:h.angle,triggersBounds:u.any},{name:"loop-sweep",type:h.angle,triggersBounds:u.any},{name:"source-distance-from-node",type:h.size,triggersBounds:u.any},{name:"target-distance-from-node",type:h.size,triggersBounds:u.any}],L=[{name:"ghost",type:h.bool,triggersBounds:u.any},{name:"ghost-offset-x",type:h.bidirectionalSize,triggersBounds:u.any},{name:"ghost-offset-y",type:h.bidirectionalSize,triggersBounds:u.any},{name:"ghost-opacity",type:h.zeroOneNumber}],R=[{name:"selection-box-color",type:h.color},{name:"selection-box-opacity",type:h.zeroOneNumber},{name:"selection-box-border-color",type:h.color},{name:"selection-box-border-width",type:h.size},{name:"active-bg-color",type:h.color},{name:"active-bg-opacity",type:h.zeroOneNumber},{name:"active-bg-size",type:h.size},{name:"outside-texture-bg-color",type:h.color},{name:"outside-texture-bg-opacity",type:h.zeroOneNumber}],O=[];es.pieBackgroundN=16,O.push({name:"pie-size",type:h.sizeMaybePercent}),O.push({name:"pie-hole",type:h.sizeMaybePercent}),O.push({name:"pie-start-angle",type:h.angle});for(var M=1;M<=es.pieBackgroundN;M++)O.push({name:"pie-"+M+"-background-color",type:h.color}),O.push({name:"pie-"+M+"-background-size",type:h.percent}),O.push({name:"pie-"+M+"-background-opacity",type:h.zeroOneNumber});var P=[];es.stripeBackgroundN=16,P.push({name:"stripe-size",type:h.sizeMaybePercent}),P.push({name:"stripe-direction",type:h.axisDirectionPrimary});for(var z=1;z<=es.stripeBackgroundN;z++)P.push({name:"stripe-"+z+"-background-color",type:h.color}),P.push({name:"stripe-"+z+"-background-size",type:h.percent}),P.push({name:"stripe-"+z+"-background-opacity",type:h.zeroOneNumber});var D=[],B=es.arrowPrefixes=["source","mid-source","target","mid-target"];[{name:"arrow-shape",type:h.arrowShape,triggersBounds:u.any},{name:"arrow-color",type:h.color},{name:"arrow-fill",type:h.arrowFill},{name:"arrow-width",type:h.arrowWidth}].forEach(function(te){B.forEach(function(ee){var J=ee+"-"+te.name,ae=te.type,se=te.triggersBounds;D.push({name:J,type:ae,triggersBounds:se})})},{});var W=es.properties=[].concat(y,x,v,b,w,L,m,g,d,f,p,C,S,E,k,O,P,A,I,D,R),U=es.propertyGroups={behavior:y,transition:x,visibility:v,overlay:b,underlay:w,ghost:L,commonLabel:m,labelDimensions:g,mainLabel:d,sourceLabel:f,targetLabel:p,nodeBody:C,nodeBorder:S,nodeOutline:E,backgroundImage:k,pie:O,stripe:P,compound:A,edgeLine:I,edgeArrow:D,core:R},j=es.propertyGroupNames={},V=es.propertyGroupKeys=Object.keys(U);V.forEach(function(te){j[te]=U[te].map(function(ee){return ee.name}),U[te].forEach(function(ee){return ee.groupKey=te})});var Y=es.aliases=[{name:"content",pointsTo:"label"},{name:"control-point-distance",pointsTo:"control-point-distances"},{name:"control-point-weight",pointsTo:"control-point-weights"},{name:"segment-distance",pointsTo:"segment-distances"},{name:"segment-weight",pointsTo:"segment-weights"},{name:"segment-radius",pointsTo:"segment-radii"},{name:"edge-text-rotation",pointsTo:"text-rotation"},{name:"padding-left",pointsTo:"padding"},{name:"padding-right",pointsTo:"padding"},{name:"padding-top",pointsTo:"padding"},{name:"padding-bottom",pointsTo:"padding"}];es.propertyNames=W.map(function(te){return te.name});for(var H=0;H<W.length;H++){var q=W[H];W[q.name]=q}for(var Z=0;Z<Y.length;Z++){var K=Y[Z],re=W[K.pointsTo],Q={name:K.name,alias:!0,pointsTo:re};W.push(Q),W[K.name]=Q}})(),es.getDefaultProperty=function(t){return this.getDefaultProperties()[t]},es.getDefaultProperties=function(){var t=this._private;if(t.defaultProperties!=null)return t.defaultProperties;for(var e=zr({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125,events:"yes","text-events":"no","text-valign":"top","text-halign":"center","text-justification":"auto","line-height":1,color:"#000","box-selection":"contain","text-outline-color":"#000","text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":"none","text-transform":"none","text-wrap":"none","text-overflow-wrap":"whitespace","text-max-width":9999,"text-background-color":"#000","text-background-opacity":0,"text-background-shape":"rectangle","text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":"solid","text-border-color":"#000","font-family":"Helvetica Neue, Helvetica, sans-serif","font-style":"normal","font-weight":"normal","font-size":16,"min-zoomed-font-size":0,"text-rotation":"none","source-text-rotation":"none","target-text-rotation":"none",visibility:"visible",display:"element",opacity:1,"z-compound-depth":"auto","z-index-compare":"auto","z-index":0,label:"","text-margin-x":0,"text-margin-y":0,"source-label":"","source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":"","target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":"#000","overlay-padding":10,"overlay-shape":"round-rectangle","overlay-corner-radius":"auto","underlay-opacity":0,"underlay-color":"#000","underlay-padding":10,"underlay-shape":"round-rectangle","underlay-corner-radius":"auto","text-metrics":"font","transition-property":"none","transition-duration":0,"transition-delay":0,"transition-timing-function":"linear","box-select-labels":"no","background-blacken":0,"background-color":"#999","background-fill":"solid","background-opacity":1,"background-image":"none","background-image-crossorigin":"anonymous","background-image-opacity":1,"background-image-containment":"inside","background-image-smoothing":"yes","background-position-x":"50%","background-position-y":"50%","background-offset-x":0,"background-offset-y":0,"background-width-relative-to":"include-padding","background-height-relative-to":"include-padding","background-repeat":"no-repeat","background-fit":"none","background-clip":"node","background-width":"auto","background-height":"auto","border-color":"#000","border-opacity":1,"border-width":0,"border-style":"solid","border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":"butt","border-join":"miter","border-position":"center","outline-color":"#999","outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":"solid",height:30,width:30,shape:"ellipse","shape-polygon-points":"-1, -1, 1, -1, 1, 1, -1, 1","corner-radius":"auto","bounds-expansion":0,"background-gradient-direction":"to-bottom","background-gradient-stop-colors":"#999","background-gradient-stop-positions":"0%",ghost:"no","ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":"width",position:"origin","compound-sizing-wrt-labels":"include","min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":"100%","pie-hole":0,"pie-start-angle":"0deg"},[{name:"pie-{{i}}-background-color",value:"black"},{name:"pie-{{i}}-background-size",value:"0%"},{name:"pie-{{i}}-background-opacity",value:1}].reduce(function(u,h){for(var d=1;d<=es.pieBackgroundN;d++){var f=h.name.replace("{{i}}",d),p=h.value;u[f]=p}return u},{}),{"stripe-size":"100%","stripe-direction":"horizontal"},[{name:"stripe-{{i}}-background-color",value:"black"},{name:"stripe-{{i}}-background-size",value:"0%"},{name:"stripe-{{i}}-background-opacity",value:1}].reduce(function(u,h){for(var d=1;d<=es.stripeBackgroundN;d++){var f=h.name.replace("{{i}}",d),p=h.value;u[f]=p}return u},{}),{"line-style":"solid","line-color":"#999","line-fill":"solid","line-cap":"butt","line-opacity":1,"line-outline-width":0,"line-outline-color":"#000","line-gradient-stop-colors":"#999","line-gradient-stop-positions":"0%","control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":"arc-radius","taxi-turn":"50%","taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":"auto","edge-distances":"intersection","curve-style":"haystack","haystack-radius":0,"arrow-scale":1,"loop-direction":"-45deg","loop-sweep":"-90deg","source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":"outside-to-node","target-endpoint":"outside-to-node","line-dash-pattern":[6,3],"line-dash-offset":0},[{name:"arrow-shape",value:"none"},{name:"arrow-color",value:"#999"},{name:"arrow-fill",value:"filled"},{name:"arrow-width",value:1}].reduce(function(u,h){return es.arrowPrefixes.forEach(function(d){var f=d+"-"+h.name,p=h.value;u[f]=p}),u},{})),r={},n=0;n<this.properties.length;n++){var a=this.properties[n];if(!a.pointsTo){var i=a.name,s=e[i],o=this.parse(i,s);r[i]=o}}return t.defaultProperties=r,t.defaultProperties},es.addDefaultStylesheet=function(){this.selector(":parent").css({shape:"rectangle",padding:10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3}).selector(":loop").css({"curve-style":"bezier"}).selector("edge:compound").css({"curve-style":"bezier","source-endpoint":"outside-to-line","target-endpoint":"outside-to-line"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector(":parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length};var fL={};fL.parse=function(t,e,r,n){var a=this;if(ci(e))return a.parseImplWarn(t,e,r,n);var i=n==="mapping"||n===!0||n===!1||n==null?"dontcare":n,s=r?"t":"f",o=""+e,u=H5e(t,o,s,i),h=a.propCache=a.propCache||[],d;return(d=h[u])||(d=h[u]=a.parseImplWarn(t,e,r,n)),(r||n==="mapping")&&(d=td(d),d&&(d.value=td(d.value))),d},fL.parseImplWarn=function(t,e,r,n){var a=this.parseImpl(t,e,r,n);return!a&&e!=null&&na("The style property `".concat(t,": ").concat(e,"` is invalid")),a&&(a.name==="width"||a.name==="height")&&e==="label"&&na("The style value of `label` is deprecated for `"+a.name+"`"),a},fL.parseImpl=function(t,e,r,n){var a=this;t=aY(t);var i=a.properties[t],s=e,o=a.types;if(!i||e===void 0)return null;i.alias&&(i=i.pointsTo,t=i.name);var u=Or(e);u&&(e=e.trim());var h=i.type;if(!h)return null;if(r&&(e===""||e===null))return{name:t,value:e,bypass:!0,deleteBypass:!0};if(ci(e))return{name:t,value:e,strValue:"fn",mapped:o.fn,bypass:r};var d,f;if(!(!u||n||e.length<7||e[1]!=="a")){if(e.length>=7&&e[0]==="d"&&(d=new RegExp(o.data.regex).exec(e))){if(r)return!1;var p=o.data;return{name:t,value:d,strValue:""+e,mapped:p,field:d[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||h.multiple)return!1;var g=o.mapData;if(!(h.color||h.number))return!1;var m=this.parse(t,f[4]);if(!m||m.mapped)return!1;var y=this.parse(t,f[5]);if(!y||y.mapped)return!1;if(m.pfValue===y.pfValue||m.strValue===y.strValue)return na("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+m.strValue+"`"),this.parse(t,m.strValue);if(h.color){var v=m.value,b=y.value,w=v[0]===b[0]&&v[1]===b[1]&&v[2]===b[2]&&(v[3]===b[3]||(v[3]==null||v[3]===1)&&(b[3]==null||b[3]===1));if(w)return!1}return{name:t,value:f,strValue:""+e,mapped:g,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:m.value,valueMax:y.value,bypass:r}}}if(h.multiple&&n!=="multiple"){var x;if(u?x=e.split(/\s+/):_a(e)?x=e:x=[e],h.evenMultiple&&x.length%2!==0)return null;for(var T=[],C=[],S=[],E="",k=!1,A=0;A<x.length;A++){var I=a.parse(t,x[A],r,"multiple");k=k||Or(I.value),T.push(I.value),S.push(I.pfValue!=null?I.pfValue:I.value),C.push(I.units),E+=(A>0?" ":"")+I.strValue}return h.validate&&!h.validate(T,C)?null:h.singleEnum&&k?T.length===1&&Or(T[0])?{name:t,value:T[0],strValue:T[0],bypass:r}:null:{name:t,value:T,pfValue:S,strValue:E,bypass:r,units:C}}var L=l(function(){for(var Q=0;Q<h.enums.length;Q++){var te=h.enums[Q];if(te===e)return{name:t,value:e,strValue:""+e,bypass:r}}return null},"checkEnums");if(h.number){var R,O="px";if(h.units&&(R=h.units),h.implicitUnits&&(O=h.implicitUnits),!h.unitless)if(u){var M="px|em"+(h.allowPercent?"|\\%":"");R&&(M=R);var P=e.match("^("+ps+")("+M+")?$");P&&(e=P[1],R=P[2]||O)}else(!R||h.implicitUnits)&&(R=O);if(e=parseFloat(e),isNaN(e)&&h.enums===void 0)return null;if(isNaN(e)&&h.enums!==void 0)return e=s,L();if(h.integer&&!jHt(e)||h.min!==void 0&&(e<h.min||h.strictMin&&e===h.min)||h.max!==void 0&&(e>h.max||h.strictMax&&e===h.max))return null;var z={name:t,value:e,strValue:""+e+(R||""),units:R,bypass:r};return h.unitless||R!=="px"&&R!=="em"?z.pfValue=e:z.pfValue=R==="px"||!R?e:this.getEmSizeInPixels()*e,(R==="ms"||R==="s")&&(z.pfValue=R==="ms"?e:1e3*e),(R==="deg"||R==="rad")&&(z.pfValue=R==="rad"?e:aVt(e)),R==="%"&&(z.pfValue=e/100),z}else if(h.propList){var D=[],B=""+e;if(B!=="none"){for(var W=B.split(/\s*,\s*|\s+/),U=0;U<W.length;U++){var j=W[U].trim();a.properties[j]?D.push(j):na("`"+j+"` is not a valid property name")}if(D.length===0)return null}return{name:t,value:D,strValue:D.length===0?"none":D.join(" "),bypass:r}}else if(h.color){var V=b5e(e);return V?{name:t,value:V,pfValue:V,strValue:"rgb("+V[0]+","+V[1]+","+V[2]+")",bypass:r}:null}else if(h.regex||h.regexes){if(h.enums){var Y=L();if(Y)return Y}for(var H=h.regexes?h.regexes:[h.regex],q=0;q<H.length;q++){var Z=new RegExp(H[q]),K=Z.exec(e);if(K)return{name:t,value:h.singleRegexMatchValue?K[1]:K,strValue:""+e,bypass:r}}return null}else return h.string?{name:t,value:""+e,strValue:""+e,bypass:r}:h.enums?L():null};var zs=l(function(e){if(!(this instanceof zs))return new zs(e);if(!nY(e)){ni("A style must have a core reference");return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},"Style"),Bo=zs.prototype;Bo.instanceString=function(){return"style"},Bo.clear=function(){for(var t=this._private,e=t.cy,r=e.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,t.contextStyles={},t.propDiffs={},this.cleanElements(r,!0),r.forEach(function(a){var i=a[0]._private;i.styleDirty=!0,i.appliedInitStyle=!1}),this},Bo.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Bo.core=function(t){return this._private.coreStyle[t]||this.getDefaultProperty(t)},Bo.selector=function(t){var e=t==="core"?null:new kp(t),r=this.length++;return this[r]={selector:e,properties:[],mappedProperties:[],index:r},this},Bo.css=function(){var t=this,e=arguments;if(e.length===1)for(var r=e[0],n=0;n<t.properties.length;n++){var a=t.properties[n],i=r[a.name];i===void 0&&(i=r[NI(a.name)]),i!==void 0&&this.cssRule(a.name,i)}else e.length===2&&this.cssRule(e[0],e[1]);return this},Bo.style=Bo.css,Bo.cssRule=function(t,e){var r=this.parse(t,e);if(r){var n=this.length-1;this[n].properties.push(r),this[n].properties[r.name]=r,r.name.match(/pie-(\d+)-background-size/)&&r.value&&(this._private.hasPie=!0),r.name.match(/stripe-(\d+)-background-size/)&&r.value&&(this._private.hasStripe=!0),r.mapped&&this[n].mappedProperties.push(r);var a=!this[n].selector;a&&(this._private.coreStyle[r.name]=r)}return this},Bo.append=function(t){return g5e(t)?t.appendToStyle(this):_a(t)?this.appendFromJson(t):Or(t)&&this.appendFromString(t),this},zs.fromJson=function(t,e){var r=new zs(t);return r.fromJson(e),r},zs.fromString=function(t,e){return new zs(t).fromString(e)},[Bs,E5,XU,nd,dL,ZU,es,fL].forEach(function(t){zr(Bo,t)}),zs.types=Bo.types,zs.properties=Bo.properties,zs.propertyGroups=Bo.propertyGroups,zs.propertyGroupNames=Bo.propertyGroupNames,zs.propertyGroupKeys=Bo.propertyGroupKeys;var cYt={style:l(function(e){if(e){var r=this.setStyle(e);r.update()}return this._private.style},"style"),setStyle:l(function(e){var r=this._private;return g5e(e)?r.style=e.generateStyle(this):_a(e)?r.style=zs.fromJson(this,e):Or(e)?r.style=zs.fromString(this,e):r.style=zs(this),r.style},"setStyle"),updateStyle:l(function(){this.mutableElements().updateStyle()},"updateStyle")},uYt="single",t1={autolock:l(function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this},"autolock"),autoungrabify:l(function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this},"autoungrabify"),autounselectify:l(function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this},"autounselectify"),selectionType:l(function(e){var r=this._private;if(r.selectionType==null&&(r.selectionType=uYt),e!==void 0)(e==="additive"||e==="single")&&(r.selectionType=e);else return r.selectionType;return this},"selectionType"),panningEnabled:l(function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this},"panningEnabled"),userPanningEnabled:l(function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this},"userPanningEnabled"),zoomingEnabled:l(function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this},"zoomingEnabled"),userZoomingEnabled:l(function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this},"userZoomingEnabled"),boxSelectionEnabled:l(function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this},"boxSelectionEnabled"),pan:l(function(){var e=arguments,r=this._private.pan,n,a,i,s,o;switch(e.length){case 0:return r;case 1:if(Or(e[0]))return n=e[0],r[n];if(Fn(e[0])){if(!this._private.panningEnabled)return this;i=e[0],s=i.x,o=i.y,mr(s)&&(r.x=s),mr(o)&&(r.y=o),this.emit("pan viewport")}break;case 2:if(!this._private.panningEnabled)return this;n=e[0],a=e[1],(n==="x"||n==="y")&&mr(a)&&(r[n]=a),this.emit("pan viewport");break}return this.notify("viewport"),this},"pan"),panBy:l(function(e,r){var n=arguments,a=this._private.pan,i,s,o,u,h;if(!this._private.panningEnabled)return this;switch(n.length){case 1:Fn(e)&&(o=n[0],u=o.x,h=o.y,mr(u)&&(a.x+=u),mr(h)&&(a.y+=h),this.emit("pan viewport"));break;case 2:i=e,s=r,(i==="x"||i==="y")&&mr(s)&&(a[i]+=s),this.emit("pan viewport");break}return this.notify("viewport"),this},"panBy"),gc:l(function(){this.notify("gc")},"gc"),fit:l(function(e,r){var n=this.getFitViewport(e,r);if(n){var a=this._private;a.zoom=n.zoom,a.pan=n.pan,this.emit("pan zoom viewport"),this.notify("viewport")}return this},"fit"),getFitViewport:l(function(e,r){if(mr(e)&&r===void 0&&(r=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var n;if(Or(e)){var a=e;e=this.$(a)}else if(ZHt(e)){var i=e;n={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},n.w=n.x2-n.x1,n.h=n.y2-n.y1}else Sc(e)||(e=this.mutableElements());if(!(Sc(e)&&e.empty())){n=n||e.boundingBox();var s=this.width(),o=this.height(),u;if(r=mr(r)?r:0,!isNaN(s)&&!isNaN(o)&&s>0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((s-2*r)/n.w,(o-2*r)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u<this._private.minZoom?this._private.minZoom:u;var h={x:(s-u*(n.x1+n.x2))/2,y:(o-u*(n.y1+n.y2))/2};return{zoom:u,pan:h}}}}},"getFitViewport"),zoomRange:l(function(e,r){var n=this._private;if(r==null){var a=e;e=a.min,r=a.max}return mr(e)&&mr(r)&&e<=r?(n.minZoom=e,n.maxZoom=r):mr(e)&&r===void 0&&e<=n.maxZoom?n.minZoom=e:mr(r)&&e===void 0&&r>=n.minZoom&&(n.maxZoom=r),this},"zoomRange"),minZoom:l(function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:l(function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:l(function(e){var r=this._private,n=r.pan,a=r.zoom,i,s,o=!1;if(r.zoomingEnabled||(o=!0),mr(e)?s=e:Fn(e)&&(s=e.level,e.position!=null?i=DI(e.position,a,n):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=s<r.minZoom?r.minZoom:s,o||!mr(s)||s===a||i!=null&&(!mr(i.x)||!mr(i.y)))return null;if(i!=null){var u=n,h=a,d=s,f={x:-d/h*(i.x-u.x)+i.x,y:-d/h*(i.y-u.y)+i.y};return{zoomed:!0,panned:!0,zoom:d,pan:f}}else return{zoomed:!0,panned:!1,zoom:s,pan:n}},"getZoomedViewport"),zoom:l(function(e){if(e===void 0)return this._private.zoom;var r=this.getZoomedViewport(e),n=this._private;return r==null||!r.zoomed?this:(n.zoom=r.zoom,r.panned&&(n.pan.x=r.pan.x,n.pan.y=r.pan.y),this.emit("zoom"+(r.panned?" pan":"")+" viewport"),this.notify("viewport"),this)},"zoom"),viewport:l(function(e){var r=this._private,n=!0,a=!0,i=[],s=!1,o=!1;if(!e)return this;if(mr(e.zoom)||(n=!1),Fn(e.pan)||(a=!1),!n&&!a)return this;if(n){var u=e.zoom;u<r.minZoom||u>r.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=u,i.push("zoom"))}if(a&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var h=e.pan;mr(h.x)&&(r.pan.x=h.x,o=!1),mr(h.y)&&(r.pan.y=h.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},"viewport"),center:l(function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:l(function(e,r){if(this._private.panningEnabled){if(Or(e)){var n=e;e=this.mutableElements().filter(n)}else Sc(e)||(e=this.mutableElements());if(e.length!==0){var a=e.boundingBox(),i=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(i-r*(a.x1+a.x2))/2,y:(s-r*(a.y1+a.y2))/2};return o}}},"getCenterPan"),reset:l(function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},"reset"),invalidateSize:l(function(){this._private.sizeCache=null},"invalidateSize"),size:l(function(){var e=this._private,r=e.container,n=this;return e.sizeCache=e.sizeCache||(r?function(){var a=n.window().getComputedStyle(r),i=l(function(o){return parseFloat(a.getPropertyValue(o))},"val");return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},"size"),width:l(function(){return this.size().width},"width"),height:l(function(){return this.size().height},"height"),extent:l(function(){var e=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),a={x1:(n.x1-e.x)/r,x2:(n.x2-e.x)/r,y1:(n.y1-e.y)/r,y2:(n.y2-e.y)/r};return a.w=a.x2-a.x1,a.h=a.y2-a.y1,a},"extent"),renderedExtent:l(function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},"renderedExtent"),multiClickDebounceTime:l(function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this},"multiClickDebounceTime")};t1.centre=t1.center,t1.autolockNodes=t1.autolock,t1.autoungrabifyNodes=t1.autoungrabify;var C5={data:aa.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:aa.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:aa.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:aa.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};C5.attr=C5.data,C5.removeAttr=C5.removeData;var S5=l(function(e){var r=this;e=zr({},e);var n=e.container;n&&!AI(n)&&AI(n[0])&&(n=n[0]);var a=n?n._cyreg:null;a=a||{},a&&a.cy&&(a.cy.destroy(),a={});var i=a.readies=a.readies||[];n&&(n._cyreg=a),a.cy=r;var s=fs!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=zr({name:s?"grid":"null"},o.layout),o.renderer=zr({name:s?"canvas":"null"},o.renderer);var u=l(function(m,y,v){return y!==void 0?y:v!==void 0?v:m},"defVal"),h=this._private={container:n,ready:!1,options:o,elements:new oo(this),listeners:[],aniEles:new oo(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,o.zoomingEnabled),userZoomingEnabled:u(!0,o.userZoomingEnabled),panningEnabled:u(!0,o.panningEnabled),userPanningEnabled:u(!0,o.userPanningEnabled),boxSelectionEnabled:u(!0,o.boxSelectionEnabled),autolock:u(!1,o.autolock,o.autolockNodes),autoungrabify:u(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:u(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:mr(o.zoom)?o.zoom:1,pan:{x:Fn(o.pan)&&mr(o.pan.x)?o.pan.x:0,y:Fn(o.pan)&&mr(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var d=l(function(m,y){var v=m.some(QHt);if(v)return IT.all(m).then(y);y(m)},"loadExtData");h.styleEnabled&&r.setStyle([]);var f=zr({},o,o.renderer);r.initRenderer(f);var p=l(function(m,y,v){r.notifications(!1);var b=r.mutableElements();b.length>0&&b.remove(),m!=null&&(Fn(m)||_a(m))&&r.add(m),r.one("layoutready",function(x){r.notifications(!0),r.emit(x),r.one("load",y),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",v),r.emit("done")});var w=zr({},r._private.options.layout);w.eles=r.elements(),r.layout(w).run()},"setElesAndLayout");d([o.style,o.elements],function(g){var m=g[0],y=g[1];h.styleEnabled&&r.style().append(m),p(y,function(){r.startAnimationLoop(),h.ready=!0,ci(o.ready)&&r.on("ready",o.ready);for(var v=0;v<i.length;v++){var b=i[v];r.on("ready",b)}a&&(a.readies=[]),r.emit("ready")},o.done)})},"Core"),pL=S5.prototype;zr(pL,{instanceString:l(function(){return"core"},"instanceString"),isReady:l(function(){return this._private.ready},"isReady"),destroyed:l(function(){return this._private.destroyed},"destroyed"),ready:l(function(e){return this.isReady()?this.emitter().emit("ready",[],e):this.on("ready",e),this},"ready"),destroy:l(function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit("destroy"),e._private.destroyed=!0,e},"destroy"),hasElementWithId:l(function(e){return this._private.elements.hasElementWithId(e)},"hasElementWithId"),getElementById:l(function(e){return this._private.elements.getElementById(e)},"getElementById"),hasCompoundNodes:l(function(){return this._private.hasCompoundNodes},"hasCompoundNodes"),headless:l(function(){return this._private.renderer.isHeadless()},"headless"),styleEnabled:l(function(){return this._private.styleEnabled},"styleEnabled"),addToPool:l(function(e){return this._private.elements.merge(e),this},"addToPool"),removeFromPool:l(function(e){return this._private.elements.unmerge(e),this},"removeFromPool"),container:l(function(){return this._private.container||null},"container"),window:l(function(){var e=this._private.container;if(e==null)return fs;var r=this._private.container.ownerDocument;return r===void 0||r==null?fs:r.defaultView||fs},"window"),mount:l(function(e){if(e!=null){var r=this,n=r._private,a=n.options;return!AI(e)&&AI(e[0])&&(e=e[0]),r.stopAnimationLoop(),r.destroyRenderer(),n.container=e,n.styleEnabled=!0,r.invalidateSize(),r.initRenderer(zr({},a,a.renderer,{name:a.renderer.name==="null"?"canvas":a.renderer.name})),r.startAnimationLoop(),r.style(a.style),r.emit("mount"),r}},"mount"),unmount:l(function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:"null"}),e.emit("unmount"),e},"unmount"),options:l(function(){return td(this._private.options)},"options"),json:l(function(e){var r=this,n=r._private,a=r.mutableElements(),i=l(function(T){return r.getElementById(T.id())},"getFreshRef");if(Fn(e)){if(r.startBatch(),e.elements){var s={},o=l(function(T,C){for(var S=[],E=[],k=0;k<T.length;k++){var A=T[k];if(!A.data.id){na("cy.json() cannot handle elements without an ID attribute");continue}var I=""+A.data.id,L=r.getElementById(I);s[I]=!0,L.length!==0?E.push({ele:L,json:A}):(C&&(A.group=C),S.push(A))}r.add(S);for(var R=0;R<E.length;R++){var O=E[R],M=O.ele,P=O.json;M.json(P)}},"updateEles");if(_a(e.elements))o(e.elements);else for(var u=["nodes","edges"],h=0;h<u.length;h++){var d=u[h],f=e.elements[d];_a(f)&&o(f,d)}var p=r.collection();a.filter(function(x){return!s[x.id()]}).forEach(function(x){x.isParent()?p.merge(x):x.remove()}),p.forEach(function(x){return x.children().move({parent:null})}),p.forEach(function(x){return i(x).remove()})}e.style&&r.style(e.style),e.zoom!=null&&e.zoom!==n.zoom&&r.zoom(e.zoom),e.pan&&(e.pan.x!==n.pan.x||e.pan.y!==n.pan.y)&&r.pan(e.pan),e.data&&r.data(e.data);for(var g=["minZoom","maxZoom","zoomingEnabled","userZoomingEnabled","panningEnabled","userPanningEnabled","boxSelectionEnabled","autolock","autoungrabify","autounselectify","multiClickDebounceTime"],m=0;m<g.length;m++){var y=g[m];e[y]!=null&&r[y](e[y])}return r.endBatch(),this}else{var v=!!e,b={};v?b.elements=this.elements().map(function(x){return x.json()}):(b.elements={},a.forEach(function(x){var T=x.group();b.elements[T]||(b.elements[T]=[]),b.elements[T].push(x.json())})),this._private.styleEnabled&&(b.style=r.style().json()),b.data=td(r.data());var w=n.options;return b.zoomingEnabled=n.zoomingEnabled,b.userZoomingEnabled=n.userZoomingEnabled,b.zoom=n.zoom,b.minZoom=n.minZoom,b.maxZoom=n.maxZoom,b.panningEnabled=n.panningEnabled,b.userPanningEnabled=n.userPanningEnabled,b.pan=td(n.pan),b.boxSelectionEnabled=n.boxSelectionEnabled,b.renderer=td(w.renderer),b.hideEdgesOnViewport=w.hideEdgesOnViewport,b.textureOnViewport=w.textureOnViewport,b.wheelSensitivity=w.wheelSensitivity,b.motionBlur=w.motionBlur,b.multiClickDebounceTime=w.multiClickDebounceTime,b}},"json")}),pL.$id=pL.getElementById,[Jqt,aYt,p6e,jU,uL,sYt,KU,hL,cYt,t1,C5].forEach(function(t){zr(pL,t)});var hYt={fit:!0,directed:!1,direction:"downward",padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:l(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:l(function(e,r){return r},"transform")},dYt={maximal:!1,acyclic:!1},zT=l(function(e){return e.scratch("breadthfirst")},"getInfo"),g6e=l(function(e,r){return e.scratch("breadthfirst",r)},"setInfo");function m6e(t){this.options=zr({},hYt,dYt,t)}l(m6e,"BreadthFirstLayout"),m6e.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=r.nodes().filter(function(Ce){return Ce.isChildless()}),a=r,i=t.directed,s=t.acyclic||t.maximal||t.maximalAdjustments>0,o=!!t.boundingBox,u=ol(o?t.boundingBox:structuredClone(e.extent())),h;if(Sc(t.roots))h=t.roots;else if(_a(t.roots)){for(var d=[],f=0;f<t.roots.length;f++){var p=t.roots[f],g=e.getElementById(p);d.push(g)}h=e.collection(d)}else if(Or(t.roots))h=e.$(t.roots);else if(i)h=n.roots();else{var m=r.components();h=e.collection();for(var y=l(function(){var De=m[v],ce=De.maxDegree(!1),Ie=De.filter(function(ye){return ye.degree(!1)===ce});h=h.add(Ie)},"_loop"),v=0;v<m.length;v++)y()}var b=[],w={},x=l(function(De,ce){b[ce]==null&&(b[ce]=[]);var Ie=b[ce].length;b[ce].push(De),g6e(De,{index:Ie,depth:ce})},"addToDepth"),T=l(function(De,ce){var Ie=zT(De),ye=Ie.depth,pe=Ie.index;b[ye][pe]=null,De.isChildless()&&x(De,ce)},"changeDepth");a.bfs({roots:h,directed:t.directed,visit:l(function(De,ce,Ie,ye,pe){var Ae=De[0],Ve=Ae.id();Ae.isChildless()&&x(Ae,pe),w[Ve]=!0},"visit")});for(var C=[],S=0;S<n.length;S++){var E=n[S];w[E.id()]||C.push(E)}var k=l(function(De){for(var ce=b[De],Ie=0;Ie<ce.length;Ie++){var ye=ce[Ie];if(ye==null){ce.splice(Ie,1),Ie--;continue}g6e(ye,{depth:De,index:Ie})}},"assignDepthsAt"),A=l(function(De,ce){for(var Ie=zT(De),ye=De.incomers().filter(function(Se){return Se.isNode()&&r.has(Se)}),pe=-1,Ae=De.id(),Ve=0;Ve<ye.length;Ve++){var ze=ye[Ve],We=zT(ze);pe=Math.max(pe,We.depth)}if(Ie.depth<=pe){if(!t.acyclic&&ce[Ae])return null;var me=pe+1;return T(De,me),ce[Ae]=me,!0}return!1},"adjustMaximally");if(i&&s){var I=[],L={},R=l(function(De){return I.push(De)},"enqueue"),O=l(function(){return I.shift()},"dequeue");for(n.forEach(function(Ce){return I.push(Ce)});I.length>0;){var M=O(),P=A(M,L);if(P)M.outgoers().filter(function(Ce){return Ce.isNode()&&r.has(Ce)}).forEach(R);else if(P===null){na("Detected double maximal shift for node `"+M.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var z=0;if(t.avoidOverlap)for(var D=0;D<n.length;D++){var B=n[D],W=B.layoutDimensions(t),U=W.w,j=W.h;z=Math.max(z,U,j)}var V={},Y=l(function(De){if(V[De.id()])return V[De.id()];for(var ce=zT(De).depth,Ie=De.neighborhood(),ye=0,pe=0,Ae=0;Ae<Ie.length;Ae++){var Ve=Ie[Ae];if(!(Ve.isEdge()||Ve.isParent()||!n.has(Ve))){var ze=zT(Ve);if(ze!=null){var We=ze.index,me=ze.depth;if(!(We==null||me==null)){var Se=b[me].length;me<ce&&(ye+=We/Se,pe++)}}}}return pe=Math.max(1,pe),ye=ye/pe,pe===0&&(ye=0),V[De.id()]=ye,ye},"getWeightedPercent"),H=l(function(De,ce){var Ie=Y(De),ye=Y(ce),pe=Ie-ye;return pe===0?v5e(De.id(),ce.id()):pe},"sortFn");t.depthSort!==void 0&&(H=t.depthSort);for(var q=b.length,Z=0;Z<q;Z++)b[Z].sort(H),k(Z);for(var K=[],re=0;re<C.length;re++)K.push(C[re]);var Q=l(function(){for(var De=0;De<q;De++)k(De)},"assignDepths");K.length&&(b.unshift(K),q=b.length,Q());for(var te=0,ee=0;ee<q;ee++)te=Math.max(b[ee].length,te);var J={x:u.x1+u.w/2,y:u.y1+u.h/2},ae=n.reduce(function(Ce,De){return function(ce){return{w:Ce.w===-1?ce.w:(Ce.w+ce.w)/2,h:Ce.h===-1?ce.h:(Ce.h+ce.h)/2}}(De.boundingBox({includeLabels:t.nodeDimensionsIncludeLabels}))},{w:-1,h:-1}),se=Math.max(q===1?0:o?(u.h-t.padding*2-ae.h)/(q-1):(u.h-t.padding*2-ae.h)/(q+1),z),fe=b.reduce(function(Ce,De){return Math.max(Ce,De.length)},0),ve=l(function(De){var ce=zT(De),Ie=ce.depth,ye=ce.index;if(t.circle){var pe=Math.min(u.w/2/q,u.h/2/q);pe=Math.max(pe,z);var Ae=pe*Ie+pe-(q>0&&b[0].length<=3?pe/2:0),Ve=2*Math.PI/b[Ie].length*ye;return Ie===0&&b[0].length===1&&(Ae=1),{x:J.x+Ae*Math.cos(Ve),y:J.y+Ae*Math.sin(Ve)}}else{var ze=b[Ie].length,We=Math.max(ze===1?0:o?(u.w-t.padding*2-ae.w)/((t.grid?fe:ze)-1):(u.w-t.padding*2-ae.w)/((t.grid?fe:ze)+1),z),me={x:J.x+(ye+1-(ze+1)/2)*We,y:J.y+(Ie+1-(q+1)/2)*se};return me}},"getPositionTopBottom"),de={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(de).indexOf(t.direction)===-1&&ni("Invalid direction '".concat(t.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(de).join(", ")));var Ee=l(function(De){return kWt(ve(De),u,de[t.direction])},"getPosition");return r.nodes().layoutPositions(this,t,Ee),this};var fYt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:l(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:l(function(e,r){return r},"transform")};function y6e(t){this.options=zr({},fYt,t)}l(y6e,"CircleLayout"),y6e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=n.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=ol(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},u=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,h=u/Math.max(1,i.length-1),d,f=0,p=0;p<i.length;p++){var g=i[p],m=g.layoutDimensions(e),y=m.w,v=m.h;f=Math.max(f,y,v)}if(mr(e.radius)?d=e.radius:i.length<=1?d=0:d=Math.min(s.h,s.w)/2-f,i.length>1&&e.avoidOverlap){f*=1.75;var b=Math.cos(h)-Math.cos(0),w=Math.sin(h)-Math.sin(0),x=Math.sqrt(f*f/(b*b+w*w));d=Math.max(x,d)}var T=l(function(S,E){var k=e.startAngle+E*h*(a?1:-1),A=d*Math.cos(k),I=d*Math.sin(k),L={x:o.x+A,y:o.y+I};return L},"getPos");return n.nodes().layoutPositions(this,e,T),this};var pYt={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:l(function(e){return e.degree()},"concentric"),levelWidth:l(function(e){return e.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:l(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:l(function(e,r){return r},"transform")};function v6e(t){this.options=zr({},pYt,t)}l(v6e,"ConcentricLayout"),v6e.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,n=t.cy,a=e.eles,i=a.nodes().not(":parent"),s=ol(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},u=[],h=0,d=0;d<i.length;d++){var f=i[d],p=void 0;p=e.concentric(f),u.push({value:p,node:f}),f._private.scratch.concentric=p}i.updateStyle();for(var g=0;g<i.length;g++){var m=i[g],y=m.layoutDimensions(e);h=Math.max(h,y.w,y.h)}u.sort(function(se,fe){return fe.value-se.value});for(var v=e.levelWidth(i),b=[[]],w=b[0],x=0;x<u.length;x++){var T=u[x];if(w.length>0){var C=Math.abs(w[0].value-T.value);C>=v&&(w=[],b.push(w))}w.push(T)}var S=h+e.minNodeSpacing;if(!e.avoidOverlap){var E=b.length>0&&b[0].length>1,k=Math.min(s.w,s.h)/2-S,A=k/(b.length+E?1:0);S=Math.min(S,A)}for(var I=0,L=0;L<b.length;L++){var R=b[L],O=e.sweep===void 0?2*Math.PI-2*Math.PI/R.length:e.sweep,M=R.dTheta=O/Math.max(1,R.length-1);if(R.length>1&&e.avoidOverlap){var P=Math.cos(M)-Math.cos(0),z=Math.sin(M)-Math.sin(0),D=Math.sqrt(S*S/(P*P+z*z));I=Math.max(D,I)}R.r=I,I+=S}if(e.equidistant){for(var B=0,W=0,U=0;U<b.length;U++){var j=b[U],V=j.r-W;B=Math.max(B,V)}W=0;for(var Y=0;Y<b.length;Y++){var H=b[Y];Y===0&&(W=H.r),H.r=W,W+=B}}for(var q={},Z=0;Z<b.length;Z++)for(var K=b[Z],re=K.dTheta,Q=K.r,te=0;te<K.length;te++){var ee=K[te],J=e.startAngle+(r?1:-1)*re*te,ae={x:o.x+Q*Math.cos(J),y:o.y+Q*Math.sin(J)};q[ee.node.id()]=ae}return a.nodes().layoutPositions(this,e,function(se){var fe=se.id();return q[fe]}),this};var QU,gYt={ready:l(function(){},"ready"),stop:l(function(){},"stop"),animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:l(function(e,r){return!0},"animateFilter"),animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:l(function(e){return 2048},"nodeRepulsion"),nodeOverlap:4,idealEdgeLength:l(function(e){return 32},"idealEdgeLength"),edgeElasticity:l(function(e){return 32},"edgeElasticity"),nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1};function gL(t){this.options=zr({},gYt,t),this.options.layout=this;var e=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(a){var i=a.source().data("id"),s=a.target().data("id"),o=e.some(function(h){return h.data("id")===i}),u=e.some(function(h){return h.data("id")===s});return!o||!u});this.options.eles=this.options.eles.not(n)}l(gL,"CoseLayout"),gL.prototype.run=function(){var t=this.options,e=t.cy,r=this;r.stopped=!1,(t.animate===!0||t.animate===!1)&&r.emit({type:"layoutstart",layout:r}),t.debug===!0?QU=!0:QU=!1;var n=mYt(e,r,t);QU&&vYt(n),t.randomize&&bYt(n);var a=kf(),i=l(function(){xYt(n,e,t),t.fit===!0&&e.fit(t.padding)},"refresh"),s=l(function(p){return!(r.stopped||p>=t.numIter||(wYt(n,t),n.temperature=n.temperature*t.coolingFactor,n.temperature<t.minTemp))},"mainLoop"),o=l(function(){if(t.animate===!0||t.animate===!1)i(),r.one("layoutstop",t.stop),r.emit({type:"layoutstop",layout:r});else{var p=t.eles.nodes(),g=x6e(n,t,p);p.layoutPositions(r,t,g)}},"done"),u=0,h=!0;if(t.animate===!0){var d=l(function(){for(var p=0;h&&p<t.refresh;)h=s(u),u++,p++;if(!h)E6e(n,t),o();else{var g=kf();g-a>=t.animationThreshold&&i(),$I(d)}},"frame");d()}else{for(;h;)h=s(u),u++;E6e(n,t),o()}return this},gL.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},gL.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var mYt=l(function(e,r,n){for(var a=n.eles.edges(),i=n.eles.nodes(),s=ol(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:a.size(),temperature:n.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},u=n.eles.components(),h={},d=0;d<u.length;d++)for(var f=u[d],p=0;p<f.length;p++){var g=f[p];h[g.id()]=d}for(var d=0;d<o.nodeSize;d++){var m=i[d],y=m.layoutDimensions(n),v={};v.isLocked=m.locked(),v.id=m.data("id"),v.parentId=m.data("parent"),v.cmptId=h[m.id()],v.children=[],v.positionX=m.position("x"),v.positionY=m.position("y"),v.offsetX=0,v.offsetY=0,v.height=y.w,v.width=y.h,v.maxX=v.positionX+v.width/2,v.minX=v.positionX-v.width/2,v.maxY=v.positionY+v.height/2,v.minY=v.positionY-v.height/2,v.padLeft=parseFloat(m.style("padding")),v.padRight=parseFloat(m.style("padding")),v.padTop=parseFloat(m.style("padding")),v.padBottom=parseFloat(m.style("padding")),v.nodeRepulsion=ci(n.nodeRepulsion)?n.nodeRepulsion(m):n.nodeRepulsion,o.layoutNodes.push(v),o.idToIndex[v.id]=d}for(var b=[],w=0,x=-1,T=[],d=0;d<o.nodeSize;d++){var m=o.layoutNodes[d],C=m.parentId;C!=null?o.layoutNodes[o.idToIndex[C]].children.push(m.id):(b[++x]=m.id,T.push(m.id))}for(o.graphSet.push(T);w<=x;){var S=b[w++],E=o.idToIndex[S],g=o.layoutNodes[E],k=g.children;if(k.length>0){o.graphSet.push(k);for(var d=0;d<k.length;d++)b[++x]=k[d]}}for(var d=0;d<o.graphSet.length;d++)for(var A=o.graphSet[d],p=0;p<A.length;p++){var I=o.idToIndex[A[p]];o.indexToGraph[I]=d}for(var d=0;d<o.edgeSize;d++){var L=a[d],R={};R.id=L.data("id"),R.sourceId=L.data("source"),R.targetId=L.data("target");var O=ci(n.idealEdgeLength)?n.idealEdgeLength(L):n.idealEdgeLength,M=ci(n.edgeElasticity)?n.edgeElasticity(L):n.edgeElasticity,P=o.idToIndex[R.sourceId],z=o.idToIndex[R.targetId],D=o.indexToGraph[P],B=o.indexToGraph[z];if(D!=B){for(var W=yYt(R.sourceId,R.targetId,o),U=o.graphSet[W],j=0,v=o.layoutNodes[P];U.indexOf(v.id)===-1;)v=o.layoutNodes[o.idToIndex[v.parentId]],j++;for(v=o.layoutNodes[z];U.indexOf(v.id)===-1;)v=o.layoutNodes[o.idToIndex[v.parentId]],j++;O*=j*n.nestingFactor}R.idealLength=O,R.elasticity=M,o.layoutEdges.push(R)}return o},"createLayoutInfo"),yYt=l(function(e,r,n){var a=b6e(e,r,0,n);return 2>a.count?0:a.graph},"findLCA"),b6e=l(function(e,r,n,a){var i=a.graphSet[n];if(-1<i.indexOf(e)&&-1<i.indexOf(r))return{count:2,graph:n};for(var s=0,o=0;o<i.length;o++){var u=i[o],h=a.idToIndex[u],d=a.layoutNodes[h].children;if(d.length!==0){var f=a.indexToGraph[a.idToIndex[d[0]]],p=b6e(e,r,f,a);if(p.count!==0)if(p.count===1){if(s++,s===2)break}else return p}}return{count:s,graph:n}},"findLCA_aux"),vYt,bYt=l(function(e,r){for(var n=e.clientWidth,a=e.clientHeight,i=0;i<e.nodeSize;i++){var s=e.layoutNodes[i];s.children.length===0&&!s.isLocked&&(s.positionX=Math.random()*n,s.positionY=Math.random()*a)}},"randomizePositions"),x6e=l(function(e,r,n){var a=e.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return r.boundingBox&&(n.forEach(function(s){var o=e.layoutNodes[e.idToIndex[s.data("id")]];i.x1=Math.min(i.x1,o.positionX),i.x2=Math.max(i.x2,o.positionX),i.y1=Math.min(i.y1,o.positionY),i.y2=Math.max(i.y2,o.positionY)}),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(s,o){var u=e.layoutNodes[e.idToIndex[s.data("id")]];if(r.boundingBox){var h=i.w===0?.5:(u.positionX-i.x1)/i.w,d=i.h===0?.5:(u.positionY-i.y1)/i.h;return{x:a.x1+h*a.w,y:a.y1+d*a.h}}else return{x:u.positionX,y:u.positionY}}},"getScaleInBoundsFn"),xYt=l(function(e,r,n){var a=n.layout,i=n.eles.nodes(),s=x6e(e,n,i);i.positions(s),e.ready!==!0&&(e.ready=!0,a.one("layoutready",n.ready),a.emit({type:"layoutready",layout:this}))},"refreshPositions"),wYt=l(function(e,r,n){TYt(e,r),SYt(e),_Yt(e,r),kYt(e),AYt(e)},"step"),TYt=l(function(e,r){for(var n=0;n<e.graphSet.length;n++)for(var a=e.graphSet[n],i=a.length,s=0;s<i;s++)for(var o=e.layoutNodes[e.idToIndex[a[s]]],u=s+1;u<i;u++){var h=e.layoutNodes[e.idToIndex[a[u]]];EYt(o,h,e,r)}},"calculateNodeForces"),w6e=l(function(e){return-e+2*e*Math.random()},"randomDistance"),EYt=l(function(e,r,n,a){var i=e.cmptId,s=r.cmptId;if(!(i!==s&&!n.isCompound)){var o=r.positionX-e.positionX,u=r.positionY-e.positionY,h=1;o===0&&u===0&&(o=w6e(h),u=w6e(h));var d=CYt(e,r,o,u);if(d>0)var f=a.nodeOverlap*d,p=Math.sqrt(o*o+u*u),g=f*o/p,m=f*u/p;else var y=mL(e,o,u),v=mL(r,-1*o,-1*u),b=v.x-y.x,w=v.y-y.y,x=b*b+w*w,p=Math.sqrt(x),f=(e.nodeRepulsion+r.nodeRepulsion)/x,g=f*b/p,m=f*w/p;e.isLocked||(e.offsetX-=g,e.offsetY-=m),r.isLocked||(r.offsetX+=g,r.offsetY+=m)}},"nodeRepulsion"),CYt=l(function(e,r,n,a){if(n>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(a>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},"nodesOverlap"),mL=l(function(e,r,n){var a=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,u=n/r,h=s/o,d={};return r===0&&0<n||r===0&&0>n?(d.x=a,d.y=i+s/2,d):0<r&&-1*h<=u&&u<=h?(d.x=a+o/2,d.y=i+o*n/2/r,d):0>r&&-1*h<=u&&u<=h?(d.x=a-o/2,d.y=i-o*n/2/r,d):0<n&&(u<=-1*h||u>=h)?(d.x=a+s*r/2/n,d.y=i+s/2,d):(0>n&&(u<=-1*h||u>=h)&&(d.x=a-s*r/2/n,d.y=i-s/2),d)},"findClippingPoint"),SYt=l(function(e,r){for(var n=0;n<e.edgeSize;n++){var a=e.layoutEdges[n],i=e.idToIndex[a.sourceId],s=e.layoutNodes[i],o=e.idToIndex[a.targetId],u=e.layoutNodes[o],h=u.positionX-s.positionX,d=u.positionY-s.positionY;if(!(h===0&&d===0)){var f=mL(s,h,d),p=mL(u,-1*h,-1*d),g=p.x-f.x,m=p.y-f.y,y=Math.sqrt(g*g+m*m),v=Math.pow(a.idealLength-y,2)/a.elasticity;if(y!==0)var b=v*g/y,w=v*m/y;else var b=0,w=0;s.isLocked||(s.offsetX+=b,s.offsetY+=w),u.isLocked||(u.offsetX-=b,u.offsetY-=w)}}},"calculateEdgeForces"),_Yt=l(function(e,r){if(r.gravity!==0)for(var n=1,a=0;a<e.graphSet.length;a++){var i=e.graphSet[a],s=i.length;if(a===0)var o=e.clientHeight/2,u=e.clientWidth/2;else var h=e.layoutNodes[e.idToIndex[i[0]]],d=e.layoutNodes[e.idToIndex[h.parentId]],o=d.positionX,u=d.positionY;for(var f=0;f<s;f++){var p=e.layoutNodes[e.idToIndex[i[f]]];if(!p.isLocked){var g=o-p.positionX,m=u-p.positionY,y=Math.sqrt(g*g+m*m);if(y>n){var v=r.gravity*g/y,b=r.gravity*m/y;p.offsetX+=v,p.offsetY+=b}}}}},"calculateGravityForces"),kYt=l(function(e,r){var n=[],a=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;a<=i;){var s=n[a++],o=e.idToIndex[s],u=e.layoutNodes[o],h=u.children;if(0<h.length&&!u.isLocked){for(var d=u.offsetX,f=u.offsetY,p=0;p<h.length;p++){var g=e.layoutNodes[e.idToIndex[h[p]]];g.offsetX+=d,g.offsetY+=f,n[++i]=h[p]}u.offsetX=0,u.offsetY=0}}},"propagateForces"),AYt=l(function(e,r){for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];0<a.children.length&&(a.maxX=void 0,a.minX=void 0,a.maxY=void 0,a.minY=void 0)}for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];if(!(0<a.children.length||a.isLocked)){var i=NYt(a.offsetX,a.offsetY,e.temperature);a.positionX+=i.x,a.positionY+=i.y,a.offsetX=0,a.offsetY=0,a.minX=a.positionX-a.width,a.maxX=a.positionX+a.width,a.minY=a.positionY-a.height,a.maxY=a.positionY+a.height,T6e(a,e)}}for(var n=0;n<e.nodeSize;n++){var a=e.layoutNodes[n];0<a.children.length&&!a.isLocked&&(a.positionX=(a.maxX+a.minX)/2,a.positionY=(a.maxY+a.minY)/2,a.width=a.maxX-a.minX,a.height=a.maxY-a.minY)}},"updatePositions"),NYt=l(function(e,r,n){var a=Math.sqrt(e*e+r*r);if(a>n)var i={x:n*e/a,y:n*r/a};else var i={x:e,y:r};return i},"limitForce"),T6e=l(function(e,r){var n=e.parentId;if(n!=null){var a=r.layoutNodes[r.idToIndex[n]],i=!1;if((a.maxX==null||e.maxX+a.padRight>a.maxX)&&(a.maxX=e.maxX+a.padRight,i=!0),(a.minX==null||e.minX-a.padLeft<a.minX)&&(a.minX=e.minX-a.padLeft,i=!0),(a.maxY==null||e.maxY+a.padBottom>a.maxY)&&(a.maxY=e.maxY+a.padBottom,i=!0),(a.minY==null||e.minY-a.padTop<a.minY)&&(a.minY=e.minY-a.padTop,i=!0),i)return T6e(a,r)}},"updateAncestryBoundaries"),E6e=l(function(e,r){for(var n=e.layoutNodes,a=[],i=0;i<n.length;i++){var s=n[i],o=s.cmptId,u=a[o]=a[o]||[];u.push(s)}for(var h=0,i=0;i<a.length;i++){var d=a[i];if(d){d.x1=1/0,d.x2=-1/0,d.y1=1/0,d.y2=-1/0;for(var f=0;f<d.length;f++){var p=d[f];d.x1=Math.min(d.x1,p.positionX-p.width/2),d.x2=Math.max(d.x2,p.positionX+p.width/2),d.y1=Math.min(d.y1,p.positionY-p.height/2),d.y2=Math.max(d.y2,p.positionY+p.height/2)}d.w=d.x2-d.x1,d.h=d.y2-d.y1,h+=d.w*d.h}}a.sort(function(w,x){return x.w*x.h-w.w*w.h});for(var g=0,m=0,y=0,v=0,b=Math.sqrt(h)*e.clientWidth/e.clientHeight,i=0;i<a.length;i++){var d=a[i];if(d){for(var f=0;f<d.length;f++){var p=d[f];p.isLocked||(p.positionX+=g-d.x1,p.positionY+=m-d.y1)}g+=d.w+r.componentSpacing,y+=d.w+r.componentSpacing,v=Math.max(v,d.h),y>b&&(m+=v+r.componentSpacing,g=0,y=0,v=0)}}},"separateComponents"),IYt={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:l(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:l(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:l(function(e,r){return r},"transform")};function C6e(t){this.options=zr({},IYt,t)}l(C6e,"GridLayout"),C6e.prototype.run=function(){var t=this.options,e=t,r=t.cy,n=e.eles,a=n.nodes().not(":parent");e.sort&&(a=a.sort(e.sort));var i=ol(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)n.nodes().layoutPositions(this,e,function(Y){return{x:i.x1,y:i.y1}});else{var s=a.size(),o=Math.sqrt(s*i.h/i.w),u=Math.round(o),h=Math.round(i.w/i.h*o),d=l(function(H){if(H==null)return Math.min(u,h);var q=Math.min(u,h);q==u?u=H:h=H},"small"),f=l(function(H){if(H==null)return Math.max(u,h);var q=Math.max(u,h);q==u?u=H:h=H},"large"),p=e.rows,g=e.cols!=null?e.cols:e.columns;if(p!=null&&g!=null)u=p,h=g;else if(p!=null&&g==null)u=p,h=Math.ceil(s/u);else if(p==null&&g!=null)h=g,u=Math.ceil(s/h);else if(h*u>s){var m=d(),y=f();(m-1)*y>=s?d(m-1):(y-1)*m>=s&&f(y-1)}else for(;h*u<s;){var v=d(),b=f();(b+1)*v>=s?f(b+1):d(v+1)}var w=i.w/h,x=i.h/u;if(e.condense&&(w=0,x=0),e.avoidOverlap)for(var T=0;T<a.length;T++){var C=a[T],S=C._private.position;(S.x==null||S.y==null)&&(S.x=0,S.y=0);var E=C.layoutDimensions(e),k=e.avoidOverlapPadding,A=E.w+k,I=E.h+k;w=Math.max(w,A),x=Math.max(x,I)}for(var L={},R=l(function(H,q){return!!L["c-"+H+"-"+q]},"used"),O=l(function(H,q){L["c-"+H+"-"+q]=!0},"use"),M=0,P=0,z=l(function(){P++,P>=h&&(P=0,M++)},"moveToNextCell"),D={},B=0;B<a.length;B++){var W=a[B],U=e.position(W);if(U&&(U.row!==void 0||U.col!==void 0)){var j={row:U.row,col:U.col};if(j.col===void 0)for(j.col=0;R(j.row,j.col);)j.col++;else if(j.row===void 0)for(j.row=0;R(j.row,j.col);)j.row++;D[W.id()]=j,O(j.row,j.col)}}var V=l(function(H,q){var Z,K;if(H.locked()||H.isParent())return!1;var re=D[H.id()];if(re)Z=re.col*w+w/2+i.x1,K=re.row*x+x/2+i.y1;else{for(;R(M,P);)z();Z=P*w+w/2+i.x1,K=M*x+x/2+i.y1,O(M,P),z()}return{x:Z,y:K}},"getPos");a.layoutPositions(this,e,V)}return this};var LYt={ready:l(function(){},"ready"),stop:l(function(){},"stop")};function JU(t){this.options=zr({},LYt,t)}l(JU,"NullLayout"),JU.prototype.run=function(){var t=this.options,e=t.eles,r=this;return t.cy,r.emit("layoutstart"),e.nodes().positions(function(){return{x:0,y:0}}),r.one("layoutready",t.ready),r.emit("layoutready"),r.one("layoutstop",t.stop),r.emit("layoutstop"),this},JU.prototype.stop=function(){return this};var $Yt={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:l(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:l(function(e,r){return r},"transform")};function S6e(t){this.options=zr({},$Yt,t)}l(S6e,"PresetLayout"),S6e.prototype.run=function(){var t=this.options,e=t.eles,r=e.nodes(),n=ci(t.positions);function a(i){if(t.positions==null)return JWt(i.position());if(n)return t.positions(i);var s=t.positions[i._private.data.id];return s==null?null:s}return l(a,"getPosition"),r.layoutPositions(this,t,function(i,s){var o=a(i);return i.locked()||o==null?!1:o}),this};var MYt={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:l(function(e,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:l(function(e,r){return r},"transform")};function _6e(t){this.options=zr({},MYt,t)}l(_6e,"RandomLayout"),_6e.prototype.run=function(){var t=this.options,e=t.cy,r=t.eles,n=ol(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),a=l(function(s,o){return{x:n.x1+Math.round(Math.random()*n.w),y:n.y1+Math.round(Math.random()*n.h)}},"getPos");return r.nodes().layoutPositions(this,t,a),this};var PYt=[{name:"breadthfirst",impl:m6e},{name:"circle",impl:y6e},{name:"concentric",impl:v6e},{name:"cose",impl:gL},{name:"grid",impl:C6e},{name:"null",impl:JU},{name:"preset",impl:S6e},{name:"random",impl:_6e}];function k6e(t){this.options=t,this.notifications=0}l(k6e,"NullRenderer");var A6e=l(function(){},"noop"),N6e=l(function(){throw new Error("A headless instance can not render images")},"throwImgErr");k6e.prototype={recalculateRenderedStyle:A6e,notify:l(function(){this.notifications++},"notify"),init:A6e,isHeadless:l(function(){return!0},"isHeadless"),png:N6e,jpg:N6e};var ej={};ej.arrowShapeWidth=.3,ej.registerArrowShapes=function(){var t=this.arrowShapes={},e=this,r=l(function(h,d,f,p,g,m,y){var v=g.x-f/2-y,b=g.x+f/2+y,w=g.y-f/2-y,x=g.y+f/2+y,T=v<=h&&h<=b&&w<=d&&d<=x;return T},"bbCollide"),n=l(function(h,d,f,p,g){var m=h*Math.cos(p)-d*Math.sin(p),y=h*Math.sin(p)+d*Math.cos(p),v=m*f,b=y*f,w=v+g.x,x=b+g.y;return{x:w,y:x}},"transform"),a=l(function(h,d,f,p){for(var g=[],m=0;m<h.length;m+=2){var y=h[m],v=h[m+1];g.push(n(y,v,d,f,p))}return g},"transformPoints"),i=l(function(h){for(var d=[],f=0;f<h.length;f++){var p=h[f];d.push(p.x,p.y)}return d},"pointsToArr"),s=l(function(h){return h.pstyle("width").pfValue*h.pstyle("arrow-scale").pfValue*2},"standardGap"),o=l(function(h,d){Or(d)&&(d=t[d]),t[h]=zr({name:h,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:l(function(p,g,m,y,v,b){var w=i(a(this.points,m+2*b,y,v)),x=Yl(p,g,w);return x},"collide"),roughCollide:r,draw:l(function(p,g,m,y){var v=a(this.points,g,m,y);e.arrowShapeImpl("polygon")(p,v)},"draw"),spacing:l(function(p){return 0},"spacing"),gap:s},d)},"defineArrowShape");o("none",{collide:PI,roughCollide:PI,draw:TY,spacing:G5e,gap:G5e}),o("triangle",{points:[-.15,-.3,0,0,.15,-.3]}),o("arrow","triangle"),o("triangle-backcurve",{points:t.triangle.points,controlPoint:[0,-.15],roughCollide:r,draw:l(function(h,d,f,p,g){var m=a(this.points,d,f,p),y=this.controlPoint,v=n(y[0],y[1],d,f,p);e.arrowShapeImpl(this.name)(h,m,v)},"draw"),gap:l(function(h){return s(h)*.8},"gap")}),o("triangle-tee",{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:l(function(h,d,f,p,g,m,y){var v=i(a(this.points,f+2*y,p,g)),b=i(a(this.pointsTee,f+2*y,p,g)),w=Yl(h,d,v)||Yl(h,d,b);return w},"collide"),draw:l(function(h,d,f,p,g){var m=a(this.points,d,f,p),y=a(this.pointsTee,d,f,p);e.arrowShapeImpl(this.name)(h,m,y)},"draw")}),o("circle-triangle",{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:l(function(h,d,f,p,g,m,y){var v=g,b=Math.pow(v.x-h,2)+Math.pow(v.y-d,2)<=Math.pow((f+2*y)*this.radius,2),w=i(a(this.points,f+2*y,p,g));return Yl(h,d,w)||b},"collide"),draw:l(function(h,d,f,p,g){var m=a(this.pointsTr,d,f,p);e.arrowShapeImpl(this.name)(h,m,p.x,p.y,this.radius*d)},"draw"),spacing:l(function(h){return e.getArrowWidth(h.pstyle("width").pfValue,h.pstyle("arrow-scale").value)*this.radius},"spacing")}),o("triangle-cross",{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:l(function(h,d){var f=this.baseCrossLinePts.slice(),p=d/h,g=3,m=5;return f[g]=f[g]-p,f[m]=f[m]-p,f},"crossLinePts"),collide:l(function(h,d,f,p,g,m,y){var v=i(a(this.points,f+2*y,p,g)),b=i(a(this.crossLinePts(f,m),f+2*y,p,g)),w=Yl(h,d,v)||Yl(h,d,b);return w},"collide"),draw:l(function(h,d,f,p,g){var m=a(this.points,d,f,p),y=a(this.crossLinePts(d,g),d,f,p);e.arrowShapeImpl(this.name)(h,m,y)},"draw")}),o("vee",{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:l(function(h){return s(h)*.525},"gap")}),o("circle",{radius:.15,collide:l(function(h,d,f,p,g,m,y){var v=g,b=Math.pow(v.x-h,2)+Math.pow(v.y-d,2)<=Math.pow((f+2*y)*this.radius,2);return b},"collide"),draw:l(function(h,d,f,p,g){e.arrowShapeImpl(this.name)(h,p.x,p.y,this.radius*d)},"draw"),spacing:l(function(h){return e.getArrowWidth(h.pstyle("width").pfValue,h.pstyle("arrow-scale").value)*this.radius},"spacing")}),o("tee",{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:l(function(h){return 1},"spacing"),gap:l(function(h){return 1},"gap")}),o("square",{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),o("diamond",{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:l(function(h){return h.pstyle("width").pfValue*h.pstyle("arrow-scale").value},"gap")}),o("chevron",{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:l(function(h){return .95*h.pstyle("width").pfValue*h.pstyle("arrow-scale").value},"gap")})};var r1={};r1.projectIntoViewport=function(t,e){var r=this.cy,n=this.findContainerClientCoords(),a=n[0],i=n[1],s=n[4],o=r.pan(),u=r.zoom(),h=((t-a)/s-o.x)/u,d=((e-i)/s-o.y)/u;return[h,d]},r1.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var t=this.container,e=t.getBoundingClientRect(),r=this.cy.window().getComputedStyle(t),n=l(function(b){return parseFloat(r.getPropertyValue(b))},"styleValue"),a={left:n("padding-left"),right:n("padding-right"),top:n("padding-top"),bottom:n("padding-bottom")},i={left:n("border-left-width"),right:n("border-right-width"),top:n("border-top-width"),bottom:n("border-bottom-width")},s=t.clientWidth,o=t.clientHeight,u=a.left+a.right,h=a.top+a.bottom,d=i.left+i.right,f=e.width/(s+d),p=s-u,g=o-h,m=e.left+a.left+i.left,y=e.top+a.top+i.top;return this.containerBB=[m,y,p,g,f]},r1.invalidateContainerClientCoordsCache=function(){this.containerBB=null},r1.findNearestElement=function(t,e,r,n){return this.findNearestElements(t,e,r,n)[0]},r1.findNearestElements=function(t,e,r,n){var a=this,i=this,s=i.getCachedZSortedEles(),o=[],u=i.cy.zoom(),h=i.cy.hasCompoundNodes(),d=(n?24:8)/u,f=(n?8:2)/u,p=(n?8:2)/u,g=1/0,m,y;r&&(s=s.interactive);function v(E,k){if(E.isNode()){if(y)return;y=E,o.push(E)}if(E.isEdge()&&(k==null||k<g))if(m){if(m.pstyle("z-compound-depth").value===E.pstyle("z-compound-depth").value&&m.pstyle("z-compound-depth").value===E.pstyle("z-compound-depth").value){for(var A=0;A<o.length;A++)if(o[A].isEdge()){o[A]=E,m=E,g=k!=null?k:g;break}}}else o.push(E),m=E,g=k!=null?k:g}l(v,"addEle");function b(E){var k=E.outerWidth()+2*f,A=E.outerHeight()+2*f,I=k/2,L=A/2,R=E.position(),O=E.pstyle("corner-radius").value==="auto"?"auto":E.pstyle("corner-radius").pfValue,M=E._private.rscratch;if(R.x-I<=t&&t<=R.x+I&&R.y-L<=e&&e<=R.y+L){var P=i.nodeShapes[a.getNodeShape(E)];if(P.checkPoint(t,e,0,k,A,R.x,R.y,O,M))return v(E,0),!0}}l(b,"checkNode");function w(E){var k=E._private,A=k.rscratch,I=E.pstyle("width").pfValue,L=E.pstyle("arrow-scale").value,R=I/2+d,O=R*R,M=R*2,B=k.source,W=k.target,P;if(A.edgeType==="segments"||A.edgeType==="straight"||A.edgeType==="haystack"){for(var z=A.allpts,D=0;D+3<z.length;D+=2)if(fVt(t,e,z[D],z[D+1],z[D+2],z[D+3],M)&&O>(P=vVt(t,e,z[D],z[D+1],z[D+2],z[D+3])))return v(E,P),!0}else if(A.edgeType==="bezier"||A.edgeType==="multibezier"||A.edgeType==="self"||A.edgeType==="compound"){for(var z=A.allpts,D=0;D+5<A.allpts.length;D+=4)if(pVt(t,e,z[D],z[D+1],z[D+2],z[D+3],z[D+4],z[D+5],M)&&O>(P=yVt(t,e,z[D],z[D+1],z[D+2],z[D+3],z[D+4],z[D+5])))return v(E,P),!0}for(var B=B||k.source,W=W||k.target,U=a.getArrowWidth(I,L),j=[{name:"source",x:A.arrowStartX,y:A.arrowStartY,angle:A.srcArrowAngle},{name:"target",x:A.arrowEndX,y:A.arrowEndY,angle:A.tgtArrowAngle},{name:"mid-source",x:A.midX,y:A.midY,angle:A.midsrcArrowAngle},{name:"mid-target",x:A.midX,y:A.midY,angle:A.midtgtArrowAngle}],D=0;D<j.length;D++){var V=j[D],Y=i.arrowShapes[E.pstyle(V.name+"-arrow-shape").value],H=E.pstyle("width").pfValue;if(Y.roughCollide(t,e,U,V.angle,{x:V.x,y:V.y},H,d)&&Y.collide(t,e,U,V.angle,{x:V.x,y:V.y},H,d))return v(E),!0}h&&o.length>0&&(b(B),b(W))}l(w,"checkEdge");function x(E,k,A){return sl(E,k,A)}l(x,"preprop");function T(E,k){var A=E._private,I=p,L;k?L=k+"-":L="",E.boundingBox();var R=A.labelBounds[k||"main"],O=E.pstyle(L+"label").value,M=E.pstyle("text-events").strValue==="yes";if(!(!M||!O)){var P=x(A.rscratch,"labelX",k),z=x(A.rscratch,"labelY",k),D=x(A.rscratch,"labelAngle",k),B=E.pstyle(L+"text-margin-x").pfValue,W=E.pstyle(L+"text-margin-y").pfValue,U=R.x1-I-B,j=R.x2+I-B,V=R.y1-I-W,Y=R.y2+I-W;if(D){var H=Math.cos(D),q=Math.sin(D),Z=l(function(ae,se){return ae=ae-P,se=se-z,{x:ae*H-se*q+P,y:ae*q+se*H+z}},"rotate"),K=Z(U,V),re=Z(U,Y),Q=Z(j,V),te=Z(j,Y),ee=[K.x+B,K.y+W,Q.x+B,Q.y+W,te.x+B,te.y+W,re.x+B,re.y+W];if(Yl(t,e,ee))return v(E),!0}else if(Ep(R,t,e))return v(E),!0}}l(T,"checkLabel");for(var C=s.length-1;C>=0;C--){var S=s[C];S.isNode()?b(S)||T(S):w(S)||T(S)||T(S,"source")||T(S,"target")}return o},r1.getAllInBox=function(t,e,r,n){var a=this.getCachedZSortedEles().interactive,i=this.cy.zoom(),s=2/i,o=[],u=Math.min(t,r),h=Math.max(t,r),d=Math.min(e,n),f=Math.max(e,n);t=u,r=h,e=d,n=f;var p=ol({x1:t,y1:e,x2:r,y2:n}),g=[{x:p.x1,y:p.y1},{x:p.x2,y:p.y1},{x:p.x2,y:p.y2},{x:p.x1,y:p.y2}],m=[[g[0],g[1]],[g[1],g[2]],[g[2],g[3]],[g[3],g[0]]];function y(ae,se,fe){return sl(ae,se,fe)}l(y,"preprop");function v(ae,se){var fe=ae._private,ve=s,de="";ae.boundingBox();var Ee=fe.labelBounds.main;if(!Ee)return null;var Ce=y(fe.rscratch,"labelX",se),De=y(fe.rscratch,"labelY",se),ce=y(fe.rscratch,"labelAngle",se),Ie=ae.pstyle(de+"text-margin-x").pfValue,ye=ae.pstyle(de+"text-margin-y").pfValue,pe=Ee.x1-ve-Ie,Ae=Ee.x2+ve-Ie,Ve=Ee.y1-ve-ye,ze=Ee.y2+ve-ye;if(ce){var We=Math.cos(ce),me=Math.sin(ce),Se=l(function(xe,oe){return xe=xe-Ce,oe=oe-De,{x:xe*We-oe*me+Ce,y:xe*me+oe*We+De}},"rotate");return[Se(pe,Ve),Se(Ae,Ve),Se(Ae,ze),Se(pe,ze)]}else return[{x:pe,y:Ve},{x:Ae,y:Ve},{x:Ae,y:ze},{x:pe,y:ze}]}l(v,"getRotatedLabelBox");function b(ae,se,fe,ve){function de(Ee,Ce,De){return(De.y-Ee.y)*(Ce.x-Ee.x)>(Ce.y-Ee.y)*(De.x-Ee.x)}return l(de,"ccw"),de(ae,fe,ve)!==de(se,fe,ve)&&de(ae,se,fe)!==de(ae,se,ve)}l(b,"doLinesIntersect");for(var w=0;w<a.length;w++){var x=a[w];if(x.isNode()){var T=x,C=T.pstyle("text-events").strValue==="yes",S=T.pstyle("box-selection").strValue,E=T.pstyle("box-select-labels").strValue==="yes";if(S==="none")continue;var k=(S==="overlap"||E)&&C,A=T.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:k});if(S==="contain"){var I=!1;if(E&&C){var L=v(T);L&&PY(L,g)&&(o.push(T),I=!0)}!I&&t_e(p,A)&&o.push(T)}else if(S==="overlap"&&NY(p,A)){var R=T.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1}),O=[{x:R.x1,y:R.y1},{x:R.x2,y:R.y1},{x:R.x2,y:R.y2},{x:R.x1,y:R.y2}];if(PY(O,g))o.push(T);else{var M=v(T);M&&PY(M,g)&&o.push(T)}}}else{var P=x,z=P._private,D=z.rscratch,B=P.pstyle("box-selection").strValue;if(B==="none")continue;if(B==="contain"){if(D.startX!=null&&D.startY!=null&&!Ep(p,D.startX,D.startY)||D.endX!=null&&D.endY!=null&&!Ep(p,D.endX,D.endY))continue;if(D.edgeType==="bezier"||D.edgeType==="multibezier"||D.edgeType==="self"||D.edgeType==="compound"||D.edgeType==="segments"||D.edgeType==="haystack"){for(var W=z.rstyle.bezierPts||z.rstyle.linePts||z.rstyle.haystackPts,U=!0,j=0;j<W.length;j++)if(!e_e(p,W[j])){U=!1;break}U&&o.push(P)}else D.edgeType==="straight"&&o.push(P)}else if(B==="overlap"){var V=!1;if(D.startX!=null&&D.startY!=null&&D.endX!=null&&D.endY!=null&&(Ep(p,D.startX,D.startY)||Ep(p,D.endX,D.endY)))o.push(P),V=!0;else if(!V&&D.edgeType==="haystack"){for(var Y=z.rstyle.haystackPts,H=0;H<Y.length;H++)if(e_e(p,Y[H])){o.push(P),V=!0;break}}if(!V){var q=z.rstyle.bezierPts||z.rstyle.linePts||z.rstyle.haystackPts;if((!q||q.length<2)&&D.edgeType==="straight"&&D.startX!=null&&D.startY!=null&&D.endX!=null&&D.endY!=null&&(q=[{x:D.startX,y:D.startY},{x:D.endX,y:D.endY}]),!q||q.length<2)continue;for(var Z=0;Z<q.length-1;Z++){for(var K=q[Z],re=q[Z+1],Q=0;Q<m.length;Q++){var te=Ji(m[Q],2),ee=te[0],J=te[1];if(b(K,re,ee,J)){o.push(P),V=!0;break}}if(V)break}}}}}return o};var yL={};yL.calculateArrowAngles=function(t){var e=t._private.rscratch,r=e.edgeType==="haystack",n=e.edgeType==="bezier",a=e.edgeType==="multibezier",i=e.edgeType==="segments",s=e.edgeType==="compound",o=e.edgeType==="self",u,h,d,f,p,g,b,w;if(r?(d=e.haystackPts[0],f=e.haystackPts[1],p=e.haystackPts[2],g=e.haystackPts[3]):(d=e.arrowStartX,f=e.arrowStartY,p=e.arrowEndX,g=e.arrowEndY),b=e.midX,w=e.midY,i)u=d-e.segpts[0],h=f-e.segpts[1];else if(a||s||o||n){var m=e.allpts,y=Fs(m[0],m[2],m[4],.1),v=Fs(m[1],m[3],m[5],.1);u=d-y,h=f-v}else u=d-b,h=f-w;e.srcArrowAngle=FI(u,h);var b=e.midX,w=e.midY;if(r&&(b=(d+p)/2,w=(f+g)/2),u=p-d,h=g-f,i){var m=e.allpts;if(m.length/2%2===0){var x=m.length/2,T=x-2;u=m[x]-m[T],h=m[x+1]-m[T+1]}else if(e.isRound)u=e.midVector[1],h=-e.midVector[0];else{var x=m.length/2-1,T=x-2;u=m[x]-m[T],h=m[x+1]-m[T+1]}}else if(a||s||o){var m=e.allpts,C=e.ctrlpts,S,E,k,A;if(C.length/2%2===0){var I=m.length/2-1,L=I+2,R=L+2;S=Fs(m[I],m[L],m[R],0),E=Fs(m[I+1],m[L+1],m[R+1],0),k=Fs(m[I],m[L],m[R],1e-4),A=Fs(m[I+1],m[L+1],m[R+1],1e-4)}else{var L=m.length/2-1,I=L-2,R=L+2;S=Fs(m[I],m[L],m[R],.4999),E=Fs(m[I+1],m[L+1],m[R+1],.4999),k=Fs(m[I],m[L],m[R],.5),A=Fs(m[I+1],m[L+1],m[R+1],.5)}u=k-S,h=A-E}if(e.midtgtArrowAngle=FI(u,h),e.midDispX=u,e.midDispY=h,u*=-1,h*=-1,i){var m=e.allpts;if(m.length/2%2!==0){if(!e.isRound){var x=m.length/2-1,O=x+2;u=-(m[O]-m[x]),h=-(m[O+1]-m[x+1])}}}if(e.midsrcArrowAngle=FI(u,h),i)u=p-e.segpts[e.segpts.length-2],h=g-e.segpts[e.segpts.length-1];else if(a||s||o||n){var m=e.allpts,M=m.length,y=Fs(m[M-6],m[M-4],m[M-2],.9),v=Fs(m[M-5],m[M-3],m[M-1],.9);u=p-y,h=g-v}else u=p-b,h=g-w;e.tgtArrowAngle=FI(u,h)},yL.getArrowWidth=yL.getArrowHeight=function(t,e){var r=this.arrowWidthCache=this.arrowWidthCache||{},n=r[t+", "+e];return n||(n=Math.max(Math.pow(t*13.37,.9),29)*e,r[t+", "+e]=n,n)};var tj,rj,ad={},iu={},I6e,L6e,n1,vL,If,a1,i1,id,HT,bL,$6e,M6e,nj,aj,P6e,R6e=l(function(e,r,n){n.x=r.x-e.x,n.y=r.y-e.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx)},"asVec"),RYt=l(function(e,r){r.x=e.x*-1,r.y=e.y*-1,r.nx=e.nx*-1,r.ny=e.ny*-1,r.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang},"invertVec"),OYt=l(function(e,r,n,a,i){if(e!==P6e?R6e(r,e,ad):RYt(iu,ad),R6e(r,n,iu),I6e=ad.nx*iu.ny-ad.ny*iu.nx,L6e=ad.nx*iu.nx-ad.ny*-iu.ny,If=Math.asin(Math.max(-1,Math.min(1,I6e))),Math.abs(If)<1e-6){tj=r.x,rj=r.y,i1=HT=0;return}n1=1,vL=!1,L6e<0?If<0?If=Math.PI+If:(If=Math.PI-If,n1=-1,vL=!0):If>0&&(n1=-1,vL=!0),r.radius!==void 0?HT=r.radius:HT=a,a1=If/2,bL=Math.min(ad.len/2,iu.len/2),i?(id=Math.abs(Math.cos(a1)*HT/Math.sin(a1)),id>bL?(id=bL,i1=Math.abs(id*Math.sin(a1)/Math.cos(a1))):i1=HT):(id=Math.min(bL,HT),i1=Math.abs(id*Math.sin(a1)/Math.cos(a1))),nj=r.x+iu.nx*id,aj=r.y+iu.ny*id,tj=nj-iu.ny*i1*n1,rj=aj+iu.nx*i1*n1,$6e=r.x+ad.nx*id,M6e=r.y+ad.ny*id,P6e=r},"calcCornerArc");function O6e(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}l(O6e,"drawPreparedRoundCorner");function ij(t,e,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(OYt(t,e,r,n,a),{cx:tj,cy:rj,radius:i1,startX:$6e,startY:M6e,stopX:nj,stopY:aj,startAngle:ad.ang+Math.PI/2*n1,endAngle:iu.ang-Math.PI/2*n1,counterClockwise:vL})}l(ij,"getRoundCorner");var _5=.01,DYt=Math.sqrt(2*_5),zo={};zo.findMidptPtsEtc=function(t,e){var r=e.posPts,n=e.intersectionPts,a=e.vectorNormInverse,i,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),u=s.units!=null&&o.units!=null,h=l(function(C,S,E,k){var A=k-S,I=E-C,L=Math.sqrt(I*I+A*A);return{x:-A/L,y:I/L}},"recalcVectorNormInverse"),d=t.pstyle("edge-distances").value;switch(d){case"node-position":i=r;break;case"intersection":i=n;break;case"endpoints":{if(u){var f=this.manualEndptToPx(t.source()[0],s),p=Ji(f,2),g=p[0],m=p[1],y=this.manualEndptToPx(t.target()[0],o),v=Ji(y,2),b=v[0],w=v[1],x={x1:g,y1:m,x2:b,y2:w};a=h(g,m,b,w),i=x}else na("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=n;break}}return{midptPts:i,vectorNormInverse:a}},zo.findHaystackPoints=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r._private,a=n.rscratch;if(!a.haystack){var i=Math.random()*2*Math.PI;a.source={x:Math.cos(i),y:Math.sin(i)},i=Math.random()*2*Math.PI,a.target={x:Math.cos(i),y:Math.sin(i)}}var s=n.source,o=n.target,u=s.position(),h=o.position(),d=s.width(),f=o.width(),p=s.height(),g=o.height(),m=r.pstyle("haystack-radius").value,y=m/2;a.haystackPts=a.allpts=[a.source.x*d*y+u.x,a.source.y*p*y+u.y,a.target.x*f*y+h.x,a.target.y*g*y+h.y],a.midX=(a.allpts[0]+a.allpts[2])/2,a.midY=(a.allpts[1]+a.allpts[3])/2,a.edgeType="haystack",a.haystack=!0,this.storeEdgeProjections(r),this.calculateArrowAngles(r),this.recalculateEdgeLabelProjections(r),this.calculateLabelAngles(r)}},zo.findSegmentsPoints=function(t,e){var r=t._private.rscratch,n=t.pstyle("segment-weights"),a=t.pstyle("segment-distances"),i=t.pstyle("segment-radii"),s=t.pstyle("radius-type"),o=Math.min(n.pfValue.length,a.pfValue.length),u=i.pfValue[i.pfValue.length-1],h=s.pfValue[s.pfValue.length-1];r.edgeType="segments",r.segpts=[],r.radii=[],r.isArcRadius=[];for(var d=0;d<o;d++){var f=n.pfValue[d],p=a.pfValue[d],g=1-f,m=f,y=this.findMidptPtsEtc(t,e),v=y.midptPts,b=y.vectorNormInverse,w={x:v.x1*g+v.x2*m,y:v.y1*g+v.y2*m};r.segpts.push(w.x+b.x*p,w.y+b.y*p),r.radii.push(i.pfValue[d]!==void 0?i.pfValue[d]:u),r.isArcRadius.push((s.pfValue[d]!==void 0?s.pfValue[d]:h)==="arc-radius")}},zo.findLoopPoints=function(t,e,r,n){var a=t._private.rscratch,i=e.dirCounts,s=e.srcPos,o=t.pstyle("control-point-distances"),u=o?o.pfValue[0]:void 0,h=t.pstyle("loop-direction").pfValue,d=t.pstyle("loop-sweep").pfValue,f=t.pstyle("control-point-step-size").pfValue;a.edgeType="self";var p=r,g=f;n&&(p=0,g=u);var m=h-Math.PI/2,y=m-d/2,v=m+d/2,b=h+"_"+d;p=i[b]===void 0?i[b]=0:++i[b],a.ctrlpts=[s.x+Math.cos(y)*1.4*g*(p/3+1),s.y+Math.sin(y)*1.4*g*(p/3+1),s.x+Math.cos(v)*1.4*g*(p/3+1),s.y+Math.sin(v)*1.4*g*(p/3+1)]},zo.findCompoundLoopPoints=function(t,e,r,n){var a=t._private.rscratch;a.edgeType="compound";var i=e.srcPos,s=e.tgtPos,o=e.srcW,u=e.srcH,h=e.tgtW,d=e.tgtH,f=t.pstyle("control-point-step-size").pfValue,p=t.pstyle("control-point-distances"),g=p?p.pfValue[0]:void 0,m=r,y=f;n&&(m=0,y=g);var v=50,b={x:i.x-o/2,y:i.y-u/2},w={x:s.x-h/2,y:s.y-d/2},x={x:Math.min(b.x,w.x),y:Math.min(b.y,w.y)},T=.5,C=Math.max(T,Math.log(o*_5)),S=Math.max(T,Math.log(h*_5));a.ctrlpts=[x.x,x.y-(1+Math.pow(v,1.12)/100)*y*(m/3+1)*C,x.x-(1+Math.pow(v,1.12)/100)*y*(m/3+1)*S,x.y]},zo.findStraightEdgePoints=function(t){t._private.rscratch.edgeType="straight"},zo.findBezierPoints=function(t,e,r,n,a){var i=t._private.rscratch,s=t.pstyle("control-point-step-size").pfValue,o=t.pstyle("control-point-distances"),u=t.pstyle("control-point-weights"),h=o&&u?Math.min(o.value.length,u.value.length):1,d=o?o.pfValue[0]:void 0,f=u.value[0],p=n;i.edgeType=p?"multibezier":"bezier",i.ctrlpts=[];for(var g=0;g<h;g++){var m=(.5-e.eles.length/2+r)*s*(a?-1:1),y=void 0,v=AY(m);p&&(d=o?o.pfValue[g]:s,f=u.value[g]),n?y=d:y=d!==void 0?v*d:void 0;var b=y!==void 0?y:m,w=1-f,x=f,T=this.findMidptPtsEtc(t,e),C=T.midptPts,S=T.vectorNormInverse,E={x:C.x1*w+C.x2*x,y:C.y1*w+C.y2*x};i.ctrlpts.push(E.x+S.x*b,E.y+S.y*b)}},zo.findTaxiPoints=function(t,e){var r=t._private.rscratch;r.edgeType="segments";var n="vertical",a="horizontal",i="leftward",s="rightward",o="downward",u="upward",h="auto",d=e.posPts,f=e.srcW,p=e.srcH,g=e.tgtW,m=e.tgtH,y=t.pstyle("edge-distances").value,v=y!=="node-position",b=t.pstyle("taxi-direction").value,w=b,x=t.pstyle("taxi-turn"),T=x.units==="%",C=x.pfValue,S=C<0,E=t.pstyle("taxi-turn-min-distance").pfValue,k=v?(f+g)/2:0,A=v?(p+m)/2:0,I=d.x2-d.x1,L=d.y2-d.y1,R=l(function(oe,_e){return oe>0?Math.max(oe-_e,0):Math.min(oe+_e,0)},"subDWH"),O=R(I,k),M=R(L,A),P=!1;w===h?b=Math.abs(O)>Math.abs(M)?a:n:w===u||w===o?(b=n,P=!0):(w===i||w===s)&&(b=a,P=!0);var z=b===n,D=z?M:O,B=z?L:I,W=AY(B),U=!1;!(P&&(T||S))&&(w===o&&B<0||w===u&&B>0||w===i&&B>0||w===s&&B<0)&&(W*=-1,D=W*Math.abs(D),U=!0);var j;if(T){var V=C<0?1+C:C;j=V*D}else{var Y=C<0?D:0;j=Y+C*W}var H=l(function(oe){return Math.abs(oe)<E||Math.abs(oe)>=Math.abs(D)},"getIsTooClose"),q=H(j),Z=H(Math.abs(D)-Math.abs(j)),K=q||Z;if(K&&!U)if(z){var re=Math.abs(B)<=p/2,Q=Math.abs(I)<=g/2;if(re){var te=(d.x1+d.x2)/2,ee=d.y1,J=d.y2;r.segpts=[te,ee,te,J]}else if(Q){var ae=(d.y1+d.y2)/2,se=d.x1,fe=d.x2;r.segpts=[se,ae,fe,ae]}else r.segpts=[d.x1,d.y2]}else{var ve=Math.abs(B)<=f/2,de=Math.abs(L)<=m/2;if(ve){var Ee=(d.y1+d.y2)/2,Ce=d.x1,De=d.x2;r.segpts=[Ce,Ee,De,Ee]}else if(de){var ce=(d.x1+d.x2)/2,Ie=d.y1,ye=d.y2;r.segpts=[ce,Ie,ce,ye]}else r.segpts=[d.x2,d.y1]}else if(z){var pe=d.y1+j+(v?p/2*W:0),Ae=d.x1,Ve=d.x2;r.segpts=[Ae,pe,Ve,pe]}else{var ze=d.x1+j+(v?f/2*W:0),We=d.y1,me=d.y2;r.segpts=[ze,We,ze,me]}if(r.isRound){var Se=t.pstyle("taxi-radius").value,ne=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(Se),r.isArcRadius=new Array(r.segpts.length/2).fill(ne)}},zo.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var n=e.srcPos,a=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,u=e.tgtH,h=e.srcShape,d=e.tgtShape,f=e.srcCornerRadius,p=e.tgtCornerRadius,g=e.srcRs,m=e.tgtRs,y=!mr(r.startX)||!mr(r.startY),v=!mr(r.arrowStartX)||!mr(r.arrowStartY),b=!mr(r.endX)||!mr(r.endY),w=!mr(r.arrowEndX)||!mr(r.arrowEndY),x=3,T=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,C=x*T,S=Zm({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),E=S<C,k=Zm({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.endX,y:r.endY}),A=k<C,I=!1;if(y||v||E){I=!0;var L={x:r.ctrlpts[0]-n.x,y:r.ctrlpts[1]-n.y},R=Math.sqrt(L.x*L.x+L.y*L.y),O={x:L.x/R,y:L.y/R},M=Math.max(i,s),P={x:r.ctrlpts[0]+O.x*2*M,y:r.ctrlpts[1]+O.y*2*M},z=h.intersectLine(n.x,n.y,i,s,P.x,P.y,0,f,g);E?(r.ctrlpts[0]=r.ctrlpts[0]+O.x*(C-S),r.ctrlpts[1]=r.ctrlpts[1]+O.y*(C-S)):(r.ctrlpts[0]=z[0]+O.x*C,r.ctrlpts[1]=z[1]+O.y*C)}if(b||w||A){I=!0;var D={x:r.ctrlpts[0]-a.x,y:r.ctrlpts[1]-a.y},B=Math.sqrt(D.x*D.x+D.y*D.y),W={x:D.x/B,y:D.y/B},U=Math.max(i,s),j={x:r.ctrlpts[0]+W.x*2*U,y:r.ctrlpts[1]+W.y*2*U},V=d.intersectLine(a.x,a.y,o,u,j.x,j.y,0,p,m);A?(r.ctrlpts[0]=r.ctrlpts[0]+W.x*(C-k),r.ctrlpts[1]=r.ctrlpts[1]+W.y*(C-k)):(r.ctrlpts[0]=V[0]+W.x*C,r.ctrlpts[1]=V[1]+W.y*C)}I&&this.findEndpoints(t)}},zo.storeAllpts=function(t){var e=t._private.rscratch;if(e.edgeType==="multibezier"||e.edgeType==="bezier"||e.edgeType==="self"||e.edgeType==="compound"){e.allpts=[],e.allpts.push(e.startX,e.startY);for(var r=0;r+1<e.ctrlpts.length;r+=2)e.allpts.push(e.ctrlpts[r],e.ctrlpts[r+1]),r+3<e.ctrlpts.length&&e.allpts.push((e.ctrlpts[r]+e.ctrlpts[r+2])/2,(e.ctrlpts[r+1]+e.ctrlpts[r+3])/2);e.allpts.push(e.endX,e.endY);var n,a;e.ctrlpts.length/2%2===0?(n=e.allpts.length/2-1,e.midX=e.allpts[n],e.midY=e.allpts[n+1]):(n=e.allpts.length/2-3,a=.5,e.midX=Fs(e.allpts[n],e.allpts[n+2],e.allpts[n+4],a),e.midY=Fs(e.allpts[n+1],e.allpts[n+3],e.allpts[n+5],a))}else if(e.edgeType==="straight")e.allpts=[e.startX,e.startY,e.endX,e.endY],e.midX=(e.startX+e.endX+e.arrowStartX+e.arrowEndX)/4,e.midY=(e.startY+e.endY+e.arrowStartY+e.arrowEndY)/4;else if(e.edgeType==="segments"){if(e.allpts=[],e.allpts.push(e.startX,e.startY),e.allpts.push.apply(e.allpts,e.segpts),e.allpts.push(e.endX,e.endY),e.isRound){e.roundCorners=[];for(var i=2;i+3<e.allpts.length;i+=2){var s=e.radii[i/2-1],o=e.isArcRadius[i/2-1];e.roundCorners.push(ij({x:e.allpts[i-2],y:e.allpts[i-1]},{x:e.allpts[i],y:e.allpts[i+1],radius:s},{x:e.allpts[i+2],y:e.allpts[i+3]},s,o))}}if(e.segpts.length%4===0){var u=e.segpts.length/2,h=u-2;e.midX=(e.segpts[h]+e.segpts[u])/2,e.midY=(e.segpts[h+1]+e.segpts[u+1])/2}else{var d=e.segpts.length/2-1;if(!e.isRound)e.midX=e.segpts[d],e.midY=e.segpts[d+1];else{var f={x:e.segpts[d],y:e.segpts[d+1]},p=e.roundCorners[d/2];if(p.radius===0){var g={x:e.segpts[d+2],y:e.segpts[d+3]};e.midX=f.x,e.midY=f.y,e.midVector=[f.y-g.y,g.x-f.x]}else{var m=[f.x-p.cx,f.y-p.cy],y=p.radius/Math.sqrt(Math.pow(m[0],2)+Math.pow(m[1],2));m=m.map(function(v){return v*y}),e.midX=p.cx+m[0],e.midY=p.cy+m[1],e.midVector=m}}}}},zo.checkForInvalidEdgeWarning=function(t){var e=t[0]._private.rscratch;e.nodesOverlap||mr(e.startX)&&mr(e.startY)&&mr(e.endX)&&mr(e.endY)?e.loggedErr=!1:e.loggedErr||(e.loggedErr=!0,na("Edge `"+t.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},zo.findEdgeControlPoints=function(t){var e=this;if(!(!t||t.length===0)){for(var r=this,n=r.cy,a=n.hasCompoundNodes(),i=new Af,s=l(function(A,I){return[].concat(kI(A),[I?1:0]).join("-")},"getKey"),o=[],u=[],h=0;h<t.length;h++){var d=t[h],f=d._private,p=d.pstyle("curve-style").value;if(!(d.removed()||!d.takesUpSpace())){if(p==="haystack"){u.push(d);continue}var g=p==="unbundled-bezier"||xp(p,"segments")||p==="straight"||p==="straight-triangle"||xp(p,"taxi"),m=p==="unbundled-bezier"||p==="bezier",y=f.source,v=f.target,b=y.poolIndex(),w=v.poolIndex(),x=[b,w].sort(),T=s(x,g),C=i.get(T);C==null&&(C={eles:[]},o.push({pairId:x,edgeIsUnbundled:g}),i.set(T,C)),C.eles.push(d),g&&(C.hasUnbundled=!0),m&&(C.hasBezier=!0)}}for(var S=l(function(){var A=o[E],I=A.pairId,L=A.edgeIsUnbundled,R=s(I,L),O=i.get(R),M;if(!O.hasUnbundled){var P=O.eles[0].parallelEdges().filter(function(ne){return ne.isBundledBezier()});EY(O.eles),P.forEach(function(ne){return O.eles.push(ne)}),O.eles.sort(function(ne,xe){return ne.poolIndex()-xe.poolIndex()})}var z=O.eles[0],D=z.source(),B=z.target();if(D.poolIndex()>B.poolIndex()){var W=D;D=B,B=W}var U=O.srcPos=D.position(),j=O.tgtPos=B.position(),V=O.srcW=D.outerWidth(),Y=O.srcH=D.outerHeight(),H=O.tgtW=B.outerWidth(),q=O.tgtH=B.outerHeight(),Z=O.srcShape=r.nodeShapes[e.getNodeShape(D)],K=O.tgtShape=r.nodeShapes[e.getNodeShape(B)],re=O.srcCornerRadius=D.pstyle("corner-radius").value==="auto"?"auto":D.pstyle("corner-radius").pfValue,Q=O.tgtCornerRadius=B.pstyle("corner-radius").value==="auto"?"auto":B.pstyle("corner-radius").pfValue,te=O.tgtRs=B._private.rscratch,ee=O.srcRs=D._private.rscratch;O.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var J=0;J<O.eles.length;J++){var ae=O.eles[J],se=ae[0]._private.rscratch,fe=ae.pstyle("curve-style").value,ve=fe==="unbundled-bezier"||xp(fe,"segments")||xp(fe,"taxi"),de=!D.same(ae.source());if(!O.calculatedIntersection&&D!==B&&(O.hasBezier||O.hasUnbundled)){O.calculatedIntersection=!0;var Ee=Z.intersectLine(U.x,U.y,V,Y,j.x,j.y,0,re,ee),Ce=O.srcIntn=Ee,De=K.intersectLine(j.x,j.y,H,q,U.x,U.y,0,Q,te),ce=O.tgtIntn=De,Ie=O.intersectionPts={x1:Ee[0],x2:De[0],y1:Ee[1],y2:De[1]},ye=O.posPts={x1:U.x,x2:j.x,y1:U.y,y2:j.y},pe=De[1]-Ee[1],Ae=De[0]-Ee[0],Ve=Math.sqrt(Ae*Ae+pe*pe);mr(Ve)&&Ve>=DYt||(Ve=Math.sqrt(Math.max(Ae*Ae,_5)+Math.max(pe*pe,_5)));var ze=O.vector={x:Ae,y:pe},We=O.vectorNorm={x:ze.x/Ve,y:ze.y/Ve},me={x:-We.y,y:We.x};O.nodesOverlap=!mr(Ve)||K.checkPoint(Ee[0],Ee[1],0,H,q,j.x,j.y,Q,te)||Z.checkPoint(De[0],De[1],0,V,Y,U.x,U.y,re,ee),O.vectorNormInverse=me,M={nodesOverlap:O.nodesOverlap,dirCounts:O.dirCounts,calculatedIntersection:!0,hasBezier:O.hasBezier,hasUnbundled:O.hasUnbundled,eles:O.eles,srcPos:j,srcRs:te,tgtPos:U,tgtRs:ee,srcW:H,srcH:q,tgtW:V,tgtH:Y,srcIntn:ce,tgtIntn:Ce,srcShape:K,tgtShape:Z,posPts:{x1:ye.x2,y1:ye.y2,x2:ye.x1,y2:ye.y1},intersectionPts:{x1:Ie.x2,y1:Ie.y2,x2:Ie.x1,y2:Ie.y1},vector:{x:-ze.x,y:-ze.y},vectorNorm:{x:-We.x,y:-We.y},vectorNormInverse:{x:-me.x,y:-me.y}}}var Se=de?M:O;se.nodesOverlap=Se.nodesOverlap,se.srcIntn=Se.srcIntn,se.tgtIntn=Se.tgtIntn,se.isRound=fe.startsWith("round"),a&&(D.isParent()||D.isChild()||B.isParent()||B.isChild())&&(D.parents().anySame(B)||B.parents().anySame(D)||D.same(B)&&D.isParent())?e.findCompoundLoopPoints(ae,Se,J,ve):D===B?e.findLoopPoints(ae,Se,J,ve):fe.endsWith("segments")?e.findSegmentsPoints(ae,Se):fe.endsWith("taxi")?e.findTaxiPoints(ae,Se):fe==="straight"||!ve&&O.eles.length%2===1&&J===Math.floor(O.eles.length/2)?e.findStraightEdgePoints(ae):e.findBezierPoints(ae,Se,J,ve,de),e.findEndpoints(ae),e.tryToCorrectInvalidPoints(ae,Se),e.checkForInvalidEdgeWarning(ae),e.storeAllpts(ae),e.storeEdgeProjections(ae),e.calculateArrowAngles(ae),e.recalculateEdgeLabelProjections(ae),e.calculateLabelAngles(ae)}},"_loop"),E=0;E<o.length;E++)S();this.findHaystackPoints(u)}};function D6e(t){var e=[];if(t!=null){for(var r=0;r<t.length;r+=2){var n=t[r],a=t[r+1];e.push({x:n,y:a})}return e}}l(D6e,"getPts"),zo.getSegmentPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="segments")return D6e(e.segpts)},zo.getControlPoints=function(t){var e=t[0]._private.rscratch;this.recalculateRenderedStyle(t);var r=e.edgeType;if(r==="bezier"||r==="multibezier"||r==="self"||r==="compound")return D6e(e.ctrlpts)},zo.getEdgeMidpoint=function(t){var e=t[0]._private.rscratch;return this.recalculateRenderedStyle(t),{x:e.midX,y:e.midY}};var k5={};k5.manualEndptToPx=function(t,e){var r=this,n=t.position(),a=t.outerWidth(),i=t.outerHeight(),s=t._private.rscratch;if(e.value.length===2){var o=[e.pfValue[0],e.pfValue[1]];return e.units[0]==="%"&&(o[0]=o[0]*a),e.units[1]==="%"&&(o[1]=o[1]*i),o[0]+=n.x,o[1]+=n.y,o}else{var u=e.pfValue[0];u=-Math.PI/2+u;var h=2*Math.max(a,i),d=[n.x+Math.cos(u)*h,n.y+Math.sin(u)*h];return r.nodeShapes[this.getNodeShape(t)].intersectLine(n.x,n.y,a,i,d[0],d[1],0,t.pstyle("corner-radius").value==="auto"?"auto":t.pstyle("corner-radius").pfValue,s)}},k5.findEndpoints=function(t){var e,r,n,a,i=this,s,o=t.source()[0],u=t.target()[0],h=o.position(),d=u.position(),f=t.pstyle("target-arrow-shape").value,p=t.pstyle("source-arrow-shape").value,g=t.pstyle("target-distance-from-node").pfValue,m=t.pstyle("source-distance-from-node").pfValue,y=o._private.rscratch,v=u._private.rscratch,b=t.pstyle("curve-style").value,w=t._private.rscratch,x=w.edgeType,T=xp(b,"taxi"),C=x==="self"||x==="compound",S=x==="bezier"||x==="multibezier"||C,E=x!=="bezier",k=x==="straight"||x==="segments",A=x==="segments",I=S||E||k,L=C||T,R=t.pstyle("source-endpoint"),O=L?"outside-to-node":R.value,M=o.pstyle("corner-radius").value==="auto"?"auto":o.pstyle("corner-radius").pfValue,P=t.pstyle("target-endpoint"),z=L?"outside-to-node":P.value,D=u.pstyle("corner-radius").value==="auto"?"auto":u.pstyle("corner-radius").pfValue;w.srcManEndpt=R,w.tgtManEndpt=P;var B,W,U,j,V=(e=(P==null||(r=P.pfValue)===null||r===void 0?void 0:r.length)===2?P.pfValue:null)!==null&&e!==void 0?e:[0,0],Y=(n=(R==null||(a=R.pfValue)===null||a===void 0?void 0:a.length)===2?R.pfValue:null)!==null&&n!==void 0?n:[0,0];if(S){var H=[w.ctrlpts[0],w.ctrlpts[1]],q=E?[w.ctrlpts[w.ctrlpts.length-2],w.ctrlpts[w.ctrlpts.length-1]]:H;B=q,W=H}else if(k){var Z=A?w.segpts.slice(0,2):[d.x+V[0],d.y+V[1]],K=A?w.segpts.slice(w.segpts.length-2):[h.x+Y[0],h.y+Y[1]];B=K,W=Z}if(z==="inside-to-node")s=[d.x,d.y];else if(P.units)s=this.manualEndptToPx(u,P);else if(z==="outside-to-line")s=w.tgtIntn;else if(z==="outside-to-node"||z==="outside-to-node-or-label"?U=B:(z==="outside-to-line"||z==="outside-to-line-or-label")&&(U=[h.x,h.y]),s=i.nodeShapes[this.getNodeShape(u)].intersectLine(d.x,d.y,u.outerWidth(),u.outerHeight(),U[0],U[1],0,D,v),z==="outside-to-node-or-label"||z==="outside-to-line-or-label"){var re=u._private.rscratch,Q=re.labelWidth,te=re.labelHeight,ee=re.labelX,J=re.labelY,ae=Q/2,se=te/2,fe=u.pstyle("text-valign").value;fe=RT(fe),fe==="top"?J-=se:fe==="bottom"&&(J+=se);var ve=u.pstyle("text-halign").value;ve=PT(ve),ve==="left"?ee-=ae:ve==="right"&&(ee+=ae);var de=f5(U[0],U[1],[ee-ae,J-se,ee+ae,J-se,ee+ae,J+se,ee-ae,J+se],d.x,d.y);if(de.length>0){var Ee=h,Ce=Qm(Ee,CT(s)),De=Qm(Ee,CT(de)),ce=Ce;if(De<Ce&&(s=de,ce=De),de.length>2){var Ie=Qm(Ee,{x:de[2],y:de[3]});Ie<ce&&(s=[de[2],de[3]])}}}var ye=VI(s,B,i.arrowShapes[f].spacing(t)+g),pe=VI(s,B,i.arrowShapes[f].gap(t)+g);if(w.endX=pe[0],w.endY=pe[1],w.arrowEndX=ye[0],w.arrowEndY=ye[1],O==="inside-to-node")s=[h.x,h.y];else if(R.units)s=this.manualEndptToPx(o,R);else if(O==="outside-to-line")s=w.srcIntn;else if(O==="outside-to-node"||O==="outside-to-node-or-label"?j=W:(O==="outside-to-line"||O==="outside-to-line-or-label")&&(j=[d.x,d.y]),s=i.nodeShapes[this.getNodeShape(o)].intersectLine(h.x,h.y,o.outerWidth(),o.outerHeight(),j[0],j[1],0,M,y),O==="outside-to-node-or-label"||O==="outside-to-line-or-label"){var Ae=o._private.rscratch,Ve=Ae.labelWidth,ze=Ae.labelHeight,We=Ae.labelX,me=Ae.labelY,Se=Ve/2,ne=ze/2,xe=o.pstyle("text-valign").value;xe=RT(xe),xe==="top"?me-=ne:xe==="bottom"&&(me+=ne);var oe=o.pstyle("text-halign").value;oe=PT(oe),oe==="left"?We-=Se:oe==="right"&&(We+=Se);var _e=f5(j[0],j[1],[We-Se,me-ne,We+Se,me-ne,We+Se,me+ne,We-Se,me+ne],h.x,h.y);if(_e.length>0){var ue=d,tt=Qm(ue,CT(s)),Re=Qm(ue,CT(_e)),et=tt;if(Re<tt&&(s=[_e[0],_e[1]],et=Re),_e.length>2){var Xe=Qm(ue,{x:_e[2],y:_e[3]});Xe<et&&(s=[_e[2],_e[3]])}}}var ot=VI(s,W,i.arrowShapes[p].spacing(t)+m),Ge=VI(s,W,i.arrowShapes[p].gap(t)+m);w.startX=Ge[0],w.startY=Ge[1],w.arrowStartX=ot[0],w.arrowStartY=ot[1],I&&(!mr(w.startX)||!mr(w.startY)||!mr(w.endX)||!mr(w.endY)?w.badLine=!0:w.badLine=!1)},k5.getSourceEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[0],y:e.haystackPts[1]};default:return{x:e.arrowStartX,y:e.arrowStartY}}},k5.getTargetEndpoint=function(t){var e=t[0]._private.rscratch;switch(this.recalculateRenderedStyle(t),e.edgeType){case"haystack":return{x:e.haystackPts[2],y:e.haystackPts[3]};default:return{x:e.arrowEndX,y:e.arrowEndY}}};var sj={};function FYt(t,e,r){for(var n=l(function(h,d,f,p){return Fs(h,d,f,p)},"qbezierAt$1"),a=e._private,i=a.rstyle.bezierPts,s=0;s<t.bezierProjPcts.length;s++){var o=t.bezierProjPcts[s];i.push({x:n(r[0],r[2],r[4],o),y:n(r[1],r[3],r[5],o)})}}l(FYt,"pushBezierPts"),sj.storeEdgeProjections=function(t){var e=t._private,r=e.rscratch,n=r.edgeType;if(e.rstyle.bezierPts=null,e.rstyle.linePts=null,e.rstyle.haystackPts=null,n==="multibezier"||n==="bezier"||n==="self"||n==="compound"){e.rstyle.bezierPts=[];for(var a=0;a+5<r.allpts.length;a+=4)FYt(this,t,r.allpts.slice(a,a+6))}else if(n==="segments")for(var i=e.rstyle.linePts=[],a=0;a+1<r.allpts.length;a+=2)i.push({x:r.allpts[a],y:r.allpts[a+1]});else if(n==="haystack"){var s=r.haystackPts;e.rstyle.haystackPts=[{x:s[0],y:s[1]},{x:s[2],y:s[3]}]}e.rstyle.arrowWidth=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth},sj.recalculateEdgeProjections=function(t){this.findEdgeControlPoints(t)};var sd={};sd.recalculateNodeLabelProjection=function(t){var e=t.pstyle("label").strValue;if(!bp(e)){var r,n,a=t._private,i=t.width(),s=t.height(),o=t.padding(),u=t.position(),h=t.pstyle("text-halign").strValue,d=t.pstyle("text-valign").strValue,f=a.rscratch,p=a.rstyle;switch(h){case"left":r=u.x-i/2-o;break;case"left-inside":r=u.x-i/2+o;break;case"right":r=u.x+i/2+o;break;case"right-inside":r=u.x+i/2-o;break;default:r=u.x}switch(d){case"top":n=u.y-s/2-o;break;case"top-inside":n=u.y-s/2+o;break;case"bottom":n=u.y+s/2+o;break;case"bottom-inside":n=u.y+s/2-o;break;default:n=u.y}f.labelX=r,f.labelY=n,p.labelX=r,p.labelY=n,this.calculateLabelAngles(t),this.applyLabelDimensions(t)}};var F6e=l(function(e,r){var n=Math.atan(r/e);return e===0&&n<0&&(n=n*-1),n},"lineAngleFromDelta"),B6e=l(function(e,r){var n=r.x-e.x,a=r.y-e.y;return F6e(n,a)},"lineAngle"),BYt=l(function(e,r,n,a){var i=h5(0,a-.001,1),s=h5(0,a+.001,1),o=ST(e,r,n,i),u=ST(e,r,n,s);return B6e(o,u)},"bezierAngle");sd.recalculateEdgeLabelProjections=function(t){var e,r=t._private,n=r.rscratch,a=this,i={mid:t.pstyle("label").strValue,source:t.pstyle("source-label").strValue,target:t.pstyle("target-label").strValue};if(i.mid||i.source||i.target){e={x:n.midX,y:n.midY};var s=l(function(f,p,g){rd(r.rscratch,f,p,g),rd(r.rstyle,f,p,g)},"setRs");s("labelX",null,e.x),s("labelY",null,e.y);var o=F6e(n.midDispX,n.midDispY);s("labelAutoAngle",null,o);var u=l(function(){if(u.cache)return u.cache;for(var f=[],p=0;p+5<n.allpts.length;p+=4){var g={x:n.allpts[p],y:n.allpts[p+1]},m={x:n.allpts[p+2],y:n.allpts[p+3]},y={x:n.allpts[p+4],y:n.allpts[p+5]};f.push({p0:g,p1:m,p2:y,startDist:0,length:0,segments:[]})}var v=r.rstyle.bezierPts,b=a.bezierProjPcts.length;function w(E,k,A,I,L){var R=Zm(k,A),O=E.segments[E.segments.length-1],M={p0:k,p1:A,t0:I,t1:L,startDist:O?O.startDist+O.length:0,length:R};E.segments.push(M),E.length+=R}l(w,"addSegment");for(var x=0;x<f.length;x++){var T=f[x],C=f[x-1];C&&(T.startDist=C.startDist+C.length),w(T,T.p0,v[x*b],0,a.bezierProjPcts[0]);for(var S=0;S<b-1;S++)w(T,v[x*b+S],v[x*b+S+1],a.bezierProjPcts[S],a.bezierProjPcts[S+1]);w(T,v[x*b+b-1],T.p2,a.bezierProjPcts[b-1],1)}return u.cache=f},"createControlPointInfo"),h=l(function(f){var p,g=f==="source";if(i[f]){var m=t.pstyle(f+"-text-offset").pfValue;switch(n.edgeType){case"self":case"compound":case"bezier":case"multibezier":{for(var y=u(),v,b=0,w=0,x=0;x<y.length;x++){for(var T=y[g?x:y.length-1-x],C=0;C<T.segments.length;C++){var S=T.segments[g?C:T.segments.length-1-C],E=x===y.length-1&&C===T.segments.length-1;if(b=w,w+=S.length,w>=m||E){v={cp:T,segment:S};break}}if(v)break}var k=v.cp,A=v.segment,I=(m-b)/A.length,L=A.t1-A.t0,R=g?A.t0+L*I:A.t1-L*I;R=h5(0,R,1),e=ST(k.p0,k.p1,k.p2,R),p=BYt(k.p0,k.p1,k.p2,R);break}case"straight":case"segments":case"haystack":{for(var O=0,M,P,z,D,B=n.allpts.length,W=0;W+3<B&&(g?(z={x:n.allpts[W],y:n.allpts[W+1]},D={x:n.allpts[W+2],y:n.allpts[W+3]}):(z={x:n.allpts[B-2-W],y:n.allpts[B-1-W]},D={x:n.allpts[B-4-W],y:n.allpts[B-3-W]}),M=Zm(z,D),P=O,O+=M,!(O>=m));W+=2);var U=m-P,j=U/M;j=h5(0,j,1),e=sVt(z,D,j),p=B6e(z,D);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,p)}},"calculateEndProjection");h("source"),h("target"),this.applyLabelDimensions(t)}},sd.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))},sd.applyPrefixedLabelDimensions=function(t,e){var r=t._private,n=this.getLabelText(t,e),a=Xm(n,t._private.labelDimsKey);if(sl(r.rscratch,"prefixedLabelDimsKey",e)!==a){rd(r.rscratch,"prefixedLabelDimsKey",e,a);var i=this.calculateLabelDimensions(t,n),s=t.pstyle("line-height").pfValue,o=t.pstyle("font-size").pfValue,u=t.pstyle("text-wrap").strValue,h=sl(r.rscratch,"labelWrapCachedLines",e)||[],d=u!=="wrap"?1:Math.max(h.length,1),f=o*s,p=i.width,g=i.height+(d-1)*(s-1)*o;rd(r.rstyle,"labelWidth",e,p),rd(r.rscratch,"labelWidth",e,p),rd(r.rstyle,"labelHeight",e,g),rd(r.rscratch,"labelHeight",e,g),rd(r.rscratch,"labelLineHeight",e,f),rd(r.rscratch,"labelActualDescent",e,i.labelActualDescent)}},sd.getLabelText=function(t,e){var r=t._private,n=e?e+"-":"",a=t.pstyle(n+"label").strValue,i=t.pstyle("text-transform").value,s=l(function(Y,H){return H?(rd(r.rscratch,Y,e,H),H):sl(r.rscratch,Y,e)},"rscratch");if(!a)return"";i=="none"||(i=="uppercase"?a=a.toUpperCase():i=="lowercase"&&(a=a.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var u=s("labelKey");if(u!=null&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var h="",d=a.split(`
|
||
`),f=t.pstyle("text-max-width").pfValue,p=t.pstyle("text-overflow-wrap").value,g=p==="anywhere",m=[],y=/[\s\u200b]+|$/g,v=0;v<d.length;v++){var b=d[v],w=this.calculateLabelDimensions(t,b),x=w.width;if(g){var T=b.split("").join(h);b=T}if(x>f){var C=b.matchAll(y),S="",E=0,k=ql(C),A;try{for(k.s();!(A=k.n()).done;){var I=A.value,L=I[0],R=b.substring(E,I.index);E=I.index+L.length;var O=S.length===0?R:S+R+L,M=this.calculateLabelDimensions(t,O),P=M.width;P<=f?S+=R+L:(S&&m.push(S),S=R+L)}}catch(V){k.e(V)}finally{k.f()}S.match(/^[\s\u200b]+$/)||m.push(S)}else m.push(b)}s("labelWrapCachedLines",m),a=s("labelWrapCachedText",m.join(`
|
||
`)),s("labelWrapKey",u)}else if(o==="ellipsis"){var z=t.pstyle("text-max-width").pfValue,D="",B="…",W=!1;if(this.calculateLabelDimensions(t,a).width<z)return a;for(var U=0;U<a.length;U++){var j=this.calculateLabelDimensions(t,D+a[U]+B).width;if(j>z)break;D+=a[U],U===a.length-1&&(W=!0)}return W||(D+=B),D}return a},sd.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;return e==="auto"?t.isNode()?_qt(r):"center":e},sd.calculateLabelDimensions=function(t,e){var r=this,n=r.cy.window(),a=n.document,i=0,s=t.pstyle("font-style").strValue,o=t.pstyle("font-size").pfValue,u=t.pstyle("font-family").strValue,h=t.pstyle("font-weight").strValue,d=t.pstyle("text-metrics").strValue||"font",f=this.labelCalcCanvas,p=this.labelCalcCanvasContext;if(!f){f=this.labelCalcCanvas=a.createElement("canvas"),p=this.labelCalcCanvasContext=f.getContext("2d");var g=f.style;g.position="absolute",g.left="-9999px",g.top="-9999px",g.zIndex="-1",g.visibility="hidden",g.pointerEvents="none"}p.font="".concat(s," ").concat(h," ").concat(o,"px ").concat(u);for(var m=0,y=0,v=e.split(`
|
||
`),b=v.length,w=0,x=0,T=0;T<b;T++){var C=v[T],S=p.measureText(C),E=Math.ceil(S.width),k=o;d==="glyph"&&(T===0&&(x=S.actualBoundingBoxAscent),T===b-1&&(w=S.actualBoundingBoxDescent)),m=Math.max(E,m),y+=k}return d==="glyph"&&(y-=o-x-w),m+=i,y+=i,{width:m,height:y,labelActualAscent:x,labelActualDescent:w}},sd.calculateLabelAngle=function(t,e){var r=t._private,n=r.rscratch,a=t.isEdge(),i=e?e+"-":"",s=t.pstyle(i+"text-rotation"),o=s.strValue;return o==="none"?0:a&&o==="autorotate"?n.labelAutoAngle:o==="autorotate"?0:s.pfValue},sd.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),n=t._private,a=n.rscratch;a.labelAngle=e.calculateLabelAngle(t),r&&(a.sourceLabelAngle=e.calculateLabelAngle(t,"source"),a.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var z6e={},H6e=28,W6e=!1;z6e.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<H6e||t.height()<H6e))return W6e||(na("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),W6e=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var n=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(n).name}return r};var xL={};xL.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,n=l(function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var u=0;u<s.length;u++){var h=s[u],d=h._private,f=d.rstyle;f.clean=!1,f.cleanConnected=!1}},"enqueue");r.binder(t).on("bounds.* dirty.*",l(function(s){var o=s.target;n(o)},"onDirtyBounds")).on("style.* background.*",l(function(s){var o=s.target;n(o,!1)},"onDirtyStyle"));var a=l(function(s){if(s){var o=r.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var h=e[u],d=h._private.rstyle;h.isNode()&&!d.cleanConnected&&(n(h.connectedEdges()),d.cleanConnected=!0)}if(o)for(var f=0;f<o.length;f++){var p=o[f];p(s,e)}r.recalculateRenderedStyle(e),e=t.collection()}},"updateEleCalcs");r.flushRenderedStyleQueue=function(){a(!0)},r.beforeRender(a,r.beforeRenderPriorities.eleCalcs)},xL.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)},xL.recalculateRenderedStyle=function(t,e){var r=l(function(T){return T._private.rstyle.cleanConnected},"isCleanConnected");if(t.length!==0){var n=[],a=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<t.length;i++){var s=t[i],o=s._private,u=o.rstyle;s.isEdge()&&(!r(s.source())||!r(s.target()))&&(u.clean=!1),s.isEdge()&&s.isBundledBezier()&&s.parallelEdges().some(function(x){return!x._private.rstyle.clean&&x.isBundledBezier()})&&(u.clean=!1),!(e&&u.clean||s.removed())&&s.pstyle("display").value!=="none"&&(o.group==="nodes"?a.push(s):n.push(s),u.clean=!0)}for(var h=0;h<a.length;h++){var d=a[h],f=d._private,p=f.rstyle,g=d.position();this.recalculateNodeLabelProjection(d),p.nodeX=g.x,p.nodeY=g.y,p.nodeW=d.pstyle("width").pfValue,p.nodeH=d.pstyle("height").pfValue}this.recalculateEdgeProjections(n);for(var m=0;m<n.length;m++){var y=n[m],v=y._private,b=v.rstyle,w=v.rscratch;b.srcX=w.arrowStartX,b.srcY=w.arrowStartY,b.tgtX=w.arrowEndX,b.tgtY=w.arrowEndY,b.midX=w.midX,b.midY=w.midY,b.labelAngle=w.labelAngle,b.sourceLabelAngle=w.sourceLabelAngle,b.targetLabelAngle=w.targetLabelAngle}}}};var wL={};wL.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var n=t[r],a=n._private.rscratch;n.grabbed()&&!n.isParent()?e.push(n):a.inDragLayer?t.drag.push(n):t.nondrag.push(n)}for(var r=0;r<e.length;r++){var n=e[r];t.drag.push(n)}}},wL.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},wL.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(r6e),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var V6e={};[r1,yL,zo,k5,sj,sd,z6e,xL,wL].forEach(function(t){zr(V6e,t)});var G6e={};G6e.getCachedImage=function(t,e,r){var n=this,a=n.imageCache=n.imageCache||{},i=a[t];if(i)return i.image.complete||i.image.addEventListener("load",r),i.image;i=a[t]=a[t]||{};var s=i.image=new Image;s.addEventListener("load",r),s.addEventListener("error",function(){s.error=!0});var o="data:",u=t.substring(0,o.length).toLowerCase()===o;return u||(e=e==="null"?null:e,s.crossOrigin=e),s.src=t,s};var q6e=l(function(e,r){var n=e[0];!n||n._private.grabbed===r||(n._private.grabbed=r,e.updateStyle(!1))},"setGrabState"),zYt=l(function(e){q6e(e,!0)},"setGrabbed"),HYt=l(function(e){q6e(e,!1)},"setFreed"),WT={};WT.registerBinding=function(t,e,r,n){var a=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var i=[],s=0;s<t.length;s++){var o=t[s];if(o!==void 0){var u=this.binder(o);i.push(u.on.apply(u,a))}}return i}var u=this.binder(t);return u.on.apply(u,a)},WT.binder=function(t){var e=this,r=e.cy.window(),n=t===r||t===r.document||t===r.document.body||XHt(t);if(e.supportsPassiveEvents==null){var a=!1;try{var i=Object.defineProperty({},"passive",{get:l(function(){return a=!0,!0},"get")});r.addEventListener("test",null,i)}catch(o){}e.supportsPassiveEvents=a}var s=l(function(u,h,d){var f=Array.prototype.slice.call(arguments);return n&&e.supportsPassiveEvents&&(f[2]={capture:d!=null?d:!1,passive:!1,once:!1}),e.bindings.push({target:t,args:f}),(t.addEventListener||t.on).apply(t,f),this},"on");return{on:s,addEventListener:s,addListener:s,bind:s}},WT.nodeIsDraggable=function(t){return t&&t.isNode()&&!t.locked()&&t.grabbable()},WT.nodeIsGrabbable=function(t){return this.nodeIsDraggable(t)&&t.interactive()},WT.load=function(){var t=this,e=t.cy.window(),r=l(function(ne){return ne.selected()},"isSelected"),n=l(function(ne){var xe=ne.getRootNode();if(xe&&xe.nodeType===11&&xe.host!==void 0)return xe},"getShadowRoot"),a=l(function(ne,xe,oe,_e){ne==null&&(ne=t.cy);for(var ue=0;ue<xe.length;ue++){var tt=xe[ue];ne.emit({originalEvent:oe,type:tt,position:_e})}},"triggerEvents"),i=l(function(ne){return ne.shiftKey||ne.metaKey||ne.ctrlKey},"isMultSelKeyDown"),s=l(function(ne,xe){var oe=!0;if(t.cy.hasCompoundNodes()&&ne&&ne.pannable())for(var _e=0;xe&&_e<xe.length;_e++){var ne=xe[_e];if(ne.isNode()&&ne.isParent()&&!ne.pannable()){oe=!1;break}}else oe=!0;return oe},"allowPanningPassthrough"),o=l(function(ne){ne[0]._private.rscratch.inDragLayer=!0},"setInDragLayer"),u=l(function(ne){ne[0]._private.rscratch.inDragLayer=!1},"setOutDragLayer"),h=l(function(ne){ne[0]._private.rscratch.isGrabTarget=!0},"setGrabTarget"),d=l(function(ne){ne[0]._private.rscratch.isGrabTarget=!1},"removeGrabTarget"),f=l(function(ne,xe){var oe=xe.addToList,_e=oe.has(ne);!_e&&ne.grabbable()&&!ne.locked()&&(oe.merge(ne),zYt(ne))},"addToDragList"),p=l(function(ne,xe){if(ne.cy().hasCompoundNodes()&&!(xe.inDragLayer==null&&xe.addToList==null)){var oe=ne.descendants();xe.inDragLayer&&(oe.forEach(o),oe.connectedEdges().forEach(o)),xe.addToList&&f(oe,xe)}},"addDescendantsToDrag"),g=l(function(ne,xe){xe=xe||{};var oe=ne.cy().hasCompoundNodes();xe.inDragLayer&&(ne.forEach(o),ne.neighborhood().stdFilter(function(_e){return!oe||_e.isEdge()}).forEach(o)),xe.addToList&&ne.forEach(function(_e){f(_e,xe)}),p(ne,xe),v(ne,{inDragLayer:xe.inDragLayer}),t.updateCachedGrabbedEles()},"addNodesToDrag"),m=g,y=l(function(ne){ne&&(t.getCachedZSortedEles().forEach(function(xe){HYt(xe),u(xe),d(xe)}),t.updateCachedGrabbedEles())},"freeDraggedElements"),v=l(function(ne,xe){if(!(xe.inDragLayer==null&&xe.addToList==null)&&ne.cy().hasCompoundNodes()){var oe=ne.ancestors().orphans();if(!oe.same(ne)){var _e=oe.descendants().spawnSelf().merge(oe).unmerge(ne).unmerge(ne.descendants()),ue=_e.connectedEdges();xe.inDragLayer&&(ue.forEach(o),_e.forEach(o)),xe.addToList&&_e.forEach(function(tt){f(tt,xe)})}}},"updateAncestorsInDragLayer"),b=l(function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},"blurActiveDomElement"),w=typeof MutationObserver!="undefined",x=typeof ResizeObserver!="undefined";w?(t.removeObserver=new MutationObserver(function(Se){for(var ne=0;ne<Se.length;ne++){var xe=Se[ne],oe=xe.removedNodes;if(oe)for(var _e=0;_e<oe.length;_e++){var ue=oe[_e];if(ue===t.container){t.destroy();break}}}}),t.container.parentNode&&t.removeObserver.observe(t.container.parentNode,{childList:!0})):t.registerBinding(t.container,"DOMNodeRemoved",function(Se){t.destroy()});var T=s5(function(){t.cy.resize()},100);w&&(t.styleObserver=new MutationObserver(T),t.styleObserver.observe(t.container,{attributes:!0})),t.registerBinding(e,"resize",T),x&&(t.resizeObserver=new ResizeObserver(T),t.resizeObserver.observe(t.container));var C=l(function(ne,xe){for(;ne!=null;)xe(ne),ne=ne.parentNode},"forEachUp"),S=l(function(){t.invalidateContainerClientCoordsCache()},"invalidateCoords");C(t.container,function(Se){t.registerBinding(Se,"transitionend",S),t.registerBinding(Se,"animationend",S),t.registerBinding(Se,"scroll",S)}),t.registerBinding(t.container,"contextmenu",function(Se){Se.preventDefault()});var E=l(function(){return t.selection[4]!==0},"inBoxSelection"),k=l(function(ne){for(var xe=t.findContainerClientCoords(),oe=xe[0],_e=xe[1],ue=xe[2],tt=xe[3],Re=ne.touches?ne.touches:[ne],et=!1,Xe=0;Xe<Re.length;Xe++){var ot=Re[Xe];if(oe<=ot.clientX&&ot.clientX<=oe+ue&&_e<=ot.clientY&&ot.clientY<=_e+tt){et=!0;break}}if(!et)return!1;for(var Ge=t.container,ht=ne.target,Je=ht.parentNode,St=!1;Je;){if(Je===Ge){St=!0;break}Je=Je.parentNode}return!!St},"eventInContainer");t.registerBinding(t.container,"mousedown",l(function(ne){if(k(ne)&&!(t.hoverData.which===1&&ne.which!==1)){ne.preventDefault(),b(),t.hoverData.capture=!0,t.hoverData.which=ne.which;var xe=t.cy,oe=[ne.clientX,ne.clientY],_e=t.projectIntoViewport(oe[0],oe[1]),ue=t.selection,tt=t.findNearestElements(_e[0],_e[1],!0,!1),Re=tt[0],et=t.dragData.possibleDragElements;t.hoverData.mdownPos=_e,t.hoverData.mdownGPos=oe;var Xe=l(function(He){return{originalEvent:ne,type:He,position:{x:_e[0],y:_e[1]}}},"makeEvent"),ot=l(function(){t.hoverData.tapholdCancelled=!1,clearTimeout(t.hoverData.tapholdTimeout),t.hoverData.tapholdTimeout=setTimeout(function(){if(!t.hoverData.tapholdCancelled){var He=t.hoverData.down;He?He.emit(Xe("taphold")):xe.emit(Xe("taphold"))}},t.tapholdDuration)},"checkForTaphold");if(ne.which==3){t.hoverData.cxtStarted=!0;var Ge={originalEvent:ne,type:"cxttapstart",position:{x:_e[0],y:_e[1]}};Re?(Re.activate(),Re.emit(Ge),t.hoverData.down=Re):xe.emit(Ge),t.hoverData.downTime=new Date().getTime(),t.hoverData.cxtDragged=!1}else if(ne.which==1){Re&&Re.activate();{if(Re!=null&&t.nodeIsGrabbable(Re)){var ht=l(function(He){He.emit(Xe("grab"))},"triggerGrab");if(h(Re),!Re.selected())et=t.dragData.possibleDragElements=xe.collection(),m(Re,{addToList:et}),Re.emit(Xe("grabon")).emit(Xe("grab"));else{et=t.dragData.possibleDragElements=xe.collection();var Je=xe.$(function(St){return St.isNode()&&St.selected()&&t.nodeIsGrabbable(St)});g(Je,{addToList:et}),Re.emit(Xe("grabon")),Je.forEach(ht)}t.redrawHint("eles",!0),t.redrawHint("drag",!0)}t.hoverData.down=Re,t.hoverData.downs=tt,t.hoverData.downTime=new Date().getTime()}a(Re,["mousedown","tapstart","vmousedown"],ne,{x:_e[0],y:_e[1]}),Re==null?(ue[4]=1,t.data.bgActivePosistion={x:_e[0],y:_e[1]},t.redrawHint("select",!0),t.redraw()):Re.pannable()&&(ue[4]=1),ot()}ue[0]=ue[2]=_e[0],ue[1]=ue[3]=_e[1]}},"mousedownHandler"),!1);var A=n(t.container);t.registerBinding([e,A],"mousemove",l(function(ne){var xe=t.hoverData.capture;if(!(!xe&&!k(ne))){var oe=!1,_e=t.cy,ue=_e.zoom(),tt=[ne.clientX,ne.clientY],Re=t.projectIntoViewport(tt[0],tt[1]),et=t.hoverData.mdownPos,Xe=t.hoverData.mdownGPos,ot=t.selection,Ge=null;!t.hoverData.draggingEles&&!t.hoverData.dragging&&!t.hoverData.selecting&&(Ge=t.findNearestElement(Re[0],Re[1],!0,!1));var ht=t.hoverData.last,Je=t.hoverData.down,St=[Re[0]-ot[2],Re[1]-ot[3]],He=t.dragData.possibleDragElements,dt;if(Xe){var Oe=tt[0]-Xe[0],vt=Oe*Oe,qe=tt[1]-Xe[1],Me=qe*qe,lt=vt+Me;t.hoverData.isOverThresholdDrag=dt=lt>=t.desktopTapThreshold2}var it=i(ne);dt&&(t.hoverData.tapholdCancelled=!0);var Ue=l(function(){var Qe=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Qe.length===0?(Qe.push(St[0]),Qe.push(St[1])):(Qe[0]+=St[0],Qe[1]+=St[1])},"updateDragDelta");oe=!0,a(Ge,["mousemove","vmousemove","tapdrag"],ne,{x:Re[0],y:Re[1]});var we=l(function(Qe){return{originalEvent:ne,type:Qe,position:{x:Re[0],y:Re[1]}}},"makeEvent"),gt=l(function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||_e.emit(we("boxstart")),ot[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()},"goIntoBoxMode");if(t.hoverData.which===3){if(dt){var ge=we("cxtdrag");Je?Je.emit(ge):_e.emit(ge),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||Ge!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit(we("cxtdragout")),t.hoverData.cxtOver=Ge,Ge&&Ge.emit(we("cxtdragover")))}}else if(t.hoverData.dragging){if(oe=!0,_e.panningEnabled()&&_e.userPanningEnabled()){var ie;if(t.hoverData.justStartedPan){var be=t.hoverData.mdownPos;ie={x:(Re[0]-be[0])*ue,y:(Re[1]-be[1])*ue},t.hoverData.justStartedPan=!1}else ie={x:St[0]*ue,y:St[1]*ue};_e.panBy(ie),_e.emit(we("dragpan")),t.hoverData.dragged=!0}Re=t.projectIntoViewport(ne.clientX,ne.clientY)}else if(ot[4]==1&&(Je==null||Je.pannable())){if(dt){if(!t.hoverData.dragging&&_e.boxSelectionEnabled()&&(it||!_e.panningEnabled()||!_e.userPanningEnabled()))gt();else if(!t.hoverData.selecting&&_e.panningEnabled()&&_e.userPanningEnabled()){var $e=s(Je,t.hoverData.downs);$e&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,ot[4]=0,t.data.bgActivePosistion=CT(et),t.redrawHint("select",!0),t.redraw())}Je&&Je.pannable()&&Je.active()&&Je.unactivate()}}else{if(Je&&Je.pannable()&&Je.active()&&Je.unactivate(),(!Je||!Je.grabbed())&&Ge!=ht&&(ht&&a(ht,["mouseout","tapdragout"],ne,{x:Re[0],y:Re[1]}),Ge&&a(Ge,["mouseover","tapdragover"],ne,{x:Re[0],y:Re[1]}),t.hoverData.last=Ge),Je)if(dt){if(_e.boxSelectionEnabled()&&it)Je&&Je.grabbed()&&(y(He),Je.emit(we("freeon")),He.emit(we("free")),t.dragData.didDrag&&(Je.emit(we("dragfreeon")),He.emit(we("dragfree")))),gt();else if(Je&&Je.grabbed()&&t.nodeIsDraggable(Je)){var le=!t.dragData.didDrag;le&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||g(He,{inDragLayer:!0});var ke={x:0,y:0};if(mr(St[0])&&mr(St[1])&&(ke.x+=St[0],ke.y+=St[1],le)){var je=t.hoverData.dragDelta;je&&mr(je[0])&&mr(je[1])&&(ke.x+=je[0],ke.y+=je[1])}t.hoverData.draggingEles=!0,He.silentShift(ke).emit(we("position")).emit(we("drag")),t.redrawHint("drag",!0),t.redraw()}}else Ue();oe=!0}if(ot[2]=Re[0],ot[3]=Re[1],oe)return ne.stopPropagation&&ne.stopPropagation(),ne.preventDefault&&ne.preventDefault(),!1}},"mousemoveHandler"),!1);var I,L,R;t.registerBinding(e,"mouseup",l(function(ne){if(!(t.hoverData.which===1&&ne.which!==1&&t.hoverData.capture)){var xe=t.hoverData.capture;if(xe){t.hoverData.capture=!1;var oe=t.cy,_e=t.projectIntoViewport(ne.clientX,ne.clientY),ue=t.selection,tt=t.findNearestElement(_e[0],_e[1],!0,!1),Re=t.dragData.possibleDragElements,et=t.hoverData.down,Xe=i(ne);t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,et&&et.unactivate();var ot=l(function(Oe){return{originalEvent:ne,type:Oe,position:{x:_e[0],y:_e[1]}}},"makeEvent");if(t.hoverData.which===3){var Ge=ot("cxttapend");if(et?et.emit(Ge):oe.emit(Ge),!t.hoverData.cxtDragged){var ht=ot("cxttap");et?et.emit(ht):oe.emit(ht)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(a(tt,["mouseup","tapend","vmouseup"],ne,{x:_e[0],y:_e[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(a(et,["click","tap","vclick"],ne,{x:_e[0],y:_e[1]}),L=!1,ne.timeStamp-R<=oe.multiClickDebounceTime()?(I&&clearTimeout(I),L=!0,R=null,a(et,["dblclick","dbltap","vdblclick"],ne,{x:_e[0],y:_e[1]})):(I=setTimeout(function(){L||a(et,["oneclick","onetap","voneclick"],ne,{x:_e[0],y:_e[1]})},oe.multiClickDebounceTime()),R=ne.timeStamp)),et==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!i(ne)&&(oe.$(r).unselect(["tapunselect"]),Re.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=Re=oe.collection()),tt==et&&!t.dragData.didDrag&&!t.hoverData.selecting&&tt!=null&&tt._private.selectable&&(t.hoverData.dragging||(oe.selectionType()==="additive"||Xe?tt.selected()?tt.unselect(["tapunselect"]):tt.select(["tapselect"]):Xe||(oe.$(r).unmerge(tt).unselect(["tapunselect"]),tt.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var Je=oe.collection(t.getAllInBox(ue[0],ue[1],ue[2],ue[3]));t.redrawHint("select",!0),Je.length>0&&t.redrawHint("eles",!0),oe.emit(ot("boxend"));var St=l(function(Oe){return Oe.selectable()&&!Oe.selected()},"eleWouldBeSelected");oe.selectionType()==="additive"||Xe||oe.$(r).unmerge(Je).unselect(),Je.emit(ot("box")).stdFilter(St).select().emit(ot("boxselect")),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!ue[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var He=et&&et.grabbed();y(Re),He&&(et.emit(ot("freeon")),Re.emit(ot("free")),t.dragData.didDrag&&(et.emit(ot("dragfreeon")),Re.emit(ot("dragfree"))))}}ue[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},"mouseupHandler"),!1);var O=[],M=4,P,z=1e5,D=l(function(ne,xe){for(var oe=0;oe<ne.length;oe++)if(ne[oe]%xe!==0)return!1;return!0},"allAreDivisibleBy"),B=l(function(ne){for(var xe=Math.abs(ne[0]),oe=1;oe<ne.length;oe++)if(Math.abs(ne[oe])!==xe)return!1;return!0},"allAreSameMagnitude"),W=l(function(ne){var xe=!1,oe=ne.deltaY;if(oe==null&&(ne.wheelDeltaY!=null?oe=ne.wheelDeltaY/4:ne.wheelDelta!=null&&(oe=ne.wheelDelta/4)),oe!==0){if(P==null)if(O.length>=M){var _e=O;if(P=D(_e,5),!P){var ue=Math.abs(_e[0]);P=B(_e)&&ue>5}if(P)for(var tt=0;tt<_e.length;tt++)z=Math.min(Math.abs(_e[tt]),z)}else O.push(oe),xe=!0;else P&&(z=Math.min(Math.abs(oe),z));if(!t.scrollingPage){var Re=t.cy,et=Re.zoom(),Xe=Re.pan(),ot=t.projectIntoViewport(ne.clientX,ne.clientY),Ge=[ot[0]*et+Xe.x,ot[1]*et+Xe.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||E()){ne.preventDefault();return}if(Re.panningEnabled()&&Re.userPanningEnabled()&&Re.zoomingEnabled()&&Re.userZoomingEnabled()){ne.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var ht;xe&&Math.abs(oe)>5&&(oe=AY(oe)*5),ht=oe/-250,P&&(ht/=z,ht*=3),ht=ht*t.wheelSensitivity;var Je=ne.deltaMode===1;Je&&(ht*=33);var St=Re.zoom()*Math.pow(10,ht);ne.type==="gesturechange"&&(St=t.gestureStartZoom*ne.scale),Re.zoom({level:St,renderedPosition:{x:Ge[0],y:Ge[1]}}),Re.emit({type:ne.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:ne,position:{x:ot[0],y:ot[1]}})}}}},"wheelHandler");t.registerBinding(t.container,"wheel",W,!0),t.registerBinding(e,"scroll",l(function(ne){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},"scrollHandler"),!0),t.registerBinding(t.container,"gesturestart",l(function(ne){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||ne.preventDefault()},"gestureStartHandler"),!0),t.registerBinding(t.container,"gesturechange",function(Se){t.hasTouchStarted||W(Se)},!0),t.registerBinding(t.container,"mouseout",l(function(ne){var xe=t.projectIntoViewport(ne.clientX,ne.clientY);t.cy.emit({originalEvent:ne,type:"mouseout",position:{x:xe[0],y:xe[1]}})},"mouseOutHandler"),!1),t.registerBinding(t.container,"mouseover",l(function(ne){var xe=t.projectIntoViewport(ne.clientX,ne.clientY);t.cy.emit({originalEvent:ne,type:"mouseover",position:{x:xe[0],y:xe[1]}})},"mouseOverHandler"),!1);var U,j,V,Y,H,q,Z,K,re,Q,te,ee,J,ae=l(function(ne,xe,oe,_e){return Math.sqrt((oe-ne)*(oe-ne)+(_e-xe)*(_e-xe))},"distance"),se=l(function(ne,xe,oe,_e){return(oe-ne)*(oe-ne)+(_e-xe)*(_e-xe)},"distanceSq"),fe;t.registerBinding(t.container,"touchstart",fe=l(function(ne){if(t.hasTouchStarted=!0,!!k(ne)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var xe=t.cy,oe=t.touchData.now,_e=t.touchData.earlier;if(ne.touches[0]){var ue=t.projectIntoViewport(ne.touches[0].clientX,ne.touches[0].clientY);oe[0]=ue[0],oe[1]=ue[1]}if(ne.touches[1]){var ue=t.projectIntoViewport(ne.touches[1].clientX,ne.touches[1].clientY);oe[2]=ue[0],oe[3]=ue[1]}if(ne.touches[2]){var ue=t.projectIntoViewport(ne.touches[2].clientX,ne.touches[2].clientY);oe[4]=ue[0],oe[5]=ue[1]}var tt=l(function(it){return{originalEvent:ne,type:it,position:{x:oe[0],y:oe[1]}}},"makeEvent");if(ne.touches[1]){t.touchData.singleTouchMoved=!0,y(t.dragData.touchDragEles);var Re=t.findContainerClientCoords();re=Re[0],Q=Re[1],te=Re[2],ee=Re[3],U=ne.touches[0].clientX-re,j=ne.touches[0].clientY-Q,V=ne.touches[1].clientX-re,Y=ne.touches[1].clientY-Q,J=0<=U&&U<=te&&0<=V&&V<=te&&0<=j&&j<=ee&&0<=Y&&Y<=ee;var et=xe.pan(),Xe=xe.zoom();H=ae(U,j,V,Y),q=se(U,j,V,Y),Z=[(U+V)/2,(j+Y)/2],K=[(Z[0]-et.x)/Xe,(Z[1]-et.y)/Xe];var ot=200,Ge=ot*ot;if(q<Ge&&!ne.touches[2]){var ht=t.findNearestElement(oe[0],oe[1],!0,!0),Je=t.findNearestElement(oe[2],oe[3],!0,!0);ht&&ht.isNode()?(ht.activate().emit(tt("cxttapstart")),t.touchData.start=ht):Je&&Je.isNode()?(Je.activate().emit(tt("cxttapstart")),t.touchData.start=Je):xe.emit(tt("cxttapstart")),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!0,t.touchData.cxtDragged=!1,t.data.bgActivePosistion=void 0,t.redraw();return}}if(ne.touches[2])xe.boxSelectionEnabled()&&ne.preventDefault();else if(!ne.touches[1]){if(ne.touches[0]){var St=t.findNearestElements(oe[0],oe[1],!0,!0),He=St[0];if(He!=null&&(He.activate(),t.touchData.start=He,t.touchData.starts=St,t.nodeIsGrabbable(He))){var dt=t.dragData.touchDragEles=xe.collection(),Oe=null;t.redrawHint("eles",!0),t.redrawHint("drag",!0),He.selected()?(Oe=xe.$(function(lt){return lt.selected()&&t.nodeIsGrabbable(lt)}),g(Oe,{addToList:dt})):m(He,{addToList:dt}),h(He),He.emit(tt("grabon")),Oe?Oe.forEach(function(lt){lt.emit(tt("grab"))}):He.emit(tt("grab"))}a(He,["touchstart","tapstart","vmousedown"],ne,{x:oe[0],y:oe[1]}),He==null&&(t.data.bgActivePosistion={x:ue[0],y:ue[1]},t.redrawHint("select",!0),t.redraw()),t.touchData.singleTouchMoved=!1,t.touchData.singleTouchStartTime=+new Date,clearTimeout(t.touchData.tapholdTimeout),t.touchData.tapholdTimeout=setTimeout(function(){t.touchData.singleTouchMoved===!1&&!t.pinching&&!t.touchData.selecting&&a(t.touchData.start,["taphold"],ne,{x:oe[0],y:oe[1]})},t.tapholdDuration)}}if(ne.touches.length>=1){for(var vt=t.touchData.startPosition=[null,null,null,null,null,null],qe=0;qe<oe.length;qe++)vt[qe]=_e[qe]=oe[qe];var Me=ne.touches[0];t.touchData.startGPosition=[Me.clientX,Me.clientY]}}},"touchstartHandler"),!1);var ve;t.registerBinding(e,"touchmove",ve=l(function(ne){var xe=t.touchData.capture;if(!(!xe&&!k(ne))){var oe=t.selection,_e=t.cy,ue=t.touchData.now,tt=t.touchData.earlier,Re=_e.zoom();if(ne.touches[0]){var et=t.projectIntoViewport(ne.touches[0].clientX,ne.touches[0].clientY);ue[0]=et[0],ue[1]=et[1]}if(ne.touches[1]){var et=t.projectIntoViewport(ne.touches[1].clientX,ne.touches[1].clientY);ue[2]=et[0],ue[3]=et[1]}if(ne.touches[2]){var et=t.projectIntoViewport(ne.touches[2].clientX,ne.touches[2].clientY);ue[4]=et[0],ue[5]=et[1]}var Xe=l(function(vr){return{originalEvent:ne,type:vr,position:{x:ue[0],y:ue[1]}}},"makeEvent"),ot=t.touchData.startGPosition,Ge;if(xe&&ne.touches[0]&&ot){for(var ht=[],Je=0;Je<ue.length;Je++)ht[Je]=ue[Je]-tt[Je];var St=ne.touches[0].clientX-ot[0],He=St*St,dt=ne.touches[0].clientY-ot[1],Oe=dt*dt,vt=He+Oe;Ge=vt>=t.touchTapThreshold2}if(xe&&t.touchData.cxt){ne.preventDefault();var qe=ne.touches[0].clientX-re,Me=ne.touches[0].clientY-Q,lt=ne.touches[1].clientX-re,it=ne.touches[1].clientY-Q,Ue=se(qe,Me,lt,it),we=Ue/q,gt=150,ge=gt*gt,ie=1.5,be=ie*ie;if(we>=be||Ue>=ge){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var $e=Xe("cxttapend");t.touchData.start?(t.touchData.start.unactivate().emit($e),t.touchData.start=null):_e.emit($e)}}if(xe&&t.touchData.cxt){var $e=Xe("cxtdrag");t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit($e):_e.emit($e),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var le=t.findNearestElement(ue[0],ue[1],!0,!0);(!t.touchData.cxtOver||le!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit(Xe("cxtdragout")),t.touchData.cxtOver=le,le&&le.emit(Xe("cxtdragover")))}else if(xe&&ne.touches[2]&&_e.boxSelectionEnabled())ne.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||_e.emit(Xe("boxstart")),t.touchData.selecting=!0,t.touchData.didSelect=!0,oe[4]=1,!oe||oe.length===0||oe[0]===void 0?(oe[0]=(ue[0]+ue[2]+ue[4])/3,oe[1]=(ue[1]+ue[3]+ue[5])/3,oe[2]=(ue[0]+ue[2]+ue[4])/3+1,oe[3]=(ue[1]+ue[3]+ue[5])/3+1):(oe[2]=(ue[0]+ue[2]+ue[4])/3,oe[3]=(ue[1]+ue[3]+ue[5])/3),t.redrawHint("select",!0),t.redraw();else if(xe&&ne.touches[1]&&!t.touchData.didSelect&&_e.zoomingEnabled()&&_e.panningEnabled()&&_e.userZoomingEnabled()&&_e.userPanningEnabled()){ne.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ke=t.dragData.touchDragEles;if(ke){t.redrawHint("drag",!0);for(var je=0;je<ke.length;je++){var ut=ke[je]._private;ut.grabbed=!1,ut.rscratch.inDragLayer=!1}}var Qe=t.touchData.start,qe=ne.touches[0].clientX-re,Me=ne.touches[0].clientY-Q,lt=ne.touches[1].clientX-re,it=ne.touches[1].clientY-Q,Ze=ae(qe,Me,lt,it),st=Ze/H;if(J){var Ct=qe-U,Mt=Me-j,Bt=lt-V,Pt=it-Y,Pe=(Ct+Bt)/2,at=(Mt+Pt)/2,yt=_e.zoom(),Tt=yt*st,Nt=_e.pan(),zt=K[0]*yt+Nt.x,Jt=K[1]*yt+Nt.y,Ht={x:-Tt/yt*(zt-Nt.x-Pe)+zt,y:-Tt/yt*(Jt-Nt.y-at)+Jt};if(Qe&&Qe.active()){var ke=t.dragData.touchDragEles;y(ke),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Qe.unactivate().emit(Xe("freeon")),ke.emit(Xe("free")),t.dragData.didDrag&&(Qe.emit(Xe("dragfreeon")),ke.emit(Xe("dragfree")))}_e.viewport({zoom:Tt,pan:Ht,cancelOnFailedZoom:!0}),_e.emit(Xe("pinchzoom")),H=Ze,U=qe,j=Me,V=lt,Y=it,t.pinching=!0}if(ne.touches[0]){var et=t.projectIntoViewport(ne.touches[0].clientX,ne.touches[0].clientY);ue[0]=et[0],ue[1]=et[1]}if(ne.touches[1]){var et=t.projectIntoViewport(ne.touches[1].clientX,ne.touches[1].clientY);ue[2]=et[0],ue[3]=et[1]}if(ne.touches[2]){var et=t.projectIntoViewport(ne.touches[2].clientX,ne.touches[2].clientY);ue[4]=et[0],ue[5]=et[1]}}else if(ne.touches[0]&&!t.touchData.didSelect){var wt=t.touchData.start,_t=t.touchData.last,le;if(!t.hoverData.draggingEles&&!t.swipePanning&&(le=t.findNearestElement(ue[0],ue[1],!0,!0)),xe&&wt!=null&&ne.preventDefault(),xe&&wt!=null&&t.nodeIsDraggable(wt))if(Ge){var ke=t.dragData.touchDragEles,Ot=!t.dragData.didDrag;Ot&&g(ke,{inDragLayer:!0}),t.dragData.didDrag=!0;var er={x:0,y:0};if(mr(ht[0])&&mr(ht[1])&&(er.x+=ht[0],er.y+=ht[1],Ot)){t.redrawHint("eles",!0);var Ye=t.touchData.dragDelta;Ye&&mr(Ye[0])&&mr(Ye[1])&&(er.x+=Ye[0],er.y+=Ye[1])}t.hoverData.draggingEles=!0,ke.silentShift(er).emit(Xe("position")).emit(Xe("drag")),t.redrawHint("drag",!0),t.touchData.startPosition[0]==tt[0]&&t.touchData.startPosition[1]==tt[1]&&t.redrawHint("eles",!0),t.redraw()}else{var Ye=t.touchData.dragDelta=t.touchData.dragDelta||[];Ye.length===0?(Ye.push(ht[0]),Ye.push(ht[1])):(Ye[0]+=ht[0],Ye[1]+=ht[1])}if(a(wt||le,["touchmove","tapdrag","vmousemove"],ne,{x:ue[0],y:ue[1]}),(!wt||!wt.grabbed())&&le!=_t&&(_t&&_t.emit(Xe("tapdragout")),le&&le.emit(Xe("tapdragover"))),t.touchData.last=le,xe)for(var je=0;je<ue.length;je++)ue[je]&&t.touchData.startPosition[je]&&Ge&&(t.touchData.singleTouchMoved=!0);if(xe&&(wt==null||wt.pannable())&&_e.panningEnabled()&&_e.userPanningEnabled()){var Ut=s(wt,t.touchData.starts);Ut&&(ne.preventDefault(),t.data.bgActivePosistion||(t.data.bgActivePosistion=CT(t.touchData.startPosition)),t.swipePanning?(_e.panBy({x:ht[0]*Re,y:ht[1]*Re}),_e.emit(Xe("dragpan"))):Ge&&(t.swipePanning=!0,_e.panBy({x:St*Re,y:dt*Re}),_e.emit(Xe("dragpan")),wt&&(wt.unactivate(),t.redrawHint("select",!0),t.touchData.start=null)));var et=t.projectIntoViewport(ne.touches[0].clientX,ne.touches[0].clientY);ue[0]=et[0],ue[1]=et[1]}}for(var Je=0;Je<ue.length;Je++)tt[Je]=ue[Je];xe&&ne.touches.length>0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},"touchmoveHandler"),!1);var de;t.registerBinding(e,"touchcancel",de=l(function(ne){var xe=t.touchData.start;t.touchData.capture=!1,xe&&xe.unactivate()},"touchcancelHandler"));var Ee,Ce,De,ce;if(t.registerBinding(e,"touchend",Ee=l(function(ne){var xe=t.touchData.start,oe=t.touchData.capture;if(oe)ne.touches.length===0&&(t.touchData.capture=!1),ne.preventDefault();else return;var _e=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var ue=t.cy,tt=ue.zoom(),Re=t.touchData.now,et=t.touchData.earlier;if(ne.touches[0]){var Xe=t.projectIntoViewport(ne.touches[0].clientX,ne.touches[0].clientY);Re[0]=Xe[0],Re[1]=Xe[1]}if(ne.touches[1]){var Xe=t.projectIntoViewport(ne.touches[1].clientX,ne.touches[1].clientY);Re[2]=Xe[0],Re[3]=Xe[1]}if(ne.touches[2]){var Xe=t.projectIntoViewport(ne.touches[2].clientX,ne.touches[2].clientY);Re[4]=Xe[0],Re[5]=Xe[1]}var ot=l(function(ge){return{originalEvent:ne,type:ge,position:{x:Re[0],y:Re[1]}}},"makeEvent");xe&&xe.unactivate();var Ge;if(t.touchData.cxt){if(Ge=ot("cxttapend"),xe?xe.emit(Ge):ue.emit(Ge),!t.touchData.cxtDragged){var ht=ot("cxttap");xe?xe.emit(ht):ue.emit(ht)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!ne.touches[2]&&ue.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var Je=ue.collection(t.getAllInBox(_e[0],_e[1],_e[2],_e[3]));_e[0]=void 0,_e[1]=void 0,_e[2]=void 0,_e[3]=void 0,_e[4]=0,t.redrawHint("select",!0),ue.emit(ot("boxend"));var St=l(function(ge){return ge.selectable()&&!ge.selected()},"eleWouldBeSelected");Je.emit(ot("box")).stdFilter(St).select().emit(ot("boxselect")),Je.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(xe!=null&&xe.unactivate(),ne.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!ne.touches[1]){if(!ne.touches[0]){if(!ne.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var He=t.dragData.touchDragEles;if(xe!=null){var dt=xe._private.grabbed;y(He),t.redrawHint("drag",!0),t.redrawHint("eles",!0),dt&&(xe.emit(ot("freeon")),He.emit(ot("free")),t.dragData.didDrag&&(xe.emit(ot("dragfreeon")),He.emit(ot("dragfree")))),a(xe,["touchend","tapend","vmouseup","tapdragout"],ne,{x:Re[0],y:Re[1]}),xe.unactivate(),t.touchData.start=null}else{var Oe=t.findNearestElement(Re[0],Re[1],!0,!0);a(Oe,["touchend","tapend","vmouseup","tapdragout"],ne,{x:Re[0],y:Re[1]})}var vt=t.touchData.startPosition[0]-Re[0],qe=vt*vt,Me=t.touchData.startPosition[1]-Re[1],lt=Me*Me,it=qe+lt,Ue=it*tt*tt;t.touchData.singleTouchMoved||(xe||ue.$(":selected").unselect(["tapunselect"]),a(xe,["tap","vclick"],ne,{x:Re[0],y:Re[1]}),Ce=!1,ne.timeStamp-ce<=ue.multiClickDebounceTime()?(De&&clearTimeout(De),Ce=!0,ce=null,a(xe,["dbltap","vdblclick"],ne,{x:Re[0],y:Re[1]})):(De=setTimeout(function(){Ce||a(xe,["onetap","voneclick"],ne,{x:Re[0],y:Re[1]})},ue.multiClickDebounceTime()),ce=ne.timeStamp)),xe!=null&&!t.dragData.didDrag&&xe._private.selectable&&Ue<t.touchTapThreshold2&&!t.pinching&&(ue.selectionType()==="single"?(ue.$(r).unmerge(xe).unselect(["tapunselect"]),xe.select(["tapselect"])):xe.selected()?xe.unselect(["tapunselect"]):xe.select(["tapselect"]),t.redrawHint("eles",!0)),t.touchData.singleTouchMoved=!0}}}for(var we=0;we<Re.length;we++)et[we]=Re[we];t.dragData.didDrag=!1,ne.touches.length===0&&(t.touchData.dragDelta=[],t.touchData.startPosition=[null,null,null,null,null,null],t.touchData.startGPosition=null,t.touchData.didSelect=!1),ne.touches.length<2&&(ne.touches.length===1&&(t.touchData.startGPosition=[ne.touches[0].clientX,ne.touches[0].clientY]),t.pinching=!1,t.redrawHint("eles",!0),t.redraw())},"touchendHandler"),!1),typeof TouchEvent=="undefined"){var Ie=[],ye=l(function(ne){return{clientX:ne.clientX,clientY:ne.clientY,force:1,identifier:ne.pointerId,pageX:ne.pageX,pageY:ne.pageY,radiusX:ne.width/2,radiusY:ne.height/2,screenX:ne.screenX,screenY:ne.screenY,target:ne.target}},"makeTouch"),pe=l(function(ne){return{event:ne,touch:ye(ne)}},"makePointer"),Ae=l(function(ne){Ie.push(pe(ne))},"addPointer"),Ve=l(function(ne){for(var xe=0;xe<Ie.length;xe++){var oe=Ie[xe];if(oe.event.pointerId===ne.pointerId){Ie.splice(xe,1);return}}},"removePointer"),ze=l(function(ne){var xe=Ie.filter(function(oe){return oe.event.pointerId===ne.pointerId})[0];xe.event=ne,xe.touch=ye(ne)},"updatePointer"),We=l(function(ne){ne.touches=Ie.map(function(xe){return xe.touch})},"addTouchesToEvent"),me=l(function(ne){return ne.pointerType==="mouse"||ne.pointerType===4},"pointerIsMouse");t.registerBinding(t.container,"pointerdown",function(Se){me(Se)||(Se.preventDefault(),Ae(Se),We(Se),fe(Se))}),t.registerBinding(t.container,"pointerup",function(Se){me(Se)||(Ve(Se),We(Se),Ee(Se))}),t.registerBinding(t.container,"pointercancel",function(Se){me(Se)||(Ve(Se),We(Se),de(Se))}),t.registerBinding(t.container,"pointermove",function(Se){me(Se)||(Se.preventDefault(),ze(Se),We(Se),ve(Se))})}};var Lf={};Lf.generatePolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,draw:l(function(n,a,i,s,o,u){this.renderer.nodeShapeImpl("polygon",n,a,i,s,o,this.points)},"draw"),intersectLine:l(function(n,a,i,s,o,u,h,d){return f5(o,u,this.points,n,a,i/2,s/2,h)},"intersectLine"),checkPoint:l(function(n,a,i,s,o,u,h,d){return Nf(n,a,this.points,u,h,s,o,[0,-1],i)},"checkPoint"),hasMiterBounds:t!=="rectangle",miterBounds:l(function(n,a,i,s,o,u){return dVt(this.points,n,a,i,s,o)},"miterBounds")}},Lf.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:"ellipse",draw:l(function(e,r,n,a,i,s){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i)},"draw"),intersectLine:l(function(e,r,n,a,i,s,o,u){return xVt(i,s,e,r,n/2+o,a/2+o)},"intersectLine"),checkPoint:l(function(e,r,n,a,i,s,o,u){return Jm(e,r,a,i,s,o,n)},"checkPoint")}},Lf.generateRoundPolygon=function(t,e){return this.nodeShapes[t]={renderer:this,name:t,points:e,getOrCreateCorners:l(function(n,a,i,s,o,u,h){if(u[h]!==void 0&&u[h+"-cx"]===n&&u[h+"-cy"]===a)return u[h];u[h]=new Array(e.length/2),u[h+"-cx"]=n,u[h+"-cy"]=a;var d=i/2,f=s/2;o=o==="auto"?a_e(i,s):o;for(var p=new Array(e.length/2),g=0;g<e.length/2;g++)p[g]={x:n+d*e[g*2],y:a+f*e[g*2+1]};var m,y,v,b,w=p.length;for(y=p[w-1],m=0;m<w;m++)v=p[m%w],b=p[(m+1)%w],u[h][m]=ij(y,v,b,o),y=v,v=b;return u[h]},"getOrCreateCorners"),draw:l(function(n,a,i,s,o,u,h){this.renderer.nodeShapeImpl("round-polygon",n,a,i,s,o,this.points,this.getOrCreateCorners(a,i,s,o,u,h,"drawCorners"))},"draw"),intersectLine:l(function(n,a,i,s,o,u,h,d,f){return TVt(o,u,this.points,n,a,i,s,h,this.getOrCreateCorners(n,a,i,s,d,f,"corners"))},"intersectLine"),checkPoint:l(function(n,a,i,s,o,u,h,d,f){return bVt(n,a,this.points,u,h,s,o,this.getOrCreateCorners(u,h,s,o,d,f,"corners"))},"checkPoint")}},Lf.generateRoundRectangle=function(){return this.nodeShapes["round-rectangle"]=this.nodeShapes.roundrectangle={renderer:this,name:"round-rectangle",points:ll(4,0),draw:l(function(e,r,n,a,i,s){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,this.points,s)},"draw"),intersectLine:l(function(e,r,n,a,i,s,o,u){return r_e(i,s,e,r,n,a,o,u)},"intersectLine"),checkPoint:l(function(e,r,n,a,i,s,o,u){var h=a/2,d=i/2;u=u==="auto"?Sp(a,i):u,u=Math.min(h,d,u);var f=u*2;return!!(Nf(e,r,this.points,s,o,a,i-f,[0,-1],n)||Nf(e,r,this.points,s,o,a-f,i,[0,-1],n)||Jm(e,r,f,f,s-h+u,o-d+u,n)||Jm(e,r,f,f,s+h-u,o-d+u,n)||Jm(e,r,f,f,s+h-u,o+d-u,n)||Jm(e,r,f,f,s-h+u,o+d-u,n))},"checkPoint")}},Lf.generateCutRectangle=function(){return this.nodeShapes["cut-rectangle"]=this.nodeShapes.cutrectangle={renderer:this,name:"cut-rectangle",cornerLength:$Y(),points:ll(4,0),draw:l(function(e,r,n,a,i,s){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,null,s)},"draw"),generateCutTrianglePts:l(function(e,r,n,a,i){var s=i==="auto"?this.cornerLength:i,o=r/2,u=e/2,h=n-u,d=n+u,f=a-o,p=a+o;return{topLeft:[h,f+s,h+s,f,h+s,f+s],topRight:[d-s,f,d,f+s,d-s,f+s],bottomRight:[d,p-s,d-s,p,d-s,p-s],bottomLeft:[h+s,p,h,p-s,h+s,p-s]}},"generateCutTrianglePts"),intersectLine:l(function(e,r,n,a,i,s,o,u){var h=this.generateCutTrianglePts(n+2*o,a+2*o,e,r,u),d=[].concat.apply([],[h.topLeft.splice(0,4),h.topRight.splice(0,4),h.bottomRight.splice(0,4),h.bottomLeft.splice(0,4)]);return f5(i,s,d,e,r)},"intersectLine"),checkPoint:l(function(e,r,n,a,i,s,o,u){var h=u==="auto"?this.cornerLength:u;if(Nf(e,r,this.points,s,o,a,i-2*h,[0,-1],n)||Nf(e,r,this.points,s,o,a-2*h,i,[0,-1],n))return!0;var d=this.generateCutTrianglePts(a,i,s,o);return Yl(e,r,d.topLeft)||Yl(e,r,d.topRight)||Yl(e,r,d.bottomRight)||Yl(e,r,d.bottomLeft)},"checkPoint")}},Lf.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:"barrel",points:ll(4,0),draw:l(function(e,r,n,a,i,s){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i)},"draw"),intersectLine:l(function(e,r,n,a,i,s,o,u){var h=.15,d=.5,f=.85,p=this.generateBarrelBezierPts(n+2*o,a+2*o,e,r),g=l(function(v){var b=ST({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},h),w=ST({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},d),x=ST({x:v[0],y:v[1]},{x:v[2],y:v[3]},{x:v[4],y:v[5]},f);return[v[0],v[1],b.x,b.y,w.x,w.y,x.x,x.y,v[4],v[5]]},"approximateBarrelCurvePts"),m=[].concat(g(p.topLeft),g(p.topRight),g(p.bottomRight),g(p.bottomLeft));return f5(i,s,m,e,r)},"intersectLine"),generateBarrelBezierPts:l(function(e,r,n,a){var i=r/2,s=e/2,o=n-s,u=n+s,h=a-i,d=a+i,f=MY(e,r),p=f.heightOffset,g=f.widthOffset,m=f.ctrlPtOffsetPct*e,y={topLeft:[o,h+p,o+m,h,o+g,h],topRight:[u-g,h,u-m,h,u,h+p],bottomRight:[u,d-p,u-m,d,u-g,d],bottomLeft:[o+g,d,o+m,d,o,d-p]};return y.topLeft.isTop=!0,y.topRight.isTop=!0,y.bottomLeft.isBottom=!0,y.bottomRight.isBottom=!0,y},"generateBarrelBezierPts"),checkPoint:l(function(e,r,n,a,i,s,o,u){var h=MY(a,i),d=h.heightOffset,f=h.widthOffset;if(Nf(e,r,this.points,s,o,a,i-2*d,[0,-1],n)||Nf(e,r,this.points,s,o,a-2*f,i,[0,-1],n))return!0;for(var p=this.generateBarrelBezierPts(a,i,s,o),g=l(function(k,A,I){var L=I[4],R=I[2],O=I[0],M=I[5],P=I[1],z=Math.min(L,O),D=Math.max(L,O),B=Math.min(M,P),W=Math.max(M,P);if(z<=k&&k<=D&&B<=A&&A<=W){var U=EVt(L,R,O),j=gVt(U[0],U[1],U[2],k),V=j.filter(function(Y){return 0<=Y&&Y<=1});if(V.length>0)return V[0]}return null},"getCurveT"),m=Object.keys(p),y=0;y<m.length;y++){var v=m[y],b=p[v],w=g(e,r,b);if(w!=null){var x=b[5],T=b[3],C=b[1],S=Fs(x,T,C,w);if(b.isTop&&S<=r||b.isBottom&&r<=S)return!0}}return!1},"checkPoint")}},Lf.generateBottomRoundrectangle=function(){return this.nodeShapes["bottom-round-rectangle"]=this.nodeShapes.bottomroundrectangle={renderer:this,name:"bottom-round-rectangle",points:ll(4,0),draw:l(function(e,r,n,a,i,s){this.renderer.nodeShapeImpl(this.name,e,r,n,a,i,this.points,s)},"draw"),intersectLine:l(function(e,r,n,a,i,s,o,u){var h=e-(n/2+o),d=r-(a/2+o),f=d,p=e+(n/2+o),g=Cp(i,s,e,r,h,d,p,f,!1);return g.length>0?g:r_e(i,s,e,r,n,a,o,u)},"intersectLine"),checkPoint:l(function(e,r,n,a,i,s,o,u){u=u==="auto"?Sp(a,i):u;var h=2*u;if(Nf(e,r,this.points,s,o,a,i-h,[0,-1],n)||Nf(e,r,this.points,s,o,a-h,i,[0,-1],n))return!0;var d=a/2+2*n,f=i/2+2*n,p=[s-d,o-f,s-d,o,s+d,o,s+d,o-f];return!!(Yl(e,r,p)||Jm(e,r,h,h,s+a/2-u,o+i/2-u,n)||Jm(e,r,h,h,s-a/2+u,o+i/2-u,n))},"checkPoint")}},Lf.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",ll(3,0)),this.generateRoundPolygon("round-triangle",ll(3,0)),this.generatePolygon("rectangle",ll(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",ll(5,0)),this.generateRoundPolygon("round-pentagon",ll(5,0)),this.generatePolygon("hexagon",ll(6,0)),this.generateRoundPolygon("round-hexagon",ll(6,0)),this.generatePolygon("heptagon",ll(7,0)),this.generateRoundPolygon("round-heptagon",ll(7,0)),this.generatePolygon("octagon",ll(8,0)),this.generateRoundPolygon("round-octagon",ll(8,0));var n=new Array(20);{var a=LY(5,0),i=LY(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o<i.length/2;o++)i[o*2]*=s,i[o*2+1]*=s;for(var o=0;o<5;o++)n[o*4]=a[o*2],n[o*4+1]=a[o*2+1],n[o*4+2]=i[o*2],n[o*4+3]=i[o*2+1]}n=n_e(n),this.generatePolygon("star",n),this.generatePolygon("vee",[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon("rhomboid",[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon("right-rhomboid",[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon("concave-hexagon",[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);{var u=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon("tag",u),this.generateRoundPolygon("round-tag",u)}t.makePolygon=function(h){var d=h.join("$"),f="polygon-"+d,p;return(p=this[f])?p:e.generatePolygon(f,h)}};var A5={};A5.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},A5.redraw=function(t){t=t||U5e();var e=this;e.averageRedrawTime===void 0&&(e.averageRedrawTime=0),e.lastRedrawTime===void 0&&(e.lastRedrawTime=0),e.lastDrawTime===void 0&&(e.lastDrawTime=0),e.requestedFrame=!0,e.renderOptions=t},A5.beforeRender=function(t,e){if(!this.destroyed){e==null&&ni("Priority is not optional for beforeRender");var r=this.beforeRenderCallbacks;r.push({fn:t,priority:e}),r.sort(function(n,a){return a.priority-n.priority})}};var Y6e=l(function(e,r,n){for(var a=e.beforeRenderCallbacks,i=0;i<a.length;i++)a[i].fn(r,n)},"beforeRenderCallbacks");A5.startRenderLoop=function(){var t=this,e=t.cy;if(!t.renderLoopStarted){t.renderLoopStarted=!0;var r=l(function(a){if(!t.destroyed){if(!e.batching())if(t.requestedFrame&&!t.skipFrame){Y6e(t,!0,a);var i=kf();t.render(t.renderOptions);var s=t.lastDrawTime=kf();t.averageRedrawTime===void 0&&(t.averageRedrawTime=s-i),t.redrawCount===void 0&&(t.redrawCount=0),t.redrawCount++,t.redrawTotalTime===void 0&&(t.redrawTotalTime=0);var o=s-i;t.redrawTotalTime+=o,t.lastRedrawTime=o,t.averageRedrawTime=t.averageRedrawTime/2+o/2,t.requestedFrame=!1}else Y6e(t,!1,a);t.skipFrame=!1,$I(r)}},"renderFn");$I(r)}};var WYt=l(function(e){this.init(e)},"BaseRenderer"),U6e=WYt,VT=U6e.prototype;VT.clientFunctions=["redrawHint","render","renderTo","matchCanvasSize","nodeShapeImpl","arrowShapeImpl"],VT.init=function(t){var e=this;e.options=t,e.cy=t.cy;var r=e.container=t.cy.container(),n=e.cy.window();if(n){var a=n.document,i=a.head,s="__________cytoscape_stylesheet",o="__________cytoscape_container",u=a.getElementById(s)!=null;if(r.className.indexOf(o)<0&&(r.className=(r.className||"")+" "+o),!u){var h=a.createElement("style");h.id=s,h.textContent="."+o+" { position: relative; }",i.insertBefore(h,i.children[0])}var d=n.getComputedStyle(r),f=d.getPropertyValue("position");f==="static"&&na("A Cytoscape container has style position:static and so can not use UI extensions properly")}e.selection=[void 0,void 0,void 0,void 0,0],e.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],e.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},e.dragData={possibleDragElements:[]},e.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},e.redraws=0,e.showFps=t.showFps,e.debug=t.debug,e.webgl=t.webgl,e.hideEdgesOnViewport=t.hideEdgesOnViewport,e.textureOnViewport=t.textureOnViewport,e.wheelSensitivity=t.wheelSensitivity,e.motionBlurEnabled=t.motionBlur,e.forcedPixelRatio=mr(t.pixelRatio)?t.pixelRatio:null,e.motionBlur=t.motionBlur,e.motionBlurOpacity=t.motionBlurOpacity,e.motionBlurTransparency=1-e.motionBlurOpacity,e.motionBlurPxRatio=1,e.mbPxRBlurry=1,e.minMbLowQualFrames=4,e.fullQualityMb=!1,e.clearedForMotionBlur=[],e.desktopTapThreshold=t.desktopTapThreshold,e.desktopTapThreshold2=t.desktopTapThreshold*t.desktopTapThreshold,e.touchTapThreshold=t.touchTapThreshold,e.touchTapThreshold2=t.touchTapThreshold*t.touchTapThreshold,e.tapholdDuration=500,e.bindings=[],e.beforeRenderCallbacks=[],e.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},e.registerNodeShapes(),e.registerArrowShapes(),e.registerCalculationListeners()},VT.notify=function(t,e){var r=this,n=r.cy;if(!this.destroyed){if(t==="init"){r.load();return}if(t==="destroy"){r.destroy();return}(t==="add"||t==="remove"||t==="move"&&n.hasCompoundNodes()||t==="load"||t==="zorder"||t==="mount")&&r.invalidateCachedZSortedEles(),t==="viewport"&&r.redrawHint("select",!0),t==="gc"&&r.redrawHint("gc",!0),(t==="load"||t==="resize"||t==="mount")&&(r.invalidateContainerClientCoordsCache(),r.matchCanvasSize(r.container)),r.redrawHint("eles",!0),r.redrawHint("drag",!0),this.startRenderLoop(),this.redraw()}},VT.destroy=function(){var t=this;t.destroyed=!0,t.cy.stopAnimationLoop();for(var e=0;e<t.bindings.length;e++){var r=t.bindings[e],n=r,a=n.target;(a.off||a.removeEventListener).apply(a,n.args)}if(t.bindings=[],t.beforeRenderCallbacks=[],t.onUpdateEleCalcsFns=[],t.removeObserver&&t.removeObserver.disconnect(),t.styleObserver&&t.styleObserver.disconnect(),t.resizeObserver&&t.resizeObserver.disconnect(),t.labelCalcDiv)try{document.body.removeChild(t.labelCalcDiv)}catch(i){}},VT.isHeadless=function(){return!1},[ej,V6e,G6e,WT,Lf,A5].forEach(function(t){zr(VT,t)});var oj=1e3/60,j6e={setupDequeueing:l(function(e){return l(function(){var n=this,a=this.renderer;if(!n.dequeueingSetup){n.dequeueingSetup=!0;var i=s5(function(){a.redrawHint("eles",!0),a.redrawHint("drag",!0),a.redraw()},e.deqRedrawThreshold),s=l(function(h,d){var f=kf(),p=a.averageRedrawTime,g=a.lastRedrawTime,m=[],y=a.cy.extent(),v=a.getPixelRatio();for(h||a.flushRenderedStyleQueue();;){var b=kf(),w=b-f,x=b-d;if(g<oj){var T=oj-(h?p:0);if(x>=e.deqFastCost*T)break}else if(h){if(w>=e.deqCost*g||w>=e.deqAvgCost*p)break}else if(x>=e.deqNoDrawCost*oj)break;var C=e.deq(n,v,y);if(C.length>0)for(var S=0;S<C.length;S++)m.push(C[S]);else break}m.length>0&&(e.onDeqd(n,m),!h&&e.shouldRedraw(n,m,v,y)&&i())},"dequeue"),o=e.priority||TY;a.beforeRender(s,o(n))}},"setupDequeueingImpl")},"setupDequeueing")},VYt=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:PI;yp(this,t),this.idsByKey=new Af,this.keyForId=new Af,this.cachesByLvl=new Af,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return l(t,"ElementTextureCacheLookup"),vp(t,[{key:"getIdsFor",value:l(function(r){r==null&&ni("Can not get id list for null key");var n=this.idsByKey,a=this.idsByKey.get(r);return a||(a=new ET,n.set(r,a)),a},"getIdsFor")},{key:"addIdForKey",value:l(function(r,n){r!=null&&this.getIdsFor(r).add(n)},"addIdForKey")},{key:"deleteIdForKey",value:l(function(r,n){r!=null&&this.getIdsFor(r).delete(n)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:l(function(r){return r==null?0:this.getIdsFor(r).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:l(function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);this.deleteIdForKey(a,n),this.addIdForKey(i,n),this.keyForId.set(n,i)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:l(function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteIdForKey(a,n),this.keyForId.delete(n)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:l(function(r){var n=r.id(),a=this.keyForId.get(n),i=this.getKey(r);return a!==i},"keyHasChangedFor")},{key:"isInvalid",value:l(function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)},"isInvalid")},{key:"getCachesAt",value:l(function(r){var n=this.cachesByLvl,a=this.lvls,i=n.get(r);return i||(i=new Af,n.set(r,i),a.push(r)),i},"getCachesAt")},{key:"getCache",value:l(function(r,n){return this.getCachesAt(n).get(r)},"getCache")},{key:"get",value:l(function(r,n){var a=this.getKey(r),i=this.getCache(a,n);return i!=null&&this.updateKeyMappingFor(r),i},"get")},{key:"getForCachedKey",value:l(function(r,n){var a=this.keyForId.get(r.id()),i=this.getCache(a,n);return i},"getForCachedKey")},{key:"hasCache",value:l(function(r,n){return this.getCachesAt(n).has(r)},"hasCache")},{key:"has",value:l(function(r,n){var a=this.getKey(r);return this.hasCache(a,n)},"has")},{key:"setCache",value:l(function(r,n,a){a.key=r,this.getCachesAt(n).set(r,a)},"setCache")},{key:"set",value:l(function(r,n,a){var i=this.getKey(r);this.setCache(i,n,a),this.updateKeyMappingFor(r)},"set")},{key:"deleteCache",value:l(function(r,n){this.getCachesAt(n).delete(r)},"deleteCache")},{key:"delete",value:l(function(r,n){var a=this.getKey(r);this.deleteCache(a,n)},"_delete")},{key:"invalidateKey",value:l(function(r){var n=this;this.lvls.forEach(function(a){return n.deleteCache(r,a)})},"invalidateKey")},{key:"invalidate",value:l(function(r){var n=r.id(),a=this.keyForId.get(n);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(a),i||this.getNumberOfIdsForKey(a)===0},"invalidate")}])}(),K6e=25,TL=50,EL=-4,lj=3,X6e=7.99,GYt=8,qYt=1024,YYt=1024,UYt=1024,jYt=.2,KYt=.8,XYt=10,ZYt=.15,QYt=.1,JYt=.9,eUt=.9,tUt=100,rUt=1,GT={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},nUt=io({getKey:null,doesEleInvalidateKey:PI,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:V5e,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),N5=l(function(e,r){var n=this;n.renderer=e,n.onDequeues=[];var a=nUt(r);zr(n,a),n.lookup=new VYt(a.getKey,a.doesEleInvalidateKey),n.setupDequeueing()},"ElementTextureCache"),gs=N5.prototype;gs.reasons=GT,gs.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]},gs.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},n=r[t]=r[t]||[];return n},gs.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new u5(function(r,n){return n.reqs-r.reqs});return e},gs.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e},gs.getElement=function(t,e,r,n,a){var i=this,s=this.renderer,o=s.cy.zoom(),u=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(n==null&&(n=Math.ceil(kY(o*r))),n<EL)n=EL;else if(o>=X6e||n>lj)return null;var h=Math.pow(2,n),d=e.h*h,f=e.w*h,p=s.eleTextBiggerThanMin(t,h);if(!this.isVisible(t,p))return null;var g=u.get(t,n);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;var m;if(d<=K6e?m=K6e:d<=TL?m=TL:m=Math.ceil(d/TL)*TL,d>UYt||f>YYt)return null;var y=i.getTextureQueue(m),v=y[y.length-2],b=l(function(){return i.recycleTexture(m,f)||i.addTexture(m,f)},"addNewTxr");v||(v=y[y.length-1]),v||(v=b()),v.width-v.usedWidth<f&&(v=b());for(var w=l(function(z){return z&&z.scaledLabelShown===p},"scalableFrom"),x=a&&a===GT.dequeue,T=a&&a===GT.highQuality,C=a&&a===GT.downscale,S,E=n+1;E<=lj;E++){var k=u.get(t,E);if(k){S=k;break}}var A=S&&S.level===n+1?S:null,I=l(function(){v.context.drawImage(A.texture.canvas,A.x,0,A.width,A.height,v.usedWidth,0,f,d)},"downscale");if(v.context.setTransform(1,0,0,1,0,0),v.context.clearRect(v.usedWidth,0,f,m),w(A))I();else if(w(S))if(T){for(var L=S.level;L>n;L--)A=i.getElement(t,e,r,L,GT.downscale);I()}else return i.queueElement(t,S.level-1),S;else{var R;if(!x&&!T&&!C)for(var O=n-1;O>=EL;O--){var M=u.get(t,O);if(M){R=M;break}}if(w(R))return i.queueElement(t,n),R;v.context.translate(v.usedWidth,0),v.context.scale(h,h),this.drawElement(v.context,t,e,p,!1),v.context.scale(1/h,1/h),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:n,scale:h,width:f,height:d,scaledLabelShown:p},v.usedWidth+=Math.ceil(f+GYt),v.eleCaches.push(g),u.set(t,n,g),i.checkTextureFullness(v),g},gs.invalidateElements=function(t){for(var e=0;e<t.length;e++)this.invalidateElement(t[e])},gs.invalidateElement=function(t){var e=this,r=e.lookup,n=[],a=r.isInvalid(t);if(a){for(var i=EL;i<=lj;i++){var s=r.getForCachedKey(t,i);s&&n.push(s)}var o=r.invalidate(t);if(o)for(var u=0;u<n.length;u++){var h=n[u],d=h.texture;d.invalidatedWidth+=h.width,h.invalidated=!0,e.checkTextureUtility(d)}e.removeFromQueue(t)}},gs.checkTextureUtility=function(t){t.invalidatedWidth>=jYt*t.width&&this.retireTexture(t)},gs.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>KYt&&t.fullnessChecks>=XYt?Tp(r,t):t.fullnessChecks++},gs.retireTexture=function(t){var e=this,r=t.height,n=e.getTextureQueue(r),a=this.lookup;Tp(n,t),t.retired=!0;for(var i=t.eleCaches,s=0;s<i.length;s++){var o=i[s];a.deleteCache(o.key,o.level)}EY(i);var u=e.getRetiredTextureQueue(r);u.push(t)},gs.addTexture=function(t,e){var r=this,n=r.getTextureQueue(t),a={};return n.push(a),a.eleCaches=[],a.height=t,a.width=Math.max(qYt,e),a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,a.canvas=r.renderer.makeOffscreenCanvas(a.width,a.height),a.context=a.canvas.getContext("2d"),a},gs.recycleTexture=function(t,e){for(var r=this,n=r.getTextureQueue(t),a=r.getRetiredTextureQueue(t),i=0;i<a.length;i++){var s=a[i];if(s.width>=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,EY(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),Tp(a,s),n.push(s),s}},gs.queueElement=function(t,e){var r=this,n=r.getElementQueue(),a=r.getElementKeyToQueue(),i=this.getKey(t),s=a[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,n.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:i};n.push(o),a[i]=o}},gs.dequeue=function(t){for(var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=[],i=e.lookup,s=0;s<rUt&&r.size()>0;s++){var o=r.pop(),u=o.key,h=o.eles[0],d=i.hasCache(h,o.level);if(n[u]=null,d)continue;a.push(o);var f=e.getBoundingBox(h);e.getElement(h,f,t,o.level,GT.dequeue)}return a},gs.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),n=e.getElementKeyToQueue(),a=this.getKey(t),i=n[a];i!=null&&(i.eles.length===1?(i.reqs=wY,r.updateItem(i),r.pop(),n[a]=null):i.eles.unmerge(t))},gs.onDequeue=function(t){this.onDequeues.push(t)},gs.offDequeue=function(t){Tp(this.onDequeues,t)},gs.setupDequeueing=j6e.setupDequeueing({deqRedrawThreshold:tUt,deqCost:ZYt,deqAvgCost:QYt,deqNoDrawCost:JYt,deqFastCost:eUt,deq:l(function(e,r,n){return e.dequeue(r,n)},"deq"),onDeqd:l(function(e,r){for(var n=0;n<e.onDequeues.length;n++){var a=e.onDequeues[n];a(r)}},"onDeqd"),shouldRedraw:l(function(e,r,n,a){for(var i=0;i<r.length;i++)for(var s=r[i].eles,o=0;o<s.length;o++){var u=s[o].boundingBox();if(NY(u,a))return!0}return!1},"shouldRedraw"),priority:l(function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq},"priority")});var aUt=1,I5=-4,CL=2,iUt=3.99,sUt=50,oUt=50,lUt=.15,cUt=.1,uUt=.9,hUt=.9,dUt=1,Z6e=250,fUt=4e3*4e3,Q6e=32767,pUt=!0,J6e=l(function(e){var r=this,n=r.renderer=e,a=n.cy;r.layersByLevel={},r.firstGet=!0,r.lastInvalidationTime=kf()-2*Z6e,r.skipping=!1,r.eleTxrDeqs=a.collection(),r.scheduleElementRefinement=s5(function(){r.refineElementTextures(r.eleTxrDeqs),r.eleTxrDeqs.unmerge(r.eleTxrDeqs)},oUt),n.beforeRender(function(s,o){o-r.lastInvalidationTime<=Z6e?r.skipping=!0:r.skipping=!1},n.beforeRenderPriorities.lyrTxrSkip);var i=l(function(o,u){return u.reqs-o.reqs},"qSort");r.layersQueue=new u5(i),r.setupDequeueing()},"LayeredTextureCache"),lo=J6e.prototype,eAe=0,gUt=Math.pow(2,53)-1;lo.makeLayer=function(t,e){var r=Math.pow(2,e),n=Math.ceil(t.w*r),a=Math.ceil(t.h*r),i=this.renderer.makeOffscreenCanvas(n,a),s={id:eAe=++eAe%gUt,bb:t,level:e,width:n,height:a,canvas:i,context:i.getContext("2d"),eles:[],elesQueue:[],reqs:0},o=s.context,u=-s.bb.x1,h=-s.bb.y1;return o.scale(r,r),o.translate(u,h),s},lo.getLayers=function(t,e,r){var n=this,a=n.renderer,i=a.cy,s=i.zoom(),o=n.firstGet;if(n.firstGet=!1,r==null){if(r=Math.ceil(kY(s*e)),r<I5)r=I5;else if(s>=iUt||r>CL)return null}n.validateLayersElesOrdering(r,t);var u=n.layersByLevel,h=Math.pow(2,r),d=u[r]=u[r]||[],f,p=n.levelIsComplete(r,t),g,m=l(function(){var I=l(function(P){if(n.validateLayersElesOrdering(P,t),n.levelIsComplete(P,t))return g=u[P],!0},"canUseAsTmpLvl"),L=l(function(P){if(!g)for(var z=r+P;I5<=z&&z<=CL&&!I(z);z+=P);},"checkLvls");L(1),L(-1);for(var R=d.length-1;R>=0;R--){var O=d[R];O.invalid&&Tp(d,O)}},"checkTempLevels");if(!p)m();else return d;var y=l(function(){if(!f){f=ol();for(var I=0;I<t.length;I++)cVt(f,t[I].boundingBox())}return f},"getBb"),v=l(function(I){I=I||{};var L=I.after;y();var R=Math.ceil(f.w*h),O=Math.ceil(f.h*h);if(R>Q6e||O>Q6e)return null;var M=R*O;if(M>fUt)return null;var P=n.makeLayer(f,r);if(L!=null){var z=d.indexOf(L)+1;d.splice(z,0,P)}else(I.insert===void 0||I.insert)&&d.unshift(P);return P},"makeLayer");if(n.skipping&&!o)return null;for(var b=null,w=t.length/aUt,x=!o,T=0;T<t.length;T++){var C=t[T],S=C._private.rscratch,E=S.imgLayerCaches=S.imgLayerCaches||{},k=E[r];if(k){b=k;continue}if((!b||b.eles.length>=w||!t_e(b.bb,C.boundingBox()))&&(b=v({insert:!0,after:b}),!b))return null;g||x?n.queueLayer(b,C):n.drawEleInLayer(b,C,r,e),b.eles.push(C),E[r]=b}return g||(x?null:d)},lo.getEleLevelForLayerLevel=function(t,e){return t},lo.drawEleInLayer=function(t,e,r,n){var a=this,i=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=a.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,r,pUt),i.setImgSmoothing(s,!0))},lo.levelIsComplete=function(t,e){var r=this,n=r.layersByLevel[t];if(!n||n.length===0)return!1;for(var a=0,i=0;i<n.length;i++){var s=n[i];if(s.reqs>0||s.invalid)return!1;a+=s.eles.length}return a===e.length},lo.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var n=0;n<r.length;n++){for(var a=r[n],i=-1,s=0;s<e.length;s++)if(a.eles[0]===e[s]){i=s;break}if(i<0){this.invalidateLayer(a);continue}for(var o=i,s=0;s<a.eles.length;s++)if(a.eles[s]!==e[o+s]){this.invalidateLayer(a);break}}},lo.updateElementsInLayers=function(t,e){for(var r=this,n=r5(t[0]),a=0;a<t.length;a++)for(var i=n?null:t[a],s=n?t[a]:t[a].ele,o=s._private.rscratch,u=o.imgLayerCaches=o.imgLayerCaches||{},h=I5;h<=CL;h++){var d=u[h];d&&(i&&r.getEleLevelForLayerLevel(d.level)!==i.level||e(d,s,i))}},lo.haveLayers=function(){for(var t=this,e=!1,r=I5;r<=CL;r++){var n=t.layersByLevel[r];if(n&&n.length>0){e=!0;break}}return e},lo.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=kf(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,l(function(n,a,i){e.invalidateLayer(n)},"invalAssocLayers")))},lo.invalidateLayer=function(t){if(this.lastInvalidationTime=kf(),!t.invalid){var e=t.level,r=t.eles,n=this.layersByLevel[e];Tp(n,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var a=0;a<r.length;a++){var i=r[a]._private.rscratch.imgLayerCaches;i&&(i[e]=null)}}},lo.refineElementTextures=function(t){var e=this;e.updateElementsInLayers(t,l(function(n,a,i){var s=n.replacement;if(s||(s=n.replacement=e.makeLayer(n.bb,n.level),s.replaces=n,s.eles=n.eles),!s.reqs)for(var o=0;o<s.eles.length;o++)e.queueLayer(s,s.eles[o])},"refineEachEle"))},lo.enqueueElementRefinement=function(t){this.eleTxrDeqs.merge(t),this.scheduleElementRefinement()},lo.queueLayer=function(t,e){var r=this,n=r.layersQueue,a=t.elesQueue,i=a.hasId=a.hasId||{};if(!t.replacement){if(e){if(i[e.id()])return;a.push(e),i[e.id()]=!0}t.reqs?(t.reqs++,n.updateItem(t)):(t.reqs=1,n.push(t))}},lo.dequeue=function(t){for(var e=this,r=e.layersQueue,n=[],a=0;a<dUt&&r.size()!==0;){var i=r.peek();if(i.replacement){r.pop();continue}if(i.replaces&&i!==i.replaces.replacement){r.pop();continue}if(i.invalid){r.pop();continue}var s=i.elesQueue.shift();s&&(e.drawEleInLayer(i,s,i.level,t),a++),n.length===0&&n.push(!0),i.elesQueue.length===0&&(r.pop(),i.reqs=0,i.replaces&&e.applyLayerReplacement(i),e.requestRedraw())}return n},lo.applyLayerReplacement=function(t){var e=this,r=e.layersByLevel[t.level],n=t.replaces,a=r.indexOf(n);if(!(a<0||n.invalid)){r[a]=t;for(var i=0;i<t.eles.length;i++){var s=t.eles[i]._private,o=s.imgLayerCaches=s.imgLayerCaches||{};o&&(o[t.level]=t)}e.requestRedraw()}},lo.requestRedraw=s5(function(){var t=this.renderer;t.redrawHint("eles",!0),t.redrawHint("drag",!0),t.redraw()},100),lo.setupDequeueing=j6e.setupDequeueing({deqRedrawThreshold:sUt,deqCost:lUt,deqAvgCost:cUt,deqNoDrawCost:uUt,deqFastCost:hUt,deq:l(function(e,r){return e.dequeue(r)},"deq"),onDeqd:TY,shouldRedraw:V5e,priority:l(function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq},"priority")});var tAe={},rAe;function mUt(t,e){for(var r=0;r<e.length;r++){var n=e[r];t.lineTo(n.x,n.y)}}l(mUt,"polygon");function yUt(t,e,r){for(var n,a=0;a<e.length;a++){var i=e[a];a===0&&(n=i),t.lineTo(i.x,i.y)}t.quadraticCurveTo(r.x,r.y,n.x,n.y)}l(yUt,"triangleBackcurve");function nAe(t,e,r){t.beginPath&&t.beginPath();for(var n=e,a=0;a<n.length;a++){var i=n[a];t.lineTo(i.x,i.y)}var s=r,o=r[0];t.moveTo(o.x,o.y);for(var a=1;a<s.length;a++){var i=s[a];t.lineTo(i.x,i.y)}t.closePath&&t.closePath()}l(nAe,"triangleTee");function vUt(t,e,r,n,a){t.beginPath&&t.beginPath(),t.arc(r,n,a,0,Math.PI*2,!1);var i=e,s=i[0];t.moveTo(s.x,s.y);for(var o=0;o<i.length;o++){var u=i[o];t.lineTo(u.x,u.y)}t.closePath&&t.closePath()}l(vUt,"circleTriangle");function bUt(t,e,r,n){t.arc(e,r,n,0,Math.PI*2,!1)}l(bUt,"circle$1"),tAe.arrowShapeImpl=function(t){return(rAe||(rAe={polygon:mUt,"triangle-backcurve":yUt,"triangle-tee":nAe,"circle-triangle":vUt,"triangle-cross":nAe,circle:bUt}))[t]};var od={};od.drawElement=function(t,e,r,n,a,i){var s=this;e.isNode()?s.drawNode(t,e,r,n,a,i):s.drawEdge(t,e,r,n,a,i)},od.drawElementOverlay=function(t,e){var r=this;e.isNode()?r.drawNodeOverlay(t,e):r.drawEdgeOverlay(t,e)},od.drawElementUnderlay=function(t,e){var r=this;e.isNode()?r.drawNodeUnderlay(t,e):r.drawEdgeUnderlay(t,e)},od.drawCachedElementPortion=function(t,e,r,n,a,i,s,o){var u=this,h=r.getBoundingBox(e);if(!(h.w===0||h.h===0)){var d=r.getElement(e,h,n,a,i);if(d!=null){var f=o(u,e);if(f===0)return;var p=s(u,e),g=h.x1,m=h.y1,y=h.w,v=h.h,b,w,x,T,C;if(p!==0){var S=r.getRotationPoint(e);x=S.x,T=S.y,t.translate(x,T),t.rotate(p),C=u.getImgSmoothing(t),C||u.setImgSmoothing(t,!0);var E=r.getRotationOffset(e);b=E.x,w=E.y}else b=g,w=m;var k;f!==1&&(k=t.globalAlpha,t.globalAlpha=k*f),t.drawImage(d.texture.canvas,d.x,0,d.width,d.height,b,w,y,v),f!==1&&(t.globalAlpha=k),p!==0&&(t.rotate(-p),t.translate(-x,-T),C||u.setImgSmoothing(t,!1))}else r.drawElement(t,e)}};var xUt=l(function(){return 0},"getZeroRotation"),wUt=l(function(e,r){return e.getTextAngle(r,null)},"getLabelRotation"),TUt=l(function(e,r){return e.getTextAngle(r,"source")},"getSourceLabelRotation"),EUt=l(function(e,r){return e.getTextAngle(r,"target")},"getTargetLabelRotation"),CUt=l(function(e,r){return r.effectiveOpacity()},"getOpacity"),cj=l(function(e,r){return r.pstyle("text-opacity").pfValue*r.effectiveOpacity()},"getTextOpacity");od.drawCachedElement=function(t,e,r,n,a,i){var s=this,o=s.data,u=o.eleTxrCache,h=o.lblTxrCache,d=o.slbTxrCache,f=o.tlbTxrCache,p=e.boundingBox(),g=i===!0?u.reasons.highQuality:null;if(!(p.w===0||p.h===0||!e.visible())&&(!n||NY(p,n))){var m=e.isEdge(),y=e.element()._private.rscratch.badLine;s.drawElementUnderlay(t,e),s.drawCachedElementPortion(t,e,u,r,a,g,xUt,CUt),(!m||!y)&&s.drawCachedElementPortion(t,e,h,r,a,g,wUt,cj),m&&!y&&(s.drawCachedElementPortion(t,e,d,r,a,g,TUt,cj),s.drawCachedElementPortion(t,e,f,r,a,g,EUt,cj)),s.drawElementOverlay(t,e)}},od.drawElements=function(t,e){for(var r=this,n=0;n<e.length;n++){var a=e[n];r.drawElement(t,a)}},od.drawCachedElements=function(t,e,r,n){for(var a=this,i=0;i<e.length;i++){var s=e[i];a.drawCachedElement(t,s,r,n)}},od.drawCachedNodes=function(t,e,r,n){for(var a=this,i=0;i<e.length;i++){var s=e[i];s.isNode()&&a.drawCachedElement(t,s,r,n)}},od.drawLayeredElements=function(t,e,r,n){var a=this,i=a.data.lyrTxrCache.getLayers(e,r);if(i)for(var s=0;s<i.length;s++){var o=i[s],u=o.bb;u.w===0||u.h===0||t.drawImage(o.canvas,u.x1,u.y1,u.w,u.h)}else a.drawCachedElements(t,e,r,n)};var $f={};$f.drawEdge=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var u;r&&(u=r,t.translate(-u.x1,-u.y1));var h=i?e.pstyle("opacity").value:1,d=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,p=e.pstyle("line-style").value,g=e.pstyle("width").pfValue,m=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,v=e.pstyle("line-outline-color").value,b=h*d,w=h*d,x=l(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;f==="straight-triangle"?(s.eleStrokeStyle(t,e,P),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=g,t.lineCap=m,s.eleStrokeStyle(t,e,P),s.drawEdgePath(e,t,o.allpts,p),t.lineCap="butt")},"drawLine"),T=l(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;if(t.lineWidth=g+y,t.lineCap=m,y>0)s.colorStrokeStyle(t,v[0],v[1],v[2],P);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,p),t.lineCap="butt")},"drawLineOutline"),C=l(function(){a&&s.drawEdgeOverlay(t,e)},"drawOverlay"),S=l(function(){a&&s.drawEdgeUnderlay(t,e)},"drawUnderlay"),E=l(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w;s.drawArrowheads(t,e,P)},"drawArrows"),k=l(function(){s.drawElementText(t,e,null,n)},"drawText");t.lineJoin="round";var A=e.pstyle("ghost").value==="yes";if(A){var I=e.pstyle("ghost-offset-x").pfValue,L=e.pstyle("ghost-offset-y").pfValue,R=e.pstyle("ghost-opacity").value,O=b*R;t.translate(I,L),x(O),E(O),t.translate(-I,-L)}else T();S(),x(),E(),C(),k(),r&&t.translate(u.x1,u.y1)}};var aAe=l(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n){if(n.visible()){var a=n.pstyle("".concat(e,"-opacity")).value;if(a!==0){var i=this,s=i.usePaths(),o=n._private.rscratch,u=n.pstyle("".concat(e,"-padding")).pfValue,h=2*u,d=n.pstyle("".concat(e,"-color")).value;r.lineWidth=h,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,d[0],d[1],d[2],a),i.drawEdgePath(n,r,o.allpts,"solid")}}}},"drawEdgeOverlayUnderlay");$f.drawEdgeOverlay=aAe("overlay"),$f.drawEdgeUnderlay=aAe("underlay"),$f.drawEdgePath=function(t,e,r,n){var a=t._private.rscratch,i=e,s,o=!1,u=this.usePaths(),h=t.pstyle("line-dash-pattern").pfValue,d=t.pstyle("line-dash-offset").pfValue;if(u){var f=r.join("$"),p=a.pathCacheKey&&a.pathCacheKey===f;p?(s=e=a.pathCache,o=!0):(s=e=new Path2D,a.pathCacheKey=f,a.pathCache=s)}if(i.setLineDash)switch(n){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(h),i.lineDashOffset=d;break;case"solid":i.setLineDash([]);break}if(!o&&!a.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var g=2;g+3<r.length;g+=4)e.quadraticCurveTo(r[g],r[g+1],r[g+2],r[g+3]);break;case"straight":case"haystack":for(var m=2;m+1<r.length;m+=2)e.lineTo(r[m],r[m+1]);break;case"segments":if(a.isRound){var y=ql(a.roundCorners),v;try{for(y.s();!(v=y.n()).done;){var b=v.value;O6e(e,b)}}catch(x){y.e(x)}finally{y.f()}e.lineTo(r[r.length-2],r[r.length-1])}else for(var w=2;w+1<r.length;w+=2)e.lineTo(r[w],r[w+1]);break}e=i,u?e.stroke(s):e.stroke(),e.setLineDash&&e.setLineDash([])},$f.drawEdgeTrianglePath=function(t,e,r){e.fillStyle=e.strokeStyle;for(var n=t.pstyle("width").pfValue,a=0;a+1<r.length;a+=2){var i=[r[a+2]-r[a],r[a+3]-r[a+1]],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]),o=[i[1]/s,-i[0]/s],u=[o[0]*n/2,o[1]*n/2];e.beginPath(),e.moveTo(r[a]-u[0],r[a+1]-u[1]),e.lineTo(r[a]+u[0],r[a+1]+u[1]),e.lineTo(r[a+2],r[a+3]),e.closePath(),e.fill()}},$f.drawArrowheads=function(t,e,r){var n=e._private.rscratch,a=n.edgeType==="haystack";a||this.drawArrowhead(t,e,"source",n.arrowStartX,n.arrowStartY,n.srcArrowAngle,r),this.drawArrowhead(t,e,"mid-target",n.midX,n.midY,n.midtgtArrowAngle,r),this.drawArrowhead(t,e,"mid-source",n.midX,n.midY,n.midsrcArrowAngle,r),a||this.drawArrowhead(t,e,"target",n.arrowEndX,n.arrowEndY,n.tgtArrowAngle,r)},$f.drawArrowhead=function(t,e,r,n,a,i,s){if(!(isNaN(n)||n==null||isNaN(a)||a==null||isNaN(i)||i==null)){var o=this,u=e.pstyle(r+"-arrow-shape").value;if(u!=="none"){var h=e.pstyle(r+"-arrow-fill").value==="hollow"?"both":"filled",d=e.pstyle(r+"-arrow-fill").value,f=e.pstyle("width").pfValue,p=e.pstyle(r+"-arrow-width"),g=p.value==="match-line"?f:p.pfValue;p.units==="%"&&(g*=f);var m=e.pstyle("opacity").value;s===void 0&&(s=m);var y=t.globalCompositeOperation;(s!==1||d==="hollow")&&(t.globalCompositeOperation="destination-out",o.colorFillStyle(t,255,255,255,1),o.colorStrokeStyle(t,255,255,255,1),o.drawArrowShape(e,t,h,f,u,g,n,a,i),t.globalCompositeOperation=y);var v=e.pstyle(r+"-arrow-color").value;o.colorFillStyle(t,v[0],v[1],v[2],s),o.colorStrokeStyle(t,v[0],v[1],v[2],s),o.drawArrowShape(e,t,d,f,u,g,n,a,i)}}},$f.drawArrowShape=function(t,e,r,n,a,i,s,o,u){var h=this,d=this.usePaths()&&a!=="triangle-cross",f=!1,p,g=e,m={x:s,y:o},y=t.pstyle("arrow-scale").value,v=this.getArrowWidth(n,y),b=h.arrowShapes[a];if(d){var w=h.arrowPathCache=h.arrowPathCache||[],x=Xm(a),T=w[x];T!=null?(p=e=T,f=!0):(p=e=new Path2D,w[x]=p)}f||(e.beginPath&&e.beginPath(),d?b.draw(e,1,0,{x:0,y:0},1):b.draw(e,v,u,m,n),e.closePath&&e.closePath()),e=g,d&&(e.translate(s,o),e.rotate(u),e.scale(v,v)),(r==="filled"||r==="both")&&(d?e.fill(p):e.fill()),(r==="hollow"||r==="both")&&(e.lineWidth=i/(d?v:1),e.lineJoin="miter",d?e.stroke(p):e.stroke()),d&&(e.scale(1/v,1/v),e.rotate(-u),e.translate(-s,-o))};var uj={};uj.safeDrawImage=function(t,e,r,n,a,i,s,o,u,h){if(!(a<=0||i<=0||u<=0||h<=0))try{t.drawImage(e,r,n,a,i,s,o,u,h)}catch(d){na(d)}},uj.drawInscribedImage=function(t,e,r,n,a){var i=this,s=r.position(),o=s.x,u=s.y,h=r.cy().style(),d=h.getIndexedStyle.bind(h),f=d(r,"background-fit","value",n),p=d(r,"background-repeat","value",n),g=r.width(),m=r.height(),y=r.padding()*2,v=g+(d(r,"background-width-relative-to","value",n)==="inner"?0:y),b=m+(d(r,"background-height-relative-to","value",n)==="inner"?0:y),w=r._private.rscratch,x=d(r,"background-clip","value",n),T=x==="node",C=d(r,"background-image-opacity","value",n)*a,S=d(r,"background-image-smoothing","value",n),E=r.pstyle("corner-radius").value;E!=="auto"&&(E=r.pstyle("corner-radius").pfValue);var k=e.width||e.cachedW,A=e.height||e.cachedH;(k==null||A==null)&&(document.body.appendChild(e),k=e.cachedW=e.width||e.offsetWidth,A=e.cachedH=e.height||e.offsetHeight,document.body.removeChild(e));var I=k,L=A;if(d(r,"background-width","value",n)!=="auto"&&(d(r,"background-width","units",n)==="%"?I=d(r,"background-width","pfValue",n)*v:I=d(r,"background-width","pfValue",n)),d(r,"background-height","value",n)!=="auto"&&(d(r,"background-height","units",n)==="%"?L=d(r,"background-height","pfValue",n)*b:L=d(r,"background-height","pfValue",n)),!(I===0||L===0)){if(f==="contain"){var R=Math.min(v/I,b/L);I*=R,L*=R}else if(f==="cover"){var R=Math.max(v/I,b/L);I*=R,L*=R}var O=o-v/2,M=d(r,"background-position-x","units",n),P=d(r,"background-position-x","pfValue",n);M==="%"?O+=(v-I)*P:O+=P;var z=d(r,"background-offset-x","units",n),D=d(r,"background-offset-x","pfValue",n);z==="%"?O+=(v-I)*D:O+=D;var B=u-b/2,W=d(r,"background-position-y","units",n),U=d(r,"background-position-y","pfValue",n);W==="%"?B+=(b-L)*U:B+=U;var j=d(r,"background-offset-y","units",n),V=d(r,"background-offset-y","pfValue",n);j==="%"?B+=(b-L)*V:B+=V,w.pathCache&&(O-=o,B-=u,o=0,u=0);var Y=t.globalAlpha;t.globalAlpha=C;var H=i.getImgSmoothing(t),q=!1;if(S==="no"&&H?(i.setImgSmoothing(t,!1),q=!0):S==="yes"&&!H&&(i.setImgSmoothing(t,!0),q=!0),p==="no-repeat")T&&(t.save(),w.pathCache?t.clip(w.pathCache):(i.nodeShapes[i.getNodeShape(r)].draw(t,o,u,v,b,E,w),t.clip())),i.safeDrawImage(t,e,0,0,k,A,O,B,I,L),T&&t.restore();else{var Z=t.createPattern(e,p);t.fillStyle=Z,i.nodeShapes[i.getNodeShape(r)].draw(t,o,u,v,b,E,w),t.translate(O,B),t.fill(),t.translate(-O,-B)}t.globalAlpha=Y,q&&i.setImgSmoothing(t,H)}};var s1={};s1.eleTextBiggerThanMin=function(t,e){if(!e){var r=t.cy().zoom(),n=this.getPixelRatio(),a=Math.ceil(kY(r*n));e=Math.pow(2,a)}var i=t.pstyle("font-size").pfValue*e,s=t.pstyle("min-zoomed-font-size").pfValue;return!(i<s)},s1.drawElementText=function(t,e,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(n==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(n===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var u=s.getLabelJustification(e),h=e.pstyle("text-metrics").strValue==="glyph";t.textAlign=u,t.textBaseline=h?"alphabetic":"bottom"}else{var d=e.element()._private.rscratch.badLine,f=e.pstyle("label"),p=e.pstyle("source-label"),g=e.pstyle("target-label");if(d||(!f||!f.value)&&(!p||!p.value)&&(!g||!g.value))return;t.textAlign="center",t.textBaseline="bottom"}var m=!r,y;r&&(y=r,t.translate(-y.x1,-y.y1)),a==null?(s.drawText(t,e,null,m,i),e.isEdge()&&(s.drawText(t,e,"source",m,i),s.drawText(t,e,"target",m,i))):s.drawText(t,e,a,m,i),r&&t.translate(y.x1,y.y1)},s1.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r<this.fontCaches.length;r++)if(e=this.fontCaches[r],e.context===t)return e;return e={context:t},this.fontCaches.push(e),e},s1.setupTextStyle=function(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,u=e.pstyle("text-outline-opacity").value*o,h=e.pstyle("color").value,d=e.pstyle("text-outline-color").value;t.font=n+" "+s+" "+a+" "+i,t.lineJoin="round",this.colorFillStyle(t,h[0],h[1],h[2],o),this.colorStrokeStyle(t,d[0],d[1],d[2],u)};function SUt(t,e,r,n,a){var i=Math.min(n,a),s=i/2,o=e+n/2,u=r+a/2;t.beginPath(),t.arc(o,u,s,0,Math.PI*2),t.closePath()}l(SUt,"circle$2");function iAe(t,e,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(i,n/2,a/2);t.beginPath(),t.moveTo(e+s,r),t.lineTo(e+n-s,r),t.quadraticCurveTo(e+n,r,e+n,r+s),t.lineTo(e+n,r+a-s),t.quadraticCurveTo(e+n,r+a,e+n-s,r+a),t.lineTo(e+s,r+a),t.quadraticCurveTo(e,r+a,e,r+a-s),t.lineTo(e,r+s),t.quadraticCurveTo(e,r,e+s,r),t.closePath()}l(iAe,"roundRect"),s1.getTextAngle=function(t,e){var r,n=t._private,a=n.rscratch,i=e?e+"-":"",s=t.pstyle(i+"text-rotation");if(s.strValue==="autorotate"){var o=sl(a,"labelAngle",e);r=t.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r},s1.drawText=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=a?e.effectiveOpacity():1;if(!(a&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=sl(s,"labelX",r),h=sl(s,"labelY",r),d,f,p=this.getLabelText(e,r);if(p!=null&&p!==""&&!isNaN(u)&&!isNaN(h)){this.setupTextStyle(t,e,a);var g=r?r+"-":"",m=sl(s,"labelWidth",r),y=sl(s,"labelHeight",r),v=sl(s,"labelActualDescent",r),b=e.pstyle(g+"text-margin-x").pfValue,w=e.pstyle(g+"text-margin-y").pfValue,x=e.isEdge(),T=e.pstyle("text-halign").value,C=e.pstyle("text-valign").value;x&&(T="center",C="center"),u+=b,h+=w;var S;n?S=this.getTextAngle(e,r):S=0,S!==0&&(d=u,f=h,t.translate(d,f),t.rotate(S),u=0,h=0);var E=PT(T),k=RT(C);switch(k){case"top":break;case"center":h+=y/2;break;case"bottom":h+=y;break}var A=e.pstyle("text-background-opacity").value,I=e.pstyle("text-border-opacity").value,L=e.pstyle("text-border-width").pfValue,R=e.pstyle("text-background-padding").pfValue,O=e.pstyle("text-background-shape").strValue,M=O==="round-rectangle"||O==="roundrectangle",P=O==="circle",z=2;if(A>0||L>0&&I>0){var D=t.fillStyle,B=t.strokeStyle,W=t.lineWidth,U=e.pstyle("text-background-color").value,j=e.pstyle("text-border-color").value,V=e.pstyle("text-border-style").value,Y=A>0,H=L>0&&I>0,q=u-R;switch(E){case"left":q-=m;break;case"center":q-=m/2;break}var Z=h-y-R,K=m+2*R,re=y+2*R;if(Y&&(t.fillStyle="rgba(".concat(U[0],",").concat(U[1],",").concat(U[2],",").concat(A*o,")")),H&&(t.strokeStyle="rgba(".concat(j[0],",").concat(j[1],",").concat(j[2],",").concat(I*o,")"),t.lineWidth=L,t.setLineDash))switch(V){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=L/4,t.setLineDash([]);break;case"solid":default:t.setLineDash([]);break}if(M?(t.beginPath(),iAe(t,q,Z,K,re,z)):P?(t.beginPath(),SUt(t,q,Z,K,re)):(t.beginPath(),t.rect(q,Z,K,re)),Y&&t.fill(),H&&t.stroke(),H&&V==="double"){var Q=L/2;t.beginPath(),M?iAe(t,q+Q,Z+Q,K-2*Q,re-2*Q,z):t.rect(q+Q,Z+Q,K-2*Q,re-2*Q),t.stroke()}t.fillStyle=D,t.strokeStyle=B,t.lineWidth=W,t.setLineDash&&t.setLineDash([])}var te=2*e.pstyle("text-outline-width").pfValue;if(te>0&&(t.lineWidth=te),h-=v,e.pstyle("text-wrap").value==="wrap"){var ee=sl(s,"labelWrapCachedLines",r),J=sl(s,"labelLineHeight",r),ae=m/2,se=this.getLabelJustification(e);switch(se==="auto"||(E==="left"?se==="left"?u+=-m:se==="center"&&(u+=-ae):E==="center"?se==="left"?u+=-ae:se==="right"&&(u+=ae):E==="right"&&(se==="center"?u+=ae:se==="right"&&(u+=m))),k){case"top":h-=(ee.length-1)*J;break;case"center":case"bottom":h-=(ee.length-1)*J;break}for(var fe=0;fe<ee.length;fe++)te>0&&t.strokeText(ee[fe],u,h),t.fillText(ee[fe],u,h),h+=J}else te>0&&t.strokeText(p,u,h),t.fillText(p,u,h);S!==0&&(t.rotate(-S),t.translate(-d,-f))}}};var Pp={};Pp.drawNode=function(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,u,h=e._private,d=h.rscratch,f=e.position();if(!(!mr(f.x)||!mr(f.y))&&!(i&&!e.visible())){var p=i?e.effectiveOpacity():1,g=s.usePaths(),m,y=!1,v=e.padding();o=e.width()+2*v,u=e.height()+2*v;var b;r&&(b=r,t.translate(-b.x1,-b.y1));for(var w=e.pstyle("background-image"),x=w.value,T=new Array(x.length),C=new Array(x.length),S=0,E=0;E<x.length;E++){var k=x[E],A=T[E]=k!=null&&k!=="none";if(A){var I=e.cy().style().getIndexedStyle(e,"background-image-crossorigin","value",E);S++,C[E]=s.getCachedImage(k,I,function(){h.backgroundTimestamp=Date.now(),e.emitAndNotify("background")})}}var L=e.pstyle("background-blacken").value,R=e.pstyle("border-width").pfValue,O=e.pstyle("background-opacity").value*p,M=e.pstyle("border-color").value,P=e.pstyle("border-style").value,z=e.pstyle("border-join").value,D=e.pstyle("border-cap").value,B=e.pstyle("border-position").value,W=e.pstyle("border-dash-pattern").pfValue,U=e.pstyle("border-dash-offset").pfValue,j=e.pstyle("border-opacity").value*p,V=e.pstyle("outline-width").pfValue,Y=e.pstyle("outline-color").value,H=e.pstyle("outline-style").value,q=e.pstyle("outline-opacity").value*p,Z=e.pstyle("outline-offset").value,K=e.pstyle("corner-radius").value;K!=="auto"&&(K=e.pstyle("corner-radius").pfValue);var re=l(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O;s.eleFillStyle(t,e,ne)},"setupShapeColor"),Q=l(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j;s.colorStrokeStyle(t,M[0],M[1],M[2],ne)},"setupBorderColor"),te=l(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:q;s.colorStrokeStyle(t,Y[0],Y[1],Y[2],ne)},"setupOutlineColor"),ee=l(function(ne,xe,oe,_e){var ue=s.nodePathCache=s.nodePathCache||[],tt=H5e(oe==="polygon"?oe+","+_e.join(","):oe,""+xe,""+ne,""+K),Re=ue[tt],et,Xe=!1;return Re!=null?(et=Re,Xe=!0,d.pathCache=et):(et=new Path2D,ue[tt]=d.pathCache=et),{path:et,cacheHit:Xe}},"getPath"),J=e.pstyle("shape").strValue,ae=e.pstyle("shape-polygon-points").pfValue;if(g){t.translate(f.x,f.y);var se=ee(o,u,J,ae);m=se.path,y=se.cacheHit}var fe=l(function(){if(!y){var ne=f;g&&(ne={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(m||t,ne.x,ne.y,o,u,K,d)}g?t.fill(m):t.fill()},"drawShape"),ve=l(function(){for(var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,oe=h.backgrounding,_e=0,ue=0;ue<C.length;ue++){var tt=e.cy().style().getIndexedStyle(e,"background-image-containment","value",ue);if(xe&&tt==="over"||!xe&&tt==="inside"){_e++;continue}T[ue]&&C[ue].complete&&!C[ue].error&&(_e++,s.drawInscribedImage(t,C[ue],e,ue,ne))}h.backgrounding=_e!==S,oe!==h.backgrounding&&e.updateStyle(!1)},"drawImages"),de=l(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;s.hasPie(e)&&(s.drawPie(t,e,xe),ne&&(g||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,u,K,d)))},"drawPie"),Ee=l(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;s.hasStripe(e)&&(t.save(),g?t.clip(d.pathCache):(s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,u,K,d),t.clip()),s.drawStripe(t,e,xe),t.restore(),ne&&(g||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,u,K,d)))},"drawStripe"),Ce=l(function(){var ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,xe=(L>0?L:-L)*ne,oe=L>0?0:255;L!==0&&(s.colorFillStyle(t,oe,oe,oe,xe),g?t.fill(m):t.fill())},"darken"),De=l(function(){if(R>0){if(t.lineWidth=R,t.lineCap=D,t.lineJoin=z,t.setLineDash)switch(P){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(W),t.lineDashOffset=U;break;case"solid":case"double":t.setLineDash([]);break}if(B!=="center"){if(t.save(),t.lineWidth*=2,B==="inside")g?t.clip(m):t.clip();else{var ne=new Path2D;ne.rect(-o/2-R,-u/2-R,o+2*R,u+2*R),ne.addPath(m),t.clip(ne,"evenodd")}g?t.stroke(m):t.stroke(),t.restore()}else g?t.stroke(m):t.stroke();if(P==="double"){t.lineWidth=R/3;var xe=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",g?t.stroke(m):t.stroke(),t.globalCompositeOperation=xe}t.setLineDash&&t.setLineDash([])}},"drawBorder"),ce=l(function(){if(V>0){if(t.lineWidth=V,t.lineCap="butt",t.setLineDash)switch(H){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var ne=f;g&&(ne={x:0,y:0});var xe=s.getNodeShape(e),oe=R;B==="inside"&&(oe=0),B==="outside"&&(oe*=2);var _e=(o+oe+(V+Z))/o,ue=(u+oe+(V+Z))/u,tt=o*_e,Re=u*ue,et=s.nodeShapes[xe].points,Xe;if(g){var ot=ee(tt,Re,xe,et);Xe=ot.path}if(xe==="ellipse")s.drawEllipsePath(Xe||t,ne.x,ne.y,tt,Re);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(xe)){var Ge=0,ht=0,Je=0;xe==="round-diamond"?Ge=(oe+Z+V)*1.4:xe==="round-heptagon"?(Ge=(oe+Z+V)*1.075,Je=-(oe/2+Z+V)/35):xe==="round-hexagon"?Ge=(oe+Z+V)*1.12:xe==="round-pentagon"?(Ge=(oe+Z+V)*1.13,Je=-(oe/2+Z+V)/15):xe==="round-tag"?(Ge=(oe+Z+V)*1.12,ht=(oe/2+V+Z)*.07):xe==="round-triangle"&&(Ge=(oe+Z+V)*(Math.PI/2),Je=-(oe+Z/2+V)/Math.PI),Ge!==0&&(_e=(o+Ge)/o,tt=o*_e,["round-hexagon","round-tag"].includes(xe)||(ue=(u+Ge)/u,Re=u*ue)),K=K==="auto"?a_e(tt,Re):K;for(var St=tt/2,He=Re/2,dt=K+(oe+V+Z)/2,Oe=new Array(et.length/2),vt=new Array(et.length/2),qe=0;qe<et.length/2;qe++)Oe[qe]={x:ne.x+ht+St*et[qe*2],y:ne.y+Je+He*et[qe*2+1]};var Me,lt,it,Ue,we=Oe.length;for(lt=Oe[we-1],Me=0;Me<we;Me++)it=Oe[Me%we],Ue=Oe[(Me+1)%we],vt[Me]=ij(lt,it,Ue,dt),lt=it,it=Ue;s.drawRoundPolygonPath(Xe||t,ne.x+ht,ne.y+Je,o*_e,u*ue,et,vt)}else if(["roundrectangle","round-rectangle"].includes(xe))K=K==="auto"?Sp(tt,Re):K,s.drawRoundRectanglePath(Xe||t,ne.x,ne.y,tt,Re,K+(oe+V+Z)/2);else if(["cutrectangle","cut-rectangle"].includes(xe))K=K==="auto"?$Y():K,s.drawCutRectanglePath(Xe||t,ne.x,ne.y,tt,Re,null,K+(oe+V+Z)/4);else if(["bottomroundrectangle","bottom-round-rectangle"].includes(xe))K=K==="auto"?Sp(tt,Re):K,s.drawBottomRoundRectanglePath(Xe||t,ne.x,ne.y,tt,Re,K+(oe+V+Z)/2);else if(xe==="barrel")s.drawBarrelPath(Xe||t,ne.x,ne.y,tt,Re);else if(xe.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(xe)){var gt=(oe+V+Z)/o;et=HI(WI(et,gt)),s.drawPolygonPath(Xe||t,ne.x,ne.y,o,u,et)}else{var ge=(oe+V+Z)/o;et=HI(WI(et,-ge)),s.drawPolygonPath(Xe||t,ne.x,ne.y,o,u,et)}if(g?t.stroke(Xe):t.stroke(),H==="double"){t.lineWidth=oe/3;var ie=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",g?t.stroke(Xe):t.stroke(),t.globalCompositeOperation=ie}t.setLineDash&&t.setLineDash([])}},"drawOutline"),Ie=l(function(){a&&s.drawNodeOverlay(t,e,f,o,u)},"drawOverlay"),ye=l(function(){a&&s.drawNodeUnderlay(t,e,f,o,u)},"drawUnderlay"),pe=l(function(){s.drawElementText(t,e,null,n)},"drawText"),Ae=e.pstyle("ghost").value==="yes";if(Ae){var Ve=e.pstyle("ghost-offset-x").pfValue,ze=e.pstyle("ghost-offset-y").pfValue,We=e.pstyle("ghost-opacity").value,me=We*p;t.translate(Ve,ze),te(),ce(),re(We*O),fe(),ve(me,!0),Q(We*j),De(),de(L!==0||R!==0),Ee(L!==0||R!==0),ve(me,!1),Ce(me),t.translate(-Ve,-ze)}g&&t.translate(-f.x,-f.y),ye(),g&&t.translate(f.x,f.y),te(),ce(),re(),fe(),ve(p,!0),Q(),De(),de(L!==0||R!==0),Ee(L!==0||R!==0),ve(p,!1),Ce(),g&&t.translate(-f.x,-f.y),pe(),Ie(),r&&t.translate(b.x1,b.y1)}};var sAe=l(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,n,a,i,s){var o=this;if(n.visible()){var u=n.pstyle("".concat(e,"-padding")).pfValue,h=n.pstyle("".concat(e,"-opacity")).value,d=n.pstyle("".concat(e,"-color")).value,f=n.pstyle("".concat(e,"-shape")).value,p=n.pstyle("".concat(e,"-corner-radius")).value;if(h>0){if(a=a||n.position(),i==null||s==null){var g=n.padding();i=n.width()+2*g,s=n.height()+2*g}o.colorFillStyle(r,d[0],d[1],d[2],h),o.nodeShapes[f].draw(r,a.x,a.y,i+u*2,s+u*2,p),r.fill()}}}},"drawNodeOverlayUnderlay");Pp.drawNodeOverlay=sAe("overlay"),Pp.drawNodeUnderlay=sAe("underlay"),Pp.hasPie=function(t){return t=t[0],t._private.hasPie},Pp.hasStripe=function(t){return t=t[0],t._private.hasStripe},Pp.drawPie=function(t,e,r,n){e=e[0],n=n||e.position();var a=e.cy().style(),i=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),o=e.pstyle("pie-start-angle").pfValue,u=n.x,h=n.y,d=e.width(),f=e.height(),p=Math.min(d,f)/2,g,m=0,y=this.usePaths();if(y&&(u=0,h=0),i.units==="%"?p=p*i.pfValue:i.pfValue!==void 0&&(p=i.pfValue/2),s.units==="%"?g=p*s.pfValue:s.pfValue!==void 0&&(g=s.pfValue/2),!(g>=p))for(var v=1;v<=a.pieBackgroundN;v++){var b=e.pstyle("pie-"+v+"-background-size").value,w=e.pstyle("pie-"+v+"-background-color").value,x=e.pstyle("pie-"+v+"-background-opacity").value*r,T=b/100;T+m>1&&(T=1-m);var C=1.5*Math.PI+2*Math.PI*m;C+=o;var S=2*Math.PI*T,E=C+S;b===0||m>=1||m+T>1||(g===0?(t.beginPath(),t.moveTo(u,h),t.arc(u,h,p,C,E),t.closePath()):(t.beginPath(),t.arc(u,h,p,C,E),t.arc(u,h,g,E,C,!0),t.closePath()),this.colorFillStyle(t,w[0],w[1],w[2],x),t.fill(),m+=T)}},Pp.drawStripe=function(t,e,r,n){e=e[0],n=n||e.position();var a=e.cy().style(),i=n.x,s=n.y,o=e.width(),u=e.height(),h=0,d=this.usePaths();t.save();var f=e.pstyle("stripe-direction").value,p=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":t.rotate(-Math.PI/2);break}var g=o,m=u;p.units==="%"?(g=g*p.pfValue,m=m*p.pfValue):p.pfValue!==void 0&&(g=p.pfValue,m=p.pfValue),d&&(i=0,s=0),s-=g/2,i-=m/2;for(var y=1;y<=a.stripeBackgroundN;y++){var v=e.pstyle("stripe-"+y+"-background-size").value,b=e.pstyle("stripe-"+y+"-background-color").value,w=e.pstyle("stripe-"+y+"-background-opacity").value*r,x=v/100;x+h>1&&(x=1-h),!(v===0||h>=1||h+x>1)&&(t.beginPath(),t.rect(i,s+m*h,g,m*x),t.closePath(),this.colorFillStyle(t,b[0],b[1],b[2],w),t.fill(),h+=x)}t.restore()};var cl={},_Ut=100;cl.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r},cl.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,n,a=0;a<e.length;a++)if(n=e[a],n.context===t){r=!1;break}return r&&(n={context:t},e.push(n)),n},cl.createGradientStyleFor=function(t,e,r,n,a){var i,s=this.usePaths(),o=r.pstyle(e+"-gradient-stop-colors").value,u=r.pstyle(e+"-gradient-stop-positions").pfValue;if(n==="radial-gradient")if(r.isEdge()){var h=r.sourceEndpoint(),d=r.targetEndpoint(),f=r.midpoint(),p=Zm(h,f),g=Zm(d,f);i=t.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(p,g))}else{var m=s?{x:0,y:0}:r.position(),y=r.paddedWidth(),v=r.paddedHeight();i=t.createRadialGradient(m.x,m.y,0,m.x,m.y,Math.max(y,v))}else if(r.isEdge()){var b=r.sourceEndpoint(),w=r.targetEndpoint();i=t.createLinearGradient(b.x,b.y,w.x,w.y)}else{var x=s?{x:0,y:0}:r.position(),T=r.paddedWidth(),C=r.paddedHeight(),S=T/2,E=C/2,k=r.pstyle("background-gradient-direction").value;switch(k){case"to-bottom":i=t.createLinearGradient(x.x,x.y-E,x.x,x.y+E);break;case"to-top":i=t.createLinearGradient(x.x,x.y+E,x.x,x.y-E);break;case"to-left":i=t.createLinearGradient(x.x+S,x.y,x.x-S,x.y);break;case"to-right":i=t.createLinearGradient(x.x-S,x.y,x.x+S,x.y);break;case"to-bottom-right":case"to-right-bottom":i=t.createLinearGradient(x.x-S,x.y-E,x.x+S,x.y+E);break;case"to-top-right":case"to-right-top":i=t.createLinearGradient(x.x-S,x.y+E,x.x+S,x.y-E);break;case"to-bottom-left":case"to-left-bottom":i=t.createLinearGradient(x.x+S,x.y-E,x.x-S,x.y+E);break;case"to-top-left":case"to-left-top":i=t.createLinearGradient(x.x+S,x.y+E,x.x-S,x.y-E);break}}if(!i)return null;for(var A=u.length===o.length,I=o.length,L=0;L<I;L++)i.addColorStop(A?u[L]:L/(I-1),"rgba("+o[L][0]+","+o[L][1]+","+o[L][2]+","+a+")");return i},cl.gradientFillStyle=function(t,e,r,n){var a=this.createGradientStyleFor(t,"background",e,r,n);if(!a)return null;t.fillStyle=a},cl.colorFillStyle=function(t,e,r,n,a){t.fillStyle="rgba("+e+","+r+","+n+","+a+")"},cl.eleFillStyle=function(t,e,r){var n=e.pstyle("background-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientFillStyle(t,e,n,r);else{var a=e.pstyle("background-color").value;this.colorFillStyle(t,a[0],a[1],a[2],r)}},cl.gradientStrokeStyle=function(t,e,r,n){var a=this.createGradientStyleFor(t,"line",e,r,n);if(!a)return null;t.strokeStyle=a},cl.colorStrokeStyle=function(t,e,r,n,a){t.strokeStyle="rgba("+e+","+r+","+n+","+a+")"},cl.eleStrokeStyle=function(t,e,r){var n=e.pstyle("line-fill").value;if(n==="linear-gradient"||n==="radial-gradient")this.gradientStrokeStyle(t,e,n,r);else{var a=e.pstyle("line-color").value;this.colorStrokeStyle(t,a[0],a[1],a[2],r)}},cl.matchCanvasSize=function(t){var e=this,r=e.data,n=e.findContainerClientCoords(),a=n[2],i=n[3],s=e.getPixelRatio(),o=e.motionBlurPxRatio;(t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE]||t===e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG])&&(s=o);var u=a*s,h=i*s,d;if(!(u===e.canvasWidth&&h===e.canvasHeight)){e.fontCaches=null;var f=r.canvasContainer;f.style.width=a+"px",f.style.height=i+"px";for(var p=0;p<e.CANVAS_LAYERS;p++)d=r.canvases[p],d.width=u,d.height=h,d.style.width=a+"px",d.style.height=i+"px";for(var p=0;p<e.BUFFER_COUNT;p++)d=r.bufferCanvases[p],d.width=u,d.height=h,d.style.width=a+"px",d.style.height=i+"px";e.textureMult=1,s<=1&&(d=r.bufferCanvases[e.TEXTURE_BUFFER],e.textureMult=2,d.width=u*e.textureMult,d.height=h*e.textureMult),e.canvasWidth=u,e.canvasHeight=h,e.pixelRatio=s}},cl.renderTo=function(t,e,r,n){this.render({forcedContext:t,forcedZoom:e,forcedPan:r,drawAllLayers:!0,forcedPxRatio:n})},cl.clearCanvas=function(){var t=this,e=t.data;function r(n){n.clearRect(0,0,t.canvasWidth,t.canvasHeight)}l(r,"clear"),r(e.contexts[t.NODE]),r(e.contexts[t.DRAG])},cl.render=function(t){var e=this;t=t||U5e();var r=e.cy,n=t.forcedContext,a=t.drawAllLayers,i=t.drawOnlyNodeLayer,s=t.forcedZoom,o=t.forcedPan,u=t.forcedPxRatio===void 0?this.getPixelRatio():t.forcedPxRatio,h=e.data,d=h.canvasNeedsRedraw,f=e.textureOnViewport&&!n&&(e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming),p=t.motionBlur!==void 0?t.motionBlur:e.motionBlur,g=e.motionBlurPxRatio,m=r.hasCompoundNodes(),y=e.hoverData.draggingEles,v=!!(e.hoverData.selecting||e.touchData.selecting);p=p&&!n&&e.motionBlurEnabled&&!v;var b=p;n||(e.prevPxRatio!==u&&(e.invalidateContainerClientCoordsCache(),e.matchCanvasSize(e.container),e.redrawHint("eles",!0),e.redrawHint("drag",!0)),e.prevPxRatio=u),!n&&e.motionBlurTimeout&&clearTimeout(e.motionBlurTimeout),p&&(e.mbFrames==null&&(e.mbFrames=0),e.mbFrames++,e.mbFrames<3&&(b=!1),e.mbFrames>e.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(d[e.NODE]=!0,d[e.SELECT_BOX]=!0);var w=r.style(),x=r.zoom(),T=s!==void 0?s:x,C=r.pan(),S={x:C.x,y:C.y},E={zoom:x,pan:{x:C.x,y:C.y}},k=e.prevViewport,A=k===void 0||E.zoom!==k.zoom||E.pan.x!==k.pan.x||E.pan.y!==k.pan.y;!A&&!(y&&!m)&&(e.motionBlurPxRatio=1),o&&(S=o),T*=u,S.x*=u,S.y*=u;var I=e.getCachedZSortedEles();function L(Q,te,ee,J,ae){var se=Q.globalCompositeOperation;Q.globalCompositeOperation="destination-out",e.colorFillStyle(Q,255,255,255,e.motionBlurTransparency),Q.fillRect(te,ee,J,ae),Q.globalCompositeOperation=se}l(L,"mbclear");function R(Q,te){var ee,J,ae,se;!e.clearingMotionBlur&&(Q===h.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||Q===h.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(ee={x:C.x*g,y:C.y*g},J=x*g,ae=e.canvasWidth*g,se=e.canvasHeight*g):(ee=S,J=T,ae=e.canvasWidth,se=e.canvasHeight),Q.setTransform(1,0,0,1,0,0),te==="motionBlur"?L(Q,0,0,ae,se):!n&&(te===void 0||te)&&Q.clearRect(0,0,ae,se),a||(Q.translate(ee.x,ee.y),Q.scale(J,J)),o&&Q.translate(o.x,o.y),s&&Q.scale(s,s)}if(l(R,"setContextTransform"),f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var O=e.data.bufferContexts[e.TEXTURE_BUFFER];O.setTransform(1,0,0,1,0,0),O.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:O,drawOnlyNodeLayer:!0,forcedPxRatio:u*e.textureMult});var E=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};E.mpan={x:(0-E.pan.x)/E.zoom,y:(0-E.pan.y)/E.zoom}}d[e.DRAG]=!1,d[e.NODE]=!1;var M=h.contexts[e.NODE],P=e.textureCache.texture,E=e.textureCache.viewport;M.setTransform(1,0,0,1,0,0),p?L(M,0,0,E.width,E.height):M.clearRect(0,0,E.width,E.height);var z=w.core("outside-texture-bg-color").value,D=w.core("outside-texture-bg-opacity").value;e.colorFillStyle(M,z[0],z[1],z[2],D),M.fillRect(0,0,E.width,E.height);var x=r.zoom();R(M,!1),M.clearRect(E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u),M.drawImage(P,E.mpan.x,E.mpan.y,E.width/E.zoom/u,E.height/E.zoom/u)}else e.textureOnViewport&&!n&&(e.textureCache=null);var B=r.extent(),W=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),U=e.hideEdgesOnViewport&&W,j=[];if(j[e.NODE]=!d[e.NODE]&&p&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,j[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),j[e.DRAG]=!d[e.DRAG]&&p&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,j[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),d[e.NODE]||a||i||j[e.NODE]){var V=p&&!j[e.NODE]&&g!==1,M=n||(V?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:h.contexts[e.NODE]),Y=p&&!V?"motionBlur":void 0;R(M,Y),U?e.drawCachedNodes(M,I.nondrag,u,B):e.drawLayeredElements(M,I.nondrag,u,B),e.debug&&e.drawDebugPoints(M,I.nondrag),!a&&!p&&(d[e.NODE]=!1)}if(!i&&(d[e.DRAG]||a||j[e.DRAG])){var V=p&&!j[e.DRAG]&&g!==1,M=n||(V?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:h.contexts[e.DRAG]);R(M,p&&!V?"motionBlur":void 0),U?e.drawCachedNodes(M,I.drag,u,B):e.drawCachedElements(M,I.drag,u,B),e.debug&&e.drawDebugPoints(M,I.drag),!a&&!p&&(d[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,R),p&&g!==1){var H=h.contexts[e.NODE],q=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],Z=h.contexts[e.DRAG],K=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],re=l(function(te,ee,J){te.setTransform(1,0,0,1,0,0),J||!b?te.clearRect(0,0,e.canvasWidth,e.canvasHeight):L(te,0,0,e.canvasWidth,e.canvasHeight);var ae=g;te.drawImage(ee,0,0,e.canvasWidth*ae,e.canvasHeight*ae,0,0,e.canvasWidth,e.canvasHeight)},"drawMotionBlur");(d[e.NODE]||j[e.NODE])&&(re(H,q,j[e.NODE]),d[e.NODE]=!1),(d[e.DRAG]||j[e.DRAG])&&(re(Z,K,j[e.DRAG]),d[e.DRAG]=!1)}e.prevViewport=E,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),p&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,d[e.NODE]=!0,d[e.DRAG]=!0,e.redraw()},_Ut)),n||r.emit("render")};var L5;cl.drawSelectionRectangle=function(t,e){var r=this,n=r.cy,a=r.data,i=n.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,u=a.canvasNeedsRedraw,h=t.forcedContext;if(r.showFps||!s&&u[r.SELECT_BOX]&&!o){var d=h||a.contexts[r.SELECT_BOX];if(e(d),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),p=i.core("selection-box-border-width").value/f;d.lineWidth=p,d.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",d.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),p>0&&(d.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",d.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(a.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),g=a.bgActivePosistion;d.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",d.beginPath(),d.arc(g.x,g.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),d.fill()}var m=r.lastRedrawTime;if(r.showFps&&m){m=Math.round(m);var y=Math.round(1e3/m),v="1 frame = "+m+" ms = "+y+" fps";if(d.setTransform(1,0,0,1,0,0),d.fillStyle="rgba(255, 0, 0, 0.75)",d.strokeStyle="rgba(255, 0, 0, 0.75)",d.font="30px Arial",!L5){var b=d.measureText(v);L5=b.actualBoundingBoxAscent}d.fillText(v,0,L5);var w=60;d.strokeRect(0,L5+10,250,20),d.fillRect(0,L5+10,250*Math.min(y/w,1),20)}o||(u[r.SELECT_BOX]=!1)}};function oAe(t,e,r){var n=t.createShader(e);if(t.shaderSource(n,r),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(n));return n}l(oAe,"compileShader");function kUt(t,e,r){var n=oAe(t,t.VERTEX_SHADER,e),a=oAe(t,t.FRAGMENT_SHADER,r),i=t.createProgram();if(t.attachShader(i,n),t.attachShader(i,a),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw new Error("Could not initialize shaders");return i}l(kUt,"createProgram");function AUt(t,e,r){r===void 0&&(r=e);var n=t.makeOffscreenCanvas(e,r),a=n.context=n.getContext("2d");return n.clear=function(){return a.clearRect(0,0,n.width,n.height)},n.clear(),n}l(AUt,"createTextureCanvas");function hj(t){var e=t.pixelRatio,r=t.cy.zoom(),n=t.cy.pan();return{zoom:r*e,pan:{x:n.x*e,y:n.y*e}}}l(hj,"getEffectivePanZoom");function NUt(t){var e=t.pixelRatio,r=t.cy.zoom();return r*e}l(NUt,"getEffectiveZoom");function IUt(t,e,r,n,a){var i=n*r+e.x,s=a*r+e.y;return s=Math.round(t.canvasHeight-s),[i,s]}l(IUt,"modelToRenderedPosition");function LUt(t,e){return e.picking?!0:t.pstyle("background-fill").value!=="solid"||t.pstyle("background-image").strValue!=="none"?!1:t.pstyle("border-width").value===0||t.pstyle("border-opacity").value===0?!0:t.pstyle("border-style").value==="solid"}l(LUt,"isSimpleShape");function $Ut(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}l($Ut,"arrayEqual");function o1(t,e,r){var n=t[0]/255,a=t[1]/255,i=t[2]/255,s=e,o=r||new Array(4);return o[0]=n*s,o[1]=a*s,o[2]=i*s,o[3]=s,o}l(o1,"toWebGLColor");function qT(t,e){var r=e||new Array(4);return r[0]=(t>>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}l(qT,"indexToVec4");function MUt(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}l(MUt,"vec4ToIndex");function PUt(t,e){var r=t.createTexture();return r.buffer=function(n){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}l(PUt,"createTexture");function lAe(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}l(lAe,"getTypeInfo");function cAe(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}l(cAe,"createTypedArray");function RUt(t,e,r,n,a,i){switch(e){case t.FLOAT:return new Float32Array(r.buffer,i*n,a);case t.INT:return new Int32Array(r.buffer,i*n,a)}}l(RUt,"createTypedArrayView");function OUt(t,e,r,n){var a=lAe(t,e),i=Ji(a,2),s=i[0],o=i[1],u=cAe(t,o,n),h=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,h),t.bufferData(t.ARRAY_BUFFER,u,t.STATIC_DRAW),o===t.FLOAT?t.vertexAttribPointer(r,s,o,!1,0,0):o===t.INT&&t.vertexAttribIPointer(r,s,o,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),h}l(OUt,"createBufferStaticDraw");function ld(t,e,r,n){var a=lAe(t,r),i=Ji(a,3),s=i[0],o=i[1],u=i[2],h=cAe(t,o,e*s),d=s*u,f=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,f),t.bufferData(t.ARRAY_BUFFER,e*d,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),o===t.FLOAT?t.vertexAttribPointer(n,s,o,!1,d,0):o===t.INT&&t.vertexAttribIPointer(n,s,o,d,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var p=new Array(e),g=0;g<e;g++)p[g]=RUt(t,o,h,d,s,g);return f.dataArray=h,f.stride=d,f.size=s,f.getView=function(m){return p[m]},f.setPoint=function(m,y,v){var b=p[m];b[0]=y,b[1]=v},f.bufferSubData=function(m){t.bindBuffer(t.ARRAY_BUFFER,f),m?t.bufferSubData(t.ARRAY_BUFFER,0,h,0,m*s):t.bufferSubData(t.ARRAY_BUFFER,0,h)},f}l(ld,"createBufferDynamicDraw");function DUt(t,e,r){for(var n=9,a=new Float32Array(e*n),i=new Array(e),s=0;s<e;s++){var o=s*n*4;i[s]=new Float32Array(a.buffer,o,n)}var u=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,a.byteLength,t.DYNAMIC_DRAW);for(var h=0;h<3;h++){var d=r+h;t.enableVertexAttribArray(d),t.vertexAttribPointer(d,3,t.FLOAT,!1,36,h*12),t.vertexAttribDivisor(d,1)}return t.bindBuffer(t.ARRAY_BUFFER,null),u.getMatrixView=function(f){return i[f]},u.setData=function(f,p){i[p].set(f,0)},u.bufferSubData=function(){t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferSubData(t.ARRAY_BUFFER,0,a)},u}l(DUt,"create3x3MatrixBufferDynamicDraw");function FUt(t){var e=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,e);var r=t.createTexture();return t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,r,0),t.bindFramebuffer(t.FRAMEBUFFER,null),e.setFramebufferAttachmentSizes=function(n,a){t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,n,a,0,t.RGBA,t.UNSIGNED_BYTE,null)},e}l(FUt,"createPickingFrameBuffer");var uAe=typeof Float32Array!="undefined"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function dj(){var t=new uAe(9);return uAe!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}l(dj,"create");function hAe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}l(hAe,"identity$2");function BUt(t,e,r){var n=e[0],a=e[1],i=e[2],s=e[3],o=e[4],u=e[5],h=e[6],d=e[7],f=e[8],p=r[0],g=r[1],m=r[2],y=r[3],v=r[4],b=r[5],w=r[6],x=r[7],T=r[8];return t[0]=p*n+g*s+m*h,t[1]=p*a+g*o+m*d,t[2]=p*i+g*u+m*f,t[3]=y*n+v*s+b*h,t[4]=y*a+v*o+b*d,t[5]=y*i+v*u+b*f,t[6]=w*n+x*s+T*h,t[7]=w*a+x*o+T*d,t[8]=w*i+x*u+T*f,t}l(BUt,"multiply");function SL(t,e,r){var n=e[0],a=e[1],i=e[2],s=e[3],o=e[4],u=e[5],h=e[6],d=e[7],f=e[8],p=r[0],g=r[1];return t[0]=n,t[1]=a,t[2]=i,t[3]=s,t[4]=o,t[5]=u,t[6]=p*n+g*s+h,t[7]=p*a+g*o+d,t[8]=p*i+g*u+f,t}l(SL,"translate");function dAe(t,e,r){var n=e[0],a=e[1],i=e[2],s=e[3],o=e[4],u=e[5],h=e[6],d=e[7],f=e[8],p=Math.sin(r),g=Math.cos(r);return t[0]=g*n+p*s,t[1]=g*a+p*o,t[2]=g*i+p*u,t[3]=g*s-p*n,t[4]=g*o-p*a,t[5]=g*u-p*i,t[6]=h,t[7]=d,t[8]=f,t}l(dAe,"rotate");function fj(t,e,r){var n=r[0],a=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=a*e[3],t[4]=a*e[4],t[5]=a*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}l(fj,"scale$1");function zUt(t,e,r){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}l(zUt,"projection");var HUt=function(){function t(e,r,n,a){yp(this,t),this.debugID=Math.floor(Math.random()*1e4),this.r=e,this.texSize=r,this.texRows=n,this.texHeight=Math.floor(r/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=a(e,r,r),this.scratch=a(e,r,this.texHeight,"scratch")}return l(t,"Atlas"),vp(t,[{key:"lock",value:l(function(){this.locked=!0},"lock")},{key:"getKeys",value:l(function(){return new Set(this.keyToLocation.keys())},"getKeys")},{key:"getScale",value:l(function(r){var n=r.w,a=r.h,i=this.texHeight,s=this.texSize,o=i/a,u=n*o,h=a*o;return u>s&&(o=s/n,u=n*o,h=a*o),{scale:o,texW:u,texH:h}},"getScale")},{key:"draw",value:l(function(r,n,a){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,u=this.texHeight,h=this.getScale(n),d=h.scale,f=h.texW,p=h.texH,g=l(function(x,T){if(a&&T){var C=T.context,S=x.x,E=x.row,k=S,A=u*E;C.save(),C.translate(k,A),C.scale(d,d),a(C,n),C.restore()}},"drawAt"),m=[null,null],y=l(function(){g(i.freePointer,i.canvas),m[0]={x:i.freePointer.x,y:i.freePointer.row*u,w:f,h:p},m[1]={x:i.freePointer.x+f,y:i.freePointer.row*u,w:0,h:p},i.freePointer.x+=f,i.freePointer.x==s&&(i.freePointer.x=0,i.freePointer.row++)},"drawNormal"),v=l(function(){var x=i.scratch,T=i.canvas;x.clear(),g({x:0,row:0},x);var C=s-i.freePointer.x,S=f-C,E=u;{var k=i.freePointer.x,A=i.freePointer.row*u,I=C;T.context.drawImage(x,0,0,I,E,k,A,I,E),m[0]={x:k,y:A,w:I,h:p}}{var L=C,R=(i.freePointer.row+1)*u,O=S;T&&T.context.drawImage(x,L,0,O,E,0,R,O,E),m[1]={x:0,y:R,w:O,h:p}}i.freePointer.x=S,i.freePointer.row++},"drawWrapped"),b=l(function(){i.freePointer.x=0,i.freePointer.row++},"moveToStartOfNextRow");if(this.freePointer.x+f<=s)y();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(b(),y()):this.enableWrapping?v():(b(),y())}return this.keyToLocation.set(r,m),this.needsBuffer=!0,m},"draw")},{key:"getOffsets",value:l(function(r){return this.keyToLocation.get(r)},"getOffsets")},{key:"isEmpty",value:l(function(){return this.freePointer.x===0&&this.freePointer.row===0},"isEmpty")},{key:"canFit",value:l(function(r){if(this.locked)return!1;var n=this.texSize,a=this.texRows,i=this.getScale(r),s=i.texW;return this.freePointer.x+s>n?this.freePointer.row<a-1:!0},"canFit")},{key:"bufferIfNeeded",value:l(function(r){this.texture||(this.texture=PUt(r,this.debugID)),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked&&(this.canvas=null,this.scratch=null))},"bufferIfNeeded")},{key:"dispose",value:l(function(){this.texture&&(this.texture.deleteTexture(),this.texture=null),this.canvas=null,this.scratch=null,this.locked=!0},"dispose")}])}(),WUt=function(){function t(e,r,n,a){yp(this,t),this.r=e,this.texSize=r,this.texRows=n,this.createTextureCanvas=a,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}return l(t,"AtlasCollection"),vp(t,[{key:"getKeys",value:l(function(){return new Set(this.styleKeyToAtlas.keys())},"getKeys")},{key:"_createAtlas",value:l(function(){var r=this.r,n=this.texSize,a=this.texRows,i=this.createTextureCanvas;return new HUt(r,n,a,i)},"_createAtlas")},{key:"_getScratchCanvas",value:l(function(){if(!this.scratch){var r=this.r,n=this.texSize,a=this.texRows,i=this.createTextureCanvas,s=Math.floor(n/a);this.scratch=i(r,n,s,"scratch")}return this.scratch},"_getScratchCanvas")},{key:"draw",value:l(function(r,n,a){var i=this.styleKeyToAtlas.get(r);return i||(i=this.atlases[this.atlases.length-1],(!i||!i.canFit(n))&&(i&&i.lock(),i=this._createAtlas(),this.atlases.push(i)),i.draw(r,n,a),this.styleKeyToAtlas.set(r,i)),i},"draw")},{key:"getAtlas",value:l(function(r){return this.styleKeyToAtlas.get(r)},"getAtlas")},{key:"hasAtlas",value:l(function(r){return this.styleKeyToAtlas.has(r)},"hasAtlas")},{key:"markKeyForGC",value:l(function(r){this.markedKeys.add(r)},"markKeyForGC")},{key:"gc",value:l(function(){var r=this,n=this.markedKeys;if(n.size===0){console.log("nothing to garbage collect");return}var a=[],i=new Map,s=null,o=ql(this.atlases),u;try{var h=l(function(){var f=u.value,p=f.getKeys(),g=VUt(n,p);if(g.size===0)return a.push(f),p.forEach(function(C){return i.set(C,f)}),1;s||(s=r._createAtlas(),a.push(s));var m=ql(p),y;try{for(m.s();!(y=m.n()).done;){var v=y.value;if(!g.has(v)){var b=f.getOffsets(v),w=Ji(b,2),x=w[0],T=w[1];s.canFit({w:x.w+T.w,h:x.h})||(s.lock(),s=r._createAtlas(),a.push(s)),f.canvas&&(r._copyTextureToNewAtlas(v,f,s),i.set(v,s))}}}catch(C){m.e(C)}finally{m.f()}f.dispose()},"_loop");for(o.s();!(u=o.n()).done;)h()}catch(d){o.e(d)}finally{o.f()}this.atlases=a,this.styleKeyToAtlas=i,this.markedKeys=new Set},"gc")},{key:"_copyTextureToNewAtlas",value:l(function(r,n,a){var i=n.getOffsets(r),s=Ji(i,2),o=s[0],u=s[1];if(u.w===0)a.draw(r,o,function(p){p.drawImage(n.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h)});else{var h=this._getScratchCanvas();h.clear(),h.context.drawImage(n.canvas,o.x,o.y,o.w,o.h,0,0,o.w,o.h),h.context.drawImage(n.canvas,u.x,u.y,u.w,u.h,o.w,0,u.w,u.h);var d=o.w+u.w,f=o.h;a.draw(r,{w:d,h:f},function(p){p.drawImage(h,0,0,d,f,0,0,d,f)})}},"_copyTextureToNewAtlas")},{key:"getCounts",value:l(function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}},"getCounts")}])}();function VUt(t,e){return t.intersection?t.intersection(e):new Set(kI(t).filter(function(r){return e.has(r)}))}l(VUt,"intersection$1");var GUt=function(){function t(e,r){yp(this,t),this.r=e,this.globalOptions=r,this.atlasSize=r.webglTexSize,this.maxAtlasesPerBatch=r.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}return l(t,"AtlasManager"),vp(t,[{key:"getAtlasSize",value:l(function(){return this.atlasSize},"getAtlasSize")},{key:"addAtlasCollection",value:l(function(r,n){var a=this.globalOptions,i=a.webglTexSize,s=a.createTextureCanvas,o=n.texRows,u=this._cacheScratchCanvas(s),h=new WUt(this.r,i,o,u);this.collections.set(r,h)},"addAtlasCollection")},{key:"addRenderType",value:l(function(r,n){var a=n.collection;if(!this.collections.has(a))throw new Error("invalid atlas collection name '".concat(a,"'"));var i=this.collections.get(a),s=zr({type:r,atlasCollection:i},n);this.renderTypes.set(r,s)},"addRenderType")},{key:"getRenderTypeOpts",value:l(function(r){return this.renderTypes.get(r)},"getRenderTypeOpts")},{key:"getAtlasCollection",value:l(function(r){return this.collections.get(r)},"getAtlasCollection")},{key:"_cacheScratchCanvas",value:l(function(r){var n=-1,a=-1,i=null;return function(s,o,u,h){return h?((!i||o!=n||u!=a)&&(n=o,a=u,i=r(s,o,u)),i):r(s,o,u)}},"_cacheScratchCanvas")},{key:"_key",value:l(function(r,n){return"".concat(r,"-").concat(n)},"_key")},{key:"invalidate",value:l(function(r){var n=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.forceRedraw,s=i===void 0?!1:i,o=a.filterEle,u=o===void 0?function(){return!0}:o,h=a.filterType,d=h===void 0?function(){return!0}:h,f=!1,p=!1,g=ql(r),m;try{for(g.s();!(m=g.n()).done;){var y=m.value;if(u(y)){var v=ql(this.renderTypes.values()),b;try{var w=l(function(){var T=b.value,C=T.type;if(d(C)){var S=n.collections.get(T.collection),E=T.getKey(y),k=Array.isArray(E)?E:[E];if(s)k.forEach(function(R){return S.markKeyForGC(R)}),p=!0;else{var A=T.getID?T.getID(y):y.id(),I=n._key(C,A),L=n.typeAndIdToKey.get(I);L!==void 0&&!$Ut(k,L)&&(f=!0,n.typeAndIdToKey.delete(I),L.forEach(function(R){return S.markKeyForGC(R)}))}}},"_loop2");for(v.s();!(b=v.n()).done;)w()}catch(x){v.e(x)}finally{v.f()}}}}catch(x){g.e(x)}finally{g.f()}return p&&(this.gc(),f=!1),f},"invalidate")},{key:"gc",value:l(function(){var r=ql(this.collections.values()),n;try{for(r.s();!(n=r.n()).done;){var a=n.value;a.gc()}}catch(i){r.e(i)}finally{r.f()}},"gc")},{key:"getOrCreateAtlas",value:l(function(r,n,a,i){var s=this.renderTypes.get(n),o=this.collections.get(s.collection),u=!1,h=o.draw(i,a,function(p){s.drawClipped?(p.save(),p.beginPath(),p.rect(0,0,a.w,a.h),p.clip(),s.drawElement(p,r,a,!0,!0),p.restore()):s.drawElement(p,r,a,!0,!0),u=!0});if(u){var d=s.getID?s.getID(r):r.id(),f=this._key(n,d);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(i):this.typeAndIdToKey.set(f,[i])}return h},"getOrCreateAtlas")},{key:"getAtlasInfo",value:l(function(r,n){var a=this,i=this.renderTypes.get(n),s=i.getKey(r),o=Array.isArray(s)?s:[s];return o.map(function(u){var h=i.getBoundingBox(r,u),d=a.getOrCreateAtlas(r,n,h,u),f=d.getOffsets(u),p=Ji(f,2),g=p[0],m=p[1];return{atlas:d,tex:g,tex1:g,tex2:m,bb:h}})},"getAtlasInfo")},{key:"getDebugInfo",value:l(function(){var r=[],n=ql(this.collections),a;try{for(n.s();!(a=n.n()).done;){var i=Ji(a.value,2),s=i[0],o=i[1],u=o.getCounts(),h=u.keyCount,d=u.atlasCount;r.push({type:s,keyCount:h,atlasCount:d})}}catch(f){n.e(f)}finally{n.f()}return r},"getDebugInfo")}])}(),qUt=function(){function t(e){yp(this,t),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return l(t,"AtlasBatchManager"),vp(t,[{key:"getMaxAtlasesPerBatch",value:l(function(){return this.maxAtlasesPerBatch},"getMaxAtlasesPerBatch")},{key:"getAtlasSize",value:l(function(){return this.atlasSize},"getAtlasSize")},{key:"getIndexArray",value:l(function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,n){return n})},"getIndexArray")},{key:"startBatch",value:l(function(){this.batchAtlases=[]},"startBatch")},{key:"getAtlasCount",value:l(function(){return this.batchAtlases.length},"getAtlasCount")},{key:"getAtlases",value:l(function(){return this.batchAtlases},"getAtlases")},{key:"canAddToCurrentBatch",value:l(function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0},"canAddToCurrentBatch")},{key:"getAtlasIndexForBatch",value:l(function(r){var n=this.batchAtlases.indexOf(r);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),n=this.batchAtlases.length-1}return n},"getAtlasIndexForBatch")}])}(),YUt=`
|
||
float circleSD(vec2 p, float r) {
|
||
return distance(vec2(0), p) - r; // signed distance
|
||
}
|
||
`,UUt=`
|
||
float rectangleSD(vec2 p, vec2 b) {
|
||
vec2 d = abs(p)-b;
|
||
return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);
|
||
}
|
||
`,jUt=`
|
||
float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {
|
||
cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;
|
||
cr.x = (p.y > 0.0) ? cr.x : cr.y;
|
||
vec2 q = abs(p) - b + cr.x;
|
||
return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;
|
||
}
|
||
`,KUt=`
|
||
float ellipseSD(vec2 p, vec2 ab) {
|
||
p = abs( p ); // symmetry
|
||
|
||
// find root with Newton solver
|
||
vec2 q = ab*(p-ab);
|
||
float w = (q.x<q.y)? 1.570796327 : 0.0;
|
||
for( int i=0; i<5; i++ ) {
|
||
vec2 cs = vec2(cos(w),sin(w));
|
||
vec2 u = ab*vec2( cs.x,cs.y);
|
||
vec2 v = ab*vec2(-cs.y,cs.x);
|
||
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
|
||
}
|
||
|
||
// compute final point and distance
|
||
float d = length(p-ab*vec2(cos(w),sin(w)));
|
||
|
||
// return signed distance
|
||
return (dot(p/ab,p/ab)>1.0) ? d : -d;
|
||
}
|
||
`,$5={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},_L={IGNORE:1,USE_BB:2},pj=0,fAe=1,pAe=2,gj=3,YT=4,kL=5,M5=6,P5=7,XUt=function(){function t(e,r,n){yp(this,t),this.r=e,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=AUt,this.atlasManager=new GUt(e,n),this.batchManager=new qUt(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram($5.SCREEN),this.pickingProgram=this._createShaderProgram($5.PICKING),this.vao=this._createVAO()}return l(t,"ElementDrawingWebGL"),vp(t,[{key:"addAtlasCollection",value:l(function(r,n){this.atlasManager.addAtlasCollection(r,n)},"addAtlasCollection")},{key:"addTextureAtlasRenderType",value:l(function(r,n){this.atlasManager.addRenderType(r,n)},"addTextureAtlasRenderType")},{key:"addSimpleShapeRenderType",value:l(function(r,n){this.simpleShapeOptions.set(r,n)},"addSimpleShapeRenderType")},{key:"invalidate",value:l(function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.type,i=this.atlasManager;return a?i.invalidate(r,{filterType:l(function(o){return o===a},"filterType"),forceRedraw:!0}):i.invalidate(r)},"invalidate")},{key:"gc",value:l(function(){this.atlasManager.gc()},"gc")},{key:"_createShaderProgram",value:l(function(r){var n=this.gl,a=`#version 300 es
|
||
precision highp float;
|
||
|
||
uniform mat3 uPanZoomMatrix;
|
||
uniform int uAtlasSize;
|
||
|
||
// instanced
|
||
in vec2 aPosition; // a vertex from the unit square
|
||
|
||
in mat3 aTransform; // used to transform verticies, eg into a bounding box
|
||
in int aVertType; // the type of thing we are rendering
|
||
|
||
// the z-index that is output when using picking mode
|
||
in vec4 aIndex;
|
||
|
||
// For textures
|
||
in int aAtlasId; // which shader unit/atlas to use
|
||
in vec4 aTex; // x/y/w/h of texture in atlas
|
||
|
||
// for edges
|
||
in vec4 aPointAPointB;
|
||
in vec4 aPointCPointD;
|
||
in vec2 aLineWidth; // also used for node border width
|
||
|
||
// simple shapes
|
||
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
|
||
in vec4 aColor; // also used for edges
|
||
in vec4 aBorderColor; // aLineWidth is used for border width
|
||
|
||
// output values passed to the fragment shader
|
||
out vec2 vTexCoord;
|
||
out vec4 vColor;
|
||
out vec2 vPosition;
|
||
// flat values are not interpolated
|
||
flat out int vAtlasId;
|
||
flat out int vVertType;
|
||
flat out vec2 vTopRight;
|
||
flat out vec2 vBotLeft;
|
||
flat out vec4 vCornerRadius;
|
||
flat out vec4 vBorderColor;
|
||
flat out vec2 vBorderWidth;
|
||
flat out vec4 vIndex;
|
||
|
||
void main(void) {
|
||
int vid = gl_VertexID;
|
||
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
|
||
|
||
if(aVertType == `.concat(pj,`) {
|
||
float texX = aTex.x; // texture coordinates
|
||
float texY = aTex.y;
|
||
float texW = aTex.z;
|
||
float texH = aTex.w;
|
||
|
||
if(vid == 1 || vid == 2 || vid == 4) {
|
||
texX += texW;
|
||
}
|
||
if(vid == 2 || vid == 4 || vid == 5) {
|
||
texY += texH;
|
||
}
|
||
|
||
float d = float(uAtlasSize);
|
||
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
||
}
|
||
else if(aVertType == `).concat(YT," || aVertType == ").concat(P5,`
|
||
|| aVertType == `).concat(kL," || aVertType == ").concat(M5,`) { // simple shapes
|
||
|
||
// the bounding box is needed by the fragment shader
|
||
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
|
||
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
|
||
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
|
||
|
||
// calculations are done in the fragment shader, just pass these along
|
||
vColor = aColor;
|
||
vCornerRadius = aCornerRadius;
|
||
vBorderColor = aBorderColor;
|
||
vBorderWidth = aLineWidth;
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
||
}
|
||
else if(aVertType == `).concat(fAe,`) {
|
||
vec2 source = aPointAPointB.xy;
|
||
vec2 target = aPointAPointB.zw;
|
||
|
||
// adjust the geometry so that the line is centered on the edge
|
||
position.y = position.y - 0.5;
|
||
|
||
// stretch the unit square into a long skinny rectangle
|
||
vec2 xBasis = target - source;
|
||
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
|
||
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
|
||
vColor = aColor;
|
||
}
|
||
else if(aVertType == `).concat(pAe,`) {
|
||
vec2 pointA = aPointAPointB.xy;
|
||
vec2 pointB = aPointAPointB.zw;
|
||
vec2 pointC = aPointCPointD.xy;
|
||
vec2 pointD = aPointCPointD.zw;
|
||
|
||
// adjust the geometry so that the line is centered on the edge
|
||
position.y = position.y - 0.5;
|
||
|
||
vec2 p0, p1, p2, pos;
|
||
if(position.x == 0.0) { // The left side of the unit square
|
||
p0 = pointA;
|
||
p1 = pointB;
|
||
p2 = pointC;
|
||
pos = position;
|
||
} else { // The right side of the unit square, use same approach but flip the geometry upside down
|
||
p0 = pointD;
|
||
p1 = pointC;
|
||
p2 = pointB;
|
||
pos = vec2(0.0, -position.y);
|
||
}
|
||
|
||
vec2 p01 = p1 - p0;
|
||
vec2 p12 = p2 - p1;
|
||
vec2 p21 = p1 - p2;
|
||
|
||
// Find the normal vector.
|
||
vec2 tangent = normalize(normalize(p12) + normalize(p01));
|
||
vec2 normal = vec2(-tangent.y, tangent.x);
|
||
|
||
// Find the vector perpendicular to p0 -> p1.
|
||
vec2 p01Norm = normalize(vec2(-p01.y, p01.x));
|
||
|
||
// Determine the bend direction.
|
||
float sigma = sign(dot(p01 + p21, normal));
|
||
float width = aLineWidth[0];
|
||
|
||
if(sign(pos.y) == -sigma) {
|
||
// This is an intersecting vertex. Adjust the position so that there's no overlap.
|
||
vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
|
||
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
||
} else {
|
||
// This is a non-intersecting vertex. Treat it like a mitre join.
|
||
vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
|
||
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
|
||
}
|
||
|
||
vColor = aColor;
|
||
}
|
||
else if(aVertType == `).concat(gj,` && vid < 3) {
|
||
// massage the first triangle into an edge arrow
|
||
if(vid == 0)
|
||
position = vec2(-0.15, -0.3);
|
||
if(vid == 1)
|
||
position = vec2( 0.0, 0.0);
|
||
if(vid == 2)
|
||
position = vec2( 0.15, -0.3);
|
||
|
||
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
||
vColor = aColor;
|
||
}
|
||
else {
|
||
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
|
||
}
|
||
|
||
vAtlasId = aAtlasId;
|
||
vVertType = aVertType;
|
||
vIndex = aIndex;
|
||
}
|
||
`),i=this.batchManager.getIndexArray(),s=`#version 300 es
|
||
precision highp float;
|
||
|
||
// declare texture unit for each texture atlas in the batch
|
||
`.concat(i.map(function(h){return"uniform sampler2D uTexture".concat(h,";")}).join(`
|
||
`),`
|
||
|
||
uniform vec4 uBGColor;
|
||
uniform float uZoom;
|
||
|
||
in vec2 vTexCoord;
|
||
in vec4 vColor;
|
||
in vec2 vPosition; // model coordinates
|
||
|
||
flat in int vAtlasId;
|
||
flat in vec4 vIndex;
|
||
flat in int vVertType;
|
||
flat in vec2 vTopRight;
|
||
flat in vec2 vBotLeft;
|
||
flat in vec4 vCornerRadius;
|
||
flat in vec4 vBorderColor;
|
||
flat in vec2 vBorderWidth;
|
||
|
||
out vec4 outColor;
|
||
|
||
`).concat(YUt,`
|
||
`).concat(UUt,`
|
||
`).concat(jUt,`
|
||
`).concat(KUt,`
|
||
|
||
vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha
|
||
return vec4(
|
||
top.rgb + (bot.rgb * (1.0 - top.a)),
|
||
top.a + (bot.a * (1.0 - top.a))
|
||
);
|
||
}
|
||
|
||
vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance
|
||
// scale to the zoom level so that borders don't look blurry when zoomed in
|
||
// note 1.5 is an aribitrary value chosen because it looks good
|
||
return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d)));
|
||
}
|
||
|
||
void main(void) {
|
||
if(vVertType == `).concat(pj,`) {
|
||
// look up the texel from the texture unit
|
||
`).concat(i.map(function(h){return"if(vAtlasId == ".concat(h,") outColor = texture(uTexture").concat(h,", vTexCoord);")}).join(`
|
||
else `),`
|
||
}
|
||
else if(vVertType == `).concat(gj,`) {
|
||
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
|
||
outColor = blend(vColor, uBGColor);
|
||
outColor.a = 1.0; // make opaque, masks out line under arrow
|
||
}
|
||
else if(vVertType == `).concat(YT,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
|
||
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
|
||
}
|
||
else if(vVertType == `).concat(YT," || vVertType == ").concat(P5,`
|
||
|| vVertType == `).concat(kL," || vVertType == ").concat(M5,`) { // use SDF
|
||
|
||
float outerBorder = vBorderWidth[0];
|
||
float innerBorder = vBorderWidth[1];
|
||
float borderPadding = outerBorder * 2.0;
|
||
float w = vTopRight.x - vBotLeft.x - borderPadding;
|
||
float h = vTopRight.y - vBotLeft.y - borderPadding;
|
||
vec2 b = vec2(w/2.0, h/2.0); // half width, half height
|
||
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
|
||
|
||
float d; // signed distance
|
||
if(vVertType == `).concat(YT,`) {
|
||
d = rectangleSD(p, b);
|
||
} else if(vVertType == `).concat(P5,` && w == h) {
|
||
d = circleSD(p, b.x); // faster than ellipse
|
||
} else if(vVertType == `).concat(P5,`) {
|
||
d = ellipseSD(p, b);
|
||
} else {
|
||
d = roundRectangleSD(p, b, vCornerRadius.wzyx);
|
||
}
|
||
|
||
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
|
||
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
|
||
if(d > 0.0) {
|
||
if(d > outerBorder) {
|
||
discard;
|
||
} else {
|
||
outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);
|
||
}
|
||
} else {
|
||
if(d > innerBorder) {
|
||
vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;
|
||
vec4 innerBorderColor = blend(vBorderColor, vColor);
|
||
outColor = distInterp(innerBorderColor, outerColor, d);
|
||
}
|
||
else {
|
||
vec4 outerColor;
|
||
if(innerBorder == 0.0 && outerBorder == 0.0) {
|
||
outerColor = vec4(0);
|
||
} else if(innerBorder == 0.0) {
|
||
outerColor = vBorderColor;
|
||
} else {
|
||
outerColor = blend(vBorderColor, vColor);
|
||
}
|
||
outColor = distInterp(vColor, outerColor, d - innerBorder);
|
||
}
|
||
}
|
||
}
|
||
else {
|
||
outColor = vColor;
|
||
}
|
||
|
||
`).concat(r.picking?`if(outColor.a == 0.0) discard;
|
||
else outColor = vIndex;`:"",`
|
||
}
|
||
`),o=kUt(n,a,s);o.aPosition=n.getAttribLocation(o,"aPosition"),o.aIndex=n.getAttribLocation(o,"aIndex"),o.aVertType=n.getAttribLocation(o,"aVertType"),o.aTransform=n.getAttribLocation(o,"aTransform"),o.aAtlasId=n.getAttribLocation(o,"aAtlasId"),o.aTex=n.getAttribLocation(o,"aTex"),o.aPointAPointB=n.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=n.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=n.getAttribLocation(o,"aLineWidth"),o.aColor=n.getAttribLocation(o,"aColor"),o.aCornerRadius=n.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=n.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=n.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=n.getUniformLocation(o,"uAtlasSize"),o.uBGColor=n.getUniformLocation(o,"uBGColor"),o.uZoom=n.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var u=0;u<this.batchManager.getMaxAtlasesPerBatch();u++)o.uTextures.push(n.getUniformLocation(o,"uTexture".concat(u)));return o},"_createShaderProgram")},{key:"_createVAO",value:l(function(){var r=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=r.length/2;var n=this.maxInstances,a=this.gl,i=this.program,s=a.createVertexArray();return a.bindVertexArray(s),OUt(a,"vec2",i.aPosition,r),this.transformBuffer=DUt(a,n,i.aTransform),this.indexBuffer=ld(a,n,"vec4",i.aIndex),this.vertTypeBuffer=ld(a,n,"int",i.aVertType),this.atlasIdBuffer=ld(a,n,"int",i.aAtlasId),this.texBuffer=ld(a,n,"vec4",i.aTex),this.pointAPointBBuffer=ld(a,n,"vec4",i.aPointAPointB),this.pointCPointDBuffer=ld(a,n,"vec4",i.aPointCPointD),this.lineWidthBuffer=ld(a,n,"vec2",i.aLineWidth),this.colorBuffer=ld(a,n,"vec4",i.aColor),this.cornerRadiusBuffer=ld(a,n,"vec4",i.aCornerRadius),this.borderColorBuffer=ld(a,n,"vec4",i.aBorderColor),a.bindVertexArray(null),s},"_createVAO")},{key:"buffers",get:l(function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(n){return xp(n,"Buffer")}).map(function(n){return r[n]})),this._buffers},"get")},{key:"startFrame",value:l(function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$5.SCREEN;this.panZoomMatrix=r,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()},"startFrame")},{key:"startBatch",value:l(function(){this.instanceCount=0,this.batchManager.startBatch()},"startBatch")},{key:"endFrame",value:l(function(){this.endBatch()},"endFrame")},{key:"_isVisible",value:l(function(r,n){return r.visible()?n&&n.isVisible?n.isVisible(r):!0:!1},"_isVisible")},{key:"drawTexture",value:l(function(r,n,a){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(a);if(this._isVisible(r,o)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&o.getTexPickingMode){var u=o.getTexPickingMode(r);if(u===_L.IGNORE)return;if(u==_L.USE_BB){this.drawPickingRectangle(r,n,a);return}}var h=i.getAtlasInfo(r,a),d=ql(h),f;try{for(d.s();!(f=d.n()).done;){var p=f.value,g=p.atlas,m=p.tex1,y=p.tex2;s.canAddToCurrentBatch(g)||this.endBatch();for(var v=s.getAtlasIndexForBatch(g),b=0,w=[[m,!0],[y,!1]];b<w.length;b++){var x=Ji(w[b],2),T=x[0],C=x[1];if(T.w!=0){var S=this.instanceCount;this.vertTypeBuffer.getView(S)[0]=pj;var E=this.indexBuffer.getView(S);qT(n,E);var k=this.atlasIdBuffer.getView(S);k[0]=v;var A=this.texBuffer.getView(S);A[0]=T.x,A[1]=T.y,A[2]=T.w,A[3]=T.h;var I=this.transformBuffer.getMatrixView(S);this.setTransformMatrix(r,I,o,p,C),this.instanceCount++,C||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(L){d.e(L)}finally{d.f()}}},"drawTexture")},{key:"setTransformMatrix",value:l(function(r,n,a,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(a.shapeProps&&a.shapeProps.padding&&(o=r.pstyle(a.shapeProps.padding).pfValue),i){var u=i.bb,h=i.tex1,d=i.tex2,f=h.w/(h.w+d.w);s||(f=1-f);var p=this._getAdjustedBB(u,o,s,f);this._applyTransformMatrix(n,p,a,r)}else{var g=a.getBoundingBox(r),m=this._getAdjustedBB(g,o,!0,1);this._applyTransformMatrix(n,m,a,r)}},"setTransformMatrix")},{key:"_applyTransformMatrix",value:l(function(r,n,a,i){var s,o;hAe(r);var u=a.getRotation?a.getRotation(i):0;if(u!==0){var h=a.getRotationPoint(i),d=h.x,f=h.y;SL(r,r,[d,f]),dAe(r,r,u);var p=a.getRotationOffset(i);s=p.x+(n.xOffset||0),o=p.y+(n.yOffset||0)}else s=n.x1,o=n.y1;SL(r,r,[s,o]),fj(r,r,[n.w,n.h])},"_applyTransformMatrix")},{key:"_getAdjustedBB",value:l(function(r,n,a,i){var s=r.x1,o=r.y1,u=r.w,h=r.h,d=r.yOffset;n&&(s-=n,o-=n,u+=2*n,h+=2*n);var f=0,p=u*i;return a&&i<1?u=p:!a&&i<1&&(f=u-p,s+=f,u=p),{x1:s,y1:o,w:u,h,xOffset:f,yOffset:d}},"_getAdjustedBB")},{key:"drawPickingRectangle",value:l(function(r,n,a){var i=this.atlasManager.getRenderTypeOpts(a),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=YT;var o=this.indexBuffer.getView(s);qT(n,o);var u=this.colorBuffer.getView(s);o1([0,0,0],1,u);var h=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(r,h,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()},"drawPickingRectangle")},{key:"drawNode",value:l(function(r,n,a){var i=this.simpleShapeOptions.get(a);if(this._isVisible(r,i)){var s=i.shapeProps,o=this._getVertTypeForShape(r,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(r,this.renderTarget)){this.drawTexture(r,n,a);return}var u=this.instanceCount;if(this.vertTypeBuffer.getView(u)[0]=o,o===kL||o===M5){var h=i.getBoundingBox(r),d=this._getCornerRadius(r,s.radius,h),f=this.cornerRadiusBuffer.getView(u);f[0]=d,f[1]=d,f[2]=d,f[3]=d,o===M5&&(f[0]=0,f[2]=0)}var p=this.indexBuffer.getView(u);qT(n,p);var g=this.renderTarget.picking?1:a==="node-body"?r.effectiveOpacity():1,m=this.renderTarget.picking?1:r.pstyle(s.opacity).value*g,y=r.pstyle(s.color).value,v=this.colorBuffer.getView(u);o1(y,m,v);var b=this.lineWidthBuffer.getView(u);if(b[0]=0,b[1]=0,s.border){var w=r.pstyle("border-width").value;if(w>0){var x=r.pstyle("border-color").value,T=g*r.pstyle("border-opacity").value,C=this.borderColorBuffer.getView(u);o1(x,T,C);var S=r.pstyle("border-position").value;if(S==="inside")b[0]=0,b[1]=-w;else if(S==="outside")b[0]=w,b[1]=0;else{var E=w/2;b[0]=E,b[1]=-E}}}var k=this.transformBuffer.getMatrixView(u);this.setTransformMatrix(r,k,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},"drawNode")},{key:"_getVertTypeForShape",value:l(function(r,n){var a=r.pstyle(n).value;switch(a){case"rectangle":return YT;case"ellipse":return P5;case"roundrectangle":case"round-rectangle":return kL;case"bottom-round-rectangle":return M5;default:return}},"_getVertTypeForShape")},{key:"_getCornerRadius",value:l(function(r,n,a){var i=a.w,s=a.h;if(r.pstyle(n).value==="auto")return Sp(i,s);var o=r.pstyle(n).pfValue,u=i/2,h=s/2;return Math.min(o,h,u)},"_getCornerRadius")},{key:"drawEdgeArrow",value:l(function(r,n,a){if(r.visible()){var i=r._private.rscratch,s,o,u;if(a==="source"?(s=i.arrowStartX,o=i.arrowStartY,u=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,u=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(u)||u==null)){var h=r.pstyle(a+"-arrow-shape").value;if(h!=="none"){var d=r.pstyle(a+"-arrow-color").value,f=r.pstyle("opacity").value,p=r.pstyle("line-opacity").value,g=f*p,m=r.pstyle("width").pfValue,y=r.pstyle("arrow-scale").value,v=this.r.getArrowWidth(m,y),b=this.instanceCount,w=this.transformBuffer.getMatrixView(b);hAe(w),SL(w,w,[s,o]),fj(w,w,[v,v]),dAe(w,w,u),this.vertTypeBuffer.getView(b)[0]=gj;var x=this.indexBuffer.getView(b);qT(n,x);var T=this.colorBuffer.getView(b);o1(d,g,T),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},"drawEdgeArrow")},{key:"drawEdgeLine",value:l(function(r,n){if(r.visible()){var a=this._getEdgePoints(r);if(a){var i=r.pstyle("opacity").value,s=r.pstyle("line-opacity").value,o=r.pstyle("width").pfValue,u=r.pstyle("line-color").value,h=i*s;if(a.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),a.length==4){var d=this.instanceCount;this.vertTypeBuffer.getView(d)[0]=fAe;var f=this.indexBuffer.getView(d);qT(n,f);var p=this.colorBuffer.getView(d);o1(u,h,p);var g=this.lineWidthBuffer.getView(d);g[0]=o;var m=this.pointAPointBBuffer.getView(d);m[0]=a[0],m[1]=a[1],m[2]=a[2],m[3]=a[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y<a.length-2;y+=2){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=pAe;var b=this.indexBuffer.getView(v);qT(n,b);var w=this.colorBuffer.getView(v);o1(u,h,w);var x=this.lineWidthBuffer.getView(v);x[0]=o;var T=a[y-2],C=a[y-1],S=a[y],E=a[y+1],k=a[y+2],A=a[y+3],I=a[y+4],L=a[y+5];y==0&&(T=2*S-k+.001,C=2*E-A+.001),y==a.length-4&&(I=2*k-S+.001,L=2*A-E+.001);var R=this.pointAPointBBuffer.getView(v);R[0]=T,R[1]=C,R[2]=S,R[3]=E;var O=this.pointCPointDBuffer.getView(v);O[0]=k,O[1]=A,O[2]=I,O[3]=L,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},"drawEdgeLine")},{key:"_isValidEdge",value:l(function(r){var n=r._private.rscratch;return!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))},"_isValidEdge")},{key:"_getEdgePoints",value:l(function(r){var n=r._private.rscratch;if(this._isValidEdge(r)){var a=n.allpts;if(a.length==4)return a;var i=this._getNumSegments(r);return this._getCurveSegmentPoints(a,i)}},"_getEdgePoints")},{key:"_getNumSegments",value:l(function(r){var n=15;return Math.min(Math.max(n,5),this.maxInstances)},"_getNumSegments")},{key:"_getCurveSegmentPoints",value:l(function(r,n){if(r.length==4)return r;for(var a=Array((n+1)*2),i=0;i<=n;i++)if(i==0)a[0]=r[0],a[1]=r[1];else if(i==n)a[i*2]=r[r.length-2],a[i*2+1]=r[r.length-1];else{var s=i/n;this._setCurvePoint(r,s,a,i*2)}return a},"_getCurveSegmentPoints")},{key:"_setCurvePoint",value:l(function(r,n,a,i){if(r.length<=2)a[i]=r[0],a[i+1]=r[1];else{for(var s=Array(r.length-2),o=0;o<s.length;o+=2){var u=(1-n)*r[o]+n*r[o+2],h=(1-n)*r[o+1]+n*r[o+3];s[o]=u,s[o+1]=h}return this._setCurvePoint(s,n,a,i)}},"_setCurvePoint")},{key:"endBatch",value:l(function(){var r=this.gl,n=this.vao,a=this.vertexCount,i=this.instanceCount;if(i!==0){var s=this.renderTarget.picking?this.pickingProgram:this.program;r.useProgram(s),r.bindVertexArray(n);var o=ql(this.buffers),u;try{for(o.s();!(u=o.n()).done;){var h=u.value;h.bufferSubData(i)}}catch(m){o.e(m)}finally{o.f()}for(var d=this.batchManager.getAtlases(),f=0;f<d.length;f++)d[f].bufferIfNeeded(r);for(var p=0;p<d.length;p++)r.activeTexture(r.TEXTURE0+p),r.bindTexture(r.TEXTURE_2D,d[p].texture),r.uniform1i(s.uTextures[p],p);r.uniform1f(s.uZoom,NUt(this.r)),r.uniformMatrix3fv(s.uPanZoomMatrix,!1,this.panZoomMatrix),r.uniform1i(s.uAtlasSize,this.batchManager.getAtlasSize());var g=o1(this.bgColor,1);r.uniform4fv(s.uBGColor,g),r.drawArraysInstanced(r.TRIANGLES,0,a,i),r.bindVertexArray(null),r.bindTexture(r.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:i,atlasCount:d.length}),this.startBatch()}},"endBatch")},{key:"getDebugInfo",value:l(function(){var r=this.atlasManager.getDebugInfo(),n=r.reduce(function(s,o){return s+o.atlasCount},0),a=this.batchDebugInfo,i=a.reduce(function(s,o){return s+o.count},0);return{atlasInfo:r,totalAtlases:n,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:a.length,batchInfo:a,totalInstances:i}},"getDebugInfo")}])}(),gAe={};gAe.initWebgl=function(t,e){var r=this,n=r.data.contexts[r.WEBGL];t.bgColor=ZUt(r),t.webglTexSize=Math.min(t.webglTexSize,n.getParameter(n.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglTexRowsNodes=Math.min(t.webglTexRowsNodes,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,r.pickingFrameBuffer=FUt(n),r.pickingFrameBuffer.needsDraw=!0,r.drawing=new XUt(r,n,t);var a=l(function(f){return function(p){return r.getTextAngle(p,f)}},"getLabelRotation"),i=l(function(f){return function(p){var g=p.pstyle(f);return g&&g.value}},"isLabelVisible"),s=l(function(f){return function(p){return p.pstyle("".concat(f,"-opacity")).value>0}},"isLayerVisible"),o=l(function(f){var p=f.pstyle("text-events").strValue==="yes";return p?_L.USE_BB:_L.IGNORE},"getTexPickingMode"),u=l(function(f){var p=f.position(),g=p.x,m=p.y,y=f.outerWidth(),v=f.outerHeight();return{w:y,h:v,x1:g-y/2,y1:m-v/2}},"getBBForSimpleShape");r.drawing.addAtlasCollection("node",{texRows:t.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:t.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:u,isSimple:LUt,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:u,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:u,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:mj(e.getLabelKey,null),getBoundingBox:yj(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:a(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:mj(e.getSourceLabelKey,"source"),getBoundingBox:yj(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:a("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:mj(e.getTargetLabelKey,"target"),getBoundingBox:yj(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:a("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var h=s5(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(d,f){var p=!1;f&&f.length>0&&(p|=r.drawing.invalidate(f)),p&&h()}),QUt(r)};function ZUt(t){var e=t.cy.container(),r=e&&e.style&&e.style.backgroundColor||"white";return b5e(r)}l(ZUt,"getBGColor");function mAe(t,e){var r=t._private.rscratch;return sl(r,"labelWrapCachedLines",e)||[]}l(mAe,"getLabelLines");var mj=l(function(e,r){return function(n){var a=e(n),i=mAe(n,r);return i.length>1?i.map(function(s,o){return"".concat(a,"_").concat(o)}):a}},"getStyleKeysForLabel"),yj=l(function(e,r){return function(n,a){var i=e(n);if(typeof a=="string"){var s=a.indexOf("_");if(s>0){var o=Number(a.substring(s+1)),u=mAe(n,r),h=i.h/u.length,d=h*o,f=i.y1+d;return{x1:i.x1,w:i.w,y1:f,h,yOffset:d}}}return i}},"getBoundingBoxForLabel");function QUt(t){{var e=t.render;t.render=function(i){i=i||{};var s=t.cy;t.webgl&&(s.zoom()>X6e?(JUt(t),e.call(t,i)):(ejt(t),vAe(t,i,$5.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(i){r.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,s,o,u){return sjt(t,i,s)};{var n=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){n.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var a=t.notify;t.notify=function(i,s){a.call(t,i,s),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.drawing.invalidate(s,{type:"node-body"})}}}l(QUt,"overrideCanvasRendererFunctions");function JUt(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}l(JUt,"clearWebgl");function ejt(t){var e=l(function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.canvasWidth,t.canvasHeight),n.restore()},"clear");e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}l(ejt,"clearCanvas");function tjt(t){var e=t.canvasWidth,r=t.canvasHeight,n=hj(t),a=n.pan,i=n.zoom,s=dj();SL(s,s,[a.x,a.y]),fj(s,s,[i,i]);var o=dj();zUt(o,e,r);var u=dj();return BUt(u,o,s),u}l(tjt,"createPanZoomMatrix");function yAe(t,e){var r=t.canvasWidth,n=t.canvasHeight,a=hj(t),i=a.pan,s=a.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,n),e.translate(i.x,i.y),e.scale(s,s)}l(yAe,"setContextTransform");function rjt(t,e){t.drawSelectionRectangle(e,function(r){return yAe(t,r)})}l(rjt,"drawSelectionRectangle");function njt(t){var e=t.data.contexts[t.NODE];e.save(),yAe(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}l(njt,"drawAxes$1");function ajt(t){var e=l(function(a,i,s){for(var o=a.atlasManager.getAtlasCollection(i),u=t.data.contexts[t.NODE],h=o.atlases,d=0;d<h.length;d++){var f=h[d],p=f.canvas;if(p){var g=p.width,m=p.height,y=g*d,v=p.height*s,b=.4;u.save(),u.scale(b,b),u.drawImage(p,y,v),u.strokeStyle="black",u.rect(y,v,g,m),u.stroke(),u.restore()}}},"draw"),r=0;e(t.drawing,"node",r++),e(t.drawing,"label",r++)}l(ajt,"drawAtlases");function ijt(t,e,r,n,a){var i,s,o,u,h=hj(t),d=h.pan,f=h.zoom;{var p=IUt(t,d,f,e,r),g=Ji(p,2),m=g[0],y=g[1],v=6;i=m-v/2,s=y-v/2,o=v,u=v}if(o===0||u===0)return[];var b=t.data.contexts[t.WEBGL];b.bindFramebuffer(b.FRAMEBUFFER,t.pickingFrameBuffer),t.pickingFrameBuffer.needsDraw&&(b.viewport(0,0,b.canvas.width,b.canvas.height),vAe(t,null,$5.PICKING),t.pickingFrameBuffer.needsDraw=!1);var w=o*u,x=new Uint8Array(w*4);b.readPixels(i,s,o,u,b.RGBA,b.UNSIGNED_BYTE,x),b.bindFramebuffer(b.FRAMEBUFFER,null);for(var T=new Set,C=0;C<w;C++){var S=x.slice(C*4,C*4+4),E=MUt(S)-1;E>=0&&T.add(E)}return T}l(ijt,"getPickingIndexes");function sjt(t,e,r){var n=ijt(t,e,r),a=t.getCachedZSortedEles(),i,s,o=ql(n),u;try{for(o.s();!(u=o.n()).done;){var h=u.value,d=a[h];if(!i&&d.isNode()&&(i=d),!s&&d.isEdge()&&(s=d),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}l(sjt,"findNearestElementsWebgl");function vj(t,e,r){var n=t.drawing;e+=1,r.isNode()?(n.drawNode(r,e,"node-underlay"),n.drawNode(r,e,"node-body"),n.drawTexture(r,e,"label"),n.drawNode(r,e,"node-overlay")):(n.drawEdgeLine(r,e),n.drawEdgeArrow(r,e,"source"),n.drawEdgeArrow(r,e,"target"),n.drawTexture(r,e,"label"),n.drawTexture(r,e,"edge-source-label"),n.drawTexture(r,e,"edge-target-label"))}l(vj,"drawEle");function vAe(t,e,r){var n;t.webglDebug&&(n=performance.now());var a=t.drawing,i=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&rjt(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var s=t.data.contexts[t.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=tjt(t),u=t.getCachedZSortedEles();if(i=u.length,a.startFrame(o,r),r.screen){for(var h=0;h<u.nondrag.length;h++)vj(t,h,u.nondrag[h]);for(var d=0;d<u.drag.length;d++)vj(t,d,u.drag[d])}else if(r.picking)for(var f=0;f<u.length;f++)vj(t,f,u[f]);a.endFrame(),r.screen&&t.webglDebugShowAtlases&&(njt(t),ajt(t)),t.data.canvasNeedsRedraw[t.NODE]=!1,t.data.canvasNeedsRedraw[t.DRAG]=!1}if(t.webglDebug){var p=performance.now(),g=!1,m=Math.ceil(p-n),y=a.getDebugInfo(),v=["".concat(i," elements"),"".concat(y.totalInstances," instances"),"".concat(y.batchCount," batches"),"".concat(y.totalAtlases," atlases"),"".concat(y.wrappedCount," wrapped textures"),"".concat(y.simpleCount," simple shapes")].join(", ");if(g)console.log("WebGL (".concat(r.name,") - time ").concat(m,"ms, ").concat(v));else{console.log("WebGL (".concat(r.name,") - frame time ").concat(m,"ms")),console.log("Totals:"),console.log(" ".concat(v)),console.log("Texture Atlases Used:");var b=y.atlasInfo,w=ql(b),x;try{for(w.s();!(x=w.n()).done;){var T=x.value;console.log(" ".concat(T.type,": ").concat(T.keyCount," keys, ").concat(T.atlasCount," atlases"))}}catch(C){w.e(C)}finally{w.f()}console.log("")}}t.data.gc&&(console.log("Garbage Collect!"),t.data.gc=!1,a.gc())}l(vAe,"renderWebgl");var Rp={};Rp.drawPolygonPath=function(t,e,r,n,a,i){var s=n/2,o=a/2;t.beginPath&&t.beginPath(),t.moveTo(e+s*i[0],r+o*i[1]);for(var u=1;u<i.length/2;u++)t.lineTo(e+s*i[u*2],r+o*i[u*2+1]);t.closePath()},Rp.drawRoundPolygonPath=function(t,e,r,n,a,i,s){s.forEach(function(o){return O6e(t,o)}),t.closePath()},Rp.drawRoundRectanglePath=function(t,e,r,n,a,i){var s=n/2,o=a/2,u=i==="auto"?Sp(n,a):Math.min(i,o,s);t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.arcTo(e+s,r-o,e+s,r,u),t.arcTo(e+s,r+o,e,r+o,u),t.arcTo(e-s,r+o,e-s,r,u),t.arcTo(e-s,r-o,e,r-o,u),t.lineTo(e,r-o),t.closePath()},Rp.drawBottomRoundRectanglePath=function(t,e,r,n,a,i){var s=n/2,o=a/2,u=i==="auto"?Sp(n,a):i;t.beginPath&&t.beginPath(),t.moveTo(e,r-o),t.lineTo(e+s,r-o),t.lineTo(e+s,r),t.arcTo(e+s,r+o,e,r+o,u),t.arcTo(e-s,r+o,e-s,r,u),t.lineTo(e-s,r-o),t.lineTo(e,r-o),t.closePath()},Rp.drawCutRectanglePath=function(t,e,r,n,a,i,s){var o=n/2,u=a/2,h=s==="auto"?$Y():s;t.beginPath&&t.beginPath(),t.moveTo(e-o+h,r-u),t.lineTo(e+o-h,r-u),t.lineTo(e+o,r-u+h),t.lineTo(e+o,r+u-h),t.lineTo(e+o-h,r+u),t.lineTo(e-o+h,r+u),t.lineTo(e-o,r+u-h),t.lineTo(e-o,r-u+h),t.closePath()},Rp.drawBarrelPath=function(t,e,r,n,a){var i=n/2,s=a/2,o=e-i,u=e+i,h=r-s,d=r+s,f=MY(n,a),p=f.widthOffset,g=f.heightOffset,m=f.ctrlPtOffsetPct*p;t.beginPath&&t.beginPath(),t.moveTo(o,h+g),t.lineTo(o,d-g),t.quadraticCurveTo(o+m,d,o+p,d),t.lineTo(u-p,d),t.quadraticCurveTo(u-m,d,u,d-g),t.lineTo(u,h+g),t.quadraticCurveTo(u-m,h,u-p,h),t.lineTo(o+p,h),t.quadraticCurveTo(o+m,h,o,h+g),t.closePath()};for(var bAe=Math.sin(0),xAe=Math.cos(0),bj={},xj={},wAe=Math.PI/40,UT=0*Math.PI;UT<2*Math.PI;UT+=wAe)bj[UT]=Math.sin(UT),xj[UT]=Math.cos(UT);Rp.drawEllipsePath=function(t,e,r,n,a){if(t.beginPath&&t.beginPath(),t.ellipse)t.ellipse(e,r,n/2,a/2,0,0,2*Math.PI);else for(var i,s,o=n/2,u=a/2,h=0*Math.PI;h<2*Math.PI;h+=wAe)i=e-o*bj[h]*bAe+o*xj[h]*xAe,s=r+u*xj[h]*bAe+u*bj[h]*xAe,h===0?t.moveTo(i,s):t.lineTo(i,s);t.closePath()};var R5={};R5.createBuffer=function(t,e){var r=document.createElement("canvas");return r.width=t,r.height=e,[r,r.getContext("2d")]},R5.bufferCanvasImage=function(t){var e=this.cy,r=e.mutableElements(),n=r.boundingBox(),a=this.findContainerClientCoords(),i=t.full?Math.ceil(n.w):a[2],s=t.full?Math.ceil(n.h):a[3],o=mr(t.maxWidth)||mr(t.maxHeight),u=this.getPixelRatio(),h=1;if(t.scale!==void 0)i*=t.scale,s*=t.scale,h=t.scale;else if(o){var d=1/0,f=1/0;mr(t.maxWidth)&&(d=h*t.maxWidth/i),mr(t.maxHeight)&&(f=h*t.maxHeight/s),h=Math.min(d,f),i*=h,s*=h}o||(i*=u,s*=u,h*=u);var p=document.createElement("canvas");p.width=i,p.height=s,p.style.width=i+"px",p.style.height=s+"px";var g=p.getContext("2d");if(i>0&&s>0){g.clearRect(0,0,i,s),g.globalCompositeOperation="source-over";var m=this.getCachedZSortedEles();if(t.full)g.translate(-n.x1*h,-n.y1*h),g.scale(h,h),this.drawElements(g,m),g.scale(1/h,1/h),g.translate(n.x1*h,n.y1*h);else{var y=e.pan(),v={x:y.x*h,y:y.y*h};h*=e.zoom(),g.translate(v.x,v.y),g.scale(h,h),this.drawElements(g,m),g.scale(1/h,1/h),g.translate(-v.x,-v.y)}t.bg&&(g.globalCompositeOperation="destination-over",g.fillStyle=t.bg,g.rect(0,0,i,s),g.fill())}return p};function ojt(t,e){for(var r=atob(t),n=new ArrayBuffer(r.length),a=new Uint8Array(n),i=0;i<r.length;i++)a[i]=r.charCodeAt(i);return new Blob([n],{type:e})}l(ojt,"b64ToBlob");function TAe(t){var e=t.indexOf(",");return t.substr(e+1)}l(TAe,"b64UriToB64");function EAe(t,e,r){var n=l(function(){return e.toDataURL(r,t.quality)},"getB64Uri");switch(t.output){case"blob-promise":return new IT(function(a,i){try{e.toBlob(function(s){s!=null?a(s):i(new Error("`canvas.toBlob()` sent a null value in its callback"))},r,t.quality)}catch(s){i(s)}});case"blob":return ojt(TAe(n()),r);case"base64":return TAe(n());case"base64uri":default:return n()}}l(EAe,"output"),R5.png=function(t){return EAe(t,this.bufferCanvasImage(t),"image/png")},R5.jpg=function(t){return EAe(t,this.bufferCanvasImage(t),"image/jpeg")};var CAe={};CAe.nodeShapeImpl=function(t,e,r,n,a,i,s,o){switch(t){case"ellipse":return this.drawEllipsePath(e,r,n,a,i);case"polygon":return this.drawPolygonPath(e,r,n,a,i,s);case"round-polygon":return this.drawRoundPolygonPath(e,r,n,a,i,s,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(e,r,n,a,i,o);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(e,r,n,a,i,s,o);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(e,r,n,a,i,o);case"barrel":return this.drawBarrelPath(e,r,n,a,i)}};var ljt=SAe,fn=SAe.prototype;fn.CANVAS_LAYERS=3,fn.SELECT_BOX=0,fn.DRAG=1,fn.NODE=2,fn.WEBGL=3,fn.CANVAS_TYPES=["2d","2d","2d","webgl2"],fn.BUFFER_COUNT=3,fn.TEXTURE_BUFFER=0,fn.MOTIONBLUR_BUFFER_NODE=1,fn.MOTIONBLUR_BUFFER_DRAG=2;function SAe(t){var e=this,r=e.cy.window(),n=r.document;t.webgl&&(fn.CANVAS_LAYERS=e.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),e.data={canvases:new Array(fn.CANVAS_LAYERS),contexts:new Array(fn.CANVAS_LAYERS),canvasNeedsRedraw:new Array(fn.CANVAS_LAYERS),bufferCanvases:new Array(fn.BUFFER_COUNT),bufferContexts:new Array(fn.CANVAS_LAYERS)};var a="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";e.data.canvasContainer=n.createElement("div");var s=e.data.canvasContainer.style;e.data.canvasContainer.style[a]=i,s.position="relative",s.zIndex="0",s.overflow="hidden";var o=t.cy.container();o.appendChild(e.data.canvasContainer),o.style[a]=i;var u={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};JHt()&&(u["-ms-touch-action"]="none",u["touch-action"]="none");for(var h=0;h<fn.CANVAS_LAYERS;h++){var d=e.data.canvases[h]=n.createElement("canvas"),f=fn.CANVAS_TYPES[h];e.data.contexts[h]=d.getContext(f),e.data.contexts[h]||ni("Could not create canvas of type "+f),Object.keys(u).forEach(function(Q){d.style[Q]=u[Q]}),d.style.position="absolute",d.setAttribute("data-id","layer"+h),d.style.zIndex=String(fn.CANVAS_LAYERS-h),e.data.canvasContainer.appendChild(d),e.data.canvasNeedsRedraw[h]=!1}e.data.topCanvas=e.data.canvases[0],e.data.canvases[fn.NODE].setAttribute("data-id","layer"+fn.NODE+"-node"),e.data.canvases[fn.SELECT_BOX].setAttribute("data-id","layer"+fn.SELECT_BOX+"-selectbox"),e.data.canvases[fn.DRAG].setAttribute("data-id","layer"+fn.DRAG+"-drag"),e.data.canvases[fn.WEBGL]&&e.data.canvases[fn.WEBGL].setAttribute("data-id","layer"+fn.WEBGL+"-webgl");for(var h=0;h<fn.BUFFER_COUNT;h++)e.data.bufferCanvases[h]=n.createElement("canvas"),e.data.bufferContexts[h]=e.data.bufferCanvases[h].getContext("2d"),e.data.bufferCanvases[h].style.position="absolute",e.data.bufferCanvases[h].setAttribute("data-id","buffer"+h),e.data.bufferCanvases[h].style.zIndex=String(-h-1),e.data.bufferCanvases[h].style.visibility="hidden";e.pathsEnabled=!0;var p=ol(),g=l(function(te){return{x:(te.x1+te.x2)/2,y:(te.y1+te.y2)/2}},"getBoxCenter"),m=l(function(te){return{x:-te.w/2,y:-te.h/2}},"getCenterOffset"),y=l(function(te){var ee=te[0]._private,J=ee.oldBackgroundTimestamp===ee.backgroundTimestamp;return!J},"backgroundTimestampHasChanged"),v=l(function(te){return te[0]._private.nodeKey},"getStyleKey"),b=l(function(te){return te[0]._private.labelStyleKey},"getLabelKey"),w=l(function(te){return te[0]._private.sourceLabelStyleKey},"getSourceLabelKey"),x=l(function(te){return te[0]._private.targetLabelStyleKey},"getTargetLabelKey"),T=l(function(te,ee,J,ae,se){return e.drawElement(te,ee,J,!1,!1,se)},"drawElement"),C=l(function(te,ee,J,ae,se){return e.drawElementText(te,ee,J,ae,"main",se)},"drawLabel"),S=l(function(te,ee,J,ae,se){return e.drawElementText(te,ee,J,ae,"source",se)},"drawSourceLabel"),E=l(function(te,ee,J,ae,se){return e.drawElementText(te,ee,J,ae,"target",se)},"drawTargetLabel"),k=l(function(te){return te.boundingBox(),te[0]._private.bodyBounds},"getElementBox"),A=l(function(te){return te.boundingBox(),te[0]._private.labelBounds.main||p},"getLabelBox"),I=l(function(te){return te.boundingBox(),te[0]._private.labelBounds.source||p},"getSourceLabelBox"),L=l(function(te){return te.boundingBox(),te[0]._private.labelBounds.target||p},"getTargetLabelBox"),R=l(function(te,ee){return ee},"isLabelVisibleAtScale"),O=l(function(te){return g(k(te))},"getElementRotationPoint"),M=l(function(te,ee,J){var ae=te?te+"-":"";return{x:ee.x+J.pstyle(ae+"text-margin-x").pfValue,y:ee.y+J.pstyle(ae+"text-margin-y").pfValue}},"addTextMargin"),P=l(function(te,ee,J){var ae=te[0]._private.rscratch;return{x:ae[ee],y:ae[J]}},"getRsPt"),z=l(function(te){return M("",P(te,"labelX","labelY"),te)},"getLabelRotationPoint"),D=l(function(te){return M("source",P(te,"sourceLabelX","sourceLabelY"),te)},"getSourceLabelRotationPoint"),B=l(function(te){return M("target",P(te,"targetLabelX","targetLabelY"),te)},"getTargetLabelRotationPoint"),W=l(function(te){return m(k(te))},"getElementRotationOffset"),U=l(function(te){return m(I(te))},"getSourceLabelRotationOffset"),j=l(function(te){return m(L(te))},"getTargetLabelRotationOffset"),V=l(function(te){var ee=A(te),J=m(A(te));if(te.isNode()){switch(PT(te.pstyle("text-halign").value)){case"left":J.x=-ee.w-(ee.leftPad||0);break;case"right":J.x=-(ee.rightPad||0);break}switch(RT(te.pstyle("text-valign").value)){case"top":J.y=-ee.h-(ee.topPad||0);break;case"bottom":J.y=-(ee.botPad||0);break}}return J},"getLabelRotationOffset"),Y=e.data.eleTxrCache=new N5(e,{getKey:v,doesEleInvalidateKey:y,drawElement:T,getBoundingBox:k,getRotationPoint:O,getRotationOffset:W,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),H=e.data.lblTxrCache=new N5(e,{getKey:b,drawElement:C,getBoundingBox:A,getRotationPoint:z,getRotationOffset:V,isVisible:R}),q=e.data.slbTxrCache=new N5(e,{getKey:w,drawElement:S,getBoundingBox:I,getRotationPoint:D,getRotationOffset:U,isVisible:R}),Z=e.data.tlbTxrCache=new N5(e,{getKey:x,drawElement:E,getBoundingBox:L,getRotationPoint:B,getRotationOffset:j,isVisible:R}),K=e.data.lyrTxrCache=new J6e(e);e.onUpdateEleCalcs(l(function(te,ee){Y.invalidateElements(ee),H.invalidateElements(ee),q.invalidateElements(ee),Z.invalidateElements(ee),K.invalidateElements(ee);for(var J=0;J<ee.length;J++){var ae=ee[J]._private;ae.oldBackgroundTimestamp=ae.backgroundTimestamp}},"invalidateTextureCaches"));var re=l(function(te){for(var ee=0;ee<te.length;ee++)K.enqueueElementRefinement(te[ee].ele)},"refineInLayers");Y.onDequeue(re),H.onDequeue(re),q.onDequeue(re),Z.onDequeue(re),t.webgl&&e.initWebgl(t,{getStyleKey:v,getLabelKey:b,getSourceLabelKey:w,getTargetLabelKey:x,drawElement:T,drawLabel:C,drawSourceLabel:S,drawTargetLabel:E,getElementBox:k,getLabelBox:A,getSourceLabelBox:I,getTargetLabelBox:L,getElementRotationPoint:O,getElementRotationOffset:W,getLabelRotationPoint:z,getSourceLabelRotationPoint:D,getTargetLabelRotationPoint:B,getLabelRotationOffset:V,getSourceLabelRotationOffset:U,getTargetLabelRotationOffset:j})}l(SAe,"CanvasRenderer"),fn.redrawHint=function(t,e){var r=this;switch(t){case"eles":r.data.canvasNeedsRedraw[fn.NODE]=e;break;case"drag":r.data.canvasNeedsRedraw[fn.DRAG]=e;break;case"select":r.data.canvasNeedsRedraw[fn.SELECT_BOX]=e;break;case"gc":r.data.gc=!0;break}};var cjt=typeof Path2D!="undefined";fn.path2dEnabled=function(t){if(t===void 0)return this.pathsEnabled;this.pathsEnabled=!!t},fn.usePaths=function(){return cjt&&this.pathsEnabled},fn.setImgSmoothing=function(t,e){t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled=e:(t.webkitImageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.msImageSmoothingEnabled=e)},fn.getImgSmoothing=function(t){return t.imageSmoothingEnabled!=null?t.imageSmoothingEnabled:t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled},fn.makeOffscreenCanvas=function(t,e){var r;if((typeof OffscreenCanvas=="undefined"?"undefined":ds(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var n=this.cy.window(),a=n.document;r=a.createElement("canvas"),r.width=t,r.height=e}return r},[tAe,od,$f,uj,s1,Pp,cl,gAe,Rp,R5,CAe].forEach(function(t){zr(fn,t)});var ujt=[{name:"null",impl:k6e},{name:"base",impl:U6e},{name:"canvas",impl:ljt}],hjt=[{type:"layout",extensions:PYt},{type:"renderer",extensions:ujt}],_Ae={},kAe={};function AAe(t,e,r){var n=r,a=l(function(k){na("Can not register `"+e+"` for `"+t+"` since `"+k+"` already exists in the prototype and can not be overridden")},"overrideErr");if(t==="core"){if(S5.prototype[e])return a(e);S5.prototype[e]=r}else if(t==="collection"){if(oo.prototype[e])return a(e);oo.prototype[e]=r}else if(t==="layout"){for(var i=l(function(k){this.options=k,r.call(this,k),Fn(this._private)||(this._private={}),this._private.cy=k.cy,this._private.listeners=[],this.createEmitter()},"Layout"),s=i.prototype=Object.create(r.prototype),o=[],u=0;u<o.length;u++){var h=o[u];s[h]=s[h]||function(){return this}}s.start&&!s.run?s.run=function(){return this.start(),this}:!s.start&&s.run&&(s.start=function(){return this.run(),this});var d=r.prototype.stop;s.stop=function(){var E=this.options;if(E&&E.animate){var k=this.animations;if(k)for(var A=0;A<k.length;A++)k[A].stop()}return d?d.call(this):this.emit("layoutstop"),this},s.destroy||(s.destroy=function(){return this}),s.cy=function(){return this._private.cy};var f=l(function(k){return k._private.cy},"getCy"),p={addEventFields:l(function(k,A){A.layout=k,A.cy=f(k),A.target=k},"addEventFields"),bubble:l(function(){return!0},"bubble"),parent:l(function(k){return f(k)},"parent")};zr(s,{createEmitter:l(function(){return this._private.emitter=new rL(p,this),this},"createEmitter"),emitter:l(function(){return this._private.emitter},"emitter"),on:l(function(k,A){return this.emitter().on(k,A),this},"on"),one:l(function(k,A){return this.emitter().one(k,A),this},"one"),once:l(function(k,A){return this.emitter().one(k,A),this},"once"),removeListener:l(function(k,A){return this.emitter().removeListener(k,A),this},"removeListener"),removeAllListeners:l(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),emit:l(function(k,A){return this.emitter().emit(k,A),this},"emit")}),aa.eventAliasesOn(s),n=i}else if(t==="renderer"&&e!=="null"&&e!=="base"){var g=NAe("renderer","base"),m=g.prototype,y=r,v=r.prototype,b=l(function(){g.apply(this,arguments),y.apply(this,arguments)},"Renderer"),w=b.prototype;for(var x in m){var T=m[x],C=v[x]!=null;if(C)return a(x);w[x]=T}for(var S in v)w[S]=v[S];m.clientFunctions.forEach(function(E){w[E]=w[E]||function(){ni("Renderer does not implement `renderer."+E+"()` on its prototype")}}),n=b}else if(t==="__proto__"||t==="constructor"||t==="prototype")return ni(t+" is an illegal type to be registered, possibly lead to prototype pollutions");return x5e({map:_Ae,keys:[t,e],value:n})}l(AAe,"setExtension");function NAe(t,e){return w5e({map:_Ae,keys:[t,e]})}l(NAe,"getExtension");function djt(t,e,r,n,a){return x5e({map:kAe,keys:[t,e,r,n],value:a})}l(djt,"setModule");function fjt(t,e,r,n){return w5e({map:kAe,keys:[t,e,r,n]})}l(fjt,"getModule");var wj=l(function(){if(arguments.length===2)return NAe.apply(null,arguments);if(arguments.length===3)return AAe.apply(null,arguments);if(arguments.length===4)return fjt.apply(null,arguments);if(arguments.length===5)return djt.apply(null,arguments);ni("Invalid extension access syntax")},"extension");S5.prototype.extension=wj,hjt.forEach(function(t){t.extensions.forEach(function(e){AAe(t.type,e.name,e.impl)})});var AL=l(function(){if(!(this instanceof AL))return new AL;this.length=0},"Stylesheet"),l1=AL.prototype;l1.instanceString=function(){return"stylesheet"},l1.selector=function(t){var e=this.length++;return this[e]={selector:t,properties:[]},this},l1.css=function(t,e){var r=this.length-1;if(Or(t))this[r].properties.push({name:t,value:e});else if(Fn(t))for(var n=t,a=Object.keys(n),i=0;i<a.length;i++){var s=a[i],o=n[s];if(o!=null){var u=zs.properties[s]||zs.properties[NI(s)];if(u!=null){var h=u.name,d=o;this[r].properties.push({name:h,value:d})}}}return this},l1.style=l1.css,l1.generateStyle=function(t){var e=new zs(t);return this.appendToStyle(e)},l1.appendToStyle=function(t){for(var e=0;e<this.length;e++){var r=this[e],n=r.selector,a=r.properties;t.selector(n);for(var i=0;i<a.length;i++){var s=a[i];t.css(s.name,s.value)}}return t};var pjt="3.34.0",cd=l(function(e){if(e===void 0&&(e={}),Fn(e))return new S5(e);if(Or(e))return wj.apply(wj,arguments)},"cytoscape");cd.use=function(t){var e=Array.prototype.slice.call(arguments,1);return e.unshift(cd),t.apply(null,e),this},cd.warnings=function(t){return q5e(t)},cd.version=pjt,cd.stylesheet=cd.Stylesheet=AL;var IAe={exports:{}},Tj={exports:{}},Ej={exports:{}},LAe;function gjt(){return LAe||(LAe=1,function(t,e){l(function(n,a){t.exports=a()},"webpackUniversalModuleDefinition")(Nl,function(){return function(r){var n={};function a(i){if(n[i])return n[i].exports;var s=n[i]={i,l:!1,exports:{}};return r[i].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return l(a,"__webpack_require__"),a.m=r,a.c=n,a.i=function(i){return i},a.d=function(i,s,o){a.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:o})},a.n=function(i){var s=i&&i.__esModule?l(function(){return i.default},"getDefault"):l(function(){return i},"getModuleExports");return a.d(s,"a",s),s},a.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},a.p="",a(a.s=26)}([function(r,n,a){function i(){}l(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,r.exports=i},function(r,n,a){var i=a(2),s=a(8),o=a(9);function u(d,f,p){i.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=d,this.target=f}l(u,"LEdge"),u.prototype=Object.create(i.prototype);for(var h in i)u[h]=i[h];u.prototype.getSource=function(){return this.source},u.prototype.getTarget=function(){return this.target},u.prototype.isInterGraph=function(){return this.isInterGraph},u.prototype.getLength=function(){return this.length},u.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},u.prototype.getBendpoints=function(){return this.bendpoints},u.prototype.getLca=function(){return this.lca},u.prototype.getSourceInLca=function(){return this.sourceInLca},u.prototype.getTargetInLca=function(){return this.targetInLca},u.prototype.getOtherEnd=function(d){if(this.source===d)return this.target;if(this.target===d)return this.source;throw"Node is not incident with this edge"},u.prototype.getOtherEndInGraph=function(d,f){for(var p=this.getOtherEnd(d),g=f.getGraphManager().getRoot();;){if(p.getOwner()==f)return p;if(p.getOwner()==g)break;p=p.getOwner().getParent()}return null},u.prototype.updateLength=function(){var d=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),d),this.isOverlapingSourceAndTarget||(this.lengthX=d[0]-d[2],this.lengthY=d[1]-d[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},u.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},r.exports=u},function(r,n,a){function i(s){this.vGraphObject=s}l(i,"LGraphObject"),r.exports=i},function(r,n,a){var i=a(2),s=a(10),o=a(13),u=a(0),h=a(16),d=a(4);function f(g,m,y,v){y==null&&v==null&&(v=m),i.call(this,v),g.graphManager!=null&&(g=g.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=v,this.edges=[],this.graphManager=g,y!=null&&m!=null?this.rect=new o(m.x,m.y,y.width,y.height):this.rect=new o}l(f,"LNode"),f.prototype=Object.create(i.prototype);for(var p in i)f[p]=i[p];f.prototype.getEdges=function(){return this.edges},f.prototype.getChild=function(){return this.child},f.prototype.getOwner=function(){return this.owner},f.prototype.getWidth=function(){return this.rect.width},f.prototype.setWidth=function(g){this.rect.width=g},f.prototype.getHeight=function(){return this.rect.height},f.prototype.setHeight=function(g){this.rect.height=g},f.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},f.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},f.prototype.getCenter=function(){return new d(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},f.prototype.getLocation=function(){return new d(this.rect.x,this.rect.y)},f.prototype.getRect=function(){return this.rect},f.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},f.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},f.prototype.setRect=function(g,m){this.rect.x=g.x,this.rect.y=g.y,this.rect.width=m.width,this.rect.height=m.height},f.prototype.setCenter=function(g,m){this.rect.x=g-this.rect.width/2,this.rect.y=m-this.rect.height/2},f.prototype.setLocation=function(g,m){this.rect.x=g,this.rect.y=m},f.prototype.moveBy=function(g,m){this.rect.x+=g,this.rect.y+=m},f.prototype.getEdgeListToNode=function(g){var m=[],y=this;return y.edges.forEach(function(v){if(v.target==g){if(v.source!=y)throw"Incorrect edge source!";m.push(v)}}),m},f.prototype.getEdgesBetween=function(g){var m=[],y=this;return y.edges.forEach(function(v){if(!(v.source==y||v.target==y))throw"Incorrect edge source and/or target";(v.target==g||v.source==g)&&m.push(v)}),m},f.prototype.getNeighborsList=function(){var g=new Set,m=this;return m.edges.forEach(function(y){if(y.source==m)g.add(y.target);else{if(y.target!=m)throw"Incorrect incidency!";g.add(y.source)}}),g},f.prototype.withChildren=function(){var g=new Set,m,y;if(g.add(this),this.child!=null)for(var v=this.child.getNodes(),b=0;b<v.length;b++)m=v[b],y=m.withChildren(),y.forEach(function(w){g.add(w)});return g},f.prototype.getNoOfChildren=function(){var g=0,m;if(this.child==null)g=1;else for(var y=this.child.getNodes(),v=0;v<y.length;v++)m=y[v],g+=m.getNoOfChildren();return g==0&&(g=1),g},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},f.prototype.scatter=function(){var g,m,y=-u.INITIAL_WORLD_BOUNDARY,v=u.INITIAL_WORLD_BOUNDARY;g=u.WORLD_CENTER_X+h.nextDouble()*(v-y)+y;var b=-u.INITIAL_WORLD_BOUNDARY,w=u.INITIAL_WORLD_BOUNDARY;m=u.WORLD_CENTER_Y+h.nextDouble()*(w-b)+b,this.rect.x=g,this.rect.y=m},f.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var g=this.getChild();if(g.updateBounds(!0),this.rect.x=g.getLeft(),this.rect.y=g.getTop(),this.setWidth(g.getRight()-g.getLeft()),this.setHeight(g.getBottom()-g.getTop()),u.NODE_DIMENSIONS_INCLUDE_LABELS){var m=g.getRight()-g.getLeft(),y=g.getBottom()-g.getTop();this.labelWidth>m&&(this.rect.x-=(this.labelWidth-m)/2,this.setWidth(this.labelWidth)),this.labelHeight>y&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-y)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-y),this.setHeight(this.labelHeight))}}},f.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},f.prototype.transform=function(g){var m=this.rect.x;m>u.WORLD_BOUNDARY?m=u.WORLD_BOUNDARY:m<-u.WORLD_BOUNDARY&&(m=-u.WORLD_BOUNDARY);var y=this.rect.y;y>u.WORLD_BOUNDARY?y=u.WORLD_BOUNDARY:y<-u.WORLD_BOUNDARY&&(y=-u.WORLD_BOUNDARY);var v=new d(m,y),b=g.inverseTransformPoint(v);this.setLocation(b.x,b.y)},f.prototype.getLeft=function(){return this.rect.x},f.prototype.getRight=function(){return this.rect.x+this.rect.width},f.prototype.getTop=function(){return this.rect.y},f.prototype.getBottom=function(){return this.rect.y+this.rect.height},f.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},r.exports=f},function(r,n,a){function i(s,o){s==null&&o==null?(this.x=0,this.y=0):(this.x=s,this.y=o)}l(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(s){this.x=s},i.prototype.setY=function(s){this.y=s},i.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},r.exports=i},function(r,n,a){var i=a(2),s=a(10),o=a(0),u=a(6),h=a(3),d=a(1),f=a(13),p=a(12),g=a(11);function m(v,b,w){i.call(this,w),this.estimatedSize=s.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=v,b!=null&&b instanceof u?this.graphManager=b:b!=null&&b instanceof Layout&&(this.graphManager=b.graphManager)}l(m,"LGraph"),m.prototype=Object.create(i.prototype);for(var y in i)m[y]=i[y];m.prototype.getNodes=function(){return this.nodes},m.prototype.getEdges=function(){return this.edges},m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getParent=function(){return this.parent},m.prototype.getLeft=function(){return this.left},m.prototype.getRight=function(){return this.right},m.prototype.getTop=function(){return this.top},m.prototype.getBottom=function(){return this.bottom},m.prototype.isConnected=function(){return this.isConnected},m.prototype.add=function(v,b,w){if(b==null&&w==null){var x=v;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var T=v;if(!(this.getNodes().indexOf(b)>-1&&this.getNodes().indexOf(w)>-1))throw"Source or target not in graph!";if(!(b.owner==w.owner&&b.owner==this))throw"Both owners must be this graph!";return b.owner!=w.owner?null:(T.source=b,T.target=w,T.isInterGraph=!1,this.getEdges().push(T),b.edges.push(T),w!=b&&w.edges.push(T),T)}},m.prototype.remove=function(v){var b=v;if(v instanceof h){if(b==null)throw"Node is null!";if(!(b.owner!=null&&b.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var w=b.edges.slice(),x,T=w.length,C=0;C<T;C++)x=w[C],x.isInterGraph?this.graphManager.remove(x):x.source.owner.remove(x);var S=this.nodes.indexOf(b);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(v instanceof d){var x=v;if(x==null)throw"Edge is null!";if(!(x.source!=null&&x.target!=null))throw"Source and/or target is null!";if(!(x.source.owner!=null&&x.target.owner!=null&&x.source.owner==this&&x.target.owner==this))throw"Source and/or target owner is invalid!";var E=x.source.edges.indexOf(x),k=x.target.edges.indexOf(x);if(!(E>-1&&k>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(E,1),x.target!=x.source&&x.target.edges.splice(k,1);var S=x.source.owner.getEdges().indexOf(x);if(S==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(S,1)}},m.prototype.updateLeftTop=function(){for(var v=s.MAX_VALUE,b=s.MAX_VALUE,w,x,T,C=this.getNodes(),S=C.length,E=0;E<S;E++){var k=C[E];w=k.getTop(),x=k.getLeft(),v>w&&(v=w),b>x&&(b=x)}return v==s.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?T=C[0].getParent().paddingLeft:T=this.margin,this.left=b-T,this.top=v-T,new p(this.left,this.top))},m.prototype.updateBounds=function(v){for(var b=s.MAX_VALUE,w=-s.MAX_VALUE,x=s.MAX_VALUE,T=-s.MAX_VALUE,C,S,E,k,A,I=this.nodes,L=I.length,R=0;R<L;R++){var O=I[R];v&&O.child!=null&&O.updateBounds(),C=O.getLeft(),S=O.getRight(),E=O.getTop(),k=O.getBottom(),b>C&&(b=C),w<S&&(w=S),x>E&&(x=E),T<k&&(T=k)}var M=new f(b,x,w-b,T-x);b==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),I[0].getParent().paddingLeft!=null?A=I[0].getParent().paddingLeft:A=this.margin,this.left=M.x-A,this.right=M.x+M.width+A,this.top=M.y-A,this.bottom=M.y+M.height+A},m.calculateBounds=function(v){for(var b=s.MAX_VALUE,w=-s.MAX_VALUE,x=s.MAX_VALUE,T=-s.MAX_VALUE,C,S,E,k,A=v.length,I=0;I<A;I++){var L=v[I];C=L.getLeft(),S=L.getRight(),E=L.getTop(),k=L.getBottom(),b>C&&(b=C),w<S&&(w=S),x>E&&(x=E),T<k&&(T=k)}var R=new f(b,x,w-b,T-x);return R},m.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},m.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},m.prototype.calcEstimatedSize=function(){for(var v=0,b=this.nodes,w=b.length,x=0;x<w;x++){var T=b[x];v+=T.calcEstimatedSize()}return v==0?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=v/Math.sqrt(this.nodes.length),this.estimatedSize},m.prototype.updateConnected=function(){var v=this;if(this.nodes.length==0){this.isConnected=!0;return}var b=new g,w=new Set,x=this.nodes[0],T,C,S=x.withChildren();for(S.forEach(function(R){b.push(R),w.add(R)});b.length!==0;){x=b.shift(),T=x.getEdges();for(var E=T.length,k=0;k<E;k++){var A=T[k];if(C=A.getOtherEndInGraph(x,this),C!=null&&!w.has(C)){var I=C.withChildren();I.forEach(function(R){b.push(R),w.add(R)})}}}if(this.isConnected=!1,w.size>=this.nodes.length){var L=0;w.forEach(function(R){R.owner==v&&L++}),L==this.nodes.length&&(this.isConnected=!0)}},r.exports=m},function(r,n,a){var i,s=a(1);function o(u){i=a(5),this.layout=u,this.graphs=[],this.edges=[]}l(o,"LGraphManager"),o.prototype.addRoot=function(){var u=this.layout.newGraph(),h=this.layout.newNode(null),d=this.add(u,h);return this.setRootGraph(d),this.rootGraph},o.prototype.add=function(u,h,d,f,p){if(d==null&&f==null&&p==null){if(u==null)throw"Graph is null!";if(h==null)throw"Parent node is null!";if(this.graphs.indexOf(u)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(u),u.parent!=null)throw"Already has a parent!";if(h.child!=null)throw"Already has a child!";return u.parent=h,h.child=u,u}else{p=d,f=h,d=u;var g=f.getOwner(),m=p.getOwner();if(!(g!=null&&g.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(m!=null&&m.getGraphManager()==this))throw"Target not in this graph mgr!";if(g==m)return d.isInterGraph=!1,g.add(d,f,p);if(d.isInterGraph=!0,d.source=f,d.target=p,this.edges.indexOf(d)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(d),!(d.source!=null&&d.target!=null))throw"Edge source and/or target is null!";if(!(d.source.edges.indexOf(d)==-1&&d.target.edges.indexOf(d)==-1))throw"Edge already in source and/or target incidency list!";return d.source.edges.push(d),d.target.edges.push(d),d}},o.prototype.remove=function(u){if(u instanceof i){var h=u;if(h.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(h==this.rootGraph||h.parent!=null&&h.parent.graphManager==this))throw"Invalid parent node!";var d=[];d=d.concat(h.getEdges());for(var f,p=d.length,g=0;g<p;g++)f=d[g],h.remove(f);var m=[];m=m.concat(h.getNodes());var y;p=m.length;for(var g=0;g<p;g++)y=m[g],h.remove(y);h==this.rootGraph&&this.setRootGraph(null);var v=this.graphs.indexOf(h);this.graphs.splice(v,1),h.parent=null}else if(u instanceof s){if(f=u,f==null)throw"Edge is null!";if(!f.isInterGraph)throw"Not an inter-graph edge!";if(!(f.source!=null&&f.target!=null))throw"Source and/or target is null!";if(!(f.source.edges.indexOf(f)!=-1&&f.target.edges.indexOf(f)!=-1))throw"Source and/or target doesn't know this edge!";var v=f.source.edges.indexOf(f);if(f.source.edges.splice(v,1),v=f.target.edges.indexOf(f),f.target.edges.splice(v,1),!(f.source.owner!=null&&f.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(f.source.owner.getGraphManager().edges.indexOf(f)==-1)throw"Not in owner graph manager's edge list!";var v=f.source.owner.getGraphManager().edges.indexOf(f);f.source.owner.getGraphManager().edges.splice(v,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){for(var u=[],h=this.getGraphs(),d=h.length,f=0;f<d;f++)u=u.concat(h[f].getNodes());this.allNodes=u}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var u=[],h=this.getGraphs();h.length;for(var d=0;d<h.length;d++)u=u.concat(h[d].getEdges());u=u.concat(this.edges),this.allEdges=u}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(u){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=u},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(u){if(u.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=u,u.parent==null&&(u.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(u,h){if(!(u!=null&&h!=null))throw"assert failed";if(u==h)return!0;var d=u.getOwner(),f;do{if(f=d.getParent(),f==null)break;if(f==h)return!0;if(d=f.getOwner(),d==null)break}while(!0);d=h.getOwner();do{if(f=d.getParent(),f==null)break;if(f==u)return!0;if(d=f.getOwner(),d==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){for(var u,h,d,f,p,g=this.getAllEdges(),m=g.length,y=0;y<m;y++){if(u=g[y],h=u.source,d=u.target,u.lca=null,u.sourceInLca=h,u.targetInLca=d,h==d){u.lca=h.getOwner();continue}for(f=h.getOwner();u.lca==null;){for(u.targetInLca=d,p=d.getOwner();u.lca==null;){if(p==f){u.lca=p;break}if(p==this.rootGraph)break;if(u.lca!=null)throw"assert failed";u.targetInLca=p.getParent(),p=u.targetInLca.getOwner()}if(f==this.rootGraph)break;u.lca==null&&(u.sourceInLca=f.getParent(),f=u.sourceInLca.getOwner())}if(u.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(u,h){if(u==h)return u.getOwner();var d=u.getOwner();do{if(d==null)break;var f=h.getOwner();do{if(f==null)break;if(f==d)return f;f=f.getParent().getOwner()}while(!0);d=d.getParent().getOwner()}while(!0);return d},o.prototype.calcInclusionTreeDepths=function(u,h){u==null&&h==null&&(u=this.rootGraph,h=1);for(var d,f=u.getNodes(),p=f.length,g=0;g<p;g++)d=f[g],d.inclusionTreeDepth=h,d.child!=null&&this.calcInclusionTreeDepths(d.child,h+1)},o.prototype.includesInvalidEdge=function(){for(var u,h=this.edges.length,d=0;d<h;d++)if(u=this.edges[d],this.isOneAncestorOfOther(u.source,u.target))return!0;return!1},r.exports=o},function(r,n,a){var i=a(0);function s(){}l(s,"FDLayoutConstants");for(var o in i)s[o]=i[o];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,r.exports=s},function(r,n,a){var i=a(12);function s(){}l(s,"IGeometry"),s.calcSeparationAmount=function(o,u,h,d){if(!o.intersects(u))throw"assert failed";var f=new Array(2);this.decideDirectionsForOverlappingNodes(o,u,f),h[0]=Math.min(o.getRight(),u.getRight())-Math.max(o.x,u.x),h[1]=Math.min(o.getBottom(),u.getBottom())-Math.max(o.y,u.y),o.getX()<=u.getX()&&o.getRight()>=u.getRight()?h[0]+=Math.min(u.getX()-o.getX(),o.getRight()-u.getRight()):u.getX()<=o.getX()&&u.getRight()>=o.getRight()&&(h[0]+=Math.min(o.getX()-u.getX(),u.getRight()-o.getRight())),o.getY()<=u.getY()&&o.getBottom()>=u.getBottom()?h[1]+=Math.min(u.getY()-o.getY(),o.getBottom()-u.getBottom()):u.getY()<=o.getY()&&u.getBottom()>=o.getBottom()&&(h[1]+=Math.min(o.getY()-u.getY(),u.getBottom()-o.getBottom()));var p=Math.abs((u.getCenterY()-o.getCenterY())/(u.getCenterX()-o.getCenterX()));u.getCenterY()===o.getCenterY()&&u.getCenterX()===o.getCenterX()&&(p=1);var g=p*h[0],m=h[1]/p;h[0]<m?m=h[0]:g=h[1],h[0]=-1*f[0]*(m/2+d),h[1]=-1*f[1]*(g/2+d)},s.decideDirectionsForOverlappingNodes=function(o,u,h){o.getCenterX()<u.getCenterX()?h[0]=-1:h[0]=1,o.getCenterY()<u.getCenterY()?h[1]=-1:h[1]=1},s.getIntersection2=function(o,u,h){var d=o.getCenterX(),f=o.getCenterY(),p=u.getCenterX(),g=u.getCenterY();if(o.intersects(u))return h[0]=d,h[1]=f,h[2]=p,h[3]=g,!0;var m=o.getX(),y=o.getY(),v=o.getRight(),b=o.getX(),w=o.getBottom(),x=o.getRight(),T=o.getWidthHalf(),C=o.getHeightHalf(),S=u.getX(),E=u.getY(),k=u.getRight(),A=u.getX(),I=u.getBottom(),L=u.getRight(),R=u.getWidthHalf(),O=u.getHeightHalf(),M=!1,P=!1;if(d===p){if(f>g)return h[0]=d,h[1]=y,h[2]=p,h[3]=I,!1;if(f<g)return h[0]=d,h[1]=w,h[2]=p,h[3]=E,!1}else if(f===g){if(d>p)return h[0]=m,h[1]=f,h[2]=k,h[3]=g,!1;if(d<p)return h[0]=v,h[1]=f,h[2]=S,h[3]=g,!1}else{var z=o.height/o.width,D=u.height/u.width,B=(g-f)/(p-d),W=void 0,U=void 0,j=void 0,V=void 0,Y=void 0,H=void 0;if(-z===B?d>p?(h[0]=b,h[1]=w,M=!0):(h[0]=v,h[1]=y,M=!0):z===B&&(d>p?(h[0]=m,h[1]=y,M=!0):(h[0]=x,h[1]=w,M=!0)),-D===B?p>d?(h[2]=A,h[3]=I,P=!0):(h[2]=k,h[3]=E,P=!0):D===B&&(p>d?(h[2]=S,h[3]=E,P=!0):(h[2]=L,h[3]=I,P=!0)),M&&P)return!1;if(d>p?f>g?(W=this.getCardinalDirection(z,B,4),U=this.getCardinalDirection(D,B,2)):(W=this.getCardinalDirection(-z,B,3),U=this.getCardinalDirection(-D,B,1)):f>g?(W=this.getCardinalDirection(-z,B,1),U=this.getCardinalDirection(-D,B,3)):(W=this.getCardinalDirection(z,B,2),U=this.getCardinalDirection(D,B,4)),!M)switch(W){case 1:V=y,j=d+-C/B,h[0]=j,h[1]=V;break;case 2:j=x,V=f+T*B,h[0]=j,h[1]=V;break;case 3:V=w,j=d+C/B,h[0]=j,h[1]=V;break;case 4:j=b,V=f+-T*B,h[0]=j,h[1]=V;break}if(!P)switch(U){case 1:H=E,Y=p+-O/B,h[2]=Y,h[3]=H;break;case 2:Y=L,H=g+R*B,h[2]=Y,h[3]=H;break;case 3:H=I,Y=p+O/B,h[2]=Y,h[3]=H;break;case 4:Y=A,H=g+-R*B,h[2]=Y,h[3]=H;break}}return!1},s.getCardinalDirection=function(o,u,h){return o>u?h:1+h%4},s.getIntersection=function(o,u,h,d){if(d==null)return this.getIntersection2(o,u,h);var f=o.x,p=o.y,g=u.x,m=u.y,y=h.x,v=h.y,b=d.x,w=d.y,x=void 0,T=void 0,C=void 0,S=void 0,E=void 0,k=void 0,A=void 0,I=void 0,L=void 0;return C=m-p,E=f-g,A=g*p-f*m,S=w-v,k=y-b,I=b*v-y*w,L=C*k-S*E,L===0?null:(x=(E*I-k*A)/L,T=(S*A-C*I)/L,new i(x,T))},s.angleOfVector=function(o,u,h,d){var f=void 0;return o!==h?(f=Math.atan((d-u)/(h-o)),h<o?f+=Math.PI:d<u&&(f+=this.TWO_PI)):d<u?f=this.ONE_AND_HALF_PI:f=this.HALF_PI,f},s.doIntersect=function(o,u,h,d){var f=o.x,p=o.y,g=u.x,m=u.y,y=h.x,v=h.y,b=d.x,w=d.y,x=(g-f)*(w-v)-(b-y)*(m-p);if(x===0)return!1;var T=((w-v)*(b-f)+(y-b)*(w-p))/x,C=((p-m)*(b-f)+(g-f)*(w-p))/x;return 0<T&&T<1&&0<C&&C<1},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,r.exports=s},function(r,n,a){function i(){}l(i,"IMath"),i.sign=function(s){return s>0?1:s<0?-1:0},i.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},i.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},r.exports=i},function(r,n,a){function i(){}l(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,r.exports=i},function(r,n,a){var i=function(){function f(p,g){for(var m=0;m<g.length;m++){var y=g[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return l(f,"defineProperties"),function(p,g,m){return g&&f(p.prototype,g),m&&f(p,m),p}}();function s(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}l(s,"_classCallCheck");var o=l(function(p){return{value:p,next:null,prev:null}},"nodeFrom"),u=l(function(p,g,m,y){return p!==null?p.next=g:y.head=g,m!==null?m.prev=g:y.tail=g,g.prev=p,g.next=m,y.length++,g},"add"),h=l(function(p,g){var m=p.prev,y=p.next;return m!==null?m.next=y:g.head=y,y!==null?y.prev=m:g.tail=m,p.prev=p.next=null,g.length--,p},"_remove"),d=function(){function f(p){var g=this;s(this,f),this.length=0,this.head=null,this.tail=null,p!=null&&p.forEach(function(m){return g.push(m)})}return l(f,"LinkedList"),i(f,[{key:"size",value:l(function(){return this.length},"size")},{key:"insertBefore",value:l(function(g,m){return u(m.prev,o(g),m,this)},"insertBefore")},{key:"insertAfter",value:l(function(g,m){return u(m,o(g),m.next,this)},"insertAfter")},{key:"insertNodeBefore",value:l(function(g,m){return u(m.prev,g,m,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:l(function(g,m){return u(m,g,m.next,this)},"insertNodeAfter")},{key:"push",value:l(function(g){return u(this.tail,o(g),null,this)},"push")},{key:"unshift",value:l(function(g){return u(null,o(g),this.head,this)},"unshift")},{key:"remove",value:l(function(g){return h(g,this)},"remove")},{key:"pop",value:l(function(){return h(this.tail,this).value},"pop")},{key:"popNode",value:l(function(){return h(this.tail,this)},"popNode")},{key:"shift",value:l(function(){return h(this.head,this).value},"shift")},{key:"shiftNode",value:l(function(){return h(this.head,this)},"shiftNode")},{key:"get_object_at",value:l(function(g){if(g<=this.length()){for(var m=1,y=this.head;m<g;)y=y.next,m++;return y.value}},"get_object_at")},{key:"set_object_at",value:l(function(g,m){if(g<=this.length()){for(var y=1,v=this.head;y<g;)v=v.next,y++;v.value=m}},"set_object_at")}]),f}();r.exports=d},function(r,n,a){function i(s,o,u){this.x=null,this.y=null,s==null&&o==null&&u==null?(this.x=0,this.y=0):typeof s=="number"&&typeof o=="number"&&u==null?(this.x=s,this.y=o):s.constructor.name=="Point"&&o==null&&u==null&&(u=s,this.x=u.x,this.y=u.y)}l(i,"Point"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(s,o,u){s.constructor.name=="Point"&&o==null&&u==null?(u=s,this.setLocation(u.x,u.y)):typeof s=="number"&&typeof o=="number"&&u==null&&(parseInt(s)==s&&parseInt(o)==o?this.move(s,o):(this.x=Math.floor(s+.5),this.y=Math.floor(o+.5)))},i.prototype.move=function(s,o){this.x=s,this.y=o},i.prototype.translate=function(s,o){this.x+=s,this.y+=o},i.prototype.equals=function(s){if(s.constructor.name=="Point"){var o=s;return this.x==o.x&&this.y==o.y}return this==s},i.prototype.toString=function(){return new i().constructor.name+"[x="+this.x+",y="+this.y+"]"},r.exports=i},function(r,n,a){function i(s,o,u,h){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&o!=null&&u!=null&&h!=null&&(this.x=s,this.y=o,this.width=u,this.height=h)}l(i,"RectangleD"),i.prototype.getX=function(){return this.x},i.prototype.setX=function(s){this.x=s},i.prototype.getY=function(){return this.y},i.prototype.setY=function(s){this.y=s},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(s){this.width=s},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(s){this.height=s},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},r.exports=i},function(r,n,a){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function s(){}l(s,"UniqueIDGeneretor"),s.lastID=0,s.createID=function(o){return s.isPrimitive(o)?o:(o.uniqueID!=null||(o.uniqueID=s.getString(),s.lastID++),o.uniqueID)},s.getString=function(o){return o==null&&(o=s.lastID),"Object#"+o},s.isPrimitive=function(o){var u=typeof o=="undefined"?"undefined":i(o);return o==null||u!="object"&&u!="function"},r.exports=s},function(r,n,a){function i(y){if(Array.isArray(y)){for(var v=0,b=Array(y.length);v<y.length;v++)b[v]=y[v];return b}else return Array.from(y)}l(i,"_toConsumableArray");var s=a(0),o=a(6),u=a(3),h=a(1),d=a(5),f=a(4),p=a(17),g=a(27);function m(y){g.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,y!=null&&(this.isRemoteUse=y)}l(m,"Layout"),m.RANDOM_SEED=1,m.prototype=Object.create(g.prototype),m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},m.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},m.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},m.prototype.newGraphManager=function(){var y=new o(this);return this.graphManager=y,y},m.prototype.newGraph=function(y){return new d(null,this.graphManager,y)},m.prototype.newNode=function(y){return new u(this.graphManager,y)},m.prototype.newEdge=function(y){return new h(null,null,y)},m.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},m.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var y;return this.checkLayoutSuccess()?y=!1:y=this.layout(),s.ANIMATE==="during"?!1:(y&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,y)},m.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},m.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var y=this.graphManager.getAllEdges(),v=0;v<y.length;v++)y[v];for(var b=this.graphManager.getRoot().getNodes(),v=0;v<b.length;v++)b[v];this.update(this.graphManager.getRoot())}},m.prototype.update=function(y){if(y==null)this.update2();else if(y instanceof u){var v=y;if(v.getChild()!=null)for(var b=v.getChild().getNodes(),w=0;w<b.length;w++)update(b[w]);if(v.vGraphObject!=null){var x=v.vGraphObject;x.update(v)}}else if(y instanceof h){var T=y;if(T.vGraphObject!=null){var C=T.vGraphObject;C.update(T)}}else if(y instanceof d){var S=y;if(S.vGraphObject!=null){var E=S.vGraphObject;E.update(S)}}},m.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},m.prototype.transform=function(y){if(y==null)this.transform(new f(0,0));else{var v=new p,b=this.graphManager.getRoot().updateLeftTop();if(b!=null){v.setWorldOrgX(y.x),v.setWorldOrgY(y.y),v.setDeviceOrgX(b.x),v.setDeviceOrgY(b.y);for(var w=this.getAllNodes(),x,T=0;T<w.length;T++)x=w[T],x.transform(v)}}},m.prototype.positionNodesRandomly=function(y){if(y==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var v,b,w=y.getNodes(),x=0;x<w.length;x++)v=w[x],b=v.getChild(),b==null||b.getNodes().length==0?v.scatter():(this.positionNodesRandomly(b),v.updateBounds())},m.prototype.getFlatForest=function(){for(var y=[],v=!0,b=this.graphManager.getRoot().getNodes(),w=!0,x=0;x<b.length;x++)b[x].getChild()!=null&&(w=!1);if(!w)return y;var T=new Set,C=[],S=new Map,E=[];for(E=E.concat(b);E.length>0&&v;){for(C.push(E[0]);C.length>0&&v;){var k=C[0];C.splice(0,1),T.add(k);for(var A=k.getEdges(),x=0;x<A.length;x++){var I=A[x].getOtherEnd(k);if(S.get(k)!=I)if(!T.has(I))C.push(I),S.set(I,k);else{v=!1;break}}}if(!v)y=[];else{var L=[].concat(i(T));y.push(L);for(var x=0;x<L.length;x++){var R=L[x],O=E.indexOf(R);O>-1&&E.splice(O,1)}T=new Set,S=new Map}}return y},m.prototype.createDummyNodesForBendpoints=function(y){for(var v=[],b=y.source,w=this.graphManager.calcLowestCommonAncestor(y.source,y.target),x=0;x<y.bendpoints.length;x++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),w.add(T);var C=this.newEdge(null);this.graphManager.add(C,b,T),v.add(T),b=T}var C=this.newEdge(null);return this.graphManager.add(C,b,y.target),this.edgeToDummyNodes.set(y,v),y.isInterGraph()?this.graphManager.remove(y):w.remove(y),v},m.prototype.createBendpointsFromDummyNodes=function(){var y=[];y=y.concat(this.graphManager.getAllEdges()),y=[].concat(i(this.edgeToDummyNodes.keys())).concat(y);for(var v=0;v<y.length;v++){var b=y[v];if(b.bendpoints.length>0){for(var w=this.edgeToDummyNodes.get(b),x=0;x<w.length;x++){var T=w[x],C=new f(T.getCenterX(),T.getCenterY()),S=b.bendpoints.get(x);S.x=C.x,S.y=C.y,T.getOwner().remove(T)}this.graphManager.add(b,b.source,b.target)}}},m.transform=function(y,v,b,w){if(b!=null&&w!=null){var x=v;if(y<=50){var T=v/b;x-=(v-T)/50*(50-y)}else{var C=v*w;x+=(C-v)/50*(y-50)}return x}else{var S,E;return y<=50?(S=9*v/500,E=v/10):(S=9*v/50,E=-8*v),S*y+E}},m.findCenterOfTree=function(y){var v=[];v=v.concat(y);var b=[],w=new Map,x=!1,T=null;(v.length==1||v.length==2)&&(x=!0,T=v[0]);for(var C=0;C<v.length;C++){var S=v[C],E=S.getNeighborsList().size;w.set(S,S.getNeighborsList().size),E==1&&b.push(S)}var k=[];for(k=k.concat(b);!x;){var A=[];A=A.concat(k),k=[];for(var C=0;C<v.length;C++){var S=v[C],I=v.indexOf(S);I>=0&&v.splice(I,1);var L=S.getNeighborsList();L.forEach(function(M){if(b.indexOf(M)<0){var P=w.get(M),z=P-1;z==1&&k.push(M),w.set(M,z)}})}b=b.concat(k),(v.length==1||v.length==2)&&(x=!0,T=v[0])}return T},m.prototype.setGraphManager=function(y){this.graphManager=y},r.exports=m},function(r,n,a){function i(){}l(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},r.exports=i},function(r,n,a){var i=a(4);function s(o,u){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l(s,"Transform"),s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(o){this.lworldExtX=o},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(o){this.lworldExtY=o},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},s.prototype.transformX=function(o){var u=0,h=this.lworldExtX;return h!=0&&(u=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/h),u},s.prototype.transformY=function(o){var u=0,h=this.lworldExtY;return h!=0&&(u=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/h),u},s.prototype.inverseTransformX=function(o){var u=0,h=this.ldeviceExtX;return h!=0&&(u=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/h),u},s.prototype.inverseTransformY=function(o){var u=0,h=this.ldeviceExtY;return h!=0&&(u=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/h),u},s.prototype.inverseTransformPoint=function(o){var u=new i(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return u},r.exports=s},function(r,n,a){function i(g){if(Array.isArray(g)){for(var m=0,y=Array(g.length);m<g.length;m++)y[m]=g[m];return y}else return Array.from(g)}l(i,"_toConsumableArray");var s=a(15),o=a(7),u=a(0),h=a(8),d=a(9);function f(){s.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.springConstant=o.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=o.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}l(f,"FDLayout"),f.prototype=Object.create(s.prototype);for(var p in s)f[p]=s[p];f.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},f.prototype.calcIdealEdgeLengths=function(){for(var g,m,y,v,b,w,x=this.getGraphManager().getAllEdges(),T=0;T<x.length;T++)g=x[T],g.idealLength=this.idealEdgeLength,g.isInterGraph&&(y=g.getSource(),v=g.getTarget(),b=g.getSourceInLca().getEstimatedSize(),w=g.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(g.idealLength+=b+w-2*u.SIMPLE_NODE_SIZE),m=g.getLca().getInclusionTreeDepth(),g.idealLength+=o.DEFAULT_EDGE_LENGTH*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(y.getInclusionTreeDepth()+v.getInclusionTreeDepth()-2*m))},f.prototype.initSpringEmbedder=function(){var g=this.getAllNodes().length;this.incremental?(g>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(g-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(g>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(g-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},f.prototype.calcSpringForces=function(){for(var g=this.getAllEdges(),m,y=0;y<g.length;y++)m=g[y],this.calcSpringForce(m,m.idealLength)},f.prototype.calcRepulsionForces=function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y,v,b,w,x=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&g&&this.updateGrid(),T=new Set,y=0;y<x.length;y++)b=x[y],this.calculateRepulsionForceOfANode(b,T,g,m),T.add(b);else for(y=0;y<x.length;y++)for(b=x[y],v=y+1;v<x.length;v++)w=x[v],b.getOwner()==w.getOwner()&&this.calcRepulsionForce(b,w)},f.prototype.calcGravitationalForces=function(){for(var g,m=this.getAllNodesToApplyGravitation(),y=0;y<m.length;y++)g=m[y],this.calcGravitationalForce(g)},f.prototype.moveNodes=function(){for(var g=this.getAllNodes(),m,y=0;y<g.length;y++)m=g[y],m.move()},f.prototype.calcSpringForce=function(g,m){var y=g.getSource(),v=g.getTarget(),b,w,x,T;if(this.uniformLeafNodeSizes&&y.getChild()==null&&v.getChild()==null)g.updateLengthSimple();else if(g.updateLength(),g.isOverlapingSourceAndTarget)return;b=g.getLength(),b!=0&&(w=this.springConstant*(b-m),x=w*(g.lengthX/b),T=w*(g.lengthY/b),y.springForceX+=x,y.springForceY+=T,v.springForceX-=x,v.springForceY-=T)},f.prototype.calcRepulsionForce=function(g,m){var y=g.getRect(),v=m.getRect(),b=new Array(2),w=new Array(4),x,T,C,S,E,k,A;if(y.intersects(v)){h.calcSeparationAmount(y,v,b,o.DEFAULT_EDGE_LENGTH/2),k=2*b[0],A=2*b[1];var I=g.noOfChildren*m.noOfChildren/(g.noOfChildren+m.noOfChildren);g.repulsionForceX-=I*k,g.repulsionForceY-=I*A,m.repulsionForceX+=I*k,m.repulsionForceY+=I*A}else this.uniformLeafNodeSizes&&g.getChild()==null&&m.getChild()==null?(x=v.getCenterX()-y.getCenterX(),T=v.getCenterY()-y.getCenterY()):(h.getIntersection(y,v,w),x=w[2]-w[0],T=w[3]-w[1]),Math.abs(x)<o.MIN_REPULSION_DIST&&(x=d.sign(x)*o.MIN_REPULSION_DIST),Math.abs(T)<o.MIN_REPULSION_DIST&&(T=d.sign(T)*o.MIN_REPULSION_DIST),C=x*x+T*T,S=Math.sqrt(C),E=this.repulsionConstant*g.noOfChildren*m.noOfChildren/C,k=E*x/S,A=E*T/S,g.repulsionForceX-=k,g.repulsionForceY-=A,m.repulsionForceX+=k,m.repulsionForceY+=A},f.prototype.calcGravitationalForce=function(g){var m,y,v,b,w,x,T,C;m=g.getOwner(),y=(m.getRight()+m.getLeft())/2,v=(m.getTop()+m.getBottom())/2,b=g.getCenterX()-y,w=g.getCenterY()-v,x=Math.abs(b)+g.getWidth()/2,T=Math.abs(w)+g.getHeight()/2,g.getOwner()==this.graphManager.getRoot()?(C=m.getEstimatedSize()*this.gravityRangeFactor,(x>C||T>C)&&(g.gravitationForceX=-this.gravityConstant*b,g.gravitationForceY=-this.gravityConstant*w)):(C=m.getEstimatedSize()*this.compoundGravityRangeFactor,(x>C||T>C)&&(g.gravitationForceX=-this.gravityConstant*b*this.compoundGravityConstant,g.gravitationForceY=-this.gravityConstant*w*this.compoundGravityConstant))},f.prototype.isConverged=function(){var g,m=!1;return this.totalIterations>this.maxIterations/3&&(m=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),g=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,g||m},f.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},f.prototype.calcNoOfChildrenForAllNodes=function(){for(var g,m=this.graphManager.getAllNodes(),y=0;y<m.length;y++)g=m[y],g.noOfChildren=g.getNoOfChildren()},f.prototype.calcGrid=function(g){var m=0,y=0;m=parseInt(Math.ceil((g.getRight()-g.getLeft())/this.repulsionRange)),y=parseInt(Math.ceil((g.getBottom()-g.getTop())/this.repulsionRange));for(var v=new Array(m),b=0;b<m;b++)v[b]=new Array(y);for(var b=0;b<m;b++)for(var w=0;w<y;w++)v[b][w]=new Array;return v},f.prototype.addNodeToGrid=function(g,m,y){var v=0,b=0,w=0,x=0;v=parseInt(Math.floor((g.getRect().x-m)/this.repulsionRange)),b=parseInt(Math.floor((g.getRect().width+g.getRect().x-m)/this.repulsionRange)),w=parseInt(Math.floor((g.getRect().y-y)/this.repulsionRange)),x=parseInt(Math.floor((g.getRect().height+g.getRect().y-y)/this.repulsionRange));for(var T=v;T<=b;T++)for(var C=w;C<=x;C++)this.grid[T][C].push(g),g.setGridCoordinates(v,b,w,x)},f.prototype.updateGrid=function(){var g,m,y=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),g=0;g<y.length;g++)m=y[g],this.addNodeToGrid(m,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},f.prototype.calculateRepulsionForceOfANode=function(g,m,y,v){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&y||v){var b=new Set;g.surrounding=new Array;for(var w,x=this.grid,T=g.startX-1;T<g.finishX+2;T++)for(var C=g.startY-1;C<g.finishY+2;C++)if(!(T<0||C<0||T>=x.length||C>=x[0].length)){for(var S=0;S<x[T][C].length;S++)if(w=x[T][C][S],!(g.getOwner()!=w.getOwner()||g==w)&&!m.has(w)&&!b.has(w)){var E=Math.abs(g.getCenterX()-w.getCenterX())-(g.getWidth()/2+w.getWidth()/2),k=Math.abs(g.getCenterY()-w.getCenterY())-(g.getHeight()/2+w.getHeight()/2);E<=this.repulsionRange&&k<=this.repulsionRange&&b.add(w)}}g.surrounding=[].concat(i(b))}for(T=0;T<g.surrounding.length;T++)this.calcRepulsionForce(g,g.surrounding[T])},f.prototype.calcRepulsionRange=function(){return 0},r.exports=f},function(r,n,a){var i=a(1),s=a(7);function o(h,d,f){i.call(this,h,d,f),this.idealLength=s.DEFAULT_EDGE_LENGTH}l(o,"FDLayoutEdge"),o.prototype=Object.create(i.prototype);for(var u in i)o[u]=i[u];r.exports=o},function(r,n,a){var i=a(3);function s(u,h,d,f){i.call(this,u,h,d,f),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}l(s,"FDLayoutNode"),s.prototype=Object.create(i.prototype);for(var o in i)s[o]=i[o];s.prototype.setGridCoordinates=function(u,h,d,f){this.startX=u,this.finishX=h,this.startY=d,this.finishY=f},r.exports=s},function(r,n,a){function i(s,o){this.width=0,this.height=0,s!==null&&o!==null&&(this.height=o,this.width=s)}l(i,"DimensionD"),i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(s){this.width=s},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(s){this.height=s},r.exports=i},function(r,n,a){var i=a(14);function s(){this.map={},this.keys=[]}l(s,"HashMap"),s.prototype.put=function(o,u){var h=i.createID(o);this.contains(h)||(this.map[h]=u,this.keys.push(o))},s.prototype.contains=function(o){return i.createID(o),this.map[o]!=null},s.prototype.get=function(o){var u=i.createID(o);return this.map[u]},s.prototype.keySet=function(){return this.keys},r.exports=s},function(r,n,a){var i=a(14);function s(){this.set={}}l(s,"HashSet"),s.prototype.add=function(o){var u=i.createID(o);this.contains(u)||(this.set[u]=o)},s.prototype.remove=function(o){delete this.set[i.createID(o)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(o){return this.set[i.createID(o)]==o},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(o){for(var u=Object.keys(this.set),h=u.length,d=0;d<h;d++)o.push(this.set[u[d]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(o){for(var u=o.length,h=0;h<u;h++){var d=o[h];this.add(d)}},r.exports=s},function(r,n,a){var i=function(){function h(d,f){for(var p=0;p<f.length;p++){var g=f[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}return l(h,"defineProperties"),function(d,f,p){return f&&h(d.prototype,f),p&&h(d,p),d}}();function s(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}l(s,"_classCallCheck");var o=a(11),u=function(){function h(d,f){s(this,h),(f!==null||f!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var p=void 0;d instanceof o?p=d.size():p=d.length,this._quicksort(d,0,p-1)}return l(h,"Quicksort"),i(h,[{key:"_quicksort",value:l(function(f,p,g){if(p<g){var m=this._partition(f,p,g);this._quicksort(f,p,m),this._quicksort(f,m+1,g)}},"_quicksort")},{key:"_partition",value:l(function(f,p,g){for(var m=this._get(f,p),y=p,v=g;;){for(;this.compareFunction(m,this._get(f,v));)v--;for(;this.compareFunction(this._get(f,y),m);)y++;if(y<v)this._swap(f,y,v),y++,v--;else return v}},"_partition")},{key:"_get",value:l(function(f,p){return f instanceof o?f.get_object_at(p):f[p]},"_get")},{key:"_set",value:l(function(f,p,g){f instanceof o?f.set_object_at(p,g):f[p]=g},"_set")},{key:"_swap",value:l(function(f,p,g){var m=this._get(f,p);this._set(f,p,this._get(f,g)),this._set(f,g,m)},"_swap")},{key:"_defaultCompareFunction",value:l(function(f,p){return p>f},"_defaultCompareFunction")}]),h}();r.exports=u},function(r,n,a){var i=function(){function u(h,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return l(u,"defineProperties"),function(h,d,f){return d&&u(h.prototype,d),f&&u(h,f),h}}();function s(u,h){if(!(u instanceof h))throw new TypeError("Cannot call a class as a function")}l(s,"_classCallCheck");var o=function(){function u(h,d){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,u),this.sequence1=h,this.sequence2=d,this.match_score=f,this.mismatch_penalty=p,this.gap_penalty=g,this.iMax=h.length+1,this.jMax=d.length+1,this.grid=new Array(this.iMax);for(var m=0;m<this.iMax;m++){this.grid[m]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.grid[m][y]=0}this.tracebackGrid=new Array(this.iMax);for(var v=0;v<this.iMax;v++){this.tracebackGrid[v]=new Array(this.jMax);for(var b=0;b<this.jMax;b++)this.tracebackGrid[v][b]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return l(u,"NeedlemanWunsch"),i(u,[{key:"getScore",value:l(function(){return this.score},"getScore")},{key:"getAlignments",value:l(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:l(function(){for(var d=1;d<this.jMax;d++)this.grid[0][d]=this.grid[0][d-1]+this.gap_penalty,this.tracebackGrid[0][d]=[!1,!1,!0];for(var f=1;f<this.iMax;f++)this.grid[f][0]=this.grid[f-1][0]+this.gap_penalty,this.tracebackGrid[f][0]=[!1,!0,!1];for(var p=1;p<this.iMax;p++)for(var g=1;g<this.jMax;g++){var m=void 0;this.sequence1[p-1]===this.sequence2[g-1]?m=this.grid[p-1][g-1]+this.match_score:m=this.grid[p-1][g-1]+this.mismatch_penalty;var y=this.grid[p-1][g]+this.gap_penalty,v=this.grid[p][g-1]+this.gap_penalty,b=[m,y,v],w=this.arrayAllMaxIndexes(b);this.grid[p][g]=b[w[0]],this.tracebackGrid[p][g]=[w.includes(0),w.includes(1),w.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:l(function(){var d=[];for(d.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});d[0];){var f=d[0],p=this.tracebackGrid[f.pos[0]][f.pos[1]];p[0]&&d.push({pos:[f.pos[0]-1,f.pos[1]-1],seq1:this.sequence1[f.pos[0]-1]+f.seq1,seq2:this.sequence2[f.pos[1]-1]+f.seq2}),p[1]&&d.push({pos:[f.pos[0]-1,f.pos[1]],seq1:this.sequence1[f.pos[0]-1]+f.seq1,seq2:"-"+f.seq2}),p[2]&&d.push({pos:[f.pos[0],f.pos[1]-1],seq1:"-"+f.seq1,seq2:this.sequence2[f.pos[1]-1]+f.seq2}),f.pos[0]===0&&f.pos[1]===0&&this.alignments.push({sequence1:f.seq1,sequence2:f.seq2}),d.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:l(function(d,f){for(var p=[],g=-1;(g=d.indexOf(f,g+1))!==-1;)p.push(g);return p},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:l(function(d){return this.getAllIndexes(d,Math.max.apply(null,d))},"arrayAllMaxIndexes")}]),u}();r.exports=o},function(r,n,a){var i=l(function(){},"layoutBase");i.FDLayout=a(18),i.FDLayoutConstants=a(7),i.FDLayoutEdge=a(19),i.FDLayoutNode=a(20),i.DimensionD=a(21),i.HashMap=a(22),i.HashSet=a(23),i.IGeometry=a(8),i.IMath=a(9),i.Integer=a(10),i.Point=a(12),i.PointD=a(4),i.RandomSeed=a(16),i.RectangleD=a(13),i.Transform=a(17),i.UniqueIDGeneretor=a(14),i.Quicksort=a(24),i.LinkedList=a(11),i.LGraphObject=a(2),i.LGraph=a(5),i.LEdge=a(1),i.LGraphManager=a(6),i.LNode=a(3),i.Layout=a(15),i.LayoutConstants=a(0),i.NeedlemanWunsch=a(25),r.exports=i},function(r,n,a){function i(){this.listeners=[]}l(i,"Emitter");var s=i.prototype;s.addListener=function(o,u){this.listeners.push({event:o,callback:u})},s.removeListener=function(o,u){for(var h=this.listeners.length;h>=0;h--){var d=this.listeners[h];d.event===o&&d.callback===u&&this.listeners.splice(h,1)}},s.emit=function(o,u){for(var h=0;h<this.listeners.length;h++){var d=this.listeners[h];o===d.event&&d.callback(u)}},r.exports=i}])})}(Ej)),Ej.exports}l(gjt,"requireLayoutBase$1");var $Ae;function mjt(){return $Ae||($Ae=1,function(t,e){l(function(n,a){t.exports=a(gjt())},"webpackUniversalModuleDefinition")(Nl,function(r){return function(n){var a={};function i(s){if(a[s])return a[s].exports;var o=a[s]={i:s,l:!1,exports:{}};return n[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return l(i,"__webpack_require__"),i.m=n,i.c=a,i.i=function(s){return s},i.d=function(s,o,u){i.o(s,o)||Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:u})},i.n=function(s){var o=s&&s.__esModule?l(function(){return s.default},"getDefault"):l(function(){return s},"getModuleExports");return i.d(o,"a",o),o},i.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},i.p="",i(i.s=7)}([function(n,a){n.exports=r},function(n,a,i){var s=i(0).FDLayoutConstants;function o(){}l(o,"CoSEConstants");for(var u in s)o[u]=s[u];o.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,o.DEFAULT_RADIAL_SEPARATION=s.DEFAULT_EDGE_LENGTH,o.DEFAULT_COMPONENT_SEPERATION=60,o.TILE=!0,o.TILING_PADDING_VERTICAL=10,o.TILING_PADDING_HORIZONTAL=10,o.TREE_REDUCTION_ON_INCREMENTAL=!1,n.exports=o},function(n,a,i){var s=i(0).FDLayoutEdge;function o(h,d,f){s.call(this,h,d,f)}l(o,"CoSEEdge"),o.prototype=Object.create(s.prototype);for(var u in s)o[u]=s[u];n.exports=o},function(n,a,i){var s=i(0).LGraph;function o(h,d,f){s.call(this,h,d,f)}l(o,"CoSEGraph"),o.prototype=Object.create(s.prototype);for(var u in s)o[u]=s[u];n.exports=o},function(n,a,i){var s=i(0).LGraphManager;function o(h){s.call(this,h)}l(o,"CoSEGraphManager"),o.prototype=Object.create(s.prototype);for(var u in s)o[u]=s[u];n.exports=o},function(n,a,i){var s=i(0).FDLayoutNode,o=i(0).IMath;function u(d,f,p,g){s.call(this,d,f,p,g)}l(u,"CoSENode"),u.prototype=Object.create(s.prototype);for(var h in s)u[h]=s[h];u.prototype.move=function(){var d=this.graphManager.getLayout();this.displacementX=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*o.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*o.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),d.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},u.prototype.propogateDisplacementToChildren=function(d,f){for(var p=this.getChild().getNodes(),g,m=0;m<p.length;m++)g=p[m],g.getChild()==null?(g.moveBy(d,f),g.displacementX+=d,g.displacementY+=f):g.propogateDisplacementToChildren(d,f)},u.prototype.setPred1=function(d){this.pred1=d},u.prototype.getPred1=function(){return pred1},u.prototype.getPred2=function(){return pred2},u.prototype.setNext=function(d){this.next=d},u.prototype.getNext=function(){return next},u.prototype.setProcessed=function(d){this.processed=d},u.prototype.isProcessed=function(){return processed},n.exports=u},function(n,a,i){var s=i(0).FDLayout,o=i(4),u=i(3),h=i(5),d=i(2),f=i(1),p=i(0).FDLayoutConstants,g=i(0).LayoutConstants,m=i(0).Point,y=i(0).PointD,v=i(0).Layout,b=i(0).Integer,w=i(0).IGeometry,x=i(0).LGraph,T=i(0).Transform;function C(){s.call(this),this.toBeTiled={}}l(C,"CoSELayout"),C.prototype=Object.create(s.prototype);for(var S in s)C[S]=s[S];C.prototype.newGraphManager=function(){var E=new o(this);return this.graphManager=E,E},C.prototype.newGraph=function(E){return new u(null,this.graphManager,E)},C.prototype.newNode=function(E){return new h(this.graphManager,E)},C.prototype.newEdge=function(E){return new d(null,null,E)},C.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.isSubLayout||(f.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=f.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=f.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=p.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=p.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=p.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=p.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=p.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=p.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/p.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=p.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},C.prototype.layout=function(){var E=g.DEFAULT_CREATE_BENDS_AS_NEEDED;return E&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},C.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(f.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(R){return k.has(R)});this.graphManager.setAllNodesToApplyGravitation(A)}}else{var E=this.getFlatForest();if(E.length>0)this.positionNodesRadially(E);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),A=this.nodesWithGravity.filter(function(I){return k.has(I)});this.graphManager.setAllNodesToApplyGravitation(A),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},C.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%p.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),k=this.nodesWithGravity.filter(function(L){return E.has(L)});this.graphManager.setAllNodesToApplyGravitation(k),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=p.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var A=!this.isTreeGrowing&&!this.isGrowthFinished,I=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(A,I),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},C.prototype.getPositionsData=function(){for(var E=this.graphManager.getAllNodes(),k={},A=0;A<E.length;A++){var I=E[A].rect,L=E[A].id;k[L]={id:L,x:I.getCenterX(),y:I.getCenterY(),w:I.width,h:I.height}}return k},C.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var E=!1;if(p.ANIMATE==="during")this.emit("layoutstarted");else{for(;!E;)E=this.tick();this.graphManager.updateBounds()}},C.prototype.calculateNodesToApplyGravitationTo=function(){var E=[],k,A=this.graphManager.getGraphs(),I=A.length,L;for(L=0;L<I;L++)k=A[L],k.updateConnected(),k.isConnected||(E=E.concat(k.getNodes()));return E},C.prototype.createBendpoints=function(){var E=[];E=E.concat(this.graphManager.getAllEdges());var k=new Set,A;for(A=0;A<E.length;A++){var I=E[A];if(!k.has(I)){var L=I.getSource(),R=I.getTarget();if(L==R)I.getBendpoints().push(new y),I.getBendpoints().push(new y),this.createDummyNodesForBendpoints(I),k.add(I);else{var O=[];if(O=O.concat(L.getEdgeListToNode(R)),O=O.concat(R.getEdgeListToNode(L)),!k.has(O[0])){if(O.length>1){var M;for(M=0;M<O.length;M++){var P=O[M];P.getBendpoints().push(new y),this.createDummyNodesForBendpoints(P)}}O.forEach(function(z){k.add(z)})}}}if(k.size==E.length)break}},C.prototype.positionNodesRadially=function(E){for(var k=new m(0,0),A=Math.ceil(Math.sqrt(E.length)),I=0,L=0,R=0,O=new y(0,0),M=0;M<E.length;M++){M%A==0&&(R=0,L=I,M!=0&&(L+=f.DEFAULT_COMPONENT_SEPERATION),I=0);var P=E[M],z=v.findCenterOfTree(P);k.x=R,k.y=L,O=C.radialLayout(P,z,k),O.y>I&&(I=Math.floor(O.y)),R=Math.floor(O.x+f.DEFAULT_COMPONENT_SEPERATION)}this.transform(new y(g.WORLD_CENTER_X-O.x/2,g.WORLD_CENTER_Y-O.y/2))},C.radialLayout=function(E,k,A){var I=Math.max(this.maxDiagonalInTree(E),f.DEFAULT_RADIAL_SEPARATION);C.branchRadialLayout(k,null,0,359,0,I);var L=x.calculateBounds(E),R=new T;R.setDeviceOrgX(L.getMinX()),R.setDeviceOrgY(L.getMinY()),R.setWorldOrgX(A.x),R.setWorldOrgY(A.y);for(var O=0;O<E.length;O++){var M=E[O];M.transform(R)}var P=new y(L.getMaxX(),L.getMaxY());return R.inverseTransformPoint(P)},C.branchRadialLayout=function(E,k,A,I,L,R){var O=(I-A+1)/2;O<0&&(O+=180);var M=(O+A)%360,P=M*w.TWO_PI/360,z=L*Math.cos(P),D=L*Math.sin(P);E.setCenter(z,D);var B=[];B=B.concat(E.getEdges());var W=B.length;k!=null&&W--;for(var U=0,j=B.length,V,Y=E.getEdgesBetween(k);Y.length>1;){var H=Y[0];Y.splice(0,1);var q=B.indexOf(H);q>=0&&B.splice(q,1),j--,W--}k!=null?V=(B.indexOf(Y[0])+1)%j:V=0;for(var Z=Math.abs(I-A)/W,K=V;U!=W;K=++K%j){var re=B[K].getOtherEnd(E);if(re!=k){var Q=(A+U*Z)%360,te=(Q+Z)%360;C.branchRadialLayout(re,E,Q,te,L+R,R),U++}}},C.maxDiagonalInTree=function(E){for(var k=b.MIN_VALUE,A=0;A<E.length;A++){var I=E[A],L=I.getDiagonal();L>k&&(k=L)}return k},C.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},C.prototype.groupZeroDegreeMembers=function(){var E=this,k={};this.memberGroups={},this.idToDummyNode={};for(var A=[],I=this.graphManager.getAllNodes(),L=0;L<I.length;L++){var R=I[L],O=R.getParent();this.getNodeDegreeWithChildren(R)===0&&(O.id==null||!this.getToBeTiled(O))&&A.push(R)}for(var L=0;L<A.length;L++){var R=A[L],M=R.getParent().id;typeof k[M]=="undefined"&&(k[M]=[]),k[M]=k[M].concat(R)}Object.keys(k).forEach(function(P){if(k[P].length>1){var z="DummyCompound_"+P;E.memberGroups[z]=k[P];var D=k[P][0].getParent(),B=new h(E.graphManager);B.id=z,B.paddingLeft=D.paddingLeft||0,B.paddingRight=D.paddingRight||0,B.paddingBottom=D.paddingBottom||0,B.paddingTop=D.paddingTop||0,E.idToDummyNode[z]=B;var W=E.getGraphManager().add(E.newGraph(),B),U=D.getChild();U.add(B);for(var j=0;j<k[P].length;j++){var V=k[P][j];U.remove(V),W.add(V)}}})},C.prototype.clearCompounds=function(){var E={},k={};this.performDFSOnCompounds();for(var A=0;A<this.compoundOrder.length;A++)k[this.compoundOrder[A].id]=this.compoundOrder[A],E[this.compoundOrder[A].id]=[].concat(this.compoundOrder[A].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[A].getChild()),this.compoundOrder[A].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(E,k)},C.prototype.clearZeroDegreeMembers=function(){var E=this,k=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(A){var I=E.idToDummyNode[A];k[A]=E.tileNodes(E.memberGroups[A],I.paddingLeft+I.paddingRight),I.rect.width=k[A].width,I.rect.height=k[A].height})},C.prototype.repopulateCompounds=function(){for(var E=this.compoundOrder.length-1;E>=0;E--){var k=this.compoundOrder[E],A=k.id,I=k.paddingLeft,L=k.paddingTop;this.adjustLocations(this.tiledMemberPack[A],k.rect.x,k.rect.y,I,L)}},C.prototype.repopulateZeroDegreeMembers=function(){var E=this,k=this.tiledZeroDegreePack;Object.keys(k).forEach(function(A){var I=E.idToDummyNode[A],L=I.paddingLeft,R=I.paddingTop;E.adjustLocations(k[A],I.rect.x,I.rect.y,L,R)})},C.prototype.getToBeTiled=function(E){var k=E.id;if(this.toBeTiled[k]!=null)return this.toBeTiled[k];var A=E.getChild();if(A==null)return this.toBeTiled[k]=!1,!1;for(var I=A.getNodes(),L=0;L<I.length;L++){var R=I[L];if(this.getNodeDegree(R)>0)return this.toBeTiled[k]=!1,!1;if(R.getChild()==null){this.toBeTiled[R.id]=!1;continue}if(!this.getToBeTiled(R))return this.toBeTiled[k]=!1,!1}return this.toBeTiled[k]=!0,!0},C.prototype.getNodeDegree=function(E){E.id;for(var k=E.getEdges(),A=0,I=0;I<k.length;I++){var L=k[I];L.getSource().id!==L.getTarget().id&&(A=A+1)}return A},C.prototype.getNodeDegreeWithChildren=function(E){var k=this.getNodeDegree(E);if(E.getChild()==null)return k;for(var A=E.getChild().getNodes(),I=0;I<A.length;I++){var L=A[I];k+=this.getNodeDegreeWithChildren(L)}return k},C.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},C.prototype.fillCompexOrderByDFS=function(E){for(var k=0;k<E.length;k++){var A=E[k];A.getChild()!=null&&this.fillCompexOrderByDFS(A.getChild().getNodes()),this.getToBeTiled(A)&&this.compoundOrder.push(A)}},C.prototype.adjustLocations=function(E,k,A,I,L){k+=I,A+=L;for(var R=k,O=0;O<E.rows.length;O++){var M=E.rows[O];k=R;for(var P=0,z=0;z<M.length;z++){var D=M[z];D.rect.x=k,D.rect.y=A,k+=D.rect.width+E.horizontalPadding,D.rect.height>P&&(P=D.rect.height)}A+=P+E.verticalPadding}},C.prototype.tileCompoundMembers=function(E,k){var A=this;this.tiledMemberPack=[],Object.keys(E).forEach(function(I){var L=k[I];A.tiledMemberPack[I]=A.tileNodes(E[I],L.paddingLeft+L.paddingRight),L.rect.width=A.tiledMemberPack[I].width,L.rect.height=A.tiledMemberPack[I].height})},C.prototype.tileNodes=function(E,k){var A=f.TILING_PADDING_VERTICAL,I=f.TILING_PADDING_HORIZONTAL,L={rows:[],rowWidth:[],rowHeight:[],width:0,height:k,verticalPadding:A,horizontalPadding:I};E.sort(function(M,P){return M.rect.width*M.rect.height>P.rect.width*P.rect.height?-1:M.rect.width*M.rect.height<P.rect.width*P.rect.height?1:0});for(var R=0;R<E.length;R++){var O=E[R];L.rows.length==0?this.insertNodeToRow(L,O,0,k):this.canAddHorizontal(L,O.rect.width,O.rect.height)?this.insertNodeToRow(L,O,this.getShortestRowIndex(L),k):this.insertNodeToRow(L,O,L.rows.length,k),this.shiftToLastRow(L)}return L},C.prototype.insertNodeToRow=function(E,k,A,I){var L=I;if(A==E.rows.length){var R=[];E.rows.push(R),E.rowWidth.push(L),E.rowHeight.push(0)}var O=E.rowWidth[A]+k.rect.width;E.rows[A].length>0&&(O+=E.horizontalPadding),E.rowWidth[A]=O,E.width<O&&(E.width=O);var M=k.rect.height;A>0&&(M+=E.verticalPadding);var P=0;M>E.rowHeight[A]&&(P=E.rowHeight[A],E.rowHeight[A]=M,P=E.rowHeight[A]-P),E.height+=P,E.rows[A].push(k)},C.prototype.getShortestRowIndex=function(E){for(var k=-1,A=Number.MAX_VALUE,I=0;I<E.rows.length;I++)E.rowWidth[I]<A&&(k=I,A=E.rowWidth[I]);return k},C.prototype.getLongestRowIndex=function(E){for(var k=-1,A=Number.MIN_VALUE,I=0;I<E.rows.length;I++)E.rowWidth[I]>A&&(k=I,A=E.rowWidth[I]);return k},C.prototype.canAddHorizontal=function(E,k,A){var I=this.getShortestRowIndex(E);if(I<0)return!0;var L=E.rowWidth[I];if(L+E.horizontalPadding+k<=E.width)return!0;var R=0;E.rowHeight[I]<A&&I>0&&(R=A+E.verticalPadding-E.rowHeight[I]);var O;E.width-L>=k+E.horizontalPadding?O=(E.height+R)/(L+k+E.horizontalPadding):O=(E.height+R)/E.width,R=A+E.verticalPadding;var M;return E.width<k?M=(E.height+R)/k:M=(E.height+R)/E.width,M<1&&(M=1/M),O<1&&(O=1/O),O<M},C.prototype.shiftToLastRow=function(E){var k=this.getLongestRowIndex(E),A=E.rowWidth.length-1,I=E.rows[k],L=I[I.length-1],R=L.width+E.horizontalPadding;if(E.width-E.rowWidth[A]>R&&k!=A){I.splice(-1,1),E.rows[A].push(L),E.rowWidth[k]=E.rowWidth[k]-R,E.rowWidth[A]=E.rowWidth[A]+R,E.width=E.rowWidth[instance.getLongestRowIndex(E)];for(var O=Number.MIN_VALUE,M=0;M<I.length;M++)I[M].height>O&&(O=I[M].height);k>0&&(O+=E.verticalPadding);var P=E.rowHeight[k]+E.rowHeight[A];E.rowHeight[k]=O,E.rowHeight[A]<L.height+E.verticalPadding&&(E.rowHeight[A]=L.height+E.verticalPadding);var z=E.rowHeight[k]+E.rowHeight[A];E.height+=z-P,this.shiftToLastRow(E)}},C.prototype.tilingPreLayout=function(){f.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},C.prototype.tilingPostLayout=function(){f.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},C.prototype.reduceTrees=function(){for(var E=[],k=!0,A;k;){var I=this.graphManager.getAllNodes(),L=[];k=!1;for(var R=0;R<I.length;R++)A=I[R],A.getEdges().length==1&&!A.getEdges()[0].isInterGraph&&A.getChild()==null&&(L.push([A,A.getEdges()[0],A.getOwner()]),k=!0);if(k==!0){for(var O=[],M=0;M<L.length;M++)L[M][0].getEdges().length==1&&(O.push(L[M]),L[M][0].getOwner().remove(L[M][0]));E.push(O),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=E},C.prototype.growTree=function(E){for(var k=E.length,A=E[k-1],I,L=0;L<A.length;L++)I=A[L],this.findPlaceforPrunedNode(I),I[2].add(I[0]),I[2].add(I[1],I[1].source,I[1].target);E.splice(E.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},C.prototype.findPlaceforPrunedNode=function(E){var k,A,I=E[0];I==E[1].source?A=E[1].target:A=E[1].source;var L=A.startX,R=A.finishX,O=A.startY,M=A.finishY,P=0,z=0,D=0,B=0,W=[P,D,z,B];if(O>0)for(var U=L;U<=R;U++)W[0]+=this.grid[U][O-1].length+this.grid[U][O].length-1;if(R<this.grid.length-1)for(var U=O;U<=M;U++)W[1]+=this.grid[R+1][U].length+this.grid[R][U].length-1;if(M<this.grid[0].length-1)for(var U=L;U<=R;U++)W[2]+=this.grid[U][M+1].length+this.grid[U][M].length-1;if(L>0)for(var U=O;U<=M;U++)W[3]+=this.grid[L-1][U].length+this.grid[L][U].length-1;for(var j=b.MAX_VALUE,V,Y,H=0;H<W.length;H++)W[H]<j?(j=W[H],V=1,Y=H):W[H]==j&&V++;if(V==3&&j==0)W[0]==0&&W[1]==0&&W[2]==0?k=1:W[0]==0&&W[1]==0&&W[3]==0?k=0:W[0]==0&&W[2]==0&&W[3]==0?k=3:W[1]==0&&W[2]==0&&W[3]==0&&(k=2);else if(V==2&&j==0){var q=Math.floor(Math.random()*2);W[0]==0&&W[1]==0?q==0?k=0:k=1:W[0]==0&&W[2]==0?q==0?k=0:k=2:W[0]==0&&W[3]==0?q==0?k=0:k=3:W[1]==0&&W[2]==0?q==0?k=1:k=2:W[1]==0&&W[3]==0?q==0?k=1:k=3:q==0?k=2:k=3}else if(V==4&&j==0){var q=Math.floor(Math.random()*4);k=q}else k=Y;k==0?I.setCenter(A.getCenterX(),A.getCenterY()-A.getHeight()/2-p.DEFAULT_EDGE_LENGTH-I.getHeight()/2):k==1?I.setCenter(A.getCenterX()+A.getWidth()/2+p.DEFAULT_EDGE_LENGTH+I.getWidth()/2,A.getCenterY()):k==2?I.setCenter(A.getCenterX(),A.getCenterY()+A.getHeight()/2+p.DEFAULT_EDGE_LENGTH+I.getHeight()/2):I.setCenter(A.getCenterX()-A.getWidth()/2-p.DEFAULT_EDGE_LENGTH-I.getWidth()/2,A.getCenterY())},n.exports=C},function(n,a,i){var s={};s.layoutBase=i(0),s.CoSEConstants=i(1),s.CoSEEdge=i(2),s.CoSEGraph=i(3),s.CoSEGraphManager=i(4),s.CoSELayout=i(6),s.CoSENode=i(5),n.exports=s}])})}(Tj)),Tj.exports}l(mjt,"requireCoseBase$1"),function(t,e){l(function(n,a){t.exports=a(mjt())},"webpackUniversalModuleDefinition")(Nl,function(r){return function(n){var a={};function i(s){if(a[s])return a[s].exports;var o=a[s]={i:s,l:!1,exports:{}};return n[s].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return l(i,"__webpack_require__"),i.m=n,i.c=a,i.i=function(s){return s},i.d=function(s,o,u){i.o(s,o)||Object.defineProperty(s,o,{configurable:!1,enumerable:!0,get:u})},i.n=function(s){var o=s&&s.__esModule?l(function(){return s.default},"getDefault"):l(function(){return s},"getModuleExports");return i.d(o,"a",o),o},i.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},i.p="",i(i.s=1)}([function(n,a){n.exports=r},function(n,a,i){var s=i(0).layoutBase.LayoutConstants,o=i(0).layoutBase.FDLayoutConstants,u=i(0).CoSEConstants,h=i(0).CoSELayout,d=i(0).CoSENode,f=i(0).layoutBase.PointD,p=i(0).layoutBase.DimensionD,g={ready:l(function(){},"ready"),stop:l(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function m(w,x){var T={};for(var C in w)T[C]=w[C];for(var C in x)T[C]=x[C];return T}l(m,"extend");function y(w){this.options=m(g,w),v(this.options)}l(y,"_CoSELayout");var v=l(function(x){x.nodeRepulsion!=null&&(u.DEFAULT_REPULSION_STRENGTH=o.DEFAULT_REPULSION_STRENGTH=x.nodeRepulsion),x.idealEdgeLength!=null&&(u.DEFAULT_EDGE_LENGTH=o.DEFAULT_EDGE_LENGTH=x.idealEdgeLength),x.edgeElasticity!=null&&(u.DEFAULT_SPRING_STRENGTH=o.DEFAULT_SPRING_STRENGTH=x.edgeElasticity),x.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=o.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(u.MAX_ITERATIONS=o.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=o.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.quality=="draft"?s.QUALITY=0:x.quality=="proof"?s.QUALITY=2:s.QUALITY=1,u.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!x.randomize,u.ANIMATE=o.ANIMATE=s.ANIMATE=x.animate,u.TILE=x.tile,u.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal},"getUserOptions");y.prototype.run=function(){var w,x,T=this.options;this.idToLNode={};var C=this.layout=new h,S=this;S.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var E=C.newGraphManager();this.gm=E;var k=this.options.eles.nodes(),A=this.options.eles.edges();this.root=E.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(k),C);for(var I=0;I<A.length;I++){var L=A[I],R=this.idToLNode[L.data("source")],O=this.idToLNode[L.data("target")];if(R!==O&&R.getEdgesBetween(O).length==0){var M=E.add(C.newEdge(),R,O);M.id=L.id()}}var P=l(function(B,W){typeof B=="number"&&(B=W);var U=B.data("id"),j=S.idToLNode[U];return{x:j.getRect().getCenterX(),y:j.getRect().getCenterY()}},"getPositions"),z=l(function D(){for(var B=l(function(){T.fit&&T.cy.fit(T.eles,T.padding),w||(w=!0,S.cy.one("layoutready",T.ready),S.cy.trigger({type:"layoutready",layout:S}))},"afterReposition"),W=S.options.refresh,U,j=0;j<W&&!U;j++)U=S.stopped||S.layout.tick();if(U){C.checkLayoutSuccess()&&!C.isSubLayout&&C.doPostLayout(),C.tilingPostLayout&&C.tilingPostLayout(),C.isLayoutFinished=!0,S.options.eles.nodes().positions(P),B(),S.cy.one("layoutstop",S.options.stop),S.cy.trigger({type:"layoutstop",layout:S}),x&&cancelAnimationFrame(x),w=!1;return}var V=S.layout.getPositionsData();T.eles.nodes().positions(function(Y,H){if(typeof Y=="number"&&(Y=H),!Y.isParent()){for(var q=Y.id(),Z=V[q],K=Y;Z==null&&(Z=V[K.data("parent")]||V["DummyCompound_"+K.data("parent")],V[q]=Z,K=K.parent()[0],K!=null););return Z!=null?{x:Z.x,y:Z.y}:{x:Y.position("x"),y:Y.position("y")}}}),B(),x=requestAnimationFrame(D)},"iterateAnimated");return C.addListener("layoutstarted",function(){S.options.animate==="during"&&(x=requestAnimationFrame(z))}),C.runLayout(),this.options.animate!=="during"&&(S.options.eles.nodes().not(":parent").layoutPositions(S,S.options,P),w=!1),this},y.prototype.getTopMostNodes=function(w){for(var x={},T=0;T<w.length;T++)x[w[T].id()]=!0;var C=w.filter(function(S,E){typeof S=="number"&&(S=E);for(var k=S.parent()[0];k!=null;){if(x[k.id()])return!1;k=k.parent()[0]}return!0});return C},y.prototype.processChildrenList=function(w,x,T){for(var C=x.length,S=0;S<C;S++){var E=x[S],k=E.children(),A,I=E.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(E.outerWidth()!=null&&E.outerHeight()!=null?A=w.add(new d(T.graphManager,new f(E.position("x")-I.w/2,E.position("y")-I.h/2),new p(parseFloat(I.w),parseFloat(I.h)))):A=w.add(new d(this.graphManager)),A.id=E.data("id"),A.paddingLeft=parseInt(E.css("padding")),A.paddingTop=parseInt(E.css("padding")),A.paddingRight=parseInt(E.css("padding")),A.paddingBottom=parseInt(E.css("padding")),this.options.nodeDimensionsIncludeLabels&&E.isParent()){var L=E.boundingBox({includeLabels:!0,includeNodes:!1}).w,R=E.boundingBox({includeLabels:!0,includeNodes:!1}).h,O=E.css("text-halign");A.labelWidth=L,A.labelHeight=R,A.labelPos=O}if(this.idToLNode[E.data("id")]=A,isNaN(A.rect.x)&&(A.rect.x=0),isNaN(A.rect.y)&&(A.rect.y=0),k!=null&&k.length>0){var M;M=T.getGraphManager().add(T.newGraph(),A),this.processChildrenList(M,k,T)}}},y.prototype.stop=function(){return this.stopped=!0,this};var b=l(function(x){x("layout","cose-bilkent",y)},"register");typeof cytoscape!="undefined"&&b(cytoscape),n.exports=b}])})}(IAe);var yjt=IAe.exports,vjt=Pd(yjt);cd.use(vjt);function MAe(t,e){t.forEach(r=>{var a,i,s;const n={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:(a=r.padding)!=null?a:0};Object.keys(r).forEach(o=>{["id","label","height","width","padding","x","y"].includes(o)||(n[o]=r[o])}),e.add({group:"nodes",data:n,position:{x:(i=r.x)!=null?i:0,y:(s=r.y)!=null?s:0}})})}l(MAe,"addNodes"),_(MAe,"addNodes");function PAe(t,e){t.forEach(r=>{const n={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach(a=>{["id","start","end"].includes(a)||(n[a]=r[a])}),e.add({group:"edges",data:n})})}l(PAe,"addEdges$1"),_(PAe,"addEdges");function RAe(t){return new Promise(e=>{const r=Yt("body").append("div").attr("id","cy").attr("style","display:none"),n=cd({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),MAe(t.nodes,n),PAe(t.edges,n),n.nodes().forEach(function(i){i.layoutDimensions=()=>{const s=i.data();return{w:s.width,h:s.height}}});const a={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(a).run(),n.ready(i=>{Le.info("Cytoscape ready",i),e(n)})})}l(RAe,"createCytoscapeInstance"),_(RAe,"createCytoscapeInstance");function OAe(t){return t.nodes().map(e=>{const r=e.data(),n=e.position(),a={id:r.id,x:n.x,y:n.y};return Object.keys(r).forEach(i=>{i!=="id"&&(a[i]=r[i])}),a})}l(OAe,"extractPositionedNodes"),_(OAe,"extractPositionedNodes");function DAe(t){return t.edges().map(e=>{const r=e.data(),n=e._private.rscratch,a={id:r.id,source:r.source,target:r.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(r).forEach(i=>{["id","source","target"].includes(i)||(a[i]=r[i])}),a})}l(DAe,"extractPositionedEdges"),_(DAe,"extractPositionedEdges");function FAe(t,e){return nt(this,null,function*(){Le.debug("Starting cose-bilkent layout algorithm");try{BAe(t);const r=yield RAe(t),n=OAe(r),a=DAe(r);return Le.debug(`Layout completed: ${n.length} nodes, ${a.length} edges`),{nodes:n,edges:a}}catch(r){throw Le.error("Error in cose-bilkent layout algorithm:",r),r}})}l(FAe,"executeCoseBilkentLayout"),_(FAe,"executeCoseBilkentLayout");function BAe(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw new Error("Edges array is required in layout data");return!0}l(BAe,"validateLayoutData"),_(BAe,"validateLayoutData");var bjt=_((d,f,p,g)=>nt(this,[d,f,p,g],function*(t,e,{insertCluster:r,insertEdge:n,insertEdgeLabel:a,insertMarkers:i,insertNode:s,log:o,positionEdgeLabel:u},{algorithm:h}){const m={},y={},v=e.select("g");i(v,t.markers,t.type,t.diagramId);const b=v.insert("g").attr("class","subgraphs"),w=v.insert("g").attr("class","edgePaths"),x=v.insert("g").attr("class","edgeLabels"),T=v.insert("g").attr("class","nodes");o.debug("Inserting nodes into DOM for dimension calculation"),yield Promise.all(t.nodes.map(E=>nt(this,null,function*(){if(E.isGroup){const k=X({},E);y[E.id]=k,m[E.id]=k,yield r(b,E)}else{const k=X({},E);m[E.id]=k;const A=yield s(T,E,{config:t.config,dir:t.direction||"TB"}),I=A.node().getBBox();k.width=I.width,k.height=I.height,k.domId=A,o.debug(`Node ${E.id} dimensions: ${I.width}x${I.height}`)}}))),o.debug("Running cose-bilkent layout algorithm");const C=Ne(X({},t),{nodes:t.nodes.map(E=>{const k=m[E.id];return Ne(X({},E),{width:k.width,height:k.height})})}),S=yield FAe(C,t.config);o.debug("Positioning nodes based on layout results"),S.nodes.forEach(E=>{const k=m[E.id];k!=null&&k.domId&&(k.domId.attr("transform",`translate(${E.x}, ${E.y})`),k.x=E.x,k.y=E.y,o.debug(`Positioned node ${k.id} at center (${E.x}, ${E.y})`))}),S.edges.forEach(E=>{const k=t.edges.find(A=>A.id===E.id);k&&(k.points=[{x:E.startX,y:E.startY},{x:E.midX,y:E.midY},{x:E.endX,y:E.endY}])}),o.debug("Inserting and positioning edges"),yield Promise.all(t.edges.map(E=>nt(this,null,function*(){var I,L;yield a(x,E);const k=m[(I=E.start)!=null?I:""],A=m[(L=E.end)!=null?L:""];if(k&&A){const R=S.edges.find(O=>O.id===E.id);if(R){o.debug("APA01 positionedEdge",R);const O=X({},E),M=n(w,O,y,t.type,k,A,t.diagramId);u(O,M)}else{const O=Ne(X({},E),{points:[{x:k.x||0,y:k.y||0},{x:A.x||0,y:A.y||0}]}),M=n(w,O,y,t.type,k,A,t.diagramId);u(O,M)}}}))),o.debug("Cose-bilkent rendering completed")}),"render"),xjt=bjt,wjt=Object.freeze({__proto__:null,render:xjt}),NL=_((t,e)=>{const r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),e.attrs!==void 0)for(const n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),zAe=_((t,e)=>{const r={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};NL(t,r).lower()},"drawBackgroundRect"),Tjt=_((t,e)=>{const r=e.text.replace(bw," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.text(r),n},"drawText"),Cj=_((t,e,r,n)=>{const a=t.append("image");a.attr("x",e),a.attr("y",r);const i=Cm(n);a.attr("xlink:href",i)},"drawImage"),Sj=_((t,e,r,n)=>{const a=t.append("use");a.attr("x",e),a.attr("y",r);const i=Cm(n);a.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),_c=_(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),_j=_(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),kj=_(()=>{let t=Yt(".mermaidTooltip");return t.empty()&&(t=Yt("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip"),IL=function(){var t=_(function(ye,pe,Ae,Ve){for(Ae=Ae||{},Ve=ye.length;Ve--;Ae[ye[Ve]]=pe);return Ae},"o"),e=[1,24],r=[1,25],n=[1,26],a=[1,27],i=[1,28],s=[1,63],o=[1,64],u=[1,65],h=[1,66],d=[1,67],f=[1,68],p=[1,69],g=[1,29],m=[1,30],y=[1,31],v=[1,32],b=[1,33],w=[1,34],x=[1,35],T=[1,36],C=[1,37],S=[1,38],E=[1,39],k=[1,40],A=[1,41],I=[1,42],L=[1,43],R=[1,44],O=[1,45],M=[1,46],P=[1,47],z=[1,48],D=[1,50],B=[1,51],W=[1,52],U=[1,53],j=[1,54],V=[1,55],Y=[1,56],H=[1,57],q=[1,58],Z=[1,59],K=[1,60],re=[14,42],Q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],te=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ee=[1,82],J=[1,83],ae=[1,84],se=[1,85],fe=[12,14,42],ve=[12,14,33,42],de=[12,14,33,42,76,77,79,80],Ee=[12,33],Ce=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],De={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:_(l(function(pe,Ae,Ve,ze,We,me,Se){var ne=me.length-1;switch(We){case 3:ze.setDirection("TB");break;case 4:ze.setDirection("BT");break;case 5:ze.setDirection("RL");break;case 6:ze.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:ze.setC4Type(me[ne-3]);break;case 19:ze.setTitle(me[ne].substring(6)),this.$=me[ne].substring(6);break;case 20:ze.setAccDescription(me[ne].substring(15)),this.$=me[ne].substring(15);break;case 21:this.$=me[ne].trim(),ze.setTitle(this.$);break;case 22:case 23:this.$=me[ne].trim(),ze.setAccDescription(this.$);break;case 28:me[ne].splice(2,0,"ENTERPRISE"),ze.addPersonOrSystemBoundary(...me[ne]),this.$=me[ne];break;case 29:me[ne].splice(2,0,"SYSTEM"),ze.addPersonOrSystemBoundary(...me[ne]),this.$=me[ne];break;case 30:ze.addPersonOrSystemBoundary(...me[ne]),this.$=me[ne];break;case 31:me[ne].splice(2,0,"CONTAINER"),ze.addContainerBoundary(...me[ne]),this.$=me[ne];break;case 32:ze.addDeploymentNode("node",...me[ne]),this.$=me[ne];break;case 33:ze.addDeploymentNode("nodeL",...me[ne]),this.$=me[ne];break;case 34:ze.addDeploymentNode("nodeR",...me[ne]),this.$=me[ne];break;case 35:ze.popBoundaryParseStack();break;case 39:ze.addPersonOrSystem("person",...me[ne]),this.$=me[ne];break;case 40:ze.addPersonOrSystem("external_person",...me[ne]),this.$=me[ne];break;case 41:ze.addPersonOrSystem("system",...me[ne]),this.$=me[ne];break;case 42:ze.addPersonOrSystem("system_db",...me[ne]),this.$=me[ne];break;case 43:ze.addPersonOrSystem("system_queue",...me[ne]),this.$=me[ne];break;case 44:ze.addPersonOrSystem("external_system",...me[ne]),this.$=me[ne];break;case 45:ze.addPersonOrSystem("external_system_db",...me[ne]),this.$=me[ne];break;case 46:ze.addPersonOrSystem("external_system_queue",...me[ne]),this.$=me[ne];break;case 47:ze.addContainer("container",...me[ne]),this.$=me[ne];break;case 48:ze.addContainer("container_db",...me[ne]),this.$=me[ne];break;case 49:ze.addContainer("container_queue",...me[ne]),this.$=me[ne];break;case 50:ze.addContainer("external_container",...me[ne]),this.$=me[ne];break;case 51:ze.addContainer("external_container_db",...me[ne]),this.$=me[ne];break;case 52:ze.addContainer("external_container_queue",...me[ne]),this.$=me[ne];break;case 53:ze.addComponent("component",...me[ne]),this.$=me[ne];break;case 54:ze.addComponent("component_db",...me[ne]),this.$=me[ne];break;case 55:ze.addComponent("component_queue",...me[ne]),this.$=me[ne];break;case 56:ze.addComponent("external_component",...me[ne]),this.$=me[ne];break;case 57:ze.addComponent("external_component_db",...me[ne]),this.$=me[ne];break;case 58:ze.addComponent("external_component_queue",...me[ne]),this.$=me[ne];break;case 60:ze.addRel("rel",...me[ne]),this.$=me[ne];break;case 61:ze.addRel("birel",...me[ne]),this.$=me[ne];break;case 62:ze.addRel("rel_u",...me[ne]),this.$=me[ne];break;case 63:ze.addRel("rel_d",...me[ne]),this.$=me[ne];break;case 64:ze.addRel("rel_l",...me[ne]),this.$=me[ne];break;case 65:ze.addRel("rel_r",...me[ne]),this.$=me[ne];break;case 66:ze.addRel("rel_b",...me[ne]),this.$=me[ne];break;case 67:me[ne].splice(0,1),ze.addRel("rel",...me[ne]),this.$=me[ne];break;case 68:ze.updateElStyle("update_el_style",...me[ne]),this.$=me[ne];break;case 69:ze.updateRelStyle("update_rel_style",...me[ne]),this.$=me[ne];break;case 70:ze.updateLayoutConfig("update_layout_config",...me[ne]),this.$=me[ne];break;case 71:this.$=[me[ne]];break;case 72:me[ne].unshift(me[ne-1]),this.$=me[ne];break;case 73:case 75:this.$=me[ne].trim();break;case 74:let xe={};xe[me[ne-1].trim()]=me[ne].trim(),this.$=xe;break;case 76:this.$="";break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:u,38:h,39:d,40:f,41:p,43:23,44:g,45:m,46:y,47:v,48:b,49:w,50:x,51:T,52:C,53:S,54:E,55:k,56:A,57:I,58:L,59:R,60:O,61:M,62:P,63:z,64:D,65:B,66:W,67:U,68:j,69:V,70:Y,71:H,72:q,73:Z,74:K},{13:70,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:u,38:h,39:d,40:f,41:p,43:23,44:g,45:m,46:y,47:v,48:b,49:w,50:x,51:T,52:C,53:S,54:E,55:k,56:A,57:I,58:L,59:R,60:O,61:M,62:P,63:z,64:D,65:B,66:W,67:U,68:j,69:V,70:Y,71:H,72:q,73:Z,74:K},{13:71,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:u,38:h,39:d,40:f,41:p,43:23,44:g,45:m,46:y,47:v,48:b,49:w,50:x,51:T,52:C,53:S,54:E,55:k,56:A,57:I,58:L,59:R,60:O,61:M,62:P,63:z,64:D,65:B,66:W,67:U,68:j,69:V,70:Y,71:H,72:q,73:Z,74:K},{13:72,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:u,38:h,39:d,40:f,41:p,43:23,44:g,45:m,46:y,47:v,48:b,49:w,50:x,51:T,52:C,53:S,54:E,55:k,56:A,57:I,58:L,59:R,60:O,61:M,62:P,63:z,64:D,65:B,66:W,67:U,68:j,69:V,70:Y,71:H,72:q,73:Z,74:K},{13:73,19:20,20:21,21:22,22:e,23:r,24:n,26:a,28:i,29:49,30:61,32:62,34:s,36:o,37:u,38:h,39:d,40:f,41:p,43:23,44:g,45:m,46:y,47:v,48:b,49:w,50:x,51:T,52:C,53:S,54:E,55:k,56:A,57:I,58:L,59:R,60:O,61:M,62:P,63:z,64:D,65:B,66:W,67:U,68:j,69:V,70:Y,71:H,72:q,73:Z,74:K},{14:[1,74]},t(re,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:u,38:h,39:d,40:f,41:p,44:g,45:m,46:y,47:v,48:b,49:w,50:x,51:T,52:C,53:S,54:E,55:k,56:A,57:I,58:L,59:R,60:O,61:M,62:P,63:z,64:D,65:B,66:W,67:U,68:j,69:V,70:Y,71:H,72:q,73:Z,74:K}),t(re,[2,14]),t(Q,[2,16],{12:[1,76]}),t(re,[2,36],{12:[1,77]}),t(te,[2,19]),t(te,[2,20]),{25:[1,78]},{27:[1,79]},t(te,[2,23]),{35:80,75:81,76:ee,77:J,79:ae,80:se},{35:86,75:81,76:ee,77:J,79:ae,80:se},{35:87,75:81,76:ee,77:J,79:ae,80:se},{35:88,75:81,76:ee,77:J,79:ae,80:se},{35:89,75:81,76:ee,77:J,79:ae,80:se},{35:90,75:81,76:ee,77:J,79:ae,80:se},{35:91,75:81,76:ee,77:J,79:ae,80:se},{35:92,75:81,76:ee,77:J,79:ae,80:se},{35:93,75:81,76:ee,77:J,79:ae,80:se},{35:94,75:81,76:ee,77:J,79:ae,80:se},{35:95,75:81,76:ee,77:J,79:ae,80:se},{35:96,75:81,76:ee,77:J,79:ae,80:se},{35:97,75:81,76:ee,77:J,79:ae,80:se},{35:98,75:81,76:ee,77:J,79:ae,80:se},{35:99,75:81,76:ee,77:J,79:ae,80:se},{35:100,75:81,76:ee,77:J,79:ae,80:se},{35:101,75:81,76:ee,77:J,79:ae,80:se},{35:102,75:81,76:ee,77:J,79:ae,80:se},{35:103,75:81,76:ee,77:J,79:ae,80:se},{35:104,75:81,76:ee,77:J,79:ae,80:se},t(fe,[2,59]),{35:105,75:81,76:ee,77:J,79:ae,80:se},{35:106,75:81,76:ee,77:J,79:ae,80:se},{35:107,75:81,76:ee,77:J,79:ae,80:se},{35:108,75:81,76:ee,77:J,79:ae,80:se},{35:109,75:81,76:ee,77:J,79:ae,80:se},{35:110,75:81,76:ee,77:J,79:ae,80:se},{35:111,75:81,76:ee,77:J,79:ae,80:se},{35:112,75:81,76:ee,77:J,79:ae,80:se},{35:113,75:81,76:ee,77:J,79:ae,80:se},{35:114,75:81,76:ee,77:J,79:ae,80:se},{35:115,75:81,76:ee,77:J,79:ae,80:se},{20:116,29:49,30:61,32:62,34:s,36:o,37:u,38:h,39:d,40:f,41:p,43:23,44:g,45:m,46:y,47:v,48:b,49:w,50:x,51:T,52:C,53:S,54:E,55:k,56:A,57:I,58:L,59:R,60:O,61:M,62:P,63:z,64:D,65:B,66:W,67:U,68:j,69:V,70:Y,71:H,72:q,73:Z,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:ee,77:J,79:ae,80:se},{35:120,75:81,76:ee,77:J,79:ae,80:se},{35:121,75:81,76:ee,77:J,79:ae,80:se},{35:122,75:81,76:ee,77:J,79:ae,80:se},{35:123,75:81,76:ee,77:J,79:ae,80:se},{35:124,75:81,76:ee,77:J,79:ae,80:se},{35:125,75:81,76:ee,77:J,79:ae,80:se},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(re,[2,15]),t(Q,[2,17],{21:22,19:130,22:e,23:r,24:n,26:a,28:i}),t(re,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:n,26:a,28:i,34:s,36:o,37:u,38:h,39:d,40:f,41:p,44:g,45:m,46:y,47:v,48:b,49:w,50:x,51:T,52:C,53:S,54:E,55:k,56:A,57:I,58:L,59:R,60:O,61:M,62:P,63:z,64:D,65:B,66:W,67:U,68:j,69:V,70:Y,71:H,72:q,73:Z,74:K}),t(te,[2,21]),t(te,[2,22]),t(fe,[2,39]),t(ve,[2,71],{75:81,35:132,76:ee,77:J,79:ae,80:se}),t(de,[2,73]),{78:[1,133]},t(de,[2,75]),t(de,[2,76]),t(fe,[2,40]),t(fe,[2,41]),t(fe,[2,42]),t(fe,[2,43]),t(fe,[2,44]),t(fe,[2,45]),t(fe,[2,46]),t(fe,[2,47]),t(fe,[2,48]),t(fe,[2,49]),t(fe,[2,50]),t(fe,[2,51]),t(fe,[2,52]),t(fe,[2,53]),t(fe,[2,54]),t(fe,[2,55]),t(fe,[2,56]),t(fe,[2,57]),t(fe,[2,58]),t(fe,[2,60]),t(fe,[2,61]),t(fe,[2,62]),t(fe,[2,63]),t(fe,[2,64]),t(fe,[2,65]),t(fe,[2,66]),t(fe,[2,67]),t(fe,[2,68]),t(fe,[2,69]),t(fe,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(Ee,[2,28]),t(Ee,[2,29]),t(Ee,[2,30]),t(Ee,[2,31]),t(Ee,[2,32]),t(Ee,[2,33]),t(Ee,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Q,[2,18]),t(re,[2,38]),t(ve,[2,72]),t(de,[2,74]),t(fe,[2,24]),t(fe,[2,35]),t(Ce,[2,25]),t(Ce,[2,26],{12:[1,138]}),t(Ce,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:_(l(function(pe,Ae){if(Ae.recoverable)this.trace(pe);else{var Ve=new Error(pe);throw Ve.hash=Ae,Ve}},"parseError"),"parseError"),parse:_(l(function(pe){var Ae=this,Ve=[0],ze=[],We=[null],me=[],Se=this.table,ne="",xe=0,oe=0,_e=2,ue=1,tt=me.slice.call(arguments,1),Re=Object.create(this.lexer),et={yy:{}};for(var Xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Xe)&&(et.yy[Xe]=this.yy[Xe]);Re.setInput(pe,et.yy),et.yy.lexer=Re,et.yy.parser=this,typeof Re.yylloc=="undefined"&&(Re.yylloc={});var ot=Re.yylloc;me.push(ot);var Ge=Re.options&&Re.options.ranges;typeof et.yy.parseError=="function"?this.parseError=et.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ht(we){Ve.length=Ve.length-2*we,We.length=We.length-we,me.length=me.length-we}l(ht,"popStack"),_(ht,"popStack");function Je(){var we;return we=ze.pop()||Re.lex()||ue,typeof we!="number"&&(we instanceof Array&&(ze=we,we=ze.pop()),we=Ae.symbols_[we]||we),we}l(Je,"lex"),_(Je,"lex");for(var St,He,dt,Oe,vt={},qe,Me,lt,it;;){if(He=Ve[Ve.length-1],this.defaultActions[He]?dt=this.defaultActions[He]:((St===null||typeof St=="undefined")&&(St=Je()),dt=Se[He]&&Se[He][St]),typeof dt=="undefined"||!dt.length||!dt[0]){var Ue="";it=[];for(qe in Se[He])this.terminals_[qe]&&qe>_e&&it.push("'"+this.terminals_[qe]+"'");Re.showPosition?Ue="Parse error on line "+(xe+1)+`:
|
||
`+Re.showPosition()+`
|
||
Expecting `+it.join(", ")+", got '"+(this.terminals_[St]||St)+"'":Ue="Parse error on line "+(xe+1)+": Unexpected "+(St==ue?"end of input":"'"+(this.terminals_[St]||St)+"'"),this.parseError(Ue,{text:Re.match,token:this.terminals_[St]||St,line:Re.yylineno,loc:ot,expected:it})}if(dt[0]instanceof Array&&dt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+He+", token: "+St);switch(dt[0]){case 1:Ve.push(St),We.push(Re.yytext),me.push(Re.yylloc),Ve.push(dt[1]),St=null,oe=Re.yyleng,ne=Re.yytext,xe=Re.yylineno,ot=Re.yylloc;break;case 2:if(Me=this.productions_[dt[1]][1],vt.$=We[We.length-Me],vt._$={first_line:me[me.length-(Me||1)].first_line,last_line:me[me.length-1].last_line,first_column:me[me.length-(Me||1)].first_column,last_column:me[me.length-1].last_column},Ge&&(vt._$.range=[me[me.length-(Me||1)].range[0],me[me.length-1].range[1]]),Oe=this.performAction.apply(vt,[ne,oe,xe,et.yy,dt[1],We,me].concat(tt)),typeof Oe!="undefined")return Oe;Me&&(Ve=Ve.slice(0,-1*Me*2),We=We.slice(0,-1*Me),me=me.slice(0,-1*Me)),Ve.push(this.productions_[dt[1]][0]),We.push(vt.$),me.push(vt._$),lt=Se[Ve[Ve.length-2]][Ve[Ve.length-1]],Ve.push(lt);break;case 3:return!0}}return!0},"parse"),"parse")},ce=function(){var ye={EOF:1,parseError:_(l(function(Ae,Ve){if(this.yy.parser)this.yy.parser.parseError(Ae,Ve);else throw new Error(Ae)},"parseError"),"parseError"),setInput:_(function(pe,Ae){return this.yy=Ae||this.yy||{},this._input=pe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var pe=this._input[0];this.yytext+=pe,this.yyleng++,this.offset++,this.match+=pe,this.matched+=pe;var Ae=pe.match(/(?:\r\n?|\n).*/g);return Ae?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),pe},"input"),unput:_(function(pe){var Ae=pe.length,Ve=pe.split(/(?:\r\n?|\n)/g);this._input=pe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ae),this.offset-=Ae;var ze=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ve.length-1&&(this.yylineno-=Ve.length-1);var We=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ve?(Ve.length===ze.length?this.yylloc.first_column:0)+ze[ze.length-Ve.length].length-Ve[0].length:this.yylloc.first_column-Ae},this.options.ranges&&(this.yylloc.range=[We[0],We[0]+this.yyleng-Ae]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(pe){this.unput(this.match.slice(pe))},"less"),pastInput:_(function(){var pe=this.matched.substr(0,this.matched.length-this.match.length);return(pe.length>20?"...":"")+pe.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var pe=this.match;return pe.length<20&&(pe+=this._input.substr(0,20-pe.length)),(pe.substr(0,20)+(pe.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var pe=this.pastInput(),Ae=new Array(pe.length+1).join("-");return pe+this.upcomingInput()+`
|
||
`+Ae+"^"},"showPosition"),test_match:_(function(pe,Ae){var Ve,ze,We;if(this.options.backtrack_lexer&&(We={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(We.yylloc.range=this.yylloc.range.slice(0))),ze=pe[0].match(/(?:\r\n?|\n).*/g),ze&&(this.yylineno+=ze.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ze?ze[ze.length-1].length-ze[ze.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+pe[0].length},this.yytext+=pe[0],this.match+=pe[0],this.matches=pe,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(pe[0].length),this.matched+=pe[0],Ve=this.performAction.call(this,this.yy,this,Ae,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ve)return Ve;if(this._backtrack){for(var me in We)this[me]=We[me];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var pe,Ae,Ve,ze;this._more||(this.yytext="",this.match="");for(var We=this._currentRules(),me=0;me<We.length;me++)if(Ve=this._input.match(this.rules[We[me]]),Ve&&(!Ae||Ve[0].length>Ae[0].length)){if(Ae=Ve,ze=me,this.options.backtrack_lexer){if(pe=this.test_match(Ve,We[me]),pe!==!1)return pe;if(this._backtrack){Ae=!1;continue}else return!1}else if(!this.options.flex)break}return Ae?(pe=this.test_match(Ae,We[ze]),pe!==!1?pe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var Ae=this.next();return Ae||this.lex()},"lex"),"lex"),begin:_(l(function(Ae){this.conditionStack.push(Ae)},"begin"),"begin"),popState:_(l(function(){var Ae=this.conditionStack.length-1;return Ae>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(Ae){return Ae=this.conditionStack.length-1-Math.abs(Ae||0),Ae>=0?this.conditionStack[Ae]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(Ae){this.begin(Ae)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{},performAction:_(l(function(Ae,Ve,ze,We){switch(ze){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return ye}();De.lexer=ce;function Ie(){this.yy={}}return l(Ie,"Parser"),_(Ie,"Parser"),Ie.prototype=De,De.Parser=Ie,new Ie}();IL.parser=IL;var Ejt=IL,Zu=[],Op=[""],ul="global",Qu="",ud=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],O5=[],Aj="",Nj=!1,LL=4,$L=2,HAe,Cjt=_(function(){return HAe},"getC4Type"),Sjt=_(function(t){HAe=mn(t,ft())},"setC4Type"),_jt=_(function(t,e,r,n,a,i,s,o,u){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let h={};const d=O5.find(f=>f.from===e&&f.to===r);if(d?h=d:O5.push(h),h.type=t,h.from=e,h.to=r,h.label={text:n},a==null)h.techn={text:""};else if(typeof a=="object"){let[f,p]=Object.entries(a)[0];h[f]={text:p}}else h.techn={text:a};if(i==null)h.descr={text:""};else if(typeof i=="object"){let[f,p]=Object.entries(i)[0];h[f]={text:p}}else h.descr={text:i};if(typeof s=="object"){let[f,p]=Object.entries(s)[0];h[f]=p}else h.sprite=s;if(typeof o=="object"){let[f,p]=Object.entries(o)[0];h[f]=p}else h.tags=o;if(typeof u=="object"){let[f,p]=Object.entries(u)[0];h[f]=p}else h.link=u;h.wrap=Dp()},"addRel"),kjt=_(function(t,e,r,n,a,i,s){if(e===null||r===null)return;let o={};const u=Zu.find(h=>h.alias===e);if(u&&e===u.alias?o=u:(o.alias=e,Zu.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[h,d]=Object.entries(n)[0];o[h]={text:d}}else o.descr={text:n};if(typeof a=="object"){let[h,d]=Object.entries(a)[0];o[h]=d}else o.sprite=a;if(typeof i=="object"){let[h,d]=Object.entries(i)[0];o[h]=d}else o.tags=i;if(typeof s=="object"){let[h,d]=Object.entries(s)[0];o[h]=d}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=ul,o.wrap=Dp()},"addPersonOrSystem"),Ajt=_(function(t,e,r,n,a,i,s,o){if(e===null||r===null)return;let u={};const h=Zu.find(d=>d.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,Zu.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.techn={text:n};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[d,f]=Object.entries(a)[0];u[d]={text:f}}else u.descr={text:a};if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]=f}else u.sprite=i;if(typeof s=="object"){let[d,f]=Object.entries(s)[0];u[d]=f}else u.tags=s;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];u[d]=f}else u.link=o;u.wrap=Dp(),u.typeC4Shape={text:t},u.parentBoundary=ul},"addContainer"),Njt=_(function(t,e,r,n,a,i,s,o){if(e===null||r===null)return;let u={};const h=Zu.find(d=>d.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,Zu.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.techn={text:n};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[d,f]=Object.entries(a)[0];u[d]={text:f}}else u.descr={text:a};if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]=f}else u.sprite=i;if(typeof s=="object"){let[d,f]=Object.entries(s)[0];u[d]=f}else u.tags=s;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];u[d]=f}else u.link=o;u.wrap=Dp(),u.typeC4Shape={text:t},u.parentBoundary=ul},"addComponent"),Ijt=_(function(t,e,r,n,a){if(t===null||e===null)return;let i={};const s=ud.find(o=>o.alias===t);if(s&&t===s.alias?i=s:(i.alias=t,ud.push(i)),e==null?i.label={text:""}:i.label={text:e},r==null)i.type={text:"system"};else if(typeof r=="object"){let[o,u]=Object.entries(r)[0];i[o]={text:u}}else i.type={text:r};if(typeof n=="object"){let[o,u]=Object.entries(n)[0];i[o]=u}else i.tags=n;if(typeof a=="object"){let[o,u]=Object.entries(a)[0];i[o]=u}else i.link=a;i.parentBoundary=ul,i.wrap=Dp(),Qu=ul,ul=t,Op.push(Qu)},"addPersonOrSystemBoundary"),Ljt=_(function(t,e,r,n,a){if(t===null||e===null)return;let i={};const s=ud.find(o=>o.alias===t);if(s&&t===s.alias?i=s:(i.alias=t,ud.push(i)),e==null?i.label={text:""}:i.label={text:e},r==null)i.type={text:"container"};else if(typeof r=="object"){let[o,u]=Object.entries(r)[0];i[o]={text:u}}else i.type={text:r};if(typeof n=="object"){let[o,u]=Object.entries(n)[0];i[o]=u}else i.tags=n;if(typeof a=="object"){let[o,u]=Object.entries(a)[0];i[o]=u}else i.link=a;i.parentBoundary=ul,i.wrap=Dp(),Qu=ul,ul=t,Op.push(Qu)},"addContainerBoundary"),$jt=_(function(t,e,r,n,a,i,s,o){if(e===null||r===null)return;let u={};const h=ud.find(d=>d.alias===e);if(h&&e===h.alias?u=h:(u.alias=e,ud.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.type={text:n};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[d,f]=Object.entries(a)[0];u[d]={text:f}}else u.descr={text:a};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];u[d]=f}else u.tags=s;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];u[d]=f}else u.link=o;u.nodeType=t,u.parentBoundary=ul,u.wrap=Dp(),Qu=ul,ul=e,Op.push(Qu)},"addDeploymentNode"),Mjt=_(function(){ul=Qu,Op.pop(),Qu=Op.pop(),Op.push(Qu)},"popBoundaryParseStack"),Pjt=_(function(t,e,r,n,a,i,s,o,u,h,d){let f=Zu.find(p=>p.alias===e);if(!(f===void 0&&(f=ud.find(p=>p.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,g]=Object.entries(r)[0];f[p]=g}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,g]=Object.entries(n)[0];f[p]=g}else f.fontColor=n;if(a!=null)if(typeof a=="object"){let[p,g]=Object.entries(a)[0];f[p]=g}else f.borderColor=a;if(i!=null)if(typeof i=="object"){let[p,g]=Object.entries(i)[0];f[p]=g}else f.shadowing=i;if(s!=null)if(typeof s=="object"){let[p,g]=Object.entries(s)[0];f[p]=g}else f.shape=s;if(o!=null)if(typeof o=="object"){let[p,g]=Object.entries(o)[0];f[p]=g}else f.sprite=o;if(u!=null)if(typeof u=="object"){let[p,g]=Object.entries(u)[0];f[p]=g}else f.techn=u;if(h!=null)if(typeof h=="object"){let[p,g]=Object.entries(h)[0];f[p]=g}else f.legendText=h;if(d!=null)if(typeof d=="object"){let[p,g]=Object.entries(d)[0];f[p]=g}else f.legendSprite=d}},"updateElStyle"),Rjt=_(function(t,e,r,n,a,i,s){const o=O5.find(u=>u.from===e&&u.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]=h}else o.textColor=n;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];o[u]=h}else o.lineColor=a;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=parseInt(h)}else o.offsetX=parseInt(i);if(s!=null)if(typeof s=="object"){let[u,h]=Object.entries(s)[0];o[u]=parseInt(h)}else o.offsetY=parseInt(s)}},"updateRelStyle"),Ojt=_(function(t,e,r){let n=LL,a=$L;if(typeof e=="object"){const i=Object.values(e)[0];n=parseInt(i)}else n=parseInt(e);if(typeof r=="object"){const i=Object.values(r)[0];a=parseInt(i)}else a=parseInt(r);n>=1&&(LL=n),a>=1&&($L=a)},"updateLayoutConfig"),Djt=_(function(){return LL},"getC4ShapeInRow"),Fjt=_(function(){return $L},"getC4BoundaryInRow"),Bjt=_(function(){return ul},"getCurrentBoundaryParse"),zjt=_(function(){return Qu},"getParentBoundaryParse"),WAe=_(function(t){return t==null?Zu:Zu.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),Hjt=_(function(t){return Zu.find(e=>e.alias===t)},"getC4Shape"),Wjt=_(function(t){return Object.keys(WAe(t))},"getC4ShapeKeys"),VAe=_(function(t){return t==null?ud:ud.filter(e=>e.parentBoundary===t)},"getBoundaries"),Vjt=VAe,Gjt=_(function(){return O5},"getRels"),qjt=_(function(){return Aj},"getTitle"),Yjt=_(function(t){Nj=t},"setWrap"),Dp=_(function(){return Nj},"autoWrap"),Ujt=_(function(){Zu=[],ud=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Qu="",ul="global",Op=[""],O5=[],Op=[""],Aj="",Nj=!1,LL=4,$L=2},"clear"),jjt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},Kjt={FILLED:0,OPEN:1},Xjt={LEFTOF:0,RIGHTOF:1,OVER:2},Zjt=_(function(t){Aj=mn(t,ft())},"setTitle"),Ij={addPersonOrSystem:kjt,addPersonOrSystemBoundary:Ijt,addContainer:Ajt,addContainerBoundary:Ljt,addComponent:Njt,addDeploymentNode:$jt,popBoundaryParseStack:Mjt,addRel:_jt,updateElStyle:Pjt,updateRelStyle:Rjt,updateLayoutConfig:Ojt,autoWrap:Dp,setWrap:Yjt,getC4ShapeArray:WAe,getC4Shape:Hjt,getC4ShapeKeys:Wjt,getBoundaries:VAe,getBoundarys:Vjt,getCurrentBoundaryParse:Bjt,getParentBoundaryParse:zjt,getRels:Gjt,getTitle:qjt,getC4Type:Cjt,getC4ShapeInRow:Djt,getC4BoundaryInRow:Fjt,setAccTitle:Na,getAccTitle:za,getAccDescription:Wa,setAccDescription:Ha,getConfig:_(()=>ft().c4,"getConfig"),clear:Ujt,LINETYPE:jjt,ARROWTYPE:Kjt,PLACEMENT:Xjt,setTitle:Zjt,setC4Type:Sjt},Lj=_(function(t,e){return NL(t,e)},"drawRect"),GAe=_(function(t,e,r,n,a,i){const s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",a);let o=i.startsWith("data:image/png;base64")?i:Cm(i);s.attr("xlink:href",o)},"drawImage"),Qjt=_((t,e,r,n)=>{const a=t.append("g");let i=0;for(let s of e){let o=s.textColor?s.textColor:"#444444",u=s.lineColor?s.lineColor:"#444444",h=s.offsetX?parseInt(s.offsetX):0,d=s.offsetY?parseInt(s.offsetY):0,f="";if(i===0){let g=a.append("line");g.attr("x1",s.startPoint.x),g.attr("y1",s.startPoint.y),g.attr("x2",s.endPoint.x),g.attr("y2",s.endPoint.y),g.attr("stroke-width","1"),g.attr("stroke",u),g.style("fill","none"),s.type!=="rel_b"&&g.attr("marker-end","url("+f+"#"+n+"-arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&g.attr("marker-start","url("+f+"#"+n+"-arrowend)"),i=-1}else{let g=a.append("path");g.attr("fill","none").attr("stroke-width","1").attr("stroke",u).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&g.attr("marker-end","url("+f+"#"+n+"-arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&g.attr("marker-start","url("+f+"#"+n+"-arrowend)")}let p=r.messageFont();Mf(r)(s.label.text,a,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+h,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+d,s.label.width,s.label.height,{fill:o},p),s.techn&&s.techn.text!==""&&(p=r.messageFont(),Mf(r)("["+s.techn.text+"]",a,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+h,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+d,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:o,"font-style":"italic"},p))}},"drawRels"),Jjt=_(function(t,e,r){const n=t.append("g");let a=e.bgColor?e.bgColor:"none",i=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let u={x:e.x,y:e.y,fill:a,stroke:i,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};Lj(n,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=s,Mf(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},h),e.type&&e.type.text!==""&&(h=r.boundaryFont(),h.fontColor=s,Mf(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},h)),e.descr&&e.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=s,Mf(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},h))},"drawBoundary"),eKt=_(function(t,e,r){var f;let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],a=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],i=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const o=t.append("g");o.attr("class","person-man");const u=_c();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=e.x,u.y=e.y,u.fill=n,u.width=e.width,u.height=e.height,u.stroke=a,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},Lj(o,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",a).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let h=lKt(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",i).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":GAe(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break}let d=r[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=i,Mf(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:i},d),d=r[e.typeC4Shape.text+"Font"](),d.fontColor=i,e.techn&&((f=e.techn)==null?void 0:f.text)!==""?Mf(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:i,"font-style":"italic"},d):e.type&&e.type.text!==""&&Mf(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:i,"font-style":"italic"},d),e.descr&&e.descr.text!==""&&(d=r.personFont(),d.fontColor=i,Mf(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:i},d)),e.height},"drawC4Shape"),tKt=_(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),rKt=_(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),nKt=_(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),aKt=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),iKt=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),sKt=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),oKt=_(function(t,e){const n=t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),lKt=_((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),Mf=function(){function t(a,i,s,o,u,h,d){const f=i.append("text").attr("x",s+u/2).attr("y",o+h/2+5).style("text-anchor","middle").text(a);n(f,d)}l(t,"byText"),_(t,"byText");function e(a,i,s,o,u,h,d,f){const{fontSize:p,fontFamily:g,fontWeight:m}=f,y=a.split(or.lineBreakRegex);for(let v=0;v<y.length;v++){const b=v*p-p*(y.length-1)/2,w=i.append("text").attr("x",s+u/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",m).style("font-family",g);w.append("tspan").attr("dy",b).text(y[v]).attr("alignment-baseline","mathematical"),n(w,d)}}l(e,"byTspan"),_(e,"byTspan");function r(a,i,s,o,u,h,d,f){const p=i.append("switch"),m=p.append("foreignObject").attr("x",s).attr("y",o).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),e(a,p,s,o,u,h,d,f),n(m,d)}l(r,"byFo"),_(r,"byFo");function n(a,i){for(const s in i)i.hasOwnProperty(s)&&a.attr(s,i[s])}return l(n,"_setTextAttrs"),_(n,"_setTextAttrs"),function(a){return a.textPlacement==="fo"?r:a.textPlacement==="old"?t:e}}(),hd={drawRect:Lj,drawBoundary:Jjt,drawC4Shape:eKt,drawRels:Qjt,drawImage:GAe,insertArrowHead:aKt,insertArrowEnd:iKt,insertArrowFilledHead:sKt,insertArrowCrossHead:oKt,insertDatabaseIcon:tKt,insertComputerIcon:rKt,insertClockIcon:nKt},ML=0,PL=0,qAe=4,$j=2;IL.yy=Ij;var Lr={},YAe=(Wy=class{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,Mj(e.db.getConfig())}setData(e,r,n,a){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=a}updateVal(e,r,n,a){e[r]===void 0?e[r]=n:e[r]=a(n,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,a=this.nextData.starty+e.margin*2,i=a+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>qAe)&&(r=this.nextData.startx+e.margin+Lr.nextLinePaddingX,a=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=a+e.height,this.nextData.cnt=1),e.x=r,e.y=a,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",a,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",a,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},Mj(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},l(Wy,"Bounds"),_(Wy,"Bounds"),Wy),Mj=_(function(t){$i(Lr,t),t.fontFamily&&(Lr.personFontFamily=Lr.systemFontFamily=Lr.messageFontFamily=t.fontFamily),t.fontSize&&(Lr.personFontSize=Lr.systemFontSize=Lr.messageFontSize=t.fontSize),t.fontWeight&&(Lr.personFontWeight=Lr.systemFontWeight=Lr.messageFontWeight=t.fontWeight)},"setConf"),D5=_((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),RL=_(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),cKt=_(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function su(t,e,r,n,a){if(!e[t].width)if(r)e[t].text=c3(e[t].text,a,n),e[t].textLines=e[t].text.split(or.lineBreakRegex).length,e[t].width=a,e[t].height=N7(e[t].text,n);else{let i=e[t].text.split(or.lineBreakRegex);e[t].textLines=i.length;let s=0;e[t].height=0,e[t].width=0;for(const o of i)e[t].width=Math.max(Qo(o,n),e[t].width),s=N7(o,n),e[t].height=e[t].height+s}}l(su,"calcC4ShapeTextWH"),_(su,"calcC4ShapeTextWH");var UAe=_(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Lr.c4ShapeMargin-35;let n=e.wrap&&Lr.wrap,a=RL(Lr);a.fontSize=a.fontSize+2,a.fontWeight="bold";let i=Qo(e.label.text,a);su("label",e,n,a,i),hd.drawBoundary(t,e,Lr)},"drawBoundary"),jAe=_(function(t,e,r,n){let a=0;for(const i of n){a=0;const s=r[i];let o=D5(Lr,s.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,s.typeC4Shape.width=Qo("«"+s.typeC4Shape.text+"»",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=Lr.c4ShapePadding,a=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=a,a=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=a,a=s.image.Y+s.image.height);let u=s.wrap&&Lr.wrap,h=Lr.width-Lr.c4ShapePadding*2,d=D5(Lr,s.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",su("label",s,u,d,h),s.label.Y=a+8,a=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let g=D5(Lr,s.typeC4Shape.text);su("type",s,u,g,h),s.type.Y=a+5,a=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let g=D5(Lr,s.techn.text);su("techn",s,u,g,h),s.techn.Y=a+5,a=s.techn.Y+s.techn.height}let f=a,p=s.label.width;if(s.descr&&s.descr.text!==""){let g=D5(Lr,s.typeC4Shape.text);su("descr",s,u,g,h),s.descr.Y=a+20,a=s.descr.Y+s.descr.height,p=Math.max(s.label.width,s.descr.width),f=a-s.descr.textLines*5}p=p+Lr.c4ShapePadding,s.width=Math.max(s.width||Lr.width,p,Lr.width),s.height=Math.max(s.height||Lr.height,f,Lr.height),s.margin=s.margin||Lr.c4ShapeMargin,t.insert(s),hd.drawC4Shape(e,s,Lr)}t.bumpLastMargin(Lr.c4ShapeMargin)},"drawC4ShapeArray"),ou=(Vy=class{constructor(e,r){this.x=e,this.y=r}},l(Vy,"Point"),_(Vy,"Point"),Vy),KAe=_(function(t,e){let r=t.x,n=t.y,a=e.x,i=e.y,s=r+t.width/2,o=n+t.height/2,u=Math.abs(r-a),h=Math.abs(n-i),d=h/u,f=t.height/t.width,p=null;return n==i&&r<a?p=new ou(r+t.width,o):n==i&&r>a?p=new ou(r,o):r==a&&n<i?p=new ou(s,n+t.height):r==a&&n>i&&(p=new ou(s,n)),r>a&&n<i?f>=d?p=new ou(r,o+d*t.width/2):p=new ou(s-u/h*t.height/2,n+t.height):r<a&&n<i?f>=d?p=new ou(r+t.width,o+d*t.width/2):p=new ou(s+u/h*t.height/2,n+t.height):r<a&&n>i?f>=d?p=new ou(r+t.width,o-d*t.width/2):p=new ou(s+t.height/2*u/h,n):r>a&&n>i&&(f>=d?p=new ou(r,o-t.width/2*d):p=new ou(s-t.height/2*u/h,n)),p},"getIntersectPoint"),uKt=_(function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=KAe(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let a=KAe(e,r);return{startPoint:n,endPoint:a}},"getIntersectPoints"),hKt=_(function(t,e,r,n,a){let i=0;for(let s of e){i=i+1;let o=s.wrap&&Lr.wrap,u=cKt(Lr);n.db.getC4Type()==="C4Dynamic"&&(s.label.text=i+": "+s.label.text);let d=Qo(s.label.text,u);su("label",s,o,u,d),s.techn&&s.techn.text!==""&&(d=Qo(s.techn.text,u),su("techn",s,o,u,d)),s.descr&&s.descr.text!==""&&(d=Qo(s.descr.text,u),su("descr",s,o,u,d));let f=r(s.from),p=r(s.to),g=uKt(f,p);s.startPoint=g.startPoint,s.endPoint=g.endPoint}hd.drawRels(t,e,Lr,a)},"drawRels");function Pj(t,e,r,n,a){let i=new YAe(a);i.data.widthLimit=r.data.widthLimit/Math.min($j,n.length);for(let[s,o]of n.entries()){let u=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=u,u=o.image.Y+o.image.height);let h=o.wrap&&Lr.wrap,d=RL(Lr);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",su("label",o,h,d,i.data.widthLimit),o.label.Y=u+8,u=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=RL(Lr);su("type",o,h,m,i.data.widthLimit),o.type.Y=u+5,u=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let m=RL(Lr);m.fontSize=m.fontSize-2,su("descr",o,h,m,i.data.widthLimit),o.descr.Y=u+20,u=o.descr.Y+o.descr.height}if(s==0||s%$j===0){let m=r.data.startx+Lr.diagramMarginX,y=r.data.stopy+Lr.diagramMarginY+u;i.setData(m,m,y,y)}else{let m=i.data.stopx!==i.data.startx?i.data.stopx+Lr.diagramMarginX:i.data.startx,y=i.data.starty;i.setData(m,m,y,y)}i.name=o.alias;let f=a.db.getC4ShapeArray(o.alias),p=a.db.getC4ShapeKeys(o.alias);p.length>0&&jAe(i,t,f,p),e=o.alias;let g=a.db.getBoundaries(e);g.length>0&&Pj(t,e,i,g,a),o.alias!=="global"&&UAe(t,o,i),r.data.stopy=Math.max(i.data.stopy+Lr.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(i.data.stopx+Lr.c4ShapeMargin,r.data.stopx),ML=Math.max(ML,r.data.stopx),PL=Math.max(PL,r.data.stopy)}}l(Pj,"drawInsideBoundary"),_(Pj,"drawInsideBoundary");var dKt=_(function(t,e,r,n){Lr=ft().c4;const a=ft().securityLevel;let i;a==="sandbox"&&(i=Yt("#i"+e));const s=Yt(a==="sandbox"?i.nodes()[0].contentDocument.body:"body");let o=n.db;n.db.setWrap(Lr.wrap),qAe=o.getC4ShapeInRow(),$j=o.getC4BoundaryInRow(),Le.debug(`C:${JSON.stringify(Lr,null,2)}`);const u=a==="sandbox"?s.select(`[id="${e}"]`):Yt(`[id="${e}"]`);hd.insertComputerIcon(u,e),hd.insertDatabaseIcon(u,e),hd.insertClockIcon(u,e);let h=new YAe(n);h.setData(Lr.diagramMarginX,Lr.diagramMarginX,Lr.diagramMarginY,Lr.diagramMarginY),h.data.widthLimit=screen.availWidth,ML=Lr.diagramMarginX,PL=Lr.diagramMarginY;const d=n.db.getTitle();let f=n.db.getBoundaries("");Pj(u,"",h,f,n),hd.insertArrowHead(u,e),hd.insertArrowEnd(u,e),hd.insertArrowCrossHead(u,e),hd.insertArrowFilledHead(u,e),hKt(u,n.db.getRels(),n.db.getC4Shape,n,e),h.data.stopx=ML,h.data.stopy=PL;const p=h.data;let m=p.stopy-p.starty+2*Lr.diagramMarginY;const v=p.stopx-p.startx+2*Lr.diagramMarginX;d&&u.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*Lr.diagramMarginX).attr("y",p.starty+Lr.diagramMarginY),yi(u,m,v,Lr.useMaxWidth);const b=d?60:0;u.attr("viewBox",p.startx-Lr.diagramMarginX+" -"+(Lr.diagramMarginY+b)+" "+v+" "+(m+b)),Le.debug("models:",p)},"draw"),XAe={drawPersonOrSystemArray:jAe,drawBoundary:UAe,setConf:Mj,draw:dKt},fKt=_(t=>`.person {
|
||
stroke: ${t.personBorder};
|
||
fill: ${t.personBkg};
|
||
}
|
||
`,"getStyles"),pKt=fKt,gKt={parser:Ejt,db:Ij,renderer:XAe,styles:pKt,init:_(({c4:t,wrap:e})=>{XAe.setConf(t),Ij.setWrap(e)},"init")},mKt=Object.freeze({__proto__:null,diagram:gKt}),F5=_(()=>`
|
||
/* Font Awesome icon styling - consolidated */
|
||
.label-icon {
|
||
display: inline-block;
|
||
height: 1em;
|
||
overflow: visible;
|
||
vertical-align: -0.125em;
|
||
}
|
||
|
||
.node .label-icon path {
|
||
fill: currentColor;
|
||
stroke: revert;
|
||
stroke-width: revert;
|
||
}
|
||
`,"getIconStyles"),jT=_((t,e)=>{let r;return e==="sandbox"&&(r=Yt("#i"+t)),Yt(e==="sandbox"?r.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)},"getDiagramElement"),c1=_((t,e,r,n)=>{t.attr("class",r);const{width:a,height:i,x:s,y:o}=yKt(t,e);yi(t,i,a,n);const u=vKt(s,o,a,i,e);t.attr("viewBox",u),Le.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),yKt=_((t,e)=>{var n;const r=((n=t.node())==null?void 0:n.getBBox())||{width:0,height:0,x:0,y:0};return{width:r.width+e*2,height:r.height+e*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),vKt=_((t,e,r,n,a)=>`${t-a} ${e-a} ${r} ${n}`,"createViewBox"),bKt="flowchart-",xKt=(Gy=class{constructor(){this.vertexCounter=0,this.config=ft(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Na,this.setAccDescription=Ha,this.setDiagramTitle=Va,this.getAccTitle=za,this.getAccDescription=Wa,this.getDiagramTitle=Ia,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(e){return or.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(const r of this.vertices.values())if(r.id===e)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,r,n,a,i,s,o={},u){var g,m;if(!e||e.trim().length===0)return;let h;if(u!==void 0){let y;u.includes(`
|
||
`)?y=u+`
|
||
`:y=`{
|
||
`+u+`
|
||
}`,h=_7(y,{schema:S7})}const d=this.edges.find(y=>y.id===e);if(d){const y=h;(y==null?void 0:y.animate)!==void 0&&(d.animate=y.animate),(y==null?void 0:y.animation)!==void 0&&(d.animation=y.animation),(y==null?void 0:y.curve)!==void 0&&(d.interpolate=y.curve);return}let f,p=this.vertices.get(e);if(p===void 0&&(r===void 0&&n===void 0&&a!==void 0&&a!==null&&Le.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),p={id:e,labelType:"text",domId:bKt+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,r!==void 0?(this.config=ft(),f=this.sanitizeText(r.text.trim()),p.labelType=r.type,f.startsWith('"')&&f.endsWith('"')&&(f=f.substring(1,f.length-1)),p.text=f):p.text===void 0&&(p.text=e),n!==void 0&&(p.type=n),a!=null&&a.forEach(y=>{p.styles.push(y)}),i!=null&&i.forEach(y=>{p.classes.push(y)}),s!==void 0&&(p.dir=s),p.props===void 0?p.props=o:o!==void 0&&Object.assign(p.props,o),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!pwe(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=h==null?void 0:h.shape}h!=null&&h.label&&(p.text=h==null?void 0:h.label,p.labelType=this.sanitizeNodeLabelType(h==null?void 0:h.labelType)),h!=null&&h.icon&&(p.icon=h==null?void 0:h.icon,!((g=h.label)!=null&&g.trim())&&p.text===e&&(p.text="")),h!=null&&h.form&&(p.form=h==null?void 0:h.form),h!=null&&h.pos&&(p.pos=h==null?void 0:h.pos),h!=null&&h.img&&(p.img=h==null?void 0:h.img,!((m=h.label)!=null&&m.trim())&&p.text===e&&(p.text="")),h!=null&&h.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h))}}addSingleLink(e,r,n,a){var h;const o={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};Le.info("abc78 Got edge...",o);const u=n.text;if(u!==void 0&&(o.text=this.sanitizeText(u.text.trim()),o.text.startsWith('"')&&o.text.endsWith('"')&&(o.text=o.text.substring(1,o.text.length-1)),o.labelType=this.sanitizeNodeLabelType(u.type)),n!==void 0&&(o.type=n.type,o.stroke=n.stroke,o.length=n.length>10?10:n.length),a&&!this.edges.some(d=>d.id===a))o.id=a,o.isUserDefinedId=!0;else{const d=this.edges.filter(f=>f.start===o.start&&f.end===o.end);d.length===0?o.id=Bw(o.start,o.end,{counter:0,prefix:"L"}):o.id=Bw(o.start,o.end,{counter:d.length+1,prefix:"L"})}if(this.edges.length<((h=this.config.maxEdges)!=null?h:500))Le.info("Pushing edge..."),this.edges.push(o);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
||
|
||
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
||
You cannot set this config via configuration inside the diagram as it is a secure config.
|
||
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,r,n){const a=this.isLinkData(n)?n.id.replace("@",""):void 0;Le.info("addLink",e,r,a);for(const i of e)for(const s of r){const o=i===e[e.length-1],u=s===r[0];o&&u?this.addSingleLink(i,s,n,a):this.addSingleLink(i,s,n,void 0)}}updateLinkInterpolate(e,r){e.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(e,r){e.forEach(n=>{var a,i,s,o,u,h,d;if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,((s=(i=(a=this.edges[n])==null?void 0:a.style)==null?void 0:i.length)!=null?s:0)>0&&!((u=(o=this.edges[n])==null?void 0:o.style)!=null&&u.some(f=>f==null?void 0:f.startsWith("fill")))&&((d=(h=this.edges[n])==null?void 0:h.style)==null||d.push("fill:none")))})}addClass(e,r){const n=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(a=>{let i=this.classes.get(a);i===void 0&&(i={id:a,styles:[],textStyles:[]},this.classes.set(a,i)),n!=null&&n.forEach(s=>{if(/color/.exec(s)){const o=s.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(s)})})}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,r){for(const n of e.split(",")){const a=this.vertices.get(n);a&&a.classes.push(r);const i=this.edges.find(o=>o.id===n);i&&i.classes.push(r);const s=this.subGraphLookup.get(n);s&&s.classes.push(r)}}setTooltip(e,r){if(r!==void 0){r=this.sanitizeText(r);for(const n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(e,r,n){if(ft().securityLevel!=="loose"||r===void 0)return;let a=[];if(typeof n=="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<a.length;s++){let o=a[s].trim();o.startsWith('"')&&o.endsWith('"')&&(o=o.substr(1,o.length-2)),a[s]=o}}a.length===0&&a.push(e);const i=this.vertices.get(e);i&&(i.haveCallback=!0,this.funs.push(()=>{const s=this.lookUpDomId(e),o=document.querySelector(`[id="${s}"]`);o!==null&&o.addEventListener("click",()=>{Wr.runFunc(r,...a)},!1)}))}setLink(e,r,n){e.split(",").forEach(a=>{const i=this.vertices.get(a);i!==void 0&&(i.link=Wr.formatUrl(r,this.config),i.linkTarget=n)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach(a=>{this.setClickFun(a,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(r=>{r(e)})}getDirection(){var e;return(e=this.direction)==null?void 0:e.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){const r=kj();Yt(e).select("svg").selectAll("g.node").on("mouseover",i=>{var h;const s=Yt(i.currentTarget),o=s.attr("title");if(o===null)return;const u=(h=i.currentTarget)==null?void 0:h.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(s.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Zd.sanitize(o)),s.classed("hover",!0)}).on("mouseout",i=>{r.transition().duration(500).style("opacity",0),Yt(i.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=ft(),Ca()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n){var m,y,v;let a=e.text.trim(),i=n.text;e===n&&/\s/.exec(n.text)&&(a=void 0);const o=_(b=>{const w={boolean:{},number:{},string:{}},x=[];let T;return{nodeList:b.filter(function(S){const E=typeof S;return S.stmt&&S.stmt==="dir"?(T=S.value,!1):S.trim()===""?!1:E in w?w[E].hasOwnProperty(S)?!1:w[E][S]=!0:x.includes(S)?!1:x.push(S)}),dir:T}},"uniq")(r.flat()),u=o.nodeList,h=o.dir,d=h!==void 0,f=(m=ft().flowchart)!=null?m:{},p=h!=null?h:f.inheritDir&&(v=(y=this.getDirection())!=null?y:ft().direction)!=null?v:void 0;if(this.version==="gen-1")for(let b=0;b<u.length;b++)u[b]=this.lookUpDomId(u[b]);a=a!=null?a:"subGraph"+this.subCount,i=i||"",i=this.sanitizeText(i),this.subCount=this.subCount+1;const g={id:a,nodes:u,title:i.trim(),classes:[],dir:p,hasExplicitDir:d,labelType:this.sanitizeNodeLabelType(n==null?void 0:n.type)};return Le.info("Adding",g.id,g.nodes,g.dir),g.nodes=this.makeUniq(g,this.subGraphs).nodes,this.subGraphs.push(g),this.subGraphLookup.set(a,g),a}getPosForId(e){for(const[r,n]of this.subGraphs.entries())if(n.id===e)return r;return-1}indexNodes2(e,r){const n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let a=0,i=1;for(;a<n.length;){const s=this.getPosForId(n[a]);if(s>=0){const o=this.indexNodes2(e,s);if(o.result)return{result:!0,count:i+o.count};i=i+o.count}a=a+1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let r=e.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let a="normal";return r.includes("=")&&(a="thick"),r.includes(".")&&(a="dotted"),{type:n,stroke:a}}countChar(e,r){const n=r.length;let a=0;for(let i=0;i<n;++i)r[i]===e&&++a;return a}destructEndLink(e){const r=e.trim();let n=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":a="arrow_cross",r.startsWith("x")&&(a="double_"+a,n=n.slice(1));break;case">":a="arrow_point",r.startsWith("<")&&(a="double_"+a,n=n.slice(1));break;case"o":a="arrow_circle",r.startsWith("o")&&(a="double_"+a,n=n.slice(1));break}let i="normal",s=n.length-1;n.startsWith("=")&&(i="thick"),n.startsWith("~")&&(i="invisible");const o=this.countChar(".",n);return o&&(i="dotted",s=o),{type:a,stroke:i,length:s}}destructLink(e,r){const n=this.destructEndLink(e);let a;if(r){if(a=this.destructStartLink(r),a.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=n.type;else{if(a.type!==n.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}return a.type==="double_arrow"&&(a.type="double_arrow_point"),a.length=n.length,a}return n}exists(e,r){for(const n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){const n=[];return e.nodes.forEach((a,i)=>{this.exists(r,a)||n.push(e.nodes[i])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find(n=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,a,i,s){var d,f;const o=n.get(e.id),u=(d=a.get(e.id))!=null?d:!1,h=this.findNode(r,e.id);if(h)h.cssStyles=e.styles,h.cssCompiledStyles=this.getCompiledStyles(e.classes),h.cssClasses=e.classes.join(" ");else{const p={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:o,padding:((f=i.flowchart)==null?void 0:f.padding)||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:s,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};u?r.push(Ne(X({},p),{isGroup:!0,shape:"rect"})):r.push(Ne(X({},p),{isGroup:!1,shape:this.getTypeFromVertex(e)}))}}getCompiledStyles(e){var n,a;let r=[];for(const i of e){const s=this.classes.get(i);s!=null&&s.styles&&(r=[...r,...(n=s.styles)!=null?n:[]].map(o=>o.trim())),s!=null&&s.textStyles&&(r=[...r,...(a=s.textStyles)!=null?a:[]].map(o=>o.trim()))}return r}getData(){const e=ft(),r=[],n=[],a=this.getSubGraphs(),i=new Map,s=new Map;for(let h=a.length-1;h>=0;h--){const d=a[h];d.nodes.length>0&&s.set(d.id,!0);for(const f of d.nodes)i.set(f,d.id)}for(let h=a.length-1;h>=0;h--){const d=a[h];r.push({id:d.id,label:d.title,labelStyle:"",labelType:d.labelType,parentId:i.get(d.id),padding:8,cssCompiledStyles:this.getCompiledStyles(d.classes),cssClasses:d.classes.join(" "),shape:"rect",dir:d.dir==="TD"?"TB":d.dir,explicitDir:d.hasExplicitDir,isGroup:!0,look:e.look})}this.getVertices().forEach(h=>{this.addNodeFromVertex(h,r,i,s,e,e.look||"classic")});const u=this.getEdges();return u.forEach((h,d)=>{var y,v,b;const{arrowTypeStart:f,arrowTypeEnd:p}=this.destructEdgeType(h.type),g=[...(y=u.defaultStyle)!=null?y:[]];h.style&&g.push(...h.style);const m={id:Bw(h.start,h.end,{counter:d,prefix:"L"},h.id),isUserDefinedId:h.isUserDefinedId,start:h.start,end:h.end,type:(v=h.type)!=null?v:"normal",label:h.text,labelType:h.labelType,labelpos:"c",thickness:h.stroke,minlen:h.length,classes:(h==null?void 0:h.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(h==null?void 0:h.stroke)==="invisible"||(h==null?void 0:h.type)==="arrow_open"?"none":f,arrowTypeEnd:(h==null?void 0:h.stroke)==="invisible"||(h==null?void 0:h.type)==="arrow_open"?"none":p,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(h.classes),labelStyle:g,style:g,pattern:h.stroke,look:e.look,animate:h.animate,animation:h.animation,curve:h.interpolate||this.edges.defaultInterpolate||((b=e.flowchart)==null?void 0:b.curve)};n.push(m)}),{nodes:r,edges:n,other:{},config:e}}defaultConfig(){return ume.flowchart}},l(Gy,"FlowDB"),_(Gy,"FlowDB"),Gy),wKt=_(function(t,e){return e.db.getClasses()},"getClasses"),TKt=_(function(t,e,r,n,a){return nt(this,null,function*(){var p,g;Le.info("REF0:"),Le.info("Drawing state diagram (v2)",e);const{securityLevel:i,flowchart:s,layout:o}=ft();n.db.setDiagramId(e),Le.debug("Before getData: ");const u=n.db.getData();Le.debug("Data: ",u);const h=jT(e,i),d=n.db.getDirection();u.type=n.type,u.layoutAlgorithm=k3(o),u.layoutAlgorithm==="dagre"&&o==="elk"&&Le.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),u.direction=d,u.nodeSpacing=(s==null?void 0:s.nodeSpacing)||50,u.rankSpacing=(s==null?void 0:s.rankSpacing)||50,u.markers=["point","circle","cross"],u.diagramId=e,Le.debug("REF1:",u),yield Uw(u,h,a);const f=(g=(p=u.config.flowchart)==null?void 0:p.diagramPadding)!=null?g:8;Wr.insertTitle(h,"flowchartTitleText",(s==null?void 0:s.titleTopMargin)||0,n.db.getDiagramTitle()),c1(h,f,"flowchart",(s==null?void 0:s.useMaxWidth)||!1)})},"draw"),EKt={getClasses:wKt,draw:TKt},Rj=function(){var t=_(function(Jt,Ht,wt,_t){for(wt=wt||{},_t=Jt.length;_t--;wt[Jt[_t]]=Ht);return wt},"o"),e=[1,4],r=[1,3],n=[1,5],a=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],i=[2,2],s=[1,13],o=[1,14],u=[1,15],h=[1,16],d=[1,23],f=[1,25],p=[1,26],g=[1,27],m=[1,50],y=[1,49],v=[1,29],b=[1,30],w=[1,31],x=[1,32],T=[1,33],C=[1,45],S=[1,47],E=[1,43],k=[1,48],A=[1,44],I=[1,51],L=[1,46],R=[1,52],O=[1,53],M=[1,34],P=[1,35],z=[1,36],D=[1,37],B=[1,38],W=[1,58],U=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],j=[1,62],V=[1,61],Y=[1,63],H=[8,9,11,75,77,78],q=[1,79],Z=[1,92],K=[1,97],re=[1,96],Q=[1,93],te=[1,89],ee=[1,95],J=[1,91],ae=[1,98],se=[1,94],fe=[1,99],ve=[1,90],de=[8,9,10,11,40,75,77,78],Ee=[8,9,10,11,40,46,75,77,78],Ce=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],De=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],ce=[44,60,89,102,105,106,109,111,114,115,116],Ie=[1,122],ye=[1,123],pe=[1,125],Ae=[1,124],Ve=[44,60,62,74,89,102,105,106,109,111,114,115,116],ze=[1,134],We=[1,148],me=[1,149],Se=[1,150],ne=[1,151],xe=[1,136],oe=[1,138],_e=[1,142],ue=[1,143],tt=[1,144],Re=[1,145],et=[1,146],Xe=[1,147],ot=[1,152],Ge=[1,153],ht=[1,132],Je=[1,133],St=[1,140],He=[1,135],dt=[1,139],Oe=[1,137],vt=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],qe=[1,155],Me=[1,157],lt=[8,9,11],it=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Ue=[1,177],we=[1,173],gt=[1,174],ge=[1,178],ie=[1,175],be=[1,176],$e=[77,116,119],le=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],ke=[10,106],je=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],ut=[1,248],Qe=[1,246],Ze=[1,250],st=[1,244],Ct=[1,245],Mt=[1,247],Bt=[1,249],Pt=[1,251],Pe=[1,269],at=[8,9,11,106],yt=[8,9,10,11,60,84,105,106,109,110,111,112],Tt={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:_(l(function(Ht,wt,_t,Ot,er,Ye,Ut){var rt=Ye.length-1;switch(er){case 2:this.$=[];break;case 3:(!Array.isArray(Ye[rt])||Ye[rt].length>0)&&Ye[rt-1].push(Ye[rt]),this.$=Ye[rt-1];break;case 4:case 183:this.$=Ye[rt];break;case 11:Ot.setDirection("TB"),this.$="TB";break;case 12:Ot.setDirection(Ye[rt-1]),this.$=Ye[rt-1];break;case 27:this.$=Ye[rt-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=Ot.addSubGraph(Ye[rt-6],Ye[rt-1],Ye[rt-4]);break;case 34:this.$=Ot.addSubGraph(Ye[rt-3],Ye[rt-1],Ye[rt-3]);break;case 35:this.$=Ot.addSubGraph(void 0,Ye[rt-1],void 0);break;case 37:this.$=Ye[rt].trim(),Ot.setAccTitle(this.$);break;case 38:case 39:this.$=Ye[rt].trim(),Ot.setAccDescription(this.$);break;case 43:this.$=Ye[rt-1]+Ye[rt];break;case 44:this.$=Ye[rt];break;case 45:Ot.addVertex(Ye[rt-1][Ye[rt-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Ye[rt]),Ot.addLink(Ye[rt-3].stmt,Ye[rt-1],Ye[rt-2]),this.$={stmt:Ye[rt-1],nodes:Ye[rt-1].concat(Ye[rt-3].nodes)};break;case 46:Ot.addLink(Ye[rt-2].stmt,Ye[rt],Ye[rt-1]),this.$={stmt:Ye[rt],nodes:Ye[rt].concat(Ye[rt-2].nodes)};break;case 47:Ot.addLink(Ye[rt-3].stmt,Ye[rt-1],Ye[rt-2]),this.$={stmt:Ye[rt-1],nodes:Ye[rt-1].concat(Ye[rt-3].nodes)};break;case 48:this.$={stmt:Ye[rt-1],nodes:Ye[rt-1]};break;case 49:Ot.addVertex(Ye[rt-1][Ye[rt-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Ye[rt]),this.$={stmt:Ye[rt-1],nodes:Ye[rt-1],shapeData:Ye[rt]};break;case 50:this.$={stmt:Ye[rt],nodes:Ye[rt]};break;case 51:this.$=[Ye[rt]];break;case 52:Ot.addVertex(Ye[rt-5][Ye[rt-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Ye[rt-4]),this.$=Ye[rt-5].concat(Ye[rt]);break;case 53:this.$=Ye[rt-4].concat(Ye[rt]);break;case 54:this.$=Ye[rt];break;case 55:this.$=Ye[rt-2],Ot.setClass(Ye[rt-2],Ye[rt]);break;case 56:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"square");break;case 57:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"doublecircle");break;case 58:this.$=Ye[rt-5],Ot.addVertex(Ye[rt-5],Ye[rt-2],"circle");break;case 59:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"ellipse");break;case 60:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"stadium");break;case 61:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"subroutine");break;case 62:this.$=Ye[rt-7],Ot.addVertex(Ye[rt-7],Ye[rt-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Ye[rt-5],Ye[rt-3]]]));break;case 63:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"cylinder");break;case 64:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"round");break;case 65:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"diamond");break;case 66:this.$=Ye[rt-5],Ot.addVertex(Ye[rt-5],Ye[rt-2],"hexagon");break;case 67:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"odd");break;case 68:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"trapezoid");break;case 69:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"inv_trapezoid");break;case 70:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"lean_right");break;case 71:this.$=Ye[rt-3],Ot.addVertex(Ye[rt-3],Ye[rt-1],"lean_left");break;case 72:this.$=Ye[rt],Ot.addVertex(Ye[rt]);break;case 73:Ye[rt-1].text=Ye[rt],this.$=Ye[rt-1];break;case 74:case 75:Ye[rt-2].text=Ye[rt-1],this.$=Ye[rt-2];break;case 76:this.$=Ye[rt];break;case 77:var vr=Ot.destructLink(Ye[rt],Ye[rt-2]);this.$={type:vr.type,stroke:vr.stroke,length:vr.length,text:Ye[rt-1]};break;case 78:var vr=Ot.destructLink(Ye[rt],Ye[rt-2]);this.$={type:vr.type,stroke:vr.stroke,length:vr.length,text:Ye[rt-1],id:Ye[rt-3]};break;case 79:this.$={text:Ye[rt],type:"text"};break;case 80:this.$={text:Ye[rt-1].text+""+Ye[rt],type:Ye[rt-1].type};break;case 81:this.$={text:Ye[rt],type:"string"};break;case 82:this.$={text:Ye[rt],type:"markdown"};break;case 83:var vr=Ot.destructLink(Ye[rt]);this.$={type:vr.type,stroke:vr.stroke,length:vr.length};break;case 84:var vr=Ot.destructLink(Ye[rt]);this.$={type:vr.type,stroke:vr.stroke,length:vr.length,id:Ye[rt-1]};break;case 85:this.$=Ye[rt-1];break;case 86:this.$={text:Ye[rt],type:"text"};break;case 87:this.$={text:Ye[rt-1].text+""+Ye[rt],type:Ye[rt-1].type};break;case 88:this.$={text:Ye[rt],type:"string"};break;case 89:case 104:this.$={text:Ye[rt],type:"markdown"};break;case 101:this.$={text:Ye[rt],type:"text"};break;case 102:this.$={text:Ye[rt-1].text+""+Ye[rt],type:Ye[rt-1].type};break;case 103:this.$={text:Ye[rt],type:"text"};break;case 105:this.$=Ye[rt-4],Ot.addClass(Ye[rt-2],Ye[rt]);break;case 106:this.$=Ye[rt-4],Ot.setClass(Ye[rt-2],Ye[rt]);break;case 107:case 115:this.$=Ye[rt-1],Ot.setClickEvent(Ye[rt-1],Ye[rt]);break;case 108:case 116:this.$=Ye[rt-3],Ot.setClickEvent(Ye[rt-3],Ye[rt-2]),Ot.setTooltip(Ye[rt-3],Ye[rt]);break;case 109:this.$=Ye[rt-2],Ot.setClickEvent(Ye[rt-2],Ye[rt-1],Ye[rt]);break;case 110:this.$=Ye[rt-4],Ot.setClickEvent(Ye[rt-4],Ye[rt-3],Ye[rt-2]),Ot.setTooltip(Ye[rt-4],Ye[rt]);break;case 111:this.$=Ye[rt-2],Ot.setLink(Ye[rt-2],Ye[rt]);break;case 112:this.$=Ye[rt-4],Ot.setLink(Ye[rt-4],Ye[rt-2]),Ot.setTooltip(Ye[rt-4],Ye[rt]);break;case 113:this.$=Ye[rt-4],Ot.setLink(Ye[rt-4],Ye[rt-2],Ye[rt]);break;case 114:this.$=Ye[rt-6],Ot.setLink(Ye[rt-6],Ye[rt-4],Ye[rt]),Ot.setTooltip(Ye[rt-6],Ye[rt-2]);break;case 117:this.$=Ye[rt-1],Ot.setLink(Ye[rt-1],Ye[rt]);break;case 118:this.$=Ye[rt-3],Ot.setLink(Ye[rt-3],Ye[rt-2]),Ot.setTooltip(Ye[rt-3],Ye[rt]);break;case 119:this.$=Ye[rt-3],Ot.setLink(Ye[rt-3],Ye[rt-2],Ye[rt]);break;case 120:this.$=Ye[rt-5],Ot.setLink(Ye[rt-5],Ye[rt-4],Ye[rt]),Ot.setTooltip(Ye[rt-5],Ye[rt-2]);break;case 121:this.$=Ye[rt-4],Ot.addVertex(Ye[rt-2],void 0,void 0,Ye[rt]);break;case 122:this.$=Ye[rt-4],Ot.updateLink([Ye[rt-2]],Ye[rt]);break;case 123:this.$=Ye[rt-4],Ot.updateLink(Ye[rt-2],Ye[rt]);break;case 124:this.$=Ye[rt-8],Ot.updateLinkInterpolate([Ye[rt-6]],Ye[rt-2]),Ot.updateLink([Ye[rt-6]],Ye[rt]);break;case 125:this.$=Ye[rt-8],Ot.updateLinkInterpolate(Ye[rt-6],Ye[rt-2]),Ot.updateLink(Ye[rt-6],Ye[rt]);break;case 126:this.$=Ye[rt-6],Ot.updateLinkInterpolate([Ye[rt-4]],Ye[rt]);break;case 127:this.$=Ye[rt-6],Ot.updateLinkInterpolate(Ye[rt-4],Ye[rt]);break;case 128:case 130:this.$=[Ye[rt]];break;case 129:case 131:Ye[rt-2].push(Ye[rt]),this.$=Ye[rt-2];break;case 133:this.$=Ye[rt-1]+Ye[rt];break;case 181:this.$=Ye[rt];break;case 182:this.$=Ye[rt-1]+""+Ye[rt];break;case 184:this.$=Ye[rt-1]+""+Ye[rt];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),"anonymous"),table:[{3:1,4:2,9:e,10:r,12:n},{1:[3]},t(a,i,{5:6}),{4:7,9:e,10:r,12:n},{4:8,9:e,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:o,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:g,42:28,43:39,44:m,45:40,47:41,60:y,84:v,85:b,86:w,87:x,88:T,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O,121:M,122:P,123:z,124:D,125:B},t(a,[2,9]),t(a,[2,10]),t(a,[2,11]),{8:[1,55],9:[1,56],10:W,15:54,18:57},t(U,[2,3]),t(U,[2,4]),t(U,[2,5]),t(U,[2,6]),t(U,[2,7]),t(U,[2,8]),{8:j,9:V,11:Y,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:j,9:V,11:Y,21:68},{8:j,9:V,11:Y,21:69},{8:j,9:V,11:Y,21:70},{8:j,9:V,11:Y,21:71},{8:j,9:V,11:Y,21:72},{8:j,9:V,10:[1,73],11:Y,21:74},t(U,[2,36]),{35:[1,75]},{37:[1,76]},t(U,[2,39]),t(H,[2,50],{18:77,39:78,10:W,40:q}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Z,44:K,60:re,80:[1,87],89:Q,95:[1,84],97:[1,85],101:86,105:te,106:ee,109:J,111:ae,114:se,115:fe,116:ve,120:88},t(U,[2,185]),t(U,[2,186]),t(U,[2,187]),t(U,[2,188]),t(U,[2,189]),t(de,[2,51]),t(de,[2,54],{46:[1,100]}),t(Ee,[2,72],{113:113,29:[1,101],44:m,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:C,102:S,105:E,106:k,109:A,111:I,114:L,115:R,116:O}),t(Ce,[2,181]),t(Ce,[2,142]),t(Ce,[2,143]),t(Ce,[2,144]),t(Ce,[2,145]),t(Ce,[2,146]),t(Ce,[2,147]),t(Ce,[2,148]),t(Ce,[2,149]),t(Ce,[2,150]),t(Ce,[2,151]),t(Ce,[2,152]),t(a,[2,12]),t(a,[2,18]),t(a,[2,19]),{9:[1,114]},t(De,[2,26],{18:115,10:W}),t(U,[2,27]),{42:116,43:39,44:m,45:40,47:41,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O},t(U,[2,40]),t(U,[2,41]),t(U,[2,42]),t(ce,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Ie,81:ye,116:pe,119:Ae},{75:[1,126],77:[1,127]},t(Ve,[2,83]),t(U,[2,28]),t(U,[2,29]),t(U,[2,30]),t(U,[2,31]),t(U,[2,32]),{10:ze,12:We,14:me,27:Se,28:128,32:ne,44:xe,60:oe,75:_e,80:[1,130],81:[1,131],83:141,84:ue,85:tt,86:Re,87:et,88:Xe,89:ot,90:Ge,91:129,105:ht,109:Je,111:St,114:He,115:dt,116:Oe},t(vt,i,{5:154}),t(U,[2,37]),t(U,[2,38]),t(H,[2,48],{44:qe}),t(H,[2,49],{18:156,10:W,40:Me}),t(de,[2,44]),{44:m,47:158,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O},{102:[1,159],103:160,105:[1,161]},{44:m,47:162,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O},{44:m,47:163,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O},t(lt,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(lt,[2,115],{120:168,10:[1,167],14:Z,44:K,60:re,89:Q,105:te,106:ee,109:J,111:ae,114:se,115:fe,116:ve}),t(lt,[2,117],{10:[1,169]}),t(it,[2,183]),t(it,[2,170]),t(it,[2,171]),t(it,[2,172]),t(it,[2,173]),t(it,[2,174]),t(it,[2,175]),t(it,[2,176]),t(it,[2,177]),t(it,[2,178]),t(it,[2,179]),t(it,[2,180]),{44:m,47:170,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O},{30:171,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:179,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:181,50:[1,180],67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:182,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:183,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:184,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{109:[1,185]},{30:186,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:187,65:[1,188],67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:189,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:190,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{30:191,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},t(Ce,[2,182]),t(a,[2,20]),t(De,[2,25]),t(H,[2,46],{39:192,18:193,10:W,40:q}),t(ce,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{77:[1,197],79:198,116:pe,119:Ae},t($e,[2,79]),t($e,[2,81]),t($e,[2,82]),t($e,[2,168]),t($e,[2,169]),{76:199,79:121,80:Ie,81:ye,116:pe,119:Ae},t(Ve,[2,84]),{8:j,9:V,10:ze,11:Y,12:We,14:me,21:201,27:Se,29:[1,200],32:ne,44:xe,60:oe,75:_e,83:141,84:ue,85:tt,86:Re,87:et,88:Xe,89:ot,90:Ge,91:202,105:ht,109:Je,111:St,114:He,115:dt,116:Oe},t(le,[2,101]),t(le,[2,103]),t(le,[2,104]),t(le,[2,157]),t(le,[2,158]),t(le,[2,159]),t(le,[2,160]),t(le,[2,161]),t(le,[2,162]),t(le,[2,163]),t(le,[2,164]),t(le,[2,165]),t(le,[2,166]),t(le,[2,167]),t(le,[2,90]),t(le,[2,91]),t(le,[2,92]),t(le,[2,93]),t(le,[2,94]),t(le,[2,95]),t(le,[2,96]),t(le,[2,97]),t(le,[2,98]),t(le,[2,99]),t(le,[2,100]),{6:11,7:12,8:s,9:o,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:p,38:g,42:28,43:39,44:m,45:40,47:41,60:y,84:v,85:b,86:w,87:x,88:T,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O,121:M,122:P,123:z,124:D,125:B},{10:W,18:204},{44:[1,205]},t(de,[2,43]),{10:[1,206],44:m,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:113,114:L,115:R,116:O},{10:[1,207]},{10:[1,208],106:[1,209]},t(ke,[2,128]),{10:[1,210],44:m,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:113,114:L,115:R,116:O},{10:[1,211],44:m,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:113,114:L,115:R,116:O},{80:[1,212]},t(lt,[2,109],{10:[1,213]}),t(lt,[2,111],{10:[1,214]}),{80:[1,215]},t(it,[2,184]),{80:[1,216],98:[1,217]},t(de,[2,55],{113:113,44:m,60:y,89:C,102:S,105:E,106:k,109:A,111:I,114:L,115:R,116:O}),{31:[1,218],67:Ue,82:219,116:ge,117:ie,118:be},t(je,[2,86]),t(je,[2,88]),t(je,[2,89]),t(je,[2,153]),t(je,[2,154]),t(je,[2,155]),t(je,[2,156]),{49:[1,220],67:Ue,82:219,116:ge,117:ie,118:be},{30:221,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{51:[1,222],67:Ue,82:219,116:ge,117:ie,118:be},{53:[1,223],67:Ue,82:219,116:ge,117:ie,118:be},{55:[1,224],67:Ue,82:219,116:ge,117:ie,118:be},{57:[1,225],67:Ue,82:219,116:ge,117:ie,118:be},{60:[1,226]},{64:[1,227],67:Ue,82:219,116:ge,117:ie,118:be},{66:[1,228],67:Ue,82:219,116:ge,117:ie,118:be},{30:229,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},{31:[1,230],67:Ue,82:219,116:ge,117:ie,118:be},{67:Ue,69:[1,231],71:[1,232],82:219,116:ge,117:ie,118:be},{67:Ue,69:[1,234],71:[1,233],82:219,116:ge,117:ie,118:be},t(H,[2,45],{18:156,10:W,40:Me}),t(H,[2,47],{44:qe}),t(ce,[2,75]),t(ce,[2,74]),{62:[1,235],67:Ue,82:219,116:ge,117:ie,118:be},t(ce,[2,77]),t($e,[2,80]),{77:[1,236],79:198,116:pe,119:Ae},{30:237,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},t(vt,i,{5:238}),t(le,[2,102]),t(U,[2,35]),{43:239,44:m,45:40,47:41,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O},{10:W,18:240},{10:ut,60:Qe,84:Ze,92:241,105:st,107:242,108:243,109:Ct,110:Mt,111:Bt,112:Pt},{10:ut,60:Qe,84:Ze,92:252,104:[1,253],105:st,107:242,108:243,109:Ct,110:Mt,111:Bt,112:Pt},{10:ut,60:Qe,84:Ze,92:254,104:[1,255],105:st,107:242,108:243,109:Ct,110:Mt,111:Bt,112:Pt},{105:[1,256]},{10:ut,60:Qe,84:Ze,92:257,105:st,107:242,108:243,109:Ct,110:Mt,111:Bt,112:Pt},{44:m,47:258,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O},t(lt,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(lt,[2,116]),t(lt,[2,118],{10:[1,262]}),t(lt,[2,119]),t(Ee,[2,56]),t(je,[2,87]),t(Ee,[2,57]),{51:[1,263],67:Ue,82:219,116:ge,117:ie,118:be},t(Ee,[2,64]),t(Ee,[2,59]),t(Ee,[2,60]),t(Ee,[2,61]),{109:[1,264]},t(Ee,[2,63]),t(Ee,[2,65]),{66:[1,265],67:Ue,82:219,116:ge,117:ie,118:be},t(Ee,[2,67]),t(Ee,[2,68]),t(Ee,[2,70]),t(Ee,[2,69]),t(Ee,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(ce,[2,78]),{31:[1,266],67:Ue,82:219,116:ge,117:ie,118:be},{6:11,7:12,8:s,9:o,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:p,38:g,42:28,43:39,44:m,45:40,47:41,60:y,84:v,85:b,86:w,87:x,88:T,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O,121:M,122:P,123:z,124:D,125:B},t(de,[2,53]),{43:268,44:m,45:40,47:41,60:y,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O},t(lt,[2,121],{106:Pe}),t(at,[2,130],{108:270,10:ut,60:Qe,84:Ze,105:st,109:Ct,110:Mt,111:Bt,112:Pt}),t(yt,[2,132]),t(yt,[2,134]),t(yt,[2,135]),t(yt,[2,136]),t(yt,[2,137]),t(yt,[2,138]),t(yt,[2,139]),t(yt,[2,140]),t(yt,[2,141]),t(lt,[2,122],{106:Pe}),{10:[1,271]},t(lt,[2,123],{106:Pe}),{10:[1,272]},t(ke,[2,129]),t(lt,[2,105],{106:Pe}),t(lt,[2,106],{113:113,44:m,60:y,89:C,102:S,105:E,106:k,109:A,111:I,114:L,115:R,116:O}),t(lt,[2,110]),t(lt,[2,112],{10:[1,273]}),t(lt,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:j,9:V,11:Y,21:278},t(U,[2,34]),t(de,[2,52]),{10:ut,60:Qe,84:Ze,105:st,107:279,108:243,109:Ct,110:Mt,111:Bt,112:Pt},t(yt,[2,133]),{14:Z,44:K,60:re,89:Q,101:280,105:te,106:ee,109:J,111:ae,114:se,115:fe,116:ve,120:88},{14:Z,44:K,60:re,89:Q,101:281,105:te,106:ee,109:J,111:ae,114:se,115:fe,116:ve,120:88},{98:[1,282]},t(lt,[2,120]),t(Ee,[2,58]),{30:283,67:Ue,80:we,81:gt,82:172,116:ge,117:ie,118:be},t(Ee,[2,66]),t(vt,i,{5:284}),t(at,[2,131],{108:270,10:ut,60:Qe,84:Ze,105:st,109:Ct,110:Mt,111:Bt,112:Pt}),t(lt,[2,126],{120:168,10:[1,285],14:Z,44:K,60:re,89:Q,105:te,106:ee,109:J,111:ae,114:se,115:fe,116:ve}),t(lt,[2,127],{120:168,10:[1,286],14:Z,44:K,60:re,89:Q,105:te,106:ee,109:J,111:ae,114:se,115:fe,116:ve}),t(lt,[2,114]),{31:[1,287],67:Ue,82:219,116:ge,117:ie,118:be},{6:11,7:12,8:s,9:o,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:p,38:g,42:28,43:39,44:m,45:40,47:41,60:y,84:v,85:b,86:w,87:x,88:T,89:C,102:S,105:E,106:k,109:A,111:I,113:42,114:L,115:R,116:O,121:M,122:P,123:z,124:D,125:B},{10:ut,60:Qe,84:Ze,92:289,105:st,107:242,108:243,109:Ct,110:Mt,111:Bt,112:Pt},{10:ut,60:Qe,84:Ze,92:290,105:st,107:242,108:243,109:Ct,110:Mt,111:Bt,112:Pt},t(Ee,[2,62]),t(U,[2,33]),t(lt,[2,124],{106:Pe}),t(lt,[2,125],{106:Pe})],defaultActions:{},parseError:_(l(function(Ht,wt){if(wt.recoverable)this.trace(Ht);else{var _t=new Error(Ht);throw _t.hash=wt,_t}},"parseError"),"parseError"),parse:_(l(function(Ht){var wt=this,_t=[0],Ot=[],er=[null],Ye=[],Ut=this.table,rt="",vr=0,en=0,Pn=2,ia=1,Us=Ye.slice.call(arguments,1),lr=Object.create(this.lexer),$r={yy:{}};for(var xn in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xn)&&($r.yy[xn]=this.yy[xn]);lr.setInput(Ht,$r.yy),$r.yy.lexer=lr,$r.yy.parser=this,typeof lr.yylloc=="undefined"&&(lr.yylloc={});var ka=lr.yylloc;Ye.push(ka);var di=lr.options&&lr.options.ranges;typeof $r.yy.parseError=="function"?this.parseError=$r.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function cr(In){_t.length=_t.length-2*In,er.length=er.length-In,Ye.length=Ye.length-In}l(cr,"popStack"),_(cr,"popStack");function ct(){var In;return In=Ot.pop()||lr.lex()||ia,typeof In!="number"&&(In instanceof Array&&(Ot=In,In=Ot.pop()),In=wt.symbols_[In]||In),In}l(ct,"lex"),_(ct,"lex");for(var $t,Et,jt,ir,br={},tn,Gr,Dr,Rr;;){if(Et=_t[_t.length-1],this.defaultActions[Et]?jt=this.defaultActions[Et]:(($t===null||typeof $t=="undefined")&&($t=ct()),jt=Ut[Et]&&Ut[Et][$t]),typeof jt=="undefined"||!jt.length||!jt[0]){var sa="";Rr=[];for(tn in Ut[Et])this.terminals_[tn]&&tn>Pn&&Rr.push("'"+this.terminals_[tn]+"'");lr.showPosition?sa="Parse error on line "+(vr+1)+`:
|
||
`+lr.showPosition()+`
|
||
Expecting `+Rr.join(", ")+", got '"+(this.terminals_[$t]||$t)+"'":sa="Parse error on line "+(vr+1)+": Unexpected "+($t==ia?"end of input":"'"+(this.terminals_[$t]||$t)+"'"),this.parseError(sa,{text:lr.match,token:this.terminals_[$t]||$t,line:lr.yylineno,loc:ka,expected:Rr})}if(jt[0]instanceof Array&&jt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Et+", token: "+$t);switch(jt[0]){case 1:_t.push($t),er.push(lr.yytext),Ye.push(lr.yylloc),_t.push(jt[1]),$t=null,en=lr.yyleng,rt=lr.yytext,vr=lr.yylineno,ka=lr.yylloc;break;case 2:if(Gr=this.productions_[jt[1]][1],br.$=er[er.length-Gr],br._$={first_line:Ye[Ye.length-(Gr||1)].first_line,last_line:Ye[Ye.length-1].last_line,first_column:Ye[Ye.length-(Gr||1)].first_column,last_column:Ye[Ye.length-1].last_column},di&&(br._$.range=[Ye[Ye.length-(Gr||1)].range[0],Ye[Ye.length-1].range[1]]),ir=this.performAction.apply(br,[rt,en,vr,$r.yy,jt[1],er,Ye].concat(Us)),typeof ir!="undefined")return ir;Gr&&(_t=_t.slice(0,-1*Gr*2),er=er.slice(0,-1*Gr),Ye=Ye.slice(0,-1*Gr)),_t.push(this.productions_[jt[1]][0]),er.push(br.$),Ye.push(br._$),Dr=Ut[_t[_t.length-2]][_t[_t.length-1]],_t.push(Dr);break;case 3:return!0}}return!0},"parse"),"parse")},Nt=function(){var Jt={EOF:1,parseError:_(l(function(wt,_t){if(this.yy.parser)this.yy.parser.parseError(wt,_t);else throw new Error(wt)},"parseError"),"parseError"),setInput:_(function(Ht,wt){return this.yy=wt||this.yy||{},this._input=Ht,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var Ht=this._input[0];this.yytext+=Ht,this.yyleng++,this.offset++,this.match+=Ht,this.matched+=Ht;var wt=Ht.match(/(?:\r\n?|\n).*/g);return wt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ht},"input"),unput:_(function(Ht){var wt=Ht.length,_t=Ht.split(/(?:\r\n?|\n)/g);this._input=Ht+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-wt),this.offset-=wt;var Ot=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),_t.length-1&&(this.yylineno-=_t.length-1);var er=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:_t?(_t.length===Ot.length?this.yylloc.first_column:0)+Ot[Ot.length-_t.length].length-_t[0].length:this.yylloc.first_column-wt},this.options.ranges&&(this.yylloc.range=[er[0],er[0]+this.yyleng-wt]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(Ht){this.unput(this.match.slice(Ht))},"less"),pastInput:_(function(){var Ht=this.matched.substr(0,this.matched.length-this.match.length);return(Ht.length>20?"...":"")+Ht.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var Ht=this.match;return Ht.length<20&&(Ht+=this._input.substr(0,20-Ht.length)),(Ht.substr(0,20)+(Ht.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var Ht=this.pastInput(),wt=new Array(Ht.length+1).join("-");return Ht+this.upcomingInput()+`
|
||
`+wt+"^"},"showPosition"),test_match:_(function(Ht,wt){var _t,Ot,er;if(this.options.backtrack_lexer&&(er={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(er.yylloc.range=this.yylloc.range.slice(0))),Ot=Ht[0].match(/(?:\r\n?|\n).*/g),Ot&&(this.yylineno+=Ot.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ot?Ot[Ot.length-1].length-Ot[Ot.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ht[0].length},this.yytext+=Ht[0],this.match+=Ht[0],this.matches=Ht,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Ht[0].length),this.matched+=Ht[0],_t=this.performAction.call(this,this.yy,this,wt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),_t)return _t;if(this._backtrack){for(var Ye in er)this[Ye]=er[Ye];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ht,wt,_t,Ot;this._more||(this.yytext="",this.match="");for(var er=this._currentRules(),Ye=0;Ye<er.length;Ye++)if(_t=this._input.match(this.rules[er[Ye]]),_t&&(!wt||_t[0].length>wt[0].length)){if(wt=_t,Ot=Ye,this.options.backtrack_lexer){if(Ht=this.test_match(_t,er[Ye]),Ht!==!1)return Ht;if(this._backtrack){wt=!1;continue}else return!1}else if(!this.options.flex)break}return wt?(Ht=this.test_match(wt,er[Ot]),Ht!==!1?Ht:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var wt=this.next();return wt||this.lex()},"lex"),"lex"),begin:_(l(function(wt){this.conditionStack.push(wt)},"begin"),"begin"),popState:_(l(function(){var wt=this.conditionStack.length-1;return wt>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(wt){return wt=this.conditionStack.length-1-Math.abs(wt||0),wt>=0?this.conditionStack[wt]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(wt){this.begin(wt)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{},performAction:_(l(function(wt,_t,Ot,er){switch(Ot){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),_t.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const Ye=/\n\s*/g;return _t.yytext=_t.yytext.replace(Ye,"<br/>"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return wt.lex.firstGraph()&&this.begin("dir"),12;case 36:return wt.lex.firstGraph()&&this.begin("dir"),12;case 37:return wt.lex.firstGraph()&&this.begin("dir"),12;case 38:return wt.lex.firstGraph()&&this.begin("dir"),12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;case 71:return this.pushState("edgeText"),75;case 72:return 119;case 73:return this.popState(),77;case 74:return this.pushState("thickEdgeText"),75;case 75:return 119;case 76:return this.popState(),77;case 77:return this.pushState("dottedEdgeText"),75;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;case 83:return this.popState(),55;case 84:return this.pushState("text"),54;case 85:return this.popState(),57;case 86:return this.pushState("text"),56;case 87:return 58;case 88:return this.pushState("text"),67;case 89:return this.popState(),64;case 90:return this.pushState("text"),63;case 91:return this.popState(),49;case 92:return this.pushState("text"),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState("trapText"),68;case 97:return this.pushState("trapText"),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState("text"),62;case 111:return this.popState(),51;case 112:return this.pushState("text"),50;case 113:return this.popState(),31;case 114:return this.pushState("text"),29;case 115:return this.popState(),66;case 116:return this.pushState("text"),65;case 117:return"TEXT";case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"anonymous"),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return Jt}();Tt.lexer=Nt;function zt(){this.yy={}}return l(zt,"Parser"),_(zt,"Parser"),zt.prototype=Tt,Tt.Parser=zt,new zt}();Rj.parser=Rj;var ZAe=Rj,QAe=Object.assign({},ZAe);QAe.parse=t=>{const e=t.replace(/}\s*\n/g,`}
|
||
`);return ZAe.parse(e)};var CKt=QAe,SKt=_((t,e)=>{const r=yz,n=r(t,"r"),a=r(t,"g"),i=r(t,"b");return Ru(n,a,i,e)},"fade"),_Kt=_(t=>{var e,r;return`.label {
|
||
font-family: ${t.fontFamily};
|
||
color: ${t.nodeTextColor||t.textColor};
|
||
}
|
||
.cluster-label text {
|
||
fill: ${t.titleColor};
|
||
}
|
||
.cluster-label span {
|
||
color: ${t.titleColor};
|
||
}
|
||
.cluster-label span p {
|
||
background-color: transparent;
|
||
}
|
||
|
||
.label text,span {
|
||
fill: ${t.nodeTextColor||t.textColor};
|
||
color: ${t.nodeTextColor||t.textColor};
|
||
}
|
||
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon,
|
||
.node path {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: ${(e=t.strokeWidth)!=null?e:1}px;
|
||
}
|
||
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
|
||
text-anchor: middle;
|
||
}
|
||
|
||
.node .katex path {
|
||
fill: #000;
|
||
stroke: #000;
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
|
||
text-align: center;
|
||
}
|
||
.node.clickable {
|
||
cursor: pointer;
|
||
}
|
||
|
||
|
||
.root .anchor path {
|
||
fill: ${t.lineColor} !important;
|
||
stroke-width: 0;
|
||
stroke: ${t.lineColor};
|
||
}
|
||
|
||
.arrowheadPath {
|
||
fill: ${t.arrowheadColor};
|
||
}
|
||
|
||
.edgePath .path {
|
||
stroke: ${t.lineColor};
|
||
stroke-width: ${(r=t.strokeWidth)!=null?r:2}px;
|
||
}
|
||
|
||
.flowchart-link {
|
||
stroke: ${t.lineColor};
|
||
fill: none;
|
||
}
|
||
|
||
.edgeLabel {
|
||
background-color: ${t.edgeLabelBackground};
|
||
p {
|
||
background-color: ${t.edgeLabelBackground};
|
||
}
|
||
rect {
|
||
opacity: 0.5;
|
||
background-color: ${t.edgeLabelBackground};
|
||
fill: ${t.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
|
||
/* For html labels only */
|
||
.labelBkg {
|
||
background-color: ${SKt(t.edgeLabelBackground,.5)};
|
||
// background-color:
|
||
}
|
||
|
||
.cluster rect {
|
||
fill: ${t.clusterBkg};
|
||
stroke: ${t.clusterBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.cluster text {
|
||
fill: ${t.titleColor};
|
||
}
|
||
|
||
.cluster span {
|
||
color: ${t.titleColor};
|
||
}
|
||
/* .cluster div {
|
||
color: ${t.titleColor};
|
||
} */
|
||
|
||
div.mermaidTooltip {
|
||
position: absolute;
|
||
text-align: center;
|
||
max-width: 200px;
|
||
padding: 2px;
|
||
font-family: ${t.fontFamily};
|
||
font-size: 12px;
|
||
background: ${t.tertiaryColor};
|
||
border: 1px solid ${t.border2};
|
||
border-radius: 2px;
|
||
pointer-events: none;
|
||
z-index: 100;
|
||
}
|
||
|
||
.flowchartTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
|
||
rect.text {
|
||
fill: none;
|
||
stroke-width: 0;
|
||
}
|
||
|
||
.icon-shape, .image-shape {
|
||
background-color: ${t.edgeLabelBackground};
|
||
p {
|
||
background-color: ${t.edgeLabelBackground};
|
||
padding: 2px;
|
||
}
|
||
.label rect {
|
||
opacity: 0.5;
|
||
background-color: ${t.edgeLabelBackground};
|
||
fill: ${t.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
${F5()}
|
||
`},"getStyles"),JAe=_Kt,Oj=_(({defaultLayout:t,styles:e=JAe}={})=>({parser:CKt,get db(){return new xKt},renderer:EKt,styles:e,init:_(r=>{var a,i;r.flowchart||(r.flowchart={});const n=(i=(a=eme().layout)!=null?a:t)!=null?i:r.layout;n&&Dz({layout:n}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,Dz({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),kKt=Oj(),Dj=Object.freeze({__proto__:null,createFlowDiagram:Oj,diagram:kKt}),AKt=_(t=>`${JAe(t)}
|
||
.swimlane.cluster rect {
|
||
stroke: ${t.clusterBorder} !important;
|
||
}
|
||
[data-look="neo"].cluster rect {
|
||
filter: none;
|
||
}
|
||
`,"getStyles"),NKt=AKt,IKt=Oj({defaultLayout:"swimlane",styles:NKt}),LKt=Object.freeze({__proto__:null,diagram:IKt}),Fj=function(){var t=_(function(fe,ve,de,Ee){for(de=de||{},Ee=fe.length;Ee--;de[fe[Ee]]=ve);return de},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],n=[1,11],a=[1,12],i=[1,13],s=[1,23],o=[1,24],u=[1,25],h=[1,26],d=[1,27],f=[1,19],p=[1,28],g=[1,29],m=[1,20],y=[1,18],v=[1,21],b=[1,22],w=[1,36],x=[1,37],T=[1,38],C=[1,39],S=[1,40],E=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],k=[1,45],A=[1,46],I=[1,55],L=[40,48,50,51,52,71,72],R=[1,66],O=[1,64],M=[1,61],P=[1,65],z=[1,67],D=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],B=[66,67,68,69,70],W=[1,85],U=[1,84],j=[1,82],V=[1,83],Y=[6,10,42,47],H=[6,10,13,41,42,47,48,49],q=[1,93],Z=[1,92],K=[1,91],re=[19,58],Q=[1,102],te=[1,101],ee=[19,58,61,63],J={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:_(l(function(ve,de,Ee,Ce,De,ce,Ie){var ye=ce.length-1;switch(De){case 1:break;case 2:this.$=[];break;case 3:ce[ye-1].push(ce[ye]),this.$=ce[ye-1];break;case 4:case 5:this.$=ce[ye];break;case 6:case 7:this.$=[];break;case 8:Ce.addEntity(ce[ye-4]),Ce.addEntity(ce[ye-2]),Ce.addRelationship(ce[ye-4],ce[ye],ce[ye-2],ce[ye-3]);break;case 9:Ce.addEntity(ce[ye-8]),Ce.addEntity(ce[ye-4]),Ce.addRelationship(ce[ye-8],ce[ye],ce[ye-4],ce[ye-5]),Ce.setClass([ce[ye-8]],ce[ye-6]),Ce.setClass([ce[ye-4]],ce[ye-2]);break;case 10:Ce.addEntity(ce[ye-6]),Ce.addEntity(ce[ye-2]),Ce.addRelationship(ce[ye-6],ce[ye],ce[ye-2],ce[ye-3]),Ce.setClass([ce[ye-6]],ce[ye-4]);break;case 11:Ce.addEntity(ce[ye-6]),Ce.addEntity(ce[ye-4]),Ce.addRelationship(ce[ye-6],ce[ye],ce[ye-4],ce[ye-5]),Ce.setClass([ce[ye-4]],ce[ye-2]);break;case 12:Ce.addEntity(ce[ye-3]),Ce.addAttributes(ce[ye-3],ce[ye-1]);break;case 13:Ce.addEntity(ce[ye-5]),Ce.addAttributes(ce[ye-5],ce[ye-1]),Ce.setClass([ce[ye-5]],ce[ye-3]);break;case 14:Ce.addEntity(ce[ye-2]);break;case 15:Ce.addEntity(ce[ye-4]),Ce.setClass([ce[ye-4]],ce[ye-2]);break;case 16:Ce.addEntity(ce[ye]);break;case 17:Ce.addEntity(ce[ye-2]),Ce.setClass([ce[ye-2]],ce[ye]);break;case 18:Ce.addEntity(ce[ye-6],ce[ye-4]),Ce.addAttributes(ce[ye-6],ce[ye-1]);break;case 19:Ce.addEntity(ce[ye-8],ce[ye-6]),Ce.addAttributes(ce[ye-8],ce[ye-1]),Ce.setClass([ce[ye-8]],ce[ye-3]);break;case 20:Ce.addEntity(ce[ye-5],ce[ye-3]);break;case 21:Ce.addEntity(ce[ye-7],ce[ye-5]),Ce.setClass([ce[ye-7]],ce[ye-2]);break;case 22:Ce.addEntity(ce[ye-3],ce[ye-1]);break;case 23:Ce.addEntity(ce[ye-5],ce[ye-3]),Ce.setClass([ce[ye-5]],ce[ye]);break;case 24:case 25:this.$=ce[ye].trim(),Ce.setAccTitle(this.$);break;case 26:case 27:this.$=ce[ye].trim(),Ce.setAccDescription(this.$);break;case 32:Ce.setDirection("TB");break;case 33:Ce.setDirection("BT");break;case 34:Ce.setDirection("RL");break;case 35:Ce.setDirection("LR");break;case 36:this.$=ce[ye-3],Ce.addClass(ce[ye-2],ce[ye-1]);break;case 37:case 38:case 59:case 68:this.$=[ce[ye]];break;case 39:case 40:this.$=ce[ye-2].concat([ce[ye]]);break;case 41:this.$=ce[ye-2],Ce.setClass(ce[ye-1],ce[ye]);break;case 42:this.$=ce[ye-3],Ce.addCssStyles(ce[ye-2],ce[ye-1]);break;case 43:this.$=[ce[ye]];break;case 44:ce[ye-2].push(ce[ye]),this.$=ce[ye-2];break;case 46:this.$=ce[ye-1]+ce[ye];break;case 54:case 80:case 81:this.$=ce[ye].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=ce[ye];break;case 60:ce[ye].push(ce[ye-1]),this.$=ce[ye];break;case 61:this.$={type:ce[ye-1],name:ce[ye]};break;case 62:this.$={type:ce[ye-2],name:ce[ye-1],keys:ce[ye]};break;case 63:this.$={type:ce[ye-2],name:ce[ye-1],comment:ce[ye]};break;case 64:this.$={type:ce[ye-3],name:ce[ye-2],keys:ce[ye-1],comment:ce[ye]};break;case 65:case 67:case 70:this.$=ce[ye];break;case 66:this.$=ce[ye-1]+ce[ye];break;case 69:ce[ye-2].push(ce[ye]),this.$=ce[ye-2];break;case 71:this.$=ce[ye].replace(/"/g,"");break;case 72:this.$={cardA:ce[ye],relType:ce[ye-1],cardB:ce[ye-2]};break;case 73:this.$=Ce.Cardinality.ZERO_OR_ONE;break;case 74:this.$=Ce.Cardinality.ZERO_OR_MORE;break;case 75:this.$=Ce.Cardinality.ONE_OR_MORE;break;case 76:this.$=Ce.Cardinality.ONLY_ONE;break;case 77:this.$=Ce.Cardinality.MD_PARENT;break;case 78:this.$=Ce.Identification.NON_IDENTIFYING;break;case 79:this.$=Ce.Identification.IDENTIFYING;break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:n,26:a,28:i,29:14,30:15,31:16,32:17,33:s,34:o,35:u,36:h,37:d,40:f,43:p,44:g,48:m,50:y,51:v,52:b},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:30,11:9,22:r,24:n,26:a,28:i,29:14,30:15,31:16,32:17,33:s,34:o,35:u,36:h,37:d,40:f,43:p,44:g,48:m,50:y,51:v,52:b},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:w,67:x,68:T,69:C,70:S}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(E,[2,54]),t(E,[2,55]),t(E,[2,56]),t(E,[2,57]),t(E,[2,58]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:44,40:k,41:A},{16:47,40:k,41:A},{16:48,40:k,41:A},t(e,[2,4]),{11:49,40:f,48:m,50:y,51:v,52:b},{16:50,40:k,41:A},{18:51,19:[1,52],53:53,54:54,58:I},{11:56,40:f,48:m,50:y,51:v,52:b},{65:57,71:[1,58],72:[1,59]},t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:R,38:60,41:O,42:M,45:62,46:63,48:P,49:z},t(D,[2,37]),t(D,[2,38]),{16:68,40:k,41:A,42:M},{13:R,38:69,41:O,42:M,45:62,46:63,48:P,49:z},{13:[1,70],15:[1,71]},t(e,[2,17],{64:35,12:72,17:[1,73],42:M,66:w,67:x,68:T,69:C,70:S}),{19:[1,74]},t(e,[2,14]),{18:75,19:[2,59],53:53,54:54,58:I},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:w,67:x,68:T,69:C,70:S},t(B,[2,78]),t(B,[2,79]),{6:W,10:U,39:81,42:j,47:V},{40:[1,86],41:[1,87]},t(Y,[2,43],{46:88,13:R,41:O,48:P,49:z}),t(H,[2,45]),t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(e,[2,41],{42:M}),{6:W,10:U,39:89,42:j,47:V},{14:90,40:q,50:Z,73:K},{16:94,40:k,41:A},{11:95,40:f,48:m,50:y,51:v,52:b},{18:96,19:[1,97],53:53,54:54,58:I},t(e,[2,12]),{19:[2,60]},t(re,[2,61],{56:98,57:99,60:100,62:Q,63:te}),t([19,58,62,63],[2,67]),{58:[2,66]},t(e,[2,22],{15:[1,104],17:[1,103]}),t([40,48,50,51,52],[2,72]),t(e,[2,36]),{13:R,41:O,45:105,46:63,48:P,49:z},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(D,[2,39]),t(D,[2,40]),t(H,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,80]),t(e,[2,81]),t(e,[2,82]),{13:[1,106],42:M},{13:[1,108],15:[1,107]},{19:[1,109]},t(e,[2,15]),t(re,[2,62],{57:110,61:[1,111],63:te}),t(re,[2,63]),t(ee,[2,68]),t(re,[2,71]),t(ee,[2,70]),{18:112,19:[1,113],53:53,54:54,58:I},{16:114,40:k,41:A},t(Y,[2,44],{46:88,13:R,41:O,48:P,49:z}),{14:115,40:q,50:Z,73:K},{16:116,40:k,41:A},{14:117,40:q,50:Z,73:K},t(e,[2,13]),t(re,[2,64]),{60:118,62:Q},{19:[1,119]},t(e,[2,20]),t(e,[2,23],{17:[1,120],42:M}),t(e,[2,11]),{13:[1,121],42:M},t(e,[2,10]),t(ee,[2,69]),t(e,[2,18]),{18:122,19:[1,123],53:53,54:54,58:I},{14:124,40:q,50:Z,73:K},{19:[1,125]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:_(l(function(ve,de){if(de.recoverable)this.trace(ve);else{var Ee=new Error(ve);throw Ee.hash=de,Ee}},"parseError"),"parseError"),parse:_(l(function(ve){var de=this,Ee=[0],Ce=[],De=[null],ce=[],Ie=this.table,ye="",pe=0,Ae=0,Ve=2,ze=1,We=ce.slice.call(arguments,1),me=Object.create(this.lexer),Se={yy:{}};for(var ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ne)&&(Se.yy[ne]=this.yy[ne]);me.setInput(ve,Se.yy),Se.yy.lexer=me,Se.yy.parser=this,typeof me.yylloc=="undefined"&&(me.yylloc={});var xe=me.yylloc;ce.push(xe);var oe=me.options&&me.options.ranges;typeof Se.yy.parseError=="function"?this.parseError=Se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(dt){Ee.length=Ee.length-2*dt,De.length=De.length-dt,ce.length=ce.length-dt}l(_e,"popStack"),_(_e,"popStack");function ue(){var dt;return dt=Ce.pop()||me.lex()||ze,typeof dt!="number"&&(dt instanceof Array&&(Ce=dt,dt=Ce.pop()),dt=de.symbols_[dt]||dt),dt}l(ue,"lex"),_(ue,"lex");for(var tt,Re,et,Xe,ot={},Ge,ht,Je,St;;){if(Re=Ee[Ee.length-1],this.defaultActions[Re]?et=this.defaultActions[Re]:((tt===null||typeof tt=="undefined")&&(tt=ue()),et=Ie[Re]&&Ie[Re][tt]),typeof et=="undefined"||!et.length||!et[0]){var He="";St=[];for(Ge in Ie[Re])this.terminals_[Ge]&&Ge>Ve&&St.push("'"+this.terminals_[Ge]+"'");me.showPosition?He="Parse error on line "+(pe+1)+`:
|
||
`+me.showPosition()+`
|
||
Expecting `+St.join(", ")+", got '"+(this.terminals_[tt]||tt)+"'":He="Parse error on line "+(pe+1)+": Unexpected "+(tt==ze?"end of input":"'"+(this.terminals_[tt]||tt)+"'"),this.parseError(He,{text:me.match,token:this.terminals_[tt]||tt,line:me.yylineno,loc:xe,expected:St})}if(et[0]instanceof Array&&et.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Re+", token: "+tt);switch(et[0]){case 1:Ee.push(tt),De.push(me.yytext),ce.push(me.yylloc),Ee.push(et[1]),tt=null,Ae=me.yyleng,ye=me.yytext,pe=me.yylineno,xe=me.yylloc;break;case 2:if(ht=this.productions_[et[1]][1],ot.$=De[De.length-ht],ot._$={first_line:ce[ce.length-(ht||1)].first_line,last_line:ce[ce.length-1].last_line,first_column:ce[ce.length-(ht||1)].first_column,last_column:ce[ce.length-1].last_column},oe&&(ot._$.range=[ce[ce.length-(ht||1)].range[0],ce[ce.length-1].range[1]]),Xe=this.performAction.apply(ot,[ye,Ae,pe,Se.yy,et[1],De,ce].concat(We)),typeof Xe!="undefined")return Xe;ht&&(Ee=Ee.slice(0,-1*ht*2),De=De.slice(0,-1*ht),ce=ce.slice(0,-1*ht)),Ee.push(this.productions_[et[1]][0]),De.push(ot.$),ce.push(ot._$),Je=Ie[Ee[Ee.length-2]][Ee[Ee.length-1]],Ee.push(Je);break;case 3:return!0}}return!0},"parse"),"parse")},ae=function(){var fe={EOF:1,parseError:_(l(function(de,Ee){if(this.yy.parser)this.yy.parser.parseError(de,Ee);else throw new Error(de)},"parseError"),"parseError"),setInput:_(function(ve,de){return this.yy=de||this.yy||{},this._input=ve,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var ve=this._input[0];this.yytext+=ve,this.yyleng++,this.offset++,this.match+=ve,this.matched+=ve;var de=ve.match(/(?:\r\n?|\n).*/g);return de?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ve},"input"),unput:_(function(ve){var de=ve.length,Ee=ve.split(/(?:\r\n?|\n)/g);this._input=ve+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-de),this.offset-=de;var Ce=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Ee.length-1&&(this.yylineno-=Ee.length-1);var De=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Ee?(Ee.length===Ce.length?this.yylloc.first_column:0)+Ce[Ce.length-Ee.length].length-Ee[0].length:this.yylloc.first_column-de},this.options.ranges&&(this.yylloc.range=[De[0],De[0]+this.yyleng-de]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(ve){this.unput(this.match.slice(ve))},"less"),pastInput:_(function(){var ve=this.matched.substr(0,this.matched.length-this.match.length);return(ve.length>20?"...":"")+ve.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var ve=this.match;return ve.length<20&&(ve+=this._input.substr(0,20-ve.length)),(ve.substr(0,20)+(ve.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var ve=this.pastInput(),de=new Array(ve.length+1).join("-");return ve+this.upcomingInput()+`
|
||
`+de+"^"},"showPosition"),test_match:_(function(ve,de){var Ee,Ce,De;if(this.options.backtrack_lexer&&(De={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(De.yylloc.range=this.yylloc.range.slice(0))),Ce=ve[0].match(/(?:\r\n?|\n).*/g),Ce&&(this.yylineno+=Ce.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ce?Ce[Ce.length-1].length-Ce[Ce.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ve[0].length},this.yytext+=ve[0],this.match+=ve[0],this.matches=ve,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ve[0].length),this.matched+=ve[0],Ee=this.performAction.call(this,this.yy,this,de,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ee)return Ee;if(this._backtrack){for(var ce in De)this[ce]=De[ce];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ve,de,Ee,Ce;this._more||(this.yytext="",this.match="");for(var De=this._currentRules(),ce=0;ce<De.length;ce++)if(Ee=this._input.match(this.rules[De[ce]]),Ee&&(!de||Ee[0].length>de[0].length)){if(de=Ee,Ce=ce,this.options.backtrack_lexer){if(ve=this.test_match(Ee,De[ce]),ve!==!1)return ve;if(this._backtrack){de=!1;continue}else return!1}else if(!this.options.flex)break}return de?(ve=this.test_match(de,De[Ce]),ve!==!1?ve:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var de=this.next();return de||this.lex()},"lex"),"lex"),begin:_(l(function(de){this.conditionStack.push(de)},"begin"),"begin"),popState:_(l(function(){var de=this.conditionStack.length-1;return de>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(de){return de=this.conditionStack.length-1-Math.abs(de||0),de>=0?this.conditionStack[de]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(de){this.begin(de)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(de,Ee,Ce,De){switch(Ce){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 73;case 16:return 4;case 17:return this.begin("block"),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 62;case 25:return 58;case 26:return 58;case 27:this.begin("block_bq");break;case 28:return 58;case 29:this.popState();break;case 30:return 63;case 31:break;case 32:return this.popState(),19;case 33:return Ee.yytext[0];case 34:return 20;case 35:return 21;case 36:return this.begin("style"),44;case 37:return this.popState(),10;case 38:break;case 39:return 13;case 40:return 42;case 41:return 49;case 42:return this.begin("style"),37;case 43:return 43;case 44:return 66;case 45:return 68;case 46:return 68;case 47:return 68;case 48:return 66;case 49:return 66;case 50:return 67;case 51:return 67;case 52:return 67;case 53:return 67;case 54:return 67;case 55:return 68;case 56:return 67;case 57:return 68;case 58:return 69;case 59:return 69;case 60:return 51;case 61:return 69;case 62:return 69;case 63:return 69;case 64:return 52;case 65:return 48;case 66:return 69;case 67:return 66;case 68:return 67;case 69:return 68;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 72;case 74:return 71;case 75:return 71;case 76:return 71;case 77:return 41;case 78:return 47;case 79:return 40;case 80:return Ee.yytext[0];case 81:return 6}},"anonymous"),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[37,38,39,40,41,77,78],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[28,29],inclusive:!1},block:{rules:[23,24,25,26,27,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,34,35,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,79,80,81],inclusive:!0}}};return fe}();J.lexer=ae;function se(){this.yy={}}return l(se,"Parser"),_(se,"Parser"),se.prototype=J,J.Parser=se,new se}();Fj.parser=Fj;var $Kt=Fj,MKt=(qy=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=Na,this.getAccTitle=za,this.setAccDescription=Ha,this.getAccDescription=Wa,this.setDiagramTitle=Va,this.getDiagramTitle=Ia,this.getConfig=_(()=>ft().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}addEntity(e,r=""){var n,a;return this.entities.has(e)?!((a=this.entities.get(e))!=null&&a.alias)&&r&&(this.entities.get(e).alias=r,Le.info(`Add alias '${r}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:r,shape:"erBox",look:(n=ft().look)!=null?n:"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),Le.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,r){const n=this.addEntity(e);let a;for(a=r.length-1;a>=0;a--)r[a].keys||(r[a].keys=[]),r[a].comment||(r[a].comment=""),n.attributes.push(r[a]),Le.debug("Added attribute ",r[a].name)}addRelationship(e,r,n,a){const i=this.entities.get(e),s=this.entities.get(n);if(!i||!s)return;const o={entityA:i.id,roleA:r,entityB:s.id,relSpec:a};this.relationships.push(o),Le.debug("Added new relationship :",o)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){var n,a;let r=[];for(const i of e){const s=this.classes.get(i);s!=null&&s.styles&&(r=[...r,...(n=s.styles)!=null?n:[]].map(o=>o.trim())),s!=null&&s.textStyles&&(r=[...r,...(a=s.textStyles)!=null?a:[]].map(o=>o.trim()))}return r}addCssStyles(e,r){for(const n of e){const a=this.entities.get(n);if(!r||!a)return;for(const i of r)a.cssStyles.push(i)}}addClass(e,r){e.forEach(n=>{let a=this.classes.get(n);a===void 0&&(a={id:n,styles:[],textStyles:[]},this.classes.set(n,a)),r&&r.forEach(function(i){if(/color/.exec(i)){const s=i.replace("fill","bgFill");a.textStyles.push(s)}a.styles.push(i)})})}setClass(e,r){for(const n of e){const a=this.entities.get(n);if(a)for(const i of r)a.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Ca()}getData(){const e=[],r=[],n=ft();let a=0;for(const s of this.entities.keys()){const o=this.entities.get(s);o&&(o.cssCompiledStyles=this.getCompiledStyles(o.cssClasses.split(" ")),o.colorIndex=a++,e.push(o))}let i=0;for(const s of this.relationships){const o={id:Bw(s.entityA,s.entityB,{prefix:"id",counter:i++}),type:"normal",curve:"basis",start:s.entityA,end:s.entityB,label:s.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:s.relSpec.cardB.toLowerCase(),arrowTypeEnd:s.relSpec.cardA.toLowerCase(),pattern:s.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:n.look,labelType:"markdown"};r.push(o)}return{nodes:e,edges:r,other:{},config:n,direction:"TB"}}},l(qy,"ErDB"),_(qy,"ErDB"),qy),e8e={};g8(e8e,{draw:l(()=>PKt,"draw")});var PKt=_(function(t,e,r,n){return nt(this,null,function*(){var g,m;Le.info("REF0:"),Le.info("Drawing er diagram (unified)",e);const{securityLevel:a,er:i,layout:s}=ft(),o=n.db.getData(),u=jT(e,a);o.type=n.type,o.layoutAlgorithm=k3(s),o.config.flowchart.nodeSpacing=(i==null?void 0:i.nodeSpacing)||140,o.config.flowchart.rankSpacing=(i==null?void 0:i.rankSpacing)||80,o.direction=n.db.getDirection();const{config:h}=o,{look:d}=h;d==="neo"?o.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=e,yield Uw(o,u),o.layoutAlgorithm==="elk"&&u.select(".edges").lower();const f=u.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){const y=Yt(this),b=y.attr("id").replace("-background",""),w=u.select(`#${CSS.escape(b)}`);if(!w.empty()){const x=w.attr("transform");y.attr("transform",x)}});const p=8;Wr.insertTitle(u,"erDiagramTitleText",(g=i==null?void 0:i.titleTopMargin)!=null?g:25,n.db.getDiagramTitle()),c1(u,p,"erDiagram",(m=i==null?void 0:i.useMaxWidth)!=null?m:!0)})},"draw"),t8e=_((t,e)=>{const r=yz,n=r(t,"r"),a=r(t,"g"),i=r(t,"b");return Ru(n,a,i,e)},"fade"),OL=new Set(["redux-color","redux-dark-color"]),RKt=_(t=>{const{theme:e,look:r,bkgColorArray:n,borderColorArray:a}=t;if(!OL.has(e))return"";const i=(n==null?void 0:n.length)>0;let s="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)s+=`
|
||
|
||
[data-look="${r}"][data-color-id="color-${o}"].node path {
|
||
stroke: ${a[o]};
|
||
${i?`fill: ${n[o]};`:""}
|
||
}
|
||
|
||
[data-look="${r}"][data-color-id="color-${o}"].node rect {
|
||
stroke: ${a[o]};
|
||
${i?`fill: ${n[o]};`:""}
|
||
}
|
||
`;return s},"genColor"),OKt=_(t=>{const{look:e,theme:r,erEdgeLabelBackground:n,strokeWidth:a}=t;return`
|
||
${RKt(t)}
|
||
.entityBox {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.nodeBorder};
|
||
}
|
||
|
||
.relationshipLabelBox {
|
||
fill: ${t.tertiaryColor};
|
||
opacity: 0.7;
|
||
background-color: ${t.tertiaryColor};
|
||
rect {
|
||
opacity: 0.5;
|
||
}
|
||
}
|
||
|
||
.labelBkg {
|
||
background-color: ${OL.has(r)&&n?n:t8e(t.tertiaryColor,.5)};
|
||
}
|
||
|
||
.edgeLabel {
|
||
background-color: ${OL.has(r)&&n?n:t.edgeLabelBackground};
|
||
}
|
||
.edgeLabel .label rect {
|
||
fill: ${OL.has(r)&&n?n:t.edgeLabelBackground};
|
||
}
|
||
.edgeLabel .label text {
|
||
fill: ${t.textColor};
|
||
}
|
||
|
||
.edgeLabel .label {
|
||
fill: ${t.nodeBorder};
|
||
font-size: 14px;
|
||
}
|
||
|
||
.label {
|
||
font-family: ${t.fontFamily};
|
||
color: ${t.nodeTextColor||t.textColor};
|
||
}
|
||
|
||
.edge-pattern-dashed {
|
||
stroke-dasharray: 8,8;
|
||
}
|
||
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon
|
||
{
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: ${e==="neo"?a:"1px"};
|
||
}
|
||
|
||
.relationshipLine {
|
||
stroke: ${t.lineColor};
|
||
stroke-width: ${e==="neo"?a:"1px"};
|
||
fill: none;
|
||
}
|
||
|
||
.marker {
|
||
fill: none !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
[data-look=neo].labelBkg {
|
||
background-color: ${t8e(t.tertiaryColor,.5)};
|
||
}
|
||
`},"getStyles"),DKt=OKt,FKt={parser:$Kt,get db(){return new MKt},renderer:e8e,styles:DKt},BKt=Object.freeze({__proto__:null,diagram:FKt}),Bj=(Yy=class{constructor(e){this.init=e,this.records=this.init()}reset(){this.records=this.init()}},l(Yy,"ImperativeState"),_(Yy,"ImperativeState"),Yy);function hl(t,e){var r,n,a;t.accDescr&&((r=e.setAccDescription)==null||r.call(e,t.accDescr)),t.accTitle&&((n=e.setAccTitle)==null||n.call(e,t.accTitle)),t.title&&((a=e.setDiagramTitle)==null||a.call(e,t.title))}l(hl,"populateCommonDb"),_(hl,"populateCommonDb");var zKt=Object.create,B5=Object.defineProperty,HKt=Object.getOwnPropertyDescriptor,zj=Object.getOwnPropertyNames,WKt=Object.getPrototypeOf,VKt=Object.prototype.hasOwnProperty,F=l((t,e)=>B5(t,"name",{value:e,configurable:!0}),"__name"),GKt=l((t,e)=>l(function(){return t&&(e=(0,t[zj(t)[0]])(t=0)),e},"__init"),"__esm"),sn=l((t,e)=>l(function(){return e||(0,t[zj(t)[0]])((e={exports:{}}).exports,e),e.exports},"__require"),"__commonJS"),Fp=l((t,e)=>{for(var r in e)B5(t,r,{get:e[r],enumerable:!0})},"__export"),Hj=l((t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of zj(e))!VKt.call(t,a)&&a!==r&&B5(t,a,{get:l(()=>e[a],"get"),enumerable:!(n=HKt(e,a))||n.enumerable});return t},"__copyProps"),DL=l((t,e,r)=>(Hj(t,e,"default"),r),"__reExport"),Wj=l((t,e,r)=>(r=t!=null?zKt(WKt(t)):{},Hj(B5(r,"default",{value:t,enumerable:!0}),t)),"__toESM"),Vj=l(t=>Hj(B5({},"__esModule",{value:!0}),t),"__toCommonJS"),FL={};Fp(FL,{AnnotatedTextEdit:l(()=>Pf,"AnnotatedTextEdit"),ChangeAnnotation:l(()=>h1,"ChangeAnnotation"),ChangeAnnotationIdentifier:l(()=>co,"ChangeAnnotationIdentifier"),CodeAction:l(()=>CK,"CodeAction"),CodeActionContext:l(()=>EK,"CodeActionContext"),CodeActionKind:l(()=>TK,"CodeActionKind"),CodeActionTriggerKind:l(()=>U5,"CodeActionTriggerKind"),CodeDescription:l(()=>Jj,"CodeDescription"),CodeLens:l(()=>SK,"CodeLens"),Color:l(()=>zL,"Color"),ColorInformation:l(()=>Uj,"ColorInformation"),ColorPresentation:l(()=>jj,"ColorPresentation"),Command:l(()=>u1,"Command"),CompletionItem:l(()=>uK,"CompletionItem"),CompletionItemKind:l(()=>aK,"CompletionItemKind"),CompletionItemLabelDetails:l(()=>cK,"CompletionItemLabelDetails"),CompletionItemTag:l(()=>sK,"CompletionItemTag"),CompletionList:l(()=>hK,"CompletionList"),CreateFile:l(()=>KT,"CreateFile"),DeleteFile:l(()=>ZT,"DeleteFile"),Diagnostic:l(()=>W5,"Diagnostic"),DiagnosticRelatedInformation:l(()=>HL,"DiagnosticRelatedInformation"),DiagnosticSeverity:l(()=>Zj,"DiagnosticSeverity"),DiagnosticTag:l(()=>Qj,"DiagnosticTag"),DocumentHighlight:l(()=>mK,"DocumentHighlight"),DocumentHighlightKind:l(()=>gK,"DocumentHighlightKind"),DocumentLink:l(()=>kK,"DocumentLink"),DocumentSymbol:l(()=>wK,"DocumentSymbol"),DocumentUri:l(()=>Gj,"DocumentUri"),EOL:l(()=>n8e,"EOL"),FoldingRange:l(()=>Xj,"FoldingRange"),FoldingRangeKind:l(()=>Kj,"FoldingRangeKind"),FormattingOptions:l(()=>_K,"FormattingOptions"),Hover:l(()=>dK,"Hover"),InlayHint:l(()=>OK,"InlayHint"),InlayHintKind:l(()=>GL,"InlayHintKind"),InlayHintLabelPart:l(()=>qL,"InlayHintLabelPart"),InlineCompletionContext:l(()=>WK,"InlineCompletionContext"),InlineCompletionItem:l(()=>FK,"InlineCompletionItem"),InlineCompletionList:l(()=>BK,"InlineCompletionList"),InlineCompletionTriggerKind:l(()=>zK,"InlineCompletionTriggerKind"),InlineValueContext:l(()=>RK,"InlineValueContext"),InlineValueEvaluatableExpression:l(()=>PK,"InlineValueEvaluatableExpression"),InlineValueText:l(()=>$K,"InlineValueText"),InlineValueVariableLookup:l(()=>MK,"InlineValueVariableLookup"),InsertReplaceEdit:l(()=>oK,"InsertReplaceEdit"),InsertTextFormat:l(()=>iK,"InsertTextFormat"),InsertTextMode:l(()=>lK,"InsertTextMode"),Location:l(()=>H5,"Location"),LocationLink:l(()=>Yj,"LocationLink"),MarkedString:l(()=>Y5,"MarkedString"),MarkupContent:l(()=>QT,"MarkupContent"),MarkupKind:l(()=>VL,"MarkupKind"),OptionalVersionedTextDocumentIdentifier:l(()=>q5,"OptionalVersionedTextDocumentIdentifier"),ParameterInformation:l(()=>fK,"ParameterInformation"),Position:l(()=>Jn,"Position"),Range:l(()=>Nn,"Range"),RenameFile:l(()=>XT,"RenameFile"),SelectedCompletionInfo:l(()=>HK,"SelectedCompletionInfo"),SelectionRange:l(()=>AK,"SelectionRange"),SemanticTokenModifiers:l(()=>IK,"SemanticTokenModifiers"),SemanticTokenTypes:l(()=>NK,"SemanticTokenTypes"),SemanticTokens:l(()=>LK,"SemanticTokens"),SignatureInformation:l(()=>pK,"SignatureInformation"),StringValue:l(()=>DK,"StringValue"),SymbolInformation:l(()=>bK,"SymbolInformation"),SymbolKind:l(()=>yK,"SymbolKind"),SymbolTag:l(()=>vK,"SymbolTag"),TextDocument:l(()=>GK,"TextDocument"),TextDocumentEdit:l(()=>V5,"TextDocumentEdit"),TextDocumentIdentifier:l(()=>tK,"TextDocumentIdentifier"),TextDocumentItem:l(()=>nK,"TextDocumentItem"),TextEdit:l(()=>dd,"TextEdit"),URI:l(()=>BL,"URI"),VersionedTextDocumentIdentifier:l(()=>rK,"VersionedTextDocumentIdentifier"),WorkspaceChange:l(()=>r8e,"WorkspaceChange"),WorkspaceEdit:l(()=>WL,"WorkspaceEdit"),WorkspaceFolder:l(()=>VK,"WorkspaceFolder"),WorkspaceSymbol:l(()=>xK,"WorkspaceSymbol"),integer:l(()=>qj,"integer"),uinteger:l(()=>z5,"uinteger")});var Gj,BL,qj,z5,Jn,Nn,H5,Yj,zL,Uj,jj,Kj,Xj,HL,Zj,Qj,Jj,W5,u1,dd,h1,co,Pf,V5,KT,XT,ZT,WL,G5,eK,r8e,tK,rK,q5,nK,VL,QT,aK,iK,sK,oK,lK,cK,uK,hK,Y5,dK,fK,pK,gK,mK,yK,vK,bK,xK,wK,TK,U5,EK,CK,SK,_K,kK,AK,NK,IK,LK,$K,MK,PK,RK,GL,qL,OK,DK,FK,BK,zK,HK,WK,VK,n8e,GK,a8e,Ft,j5=GKt({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(s){return typeof s=="string"}l(i,"is"),F(i,"is"),a.is=i})(Gj||(Gj={})),function(a){function i(s){return typeof s=="string"}l(i,"is"),F(i,"is"),a.is=i}(BL||(BL={})),function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(s){return typeof s=="number"&&a.MIN_VALUE<=s&&s<=a.MAX_VALUE}l(i,"is"),F(i,"is"),a.is=i}(qj||(qj={})),function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(s){return typeof s=="number"&&a.MIN_VALUE<=s&&s<=a.MAX_VALUE}l(i,"is"),F(i,"is"),a.is=i}(z5||(z5={})),function(a){function i(o,u){return o===Number.MAX_VALUE&&(o=z5.MAX_VALUE),u===Number.MAX_VALUE&&(u=z5.MAX_VALUE),{line:o,character:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.objectLiteral(u)&&Ft.uinteger(u.line)&&Ft.uinteger(u.character)}l(s,"is"),F(s,"is"),a.is=s}(Jn||(Jn={})),function(a){function i(o,u,h,d){if(Ft.uinteger(o)&&Ft.uinteger(u)&&Ft.uinteger(h)&&Ft.uinteger(d))return{start:Jn.create(o,u),end:Jn.create(h,d)};if(Jn.is(o)&&Jn.is(u))return{start:o,end:u};throw new Error(`Range#create called with invalid arguments[${o}, ${u}, ${h}, ${d}]`)}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.objectLiteral(u)&&Jn.is(u.start)&&Jn.is(u.end)}l(s,"is"),F(s,"is"),a.is=s}(Nn||(Nn={})),function(a){function i(o,u){return{uri:o,range:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.objectLiteral(u)&&Nn.is(u.range)&&(Ft.string(u.uri)||Ft.undefined(u.uri))}l(s,"is"),F(s,"is"),a.is=s}(H5||(H5={})),function(a){function i(o,u,h,d){return{targetUri:o,targetRange:u,targetSelectionRange:h,originSelectionRange:d}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.objectLiteral(u)&&Nn.is(u.targetRange)&&Ft.string(u.targetUri)&&Nn.is(u.targetSelectionRange)&&(Nn.is(u.originSelectionRange)||Ft.undefined(u.originSelectionRange))}l(s,"is"),F(s,"is"),a.is=s}(Yj||(Yj={})),function(a){function i(o,u,h,d){return{red:o,green:u,blue:h,alpha:d}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return Ft.objectLiteral(u)&&Ft.numberRange(u.red,0,1)&&Ft.numberRange(u.green,0,1)&&Ft.numberRange(u.blue,0,1)&&Ft.numberRange(u.alpha,0,1)}l(s,"is"),F(s,"is"),a.is=s}(zL||(zL={})),function(a){function i(o,u){return{range:o,color:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return Ft.objectLiteral(u)&&Nn.is(u.range)&&zL.is(u.color)}l(s,"is"),F(s,"is"),a.is=s}(Uj||(Uj={})),function(a){function i(o,u,h){return{label:o,textEdit:u,additionalTextEdits:h}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return Ft.objectLiteral(u)&&Ft.string(u.label)&&(Ft.undefined(u.textEdit)||dd.is(u))&&(Ft.undefined(u.additionalTextEdits)||Ft.typedArray(u.additionalTextEdits,dd.is))}l(s,"is"),F(s,"is"),a.is=s}(jj||(jj={})),function(a){a.Comment="comment",a.Imports="imports",a.Region="region"}(Kj||(Kj={})),function(a){function i(o,u,h,d,f,p){const g={startLine:o,endLine:u};return Ft.defined(h)&&(g.startCharacter=h),Ft.defined(d)&&(g.endCharacter=d),Ft.defined(f)&&(g.kind=f),Ft.defined(p)&&(g.collapsedText=p),g}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return Ft.objectLiteral(u)&&Ft.uinteger(u.startLine)&&Ft.uinteger(u.startLine)&&(Ft.undefined(u.startCharacter)||Ft.uinteger(u.startCharacter))&&(Ft.undefined(u.endCharacter)||Ft.uinteger(u.endCharacter))&&(Ft.undefined(u.kind)||Ft.string(u.kind))}l(s,"is"),F(s,"is"),a.is=s}(Xj||(Xj={})),function(a){function i(o,u){return{location:o,message:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&H5.is(u.location)&&Ft.string(u.message)}l(s,"is"),F(s,"is"),a.is=s}(HL||(HL={})),function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4}(Zj||(Zj={})),function(a){a.Unnecessary=1,a.Deprecated=2}(Qj||(Qj={})),function(a){function i(s){const o=s;return Ft.objectLiteral(o)&&Ft.string(o.href)}l(i,"is"),F(i,"is"),a.is=i}(Jj||(Jj={})),function(a){function i(o,u,h,d,f,p){let g={range:o,message:u};return Ft.defined(h)&&(g.severity=h),Ft.defined(d)&&(g.code=d),Ft.defined(f)&&(g.source=f),Ft.defined(p)&&(g.relatedInformation=p),g}l(i,"create"),F(i,"create"),a.create=i;function s(o){var u;let h=o;return Ft.defined(h)&&Nn.is(h.range)&&Ft.string(h.message)&&(Ft.number(h.severity)||Ft.undefined(h.severity))&&(Ft.integer(h.code)||Ft.string(h.code)||Ft.undefined(h.code))&&(Ft.undefined(h.codeDescription)||Ft.string((u=h.codeDescription)===null||u===void 0?void 0:u.href))&&(Ft.string(h.source)||Ft.undefined(h.source))&&(Ft.undefined(h.relatedInformation)||Ft.typedArray(h.relatedInformation,HL.is))}l(s,"is"),F(s,"is"),a.is=s}(W5||(W5={})),function(a){function i(o,u,...h){let d={title:o,command:u};return Ft.defined(h)&&h.length>0&&(d.arguments=h),d}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Ft.string(u.title)&&Ft.string(u.command)}l(s,"is"),F(s,"is"),a.is=s}(u1||(u1={})),function(a){function i(h,d){return{range:h,newText:d}}l(i,"replace"),F(i,"replace"),a.replace=i;function s(h,d){return{range:{start:h,end:h},newText:d}}l(s,"insert"),F(s,"insert"),a.insert=s;function o(h){return{range:h,newText:""}}l(o,"del"),F(o,"del"),a.del=o;function u(h){const d=h;return Ft.objectLiteral(d)&&Ft.string(d.newText)&&Nn.is(d.range)}l(u,"is"),F(u,"is"),a.is=u}(dd||(dd={})),function(a){function i(o,u,h){const d={label:o};return u!==void 0&&(d.needsConfirmation=u),h!==void 0&&(d.description=h),d}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return Ft.objectLiteral(u)&&Ft.string(u.label)&&(Ft.boolean(u.needsConfirmation)||u.needsConfirmation===void 0)&&(Ft.string(u.description)||u.description===void 0)}l(s,"is"),F(s,"is"),a.is=s}(h1||(h1={})),function(a){function i(s){const o=s;return Ft.string(o)}l(i,"is"),F(i,"is"),a.is=i}(co||(co={})),function(a){function i(h,d,f){return{range:h,newText:d,annotationId:f}}l(i,"replace"),F(i,"replace"),a.replace=i;function s(h,d,f){return{range:{start:h,end:h},newText:d,annotationId:f}}l(s,"insert"),F(s,"insert"),a.insert=s;function o(h,d){return{range:h,newText:"",annotationId:d}}l(o,"del"),F(o,"del"),a.del=o;function u(h){const d=h;return dd.is(d)&&(h1.is(d.annotationId)||co.is(d.annotationId))}l(u,"is"),F(u,"is"),a.is=u}(Pf||(Pf={})),function(a){function i(o,u){return{textDocument:o,edits:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&q5.is(u.textDocument)&&Array.isArray(u.edits)}l(s,"is"),F(s,"is"),a.is=s}(V5||(V5={})),function(a){function i(o,u,h){let d={kind:"create",uri:o};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(d.options=u),h!==void 0&&(d.annotationId=h),d}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return u&&u.kind==="create"&&Ft.string(u.uri)&&(u.options===void 0||(u.options.overwrite===void 0||Ft.boolean(u.options.overwrite))&&(u.options.ignoreIfExists===void 0||Ft.boolean(u.options.ignoreIfExists)))&&(u.annotationId===void 0||co.is(u.annotationId))}l(s,"is"),F(s,"is"),a.is=s}(KT||(KT={})),function(a){function i(o,u,h,d){let f={kind:"rename",oldUri:o,newUri:u};return h!==void 0&&(h.overwrite!==void 0||h.ignoreIfExists!==void 0)&&(f.options=h),d!==void 0&&(f.annotationId=d),f}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return u&&u.kind==="rename"&&Ft.string(u.oldUri)&&Ft.string(u.newUri)&&(u.options===void 0||(u.options.overwrite===void 0||Ft.boolean(u.options.overwrite))&&(u.options.ignoreIfExists===void 0||Ft.boolean(u.options.ignoreIfExists)))&&(u.annotationId===void 0||co.is(u.annotationId))}l(s,"is"),F(s,"is"),a.is=s}(XT||(XT={})),function(a){function i(o,u,h){let d={kind:"delete",uri:o};return u!==void 0&&(u.recursive!==void 0||u.ignoreIfNotExists!==void 0)&&(d.options=u),h!==void 0&&(d.annotationId=h),d}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return u&&u.kind==="delete"&&Ft.string(u.uri)&&(u.options===void 0||(u.options.recursive===void 0||Ft.boolean(u.options.recursive))&&(u.options.ignoreIfNotExists===void 0||Ft.boolean(u.options.ignoreIfNotExists)))&&(u.annotationId===void 0||co.is(u.annotationId))}l(s,"is"),F(s,"is"),a.is=s}(ZT||(ZT={})),function(a){function i(s){let o=s;return o&&(o.changes!==void 0||o.documentChanges!==void 0)&&(o.documentChanges===void 0||o.documentChanges.every(u=>Ft.string(u.kind)?KT.is(u)||XT.is(u)||ZT.is(u):V5.is(u)))}l(i,"is"),F(i,"is"),a.is=i}(WL||(WL={})),G5=(t=class{constructor(i,s){this.edits=i,this.changeAnnotations=s}insert(i,s,o){let u,h;if(o===void 0?u=dd.insert(i,s):co.is(o)?(h=o,u=Pf.insert(i,s,o)):(this.assertChangeAnnotations(this.changeAnnotations),h=this.changeAnnotations.manage(o),u=Pf.insert(i,s,h)),this.edits.push(u),h!==void 0)return h}replace(i,s,o){let u,h;if(o===void 0?u=dd.replace(i,s):co.is(o)?(h=o,u=Pf.replace(i,s,o)):(this.assertChangeAnnotations(this.changeAnnotations),h=this.changeAnnotations.manage(o),u=Pf.replace(i,s,h)),this.edits.push(u),h!==void 0)return h}delete(i,s){let o,u;if(s===void 0?o=dd.del(i):co.is(s)?(u=s,o=Pf.del(i,s)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(s),o=Pf.del(i,u)),this.edits.push(o),u!==void 0)return u}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},l(t,"TextEditChangeImpl"),F(t,"TextEditChangeImpl"),t),eK=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,s){let o;if(co.is(i)?o=i:(o=this.nextId(),s=i),this._annotations[o]!==void 0)throw new Error(`Id ${o} is already in use.`);if(s===void 0)throw new Error(`No annotation provided for id ${o}`);return this._annotations[o]=s,this._size++,o}nextId(){return this._counter++,this._counter.toString()}},l(e,"ChangeAnnotations"),F(e,"ChangeAnnotations"),e),r8e=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new eK(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(s=>{if(V5.is(s)){const o=new G5(s.edits,this._changeAnnotations);this._textEditChanges[s.textDocument.uri]=o}})):i.changes&&Object.keys(i.changes).forEach(s=>{const o=new G5(i.changes[s]);this._textEditChanges[s]=o})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(q5.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const s={uri:i.uri,version:i.version};let o=this._textEditChanges[s.uri];if(!o){const u=[],h={textDocument:s,edits:u};this._workspaceEdit.documentChanges.push(h),o=new G5(u,this._changeAnnotations),this._textEditChanges[s.uri]=o}return o}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let s=this._textEditChanges[i];if(!s){let o=[];this._workspaceEdit.changes[i]=o,s=new G5(o),this._textEditChanges[i]=s}return s}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new eK,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,s,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;h1.is(s)||co.is(s)?u=s:o=s;let h,d;if(u===void 0?h=KT.create(i,o):(d=co.is(u)?u:this._changeAnnotations.manage(u),h=KT.create(i,o,d)),this._workspaceEdit.documentChanges.push(h),d!==void 0)return d}renameFile(i,s,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let h;h1.is(o)||co.is(o)?h=o:u=o;let d,f;if(h===void 0?d=XT.create(i,s,u):(f=co.is(h)?h:this._changeAnnotations.manage(h),d=XT.create(i,s,u,f)),this._workspaceEdit.documentChanges.push(d),f!==void 0)return f}deleteFile(i,s,o){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;h1.is(s)||co.is(s)?u=s:o=s;let h,d;if(u===void 0?h=ZT.create(i,o):(d=co.is(u)?u:this._changeAnnotations.manage(u),h=ZT.create(i,o,d)),this._workspaceEdit.documentChanges.push(h),d!==void 0)return d}},l(r,"WorkspaceChange"),F(r,"WorkspaceChange"),r),function(a){function i(o){return{uri:o}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Ft.string(u.uri)}l(s,"is"),F(s,"is"),a.is=s}(tK||(tK={})),function(a){function i(o,u){return{uri:o,version:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Ft.string(u.uri)&&Ft.integer(u.version)}l(s,"is"),F(s,"is"),a.is=s}(rK||(rK={})),function(a){function i(o,u){return{uri:o,version:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Ft.string(u.uri)&&(u.version===null||Ft.integer(u.version))}l(s,"is"),F(s,"is"),a.is=s}(q5||(q5={})),function(a){function i(o,u,h,d){return{uri:o,languageId:u,version:h,text:d}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Ft.string(u.uri)&&Ft.string(u.languageId)&&Ft.integer(u.version)&&Ft.string(u.text)}l(s,"is"),F(s,"is"),a.is=s}(nK||(nK={})),function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(s){const o=s;return o===a.PlainText||o===a.Markdown}l(i,"is"),F(i,"is"),a.is=i}(VL||(VL={})),function(a){function i(s){const o=s;return Ft.objectLiteral(s)&&VL.is(o.kind)&&Ft.string(o.value)}l(i,"is"),F(i,"is"),a.is=i}(QT||(QT={})),function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25}(aK||(aK={})),function(a){a.PlainText=1,a.Snippet=2}(iK||(iK={})),function(a){a.Deprecated=1}(sK||(sK={})),function(a){function i(o,u,h){return{newText:o,insert:u,replace:h}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return u&&Ft.string(u.newText)&&Nn.is(u.insert)&&Nn.is(u.replace)}l(s,"is"),F(s,"is"),a.is=s}(oK||(oK={})),function(a){a.asIs=1,a.adjustIndentation=2}(lK||(lK={})),function(a){function i(s){const o=s;return o&&(Ft.string(o.detail)||o.detail===void 0)&&(Ft.string(o.description)||o.description===void 0)}l(i,"is"),F(i,"is"),a.is=i}(cK||(cK={})),function(a){function i(s){return{label:s}}l(i,"create"),F(i,"create"),a.create=i}(uK||(uK={})),function(a){function i(s,o){return{items:s||[],isIncomplete:!!o}}l(i,"create"),F(i,"create"),a.create=i}(hK||(hK={})),function(a){function i(o){return o.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}l(i,"fromPlainText"),F(i,"fromPlainText"),a.fromPlainText=i;function s(o){const u=o;return Ft.string(u)||Ft.objectLiteral(u)&&Ft.string(u.language)&&Ft.string(u.value)}l(s,"is"),F(s,"is"),a.is=s}(Y5||(Y5={})),function(a){function i(s){let o=s;return!!o&&Ft.objectLiteral(o)&&(QT.is(o.contents)||Y5.is(o.contents)||Ft.typedArray(o.contents,Y5.is))&&(s.range===void 0||Nn.is(s.range))}l(i,"is"),F(i,"is"),a.is=i}(dK||(dK={})),function(a){function i(s,o){return o?{label:s,documentation:o}:{label:s}}l(i,"create"),F(i,"create"),a.create=i}(fK||(fK={})),function(a){function i(s,o,...u){let h={label:s};return Ft.defined(o)&&(h.documentation=o),Ft.defined(u)?h.parameters=u:h.parameters=[],h}l(i,"create"),F(i,"create"),a.create=i}(pK||(pK={})),function(a){a.Text=1,a.Read=2,a.Write=3}(gK||(gK={})),function(a){function i(s,o){let u={range:s};return Ft.number(o)&&(u.kind=o),u}l(i,"create"),F(i,"create"),a.create=i}(mK||(mK={})),function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26}(yK||(yK={})),function(a){a.Deprecated=1}(vK||(vK={})),function(a){function i(s,o,u,h,d){let f={name:s,kind:o,location:{uri:h,range:u}};return d&&(f.containerName=d),f}l(i,"create"),F(i,"create"),a.create=i}(bK||(bK={})),function(a){function i(s,o,u,h){return h!==void 0?{name:s,kind:o,location:{uri:u,range:h}}:{name:s,kind:o,location:{uri:u}}}l(i,"create"),F(i,"create"),a.create=i}(xK||(xK={})),function(a){function i(o,u,h,d,f,p){let g={name:o,detail:u,kind:h,range:d,selectionRange:f};return p!==void 0&&(g.children=p),g}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return u&&Ft.string(u.name)&&Ft.number(u.kind)&&Nn.is(u.range)&&Nn.is(u.selectionRange)&&(u.detail===void 0||Ft.string(u.detail))&&(u.deprecated===void 0||Ft.boolean(u.deprecated))&&(u.children===void 0||Array.isArray(u.children))&&(u.tags===void 0||Array.isArray(u.tags))}l(s,"is"),F(s,"is"),a.is=s}(wK||(wK={})),function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"}(TK||(TK={})),function(a){a.Invoked=1,a.Automatic=2}(U5||(U5={})),function(a){function i(o,u,h){let d={diagnostics:o};return u!=null&&(d.only=u),h!=null&&(d.triggerKind=h),d}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Ft.typedArray(u.diagnostics,W5.is)&&(u.only===void 0||Ft.typedArray(u.only,Ft.string))&&(u.triggerKind===void 0||u.triggerKind===U5.Invoked||u.triggerKind===U5.Automatic)}l(s,"is"),F(s,"is"),a.is=s}(EK||(EK={})),function(a){function i(o,u,h){let d={title:o},f=!0;return typeof u=="string"?(f=!1,d.kind=u):u1.is(u)?d.command=u:d.edit=u,f&&h!==void 0&&(d.kind=h),d}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return u&&Ft.string(u.title)&&(u.diagnostics===void 0||Ft.typedArray(u.diagnostics,W5.is))&&(u.kind===void 0||Ft.string(u.kind))&&(u.edit!==void 0||u.command!==void 0)&&(u.command===void 0||u1.is(u.command))&&(u.isPreferred===void 0||Ft.boolean(u.isPreferred))&&(u.edit===void 0||WL.is(u.edit))}l(s,"is"),F(s,"is"),a.is=s}(CK||(CK={})),function(a){function i(o,u){let h={range:o};return Ft.defined(u)&&(h.data=u),h}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Nn.is(u.range)&&(Ft.undefined(u.command)||u1.is(u.command))}l(s,"is"),F(s,"is"),a.is=s}(SK||(SK={})),function(a){function i(o,u){return{tabSize:o,insertSpaces:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Ft.uinteger(u.tabSize)&&Ft.boolean(u.insertSpaces)}l(s,"is"),F(s,"is"),a.is=s}(_K||(_K={})),function(a){function i(o,u,h){return{range:o,target:u,data:h}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.defined(u)&&Nn.is(u.range)&&(Ft.undefined(u.target)||Ft.string(u.target))}l(s,"is"),F(s,"is"),a.is=s}(kK||(kK={})),function(a){function i(o,u){return{range:o,parent:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){let u=o;return Ft.objectLiteral(u)&&Nn.is(u.range)&&(u.parent===void 0||a.is(u.parent))}l(s,"is"),F(s,"is"),a.is=s}(AK||(AK={})),function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"}(NK||(NK={})),function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"}(IK||(IK={})),function(a){function i(s){const o=s;return Ft.objectLiteral(o)&&(o.resultId===void 0||typeof o.resultId=="string")&&Array.isArray(o.data)&&(o.data.length===0||typeof o.data[0]=="number")}l(i,"is"),F(i,"is"),a.is=i}(LK||(LK={})),function(a){function i(o,u){return{range:o,text:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return u!=null&&Nn.is(u.range)&&Ft.string(u.text)}l(s,"is"),F(s,"is"),a.is=s}($K||($K={})),function(a){function i(o,u,h){return{range:o,variableName:u,caseSensitiveLookup:h}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return u!=null&&Nn.is(u.range)&&Ft.boolean(u.caseSensitiveLookup)&&(Ft.string(u.variableName)||u.variableName===void 0)}l(s,"is"),F(s,"is"),a.is=s}(MK||(MK={})),function(a){function i(o,u){return{range:o,expression:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return u!=null&&Nn.is(u.range)&&(Ft.string(u.expression)||u.expression===void 0)}l(s,"is"),F(s,"is"),a.is=s}(PK||(PK={})),function(a){function i(o,u){return{frameId:o,stoppedLocation:u}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return Ft.defined(u)&&Nn.is(o.stoppedLocation)}l(s,"is"),F(s,"is"),a.is=s}(RK||(RK={})),function(a){a.Type=1,a.Parameter=2;function i(s){return s===1||s===2}l(i,"is"),F(i,"is"),a.is=i}(GL||(GL={})),function(a){function i(o){return{value:o}}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return Ft.objectLiteral(u)&&(u.tooltip===void 0||Ft.string(u.tooltip)||QT.is(u.tooltip))&&(u.location===void 0||H5.is(u.location))&&(u.command===void 0||u1.is(u.command))}l(s,"is"),F(s,"is"),a.is=s}(qL||(qL={})),function(a){function i(o,u,h){const d={position:o,label:u};return h!==void 0&&(d.kind=h),d}l(i,"create"),F(i,"create"),a.create=i;function s(o){const u=o;return Ft.objectLiteral(u)&&Jn.is(u.position)&&(Ft.string(u.label)||Ft.typedArray(u.label,qL.is))&&(u.kind===void 0||GL.is(u.kind))&&u.textEdits===void 0||Ft.typedArray(u.textEdits,dd.is)&&(u.tooltip===void 0||Ft.string(u.tooltip)||QT.is(u.tooltip))&&(u.paddingLeft===void 0||Ft.boolean(u.paddingLeft))&&(u.paddingRight===void 0||Ft.boolean(u.paddingRight))}l(s,"is"),F(s,"is"),a.is=s}(OK||(OK={})),function(a){function i(s){return{kind:"snippet",value:s}}l(i,"createSnippet"),F(i,"createSnippet"),a.createSnippet=i}(DK||(DK={})),function(a){function i(s,o,u,h){return{insertText:s,filterText:o,range:u,command:h}}l(i,"create"),F(i,"create"),a.create=i}(FK||(FK={})),function(a){function i(s){return{items:s}}l(i,"create"),F(i,"create"),a.create=i}(BK||(BK={})),function(a){a.Invoked=0,a.Automatic=1}(zK||(zK={})),function(a){function i(s,o){return{range:s,text:o}}l(i,"create"),F(i,"create"),a.create=i}(HK||(HK={})),function(a){function i(s,o){return{triggerKind:s,selectedCompletionInfo:o}}l(i,"create"),F(i,"create"),a.create=i}(WK||(WK={})),function(a){function i(s){const o=s;return Ft.objectLiteral(o)&&BL.is(o.uri)&&Ft.string(o.name)}l(i,"is"),F(i,"is"),a.is=i}(VK||(VK={})),n8e=[`
|
||
`,`\r
|
||
`,"\r"],function(a){function i(h,d,f,p){return new a8e(h,d,f,p)}l(i,"create"),F(i,"create"),a.create=i;function s(h){let d=h;return!!(Ft.defined(d)&&Ft.string(d.uri)&&(Ft.undefined(d.languageId)||Ft.string(d.languageId))&&Ft.uinteger(d.lineCount)&&Ft.func(d.getText)&&Ft.func(d.positionAt)&&Ft.func(d.offsetAt))}l(s,"is"),F(s,"is"),a.is=s;function o(h,d){let f=h.getText(),p=u(d,(m,y)=>{let v=m.range.start.line-y.range.start.line;return v===0?m.range.start.character-y.range.start.character:v}),g=f.length;for(let m=p.length-1;m>=0;m--){let y=p[m],v=h.offsetAt(y.range.start),b=h.offsetAt(y.range.end);if(b<=g)f=f.substring(0,v)+y.newText+f.substring(b,f.length);else throw new Error("Overlapping edit");g=v}return f}l(o,"applyEdits"),F(o,"applyEdits"),a.applyEdits=o;function u(h,d){if(h.length<=1)return h;const f=h.length/2|0,p=h.slice(0,f),g=h.slice(f);u(p,d),u(g,d);let m=0,y=0,v=0;for(;m<p.length&&y<g.length;)d(p[m],g[y])<=0?h[v++]=p[m++]:h[v++]=g[y++];for(;m<p.length;)h[v++]=p[m++];for(;y<g.length;)h[v++]=g[y++];return h}l(u,"mergeSort2"),F(u,"mergeSort")}(GK||(GK={})),a8e=(n=class{constructor(i,s,o,u){this._uri=i,this._languageId=s,this._version=o,this._content=u,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(i){if(i){let s=this.offsetAt(i.start),o=this.offsetAt(i.end);return this._content.substring(s,o)}return this._content}update(i,s){this._content=i.text,this._version=s,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let i=[],s=this._content,o=!0;for(let u=0;u<s.length;u++){o&&(i.push(u),o=!1);let h=s.charAt(u);o=h==="\r"||h===`
|
||
`,h==="\r"&&u+1<s.length&&s.charAt(u+1)===`
|
||
`&&u++}o&&s.length>0&&i.push(s.length),this._lineOffsets=i}return this._lineOffsets}positionAt(i){i=Math.max(Math.min(i,this._content.length),0);let s=this.getLineOffsets(),o=0,u=s.length;if(u===0)return Jn.create(0,i);for(;o<u;){let d=Math.floor((o+u)/2);s[d]>i?u=d:o=d+1}let h=o-1;return Jn.create(h,i-s[h])}offsetAt(i){let s=this.getLineOffsets();if(i.line>=s.length)return this._content.length;if(i.line<0)return 0;let o=s[i.line],u=i.line+1<s.length?s[i.line+1]:this._content.length;return Math.max(Math.min(o+i.character,u),o)}get lineCount(){return this.getLineOffsets().length}},l(n,"FullTextDocument"),F(n,"FullTextDocument"),n),function(a){const i=Object.prototype.toString;function s(b){return typeof b!="undefined"}l(s,"defined"),F(s,"defined"),a.defined=s;function o(b){return typeof b=="undefined"}l(o,"undefined2"),F(o,"undefined"),a.undefined=o;function u(b){return b===!0||b===!1}l(u,"boolean"),F(u,"boolean"),a.boolean=u;function h(b){return i.call(b)==="[object String]"}l(h,"string"),F(h,"string"),a.string=h;function d(b){return i.call(b)==="[object Number]"}l(d,"number"),F(d,"number"),a.number=d;function f(b,w,x){return i.call(b)==="[object Number]"&&w<=b&&b<=x}l(f,"numberRange"),F(f,"numberRange"),a.numberRange=f;function p(b){return i.call(b)==="[object Number]"&&-2147483648<=b&&b<=2147483647}l(p,"integer2"),F(p,"integer"),a.integer=p;function g(b){return i.call(b)==="[object Number]"&&0<=b&&b<=2147483647}l(g,"uinteger2"),F(g,"uinteger"),a.uinteger=g;function m(b){return i.call(b)==="[object Function]"}l(m,"func"),F(m,"func"),a.func=m;function y(b){return b!==null&&typeof b=="object"}l(y,"objectLiteral"),F(y,"objectLiteral"),a.objectLiteral=y;function v(b,w){return Array.isArray(b)&&b.every(w)}l(v,"typedArray"),F(v,"typedArray"),a.typedArray=v}(Ft||(Ft={}))}}),d1=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(t){Object.defineProperty(t,"__esModule",{value:!0});var e;function r(){if(e===void 0)throw new Error("No runtime abstraction layer installed");return e}l(r,"RAL"),F(r,"RAL"),function(n){function a(i){if(i===void 0)throw new Error("No runtime abstraction layer provided");e=i}l(a,"install"),F(a,"install"),n.install=a}(r||(r={})),t.default=r}}),K5=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function e(u){return u===!0||u===!1}l(e,"boolean"),F(e,"boolean"),t.boolean=e;function r(u){return typeof u=="string"||u instanceof String}l(r,"string"),F(r,"string"),t.string=r;function n(u){return typeof u=="number"||u instanceof Number}l(n,"number"),F(n,"number"),t.number=n;function a(u){return u instanceof Error}l(a,"error"),F(a,"error"),t.error=a;function i(u){return typeof u=="function"}l(i,"func"),F(i,"func"),t.func=i;function s(u){return Array.isArray(u)}l(s,"array"),F(s,"array"),t.array=s;function o(u){return s(u)&&u.every(h=>r(h))}l(o,"stringArray"),F(o,"stringArray"),t.stringArray=o}}),JT=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(t){var i,s;Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var e=d1(),r;(function(o){const u={dispose(){}};o.None=function(){return u}})(r||(t.Event=r={}));var n=(i=class{add(u,h=null,d){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(u),this._contexts.push(h),Array.isArray(d)&&d.push({dispose:F(()=>this.remove(u,h),"dispose")})}remove(u,h=null){if(!this._callbacks)return;let d=!1;for(let f=0,p=this._callbacks.length;f<p;f++)if(this._callbacks[f]===u)if(this._contexts[f]===h){this._callbacks.splice(f,1),this._contexts.splice(f,1);return}else d=!0;if(d)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...u){if(!this._callbacks)return[];const h=[],d=this._callbacks.slice(0),f=this._contexts.slice(0);for(let p=0,g=d.length;p<g;p++)try{h.push(d[p].apply(f[p],u))}catch(m){(0,e.default)().console.error(m)}return h}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},l(i,"CallbackList"),F(i,"CallbackList"),i),a=(s=class{constructor(u){this._options=u}get event(){return this._event||(this._event=(u,h,d)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(u,h);const f={dispose:F(()=>{this._callbacks&&(this._callbacks.remove(u,h),f.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(d)&&d.push(f),f}),this._event}fire(u){this._callbacks&&this._callbacks.invoke.call(this._callbacks,u)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}},l(s,"_Emitter"),F(s,"Emitter"),s);t.Emitter=a,a._noop=function(){}}}),YL=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(t){var u,h;Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e=d1(),r=K5(),n=JT(),a;(function(d){d.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),d.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function f(p){const g=p;return g&&(g===d.None||g===d.Cancelled||r.boolean(g.isCancellationRequested)&&!!g.onCancellationRequested)}l(f,"is"),F(f,"is"),d.is=f})(a||(t.CancellationToken=a={}));var i=Object.freeze(function(d,f){const p=(0,e.default)().timer.setTimeout(d.bind(f),0);return{dispose(){p.dispose()}}}),s=(u=class{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},l(u,"MutableToken"),F(u,"MutableToken"),u),o=(h=class{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=a.None}},l(h,"CancellationTokenSource3"),F(h,"CancellationTokenSource"),h);t.CancellationTokenSource=o}}),i8e=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(t){var O,M,P,z,D,B,W,U,j,V,Y,H,q,Z,K,re,Q,te,ee,J,ae,se,fe,ve,de;Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;var e=K5(),r;(function(Ee){Ee.ParseError=-32700,Ee.InvalidRequest=-32600,Ee.MethodNotFound=-32601,Ee.InvalidParams=-32602,Ee.InternalError=-32603,Ee.jsonrpcReservedErrorRangeStart=-32099,Ee.serverErrorStart=-32099,Ee.MessageWriteError=-32099,Ee.MessageReadError=-32098,Ee.PendingResponseRejected=-32097,Ee.ConnectionInactive=-32096,Ee.ServerNotInitialized=-32002,Ee.UnknownErrorCode=-32001,Ee.jsonrpcReservedErrorRangeEnd=-32e3,Ee.serverErrorEnd=-32e3})(r||(t.ErrorCodes=r={}));var n=(O=class extends Error{constructor(Ce,De,ce){super(De),this.code=e.number(Ce)?Ce:r.UnknownErrorCode,this.data=ce,Object.setPrototypeOf(this,O.prototype)}toJson(){const Ce={code:this.code,message:this.message};return this.data!==void 0&&(Ce.data=this.data),Ce}},l(O,"_ResponseError"),F(O,"ResponseError"),O);t.ResponseError=n;var a=(M=class{constructor(Ce){this.kind=Ce}static is(Ce){return Ce===M.auto||Ce===M.byName||Ce===M.byPosition}toString(){return this.kind}},l(M,"_ParameterStructures"),F(M,"ParameterStructures"),M);t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var i=(P=class{constructor(Ce,De){this.method=Ce,this.numberOfParams=De}get parameterStructures(){return a.auto}},l(P,"AbstractMessageSignature"),F(P,"AbstractMessageSignature"),P);t.AbstractMessageSignature=i;var s=(z=class extends i{constructor(Ce){super(Ce,0)}},l(z,"RequestType0"),F(z,"RequestType0"),z);t.RequestType0=s;var o=(D=class extends i{constructor(Ce,De=a.auto){super(Ce,1),this._parameterStructures=De}get parameterStructures(){return this._parameterStructures}},l(D,"RequestType"),F(D,"RequestType"),D);t.RequestType=o;var u=(B=class extends i{constructor(Ce,De=a.auto){super(Ce,1),this._parameterStructures=De}get parameterStructures(){return this._parameterStructures}},l(B,"RequestType1"),F(B,"RequestType1"),B);t.RequestType1=u;var h=(W=class extends i{constructor(Ce){super(Ce,2)}},l(W,"RequestType2"),F(W,"RequestType2"),W);t.RequestType2=h;var d=(U=class extends i{constructor(Ce){super(Ce,3)}},l(U,"RequestType3"),F(U,"RequestType3"),U);t.RequestType3=d;var f=(j=class extends i{constructor(Ce){super(Ce,4)}},l(j,"RequestType4"),F(j,"RequestType4"),j);t.RequestType4=f;var p=(V=class extends i{constructor(Ce){super(Ce,5)}},l(V,"RequestType5"),F(V,"RequestType5"),V);t.RequestType5=p;var g=(Y=class extends i{constructor(Ce){super(Ce,6)}},l(Y,"RequestType6"),F(Y,"RequestType6"),Y);t.RequestType6=g;var m=(H=class extends i{constructor(Ce){super(Ce,7)}},l(H,"RequestType7"),F(H,"RequestType7"),H);t.RequestType7=m;var y=(q=class extends i{constructor(Ce){super(Ce,8)}},l(q,"RequestType8"),F(q,"RequestType8"),q);t.RequestType8=y;var v=(Z=class extends i{constructor(Ce){super(Ce,9)}},l(Z,"RequestType9"),F(Z,"RequestType9"),Z);t.RequestType9=v;var b=(K=class extends i{constructor(Ce,De=a.auto){super(Ce,1),this._parameterStructures=De}get parameterStructures(){return this._parameterStructures}},l(K,"NotificationType"),F(K,"NotificationType"),K);t.NotificationType=b;var w=(re=class extends i{constructor(Ce){super(Ce,0)}},l(re,"NotificationType0"),F(re,"NotificationType0"),re);t.NotificationType0=w;var x=(Q=class extends i{constructor(Ce,De=a.auto){super(Ce,1),this._parameterStructures=De}get parameterStructures(){return this._parameterStructures}},l(Q,"NotificationType1"),F(Q,"NotificationType1"),Q);t.NotificationType1=x;var T=(te=class extends i{constructor(Ce){super(Ce,2)}},l(te,"NotificationType2"),F(te,"NotificationType2"),te);t.NotificationType2=T;var C=(ee=class extends i{constructor(Ce){super(Ce,3)}},l(ee,"NotificationType3"),F(ee,"NotificationType3"),ee);t.NotificationType3=C;var S=(J=class extends i{constructor(Ce){super(Ce,4)}},l(J,"NotificationType4"),F(J,"NotificationType4"),J);t.NotificationType4=S;var E=(ae=class extends i{constructor(Ce){super(Ce,5)}},l(ae,"NotificationType5"),F(ae,"NotificationType5"),ae);t.NotificationType5=E;var k=(se=class extends i{constructor(Ce){super(Ce,6)}},l(se,"NotificationType6"),F(se,"NotificationType6"),se);t.NotificationType6=k;var A=(fe=class extends i{constructor(Ce){super(Ce,7)}},l(fe,"NotificationType7"),F(fe,"NotificationType7"),fe);t.NotificationType7=A;var I=(ve=class extends i{constructor(Ce){super(Ce,8)}},l(ve,"NotificationType8"),F(ve,"NotificationType8"),ve);t.NotificationType8=I;var L=(de=class extends i{constructor(Ce){super(Ce,9)}},l(de,"NotificationType9"),F(de,"NotificationType9"),de);t.NotificationType9=L;var R;(function(Ee){function Ce(Ie){const ye=Ie;return ye&&e.string(ye.method)&&(e.string(ye.id)||e.number(ye.id))}l(Ce,"isRequest"),F(Ce,"isRequest"),Ee.isRequest=Ce;function De(Ie){const ye=Ie;return ye&&e.string(ye.method)&&Ie.id===void 0}l(De,"isNotification"),F(De,"isNotification"),Ee.isNotification=De;function ce(Ie){const ye=Ie;return ye&&(ye.result!==void 0||!!ye.error)&&(e.string(ye.id)||e.number(ye.id)||ye.id===null)}l(ce,"isResponse"),F(ce,"isResponse"),Ee.isResponse=ce})(R||(t.Message=R={}))}}),s8e=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(t){var i,s;var e;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0;var r;(function(o){o.None=0,o.First=1,o.AsOld=o.First,o.Last=2,o.AsNew=o.Last})(r||(t.Touch=r={}));var n=(i=class{constructor(){this[e]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var u;return(u=this._head)==null?void 0:u.value}get last(){var u;return(u=this._tail)==null?void 0:u.value}has(u){return this._map.has(u)}get(u,h=r.None){const d=this._map.get(u);if(d)return h!==r.None&&this.touch(d,h),d.value}set(u,h,d=r.None){let f=this._map.get(u);if(f)f.value=h,d!==r.None&&this.touch(f,d);else{switch(f={key:u,value:h,next:void 0,previous:void 0},d){case r.None:this.addItemLast(f);break;case r.First:this.addItemFirst(f);break;case r.Last:this.addItemLast(f);break;default:this.addItemLast(f);break}this._map.set(u,f),this._size++}return this}delete(u){return!!this.remove(u)}remove(u){const h=this._map.get(u);if(h)return this._map.delete(u),this.removeItem(h),this._size--,h.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const u=this._head;return this._map.delete(u.key),this.removeItem(u),this._size--,u.value}forEach(u,h){const d=this._state;let f=this._head;for(;f;){if(h?u.bind(h)(f.value,f.key,this):u(f.value,f.key,this),this._state!==d)throw new Error("LinkedMap got modified during iteration.");f=f.next}}keys(){const u=this._state;let h=this._head;const d={[Symbol.iterator]:()=>d,next:F(()=>{if(this._state!==u)throw new Error("LinkedMap got modified during iteration.");if(h){const f={value:h.key,done:!1};return h=h.next,f}else return{value:void 0,done:!0}},"next")};return d}values(){const u=this._state;let h=this._head;const d={[Symbol.iterator]:()=>d,next:F(()=>{if(this._state!==u)throw new Error("LinkedMap got modified during iteration.");if(h){const f={value:h.value,done:!1};return h=h.next,f}else return{value:void 0,done:!0}},"next")};return d}entries(){const u=this._state;let h=this._head;const d={[Symbol.iterator]:()=>d,next:F(()=>{if(this._state!==u)throw new Error("LinkedMap got modified during iteration.");if(h){const f={value:[h.key,h.value],done:!1};return h=h.next,f}else return{value:void 0,done:!0}},"next")};return d}[(e=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(u){if(u>=this.size)return;if(u===0){this.clear();return}let h=this._head,d=this.size;for(;h&&d>u;)this._map.delete(h.key),h=h.next,d--;this._head=h,this._size=d,h&&(h.previous=void 0),this._state++}addItemFirst(u){if(!this._head&&!this._tail)this._tail=u;else if(this._head)u.next=this._head,this._head.previous=u;else throw new Error("Invalid list");this._head=u,this._state++}addItemLast(u){if(!this._head&&!this._tail)this._head=u;else if(this._tail)u.previous=this._tail,this._tail.next=u;else throw new Error("Invalid list");this._tail=u,this._state++}removeItem(u){if(u===this._head&&u===this._tail)this._head=void 0,this._tail=void 0;else if(u===this._head){if(!u.next)throw new Error("Invalid list");u.next.previous=void 0,this._head=u.next}else if(u===this._tail){if(!u.previous)throw new Error("Invalid list");u.previous.next=void 0,this._tail=u.previous}else{const h=u.next,d=u.previous;if(!h||!d)throw new Error("Invalid list");h.previous=d,d.next=h}u.next=void 0,u.previous=void 0,this._state++}touch(u,h){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(h!==r.First&&h!==r.Last)){if(h===r.First){if(u===this._head)return;const d=u.next,f=u.previous;u===this._tail?(f.next=void 0,this._tail=f):(d.previous=f,f.next=d),u.previous=void 0,u.next=this._head,this._head.previous=u,this._head=u,this._state++}else if(h===r.Last){if(u===this._tail)return;const d=u.next,f=u.previous;u===this._head?(d.previous=void 0,this._head=d):(d.previous=f,f.next=d),u.next=void 0,u.previous=this._tail,this._tail.next=u,this._tail=u,this._state++}}}toJSON(){const u=[];return this.forEach((h,d)=>{u.push([d,h])}),u}fromJSON(u){this.clear();for(const[h,d]of u)this.set(h,d)}},l(i,"LinkedMap"),F(i,"LinkedMap"),i);t.LinkedMap=n;var a=(s=class extends n{constructor(u,h=1){super(),this._limit=u,this._ratio=Math.min(Math.max(0,h),1)}get limit(){return this._limit}set limit(u){this._limit=u,this.checkTrim()}get ratio(){return this._ratio}set ratio(u){this._ratio=Math.min(Math.max(0,u),1),this.checkTrim()}get(u,h=r.AsNew){return super.get(u,h)}peek(u){return super.get(u,r.None)}set(u,h){return super.set(u,h,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}},l(s,"LRUCache"),F(s,"LRUCache"),s);t.LRUCache=a}}),qKt=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0;var e;(function(r){function n(a){return{dispose:a}}l(n,"create"),F(n,"create"),r.create=n})(e||(t.Disposable=e={}))}}),YKt=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(t){var o,u,h,d;Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;var e=YL(),r;(function(f){f.Continue=0,f.Cancelled=1})(r||(r={}));var n=(o=class{constructor(){this.buffers=new Map}enableCancellation(p){if(p.id===null)return;const g=new SharedArrayBuffer(4),m=new Int32Array(g,0,1);m[0]=r.Continue,this.buffers.set(p.id,g),p.$cancellationData=g}sendCancellation(p,g){return nt(this,null,function*(){const m=this.buffers.get(g);if(m===void 0)return;const y=new Int32Array(m,0,1);Atomics.store(y,0,r.Cancelled)})}cleanup(p){this.buffers.delete(p)}dispose(){this.buffers.clear()}},l(o,"SharedArraySenderStrategy"),F(o,"SharedArraySenderStrategy"),o);t.SharedArraySenderStrategy=n;var a=(u=class{constructor(p){this.data=new Int32Array(p,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},l(u,"SharedArrayBufferCancellationToken"),F(u,"SharedArrayBufferCancellationToken"),u),i=(h=class{constructor(p){this.token=new a(p)}cancel(){}dispose(){}},l(h,"SharedArrayBufferCancellationTokenSource"),F(h,"SharedArrayBufferCancellationTokenSource"),h),s=(d=class{constructor(){this.kind="request"}createCancellationTokenSource(p){const g=p.$cancellationData;return g===void 0?new e.CancellationTokenSource:new i(g)}},l(d,"SharedArrayReceiverStrategy"),F(d,"SharedArrayReceiverStrategy"),d);t.SharedArrayReceiverStrategy=s}}),o8e=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;var e=d1(),r=(n=class{constructor(i=1){if(i<=0)throw new Error("Capacity must be greater than 0");this._capacity=i,this._active=0,this._waiting=[]}lock(i){return new Promise((s,o)=>{this._waiting.push({thunk:i,resolve:s,reject:o}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,e.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const i=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const s=i.thunk();s instanceof Promise?s.then(o=>{this._active--,i.resolve(o),this.runNext()},o=>{this._active--,i.reject(o),this.runNext()}):(this._active--,i.resolve(s),this.runNext())}catch(s){this._active--,i.reject(s),this.runNext()}}},l(n,"Semaphore"),F(n,"Semaphore"),n);t.Semaphore=r}}),UKt=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(t){var h,d;Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;var e=d1(),r=K5(),n=JT(),a=o8e(),i;(function(f){function p(g){let m=g;return m&&r.func(m.listen)&&r.func(m.dispose)&&r.func(m.onError)&&r.func(m.onClose)&&r.func(m.onPartialMessage)}l(p,"is"),F(p,"is"),f.is=p})(i||(t.MessageReader=i={}));var s=(h=class{constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(p){this.errorEmitter.fire(this.asError(p))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(p){this.partialMessageEmitter.fire(p)}asError(p){return p instanceof Error?p:new Error(`Reader received error. Reason: ${r.string(p.message)?p.message:"unknown"}`)}},l(h,"AbstractMessageReader"),F(h,"AbstractMessageReader"),h);t.AbstractMessageReader=s;var o;(function(f){function p(g){var x;let m,y;const v=new Map;let b;const w=new Map;if(g===void 0||typeof g=="string")m=g!=null?g:"utf-8";else{if(m=(x=g.charset)!=null?x:"utf-8",g.contentDecoder!==void 0&&(y=g.contentDecoder,v.set(y.name,y)),g.contentDecoders!==void 0)for(const T of g.contentDecoders)v.set(T.name,T);if(g.contentTypeDecoder!==void 0&&(b=g.contentTypeDecoder,w.set(b.name,b)),g.contentTypeDecoders!==void 0)for(const T of g.contentTypeDecoders)w.set(T.name,T)}return b===void 0&&(b=(0,e.default)().applicationJson.decoder,w.set(b.name,b)),{charset:m,contentDecoder:y,contentDecoders:v,contentTypeDecoder:b,contentTypeDecoders:w}}l(p,"fromOptions"),F(p,"fromOptions"),f.fromOptions=p})(o||(o={}));var u=(d=class extends s{constructor(p,g){super(),this.readable=p,this.options=o.fromOptions(g),this.buffer=(0,e.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(p){this._partialMessageTimeout=p}get partialMessageTimeout(){return this._partialMessageTimeout}listen(p){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=p;const g=this.readable.onData(m=>{this.onData(m)});return this.readable.onError(m=>this.fireError(m)),this.readable.onClose(()=>this.fireClose()),g}onData(p){try{for(this.buffer.append(p);;){if(this.nextMessageLength===-1){const m=this.buffer.tryReadHeaders(!0);if(!m)return;const y=m.get("content-length");if(!y){this.fireError(new Error(`Header must provide a Content-Length property.
|
||
${JSON.stringify(Object.fromEntries(m))}`));return}const v=parseInt(y);if(isNaN(v)){this.fireError(new Error(`Content-Length value must be a number. Got ${y}`));return}this.nextMessageLength=v}const g=this.buffer.tryReadBody(this.nextMessageLength);if(g===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(()=>nt(this,null,function*(){const m=this.options.contentDecoder!==void 0?yield this.options.contentDecoder.decode(g):g,y=yield this.options.contentTypeDecoder.decode(m,this.options);this.callback(y)})).catch(m=>{this.fireError(m)})}}catch(g){this.fireError(g)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,e.default)().timer.setTimeout((p,g)=>{this.partialMessageTimer=void 0,p===this.messageToken&&(this.firePartialMessage({messageToken:p,waitingTime:g}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}},l(d,"ReadableStreamMessageReader"),F(d,"ReadableStreamMessageReader"),d);t.ReadableStreamMessageReader=u}}),jKt=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(t){var f,p;Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;var e=d1(),r=K5(),n=o8e(),a=JT(),i="Content-Length: ",s=`\r
|
||
`,o;(function(g){function m(y){let v=y;return v&&r.func(v.dispose)&&r.func(v.onClose)&&r.func(v.onError)&&r.func(v.write)}l(m,"is"),F(m,"is"),g.is=m})(o||(t.MessageWriter=o={}));var u=(f=class{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(m,y,v){this.errorEmitter.fire([this.asError(m),y,v])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(m){return m instanceof Error?m:new Error(`Writer received error. Reason: ${r.string(m.message)?m.message:"unknown"}`)}},l(f,"AbstractMessageWriter"),F(f,"AbstractMessageWriter"),f);t.AbstractMessageWriter=u;var h;(function(g){function m(y){var v,b;return y===void 0||typeof y=="string"?{charset:y!=null?y:"utf-8",contentTypeEncoder:(0,e.default)().applicationJson.encoder}:{charset:(v=y.charset)!=null?v:"utf-8",contentEncoder:y.contentEncoder,contentTypeEncoder:(b=y.contentTypeEncoder)!=null?b:(0,e.default)().applicationJson.encoder}}l(m,"fromOptions"),F(m,"fromOptions"),g.fromOptions=m})(h||(h={}));var d=(p=class extends u{constructor(m,y){super(),this.writable=m,this.options=h.fromOptions(y),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(v=>this.fireError(v)),this.writable.onClose(()=>this.fireClose())}write(m){return nt(this,null,function*(){return this.writeSemaphore.lock(()=>nt(this,null,function*(){return this.options.contentTypeEncoder.encode(m,this.options).then(v=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(v):v).then(v=>{const b=[];return b.push(i,v.byteLength.toString(),s),b.push(s),this.doWrite(m,b,v)},v=>{throw this.fireError(v),v})}))})}doWrite(m,y,v){return nt(this,null,function*(){try{return yield this.writable.write(y.join(""),"ascii"),this.writable.write(v)}catch(b){return this.handleError(b,m),Promise.reject(b)}})}handleError(m,y){this.errorCount++,this.fireError(m,y,this.errorCount)}end(){this.writable.end()}},l(p,"WriteableStreamMessageWriter"),F(p,"WriteableStreamMessageWriter"),p);t.WriteableStreamMessageWriter=d}}),KKt=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(t){var i;Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;var e=13,r=10,n=`\r
|
||
`,a=(i=class{constructor(o="utf-8"){this._encoding=o,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(o){const u=typeof o=="string"?this.fromString(o,this._encoding):o;this._chunks.push(u),this._totalLength+=u.byteLength}tryReadHeaders(o=!1){if(this._chunks.length===0)return;let u=0,h=0,d=0,f=0;e:for(;h<this._chunks.length;){const y=this._chunks[h];for(d=0;d<y.length;){switch(y[d]){case e:switch(u){case 0:u=1;break;case 2:u=3;break;default:u=0}break;case r:switch(u){case 1:u=2;break;case 3:u=4,d++;break e;default:u=0}break;default:u=0}d++}f+=y.byteLength,h++}if(u!==4)return;const p=this._read(f+d),g=new Map,m=this.toString(p,"ascii").split(n);if(m.length<2)return g;for(let y=0;y<m.length-2;y++){const v=m[y],b=v.indexOf(":");if(b===-1)throw new Error(`Message header must separate key and value using ':'
|
||
${v}`);const w=v.substr(0,b),x=v.substr(b+1).trim();g.set(o?w.toLowerCase():w,x)}return g}tryReadBody(o){if(!(this._totalLength<o))return this._read(o)}get numberOfBytes(){return this._totalLength}_read(o){if(o===0)return this.emptyBuffer();if(o>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===o){const f=this._chunks[0];return this._chunks.shift(),this._totalLength-=o,this.asNative(f)}if(this._chunks[0].byteLength>o){const f=this._chunks[0],p=this.asNative(f,o);return this._chunks[0]=f.slice(o),this._totalLength-=o,p}const u=this.allocNative(o);let h=0,d=0;for(;o>0;){const f=this._chunks[d];if(f.byteLength>o){const p=f.slice(0,o);u.set(p,h),h+=o,this._chunks[d]=f.slice(o),this._totalLength-=o,o-=o}else u.set(f,h),h+=f.byteLength,this._chunks.shift(),this._totalLength-=f.byteLength,o-=f.byteLength}return u}},l(i,"AbstractMessageBuffer"),F(i,"AbstractMessageBuffer"),i);t.AbstractMessageBuffer=a}}),XKt=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(t){var O,M;Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;var e=d1(),r=K5(),n=i8e(),a=s8e(),i=JT(),s=YL(),o;(function(P){P.type=new n.NotificationType("$/cancelRequest")})(o||(o={}));var u;(function(P){function z(D){return typeof D=="string"||typeof D=="number"}l(z,"is"),F(z,"is"),P.is=z})(u||(t.ProgressToken=u={}));var h;(function(P){P.type=new n.NotificationType("$/progress")})(h||(h={}));var d=(O=class{constructor(){}},l(O,"ProgressType"),F(O,"ProgressType"),O);t.ProgressType=d;var f;(function(P){function z(D){return r.func(D)}l(z,"is"),F(z,"is"),P.is=z})(f||(f={})),t.NullLogger=Object.freeze({error:F(()=>{},"error"),warn:F(()=>{},"warn"),info:F(()=>{},"info"),log:F(()=>{},"log")});var p;(function(P){P[P.Off=0]="Off",P[P.Messages=1]="Messages",P[P.Compact=2]="Compact",P[P.Verbose=3]="Verbose"})(p||(t.Trace=p={}));var g;(function(P){P.Off="off",P.Messages="messages",P.Compact="compact",P.Verbose="verbose"})(g||(t.TraceValues=g={})),function(P){function z(B){if(!r.string(B))return P.Off;switch(B=B.toLowerCase(),B){case"off":return P.Off;case"messages":return P.Messages;case"compact":return P.Compact;case"verbose":return P.Verbose;default:return P.Off}}l(z,"fromString"),F(z,"fromString"),P.fromString=z;function D(B){switch(B){case P.Off:return"off";case P.Messages:return"messages";case P.Compact:return"compact";case P.Verbose:return"verbose";default:return"off"}}l(D,"toString4"),F(D,"toString"),P.toString=D}(p||(t.Trace=p={}));var m;(function(P){P.Text="text",P.JSON="json"})(m||(t.TraceFormat=m={})),function(P){function z(D){return r.string(D)?(D=D.toLowerCase(),D==="json"?P.JSON:P.Text):P.Text}l(z,"fromString"),F(z,"fromString"),P.fromString=z}(m||(t.TraceFormat=m={}));var y;(function(P){P.type=new n.NotificationType("$/setTrace")})(y||(t.SetTraceNotification=y={}));var v;(function(P){P.type=new n.NotificationType("$/logTrace")})(v||(t.LogTraceNotification=v={}));var b;(function(P){P[P.Closed=1]="Closed",P[P.Disposed=2]="Disposed",P[P.AlreadyListening=3]="AlreadyListening"})(b||(t.ConnectionErrors=b={}));var w=(M=class extends Error{constructor(z,D){super(D),this.code=z,Object.setPrototypeOf(this,M.prototype)}},l(M,"_ConnectionError"),F(M,"ConnectionError"),M);t.ConnectionError=w;var x;(function(P){function z(D){const B=D;return B&&r.func(B.cancelUndispatched)}l(z,"is"),F(z,"is"),P.is=z})(x||(t.ConnectionStrategy=x={}));var T;(function(P){function z(D){const B=D;return B&&(B.kind===void 0||B.kind==="id")&&r.func(B.createCancellationTokenSource)&&(B.dispose===void 0||r.func(B.dispose))}l(z,"is"),F(z,"is"),P.is=z})(T||(t.IdCancellationReceiverStrategy=T={}));var C;(function(P){function z(D){const B=D;return B&&B.kind==="request"&&r.func(B.createCancellationTokenSource)&&(B.dispose===void 0||r.func(B.dispose))}l(z,"is"),F(z,"is"),P.is=z})(C||(t.RequestCancellationReceiverStrategy=C={}));var S;(function(P){P.Message=Object.freeze({createCancellationTokenSource(D){return new s.CancellationTokenSource}});function z(D){return T.is(D)||C.is(D)}l(z,"is"),F(z,"is"),P.is=z})(S||(t.CancellationReceiverStrategy=S={}));var E;(function(P){P.Message=Object.freeze({sendCancellation(D,B){return D.sendNotification(o.type,{id:B})},cleanup(D){}});function z(D){const B=D;return B&&r.func(B.sendCancellation)&&r.func(B.cleanup)}l(z,"is"),F(z,"is"),P.is=z})(E||(t.CancellationSenderStrategy=E={}));var k;(function(P){P.Message=Object.freeze({receiver:S.Message,sender:E.Message});function z(D){const B=D;return B&&S.is(B.receiver)&&E.is(B.sender)}l(z,"is"),F(z,"is"),P.is=z})(k||(t.CancellationStrategy=k={}));var A;(function(P){function z(D){const B=D;return B&&r.func(B.handleMessage)}l(z,"is"),F(z,"is"),P.is=z})(A||(t.MessageStrategy=A={}));var I;(function(P){function z(D){const B=D;return B&&(k.is(B.cancellationStrategy)||x.is(B.connectionStrategy)||A.is(B.messageStrategy))}l(z,"is"),F(z,"is"),P.is=z})(I||(t.ConnectionOptions=I={}));var L;(function(P){P[P.New=1]="New",P[P.Listening=2]="Listening",P[P.Closed=3]="Closed",P[P.Disposed=4]="Disposed"})(L||(L={}));function R(P,z,D,B){const W=D!==void 0?D:t.NullLogger;let U=0,j=0,V=0;const Y="2.0";let H;const q=new Map;let Z;const K=new Map,re=new Map;let Q,te=new a.LinkedMap,ee=new Map,J=new Set,ae=new Map,se=p.Off,fe=m.Text,ve,de=L.New;const Ee=new i.Emitter,Ce=new i.Emitter,De=new i.Emitter,ce=new i.Emitter,Ie=new i.Emitter,ye=B&&B.cancellationStrategy?B.cancellationStrategy:k.Message;function pe(le){if(le===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+le.toString()}l(pe,"createRequestQueueKey"),F(pe,"createRequestQueueKey");function Ae(le){return le===null?"res-unknown-"+(++V).toString():"res-"+le.toString()}l(Ae,"createResponseQueueKey"),F(Ae,"createResponseQueueKey");function Ve(){return"not-"+(++j).toString()}l(Ve,"createNotificationQueueKey"),F(Ve,"createNotificationQueueKey");function ze(le,ke){n.Message.isRequest(ke)?le.set(pe(ke.id),ke):n.Message.isResponse(ke)?le.set(Ae(ke.id),ke):le.set(Ve(),ke)}l(ze,"addMessageToQueue"),F(ze,"addMessageToQueue");function We(le){}l(We,"cancelUndispatched"),F(We,"cancelUndispatched");function me(){return de===L.Listening}l(me,"isListening"),F(me,"isListening");function Se(){return de===L.Closed}l(Se,"isClosed"),F(Se,"isClosed");function ne(){return de===L.Disposed}l(ne,"isDisposed"),F(ne,"isDisposed");function xe(){(de===L.New||de===L.Listening)&&(de=L.Closed,Ce.fire(void 0))}l(xe,"closeHandler"),F(xe,"closeHandler");function oe(le){Ee.fire([le,void 0,void 0])}l(oe,"readErrorHandler"),F(oe,"readErrorHandler");function _e(le){Ee.fire(le)}l(_e,"writeErrorHandler"),F(_e,"writeErrorHandler"),P.onClose(xe),P.onError(oe),z.onClose(xe),z.onError(_e);function ue(){Q||te.size===0||(Q=(0,e.default)().timer.setImmediate(()=>{Q=void 0,Re()}))}l(ue,"triggerMessageQueue"),F(ue,"triggerMessageQueue");function tt(le){n.Message.isRequest(le)?Xe(le):n.Message.isNotification(le)?Ge(le):n.Message.isResponse(le)?ot(le):ht(le)}l(tt,"handleMessage"),F(tt,"handleMessage");function Re(){if(te.size===0)return;const le=te.shift();try{const ke=B==null?void 0:B.messageStrategy;A.is(ke)?ke.handleMessage(le,tt):tt(le)}finally{ue()}}l(Re,"processMessageQueue"),F(Re,"processMessageQueue");const et=F(le=>{try{if(n.Message.isNotification(le)&&le.method===o.type.method){const ke=le.params.id,je=pe(ke),ut=te.get(je);if(n.Message.isRequest(ut)){const Ze=B==null?void 0:B.connectionStrategy,st=Ze&&Ze.cancelUndispatched?Ze.cancelUndispatched(ut,We):void 0;if(st&&(st.error!==void 0||st.result!==void 0)){te.delete(je),ae.delete(ke),st.id=ut.id,dt(st,le.method,Date.now()),z.write(st).catch(()=>W.error("Sending response for canceled message failed."));return}}const Qe=ae.get(ke);if(Qe!==void 0){Qe.cancel(),vt(le);return}else J.add(ke)}ze(te,le)}finally{ue()}},"callback");function Xe(le){var Mt;if(ne())return;function ke(Bt,Pt,Pe){const at={jsonrpc:Y,id:le.id};Bt instanceof n.ResponseError?at.error=Bt.toJson():at.result=Bt===void 0?null:Bt,dt(at,Pt,Pe),z.write(at).catch(()=>W.error("Sending response failed."))}l(ke,"reply"),F(ke,"reply");function je(Bt,Pt,Pe){const at={jsonrpc:Y,id:le.id,error:Bt.toJson()};dt(at,Pt,Pe),z.write(at).catch(()=>W.error("Sending response failed."))}l(je,"replyError"),F(je,"replyError");function ut(Bt,Pt,Pe){Bt===void 0&&(Bt=null);const at={jsonrpc:Y,id:le.id,result:Bt};dt(at,Pt,Pe),z.write(at).catch(()=>W.error("Sending response failed."))}l(ut,"replySuccess"),F(ut,"replySuccess"),Oe(le);const Qe=q.get(le.method);let Ze,st;Qe&&(Ze=Qe.type,st=Qe.handler);const Ct=Date.now();if(st||H){const Bt=(Mt=le.id)!=null?Mt:String(Date.now()),Pt=T.is(ye.receiver)?ye.receiver.createCancellationTokenSource(Bt):ye.receiver.createCancellationTokenSource(le);le.id!==null&&J.has(le.id)&&Pt.cancel(),le.id!==null&&ae.set(Bt,Pt);try{let Pe;if(st)if(le.params===void 0){if(Ze!==void 0&&Ze.numberOfParams!==0){je(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${le.method} defines ${Ze.numberOfParams} params but received none.`),le.method,Ct);return}Pe=st(Pt.token)}else if(Array.isArray(le.params)){if(Ze!==void 0&&Ze.parameterStructures===n.ParameterStructures.byName){je(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${le.method} defines parameters by name but received parameters by position`),le.method,Ct);return}Pe=st(...le.params,Pt.token)}else{if(Ze!==void 0&&Ze.parameterStructures===n.ParameterStructures.byPosition){je(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${le.method} defines parameters by position but received parameters by name`),le.method,Ct);return}Pe=st(le.params,Pt.token)}else H&&(Pe=H(le.method,le.params,Pt.token));const at=Pe;Pe?at.then?at.then(yt=>{ae.delete(Bt),ke(yt,le.method,Ct)},yt=>{ae.delete(Bt),yt instanceof n.ResponseError?je(yt,le.method,Ct):yt&&r.string(yt.message)?je(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${le.method} failed with message: ${yt.message}`),le.method,Ct):je(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${le.method} failed unexpectedly without providing any details.`),le.method,Ct)}):(ae.delete(Bt),ke(Pe,le.method,Ct)):(ae.delete(Bt),ut(Pe,le.method,Ct))}catch(Pe){ae.delete(Bt),Pe instanceof n.ResponseError?ke(Pe,le.method,Ct):Pe&&r.string(Pe.message)?je(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${le.method} failed with message: ${Pe.message}`),le.method,Ct):je(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${le.method} failed unexpectedly without providing any details.`),le.method,Ct)}}else je(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${le.method}`),le.method,Ct)}l(Xe,"handleRequest"),F(Xe,"handleRequest");function ot(le){if(!ne())if(le.id===null)le.error?W.error(`Received response message without id: Error is:
|
||
${JSON.stringify(le.error,void 0,4)}`):W.error("Received response message without id. No further error information provided.");else{const ke=le.id,je=ee.get(ke);if(qe(le,je),je!==void 0){ee.delete(ke);try{if(le.error){const ut=le.error;je.reject(new n.ResponseError(ut.code,ut.message,ut.data))}else if(le.result!==void 0)je.resolve(le.result);else throw new Error("Should never happen.")}catch(ut){ut.message?W.error(`Response handler '${je.method}' failed with message: ${ut.message}`):W.error(`Response handler '${je.method}' failed unexpectedly.`)}}}}l(ot,"handleResponse"),F(ot,"handleResponse");function Ge(le){if(ne())return;let ke,je;if(le.method===o.type.method){const ut=le.params.id;J.delete(ut),vt(le);return}else{const ut=K.get(le.method);ut&&(je=ut.handler,ke=ut.type)}if(je||Z)try{if(vt(le),je)if(le.params===void 0)ke!==void 0&&ke.numberOfParams!==0&&ke.parameterStructures!==n.ParameterStructures.byName&&W.error(`Notification ${le.method} defines ${ke.numberOfParams} params but received none.`),je();else if(Array.isArray(le.params)){const ut=le.params;le.method===h.type.method&&ut.length===2&&u.is(ut[0])?je({token:ut[0],value:ut[1]}):(ke!==void 0&&(ke.parameterStructures===n.ParameterStructures.byName&&W.error(`Notification ${le.method} defines parameters by name but received parameters by position`),ke.numberOfParams!==le.params.length&&W.error(`Notification ${le.method} defines ${ke.numberOfParams} params but received ${ut.length} arguments`)),je(...ut))}else ke!==void 0&&ke.parameterStructures===n.ParameterStructures.byPosition&&W.error(`Notification ${le.method} defines parameters by position but received parameters by name`),je(le.params);else Z&&Z(le.method,le.params)}catch(ut){ut.message?W.error(`Notification handler '${le.method}' failed with message: ${ut.message}`):W.error(`Notification handler '${le.method}' failed unexpectedly.`)}else De.fire(le)}l(Ge,"handleNotification"),F(Ge,"handleNotification");function ht(le){if(!le){W.error("Received empty message.");return}W.error(`Received message which is neither a response nor a notification message:
|
||
${JSON.stringify(le,null,4)}`);const ke=le;if(r.string(ke.id)||r.number(ke.id)){const je=ke.id,ut=ee.get(je);ut&&ut.reject(new Error("The received response has neither a result nor an error property."))}}l(ht,"handleInvalidMessage"),F(ht,"handleInvalidMessage");function Je(le){if(le!=null)switch(se){case p.Verbose:return JSON.stringify(le,null,4);case p.Compact:return JSON.stringify(le);default:return}}l(Je,"stringifyTrace"),F(Je,"stringifyTrace");function St(le){if(!(se===p.Off||!ve))if(fe===m.Text){let ke;(se===p.Verbose||se===p.Compact)&&le.params&&(ke=`Params: ${Je(le.params)}
|
||
|
||
`),ve.log(`Sending request '${le.method} - (${le.id})'.`,ke)}else Me("send-request",le)}l(St,"traceSendingRequest"),F(St,"traceSendingRequest");function He(le){if(!(se===p.Off||!ve))if(fe===m.Text){let ke;(se===p.Verbose||se===p.Compact)&&(le.params?ke=`Params: ${Je(le.params)}
|
||
|
||
`:ke=`No parameters provided.
|
||
|
||
`),ve.log(`Sending notification '${le.method}'.`,ke)}else Me("send-notification",le)}l(He,"traceSendingNotification"),F(He,"traceSendingNotification");function dt(le,ke,je){if(!(se===p.Off||!ve))if(fe===m.Text){let ut;(se===p.Verbose||se===p.Compact)&&(le.error&&le.error.data?ut=`Error data: ${Je(le.error.data)}
|
||
|
||
`:le.result?ut=`Result: ${Je(le.result)}
|
||
|
||
`:le.error===void 0&&(ut=`No result returned.
|
||
|
||
`)),ve.log(`Sending response '${ke} - (${le.id})'. Processing request took ${Date.now()-je}ms`,ut)}else Me("send-response",le)}l(dt,"traceSendingResponse"),F(dt,"traceSendingResponse");function Oe(le){if(!(se===p.Off||!ve))if(fe===m.Text){let ke;(se===p.Verbose||se===p.Compact)&&le.params&&(ke=`Params: ${Je(le.params)}
|
||
|
||
`),ve.log(`Received request '${le.method} - (${le.id})'.`,ke)}else Me("receive-request",le)}l(Oe,"traceReceivedRequest"),F(Oe,"traceReceivedRequest");function vt(le){if(!(se===p.Off||!ve||le.method===v.type.method))if(fe===m.Text){let ke;(se===p.Verbose||se===p.Compact)&&(le.params?ke=`Params: ${Je(le.params)}
|
||
|
||
`:ke=`No parameters provided.
|
||
|
||
`),ve.log(`Received notification '${le.method}'.`,ke)}else Me("receive-notification",le)}l(vt,"traceReceivedNotification"),F(vt,"traceReceivedNotification");function qe(le,ke){if(!(se===p.Off||!ve))if(fe===m.Text){let je;if((se===p.Verbose||se===p.Compact)&&(le.error&&le.error.data?je=`Error data: ${Je(le.error.data)}
|
||
|
||
`:le.result?je=`Result: ${Je(le.result)}
|
||
|
||
`:le.error===void 0&&(je=`No result returned.
|
||
|
||
`)),ke){const ut=le.error?` Request failed: ${le.error.message} (${le.error.code}).`:"";ve.log(`Received response '${ke.method} - (${le.id})' in ${Date.now()-ke.timerStart}ms.${ut}`,je)}else ve.log(`Received response ${le.id} without active response promise.`,je)}else Me("receive-response",le)}l(qe,"traceReceivedResponse"),F(qe,"traceReceivedResponse");function Me(le,ke){if(!ve||se===p.Off)return;const je={isLSPMessage:!0,type:le,message:ke,timestamp:Date.now()};ve.log(je)}l(Me,"logLSPMessage"),F(Me,"logLSPMessage");function lt(){if(Se())throw new w(b.Closed,"Connection is closed.");if(ne())throw new w(b.Disposed,"Connection is disposed.")}l(lt,"throwIfClosedOrDisposed"),F(lt,"throwIfClosedOrDisposed");function it(){if(me())throw new w(b.AlreadyListening,"Connection is already listening")}l(it,"throwIfListening"),F(it,"throwIfListening");function Ue(){if(!me())throw new Error("Call listen() first.")}l(Ue,"throwIfNotListening"),F(Ue,"throwIfNotListening");function we(le){return le===void 0?null:le}l(we,"undefinedToNull"),F(we,"undefinedToNull");function gt(le){if(le!==null)return le}l(gt,"nullToUndefined"),F(gt,"nullToUndefined");function ge(le){return le!=null&&!Array.isArray(le)&&typeof le=="object"}l(ge,"isNamedParam"),F(ge,"isNamedParam");function ie(le,ke){switch(le){case n.ParameterStructures.auto:return ge(ke)?gt(ke):[we(ke)];case n.ParameterStructures.byName:if(!ge(ke))throw new Error("Received parameters by name but param is not an object literal.");return gt(ke);case n.ParameterStructures.byPosition:return[we(ke)];default:throw new Error(`Unknown parameter structure ${le.toString()}`)}}l(ie,"computeSingleParam"),F(ie,"computeSingleParam");function be(le,ke){let je;const ut=le.numberOfParams;switch(ut){case 0:je=void 0;break;case 1:je=ie(le.parameterStructures,ke[0]);break;default:je=[];for(let Qe=0;Qe<ke.length&&Qe<ut;Qe++)je.push(we(ke[Qe]));if(ke.length<ut)for(let Qe=ke.length;Qe<ut;Qe++)je.push(null);break}return je}l(be,"computeMessageParams"),F(be,"computeMessageParams");const $e={sendNotification:F((le,...ke)=>{lt();let je,ut;if(r.string(le)){je=le;const Ze=ke[0];let st=0,Ct=n.ParameterStructures.auto;n.ParameterStructures.is(Ze)&&(st=1,Ct=Ze);let Mt=ke.length;const Bt=Mt-st;switch(Bt){case 0:ut=void 0;break;case 1:ut=ie(Ct,ke[st]);break;default:if(Ct===n.ParameterStructures.byName)throw new Error(`Received ${Bt} parameters for 'by Name' notification parameter structure.`);ut=ke.slice(st,Mt).map(Pt=>we(Pt));break}}else{const Ze=ke;je=le.method,ut=be(le,Ze)}const Qe={jsonrpc:Y,method:je,params:ut};return He(Qe),z.write(Qe).catch(Ze=>{throw W.error("Sending notification failed."),Ze})},"sendNotification"),onNotification:F((le,ke)=>{lt();let je;return r.func(le)?Z=le:ke&&(r.string(le)?(je=le,K.set(le,{type:void 0,handler:ke})):(je=le.method,K.set(le.method,{type:le,handler:ke}))),{dispose:F(()=>{je!==void 0?K.delete(je):Z=void 0},"dispose")}},"onNotification"),onProgress:F((le,ke,je)=>{if(re.has(ke))throw new Error(`Progress handler for token ${ke} already registered`);return re.set(ke,je),{dispose:F(()=>{re.delete(ke)},"dispose")}},"onProgress"),sendProgress:F((le,ke,je)=>$e.sendNotification(h.type,{token:ke,value:je}),"sendProgress"),onUnhandledProgress:ce.event,sendRequest:F((le,...ke)=>{lt(),Ue();let je,ut,Qe;if(r.string(le)){je=le;const Mt=ke[0],Bt=ke[ke.length-1];let Pt=0,Pe=n.ParameterStructures.auto;n.ParameterStructures.is(Mt)&&(Pt=1,Pe=Mt);let at=ke.length;s.CancellationToken.is(Bt)&&(at=at-1,Qe=Bt);const yt=at-Pt;switch(yt){case 0:ut=void 0;break;case 1:ut=ie(Pe,ke[Pt]);break;default:if(Pe===n.ParameterStructures.byName)throw new Error(`Received ${yt} parameters for 'by Name' request parameter structure.`);ut=ke.slice(Pt,at).map(Tt=>we(Tt));break}}else{const Mt=ke;je=le.method,ut=be(le,Mt);const Bt=le.numberOfParams;Qe=s.CancellationToken.is(Mt[Bt])?Mt[Bt]:void 0}const Ze=U++;let st;Qe&&(st=Qe.onCancellationRequested(()=>{const Mt=ye.sender.sendCancellation($e,Ze);return Mt===void 0?(W.log(`Received no promise from cancellation strategy when cancelling id ${Ze}`),Promise.resolve()):Mt.catch(()=>{W.log(`Sending cancellation messages for id ${Ze} failed`)})}));const Ct={jsonrpc:Y,id:Ze,method:je,params:ut};return St(Ct),typeof ye.sender.enableCancellation=="function"&&ye.sender.enableCancellation(Ct),new Promise((Mt,Bt)=>nt(this,null,function*(){const Pt=F(yt=>{Mt(yt),ye.sender.cleanup(Ze),st==null||st.dispose()},"resolveWithCleanup"),Pe=F(yt=>{Bt(yt),ye.sender.cleanup(Ze),st==null||st.dispose()},"rejectWithCleanup"),at={method:je,timerStart:Date.now(),resolve:Pt,reject:Pe};try{yield z.write(Ct),ee.set(Ze,at)}catch(yt){throw W.error("Sending request failed."),at.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,yt.message?yt.message:"Unknown reason")),yt}}))},"sendRequest"),onRequest:F((le,ke)=>{lt();let je=null;return f.is(le)?(je=void 0,H=le):r.string(le)?(je=null,ke!==void 0&&(je=le,q.set(le,{handler:ke,type:void 0}))):ke!==void 0&&(je=le.method,q.set(le.method,{type:le,handler:ke})),{dispose:F(()=>{je!==null&&(je!==void 0?q.delete(je):H=void 0)},"dispose")}},"onRequest"),hasPendingResponse:F(()=>ee.size>0,"hasPendingResponse"),trace:F((le,ke,je)=>nt(this,null,function*(){let ut=!1,Qe=m.Text;je!==void 0&&(r.boolean(je)?ut=je:(ut=je.sendNotification||!1,Qe=je.traceFormat||m.Text)),se=le,fe=Qe,se===p.Off?ve=void 0:ve=ke,ut&&!Se()&&!ne()&&(yield $e.sendNotification(y.type,{value:p.toString(le)}))}),"trace"),onError:Ee.event,onClose:Ce.event,onUnhandledNotification:De.event,onDispose:Ie.event,end:F(()=>{z.end()},"end"),dispose:F(()=>{if(ne())return;de=L.Disposed,Ie.fire(void 0);const le=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const ke of ee.values())ke.reject(le);ee=new Map,ae=new Map,J=new Set,te=new a.LinkedMap,r.func(z.dispose)&&z.dispose(),r.func(P.dispose)&&P.dispose()},"dispose"),listen:F(()=>{lt(),it(),de=L.Listening,P.listen(et)},"listen"),inspect:F(()=>{(0,e.default)().console.log("inspect")},"inspect")};return $e.onNotification(v.type,le=>{if(se===p.Off||!ve)return;const ke=se===p.Verbose||se===p.Compact;ve.log(le.message,ke?le.verbose:void 0)}),$e.onNotification(h.type,le=>{const ke=re.get(le.token);ke?ke(le.value):ce.fire(le)}),$e}l(R,"createMessageConnection"),F(R,"createMessageConnection"),t.createMessageConnection=R}}),qK=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;var e=i8e();Object.defineProperty(t,"Message",{enumerable:!0,get:F(function(){return e.Message},"get")}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:F(function(){return e.RequestType},"get")}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:F(function(){return e.RequestType0},"get")}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:F(function(){return e.RequestType1},"get")}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:F(function(){return e.RequestType2},"get")}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:F(function(){return e.RequestType3},"get")}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:F(function(){return e.RequestType4},"get")}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:F(function(){return e.RequestType5},"get")}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:F(function(){return e.RequestType6},"get")}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:F(function(){return e.RequestType7},"get")}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:F(function(){return e.RequestType8},"get")}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:F(function(){return e.RequestType9},"get")}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:F(function(){return e.ResponseError},"get")}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:F(function(){return e.ErrorCodes},"get")}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:F(function(){return e.NotificationType},"get")}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:F(function(){return e.NotificationType0},"get")}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:F(function(){return e.NotificationType1},"get")}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:F(function(){return e.NotificationType2},"get")}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:F(function(){return e.NotificationType3},"get")}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:F(function(){return e.NotificationType4},"get")}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:F(function(){return e.NotificationType5},"get")}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:F(function(){return e.NotificationType6},"get")}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:F(function(){return e.NotificationType7},"get")}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:F(function(){return e.NotificationType8},"get")}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:F(function(){return e.NotificationType9},"get")}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:F(function(){return e.ParameterStructures},"get")});var r=s8e();Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:F(function(){return r.LinkedMap},"get")}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:F(function(){return r.LRUCache},"get")}),Object.defineProperty(t,"Touch",{enumerable:!0,get:F(function(){return r.Touch},"get")});var n=qKt();Object.defineProperty(t,"Disposable",{enumerable:!0,get:F(function(){return n.Disposable},"get")});var a=JT();Object.defineProperty(t,"Event",{enumerable:!0,get:F(function(){return a.Event},"get")}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:F(function(){return a.Emitter},"get")});var i=YL();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:F(function(){return i.CancellationTokenSource},"get")}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:F(function(){return i.CancellationToken},"get")});var s=YKt();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:F(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:F(function(){return s.SharedArrayReceiverStrategy},"get")});var o=UKt();Object.defineProperty(t,"MessageReader",{enumerable:!0,get:F(function(){return o.MessageReader},"get")}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:F(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:F(function(){return o.ReadableStreamMessageReader},"get")});var u=jKt();Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:F(function(){return u.MessageWriter},"get")}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:F(function(){return u.AbstractMessageWriter},"get")}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:F(function(){return u.WriteableStreamMessageWriter},"get")});var h=KKt();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:F(function(){return h.AbstractMessageBuffer},"get")});var d=XKt();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:F(function(){return d.ConnectionStrategy},"get")}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:F(function(){return d.ConnectionOptions},"get")}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:F(function(){return d.NullLogger},"get")}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:F(function(){return d.createMessageConnection},"get")}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:F(function(){return d.ProgressToken},"get")}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:F(function(){return d.ProgressType},"get")}),Object.defineProperty(t,"Trace",{enumerable:!0,get:F(function(){return d.Trace},"get")}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:F(function(){return d.TraceValues},"get")}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:F(function(){return d.TraceFormat},"get")}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:F(function(){return d.SetTraceNotification},"get")}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:F(function(){return d.LogTraceNotification},"get")}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:F(function(){return d.ConnectionErrors},"get")}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:F(function(){return d.ConnectionError},"get")}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:F(function(){return d.CancellationReceiverStrategy},"get")}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:F(function(){return d.CancellationSenderStrategy},"get")}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:F(function(){return d.CancellationStrategy},"get")}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:F(function(){return d.MessageStrategy},"get")});var f=d1();t.RAL=f.default}}),ZKt=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(t){var u,h,d;Object.defineProperty(t,"__esModule",{value:!0});var e=qK(),r=(u=class extends e.AbstractMessageBuffer{constructor(p="utf-8"){super(p),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return u.emptyBuffer}fromString(p,g){return new TextEncoder().encode(p)}toString(p,g){return g==="ascii"?this.asciiDecoder.decode(p):new TextDecoder(g).decode(p)}asNative(p,g){return g===void 0?p:p.slice(0,g)}allocNative(p){return new Uint8Array(p)}},l(u,"_MessageBuffer"),F(u,"MessageBuffer"),u);r.emptyBuffer=new Uint8Array(0);var n=(h=class{constructor(p){this.socket=p,this._onData=new e.Emitter,this._messageListener=g=>{g.data.arrayBuffer().then(y=>{this._onData.fire(new Uint8Array(y))},()=>{(0,e.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(p){return this.socket.addEventListener("close",p),e.Disposable.create(()=>this.socket.removeEventListener("close",p))}onError(p){return this.socket.addEventListener("error",p),e.Disposable.create(()=>this.socket.removeEventListener("error",p))}onEnd(p){return this.socket.addEventListener("end",p),e.Disposable.create(()=>this.socket.removeEventListener("end",p))}onData(p){return this._onData.event(p)}},l(h,"ReadableStreamWrapper"),F(h,"ReadableStreamWrapper"),h),a=(d=class{constructor(p){this.socket=p}onClose(p){return this.socket.addEventListener("close",p),e.Disposable.create(()=>this.socket.removeEventListener("close",p))}onError(p){return this.socket.addEventListener("error",p),e.Disposable.create(()=>this.socket.removeEventListener("error",p))}onEnd(p){return this.socket.addEventListener("end",p),e.Disposable.create(()=>this.socket.removeEventListener("end",p))}write(p,g){if(typeof p=="string"){if(g!==void 0&&g!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${g}`);this.socket.send(p)}else this.socket.send(p);return Promise.resolve()}end(){this.socket.close()}},l(d,"WritableStreamWrapper"),F(d,"WritableStreamWrapper"),d),i=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:F(f=>new r(f),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:F((f,p)=>{if(p.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${p.charset}`);return Promise.resolve(i.encode(JSON.stringify(f,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:F((f,p)=>{if(!(f instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(p.charset).decode(f)))},"decode")})}),stream:Object.freeze({asReadableStream:F(f=>new n(f),"asReadableStream"),asWritableStream:F(f=>new a(f),"asWritableStream")}),console,timer:Object.freeze({setTimeout(f,p,...g){const m=setTimeout(f,p,...g);return{dispose:F(()=>clearTimeout(m),"dispose")}},setImmediate(f,...p){const g=setTimeout(f,0,...p);return{dispose:F(()=>clearTimeout(g),"dispose")}},setInterval(f,p,...g){const m=setInterval(f,p,...g);return{dispose:F(()=>clearInterval(m),"dispose")}}})});function o(){return s}l(o,"RIL"),F(o,"RIL"),function(f){function p(){e.RAL.install(s)}l(p,"install"),F(p,"install"),f.install=p}(o||(o={})),t.default=o}}),eE=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(t){var u,h;var e=t&&t.__createBinding||(Object.create?function(d,f,p,g){g===void 0&&(g=p);var m=Object.getOwnPropertyDescriptor(f,p);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:F(function(){return f[p]},"get")}),Object.defineProperty(d,g,m)}:function(d,f,p,g){g===void 0&&(g=p),d[g]=f[p]}),r=t&&t.__exportStar||function(d,f){for(var p in d)p!=="default"&&!Object.prototype.hasOwnProperty.call(f,p)&&e(f,d,p)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0;var n=ZKt();n.default.install();var a=qK();r(qK(),t);var i=(u=class extends a.AbstractMessageReader{constructor(f){super(),this._onData=new a.Emitter,this._messageListener=p=>{this._onData.fire(p.data)},f.addEventListener("error",p=>this.fireError(p)),f.onmessage=this._messageListener}listen(f){return this._onData.event(f)}},l(u,"BrowserMessageReader"),F(u,"BrowserMessageReader"),u);t.BrowserMessageReader=i;var s=(h=class extends a.AbstractMessageWriter{constructor(f){super(),this.port=f,this.errorCount=0,f.addEventListener("error",p=>this.fireError(p))}write(f){try{return this.port.postMessage(f),Promise.resolve()}catch(p){return this.handleError(p,f),Promise.reject(p)}}handleError(f,p){this.errorCount++,this.fireError(f,p,this.errorCount)}end(){}},l(h,"BrowserMessageWriter"),F(h,"BrowserMessageWriter"),h);t.BrowserMessageWriter=s;function o(d,f,p,g){return p===void 0&&(p=a.NullLogger),a.ConnectionStrategy.is(g)&&(g={connectionStrategy:g}),(0,a.createMessageConnection)(d,f,p,g)}l(o,"createMessageConnection"),F(o,"createMessageConnection"),t.createMessageConnection=o}}),l8e=sn({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(t,e){e.exports=eE()}}),ui=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(t){var u,h,d,f,p;Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;var e=eE(),r;(function(g){g.clientToServer="clientToServer",g.serverToClient="serverToClient",g.both="both"})(r||(t.MessageDirection=r={}));var n=(u=class{constructor(m){this.method=m}},l(u,"RegistrationType"),F(u,"RegistrationType"),u);t.RegistrationType=n;var a=(h=class extends e.RequestType0{constructor(m){super(m)}},l(h,"ProtocolRequestType0"),F(h,"ProtocolRequestType0"),h);t.ProtocolRequestType0=a;var i=(d=class extends e.RequestType{constructor(m){super(m,e.ParameterStructures.byName)}},l(d,"ProtocolRequestType"),F(d,"ProtocolRequestType"),d);t.ProtocolRequestType=i;var s=(f=class extends e.NotificationType0{constructor(m){super(m)}},l(f,"ProtocolNotificationType0"),F(f,"ProtocolNotificationType0"),f);t.ProtocolNotificationType0=s;var o=(p=class extends e.NotificationType{constructor(m){super(m,e.ParameterStructures.byName)}},l(p,"ProtocolNotificationType"),F(p,"ProtocolNotificationType"),p);t.ProtocolNotificationType=o}}),YK=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0;function e(d){return d===!0||d===!1}l(e,"boolean"),F(e,"boolean"),t.boolean=e;function r(d){return typeof d=="string"||d instanceof String}l(r,"string"),F(r,"string"),t.string=r;function n(d){return typeof d=="number"||d instanceof Number}l(n,"number"),F(n,"number"),t.number=n;function a(d){return d instanceof Error}l(a,"error"),F(a,"error"),t.error=a;function i(d){return typeof d=="function"}l(i,"func"),F(i,"func"),t.func=i;function s(d){return Array.isArray(d)}l(s,"array"),F(s,"array"),t.array=s;function o(d){return s(d)&&d.every(f=>r(f))}l(o,"stringArray"),F(o,"stringArray"),t.stringArray=o;function u(d,f){return Array.isArray(d)&&d.every(f)}l(u,"typedArray"),F(u,"typedArray"),t.typedArray=u;function h(d){return d!==null&&typeof d=="object"}l(h,"objectLiteral"),F(h,"objectLiteral"),t.objectLiteral=h}}),QKt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;var e=ui(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ImplementationRequest=r={}))}}),JKt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;var e=ui(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.TypeDefinitionRequest=r={}))}}),eXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;var e=ui(),r;(function(a){a.method="workspace/workspaceFolders",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(r||(t.WorkspaceFoldersRequest=r={}));var n;(function(a){a.method="workspace/didChangeWorkspaceFolders",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolNotificationType(a.method)})(n||(t.DidChangeWorkspaceFoldersNotification=n={}))}}),tXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;var e=ui(),r;(function(n){n.method="workspace/configuration",n.messageDirection=e.MessageDirection.serverToClient,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ConfigurationRequest=r={}))}}),rXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;var e=ui(),r;(function(a){a.method="textDocument/documentColor",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.DocumentColorRequest=r={}));var n;(function(a){a.method="textDocument/colorPresentation",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(n||(t.ColorPresentationRequest=n={}))}}),nXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;var e=ui(),r;(function(a){a.method="textDocument/foldingRange",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.FoldingRangeRequest=r={}));var n;(function(a){a.method="workspace/foldingRange/refresh",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(n||(t.FoldingRangeRefreshRequest=n={}))}}),aXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;var e=ui(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.DeclarationRequest=r={}))}}),iXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;var e=ui(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.SelectionRangeRequest=r={}))}}),sXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;var e=eE(),r=ui(),n;(function(s){s.type=new e.ProgressType;function o(u){return u===s.type}l(o,"is"),F(o,"is"),s.is=o})(n||(t.WorkDoneProgress=n={}));var a;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=r.MessageDirection.serverToClient,s.type=new r.ProtocolRequestType(s.method)})(a||(t.WorkDoneProgressCreateRequest=a={}));var i;(function(s){s.method="window/workDoneProgress/cancel",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolNotificationType(s.method)})(i||(t.WorkDoneProgressCancelNotification=i={}))}}),oXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;var e=ui(),r;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.CallHierarchyPrepareRequest=r={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.CallHierarchyIncomingCallsRequest=n={}));var a;(function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.CallHierarchyOutgoingCallsRequest=a={}))}}),lXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;var e=ui(),r;(function(u){u.Relative="relative"})(r||(t.TokenFormat=r={}));var n;(function(u){u.method="textDocument/semanticTokens",u.type=new e.RegistrationType(u.method)})(n||(t.SemanticTokensRegistrationType=n={}));var a;(function(u){u.method="textDocument/semanticTokens/full",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method),u.registrationMethod=n.method})(a||(t.SemanticTokensRequest=a={}));var i;(function(u){u.method="textDocument/semanticTokens/full/delta",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method),u.registrationMethod=n.method})(i||(t.SemanticTokensDeltaRequest=i={}));var s;(function(u){u.method="textDocument/semanticTokens/range",u.messageDirection=e.MessageDirection.clientToServer,u.type=new e.ProtocolRequestType(u.method),u.registrationMethod=n.method})(s||(t.SemanticTokensRangeRequest=s={}));var o;(function(u){u.method="workspace/semanticTokens/refresh",u.messageDirection=e.MessageDirection.serverToClient,u.type=new e.ProtocolRequestType0(u.method)})(o||(t.SemanticTokensRefreshRequest=o={}))}}),cXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;var e=ui(),r;(function(n){n.method="window/showDocument",n.messageDirection=e.MessageDirection.serverToClient,n.type=new e.ProtocolRequestType(n.method)})(r||(t.ShowDocumentRequest=r={}))}}),uXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;var e=ui(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.LinkedEditingRangeRequest=r={}))}}),hXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;var e=ui(),r;(function(h){h.file="file",h.folder="folder"})(r||(t.FileOperationPatternKind=r={}));var n;(function(h){h.method="workspace/willCreateFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(n||(t.WillCreateFilesRequest=n={}));var a;(function(h){h.method="workspace/didCreateFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(a||(t.DidCreateFilesNotification=a={}));var i;(function(h){h.method="workspace/willRenameFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(i||(t.WillRenameFilesRequest=i={}));var s;(function(h){h.method="workspace/didRenameFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(s||(t.DidRenameFilesNotification=s={}));var o;(function(h){h.method="workspace/didDeleteFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(o||(t.DidDeleteFilesNotification=o={}));var u;(function(h){h.method="workspace/willDeleteFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(u||(t.WillDeleteFilesRequest=u={}))}}),dXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;var e=ui(),r;(function(i){i.document="document",i.project="project",i.group="group",i.scheme="scheme",i.global="global"})(r||(t.UniquenessLevel=r={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(t.MonikerKind=n={}));var a;(function(i){i.method="textDocument/moniker",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.MonikerRequest=a={}))}}),fXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e=ui(),r;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.TypeHierarchyPrepareRequest=r={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.TypeHierarchySupertypesRequest=n={}));var a;(function(i){i.method="typeHierarchy/subtypes",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(a||(t.TypeHierarchySubtypesRequest=a={}))}}),pXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;var e=ui(),r;(function(a){a.method="textDocument/inlineValue",a.messageDirection=e.MessageDirection.clientToServer,a.type=new e.ProtocolRequestType(a.method)})(r||(t.InlineValueRequest=r={}));var n;(function(a){a.method="workspace/inlineValue/refresh",a.messageDirection=e.MessageDirection.serverToClient,a.type=new e.ProtocolRequestType0(a.method)})(n||(t.InlineValueRefreshRequest=n={}))}}),gXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;var e=ui(),r;(function(i){i.method="textDocument/inlayHint",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(r||(t.InlayHintRequest=r={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=e.MessageDirection.clientToServer,i.type=new e.ProtocolRequestType(i.method)})(n||(t.InlayHintResolveRequest=n={}));var a;(function(i){i.method="workspace/inlayHint/refresh",i.messageDirection=e.MessageDirection.serverToClient,i.type=new e.ProtocolRequestType0(i.method)})(a||(t.InlayHintRefreshRequest=a={}))}}),mXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;var e=eE(),r=YK(),n=ui(),a;(function(h){function d(f){const p=f;return p&&r.boolean(p.retriggerRequest)}l(d,"is"),F(d,"is"),h.is=d})(a||(t.DiagnosticServerCancellationData=a={}));var i;(function(h){h.Full="full",h.Unchanged="unchanged"})(i||(t.DocumentDiagnosticReportKind=i={}));var s;(function(h){h.method="textDocument/diagnostic",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolRequestType(h.method),h.partialResult=new e.ProgressType})(s||(t.DocumentDiagnosticRequest=s={}));var o;(function(h){h.method="workspace/diagnostic",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolRequestType(h.method),h.partialResult=new e.ProgressType})(o||(t.WorkspaceDiagnosticRequest=o={}));var u;(function(h){h.method="workspace/diagnostic/refresh",h.messageDirection=n.MessageDirection.serverToClient,h.type=new n.ProtocolRequestType0(h.method)})(u||(t.DiagnosticRefreshRequest=u={}))}}),yXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;var e=(j5(),Vj(FL)),r=YK(),n=ui(),a;(function(m){m.Markup=1,m.Code=2;function y(v){return v===1||v===2}l(y,"is"),F(y,"is"),m.is=y})(a||(t.NotebookCellKind=a={}));var i;(function(m){function y(w,x){const T={executionOrder:w};return(x===!0||x===!1)&&(T.success=x),T}l(y,"create"),F(y,"create"),m.create=y;function v(w){const x=w;return r.objectLiteral(x)&&e.uinteger.is(x.executionOrder)&&(x.success===void 0||r.boolean(x.success))}l(v,"is"),F(v,"is"),m.is=v;function b(w,x){return w===x?!0:w==null||x===null||x===void 0?!1:w.executionOrder===x.executionOrder&&w.success===x.success}l(b,"equals"),F(b,"equals"),m.equals=b})(i||(t.ExecutionSummary=i={}));var s;(function(m){function y(x,T){return{kind:x,document:T}}l(y,"create"),F(y,"create"),m.create=y;function v(x){const T=x;return r.objectLiteral(T)&&a.is(T.kind)&&e.DocumentUri.is(T.document)&&(T.metadata===void 0||r.objectLiteral(T.metadata))}l(v,"is"),F(v,"is"),m.is=v;function b(x,T){const C=new Set;return x.document!==T.document&&C.add("document"),x.kind!==T.kind&&C.add("kind"),x.executionSummary!==T.executionSummary&&C.add("executionSummary"),(x.metadata!==void 0||T.metadata!==void 0)&&!w(x.metadata,T.metadata)&&C.add("metadata"),(x.executionSummary!==void 0||T.executionSummary!==void 0)&&!i.equals(x.executionSummary,T.executionSummary)&&C.add("executionSummary"),C}l(b,"diff"),F(b,"diff"),m.diff=b;function w(x,T){if(x===T)return!0;if(x==null||T===null||T===void 0||typeof x!=typeof T||typeof x!="object")return!1;const C=Array.isArray(x),S=Array.isArray(T);if(C!==S)return!1;if(C&&S){if(x.length!==T.length)return!1;for(let E=0;E<x.length;E++)if(!w(x[E],T[E]))return!1}if(r.objectLiteral(x)&&r.objectLiteral(T)){const E=Object.keys(x),k=Object.keys(T);if(E.length!==k.length||(E.sort(),k.sort(),!w(E,k)))return!1;for(let A=0;A<E.length;A++){const I=E[A];if(!w(x[I],T[I]))return!1}}return!0}l(w,"equalsMetadata"),F(w,"equalsMetadata")})(s||(t.NotebookCell=s={}));var o;(function(m){function y(b,w,x,T){return{uri:b,notebookType:w,version:x,cells:T}}l(y,"create"),F(y,"create"),m.create=y;function v(b){const w=b;return r.objectLiteral(w)&&r.string(w.uri)&&e.integer.is(w.version)&&r.typedArray(w.cells,s.is)}l(v,"is"),F(v,"is"),m.is=v})(o||(t.NotebookDocument=o={}));var u;(function(m){m.method="notebookDocument/sync",m.messageDirection=n.MessageDirection.clientToServer,m.type=new n.RegistrationType(m.method)})(u||(t.NotebookDocumentSyncRegistrationType=u={}));var h;(function(m){m.method="notebookDocument/didOpen",m.messageDirection=n.MessageDirection.clientToServer,m.type=new n.ProtocolNotificationType(m.method),m.registrationMethod=u.method})(h||(t.DidOpenNotebookDocumentNotification=h={}));var d;(function(m){function y(b){const w=b;return r.objectLiteral(w)&&e.uinteger.is(w.start)&&e.uinteger.is(w.deleteCount)&&(w.cells===void 0||r.typedArray(w.cells,s.is))}l(y,"is"),F(y,"is"),m.is=y;function v(b,w,x){const T={start:b,deleteCount:w};return x!==void 0&&(T.cells=x),T}l(v,"create"),F(v,"create"),m.create=v})(d||(t.NotebookCellArrayChange=d={}));var f;(function(m){m.method="notebookDocument/didChange",m.messageDirection=n.MessageDirection.clientToServer,m.type=new n.ProtocolNotificationType(m.method),m.registrationMethod=u.method})(f||(t.DidChangeNotebookDocumentNotification=f={}));var p;(function(m){m.method="notebookDocument/didSave",m.messageDirection=n.MessageDirection.clientToServer,m.type=new n.ProtocolNotificationType(m.method),m.registrationMethod=u.method})(p||(t.DidSaveNotebookDocumentNotification=p={}));var g;(function(m){m.method="notebookDocument/didClose",m.messageDirection=n.MessageDirection.clientToServer,m.type=new n.ProtocolNotificationType(m.method),m.registrationMethod=u.method})(g||(t.DidCloseNotebookDocumentNotification=g={}))}}),vXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;var e=ui(),r;(function(n){n.method="textDocument/inlineCompletion",n.messageDirection=e.MessageDirection.clientToServer,n.type=new e.ProtocolRequestType(n.method)})(r||(t.InlineCompletionRequest=r={}))}}),bXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;var e=ui(),r=(j5(),Vj(FL)),n=YK(),a=QKt();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:F(function(){return a.ImplementationRequest},"get")});var i=JKt();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:F(function(){return i.TypeDefinitionRequest},"get")});var s=eXt();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:F(function(){return s.WorkspaceFoldersRequest},"get")}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:F(function(){return s.DidChangeWorkspaceFoldersNotification},"get")});var o=tXt();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:F(function(){return o.ConfigurationRequest},"get")});var u=rXt();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:F(function(){return u.DocumentColorRequest},"get")}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:F(function(){return u.ColorPresentationRequest},"get")});var h=nXt();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:F(function(){return h.FoldingRangeRequest},"get")}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:F(function(){return h.FoldingRangeRefreshRequest},"get")});var d=aXt();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:F(function(){return d.DeclarationRequest},"get")});var f=iXt();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:F(function(){return f.SelectionRangeRequest},"get")});var p=sXt();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:F(function(){return p.WorkDoneProgress},"get")}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:F(function(){return p.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:F(function(){return p.WorkDoneProgressCancelNotification},"get")});var g=oXt();Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:F(function(){return g.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:F(function(){return g.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:F(function(){return g.CallHierarchyPrepareRequest},"get")});var m=lXt();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:F(function(){return m.TokenFormat},"get")}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:F(function(){return m.SemanticTokensRequest},"get")}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:F(function(){return m.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:F(function(){return m.SemanticTokensRangeRequest},"get")}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:F(function(){return m.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:F(function(){return m.SemanticTokensRegistrationType},"get")});var y=cXt();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:F(function(){return y.ShowDocumentRequest},"get")});var v=uXt();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:F(function(){return v.LinkedEditingRangeRequest},"get")});var b=hXt();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:F(function(){return b.FileOperationPatternKind},"get")}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:F(function(){return b.DidCreateFilesNotification},"get")}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:F(function(){return b.WillCreateFilesRequest},"get")}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:F(function(){return b.DidRenameFilesNotification},"get")}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:F(function(){return b.WillRenameFilesRequest},"get")}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:F(function(){return b.DidDeleteFilesNotification},"get")}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:F(function(){return b.WillDeleteFilesRequest},"get")});var w=dXt();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:F(function(){return w.UniquenessLevel},"get")}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:F(function(){return w.MonikerKind},"get")}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:F(function(){return w.MonikerRequest},"get")});var x=fXt();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:F(function(){return x.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:F(function(){return x.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:F(function(){return x.TypeHierarchySupertypesRequest},"get")});var T=pXt();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:F(function(){return T.InlineValueRequest},"get")}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:F(function(){return T.InlineValueRefreshRequest},"get")});var C=gXt();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:F(function(){return C.InlayHintRequest},"get")}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:F(function(){return C.InlayHintResolveRequest},"get")}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:F(function(){return C.InlayHintRefreshRequest},"get")});var S=mXt();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:F(function(){return S.DiagnosticServerCancellationData},"get")}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:F(function(){return S.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:F(function(){return S.DocumentDiagnosticRequest},"get")}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:F(function(){return S.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:F(function(){return S.DiagnosticRefreshRequest},"get")});var E=yXt();Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:F(function(){return E.NotebookCellKind},"get")}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:F(function(){return E.ExecutionSummary},"get")}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:F(function(){return E.NotebookCell},"get")}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:F(function(){return E.NotebookDocument},"get")}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:F(function(){return E.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:F(function(){return E.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:F(function(){return E.NotebookCellArrayChange},"get")}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:F(function(){return E.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:F(function(){return E.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:F(function(){return E.DidCloseNotebookDocumentNotification},"get")});var k=vXt();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:F(function(){return k.InlineCompletionRequest},"get")});var A;(function(we){function gt(ge){const ie=ge;return n.string(ie)||n.string(ie.language)||n.string(ie.scheme)||n.string(ie.pattern)}l(gt,"is"),F(gt,"is"),we.is=gt})(A||(t.TextDocumentFilter=A={}));var I;(function(we){function gt(ge){const ie=ge;return n.objectLiteral(ie)&&(n.string(ie.notebookType)||n.string(ie.scheme)||n.string(ie.pattern))}l(gt,"is"),F(gt,"is"),we.is=gt})(I||(t.NotebookDocumentFilter=I={}));var L;(function(we){function gt(ge){const ie=ge;return n.objectLiteral(ie)&&(n.string(ie.notebook)||I.is(ie.notebook))&&(ie.language===void 0||n.string(ie.language))}l(gt,"is"),F(gt,"is"),we.is=gt})(L||(t.NotebookCellTextDocumentFilter=L={}));var R;(function(we){function gt(ge){if(!Array.isArray(ge))return!1;for(let ie of ge)if(!n.string(ie)&&!A.is(ie)&&!L.is(ie))return!1;return!0}l(gt,"is"),F(gt,"is"),we.is=gt})(R||(t.DocumentSelector=R={}));var O;(function(we){we.method="client/registerCapability",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolRequestType(we.method)})(O||(t.RegistrationRequest=O={}));var M;(function(we){we.method="client/unregisterCapability",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolRequestType(we.method)})(M||(t.UnregistrationRequest=M={}));var P;(function(we){we.Create="create",we.Rename="rename",we.Delete="delete"})(P||(t.ResourceOperationKind=P={}));var z;(function(we){we.Abort="abort",we.Transactional="transactional",we.TextOnlyTransactional="textOnlyTransactional",we.Undo="undo"})(z||(t.FailureHandlingKind=z={}));var D;(function(we){we.UTF8="utf-8",we.UTF16="utf-16",we.UTF32="utf-32"})(D||(t.PositionEncodingKind=D={}));var B;(function(we){function gt(ge){const ie=ge;return ie&&n.string(ie.id)&&ie.id.length>0}l(gt,"hasId"),F(gt,"hasId"),we.hasId=gt})(B||(t.StaticRegistrationOptions=B={}));var W;(function(we){function gt(ge){const ie=ge;return ie&&(ie.documentSelector===null||R.is(ie.documentSelector))}l(gt,"is"),F(gt,"is"),we.is=gt})(W||(t.TextDocumentRegistrationOptions=W={}));var U;(function(we){function gt(ie){const be=ie;return n.objectLiteral(be)&&(be.workDoneProgress===void 0||n.boolean(be.workDoneProgress))}l(gt,"is"),F(gt,"is"),we.is=gt;function ge(ie){const be=ie;return be&&n.boolean(be.workDoneProgress)}l(ge,"hasWorkDoneProgress"),F(ge,"hasWorkDoneProgress"),we.hasWorkDoneProgress=ge})(U||(t.WorkDoneProgressOptions=U={}));var j;(function(we){we.method="initialize",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(j||(t.InitializeRequest=j={}));var V;(function(we){we.unknownProtocolVersion=1})(V||(t.InitializeErrorCodes=V={}));var Y;(function(we){we.method="initialized",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType(we.method)})(Y||(t.InitializedNotification=Y={}));var H;(function(we){we.method="shutdown",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType0(we.method)})(H||(t.ShutdownRequest=H={}));var q;(function(we){we.method="exit",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType0(we.method)})(q||(t.ExitNotification=q={}));var Z;(function(we){we.method="workspace/didChangeConfiguration",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType(we.method)})(Z||(t.DidChangeConfigurationNotification=Z={}));var K;(function(we){we.Error=1,we.Warning=2,we.Info=3,we.Log=4,we.Debug=5})(K||(t.MessageType=K={}));var re;(function(we){we.method="window/showMessage",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolNotificationType(we.method)})(re||(t.ShowMessageNotification=re={}));var Q;(function(we){we.method="window/showMessageRequest",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolRequestType(we.method)})(Q||(t.ShowMessageRequest=Q={}));var te;(function(we){we.method="window/logMessage",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolNotificationType(we.method)})(te||(t.LogMessageNotification=te={}));var ee;(function(we){we.method="telemetry/event",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolNotificationType(we.method)})(ee||(t.TelemetryEventNotification=ee={}));var J;(function(we){we.None=0,we.Full=1,we.Incremental=2})(J||(t.TextDocumentSyncKind=J={}));var ae;(function(we){we.method="textDocument/didOpen",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType(we.method)})(ae||(t.DidOpenTextDocumentNotification=ae={}));var se;(function(we){function gt(ie){let be=ie;return be!=null&&typeof be.text=="string"&&be.range!==void 0&&(be.rangeLength===void 0||typeof be.rangeLength=="number")}l(gt,"isIncremental"),F(gt,"isIncremental"),we.isIncremental=gt;function ge(ie){let be=ie;return be!=null&&typeof be.text=="string"&&be.range===void 0&&be.rangeLength===void 0}l(ge,"isFull"),F(ge,"isFull"),we.isFull=ge})(se||(t.TextDocumentContentChangeEvent=se={}));var fe;(function(we){we.method="textDocument/didChange",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType(we.method)})(fe||(t.DidChangeTextDocumentNotification=fe={}));var ve;(function(we){we.method="textDocument/didClose",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType(we.method)})(ve||(t.DidCloseTextDocumentNotification=ve={}));var de;(function(we){we.method="textDocument/didSave",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType(we.method)})(de||(t.DidSaveTextDocumentNotification=de={}));var Ee;(function(we){we.Manual=1,we.AfterDelay=2,we.FocusOut=3})(Ee||(t.TextDocumentSaveReason=Ee={}));var Ce;(function(we){we.method="textDocument/willSave",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType(we.method)})(Ce||(t.WillSaveTextDocumentNotification=Ce={}));var De;(function(we){we.method="textDocument/willSaveWaitUntil",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(De||(t.WillSaveTextDocumentWaitUntilRequest=De={}));var ce;(function(we){we.method="workspace/didChangeWatchedFiles",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolNotificationType(we.method)})(ce||(t.DidChangeWatchedFilesNotification=ce={}));var Ie;(function(we){we.Created=1,we.Changed=2,we.Deleted=3})(Ie||(t.FileChangeType=Ie={}));var ye;(function(we){function gt(ge){const ie=ge;return n.objectLiteral(ie)&&(r.URI.is(ie.baseUri)||r.WorkspaceFolder.is(ie.baseUri))&&n.string(ie.pattern)}l(gt,"is"),F(gt,"is"),we.is=gt})(ye||(t.RelativePattern=ye={}));var pe;(function(we){we.Create=1,we.Change=2,we.Delete=4})(pe||(t.WatchKind=pe={}));var Ae;(function(we){we.method="textDocument/publishDiagnostics",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolNotificationType(we.method)})(Ae||(t.PublishDiagnosticsNotification=Ae={}));var Ve;(function(we){we.Invoked=1,we.TriggerCharacter=2,we.TriggerForIncompleteCompletions=3})(Ve||(t.CompletionTriggerKind=Ve={}));var ze;(function(we){we.method="textDocument/completion",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(ze||(t.CompletionRequest=ze={}));var We;(function(we){we.method="completionItem/resolve",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(We||(t.CompletionResolveRequest=We={}));var me;(function(we){we.method="textDocument/hover",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(me||(t.HoverRequest=me={}));var Se;(function(we){we.Invoked=1,we.TriggerCharacter=2,we.ContentChange=3})(Se||(t.SignatureHelpTriggerKind=Se={}));var ne;(function(we){we.method="textDocument/signatureHelp",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(ne||(t.SignatureHelpRequest=ne={}));var xe;(function(we){we.method="textDocument/definition",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(xe||(t.DefinitionRequest=xe={}));var oe;(function(we){we.method="textDocument/references",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(oe||(t.ReferencesRequest=oe={}));var _e;(function(we){we.method="textDocument/documentHighlight",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(_e||(t.DocumentHighlightRequest=_e={}));var ue;(function(we){we.method="textDocument/documentSymbol",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(ue||(t.DocumentSymbolRequest=ue={}));var tt;(function(we){we.method="textDocument/codeAction",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(tt||(t.CodeActionRequest=tt={}));var Re;(function(we){we.method="codeAction/resolve",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(Re||(t.CodeActionResolveRequest=Re={}));var et;(function(we){we.method="workspace/symbol",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(et||(t.WorkspaceSymbolRequest=et={}));var Xe;(function(we){we.method="workspaceSymbol/resolve",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(Xe||(t.WorkspaceSymbolResolveRequest=Xe={}));var ot;(function(we){we.method="textDocument/codeLens",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(ot||(t.CodeLensRequest=ot={}));var Ge;(function(we){we.method="codeLens/resolve",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(Ge||(t.CodeLensResolveRequest=Ge={}));var ht;(function(we){we.method="workspace/codeLens/refresh",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolRequestType0(we.method)})(ht||(t.CodeLensRefreshRequest=ht={}));var Je;(function(we){we.method="textDocument/documentLink",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(Je||(t.DocumentLinkRequest=Je={}));var St;(function(we){we.method="documentLink/resolve",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(St||(t.DocumentLinkResolveRequest=St={}));var He;(function(we){we.method="textDocument/formatting",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(He||(t.DocumentFormattingRequest=He={}));var dt;(function(we){we.method="textDocument/rangeFormatting",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(dt||(t.DocumentRangeFormattingRequest=dt={}));var Oe;(function(we){we.method="textDocument/rangesFormatting",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(Oe||(t.DocumentRangesFormattingRequest=Oe={}));var vt;(function(we){we.method="textDocument/onTypeFormatting",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(vt||(t.DocumentOnTypeFormattingRequest=vt={}));var qe;(function(we){we.Identifier=1})(qe||(t.PrepareSupportDefaultBehavior=qe={}));var Me;(function(we){we.method="textDocument/rename",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(Me||(t.RenameRequest=Me={}));var lt;(function(we){we.method="textDocument/prepareRename",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(lt||(t.PrepareRenameRequest=lt={}));var it;(function(we){we.method="workspace/executeCommand",we.messageDirection=e.MessageDirection.clientToServer,we.type=new e.ProtocolRequestType(we.method)})(it||(t.ExecuteCommandRequest=it={}));var Ue;(function(we){we.method="workspace/applyEdit",we.messageDirection=e.MessageDirection.serverToClient,we.type=new e.ProtocolRequestType("workspace/applyEdit")})(Ue||(t.ApplyWorkspaceEditRequest=Ue={}))}}),xXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var e=eE();function r(n,a,i,s){return e.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,e.createMessageConnection)(n,a,i,s)}l(r,"createProtocolConnection"),F(r,"createProtocolConnection"),t.createProtocolConnection=r}}),wXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(t){var e=t&&t.__createBinding||(Object.create?function(i,s,o,u){u===void 0&&(u=o);var h=Object.getOwnPropertyDescriptor(s,o);(!h||("get"in h?!s.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:F(function(){return s[o]},"get")}),Object.defineProperty(i,u,h)}:function(i,s,o,u){u===void 0&&(u=o),i[u]=s[o]}),r=t&&t.__exportStar||function(i,s){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,i,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,r(eE(),t),r((j5(),Vj(FL)),t),r(ui(),t),r(bXt(),t);var n=xXt();Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:F(function(){return n.createProtocolConnection},"get")});var a;(function(i){i.lspReservedErrorRangeStart=-32899,i.RequestFailed=-32803,i.ServerCancelled=-32802,i.ContentModified=-32801,i.RequestCancelled=-32800,i.lspReservedErrorRangeEnd=-32800})(a||(t.LSPErrorCodes=a={}))}}),TXt=sn({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(t){var e=t&&t.__createBinding||(Object.create?function(i,s,o,u){u===void 0&&(u=o);var h=Object.getOwnPropertyDescriptor(s,o);(!h||("get"in h?!s.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:F(function(){return s[o]},"get")}),Object.defineProperty(i,u,h)}:function(i,s,o,u){u===void 0&&(u=o),i[u]=s[o]}),r=t&&t.__exportStar||function(i,s){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,i,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;var n=l8e();r(l8e(),t),r(wXt(),t);function a(i,s,o,u){return(0,n.createMessageConnection)(i,s,o,u)}l(a,"createProtocolConnection"),F(a,"createProtocolConnection"),t.createProtocolConnection=a}}),c8e={};Fp(c8e,{AbstractAstReflection:l(()=>KK,"AbstractAstReflection"),AbstractCstNode:l(()=>MQ,"AbstractCstNode"),AbstractLangiumParser:l(()=>RQ,"AbstractLangiumParser"),AbstractParserErrorMessageProvider:l(()=>mDe,"AbstractParserErrorMessageProvider"),AbstractThreadedAsyncParser:l(()=>jor,"AbstractThreadedAsyncParser"),AstUtils:l(()=>XK,"AstUtils"),BiMap:l(()=>jM,"BiMap"),Cancellation:l(()=>Oa,"Cancellation"),CompositeCstNodeImpl:l(()=>OM,"CompositeCstNodeImpl"),ContextCache:l(()=>XM,"ContextCache"),CstNodeBuilder:l(()=>dDe,"CstNodeBuilder"),CstUtils:l(()=>UK,"CstUtils"),DEFAULT_TOKENIZE_OPTIONS:l(()=>rJ,"DEFAULT_TOKENIZE_OPTIONS"),DONE_RESULT:l(()=>fl,"DONE_RESULT"),DatatypeSymbol:l(()=>DM,"DatatypeSymbol"),DefaultAstNodeDescriptionProvider:l(()=>UDe,"DefaultAstNodeDescriptionProvider"),DefaultAstNodeLocator:l(()=>KDe,"DefaultAstNodeLocator"),DefaultAsyncParser:l(()=>gFe,"DefaultAsyncParser"),DefaultCommentProvider:l(()=>pFe,"DefaultCommentProvider"),DefaultConfigurationProvider:l(()=>XDe,"DefaultConfigurationProvider"),DefaultDocumentBuilder:l(()=>ZDe,"DefaultDocumentBuilder"),DefaultDocumentValidator:l(()=>YDe,"DefaultDocumentValidator"),DefaultHydrator:l(()=>yFe,"DefaultHydrator"),DefaultIndexManager:l(()=>QDe,"DefaultIndexManager"),DefaultJsonSerializer:l(()=>WDe,"DefaultJsonSerializer"),DefaultLangiumDocumentFactory:l(()=>MDe,"DefaultLangiumDocumentFactory"),DefaultLangiumDocuments:l(()=>PDe,"DefaultLangiumDocuments"),DefaultLangiumProfiler:l(()=>Jor,"DefaultLangiumProfiler"),DefaultLexer:l(()=>nJ,"DefaultLexer"),DefaultLexerErrorMessageProvider:l(()=>eFe,"DefaultLexerErrorMessageProvider"),DefaultLinker:l(()=>RDe,"DefaultLinker"),DefaultNameProvider:l(()=>ODe,"DefaultNameProvider"),DefaultReferenceDescriptionProvider:l(()=>jDe,"DefaultReferenceDescriptionProvider"),DefaultReferences:l(()=>DDe,"DefaultReferences"),DefaultScopeComputation:l(()=>FDe,"DefaultScopeComputation"),DefaultScopeProvider:l(()=>HDe,"DefaultScopeProvider"),DefaultServiceRegistry:l(()=>VDe,"DefaultServiceRegistry"),DefaultTokenBuilder:l(()=>WM,"DefaultTokenBuilder"),DefaultValueConverter:l(()=>WQ,"DefaultValueConverter"),DefaultWorkspaceLock:l(()=>mFe,"DefaultWorkspaceLock"),DefaultWorkspaceManager:l(()=>JDe,"DefaultWorkspaceManager"),Deferred:l(()=>Xf,"Deferred"),Disposable:l(()=>ny,"Disposable"),DisposableCache:l(()=>KM,"DisposableCache"),DocumentCache:l(()=>zDe,"DocumentCache"),DocumentState:l(()=>yn,"DocumentState"),DocumentValidator:l(()=>fu,"DocumentValidator"),EMPTY_SCOPE:l(()=>Gor,"EMPTY_SCOPE"),EMPTY_STREAM:l(()=>tE,"EMPTY_STREAM"),EmptyFileSystem:l(()=>po,"EmptyFileSystem"),EmptyFileSystemProvider:l(()=>wFe,"EmptyFileSystemProvider"),ErrorWithLocation:l(()=>v$,"ErrorWithLocation"),GrammarAST:l(()=>d8e,"GrammarAST"),GrammarUtils:l(()=>kX,"GrammarUtils"),IndentationAwareLexer:l(()=>Xor,"IndentationAwareLexer"),IndentationAwareTokenBuilder:l(()=>xFe,"IndentationAwareTokenBuilder"),JSDocDocumentationProvider:l(()=>fFe,"JSDocDocumentationProvider"),LangiumCompletionParser:l(()=>yDe,"LangiumCompletionParser"),LangiumParser:l(()=>gDe,"LangiumParser"),LangiumParserErrorMessageProvider:l(()=>OQ,"LangiumParserErrorMessageProvider"),LeafCstNodeImpl:l(()=>RM,"LeafCstNodeImpl"),LexingMode:l(()=>ay,"LexingMode"),MapScope:l(()=>Vor,"MapScope"),Module:l(()=>fJ,"Module"),MultiMap:l(()=>Zf,"MultiMap"),MultiMapScope:l(()=>BDe,"MultiMapScope"),OperationCancelled:l(()=>Cd,"OperationCancelled"),ParserWorker:l(()=>Kor,"ParserWorker"),ProfilingTask:l(()=>EFe,"ProfilingTask"),Reduction:l(()=>Z5,"Reduction"),RefResolving:l(()=>ty,"RefResolving"),RegExpUtils:l(()=>NX,"RegExpUtils"),RootCstNodeImpl:l(()=>PQ,"RootCstNodeImpl"),SimpleCache:l(()=>XQ,"SimpleCache"),StreamImpl:l(()=>pd,"StreamImpl"),StreamScope:l(()=>KQ,"StreamScope"),TextDocument:l(()=>YM,"TextDocument"),TreeStreamImpl:l(()=>rE,"TreeStreamImpl"),URI:l(()=>Mc,"URI"),UriTrie:l(()=>UQ,"UriTrie"),UriUtils:l(()=>xl,"UriUtils"),VALIDATE_EACH_NODE:l(()=>qDe,"VALIDATE_EACH_NODE"),ValidationCategory:l(()=>ZM,"ValidationCategory"),ValidationRegistry:l(()=>GDe,"ValidationRegistry"),ValueConverter:l(()=>Ed,"ValueConverter"),WorkspaceCache:l(()=>ZQ,"WorkspaceCache"),assertCondition:l(()=>AX,"assertCondition"),assertUnreachable:l(()=>qp,"assertUnreachable"),createCompletionParser:l(()=>BQ,"createCompletionParser"),createDefaultCoreModule:l(()=>Vs,"createDefaultCoreModule"),createDefaultSharedCoreModule:l(()=>Gs,"createDefaultSharedCoreModule"),createGrammarConfig:l(()=>jX,"createGrammarConfig"),createLangiumParser:l(()=>zQ,"createLangiumParser"),createParser:l(()=>BM,"createParser"),delayNextTick:l(()=>VM,"delayNextTick"),diagnosticData:l(()=>ry,"diagnosticData"),eagerLoad:l(()=>pJ,"eagerLoad"),getDiagnosticRange:l(()=>eJ,"getDiagnosticRange"),indentationBuilderDefaultOptions:l(()=>yJ,"indentationBuilderDefaultOptions"),inject:l(()=>Mn,"inject"),interruptAndCheck:l(()=>Ws,"interruptAndCheck"),isAstNode:l(()=>ts,"isAstNode"),isAstNodeDescription:l(()=>jK,"isAstNodeDescription"),isAstNodeWithComment:l(()=>QQ,"isAstNodeWithComment"),isCompositeCstNode:l(()=>Rf,"isCompositeCstNode"),isIMultiModeLexerDefinition:l(()=>tP,"isIMultiModeLexerDefinition"),isJSDoc:l(()=>iJ,"isJSDoc"),isLeafCstNode:l(()=>p1,"isLeafCstNode"),isLinkingError:l(()=>f1,"isLinkingError"),isMultiReference:l(()=>fd,"isMultiReference"),isNamed:l(()=>jQ,"isNamed"),isOperationCancelled:l(()=>ey,"isOperationCancelled"),isReference:l(()=>dl,"isReference"),isRootCstNode:l(()=>UL,"isRootCstNode"),isTokenTypeArray:l(()=>eP,"isTokenTypeArray"),isTokenTypeDictionary:l(()=>rP,"isTokenTypeDictionary"),loadGrammarFromJson:l(()=>qs,"loadGrammarFromJson"),parseJSDoc:l(()=>aJ,"parseJSDoc"),prepareLangiumParser:l(()=>HQ,"prepareLangiumParser"),setInterruptionPeriod:l(()=>VQ,"setInterruptionPeriod"),startCancelableOperation:l(()=>qM,"startCancelableOperation"),stream:l(()=>da,"stream"),toDiagnosticData:l(()=>tJ,"toDiagnosticData"),toDiagnosticSeverity:l(()=>J_,"toDiagnosticSeverity")});var UK={};Fp(UK,{DefaultNameRegexp:l(()=>wX,"DefaultNameRegexp"),RangeComparison:l(()=>md,"RangeComparison"),compareRange:l(()=>bX,"compareRange"),findCommentNode:l(()=>TX,"findCommentNode"),findDeclarationNodeAtOffset:l(()=>L8e,"findDeclarationNodeAtOffset"),findLeafNodeAtOffset:l(()=>y$,"findLeafNodeAtOffset"),findLeafNodeBeforeOffset:l(()=>EX,"findLeafNodeBeforeOffset"),flattenCst:l(()=>I8e,"flattenCst"),getDatatypeNode:l(()=>N8e,"getDatatypeNode"),getInteriorNodes:l(()=>P8e,"getInteriorNodes"),getNextNode:l(()=>$8e,"getNextNode"),getPreviousNode:l(()=>SX,"getPreviousNode"),getStartlineNode:l(()=>M8e,"getStartlineNode"),inRange:l(()=>xX,"inRange"),isChildNode:l(()=>vX,"isChildNode"),isCommentNode:l(()=>m$,"isCommentNode"),streamCst:l(()=>pE,"streamCst"),toDocumentSegment:l(()=>gE,"toDocumentSegment"),tokenToRange:l(()=>l_,"tokenToRange")});function ts(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}l(ts,"isAstNode"),F(ts,"isAstNode");function dl(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}l(dl,"isReference"),F(dl,"isReference");function fd(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}l(fd,"isMultiReference"),F(fd,"isMultiReference");function jK(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}l(jK,"isAstNodeDescription"),F(jK,"isAstNodeDescription");function f1(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}l(f1,"isLinkingError"),F(f1,"isLinkingError");var KK=(Uy=class{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var a;const r=this.types[e.container.$type];if(!r)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=(a=r.properties[e.property])==null?void 0:a.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const r=this.types[e];return r||{name:e,properties:{},superTypes:[]}}isInstance(e,r){return ts(e)&&this.isSubtype(e.$type,r)}isSubtype(e,r){if(e===r)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const a=n[r];if(a!==void 0)return a;{const i=this.types[e],s=i?i.superTypes.some(o=>this.isSubtype(o,r)):!1;return n[r]=s,s}}getAllSubTypes(e){const r=this.allSubtypes[e];if(r)return r;{const n=this.getAllTypes(),a=[];for(const i of n)this.isSubtype(i,e)&&a.push(i);return this.allSubtypes[e]=a,a}}},l(Uy,"AbstractAstReflection"),F(Uy,"AbstractAstReflection"),Uy);function Rf(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}l(Rf,"isCompositeCstNode"),F(Rf,"isCompositeCstNode");function p1(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}l(p1,"isLeafCstNode"),F(p1,"isLeafCstNode");function UL(t){return Rf(t)&&typeof t.fullText=="string"}l(UL,"isRootCstNode"),F(UL,"isRootCstNode");var pd=(_l=class{constructor(e,r){this.startFn=e,this.nextFn=r}iterator(){const e={state:this.startFn(),next:F(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let r=0,n=e.next();for(;!n.done;)r++,n=e.next();return r}toArray(){const e=[],r=this.iterator();let n;do n=r.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,r){const n=this.map(a=>[e?e(a):a,r?r(a):a]);return new Map(n)}toString(){return this.join()}concat(e){return new _l(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return fl})}join(e=","){const r=this.iterator();let n="",a,i=!1;do a=r.next(),a.done||(i&&(n+=e),n+=u8e(a.value)),i=!0;while(!a.done);return n}indexOf(e,r=0){const n=this.iterator();let a=0,i=n.next();for(;!i.done;){if(a>=r&&i.value===e)return a;i=n.next(),a++}return-1}every(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(!e(n.value))return!1;n=r.next()}return!0}some(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return!0;n=r.next()}return!1}forEach(e){const r=this.iterator();let n=0,a=r.next();for(;!a.done;)e(a.value,n),a=r.next(),n++}map(e){return new _l(this.startFn,r=>{const{done:n,value:a}=this.nextFn(r);return n?fl:{done:!1,value:e(a)}})}filter(e){return new _l(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&e(n.value))return n;while(!n.done);return fl})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,r){const n=this.iterator();let a=r,i=n.next();for(;!i.done;)a===void 0?a=i.value:a=e(a,i.value),i=n.next();return a}reduceRight(e,r){return this.recursiveReduce(this.iterator(),e,r)}recursiveReduce(e,r,n){const a=e.next();if(a.done)return n;const i=this.recursiveReduce(e,r,n);return i===void 0?a.value:r(i,a.value)}find(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(e(n.value))return n.value;n=r.next()}}findIndex(e){const r=this.iterator();let n=0,a=r.next();for(;!a.done;){if(e(a.value))return n;a=r.next(),n++}return-1}includes(e){const r=this.iterator();let n=r.next();for(;!n.done;){if(n.value===e)return!0;n=r.next()}return!1}flatMap(e){return new _l(()=>({this:this.startFn()}),r=>{do{if(r.iterator){const i=r.iterator.next();if(i.done)r.iterator=void 0;else return i}const{done:n,value:a}=this.nextFn(r.this);if(!n){const i=e(a);if(X5(i))r.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}}while(r.iterator);return fl})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const r=e>1?this.flat(e-1):this;return new _l(()=>({this:r.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:a,value:i}=r.nextFn(n.this);if(!a)if(X5(i))n.iterator=i[Symbol.iterator]();else return{done:!1,value:i}}while(n.iterator);return fl})}head(){const r=this.iterator().next();if(!r.done)return r.value}tail(e=1){return new _l(()=>{const r=this.startFn();for(let n=0;n<e;n++)if(this.nextFn(r).done)return r;return r},this.nextFn)}limit(e){return new _l(()=>({size:0,state:this.startFn()}),r=>(r.size++,r.size>e?fl:this.nextFn(r.state)))}distinct(e){return new _l(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){const a=e?e(n.value):n.value;if(!r.set.has(a))return r.set.add(a),n}while(!n.done);return fl})}exclude(e,r){const n=new Set;for(const a of e){const i=r?r(a):a;n.add(i)}return this.filter(a=>{const i=r?r(a):a;return!n.has(i)})}},l(_l,"_StreamImpl"),F(_l,"StreamImpl"),_l);function u8e(t){return typeof t=="string"?t:typeof t=="undefined"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}l(u8e,"toString"),F(u8e,"toString");function X5(t){return!!t&&typeof t[Symbol.iterator]=="function"}l(X5,"isIterable"),F(X5,"isIterable");var tE=new pd(()=>{},()=>fl),fl=Object.freeze({done:!0,value:void 0});function da(...t){if(t.length===1){const e=t[0];if(e instanceof pd)return e;if(X5(e))return new pd(()=>e[Symbol.iterator](),r=>r.next());if(typeof e.length=="number")return new pd(()=>({index:0}),r=>r.index<e.length?{done:!1,value:e[r.index++]}:fl)}return t.length>1?new pd(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const r=e.iterator.next();if(!r.done)return r;e.iterator=void 0}if(e.array){if(e.arrIndex<e.array.length)return{done:!1,value:e.array[e.arrIndex++]};e.array=void 0,e.arrIndex=0}if(e.collIndex<t.length){const r=t[e.collIndex++];X5(r)?e.iterator=r[Symbol.iterator]():r&&typeof r.length=="number"&&(e.array=r)}}while(e.iterator||e.array||e.collIndex<t.length);return fl}):tE}l(da,"stream"),F(da,"stream");var rE=(jy=class extends pd{constructor(e,r,n){super(()=>({iterators:n!=null&&n.includeRoot?[[e][Symbol.iterator]()]:[r(e)[Symbol.iterator]()],pruned:!1}),a=>{for(a.pruned&&(a.iterators.pop(),a.pruned=!1);a.iterators.length>0;){const s=a.iterators[a.iterators.length-1].next();if(s.done)a.iterators.pop();else return a.iterators.push(r(s.value)[Symbol.iterator]()),s}return fl})}iterator(){const e={state:this.startFn(),next:F(()=>this.nextFn(e.state),"next"),prune:F(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},l(jy,"TreeStreamImpl"),F(jy,"TreeStreamImpl"),jy),Z5;(function(t){function e(i){return i.reduce((s,o)=>s+o,0)}l(e,"sum"),F(e,"sum"),t.sum=e;function r(i){return i.reduce((s,o)=>s*o,0)}l(r,"product"),F(r,"product"),t.product=r;function n(i){return i.reduce((s,o)=>Math.min(s,o))}l(n,"min2"),F(n,"min"),t.min=n;function a(i){return i.reduce((s,o)=>Math.max(s,o))}l(a,"max"),F(a,"max"),t.max=a})(Z5||(Z5={}));var XK={};Fp(XK,{assignMandatoryProperties:l(()=>ZK,"assignMandatoryProperties"),copyAstNode:l(()=>XL,"copyAstNode"),findRootNode:l(()=>aE,"findRootNode"),getContainerOfType:l(()=>g1,"getContainerOfType"),getDocument:l(()=>Ju,"getDocument"),getReferenceNodes:l(()=>jL,"getReferenceNodes"),hasContainerOfType:l(()=>h8e,"hasContainerOfType"),linkContentToContainer:l(()=>nE,"linkContentToContainer"),streamAllContents:l(()=>Of,"streamAllContents"),streamAst:l(()=>eh,"streamAst"),streamContents:l(()=>Q5,"streamContents"),streamReferences:l(()=>iE,"streamReferences")});function nE(t,e={}){for(const[r,n]of Object.entries(t))r.startsWith("$")||(Array.isArray(n)?n.forEach((a,i)=>{ts(a)&&(a.$container=t,a.$containerProperty=r,a.$containerIndex=i,e.deep&&nE(a,e))}):ts(n)&&(n.$container=t,n.$containerProperty=r,e.deep&&nE(n,e)))}l(nE,"linkContentToContainer"),F(nE,"linkContentToContainer");function g1(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}l(g1,"getContainerOfType"),F(g1,"getContainerOfType");function h8e(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}l(h8e,"hasContainerOfType"),F(h8e,"hasContainerOfType");function Ju(t){const r=aE(t).$document;if(!r)throw new Error("AST node has no document.");return r}l(Ju,"getDocument"),F(Ju,"getDocument");function aE(t){for(;t.$container;)t=t.$container;return t}l(aE,"findRootNode"),F(aE,"findRootNode");function jL(t){return dl(t)?t.ref?[t.ref]:[]:fd(t)?t.items.map(e=>e.ref):[]}l(jL,"getReferenceNodes"),F(jL,"getReferenceNodes");function Q5(t,e){if(!t)throw new Error("Node must be an AstNode.");const r=e==null?void 0:e.range;return new pd(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndex<n.keys.length;){const a=n.keys[n.keyIndex];if(!a.startsWith("$")){const i=t[a];if(ts(i)){if(n.keyIndex++,KL(i,r))return{done:!1,value:i}}else if(Array.isArray(i)){for(;n.arrayIndex<i.length;){const s=n.arrayIndex++,o=i[s];if(ts(o)&&KL(o,r))return{done:!1,value:o}}n.arrayIndex=0}}n.keyIndex++}return fl})}l(Q5,"streamContents"),F(Q5,"streamContents");function Of(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new rE(t,r=>Q5(r,e))}l(Of,"streamAllContents"),F(Of,"streamAllContents");function eh(t,e){if(t){if(e!=null&&e.range&&!KL(t,e.range))return new rE(t,()=>[])}else throw new Error("Root node must be an AstNode.");return new rE(t,r=>Q5(r,e),{includeRoot:!0})}l(eh,"streamAst"),F(eh,"streamAst");function KL(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)==null?void 0:n.range;return r?xX(r,e):!1}l(KL,"isAstNodeInRange"),F(KL,"isAstNodeInRange");function iE(t){return new pd(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex<e.keys.length;){const r=e.keys[e.keyIndex];if(!r.startsWith("$")){const n=t[r];if(dl(n)||fd(n))return e.keyIndex++,{done:!1,value:{reference:n,container:t,property:r}};if(Array.isArray(n)){for(;e.arrayIndex<n.length;){const a=e.arrayIndex++,i=n[a];if(dl(i)||fd(n))return{done:!1,value:{reference:i,container:t,property:r,index:a}}}e.arrayIndex=0}}e.keyIndex++}return fl})}l(iE,"streamReferences"),F(iE,"streamReferences");function ZK(t,e){const r=t.getTypeMetaData(e.$type),n=e;for(const a of Object.values(r.properties))a.defaultValue!==void 0&&n[a.name]===void 0&&(n[a.name]=QK(a.defaultValue))}l(ZK,"assignMandatoryProperties"),F(ZK,"assignMandatoryProperties");function QK(t){return Array.isArray(t)?[...t.map(QK)]:t}l(QK,"copyDefaultValue"),F(QK,"copyDefaultValue");function XL(t,e,r){const n={$type:t.$type};r&&(r.set(t,n),r.set(n,t));for(const[a,i]of Object.entries(t))if(!a.startsWith("$"))if(ts(i))n[a]=XL(i,e,r);else if(dl(i))n[a]=e(n,a,i.$refNode,i.$refText,i);else if(Array.isArray(i)){const s=[];for(const o of i)ts(o)?s.push(XL(o,e,r)):dl(o)?s.push(e(n,a,o.$refNode,o.$refText,o)):s.push(o);n[a]=s}else n[a]=i;return nE(n,{deep:!0}),n}l(XL,"copyAstNode"),F(XL,"copyAstNode");var d8e={};Fp(d8e,{AbstractElement:l(()=>Ul,"AbstractElement"),AbstractParserRule:l(()=>J5,"AbstractParserRule"),AbstractRule:l(()=>sE,"AbstractRule"),AbstractType:l(()=>kc,"AbstractType"),Action:l(()=>Bp,"Action"),Alternatives:l(()=>e_,"Alternatives"),ArrayLiteral:l(()=>JL,"ArrayLiteral"),ArrayType:l(()=>e$,"ArrayType"),Assignment:l(()=>Hp,"Assignment"),BooleanLiteral:l(()=>t$,"BooleanLiteral"),CharacterRange:l(()=>Wp,"CharacterRange"),Condition:l(()=>Vp,"Condition"),Conjunction:l(()=>t_,"Conjunction"),CrossReference:l(()=>Gp,"CrossReference"),Disjunction:l(()=>r_,"Disjunction"),EndOfFile:l(()=>r$,"EndOfFile"),Grammar:l(()=>Ff,"Grammar"),GrammarImport:l(()=>n$,"GrammarImport"),Group:l(()=>v1,"Group"),InferredType:l(()=>a$,"InferredType"),InfixRule:l(()=>gd,"InfixRule"),InfixRuleOperatorList:l(()=>a_,"InfixRuleOperatorList"),InfixRuleOperators:l(()=>i$,"InfixRuleOperators"),Interface:l(()=>lE,"Interface"),Keyword:l(()=>cE,"Keyword"),LangiumGrammarAstReflection:l(()=>yX,"LangiumGrammarAstReflection"),LangiumGrammarTerminals:l(()=>EXt,"LangiumGrammarTerminals"),NamedArgument:l(()=>uE,"NamedArgument"),NegatedToken:l(()=>x1,"NegatedToken"),Negation:l(()=>s$,"Negation"),NumberLiteral:l(()=>o$,"NumberLiteral"),Parameter:l(()=>hE,"Parameter"),ParameterReference:l(()=>l$,"ParameterReference"),ParserRule:l(()=>th,"ParserRule"),ReferenceType:l(()=>i_,"ReferenceType"),RegexToken:l(()=>w1,"RegexToken"),ReturnType:l(()=>c$,"ReturnType"),RuleCall:l(()=>T1,"RuleCall"),SimpleType:l(()=>dE,"SimpleType"),StringLiteral:l(()=>h$,"StringLiteral"),TerminalAlternatives:l(()=>E1,"TerminalAlternatives"),TerminalElement:l(()=>jl,"TerminalElement"),TerminalGroup:l(()=>C1,"TerminalGroup"),TerminalRule:l(()=>Hf,"TerminalRule"),TerminalRuleCall:l(()=>S1,"TerminalRuleCall"),Type:l(()=>s_,"Type"),TypeAttribute:l(()=>_1,"TypeAttribute"),TypeDefinition:l(()=>k1,"TypeDefinition"),UnionType:l(()=>p$,"UnionType"),UnorderedGroup:l(()=>o_,"UnorderedGroup"),UntilToken:l(()=>A1,"UntilToken"),ValueLiteral:l(()=>N1,"ValueLiteral"),Wildcard:l(()=>fE,"Wildcard"),isAbstractElement:l(()=>ZL,"isAbstractElement"),isAbstractParserRule:l(()=>m1,"isAbstractParserRule"),isAbstractRule:l(()=>f8e,"isAbstractRule"),isAbstractType:l(()=>p8e,"isAbstractType"),isAction:l(()=>zp,"isAction"),isAlternatives:l(()=>QL,"isAlternatives"),isArrayLiteral:l(()=>g8e,"isArrayLiteral"),isArrayType:l(()=>JK,"isArrayType"),isAssignment:l(()=>Df,"isAssignment"),isBooleanLiteral:l(()=>eX,"isBooleanLiteral"),isCharacterRange:l(()=>tX,"isCharacterRange"),isCondition:l(()=>m8e,"isCondition"),isConjunction:l(()=>rX,"isConjunction"),isCrossReference:l(()=>y1,"isCrossReference"),isDisjunction:l(()=>nX,"isDisjunction"),isEndOfFile:l(()=>aX,"isEndOfFile"),isGrammar:l(()=>y8e,"isGrammar"),isGrammarImport:l(()=>v8e,"isGrammarImport"),isGroup:l(()=>b1,"isGroup"),isInferredType:l(()=>n_,"isInferredType"),isInfixRule:l(()=>oE,"isInfixRule"),isInfixRuleOperatorList:l(()=>b8e,"isInfixRuleOperatorList"),isInfixRuleOperators:l(()=>x8e,"isInfixRuleOperators"),isInterface:l(()=>iX,"isInterface"),isKeyword:l(()=>Bf,"isKeyword"),isNamedArgument:l(()=>w8e,"isNamedArgument"),isNegatedToken:l(()=>sX,"isNegatedToken"),isNegation:l(()=>oX,"isNegation"),isNumberLiteral:l(()=>T8e,"isNumberLiteral"),isParameter:l(()=>E8e,"isParameter"),isParameterReference:l(()=>lX,"isParameterReference"),isParserRule:l(()=>pl,"isParserRule"),isReferenceType:l(()=>cX,"isReferenceType"),isRegexToken:l(()=>uX,"isRegexToken"),isReturnType:l(()=>hX,"isReturnType"),isRuleCall:l(()=>zf,"isRuleCall"),isSimpleType:l(()=>u$,"isSimpleType"),isStringLiteral:l(()=>C8e,"isStringLiteral"),isTerminalAlternatives:l(()=>dX,"isTerminalAlternatives"),isTerminalElement:l(()=>S8e,"isTerminalElement"),isTerminalGroup:l(()=>fX,"isTerminalGroup"),isTerminalRule:l(()=>lu,"isTerminalRule"),isTerminalRuleCall:l(()=>d$,"isTerminalRuleCall"),isType:l(()=>f$,"isType"),isTypeAttribute:l(()=>_8e,"isTypeAttribute"),isTypeDefinition:l(()=>k8e,"isTypeDefinition"),isUnionType:l(()=>pX,"isUnionType"),isUnorderedGroup:l(()=>g$,"isUnorderedGroup"),isUntilToken:l(()=>gX,"isUntilToken"),isValueLiteral:l(()=>A8e,"isValueLiteral"),isWildcard:l(()=>mX,"isWildcard"),reflection:l(()=>Hr,"reflection")});var EXt={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Ul={$type:"AbstractElement",cardinality:"cardinality"};function ZL(t){return Hr.isInstance(t,Ul.$type)}l(ZL,"isAbstractElement"),F(ZL,"isAbstractElement");var J5={$type:"AbstractParserRule"};function m1(t){return Hr.isInstance(t,J5.$type)}l(m1,"isAbstractParserRule"),F(m1,"isAbstractParserRule");var sE={$type:"AbstractRule"};function f8e(t){return Hr.isInstance(t,sE.$type)}l(f8e,"isAbstractRule"),F(f8e,"isAbstractRule");var kc={$type:"AbstractType"};function p8e(t){return Hr.isInstance(t,kc.$type)}l(p8e,"isAbstractType"),F(p8e,"isAbstractType");var Bp={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function zp(t){return Hr.isInstance(t,Bp.$type)}l(zp,"isAction"),F(zp,"isAction");var e_={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function QL(t){return Hr.isInstance(t,e_.$type)}l(QL,"isAlternatives"),F(QL,"isAlternatives");var JL={$type:"ArrayLiteral",elements:"elements"};function g8e(t){return Hr.isInstance(t,JL.$type)}l(g8e,"isArrayLiteral"),F(g8e,"isArrayLiteral");var e$={$type:"ArrayType",elementType:"elementType"};function JK(t){return Hr.isInstance(t,e$.$type)}l(JK,"isArrayType"),F(JK,"isArrayType");var Hp={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Df(t){return Hr.isInstance(t,Hp.$type)}l(Df,"isAssignment"),F(Df,"isAssignment");var t$={$type:"BooleanLiteral",true:"true"};function eX(t){return Hr.isInstance(t,t$.$type)}l(eX,"isBooleanLiteral"),F(eX,"isBooleanLiteral");var Wp={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function tX(t){return Hr.isInstance(t,Wp.$type)}l(tX,"isCharacterRange"),F(tX,"isCharacterRange");var Vp={$type:"Condition"};function m8e(t){return Hr.isInstance(t,Vp.$type)}l(m8e,"isCondition"),F(m8e,"isCondition");var t_={$type:"Conjunction",left:"left",right:"right"};function rX(t){return Hr.isInstance(t,t_.$type)}l(rX,"isConjunction"),F(rX,"isConjunction");var Gp={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function y1(t){return Hr.isInstance(t,Gp.$type)}l(y1,"isCrossReference"),F(y1,"isCrossReference");var r_={$type:"Disjunction",left:"left",right:"right"};function nX(t){return Hr.isInstance(t,r_.$type)}l(nX,"isDisjunction"),F(nX,"isDisjunction");var r$={$type:"EndOfFile",cardinality:"cardinality"};function aX(t){return Hr.isInstance(t,r$.$type)}l(aX,"isEndOfFile"),F(aX,"isEndOfFile");var Ff={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function y8e(t){return Hr.isInstance(t,Ff.$type)}l(y8e,"isGrammar"),F(y8e,"isGrammar");var n$={$type:"GrammarImport",path:"path"};function v8e(t){return Hr.isInstance(t,n$.$type)}l(v8e,"isGrammarImport"),F(v8e,"isGrammarImport");var v1={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function b1(t){return Hr.isInstance(t,v1.$type)}l(b1,"isGroup"),F(b1,"isGroup");var a$={$type:"InferredType",name:"name"};function n_(t){return Hr.isInstance(t,a$.$type)}l(n_,"isInferredType"),F(n_,"isInferredType");var gd={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function oE(t){return Hr.isInstance(t,gd.$type)}l(oE,"isInfixRule"),F(oE,"isInfixRule");var a_={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function b8e(t){return Hr.isInstance(t,a_.$type)}l(b8e,"isInfixRuleOperatorList"),F(b8e,"isInfixRuleOperatorList");var i$={$type:"InfixRuleOperators",precedences:"precedences"};function x8e(t){return Hr.isInstance(t,i$.$type)}l(x8e,"isInfixRuleOperators"),F(x8e,"isInfixRuleOperators");var lE={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function iX(t){return Hr.isInstance(t,lE.$type)}l(iX,"isInterface"),F(iX,"isInterface");var cE={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Bf(t){return Hr.isInstance(t,cE.$type)}l(Bf,"isKeyword"),F(Bf,"isKeyword");var uE={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function w8e(t){return Hr.isInstance(t,uE.$type)}l(w8e,"isNamedArgument"),F(w8e,"isNamedArgument");var x1={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function sX(t){return Hr.isInstance(t,x1.$type)}l(sX,"isNegatedToken"),F(sX,"isNegatedToken");var s$={$type:"Negation",value:"value"};function oX(t){return Hr.isInstance(t,s$.$type)}l(oX,"isNegation"),F(oX,"isNegation");var o$={$type:"NumberLiteral",value:"value"};function T8e(t){return Hr.isInstance(t,o$.$type)}l(T8e,"isNumberLiteral"),F(T8e,"isNumberLiteral");var hE={$type:"Parameter",name:"name"};function E8e(t){return Hr.isInstance(t,hE.$type)}l(E8e,"isParameter"),F(E8e,"isParameter");var l$={$type:"ParameterReference",parameter:"parameter"};function lX(t){return Hr.isInstance(t,l$.$type)}l(lX,"isParameterReference"),F(lX,"isParameterReference");var th={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function pl(t){return Hr.isInstance(t,th.$type)}l(pl,"isParserRule"),F(pl,"isParserRule");var i_={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function cX(t){return Hr.isInstance(t,i_.$type)}l(cX,"isReferenceType"),F(cX,"isReferenceType");var w1={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function uX(t){return Hr.isInstance(t,w1.$type)}l(uX,"isRegexToken"),F(uX,"isRegexToken");var c$={$type:"ReturnType",name:"name"};function hX(t){return Hr.isInstance(t,c$.$type)}l(hX,"isReturnType"),F(hX,"isReturnType");var T1={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function zf(t){return Hr.isInstance(t,T1.$type)}l(zf,"isRuleCall"),F(zf,"isRuleCall");var dE={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function u$(t){return Hr.isInstance(t,dE.$type)}l(u$,"isSimpleType"),F(u$,"isSimpleType");var h$={$type:"StringLiteral",value:"value"};function C8e(t){return Hr.isInstance(t,h$.$type)}l(C8e,"isStringLiteral"),F(C8e,"isStringLiteral");var E1={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function dX(t){return Hr.isInstance(t,E1.$type)}l(dX,"isTerminalAlternatives"),F(dX,"isTerminalAlternatives");var jl={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function S8e(t){return Hr.isInstance(t,jl.$type)}l(S8e,"isTerminalElement"),F(S8e,"isTerminalElement");var C1={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function fX(t){return Hr.isInstance(t,C1.$type)}l(fX,"isTerminalGroup"),F(fX,"isTerminalGroup");var Hf={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function lu(t){return Hr.isInstance(t,Hf.$type)}l(lu,"isTerminalRule"),F(lu,"isTerminalRule");var S1={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function d$(t){return Hr.isInstance(t,S1.$type)}l(d$,"isTerminalRuleCall"),F(d$,"isTerminalRuleCall");var s_={$type:"Type",name:"name",type:"type"};function f$(t){return Hr.isInstance(t,s_.$type)}l(f$,"isType"),F(f$,"isType");var _1={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function _8e(t){return Hr.isInstance(t,_1.$type)}l(_8e,"isTypeAttribute"),F(_8e,"isTypeAttribute");var k1={$type:"TypeDefinition"};function k8e(t){return Hr.isInstance(t,k1.$type)}l(k8e,"isTypeDefinition"),F(k8e,"isTypeDefinition");var p$={$type:"UnionType",types:"types"};function pX(t){return Hr.isInstance(t,p$.$type)}l(pX,"isUnionType"),F(pX,"isUnionType");var o_={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function g$(t){return Hr.isInstance(t,o_.$type)}l(g$,"isUnorderedGroup"),F(g$,"isUnorderedGroup");var A1={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function gX(t){return Hr.isInstance(t,A1.$type)}l(gX,"isUntilToken"),F(gX,"isUntilToken");var N1={$type:"ValueLiteral"};function A8e(t){return Hr.isInstance(t,N1.$type)}l(A8e,"isValueLiteral"),F(A8e,"isValueLiteral");var fE={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function mX(t){return Hr.isInstance(t,fE.$type)}l(mX,"isWildcard"),F(mX,"isWildcard");var yX=(Ky=class extends KK{constructor(){super(...arguments),this.types={AbstractElement:{name:Ul.$type,properties:{cardinality:{name:Ul.cardinality}},superTypes:[]},AbstractParserRule:{name:J5.$type,properties:{},superTypes:[sE.$type,kc.$type]},AbstractRule:{name:sE.$type,properties:{},superTypes:[]},AbstractType:{name:kc.$type,properties:{},superTypes:[]},Action:{name:Bp.$type,properties:{cardinality:{name:Bp.cardinality},feature:{name:Bp.feature},inferredType:{name:Bp.inferredType},operator:{name:Bp.operator},type:{name:Bp.type,referenceType:kc.$type}},superTypes:[Ul.$type]},Alternatives:{name:e_.$type,properties:{cardinality:{name:e_.cardinality},elements:{name:e_.elements,defaultValue:[]}},superTypes:[Ul.$type]},ArrayLiteral:{name:JL.$type,properties:{elements:{name:JL.elements,defaultValue:[]}},superTypes:[N1.$type]},ArrayType:{name:e$.$type,properties:{elementType:{name:e$.elementType}},superTypes:[k1.$type]},Assignment:{name:Hp.$type,properties:{cardinality:{name:Hp.cardinality},feature:{name:Hp.feature},operator:{name:Hp.operator},predicate:{name:Hp.predicate},terminal:{name:Hp.terminal}},superTypes:[Ul.$type]},BooleanLiteral:{name:t$.$type,properties:{true:{name:t$.true,defaultValue:!1}},superTypes:[Vp.$type,N1.$type]},CharacterRange:{name:Wp.$type,properties:{cardinality:{name:Wp.cardinality},left:{name:Wp.left},lookahead:{name:Wp.lookahead},parenthesized:{name:Wp.parenthesized,defaultValue:!1},right:{name:Wp.right}},superTypes:[jl.$type]},Condition:{name:Vp.$type,properties:{},superTypes:[]},Conjunction:{name:t_.$type,properties:{left:{name:t_.left},right:{name:t_.right}},superTypes:[Vp.$type]},CrossReference:{name:Gp.$type,properties:{cardinality:{name:Gp.cardinality},deprecatedSyntax:{name:Gp.deprecatedSyntax,defaultValue:!1},isMulti:{name:Gp.isMulti,defaultValue:!1},terminal:{name:Gp.terminal},type:{name:Gp.type,referenceType:kc.$type}},superTypes:[Ul.$type]},Disjunction:{name:r_.$type,properties:{left:{name:r_.left},right:{name:r_.right}},superTypes:[Vp.$type]},EndOfFile:{name:r$.$type,properties:{cardinality:{name:r$.cardinality}},superTypes:[Ul.$type]},Grammar:{name:Ff.$type,properties:{imports:{name:Ff.imports,defaultValue:[]},interfaces:{name:Ff.interfaces,defaultValue:[]},isDeclared:{name:Ff.isDeclared,defaultValue:!1},name:{name:Ff.name},rules:{name:Ff.rules,defaultValue:[]},types:{name:Ff.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:n$.$type,properties:{path:{name:n$.path}},superTypes:[]},Group:{name:v1.$type,properties:{cardinality:{name:v1.cardinality},elements:{name:v1.elements,defaultValue:[]},guardCondition:{name:v1.guardCondition},predicate:{name:v1.predicate}},superTypes:[Ul.$type]},InferredType:{name:a$.$type,properties:{name:{name:a$.name}},superTypes:[kc.$type]},InfixRule:{name:gd.$type,properties:{call:{name:gd.call},dataType:{name:gd.dataType},inferredType:{name:gd.inferredType},name:{name:gd.name},operators:{name:gd.operators},parameters:{name:gd.parameters,defaultValue:[]},returnType:{name:gd.returnType,referenceType:kc.$type}},superTypes:[J5.$type]},InfixRuleOperatorList:{name:a_.$type,properties:{associativity:{name:a_.associativity},operators:{name:a_.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:i$.$type,properties:{precedences:{name:i$.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:lE.$type,properties:{attributes:{name:lE.attributes,defaultValue:[]},name:{name:lE.name},superTypes:{name:lE.superTypes,defaultValue:[],referenceType:kc.$type}},superTypes:[kc.$type]},Keyword:{name:cE.$type,properties:{cardinality:{name:cE.cardinality},predicate:{name:cE.predicate},value:{name:cE.value}},superTypes:[Ul.$type]},NamedArgument:{name:uE.$type,properties:{calledByName:{name:uE.calledByName,defaultValue:!1},parameter:{name:uE.parameter,referenceType:hE.$type},value:{name:uE.value}},superTypes:[]},NegatedToken:{name:x1.$type,properties:{cardinality:{name:x1.cardinality},lookahead:{name:x1.lookahead},parenthesized:{name:x1.parenthesized,defaultValue:!1},terminal:{name:x1.terminal}},superTypes:[jl.$type]},Negation:{name:s$.$type,properties:{value:{name:s$.value}},superTypes:[Vp.$type]},NumberLiteral:{name:o$.$type,properties:{value:{name:o$.value}},superTypes:[N1.$type]},Parameter:{name:hE.$type,properties:{name:{name:hE.name}},superTypes:[]},ParameterReference:{name:l$.$type,properties:{parameter:{name:l$.parameter,referenceType:hE.$type}},superTypes:[Vp.$type]},ParserRule:{name:th.$type,properties:{dataType:{name:th.dataType},definition:{name:th.definition},entry:{name:th.entry,defaultValue:!1},fragment:{name:th.fragment,defaultValue:!1},inferredType:{name:th.inferredType},name:{name:th.name},parameters:{name:th.parameters,defaultValue:[]},returnType:{name:th.returnType,referenceType:kc.$type}},superTypes:[J5.$type]},ReferenceType:{name:i_.$type,properties:{isMulti:{name:i_.isMulti,defaultValue:!1},referenceType:{name:i_.referenceType}},superTypes:[k1.$type]},RegexToken:{name:w1.$type,properties:{cardinality:{name:w1.cardinality},lookahead:{name:w1.lookahead},parenthesized:{name:w1.parenthesized,defaultValue:!1},regex:{name:w1.regex}},superTypes:[jl.$type]},ReturnType:{name:c$.$type,properties:{name:{name:c$.name}},superTypes:[]},RuleCall:{name:T1.$type,properties:{arguments:{name:T1.arguments,defaultValue:[]},cardinality:{name:T1.cardinality},predicate:{name:T1.predicate},rule:{name:T1.rule,referenceType:sE.$type}},superTypes:[Ul.$type]},SimpleType:{name:dE.$type,properties:{primitiveType:{name:dE.primitiveType},stringType:{name:dE.stringType},typeRef:{name:dE.typeRef,referenceType:kc.$type}},superTypes:[k1.$type]},StringLiteral:{name:h$.$type,properties:{value:{name:h$.value}},superTypes:[N1.$type]},TerminalAlternatives:{name:E1.$type,properties:{cardinality:{name:E1.cardinality},elements:{name:E1.elements,defaultValue:[]},lookahead:{name:E1.lookahead},parenthesized:{name:E1.parenthesized,defaultValue:!1}},superTypes:[jl.$type]},TerminalElement:{name:jl.$type,properties:{cardinality:{name:jl.cardinality},lookahead:{name:jl.lookahead},parenthesized:{name:jl.parenthesized,defaultValue:!1}},superTypes:[Ul.$type]},TerminalGroup:{name:C1.$type,properties:{cardinality:{name:C1.cardinality},elements:{name:C1.elements,defaultValue:[]},lookahead:{name:C1.lookahead},parenthesized:{name:C1.parenthesized,defaultValue:!1}},superTypes:[jl.$type]},TerminalRule:{name:Hf.$type,properties:{definition:{name:Hf.definition},fragment:{name:Hf.fragment,defaultValue:!1},hidden:{name:Hf.hidden,defaultValue:!1},name:{name:Hf.name},type:{name:Hf.type}},superTypes:[sE.$type]},TerminalRuleCall:{name:S1.$type,properties:{cardinality:{name:S1.cardinality},lookahead:{name:S1.lookahead},parenthesized:{name:S1.parenthesized,defaultValue:!1},rule:{name:S1.rule,referenceType:Hf.$type}},superTypes:[jl.$type]},Type:{name:s_.$type,properties:{name:{name:s_.name},type:{name:s_.type}},superTypes:[kc.$type]},TypeAttribute:{name:_1.$type,properties:{defaultValue:{name:_1.defaultValue},isOptional:{name:_1.isOptional,defaultValue:!1},name:{name:_1.name},type:{name:_1.type}},superTypes:[]},TypeDefinition:{name:k1.$type,properties:{},superTypes:[]},UnionType:{name:p$.$type,properties:{types:{name:p$.types,defaultValue:[]}},superTypes:[k1.$type]},UnorderedGroup:{name:o_.$type,properties:{cardinality:{name:o_.cardinality},elements:{name:o_.elements,defaultValue:[]}},superTypes:[Ul.$type]},UntilToken:{name:A1.$type,properties:{cardinality:{name:A1.cardinality},lookahead:{name:A1.lookahead},parenthesized:{name:A1.parenthesized,defaultValue:!1},terminal:{name:A1.terminal}},superTypes:[jl.$type]},ValueLiteral:{name:N1.$type,properties:{},superTypes:[]},Wildcard:{name:fE.$type,properties:{cardinality:{name:fE.cardinality},lookahead:{name:fE.lookahead},parenthesized:{name:fE.parenthesized,defaultValue:!1}},superTypes:[jl.$type]}}}},l(Ky,"LangiumGrammarAstReflection"),F(Ky,"LangiumGrammarAstReflection"),Ky),Hr=new yX;function N8e(t){let e=t,r=!1;for(;e;){const n=g1(e.grammarSource,pl);if(n&&n.dataType)e=e.container,r=!0;else return r?e:void 0}}l(N8e,"getDatatypeNode"),F(N8e,"getDatatypeNode");function pE(t){return new rE(t,e=>Rf(e)?e.content:[],{includeRoot:!0})}l(pE,"streamCst"),F(pE,"streamCst");function I8e(t){return pE(t).filter(p1)}l(I8e,"flattenCst"),F(I8e,"flattenCst");function vX(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}l(vX,"isChildNode"),F(vX,"isChildNode");function l_(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}l(l_,"tokenToRange"),F(l_,"tokenToRange");function gE(t){if(!t)return;const{offset:e,end:r,range:n}=t;return{range:n,offset:e,end:r,length:r-e}}l(gE,"toDocumentSegment"),F(gE,"toDocumentSegment");var md;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(md||(md={}));function bX(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return md.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return md.After;const r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,n=t.end.line<e.end.line||t.end.line===e.end.line&&t.end.character<=e.end.character;return r&&n?md.Inside:r?md.OverlapBack:n?md.OverlapFront:md.Outside}l(bX,"compareRange"),F(bX,"compareRange");function xX(t,e){return bX(t,e)>md.After}l(xX,"inRange"),F(xX,"inRange");var wX=/^[\w\p{L}]$/u;function L8e(t,e,r=wX){if(t){if(e>0){const n=e-t.offset,a=t.text.charAt(n);r.test(a)||e--}return y$(t,e)}}l(L8e,"findDeclarationNodeAtOffset"),F(L8e,"findDeclarationNodeAtOffset");function TX(t,e){if(t){const r=SX(t,!0);if(r&&m$(r,e))return r;if(UL(t)){const n=t.content.findIndex(a=>!a.hidden);for(let a=n-1;a>=0;a--){const i=t.content[a];if(m$(i,e))return i}}}}l(TX,"findCommentNode"),F(TX,"findCommentNode");function m$(t,e){return p1(t)&&e.includes(t.tokenType.name)}l(m$,"isCommentNode"),F(m$,"isCommentNode");function y$(t,e){if(p1(t))return t;if(Rf(t)){const r=CX(t,e,!1);if(r)return y$(r,e)}}l(y$,"findLeafNodeAtOffset"),F(y$,"findLeafNodeAtOffset");function EX(t,e){if(p1(t))return t;if(Rf(t)){const r=CX(t,e,!0);if(r)return EX(r,e)}}l(EX,"findLeafNodeBeforeOffset"),F(EX,"findLeafNodeBeforeOffset");function CX(t,e,r){let n=0,a=t.content.length-1,i;for(;n<=a;){const s=Math.floor((n+a)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(i=r?o:void 0,n=s+1):a=s-1}return i}l(CX,"binarySearch"),F(CX,"binarySearch");function SX(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);for(;n>0;){n--;const a=r.content[n];if(e||!a.hidden)return a}t=r}}l(SX,"getPreviousNode"),F(SX,"getPreviousNode");function $8e(t,e=!0){for(;t.container;){const r=t.container;let n=r.content.indexOf(t);const a=r.content.length-1;for(;n<a;){n++;const i=r.content[n];if(e||!i.hidden)return i}t=r}}l($8e,"getNextNode"),F($8e,"getNextNode");function M8e(t){if(t.range.start.character===0)return t;const e=t.range.start.line;let r=t,n;for(;t.container;){const a=t.container,i=n!=null?n:a.content.indexOf(t);if(i===0?(t=a,n=void 0):(n=i-1,t=a.content[n]),t.range.start.line!==e)break;r=t}return r}l(M8e,"getStartlineNode"),F(M8e,"getStartlineNode");function P8e(t,e){const r=R8e(t,e);return r?r.parent.content.slice(r.a+1,r.b):[]}l(P8e,"getInteriorNodes"),F(P8e,"getInteriorNodes");function R8e(t,e){const r=_X(t),n=_X(e);let a;for(let i=0;i<r.length&&i<n.length;i++){const s=r[i],o=n[i];if(s.parent===o.parent)a={parent:s.parent,a:s.index,b:o.index};else break}return a}l(R8e,"getCommonParent"),F(R8e,"getCommonParent");function _X(t){const e=[];for(;t.container;){const r=t.container,n=r.content.indexOf(t);e.push({parent:r,index:n}),t=r}return e.reverse()}l(_X,"getParentChain"),F(_X,"getParentChain");var kX={};Fp(kX,{findAssignment:l(()=>HX,"findAssignment"),findNameAssignment:l(()=>N$,"findNameAssignment"),findNodeForKeyword:l(()=>zX,"findNodeForKeyword"),findNodeForProperty:l(()=>_$,"findNodeForProperty"),findNodesForKeyword:l(()=>G8e,"findNodesForKeyword"),findNodesForKeywordInternal:l(()=>A$,"findNodesForKeywordInternal"),findNodesForProperty:l(()=>BX,"findNodesForProperty"),getActionAtElement:l(()=>VX,"getActionAtElement"),getActionType:l(()=>qX,"getActionType"),getAllReachableRules:l(()=>S$,"getAllReachableRules"),getAllRulesUsedForCrossReferences:l(()=>V8e,"getAllRulesUsedForCrossReferences"),getCrossReferenceTerminal:l(()=>DX,"getCrossReferenceTerminal"),getEntryRule:l(()=>PX,"getEntryRule"),getExplicitRuleType:l(()=>u_,"getExplicitRuleType"),getHiddenRules:l(()=>RX,"getHiddenRules"),getRuleType:l(()=>YX,"getRuleType"),getRuleTypeName:l(()=>K8e,"getRuleTypeName"),getTypeName:l(()=>$1,"getTypeName"),isArrayCardinality:l(()=>Y8e,"isArrayCardinality"),isArrayOperator:l(()=>U8e,"isArrayOperator"),isCommentTerminal:l(()=>FX,"isCommentTerminal"),isDataType:l(()=>j8e,"isDataType"),isDataTypeRule:l(()=>c_,"isDataTypeRule"),isOptionalCardinality:l(()=>q8e,"isOptionalCardinality"),terminalRegex:l(()=>h_,"terminalRegex")});var v$=(Xy=class extends Error{constructor(e,r){super(e?`${r} at ${e.range.start.line}:${e.range.start.character}`:r)}},l(Xy,"ErrorWithLocation"),F(Xy,"ErrorWithLocation"),Xy);function qp(t,e="Error: Got unexpected value."){throw new Error(e)}l(qp,"assertUnreachable"),F(qp,"assertUnreachable");function AX(t,e="Error: Condition is violated."){if(!t)throw new Error(e)}l(AX,"assertCondition"),F(AX,"assertCondition");var NX={};Fp(NX,{NEWLINE_REGEXP:l(()=>B8e,"NEWLINE_REGEXP"),escapeRegExp:l(()=>yE,"escapeRegExp"),getTerminalParts:l(()=>H8e,"getTerminalParts"),isMultilineComment:l(()=>LX,"isMultilineComment"),isWhitespace:l(()=>C$,"isWhitespace"),partialMatches:l(()=>$X,"partialMatches"),partialRegExp:l(()=>MX,"partialRegExp"),whitespaceCharacters:l(()=>W8e,"whitespaceCharacters")});function Xr(t){return t.charCodeAt(0)}l(Xr,"cc"),F(Xr,"cc");function b$(t,e){Array.isArray(t)?t.forEach(function(r){e.push(r)}):e.push(t)}l(b$,"insertToSet"),F(b$,"insertToSet");function mE(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}l(mE,"addFlag"),F(mE,"addFlag");function I1(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}l(I1,"ASSERT_EXISTS"),F(I1,"ASSERT_EXISTS");function O8e(){throw Error("Internal Error - Should never get here!")}l(O8e,"ASSERT_NEVER_REACH_HERE"),F(O8e,"ASSERT_NEVER_REACH_HERE");function IX(t){return t.type==="Character"}l(IX,"isCharacter"),F(IX,"isCharacter");var x$=[];for(let t=Xr("0");t<=Xr("9");t++)x$.push(t);var w$=[Xr("_")].concat(x$);for(let t=Xr("a");t<=Xr("z");t++)w$.push(t);for(let t=Xr("A");t<=Xr("Z");t++)w$.push(t);var D8e=[Xr(" "),Xr("\f"),Xr(`
|
||
`),Xr("\r"),Xr(" "),Xr("\v"),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr(" "),Xr("\u2028"),Xr("\u2029"),Xr(" "),Xr(" "),Xr(" "),Xr("\uFEFF")],CXt=/[0-9a-fA-F]/,T$=/[0-9]/,SXt=/[1-9]/,F8e=(Zy=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const r=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":mE(n,"global");break;case"i":mE(n,"ignoreCase");break;case"m":mE(n,"multiLine");break;case"u":mE(n,"unicode");break;case"y":mE(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){const e=[],r=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(r)}}alternative(){const e=[],r=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":r="Lookbehind";break;case"!":r="NegativeLookbehind"}break}}I1(r);const n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(e)}}return O8e()}quantifier(e=!1){let r;const n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":const a=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:a,atMost:a};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),r={atLeast:a,atMost:i}):r={atLeast:a,atMost:1/0},this.consumeChar("}");break}if(e===!0&&r===void 0)return;I1(r);break}if(!(e===!0&&r===void 0)&&I1(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let e;const r=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}if(e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),I1(e))return e.loc=this.loc(r),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Xr(`
|
||
`),Xr("\r"),Xr("\u2028"),Xr("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,r=!1;switch(this.popChar()){case"d":e=x$;break;case"D":e=x$,r=!0;break;case"s":e=D8e;break;case"S":e=D8e,r=!0;break;case"w":e=w$;break;case"W":e=w$,r=!0;break}if(I1(e))return{type:"Set",value:e,complement:r}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Xr("\f");break;case"n":e=Xr(`
|
||
`);break;case"r":e=Xr("\r");break;case"t":e=Xr(" ");break;case"v":e=Xr("\v");break}if(I1(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Xr("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){const e=this.popChar();return{type:"Character",value:Xr(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
|
||
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:const e=this.popChar();return{type:"Character",value:Xr(e)}}}characterClass(){const e=[];let r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){const n=this.classAtom();if(n.type,IX(n)&&this.isRangeDash()){this.consumeChar("-");const a=this.classAtom();if(a.type,IX(a)){if(a.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:a.value})}else b$(n.value,e),e.push(Xr("-")),b$(a.value,e)}else b$(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:r,value:e}}classAtom(){switch(this.peekChar()){case"]":case`
|
||
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Xr("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}const r=this.disjunction();this.consumeChar(")");const n={type:"Group",capturing:e,value:r};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(SXt.test(e)===!1)throw Error("Expecting a positive integer");for(;T$.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(T$.test(e)===!1)throw Error("Expecting an integer");for(;T$.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case`
|
||
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Xr(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return T$.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
|
||
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!"||this.peekChar(2)==="<"&&(this.peekChar(3)==="="||this.peekChar(3)==="!"));default:return!1}}isQuantifier(){const e=this.saveState();try{return this.quantifier(!0)!==void 0}catch(r){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
|
||
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let r="";for(let a=0;a<e;a++){const i=this.popChar();if(CXt.test(i)===!1)throw Error("Expecting a HexDecimal digits");r+=i}return{type:"Character",value:parseInt(r,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},l(Zy,"RegExpParser"),F(Zy,"RegExpParser"),Zy),E$=(Qy=class{visitChildren(e){for(const r in e){const n=e[r];e.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(a=>{this.visit(a)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},l(Qy,"BaseRegExpVisitor"),F(Qy,"BaseRegExpVisitor"),Qy),B8e=/\r?\n/gm,z8e=new F8e,_Xt=(Jy=class extends E${constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const r=String.fromCharCode(e.value);if(!this.multiline&&r===`
|
||
`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const n=yE(r);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitSet(e){if(!this.multiline){const r=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(r);this.multiline=!!`
|
||
`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},l(Jy,"TerminalRegExpVisitor"),F(Jy,"TerminalRegExpVisitor"),Jy),L1=new _Xt;function H8e(t){try{typeof t!="string"&&(t=t.source),t=`/${t}/`;const e=z8e.pattern(t),r=[];for(const n of e.value.value)L1.reset(t),L1.visit(n),r.push({start:L1.startRegexp,end:L1.endRegex});return r}catch(e){return[]}}l(H8e,"getTerminalParts"),F(H8e,"getTerminalParts");function LX(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),L1.reset(t),L1.visit(z8e.pattern(t)),L1.multiline}catch(e){return!1}}l(LX,"isMultilineComment"),F(LX,"isMultilineComment");var W8e=`\f
|
||
\r \v \u2028\u2029 \uFEFF`.split("");function C$(t){const e=typeof t=="string"?new RegExp(t):t;return W8e.some(r=>e.test(r))}l(C$,"isWhitespace"),F(C$,"isWhitespace");function yE(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}l(yE,"escapeRegExp"),F(yE,"escapeRegExp");function $X(t,e){const r=MX(t),n=e.match(r);return!!n&&n[0].length>0}l($X,"partialMatches"),F($X,"partialMatches");function MX(t){typeof t=="string"&&(t=new RegExp(t));const e=t,r=t.source;let n=0;function a(){let i="",s;function o(h){i+=r.substr(n,h),n+=h}l(o,"appendRaw"),F(o,"appendRaw");function u(h){i+="(?:"+r.substr(n,h)+"|$)",n+=h}for(l(u,"appendOptional"),F(u,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":u(3);break;case"x":u(4);break;case"u":e.unicode?r[n+2]==="{"?u(r.indexOf("}",n)-n+1):u(6):u(2);break;case"p":case"P":e.unicode?u(r.indexOf("}",n)-n+1):u(2);break;case"k":u(r.indexOf(">",n)-n+1);break;default:u(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=n,s=s.exec(r)||[],u(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=n,s=s.exec(r),s?o(s[0].length):u(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":i+="(?:",n+=3,i+=a()+"|$)";break;case"=":i+="(?=",n+=3,i+=a()+")";break;case"!":s=n,n+=3,a(),i+=r.substr(s,n-s);break;case"<":switch(r[n+3]){case"=":case"!":s=n,n+=4,a(),i+=r.substr(s,n-s);break;default:o(r.indexOf(">",n)-n+1),i+=a()+"|$)";break}break}else o(1),i+=a()+"|$)";break;case")":return++n,i;default:u(1);break}return i}return l(a,"process2"),F(a,"process"),new RegExp(a(),t.flags)}l(MX,"partialRegExp"),F(MX,"partialRegExp");function PX(t){return t.rules.find(e=>pl(e)&&e.entry)}l(PX,"getEntryRule"),F(PX,"getEntryRule");function RX(t){return t.rules.filter(e=>lu(e)&&e.hidden)}l(RX,"getHiddenRules"),F(RX,"getHiddenRules");function S$(t,e){const r=new Set,n=PX(t);if(!n)return new Set(t.rules);const a=[n].concat(RX(t));for(const s of a)OX(s,r,e);const i=new Set;for(const s of t.rules)(r.has(s.name)||lu(s)&&s.hidden)&&i.add(s);return i}l(S$,"getAllReachableRules"),F(S$,"getAllReachableRules");function OX(t,e,r){e.add(t.name),Of(t).forEach(n=>{if(zf(n)||r&&d$(n)){const a=n.rule.ref;a&&!e.has(a.name)&&OX(a,e,r)}})}l(OX,"ruleDfs"),F(OX,"ruleDfs");function V8e(t){const e=new Set;return Of(t).forEach(r=>{y1(r)&&(pl(r.type.ref)&&e.add(r.type.ref),n_(r.type.ref)&&pl(r.type.ref.$container)&&e.add(r.type.ref.$container))}),e}l(V8e,"getAllRulesUsedForCrossReferences"),F(V8e,"getAllRulesUsedForCrossReferences");function DX(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=N$(t.type.ref);return e==null?void 0:e.terminal}}l(DX,"getCrossReferenceTerminal"),F(DX,"getCrossReferenceTerminal");function FX(t){return t.hidden&&!C$(h_(t))}l(FX,"isCommentTerminal"),F(FX,"isCommentTerminal");function BX(t,e){return!t||!e?[]:k$(t,e,t.astNode,!0)}l(BX,"findNodesForProperty"),F(BX,"findNodesForProperty");function _$(t,e,r){if(!t||!e)return;const n=k$(t,e,t.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}l(_$,"findNodeForProperty"),F(_$,"findNodeForProperty");function k$(t,e,r,n){if(!n){const a=g1(t.grammarSource,Df);if(a&&a.feature===e)return[t]}return Rf(t)&&t.astNode===r?t.content.flatMap(a=>k$(a,e,r,!1)):[]}l(k$,"findNodesForPropertyInternal"),F(k$,"findNodesForPropertyInternal");function G8e(t,e){return t?A$(t,e,t==null?void 0:t.astNode):[]}l(G8e,"findNodesForKeyword"),F(G8e,"findNodesForKeyword");function zX(t,e,r){if(!t)return;const n=A$(t,e,t==null?void 0:t.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}l(zX,"findNodeForKeyword"),F(zX,"findNodeForKeyword");function A$(t,e,r){if(t.astNode!==r)return[];if(Bf(t.grammarSource)&&t.grammarSource.value===e)return[t];const n=pE(t).iterator();let a;const i=[];do if(a=n.next(),!a.done){const s=a.value;s.astNode===r?Bf(s.grammarSource)&&s.grammarSource.value===e&&i.push(s):n.prune()}while(!a.done);return i}l(A$,"findNodesForKeywordInternal"),F(A$,"findNodesForKeywordInternal");function HX(t){var r;const e=t.astNode;for(;e===((r=t.container)==null?void 0:r.astNode);){const n=g1(t.grammarSource,Df);if(n)return n;t=t.container}}l(HX,"findAssignment"),F(HX,"findAssignment");function N$(t){let e=t;return n_(e)&&(zp(e.$container)?e=e.$container.$container:m1(e.$container)?e=e.$container:qp(e.$container)),WX(t,e,new Map)}l(N$,"findNameAssignment"),F(N$,"findNameAssignment");function WX(t,e,r){var a;function n(i,s){let o;return g1(i,Df)||(o=WX(s,s,r)),r.set(t,o),o}if(l(n,"go"),F(n,"go"),r.has(t))return r.get(t);r.set(t,void 0);for(const i of Of(e)){if(Df(i)&&i.feature.toLowerCase()==="name")return r.set(t,i),i;if(zf(i)&&pl(i.rule.ref))return n(i,i.rule.ref);if(u$(i)&&((a=i.typeRef)!=null&&a.ref))return n(i,i.typeRef.ref)}}l(WX,"findNameAssignmentInternal"),F(WX,"findNameAssignmentInternal");function VX(t){const e=t.$container;if(b1(e)){const r=e.elements,n=r.indexOf(t);for(let a=n-1;a>=0;a--){const i=r[a];if(zp(i))return i;{const s=Of(r[a]).find(zp);if(s)return s}}}if(ZL(e))return VX(e)}l(VX,"getActionAtElement"),F(VX,"getActionAtElement");function q8e(t,e){return t==="?"||t==="*"||b1(e)&&!!e.guardCondition}l(q8e,"isOptionalCardinality"),F(q8e,"isOptionalCardinality");function Y8e(t){return t==="*"||t==="+"}l(Y8e,"isArrayCardinality"),F(Y8e,"isArrayCardinality");function U8e(t){return t==="+="}l(U8e,"isArrayOperator"),F(U8e,"isArrayOperator");function c_(t){return GX(t,new Set)}l(c_,"isDataTypeRule"),F(c_,"isDataTypeRule");function GX(t,e){if(e.has(t))return!0;e.add(t);for(const r of Of(t))if(zf(r)){if(!r.rule.ref||pl(r.rule.ref)&&!GX(r.rule.ref,e)||oE(r.rule.ref))return!1}else{if(Df(r))return!1;if(zp(r))return!1}return!!t.definition}l(GX,"isDataTypeRuleInternal"),F(GX,"isDataTypeRuleInternal");function j8e(t){return I$(t.type,new Set)}l(j8e,"isDataType"),F(j8e,"isDataType");function I$(t,e){if(e.has(t))return!0;if(e.add(t),JK(t))return!1;if(cX(t))return!1;if(pX(t))return t.types.every(r=>I$(r,e));if(u$(t)){if(t.primitiveType!==void 0)return!0;if(t.stringType!==void 0)return!0;if(t.typeRef!==void 0){const r=t.typeRef.ref;return f$(r)?I$(r.type,e):!1}else return!1}else return!1}l(I$,"isDataTypeInternal"),F(I$,"isDataTypeInternal");function u_(t){if(!lu(t)){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e)return e.name}}}l(u_,"getExplicitRuleType"),F(u_,"getExplicitRuleType");function $1(t){var e;if(m1(t))return pl(t)&&c_(t)?t.name:(e=u_(t))!=null?e:t.name;if(iX(t)||f$(t)||hX(t))return t.name;if(zp(t)){const r=qX(t);if(r)return r}else if(n_(t))return t.name;throw new Error("Cannot get name of Unknown Type")}l($1,"getTypeName"),F($1,"getTypeName");function qX(t){var e;if(t.inferredType)return t.inferredType.name;if((e=t.type)!=null&&e.ref)return $1(t.type.ref)}l(qX,"getActionType"),F(qX,"getActionType");function K8e(t){var e,r,n;return lu(t)?(r=(e=t.type)==null?void 0:e.name)!=null?r:"string":pl(t)&&c_(t)?t.name:(n=u_(t))!=null?n:t.name}l(K8e,"getRuleTypeName"),F(K8e,"getRuleTypeName");function YX(t){var e,r,n;return lu(t)?(r=(e=t.type)==null?void 0:e.name)!=null?r:"string":(n=u_(t))!=null?n:t.name}l(YX,"getRuleType"),F(YX,"getRuleType");function h_(t){const e={s:!1,i:!1,u:!1},r=M1(t.definition,e),n=Object.entries(e).filter(([,a])=>a).map(([a])=>a).join("");return new RegExp(r,n)}l(h_,"terminalRegex"),F(h_,"terminalRegex");var UX=/[\s\S]/.source;function M1(t,e){var r;if(dX(t))return X8e(t);if(fX(t))return Z8e(t);if(tX(t))return e7e(t);if(d$(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return yd(M1(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}else{if(sX(t))return J8e(t);if(gX(t))return Q8e(t);if(uX(t)){const n=t.regex.lastIndexOf("/"),a=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),yd(a,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(mX(t))return yd(UX,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t==null?void 0:t.$type}, ${(r=t==null?void 0:t.$cstNode)==null?void 0:r.text}`)}}}l(M1,"abstractElementToRegex"),F(M1,"abstractElementToRegex");function X8e(t){return yd(t.elements.map(e=>M1(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}l(X8e,"terminalAlternativesToRegex"),F(X8e,"terminalAlternativesToRegex");function Z8e(t){return yd(t.elements.map(e=>M1(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}l(Z8e,"terminalGroupToRegex"),F(Z8e,"terminalGroupToRegex");function Q8e(t){return yd(`${UX}*?${M1(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}l(Q8e,"untilTokenToRegex"),F(Q8e,"untilTokenToRegex");function J8e(t){return yd(`(?!${M1(t.terminal)})${UX}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}l(J8e,"negateTokenToRegex"),F(J8e,"negateTokenToRegex");function e7e(t){return t.right?yd(`[${L$(t.left)}-${L$(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):yd(L$(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}l(e7e,"characterRangeToRegex"),F(e7e,"characterRangeToRegex");function L$(t){return yE(t.value)}l(L$,"keywordToRegex"),F(L$,"keywordToRegex");function yd(t,e){var r;return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${(r=e.lookahead)!=null?r:e.parenthesized?"":"?:"}${t})`),e.cardinality?`${t}${e.cardinality}`:t}l(yd,"withCardinality"),F(yd,"withCardinality");function jX(t){const e=[],r=t.Grammar;for(const n of r.rules)lu(n)&&FX(n)&&LX(h_(n))&&e.push(n.name);return{multilineCommentRules:e,nameRegexp:wX}}l(jX,"createGrammarConfig"),F(jX,"createGrammarConfig");var kXt=typeof global=="object"&&global&&global.Object===Object&&global,t7e=kXt,AXt=typeof self=="object"&&self&&self.Object===Object&&self,NXt=t7e||AXt||Function("return this")(),vd=NXt,IXt=vd.Symbol,cu=IXt,r7e=Object.prototype,LXt=r7e.hasOwnProperty,$Xt=r7e.toString,d_=cu?cu.toStringTag:void 0;function n7e(t){var e=LXt.call(t,d_),r=t[d_];try{t[d_]=void 0;var n=!0}catch(i){}var a=$Xt.call(t);return n&&(e?t[d_]=r:delete t[d_]),a}l(n7e,"getRawTag"),F(n7e,"getRawTag");var MXt=n7e,PXt=Object.prototype,RXt=PXt.toString;function a7e(t){return RXt.call(t)}l(a7e,"objectToString"),F(a7e,"objectToString");var OXt=a7e,DXt="[object Null]",FXt="[object Undefined]",i7e=cu?cu.toStringTag:void 0;function s7e(t){return t==null?t===void 0?FXt:DXt:i7e&&i7e in Object(t)?MXt(t):OXt(t)}l(s7e,"baseGetTag"),F(s7e,"baseGetTag");var Yp=s7e;function o7e(t){return t!=null&&typeof t=="object"}l(o7e,"isObjectLike"),F(o7e,"isObjectLike");var rh=o7e,BXt="[object Symbol]";function l7e(t){return typeof t=="symbol"||rh(t)&&Yp(t)==BXt}l(l7e,"isSymbol"),F(l7e,"isSymbol");var $$=l7e;function c7e(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}l(c7e,"arrayMap"),F(c7e,"arrayMap");var f_=c7e,zXt=Array.isArray,zn=zXt,u7e=cu?cu.prototype:void 0,h7e=u7e?u7e.toString:void 0;function KX(t){if(typeof t=="string")return t;if(zn(t))return f_(t,KX)+"";if($$(t))return h7e?h7e.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}l(KX,"baseToString"),F(KX,"baseToString");var HXt=KX,WXt=/\s/;function d7e(t){for(var e=t.length;e--&&WXt.test(t.charAt(e)););return e}l(d7e,"trimmedEndIndex"),F(d7e,"trimmedEndIndex");var VXt=d7e,GXt=/^\s+/;function f7e(t){return t&&t.slice(0,VXt(t)+1).replace(GXt,"")}l(f7e,"baseTrim"),F(f7e,"baseTrim");var qXt=f7e;function p7e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}l(p7e,"isObject"),F(p7e,"isObject");var uu=p7e,g7e=NaN,YXt=/^[-+]0x[0-9a-f]+$/i,UXt=/^0b[01]+$/i,jXt=/^0o[0-7]+$/i,KXt=parseInt;function m7e(t){if(typeof t=="number")return t;if($$(t))return g7e;if(uu(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=uu(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=qXt(t);var r=UXt.test(t);return r||jXt.test(t)?KXt(t.slice(2),r?2:8):YXt.test(t)?g7e:+t}l(m7e,"toNumber"),F(m7e,"toNumber");var XXt=m7e,y7e=1/0,ZXt=17976931348623157e292;function v7e(t){if(!t)return t===0?t:0;if(t=XXt(t),t===y7e||t===-y7e){var e=t<0?-1:1;return e*ZXt}return t===t?t:0}l(v7e,"toFinite"),F(v7e,"toFinite");var QXt=v7e;function b7e(t){var e=QXt(t),r=e%1;return e===e?r?e-r:e:0}l(b7e,"toInteger"),F(b7e,"toInteger");var p_=b7e;function x7e(t){return t}l(x7e,"identity"),F(x7e,"identity");var g_=x7e,JXt="[object AsyncFunction]",eZt="[object Function]",tZt="[object GeneratorFunction]",rZt="[object Proxy]";function w7e(t){if(!uu(t))return!1;var e=Yp(t);return e==eZt||e==tZt||e==JXt||e==rZt}l(w7e,"isFunction"),F(w7e,"isFunction");var Wf=w7e,nZt=vd["__core-js_shared__"],XX=nZt,T7e=function(){var t=/[^.]+$/.exec(XX&&XX.keys&&XX.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function E7e(t){return!!T7e&&T7e in t}l(E7e,"isMasked"),F(E7e,"isMasked");var aZt=E7e,iZt=Function.prototype,sZt=iZt.toString;function C7e(t){if(t!=null){try{return sZt.call(t)}catch(e){}try{return t+""}catch(e){}}return""}l(C7e,"toSource"),F(C7e,"toSource");var P1=C7e,oZt=/[\\^$.*+?()[\]{}|]/g,lZt=/^\[object .+?Constructor\]$/,cZt=Function.prototype,uZt=Object.prototype,hZt=cZt.toString,dZt=uZt.hasOwnProperty,fZt=RegExp("^"+hZt.call(dZt).replace(oZt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function S7e(t){if(!uu(t)||aZt(t))return!1;var e=Wf(t)?fZt:lZt;return e.test(P1(t))}l(S7e,"baseIsNative"),F(S7e,"baseIsNative");var pZt=S7e;function _7e(t,e){return t==null?void 0:t[e]}l(_7e,"getValue"),F(_7e,"getValue");var gZt=_7e;function k7e(t,e){var r=gZt(t,e);return pZt(r)?r:void 0}l(k7e,"getNative"),F(k7e,"getNative");var R1=k7e,mZt=R1(vd,"WeakMap"),ZX=mZt,A7e=Object.create,yZt=function(){function t(){}return l(t,"object"),F(t,"object"),function(e){if(!uu(e))return{};if(A7e)return A7e(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),vZt=yZt;function N7e(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}l(N7e,"apply"),F(N7e,"apply");var bZt=N7e;function I7e(){}l(I7e,"noop"),F(I7e,"noop");var Hs=I7e;function L7e(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}l(L7e,"copyArray"),F(L7e,"copyArray");var xZt=L7e,wZt=800,TZt=16,EZt=Date.now;function $7e(t){var e=0,r=0;return function(){var n=EZt(),a=TZt-(n-r);if(r=n,a>0){if(++e>=wZt)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}l($7e,"shortOut"),F($7e,"shortOut");var CZt=$7e;function M7e(t){return function(){return t}}l(M7e,"constant$2"),F(M7e,"constant");var SZt=M7e,_Zt=function(){try{var t=R1(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),M$=_Zt,kZt=M$?function(t,e){return M$(t,"toString",{configurable:!0,enumerable:!1,value:SZt(e),writable:!0})}:g_,AZt=kZt,NZt=CZt(AZt),IZt=NZt;function P7e(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}l(P7e,"arrayEach"),F(P7e,"arrayEach");var R7e=P7e;function O7e(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i<a;)if(e(t[i],i,t))return i;return-1}l(O7e,"baseFindIndex"),F(O7e,"baseFindIndex");var D7e=O7e;function F7e(t){return t!==t}l(F7e,"baseIsNaN"),F(F7e,"baseIsNaN");var LZt=F7e;function B7e(t,e,r){for(var n=r-1,a=t.length;++n<a;)if(t[n]===e)return n;return-1}l(B7e,"strictIndexOf"),F(B7e,"strictIndexOf");var $Zt=B7e;function z7e(t,e,r){return e===e?$Zt(t,e,r):D7e(t,LZt,r)}l(z7e,"baseIndexOf"),F(z7e,"baseIndexOf");var QX=z7e;function H7e(t,e){var r=t==null?0:t.length;return!!r&&QX(t,e,0)>-1}l(H7e,"arrayIncludes"),F(H7e,"arrayIncludes");var W7e=H7e,MZt=9007199254740991,PZt=/^(?:0|[1-9]\d*)$/;function V7e(t,e){var r=typeof t;return e=e==null?MZt:e,!!e&&(r=="number"||r!="symbol"&&PZt.test(t))&&t>-1&&t%1==0&&t<e}l(V7e,"isIndex"),F(V7e,"isIndex");var P$=V7e;function G7e(t,e,r){e=="__proto__"&&M$?M$(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}l(G7e,"baseAssignValue"),F(G7e,"baseAssignValue");var JX=G7e;function q7e(t,e){return t===e||t!==t&&e!==e}l(q7e,"eq"),F(q7e,"eq");var m_=q7e,RZt=Object.prototype,OZt=RZt.hasOwnProperty;function Y7e(t,e,r){var n=t[e];(!(OZt.call(t,e)&&m_(n,r))||r===void 0&&!(e in t))&&JX(t,e,r)}l(Y7e,"assignValue"),F(Y7e,"assignValue");var R$=Y7e;function U7e(t,e,r,n){var a=!r;r||(r={});for(var i=-1,s=e.length;++i<s;){var o=e[i],u=n?n(r[o],t[o],o,r,t):void 0;u===void 0&&(u=t[o]),a?JX(r,o,u):R$(r,o,u)}return r}l(U7e,"copyObject"),F(U7e,"copyObject");var y_=U7e,j7e=Math.max;function K7e(t,e,r){return e=j7e(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,i=j7e(n.length-e,0),s=Array(i);++a<i;)s[a]=n[e+a];a=-1;for(var o=Array(e+1);++a<e;)o[a]=n[a];return o[e]=r(s),bZt(t,this,o)}}l(K7e,"overRest"),F(K7e,"overRest");var DZt=K7e;function X7e(t,e){return IZt(DZt(t,e,g_),t+"")}l(X7e,"baseRest"),F(X7e,"baseRest");var eZ=X7e,FZt=9007199254740991;function Z7e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=FZt}l(Z7e,"isLength"),F(Z7e,"isLength");var tZ=Z7e;function Q7e(t){return t!=null&&tZ(t.length)&&!Wf(t)}l(Q7e,"isArrayLike"),F(Q7e,"isArrayLike");var bd=Q7e;function J7e(t,e,r){if(!uu(r))return!1;var n=typeof e;return(n=="number"?bd(r)&&P$(e,r.length):n=="string"&&e in r)?m_(r[e],t):!1}l(J7e,"isIterateeCall"),F(J7e,"isIterateeCall");var O$=J7e;function eNe(t){return eZ(function(e,r){var n=-1,a=r.length,i=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,s&&O$(r[0],r[1],s)&&(i=a<3?void 0:i,a=1),e=Object(e);++n<a;){var o=r[n];o&&t(e,o,n,i)}return e})}l(eNe,"createAssigner"),F(eNe,"createAssigner");var BZt=eNe,zZt=Object.prototype;function tNe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||zZt;return t===r}l(tNe,"isPrototype"),F(tNe,"isPrototype");var v_=tNe;function rNe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}l(rNe,"baseTimes"),F(rNe,"baseTimes");var HZt=rNe,WZt="[object Arguments]";function nNe(t){return rh(t)&&Yp(t)==WZt}l(nNe,"baseIsArguments"),F(nNe,"baseIsArguments");var aNe=nNe,iNe=Object.prototype,VZt=iNe.hasOwnProperty,GZt=iNe.propertyIsEnumerable,qZt=aNe(function(){return arguments}())?aNe:function(t){return rh(t)&&VZt.call(t,"callee")&&!GZt.call(t,"callee")},D$=qZt;function sNe(){return!1}l(sNe,"stubFalse"),F(sNe,"stubFalse");var YZt=sNe,oNe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lNe=oNe&&typeof module=="object"&&module&&!module.nodeType&&module,UZt=lNe&&lNe.exports===oNe,cNe=UZt?vd.Buffer:void 0,jZt=cNe?cNe.isBuffer:void 0,KZt=jZt||YZt,b_=KZt,XZt="[object Arguments]",ZZt="[object Array]",QZt="[object Boolean]",JZt="[object Date]",eQt="[object Error]",tQt="[object Function]",rQt="[object Map]",nQt="[object Number]",aQt="[object Object]",iQt="[object RegExp]",sQt="[object Set]",oQt="[object String]",lQt="[object WeakMap]",cQt="[object ArrayBuffer]",uQt="[object DataView]",hQt="[object Float32Array]",dQt="[object Float64Array]",fQt="[object Int8Array]",pQt="[object Int16Array]",gQt="[object Int32Array]",mQt="[object Uint8Array]",yQt="[object Uint8ClampedArray]",vQt="[object Uint16Array]",bQt="[object Uint32Array]",Ua={};Ua[hQt]=Ua[dQt]=Ua[fQt]=Ua[pQt]=Ua[gQt]=Ua[mQt]=Ua[yQt]=Ua[vQt]=Ua[bQt]=!0,Ua[XZt]=Ua[ZZt]=Ua[cQt]=Ua[QZt]=Ua[uQt]=Ua[JZt]=Ua[eQt]=Ua[tQt]=Ua[rQt]=Ua[nQt]=Ua[aQt]=Ua[iQt]=Ua[sQt]=Ua[oQt]=Ua[lQt]=!1;function uNe(t){return rh(t)&&tZ(t.length)&&!!Ua[Yp(t)]}l(uNe,"baseIsTypedArray"),F(uNe,"baseIsTypedArray");var xQt=uNe;function hNe(t){return function(e){return t(e)}}l(hNe,"baseUnary"),F(hNe,"baseUnary");var x_=hNe,dNe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,w_=dNe&&typeof module=="object"&&module&&!module.nodeType&&module,wQt=w_&&w_.exports===dNe,rZ=wQt&&t7e.process,TQt=function(){try{var t=w_&&w_.require&&w_.require("util").types;return t||rZ&&rZ.binding&&rZ.binding("util")}catch(e){}}(),Up=TQt,fNe=Up&&Up.isTypedArray,EQt=fNe?x_(fNe):xQt,nZ=EQt,CQt=Object.prototype,SQt=CQt.hasOwnProperty;function pNe(t,e){var r=zn(t),n=!r&&D$(t),a=!r&&!n&&b_(t),i=!r&&!n&&!a&&nZ(t),s=r||n||a||i,o=s?HZt(t.length,String):[],u=o.length;for(var h in t)(e||SQt.call(t,h))&&!(s&&(h=="length"||a&&(h=="offset"||h=="parent")||i&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||P$(h,u)))&&o.push(h);return o}l(pNe,"arrayLikeKeys"),F(pNe,"arrayLikeKeys");var gNe=pNe;function mNe(t,e){return function(r){return t(e(r))}}l(mNe,"overArg"),F(mNe,"overArg");var yNe=mNe,_Qt=yNe(Object.keys,Object),kQt=_Qt,AQt=Object.prototype,NQt=AQt.hasOwnProperty;function vNe(t){if(!v_(t))return kQt(t);var e=[];for(var r in Object(t))NQt.call(t,r)&&r!="constructor"&&e.push(r);return e}l(vNe,"baseKeys"),F(vNe,"baseKeys");var bNe=vNe;function xNe(t){return bd(t)?gNe(t):bNe(t)}l(xNe,"keys"),F(xNe,"keys");var Ac=xNe,IQt=Object.prototype,LQt=IQt.hasOwnProperty,$Qt=BZt(function(t,e){if(v_(e)||bd(e)){y_(e,Ac(e),t);return}for(var r in e)LQt.call(e,r)&&R$(t,r,e[r])}),Nc=$Qt;function wNe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}l(wNe,"nativeKeysIn"),F(wNe,"nativeKeysIn");var MQt=wNe,PQt=Object.prototype,RQt=PQt.hasOwnProperty;function TNe(t){if(!uu(t))return MQt(t);var e=v_(t),r=[];for(var n in t)n=="constructor"&&(e||!RQt.call(t,n))||r.push(n);return r}l(TNe,"baseKeysIn"),F(TNe,"baseKeysIn");var OQt=TNe;function ENe(t){return bd(t)?gNe(t,!0):OQt(t)}l(ENe,"keysIn"),F(ENe,"keysIn");var F$=ENe,DQt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FQt=/^\w*$/;function CNe(t,e){if(zn(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||$$(t)?!0:FQt.test(t)||!DQt.test(t)||e!=null&&t in Object(e)}l(CNe,"isKey"),F(CNe,"isKey");var aZ=CNe,BQt=R1(Object,"create"),T_=BQt;function SNe(){this.__data__=T_?T_(null):{},this.size=0}l(SNe,"hashClear"),F(SNe,"hashClear");var zQt=SNe;function _Ne(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}l(_Ne,"hashDelete"),F(_Ne,"hashDelete");var HQt=_Ne,WQt="__lodash_hash_undefined__",VQt=Object.prototype,GQt=VQt.hasOwnProperty;function kNe(t){var e=this.__data__;if(T_){var r=e[t];return r===WQt?void 0:r}return GQt.call(e,t)?e[t]:void 0}l(kNe,"hashGet"),F(kNe,"hashGet");var qQt=kNe,YQt=Object.prototype,UQt=YQt.hasOwnProperty;function ANe(t){var e=this.__data__;return T_?e[t]!==void 0:UQt.call(e,t)}l(ANe,"hashHas"),F(ANe,"hashHas");var jQt=ANe,KQt="__lodash_hash_undefined__";function NNe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=T_&&e===void 0?KQt:e,this}l(NNe,"hashSet"),F(NNe,"hashSet");var XQt=NNe;function O1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(O1,"Hash"),F(O1,"Hash"),O1.prototype.clear=zQt,O1.prototype.delete=HQt,O1.prototype.get=qQt,O1.prototype.has=jQt,O1.prototype.set=XQt;var INe=O1;function LNe(){this.__data__=[],this.size=0}l(LNe,"listCacheClear"),F(LNe,"listCacheClear");var ZQt=LNe;function $Ne(t,e){for(var r=t.length;r--;)if(m_(t[r][0],e))return r;return-1}l($Ne,"assocIndexOf"),F($Ne,"assocIndexOf");var B$=$Ne,QQt=Array.prototype,JQt=QQt.splice;function MNe(t){var e=this.__data__,r=B$(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():JQt.call(e,r,1),--this.size,!0}l(MNe,"listCacheDelete"),F(MNe,"listCacheDelete");var eJt=MNe;function PNe(t){var e=this.__data__,r=B$(e,t);return r<0?void 0:e[r][1]}l(PNe,"listCacheGet"),F(PNe,"listCacheGet");var tJt=PNe;function RNe(t){return B$(this.__data__,t)>-1}l(RNe,"listCacheHas"),F(RNe,"listCacheHas");var rJt=RNe;function ONe(t,e){var r=this.__data__,n=B$(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}l(ONe,"listCacheSet"),F(ONe,"listCacheSet");var nJt=ONe;function D1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(D1,"ListCache"),F(D1,"ListCache"),D1.prototype.clear=ZQt,D1.prototype.delete=eJt,D1.prototype.get=tJt,D1.prototype.has=rJt,D1.prototype.set=nJt;var z$=D1,aJt=R1(vd,"Map"),E_=aJt;function DNe(){this.size=0,this.__data__={hash:new INe,map:new(E_||z$),string:new INe}}l(DNe,"mapCacheClear"),F(DNe,"mapCacheClear");var iJt=DNe;function FNe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}l(FNe,"isKeyable"),F(FNe,"isKeyable");var sJt=FNe;function BNe(t,e){var r=t.__data__;return sJt(e)?r[typeof e=="string"?"string":"hash"]:r.map}l(BNe,"getMapData"),F(BNe,"getMapData");var H$=BNe;function zNe(t){var e=H$(this,t).delete(t);return this.size-=e?1:0,e}l(zNe,"mapCacheDelete"),F(zNe,"mapCacheDelete");var oJt=zNe;function HNe(t){return H$(this,t).get(t)}l(HNe,"mapCacheGet"),F(HNe,"mapCacheGet");var lJt=HNe;function WNe(t){return H$(this,t).has(t)}l(WNe,"mapCacheHas"),F(WNe,"mapCacheHas");var cJt=WNe;function VNe(t,e){var r=H$(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}l(VNe,"mapCacheSet"),F(VNe,"mapCacheSet");var uJt=VNe;function F1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(F1,"MapCache"),F(F1,"MapCache"),F1.prototype.clear=iJt,F1.prototype.delete=oJt,F1.prototype.get=lJt,F1.prototype.has=cJt,F1.prototype.set=uJt;var W$=F1,hJt="Expected a function";function V$(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(hJt);var r=F(function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=t.apply(this,n);return r.cache=i.set(a,s)||i,s},"memoized");return r.cache=new(V$.Cache||W$),r}l(V$,"memoize"),F(V$,"memoize"),V$.Cache=W$;var dJt=V$,fJt=500;function GNe(t){var e=dJt(t,function(n){return r.size===fJt&&r.clear(),n}),r=e.cache;return e}l(GNe,"memoizeCapped"),F(GNe,"memoizeCapped");var pJt=GNe,gJt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,mJt=/\\(\\)?/g,yJt=pJt(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(gJt,function(r,n,a,i){e.push(a?i.replace(mJt,"$1"):n||r)}),e}),vJt=yJt;function qNe(t){return t==null?"":HXt(t)}l(qNe,"toString2"),F(qNe,"toString");var bJt=qNe;function YNe(t,e){return zn(t)?t:aZ(t,e)?[t]:vJt(bJt(t))}l(YNe,"castPath"),F(YNe,"castPath");var G$=YNe;function UNe(t){if(typeof t=="string"||$$(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}l(UNe,"toKey"),F(UNe,"toKey");var C_=UNe;function jNe(t,e){e=G$(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[C_(e[r++])];return r&&r==n?t:void 0}l(jNe,"baseGet"),F(jNe,"baseGet");var iZ=jNe;function KNe(t,e,r){var n=t==null?void 0:iZ(t,e);return n===void 0?r:n}l(KNe,"get"),F(KNe,"get");var xJt=KNe;function XNe(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}l(XNe,"arrayPush"),F(XNe,"arrayPush");var sZ=XNe,ZNe=cu?cu.isConcatSpreadable:void 0;function QNe(t){return zn(t)||D$(t)||!!(ZNe&&t&&t[ZNe])}l(QNe,"isFlattenable"),F(QNe,"isFlattenable");var wJt=QNe;function oZ(t,e,r,n,a){var i=-1,s=t.length;for(r||(r=wJt),a||(a=[]);++i<s;){var o=t[i];e>0&&r(o)?e>1?oZ(o,e-1,r,n,a):sZ(a,o):n||(a[a.length]=o)}return a}l(oZ,"baseFlatten"),F(oZ,"baseFlatten");var lZ=oZ;function JNe(t){var e=t==null?0:t.length;return e?lZ(t,1):[]}l(JNe,"flatten"),F(JNe,"flatten");var nh=JNe,TJt=yNe(Object.getPrototypeOf,Object),eIe=TJt;function tIe(t,e,r){var n=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(a);++n<a;)i[n]=t[n+e];return i}l(tIe,"baseSlice"),F(tIe,"baseSlice");var rIe=tIe;function nIe(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a<i;)r=e(r,t[a],a,t);return r}l(nIe,"arrayReduce"),F(nIe,"arrayReduce");var EJt=nIe;function aIe(){this.__data__=new z$,this.size=0}l(aIe,"stackClear"),F(aIe,"stackClear");var CJt=aIe;function iIe(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}l(iIe,"stackDelete"),F(iIe,"stackDelete");var SJt=iIe;function sIe(t){return this.__data__.get(t)}l(sIe,"stackGet"),F(sIe,"stackGet");var _Jt=sIe;function oIe(t){return this.__data__.has(t)}l(oIe,"stackHas"),F(oIe,"stackHas");var kJt=oIe,AJt=200;function lIe(t,e){var r=this.__data__;if(r instanceof z$){var n=r.__data__;if(!E_||n.length<AJt-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new W$(n)}return r.set(t,e),this.size=r.size,this}l(lIe,"stackSet"),F(lIe,"stackSet");var NJt=lIe;function B1(t){var e=this.__data__=new z$(t);this.size=e.size}l(B1,"Stack"),F(B1,"Stack"),B1.prototype.clear=CJt,B1.prototype.delete=SJt,B1.prototype.get=_Jt,B1.prototype.has=kJt,B1.prototype.set=NJt;var S_=B1;function cIe(t,e){return t&&y_(e,Ac(e),t)}l(cIe,"baseAssign"),F(cIe,"baseAssign");var IJt=cIe;function uIe(t,e){return t&&y_(e,F$(e),t)}l(uIe,"baseAssignIn"),F(uIe,"baseAssignIn");var LJt=uIe,hIe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,dIe=hIe&&typeof module=="object"&&module&&!module.nodeType&&module,$Jt=dIe&&dIe.exports===hIe,fIe=$Jt?vd.Buffer:void 0,pIe=fIe?fIe.allocUnsafe:void 0;function gIe(t,e){if(e)return t.slice();var r=t.length,n=pIe?pIe(r):new t.constructor(r);return t.copy(n),n}l(gIe,"cloneBuffer"),F(gIe,"cloneBuffer");var MJt=gIe;function mIe(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var s=t[r];e(s,r,t)&&(i[a++]=s)}return i}l(mIe,"arrayFilter"),F(mIe,"arrayFilter");var cZ=mIe;function yIe(){return[]}l(yIe,"stubArray"),F(yIe,"stubArray");var vIe=yIe,PJt=Object.prototype,RJt=PJt.propertyIsEnumerable,bIe=Object.getOwnPropertySymbols,OJt=bIe?function(t){return t==null?[]:(t=Object(t),cZ(bIe(t),function(e){return RJt.call(t,e)}))}:vIe,uZ=OJt;function xIe(t,e){return y_(t,uZ(t),e)}l(xIe,"copySymbols"),F(xIe,"copySymbols");var DJt=xIe,FJt=Object.getOwnPropertySymbols,BJt=FJt?function(t){for(var e=[];t;)sZ(e,uZ(t)),t=eIe(t);return e}:vIe,wIe=BJt;function TIe(t,e){return y_(t,wIe(t),e)}l(TIe,"copySymbolsIn"),F(TIe,"copySymbolsIn");var zJt=TIe;function EIe(t,e,r){var n=e(t);return zn(t)?n:sZ(n,r(t))}l(EIe,"baseGetAllKeys"),F(EIe,"baseGetAllKeys");var CIe=EIe;function SIe(t){return CIe(t,Ac,uZ)}l(SIe,"getAllKeys"),F(SIe,"getAllKeys");var hZ=SIe;function _Ie(t){return CIe(t,F$,wIe)}l(_Ie,"getAllKeysIn"),F(_Ie,"getAllKeysIn");var kIe=_Ie,HJt=R1(vd,"DataView"),dZ=HJt,WJt=R1(vd,"Promise"),fZ=WJt,VJt=R1(vd,"Set"),vE=VJt,AIe="[object Map]",GJt="[object Object]",NIe="[object Promise]",IIe="[object Set]",LIe="[object WeakMap]",$Ie="[object DataView]",qJt=P1(dZ),YJt=P1(E_),UJt=P1(fZ),jJt=P1(vE),KJt=P1(ZX),z1=Yp;(dZ&&z1(new dZ(new ArrayBuffer(1)))!=$Ie||E_&&z1(new E_)!=AIe||fZ&&z1(fZ.resolve())!=NIe||vE&&z1(new vE)!=IIe||ZX&&z1(new ZX)!=LIe)&&(z1=F(function(t){var e=Yp(t),r=e==GJt?t.constructor:void 0,n=r?P1(r):"";if(n)switch(n){case qJt:return $Ie;case YJt:return AIe;case UJt:return NIe;case jJt:return IIe;case KJt:return LIe}return e},"getTag"));var bE=z1,XJt=Object.prototype,ZJt=XJt.hasOwnProperty;function MIe(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&ZJt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}l(MIe,"initCloneArray"),F(MIe,"initCloneArray");var QJt=MIe,JJt=vd.Uint8Array,q$=JJt;function PIe(t){var e=new t.constructor(t.byteLength);return new q$(e).set(new q$(t)),e}l(PIe,"cloneArrayBuffer"),F(PIe,"cloneArrayBuffer");var pZ=PIe;function RIe(t,e){var r=e?pZ(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}l(RIe,"cloneDataView"),F(RIe,"cloneDataView");var eer=RIe,ter=/\w*$/;function OIe(t){var e=new t.constructor(t.source,ter.exec(t));return e.lastIndex=t.lastIndex,e}l(OIe,"cloneRegExp"),F(OIe,"cloneRegExp");var rer=OIe,DIe=cu?cu.prototype:void 0,FIe=DIe?DIe.valueOf:void 0;function BIe(t){return FIe?Object(FIe.call(t)):{}}l(BIe,"cloneSymbol"),F(BIe,"cloneSymbol");var ner=BIe;function zIe(t,e){var r=e?pZ(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}l(zIe,"cloneTypedArray"),F(zIe,"cloneTypedArray");var aer=zIe,ier="[object Boolean]",ser="[object Date]",oer="[object Map]",ler="[object Number]",cer="[object RegExp]",uer="[object Set]",her="[object String]",der="[object Symbol]",fer="[object ArrayBuffer]",per="[object DataView]",ger="[object Float32Array]",mer="[object Float64Array]",yer="[object Int8Array]",ver="[object Int16Array]",ber="[object Int32Array]",xer="[object Uint8Array]",wer="[object Uint8ClampedArray]",Ter="[object Uint16Array]",Eer="[object Uint32Array]";function HIe(t,e,r){var n=t.constructor;switch(e){case fer:return pZ(t);case ier:case ser:return new n(+t);case per:return eer(t,r);case ger:case mer:case yer:case ver:case ber:case xer:case wer:case Ter:case Eer:return aer(t,r);case oer:return new n;case ler:case her:return new n(t);case cer:return rer(t);case uer:return new n;case der:return ner(t)}}l(HIe,"initCloneByTag"),F(HIe,"initCloneByTag");var Cer=HIe;function WIe(t){return typeof t.constructor=="function"&&!v_(t)?vZt(eIe(t)):{}}l(WIe,"initCloneObject"),F(WIe,"initCloneObject");var Ser=WIe,_er="[object Map]";function VIe(t){return rh(t)&&bE(t)==_er}l(VIe,"baseIsMap"),F(VIe,"baseIsMap");var ker=VIe,GIe=Up&&Up.isMap,Aer=GIe?x_(GIe):ker,Ner=Aer,Ier="[object Set]";function qIe(t){return rh(t)&&bE(t)==Ier}l(qIe,"baseIsSet"),F(qIe,"baseIsSet");var Ler=qIe,YIe=Up&&Up.isSet,$er=YIe?x_(YIe):Ler,Mer=$er,Per=1,Rer=2,Oer=4,UIe="[object Arguments]",Der="[object Array]",Fer="[object Boolean]",Ber="[object Date]",zer="[object Error]",jIe="[object Function]",Her="[object GeneratorFunction]",Wer="[object Map]",Ver="[object Number]",KIe="[object Object]",Ger="[object RegExp]",qer="[object Set]",Yer="[object String]",Uer="[object Symbol]",jer="[object WeakMap]",Ker="[object ArrayBuffer]",Xer="[object DataView]",Zer="[object Float32Array]",Qer="[object Float64Array]",Jer="[object Int8Array]",etr="[object Int16Array]",ttr="[object Int32Array]",rtr="[object Uint8Array]",ntr="[object Uint8ClampedArray]",atr="[object Uint16Array]",itr="[object Uint32Array]",Pa={};Pa[UIe]=Pa[Der]=Pa[Ker]=Pa[Xer]=Pa[Fer]=Pa[Ber]=Pa[Zer]=Pa[Qer]=Pa[Jer]=Pa[etr]=Pa[ttr]=Pa[Wer]=Pa[Ver]=Pa[KIe]=Pa[Ger]=Pa[qer]=Pa[Yer]=Pa[Uer]=Pa[rtr]=Pa[ntr]=Pa[atr]=Pa[itr]=!0,Pa[zer]=Pa[jIe]=Pa[jer]=!1;function __(t,e,r,n,a,i){var s,o=e&Per,u=e&Rer,h=e&Oer;if(r&&(s=a?r(t,n,a,i):r(t)),s!==void 0)return s;if(!uu(t))return t;var d=zn(t);if(d){if(s=QJt(t),!o)return xZt(t,s)}else{var f=bE(t),p=f==jIe||f==Her;if(b_(t))return MJt(t,o);if(f==KIe||f==UIe||p&&!a){if(s=u||p?{}:Ser(t),!o)return u?zJt(t,LJt(s,t)):DJt(t,IJt(s,t))}else{if(!Pa[f])return a?t:{};s=Cer(t,f,o)}}i||(i=new S_);var g=i.get(t);if(g)return g;i.set(t,s),Mer(t)?t.forEach(function(v){s.add(__(v,e,r,v,t,i))}):Ner(t)&&t.forEach(function(v,b){s.set(b,__(v,e,r,b,t,i))});var m=h?u?kIe:hZ:u?F$:Ac,y=d?void 0:m(t);return R7e(y||t,function(v,b){y&&(b=v,v=t[b]),R$(s,b,__(v,e,r,b,t,i))}),s}l(__,"baseClone"),F(__,"baseClone");var str=__,otr=4;function XIe(t){return str(t,otr)}l(XIe,"clone$1"),F(XIe,"clone");var uo=XIe;function ZIe(t){for(var e=-1,r=t==null?0:t.length,n=0,a=[];++e<r;){var i=t[e];i&&(a[n++]=i)}return a}l(ZIe,"compact"),F(ZIe,"compact");var k_=ZIe,ltr="__lodash_hash_undefined__";function QIe(t){return this.__data__.set(t,ltr),this}l(QIe,"setCacheAdd"),F(QIe,"setCacheAdd");var ctr=QIe;function JIe(t){return this.__data__.has(t)}l(JIe,"setCacheHas"),F(JIe,"setCacheHas");var utr=JIe;function A_(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new W$;++e<r;)this.add(t[e])}l(A_,"SetCache"),F(A_,"SetCache"),A_.prototype.add=A_.prototype.push=ctr,A_.prototype.has=utr;var gZ=A_;function eLe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}l(eLe,"arraySome"),F(eLe,"arraySome");var tLe=eLe;function rLe(t,e){return t.has(e)}l(rLe,"cacheHas"),F(rLe,"cacheHas");var mZ=rLe,htr=1,dtr=2;function nLe(t,e,r,n,a,i){var s=r&htr,o=t.length,u=e.length;if(o!=u&&!(s&&u>o))return!1;var h=i.get(t),d=i.get(e);if(h&&d)return h==e&&d==t;var f=-1,p=!0,g=r&dtr?new gZ:void 0;for(i.set(t,e),i.set(e,t);++f<o;){var m=t[f],y=e[f];if(n)var v=s?n(y,m,f,e,t,i):n(m,y,f,t,e,i);if(v!==void 0){if(v)continue;p=!1;break}if(g){if(!tLe(e,function(b,w){if(!mZ(g,w)&&(m===b||a(m,b,r,n,i)))return g.push(w)})){p=!1;break}}else if(!(m===y||a(m,y,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}l(nLe,"equalArrays"),F(nLe,"equalArrays");var aLe=nLe;function iLe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}l(iLe,"mapToArray"),F(iLe,"mapToArray");var ftr=iLe;function sLe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}l(sLe,"setToArray"),F(sLe,"setToArray");var yZ=sLe,ptr=1,gtr=2,mtr="[object Boolean]",ytr="[object Date]",vtr="[object Error]",btr="[object Map]",xtr="[object Number]",wtr="[object RegExp]",Ttr="[object Set]",Etr="[object String]",Ctr="[object Symbol]",Str="[object ArrayBuffer]",_tr="[object DataView]",oLe=cu?cu.prototype:void 0,vZ=oLe?oLe.valueOf:void 0;function lLe(t,e,r,n,a,i,s){switch(r){case _tr:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Str:return!(t.byteLength!=e.byteLength||!i(new q$(t),new q$(e)));case mtr:case ytr:case xtr:return m_(+t,+e);case vtr:return t.name==e.name&&t.message==e.message;case wtr:case Etr:return t==e+"";case btr:var o=ftr;case Ttr:var u=n&ptr;if(o||(o=yZ),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=gtr,s.set(t,e);var d=aLe(o(t),o(e),n,a,i,s);return s.delete(t),d;case Ctr:if(vZ)return vZ.call(t)==vZ.call(e)}return!1}l(lLe,"equalByTag"),F(lLe,"equalByTag");var ktr=lLe,Atr=1,Ntr=Object.prototype,Itr=Ntr.hasOwnProperty;function cLe(t,e,r,n,a,i){var s=r&Atr,o=hZ(t),u=o.length,h=hZ(e),d=h.length;if(u!=d&&!s)return!1;for(var f=u;f--;){var p=o[f];if(!(s?p in e:Itr.call(e,p)))return!1}var g=i.get(t),m=i.get(e);if(g&&m)return g==e&&m==t;var y=!0;i.set(t,e),i.set(e,t);for(var v=s;++f<u;){p=o[f];var b=t[p],w=e[p];if(n)var x=s?n(w,b,p,e,t,i):n(b,w,p,t,e,i);if(!(x===void 0?b===w||a(b,w,r,n,i):x)){y=!1;break}v||(v=p=="constructor")}if(y&&!v){var T=t.constructor,C=e.constructor;T!=C&&"constructor"in t&&"constructor"in e&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(y=!1)}return i.delete(t),i.delete(e),y}l(cLe,"equalObjects"),F(cLe,"equalObjects");var Ltr=cLe,$tr=1,uLe="[object Arguments]",hLe="[object Array]",Y$="[object Object]",Mtr=Object.prototype,dLe=Mtr.hasOwnProperty;function fLe(t,e,r,n,a,i){var s=zn(t),o=zn(e),u=s?hLe:bE(t),h=o?hLe:bE(e);u=u==uLe?Y$:u,h=h==uLe?Y$:h;var d=u==Y$,f=h==Y$,p=u==h;if(p&&b_(t)){if(!b_(e))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new S_),s||nZ(t)?aLe(t,e,r,n,a,i):ktr(t,e,u,r,n,a,i);if(!(r&$tr)){var g=d&&dLe.call(t,"__wrapped__"),m=f&&dLe.call(e,"__wrapped__");if(g||m){var y=g?t.value():t,v=m?e.value():e;return i||(i=new S_),a(y,v,r,n,i)}}return p?(i||(i=new S_),Ltr(t,e,r,n,a,i)):!1}l(fLe,"baseIsEqualDeep"),F(fLe,"baseIsEqualDeep");var Ptr=fLe;function bZ(t,e,r,n,a){return t===e?!0:t==null||e==null||!rh(t)&&!rh(e)?t!==t&&e!==e:Ptr(t,e,r,n,bZ,a)}l(bZ,"baseIsEqual"),F(bZ,"baseIsEqual");var pLe=bZ,Rtr=1,Otr=2;function gLe(t,e,r,n){var a=r.length,i=a,s=!n;if(t==null)return!i;for(t=Object(t);a--;){var o=r[a];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++a<i;){o=r[a];var u=o[0],h=t[u],d=o[1];if(s&&o[2]){if(h===void 0&&!(u in t))return!1}else{var f=new S_;if(n)var p=n(h,d,u,t,e,f);if(!(p===void 0?pLe(d,h,Rtr|Otr,n,f):p))return!1}}return!0}l(gLe,"baseIsMatch"),F(gLe,"baseIsMatch");var Dtr=gLe;function mLe(t){return t===t&&!uu(t)}l(mLe,"isStrictComparable"),F(mLe,"isStrictComparable");var yLe=mLe;function vLe(t){for(var e=Ac(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,yLe(a)]}return e}l(vLe,"getMatchData"),F(vLe,"getMatchData");var Ftr=vLe;function bLe(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}l(bLe,"matchesStrictComparable"),F(bLe,"matchesStrictComparable");var xLe=bLe;function wLe(t){var e=Ftr(t);return e.length==1&&e[0][2]?xLe(e[0][0],e[0][1]):function(r){return r===t||Dtr(r,t,e)}}l(wLe,"baseMatches"),F(wLe,"baseMatches");var Btr=wLe;function TLe(t,e){return t!=null&&e in Object(t)}l(TLe,"baseHasIn"),F(TLe,"baseHasIn");var ztr=TLe;function ELe(t,e,r){e=G$(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var s=C_(e[n]);if(!(i=t!=null&&r(t,s)))break;t=t[s]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&tZ(a)&&P$(s,a)&&(zn(t)||D$(t)))}l(ELe,"hasPath"),F(ELe,"hasPath");var CLe=ELe;function SLe(t,e){return t!=null&&CLe(t,e,ztr)}l(SLe,"hasIn"),F(SLe,"hasIn");var Htr=SLe,Wtr=1,Vtr=2;function _Le(t,e){return aZ(t)&&yLe(e)?xLe(C_(t),e):function(r){var n=xJt(r,t);return n===void 0&&n===e?Htr(r,t):pLe(e,n,Wtr|Vtr)}}l(_Le,"baseMatchesProperty"),F(_Le,"baseMatchesProperty");var Gtr=_Le;function kLe(t){return function(e){return e==null?void 0:e[t]}}l(kLe,"baseProperty"),F(kLe,"baseProperty");var qtr=kLe;function ALe(t){return function(e){return iZ(e,t)}}l(ALe,"basePropertyDeep"),F(ALe,"basePropertyDeep");var Ytr=ALe;function NLe(t){return aZ(t)?qtr(C_(t)):Ytr(t)}l(NLe,"property"),F(NLe,"property");var Utr=NLe;function ILe(t){return typeof t=="function"?t:t==null?g_:typeof t=="object"?zn(t)?Gtr(t[0],t[1]):Btr(t):Utr(t)}l(ILe,"baseIteratee"),F(ILe,"baseIteratee");var xd=ILe;function LLe(t,e,r,n){for(var a=-1,i=t==null?0:t.length;++a<i;){var s=t[a];e(n,s,r(s),t)}return n}l(LLe,"arrayAggregator"),F(LLe,"arrayAggregator");var jtr=LLe;function $Le(t){return function(e,r,n){for(var a=-1,i=Object(e),s=n(e),o=s.length;o--;){var u=s[t?o:++a];if(r(i[u],u,i)===!1)break}return e}}l($Le,"createBaseFor"),F($Le,"createBaseFor");var Ktr=$Le,Xtr=Ktr(),Ztr=Xtr;function MLe(t,e){return t&&Ztr(t,e,Ac)}l(MLe,"baseForOwn"),F(MLe,"baseForOwn");var Qtr=MLe;function PLe(t,e){return function(r,n){if(r==null)return r;if(!bd(r))return t(r,n);for(var a=r.length,i=e?a:-1,s=Object(r);(e?i--:++i<a)&&n(s[i],i,s)!==!1;);return r}}l(PLe,"createBaseEach"),F(PLe,"createBaseEach");var Jtr=PLe,err=Jtr(Qtr),H1=err;function RLe(t,e,r,n){return H1(t,function(a,i,s){e(n,a,r(a),s)}),n}l(RLe,"baseAggregator"),F(RLe,"baseAggregator");var trr=RLe;function OLe(t,e){return function(r,n){var a=zn(r)?jtr:trr,i=e?e():{};return a(r,t,xd(n),i)}}l(OLe,"createAggregator"),F(OLe,"createAggregator");var rrr=OLe,DLe=Object.prototype,nrr=DLe.hasOwnProperty,arr=eZ(function(t,e){t=Object(t);var r=-1,n=e.length,a=n>2?e[2]:void 0;for(a&&O$(e[0],e[1],a)&&(n=1);++r<n;)for(var i=e[r],s=F$(i),o=-1,u=s.length;++o<u;){var h=s[o],d=t[h];(d===void 0||m_(d,DLe[h])&&!nrr.call(t,h))&&(t[h]=i[h])}return t}),xZ=arr;function FLe(t){return rh(t)&&bd(t)}l(FLe,"isArrayLikeObject"),F(FLe,"isArrayLikeObject");var BLe=FLe;function zLe(t,e,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(e,t[n]))return!0;return!1}l(zLe,"arrayIncludesWith"),F(zLe,"arrayIncludesWith");var HLe=zLe,irr=200;function WLe(t,e,r,n){var a=-1,i=W7e,s=!0,o=t.length,u=[],h=e.length;if(!o)return u;r&&(e=f_(e,x_(r))),n?(i=HLe,s=!1):e.length>=irr&&(i=mZ,s=!1,e=new gZ(e));e:for(;++a<o;){var d=t[a],f=r==null?d:r(d);if(d=n||d!==0?d:0,s&&f===f){for(var p=h;p--;)if(e[p]===f)continue e;u.push(d)}else i(e,f,n)||u.push(d)}return u}l(WLe,"baseDifference"),F(WLe,"baseDifference");var srr=WLe,orr=eZ(function(t,e){return BLe(t)?srr(t,lZ(e,1,BLe,!0)):[]}),U$=orr;function VLe(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}l(VLe,"last"),F(VLe,"last");var W1=VLe;function GLe(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:p_(e),rIe(t,e<0?0:e,n)):[]}l(GLe,"drop"),F(GLe,"drop");var ho=GLe;function qLe(t,e,r){var n=t==null?0:t.length;return n?(e=r||e===void 0?1:p_(e),e=n-e,rIe(t,0,e<0?0:e)):[]}l(qLe,"dropRight"),F(qLe,"dropRight");var N_=qLe;function YLe(t){return typeof t=="function"?t:g_}l(YLe,"castFunction"),F(YLe,"castFunction");var lrr=YLe;function ULe(t,e){var r=zn(t)?R7e:H1;return r(t,lrr(e))}l(ULe,"forEach"),F(ULe,"forEach");var Zr=ULe;function jLe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}l(jLe,"arrayEvery"),F(jLe,"arrayEvery");var crr=jLe;function KLe(t,e){var r=!0;return H1(t,function(n,a,i){return r=!!e(n,a,i),r}),r}l(KLe,"baseEvery"),F(KLe,"baseEvery");var urr=KLe;function XLe(t,e,r){var n=zn(t)?crr:urr;return r&&O$(t,e,r)&&(e=void 0),n(t,xd(e))}l(XLe,"every"),F(XLe,"every");var ah=XLe;function ZLe(t,e){var r=[];return H1(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}l(ZLe,"baseFilter"),F(ZLe,"baseFilter");var QLe=ZLe;function JLe(t,e){var r=zn(t)?cZ:QLe;return r(t,xd(e))}l(JLe,"filter"),F(JLe,"filter");var hu=JLe;function e$e(t){return function(e,r,n){var a=Object(e);if(!bd(e)){var i=xd(r);e=Ac(e),r=F(function(o){return i(a[o],o,a)},"predicate")}var s=t(e,r,n);return s>-1?a[i?e[s]:s]:void 0}}l(e$e,"createFind"),F(e$e,"createFind");var hrr=e$e,drr=Math.max;function t$e(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:p_(r);return a<0&&(a=drr(n+a,0)),D7e(t,xd(e),a)}l(t$e,"findIndex"),F(t$e,"findIndex");var frr=t$e,prr=hrr(frr),xE=prr;function r$e(t){return t&&t.length?t[0]:void 0}l(r$e,"head"),F(r$e,"head");var ih=r$e;function n$e(t,e){var r=-1,n=bd(t)?Array(t.length):[];return H1(t,function(a,i,s){n[++r]=e(a,i,s)}),n}l(n$e,"baseMap"),F(n$e,"baseMap");var grr=n$e;function a$e(t,e){var r=zn(t)?f_:grr;return r(t,xd(e))}l(a$e,"map"),F(a$e,"map");var Pr=a$e;function i$e(t,e){return lZ(Pr(t,e),1)}l(i$e,"flatMap"),F(i$e,"flatMap");var du=i$e,mrr=Object.prototype,yrr=mrr.hasOwnProperty,vrr=rrr(function(t,e,r){yrr.call(t,r)?t[r].push(e):JX(t,r,[e])}),brr=vrr,xrr=Object.prototype,wrr=xrr.hasOwnProperty;function s$e(t,e){return t!=null&&wrr.call(t,e)}l(s$e,"baseHas"),F(s$e,"baseHas");var Trr=s$e;function o$e(t,e){return t!=null&&CLe(t,e,Trr)}l(o$e,"has"),F(o$e,"has");var Vr=o$e,Err="[object String]";function l$e(t){return typeof t=="string"||!zn(t)&&rh(t)&&Yp(t)==Err}l(l$e,"isString"),F(l$e,"isString");var Kl=l$e;function c$e(t,e){return f_(e,function(r){return t[r]})}l(c$e,"baseValues"),F(c$e,"baseValues");var Crr=c$e;function u$e(t){return t==null?[]:Crr(t,Ac(t))}l(u$e,"values"),F(u$e,"values");var ms=u$e,Srr=Math.max;function h$e(t,e,r,n){t=bd(t)?t:ms(t),r=r&&!n?p_(r):0;var a=t.length;return r<0&&(r=Srr(a+r,0)),Kl(t)?r<=a&&t.indexOf(e,r)>-1:!!a&&QX(t,e,r)>-1}l(h$e,"includes$1"),F(h$e,"includes");var gl=h$e,_rr=Math.max;function d$e(t,e,r){var n=t==null?0:t.length;if(!n)return-1;var a=r==null?0:p_(r);return a<0&&(a=_rr(n+a,0)),QX(t,e,a)}l(d$e,"indexOf"),F(d$e,"indexOf");var f$e=d$e,krr="[object Map]",Arr="[object Set]",Nrr=Object.prototype,Irr=Nrr.hasOwnProperty;function p$e(t){if(t==null)return!0;if(bd(t)&&(zn(t)||typeof t=="string"||typeof t.splice=="function"||b_(t)||nZ(t)||D$(t)))return!t.length;var e=bE(t);if(e==krr||e==Arr)return!t.size;if(v_(t))return!bNe(t).length;for(var r in t)if(Irr.call(t,r))return!1;return!0}l(p$e,"isEmpty"),F(p$e,"isEmpty");var Ra=p$e,Lrr="[object RegExp]";function g$e(t){return rh(t)&&Yp(t)==Lrr}l(g$e,"baseIsRegExp"),F(g$e,"baseIsRegExp");var $rr=g$e,m$e=Up&&Up.isRegExp,Mrr=m$e?x_(m$e):$rr,Vf=Mrr;function y$e(t){return t===void 0}l(y$e,"isUndefined"),F(y$e,"isUndefined");var Gf=y$e,Prr="Expected a function";function v$e(t){if(typeof t!="function")throw new TypeError(Prr);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}l(v$e,"negate"),F(v$e,"negate");var Rrr=v$e;function b$e(t,e,r,n){if(!uu(t))return t;e=G$(e,t);for(var a=-1,i=e.length,s=i-1,o=t;o!=null&&++a<i;){var u=C_(e[a]),h=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return t;if(a!=s){var d=o[u];h=n?n(d,u,o):void 0,h===void 0&&(h=uu(d)?d:P$(e[a+1])?[]:{})}R$(o,u,h),o=o[u]}return t}l(b$e,"baseSet"),F(b$e,"baseSet");var Orr=b$e;function x$e(t,e,r){for(var n=-1,a=e.length,i={};++n<a;){var s=e[n],o=iZ(t,s);r(o,s)&&Orr(i,G$(s,t),o)}return i}l(x$e,"basePickBy"),F(x$e,"basePickBy");var Drr=x$e;function w$e(t,e){if(t==null)return{};var r=f_(kIe(t),function(n){return[n]});return e=xd(e),Drr(t,r,function(n,a){return e(n,a[0])})}l(w$e,"pickBy"),F(w$e,"pickBy");var sh=w$e;function T$e(t,e,r,n,a){return a(t,function(i,s,o){r=n?(n=!1,i):e(r,i,s,o)}),r}l(T$e,"baseReduce"),F(T$e,"baseReduce");var Frr=T$e;function E$e(t,e,r){var n=zn(t)?EJt:Frr,a=arguments.length<3;return n(t,xd(e),r,a,H1)}l(E$e,"reduce"),F(E$e,"reduce");var Ic=E$e;function C$e(t,e){var r=zn(t)?cZ:QLe;return r(t,Rrr(xd(e)))}l(C$e,"reject"),F(C$e,"reject");var j$=C$e;function S$e(t,e){var r;return H1(t,function(n,a,i){return r=e(n,a,i),!r}),!!r}l(S$e,"baseSome"),F(S$e,"baseSome");var Brr=S$e;function _$e(t,e,r){var n=zn(t)?tLe:Brr;return r&&O$(t,e,r)&&(e=void 0),n(t,xd(e))}l(_$e,"some"),F(_$e,"some");var k$e=_$e,zrr=1/0,Hrr=vE&&1/yZ(new vE([,-0]))[1]==zrr?function(t){return new vE(t)}:Hs,Wrr=Hrr,Vrr=200;function A$e(t,e,r){var n=-1,a=W7e,i=t.length,s=!0,o=[],u=o;if(r)s=!1,a=HLe;else if(i>=Vrr){var h=e?null:Wrr(t);if(h)return yZ(h);s=!1,a=mZ,u=new gZ}else u=e?[]:o;e:for(;++n<i;){var d=t[n],f=e?e(d):d;if(d=r||d!==0?d:0,s&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;e&&u.push(f),o.push(d)}else a(u,f,r)||(u!==o&&u.push(f),o.push(d))}return o}l(A$e,"baseUniq"),F(A$e,"baseUniq");var Grr=A$e;function N$e(t){return t&&t.length?Grr(t):[]}l(N$e,"uniq"),F(N$e,"uniq");var wZ=N$e;function K$(t){console&&console.error&&console.error(`Error: ${t}`)}l(K$,"PRINT_ERROR"),F(K$,"PRINT_ERROR");function TZ(t){console&&console.warn&&console.warn(`Warning: ${t}`)}l(TZ,"PRINT_WARNING"),F(TZ,"PRINT_WARNING");function EZ(t){const e=new Date().getTime(),r=t();return{time:new Date().getTime()-e,value:r}}l(EZ,"timer"),F(EZ,"timer");function CZ(t){function e(){}l(e,"FakeConstructor"),F(e,"FakeConstructor"),e.prototype=t;const r=new e;function n(){return typeof r.bar}return l(n,"fakeAccess"),F(n,"fakeAccess"),n(),n(),t}l(CZ,"toFastProperties"),F(CZ,"toFastProperties");function I$e(t){return L$e(t)?t.LABEL:t.name}l(I$e,"tokenLabel"),F(I$e,"tokenLabel");function L$e(t){return Kl(t.LABEL)&&t.LABEL!==""}l(L$e,"hasTokenLabel"),F(L$e,"hasTokenLabel");var wd=(ev=class{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),Zr(this.definition,r=>{r.accept(e)})}},l(ev,"AbstractProduction"),F(ev,"AbstractProduction"),ev),ml=(tv=class extends wd{constructor(e){super([]),this.idx=1,Nc(this,sh(e,r=>r!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},l(tv,"NonTerminal"),F(tv,"NonTerminal"),tv),wE=(rv=class extends wd{constructor(e){super(e.definition),this.orgText="",Nc(this,sh(e,r=>r!==void 0))}},l(rv,"Rule"),F(rv,"Rule"),rv),Xl=(nv=class extends wd{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Nc(this,sh(e,r=>r!==void 0))}},l(nv,"Alternative"),F(nv,"Alternative"),nv),fo=(av=class extends wd{constructor(e){super(e.definition),this.idx=1,Nc(this,sh(e,r=>r!==void 0))}},l(av,"Option"),F(av,"Option"),av),Lc=(iv=class extends wd{constructor(e){super(e.definition),this.idx=1,Nc(this,sh(e,r=>r!==void 0))}},l(iv,"RepetitionMandatory"),F(iv,"RepetitionMandatory"),iv),$c=(sv=class extends wd{constructor(e){super(e.definition),this.idx=1,Nc(this,sh(e,r=>r!==void 0))}},l(sv,"RepetitionMandatoryWithSeparator"),F(sv,"RepetitionMandatoryWithSeparator"),sv),Ci=(ov=class extends wd{constructor(e){super(e.definition),this.idx=1,Nc(this,sh(e,r=>r!==void 0))}},l(ov,"Repetition"),F(ov,"Repetition"),ov),Zl=(lv=class extends wd{constructor(e){super(e.definition),this.idx=1,Nc(this,sh(e,r=>r!==void 0))}},l(lv,"RepetitionWithSeparator"),F(lv,"RepetitionWithSeparator"),lv),Ql=(cv=class extends wd{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Nc(this,sh(e,r=>r!==void 0))}},l(cv,"Alternation"),F(cv,"Alternation"),cv),ja=(uv=class{constructor(e){this.idx=1,Nc(this,sh(e,r=>r!==void 0))}accept(e){e.visit(this)}},l(uv,"Terminal"),F(uv,"Terminal"),uv);function $$e(t){return Pr(t,I_)}l($$e,"serializeGrammar"),F($$e,"serializeGrammar");function I_(t){function e(r){return Pr(r,I_)}if(l(e,"convertDefinition"),F(e,"convertDefinition"),t instanceof ml){const r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return Kl(t.label)&&(r.label=t.label),r}else{if(t instanceof Xl)return{type:"Alternative",definition:e(t.definition)};if(t instanceof fo)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Lc)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof $c)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:I_(new ja({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Zl)return{type:"RepetitionWithSeparator",idx:t.idx,separator:I_(new ja({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Ci)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Ql)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof ja){const r={type:"Terminal",name:t.terminalType.name,label:I$e(t.terminalType),idx:t.idx};Kl(t.label)&&(r.terminalLabel=t.label);const n=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(r.pattern=Vf(n)?n.source:n),r}else{if(t instanceof wE)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}l(I_,"serializeProduction"),F(I_,"serializeProduction");var TE=(hv=class{visit(e){const r=e;switch(r.constructor){case ml:return this.visitNonTerminal(r);case Xl:return this.visitAlternative(r);case fo:return this.visitOption(r);case Lc:return this.visitRepetitionMandatory(r);case $c:return this.visitRepetitionMandatoryWithSeparator(r);case Zl:return this.visitRepetitionWithSeparator(r);case Ci:return this.visitRepetition(r);case Ql:return this.visitAlternation(r);case ja:return this.visitTerminal(r);case wE:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}},l(hv,"GAstVisitor"),F(hv,"GAstVisitor"),hv);function M$e(t){return t instanceof Xl||t instanceof fo||t instanceof Ci||t instanceof Lc||t instanceof $c||t instanceof Zl||t instanceof ja||t instanceof wE}l(M$e,"isSequenceProd"),F(M$e,"isSequenceProd");function L_(t,e=[]){return t instanceof fo||t instanceof Ci||t instanceof Zl?!0:t instanceof Ql?k$e(t.definition,n=>L_(n,e)):t instanceof ml&&gl(e,t)?!1:t instanceof wd?(t instanceof ml&&e.push(t),ah(t.definition,n=>L_(n,e))):!1}l(L_,"isOptionalProd"),F(L_,"isOptionalProd");function P$e(t){return t instanceof Ql}l(P$e,"isBranchingProd"),F(P$e,"isBranchingProd");function oh(t){if(t instanceof ml)return"SUBRULE";if(t instanceof fo)return"OPTION";if(t instanceof Ql)return"OR";if(t instanceof Lc)return"AT_LEAST_ONE";if(t instanceof $c)return"AT_LEAST_ONE_SEP";if(t instanceof Zl)return"MANY_SEP";if(t instanceof Ci)return"MANY";if(t instanceof ja)return"CONSUME";throw Error("non exhaustive match")}l(oh,"getProductionDslName"),F(oh,"getProductionDslName");var X$=(dv=class{walk(e,r=[]){Zr(e.definition,(n,a)=>{const i=ho(e.definition,a+1);if(n instanceof ml)this.walkProdRef(n,i,r);else if(n instanceof ja)this.walkTerminal(n,i,r);else if(n instanceof Xl)this.walkFlat(n,i,r);else if(n instanceof fo)this.walkOption(n,i,r);else if(n instanceof Lc)this.walkAtLeastOne(n,i,r);else if(n instanceof $c)this.walkAtLeastOneSep(n,i,r);else if(n instanceof Zl)this.walkManySep(n,i,r);else if(n instanceof Ci)this.walkMany(n,i,r);else if(n instanceof Ql)this.walkOr(n,i,r);else throw Error("non exhaustive match")})}walkTerminal(e,r,n){}walkProdRef(e,r,n){}walkFlat(e,r,n){const a=r.concat(n);this.walk(e,a)}walkOption(e,r,n){const a=r.concat(n);this.walk(e,a)}walkAtLeastOne(e,r,n){const a=[new fo({definition:e.definition})].concat(r,n);this.walk(e,a)}walkAtLeastOneSep(e,r,n){const a=SZ(e,r,n);this.walk(e,a)}walkMany(e,r,n){const a=[new fo({definition:e.definition})].concat(r,n);this.walk(e,a)}walkManySep(e,r,n){const a=SZ(e,r,n);this.walk(e,a)}walkOr(e,r,n){const a=r.concat(n);Zr(e.definition,i=>{const s=new Xl({definition:[i]});this.walk(s,a)})}},l(dv,"RestWalker"),F(dv,"RestWalker"),dv);function SZ(t,e,r){return[new fo({definition:[new ja({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}l(SZ,"restForRepetitionWithSeparator"),F(SZ,"restForRepetitionWithSeparator");function EE(t){if(t instanceof ml)return EE(t.referencedRule);if(t instanceof ja)return D$e(t);if(M$e(t))return R$e(t);if(P$e(t))return O$e(t);throw Error("non exhaustive match")}l(EE,"first"),F(EE,"first");function R$e(t){let e=[];const r=t.definition;let n=0,a=r.length>n,i,s=!0;for(;a&&s;)i=r[n],s=L_(i),e=e.concat(EE(i)),n=n+1,a=r.length>n;return wZ(e)}l(R$e,"firstForSequence"),F(R$e,"firstForSequence");function O$e(t){const e=Pr(t.definition,r=>EE(r));return wZ(nh(e))}l(O$e,"firstForBranching"),F(O$e,"firstForBranching");function D$e(t){return[t.terminalType]}l(D$e,"firstForTerminal"),F(D$e,"firstForTerminal");var F$e="_~IN~_",qrr=(fv=class extends X${constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,r,n){}walkProdRef(e,r,n){const a=z$e(e.referencedRule,e.idx)+this.topProd.name,i=r.concat(n),s=new Xl({definition:i}),o=EE(s);this.follows[a]=o}},l(fv,"ResyncFollowsWalker"),F(fv,"ResyncFollowsWalker"),fv);function B$e(t){const e={};return Zr(t,r=>{const n=new qrr(r).startWalking();Nc(e,n)}),e}l(B$e,"computeAllProdsFollows"),F(B$e,"computeAllProdsFollows");function z$e(t,e){return t.name+e+F$e}l(z$e,"buildBetweenProdsFollowPrefix"),F(z$e,"buildBetweenProdsFollowPrefix");var Z$={},Yrr=new F8e;function $_(t){const e=t.toString();if(Z$.hasOwnProperty(e))return Z$[e];{const r=Yrr.pattern(e);return Z$[e]=r,r}}l($_,"getRegExpAst"),F($_,"getRegExpAst");function H$e(){Z$={}}l(H$e,"clearRegExpParserCache"),F(H$e,"clearRegExpParserCache");var W$e="Complement Sets are not supported for first char optimization",Q$=`Unable to use "first char" lexer optimizations:
|
||
`;function V$e(t,e=!1){try{const r=$_(t);return J$(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===W$e)e&&TZ(`${Q$} Unable to optimize: < ${t.toString()} >
|
||
Complement Sets cannot be automatically optimized.
|
||
This will disable the lexer's first char optimizations.
|
||
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";e&&(n=`
|
||
This will disable the lexer's first char optimizations.
|
||
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),K$(`${Q$}
|
||
Failed parsing: < ${t.toString()} >
|
||
Using the @chevrotain/regexp-to-ast library
|
||
Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}l(V$e,"getOptimizedStartCodesIndices"),F(V$e,"getOptimizedStartCodesIndices");function J$(t,e,r){switch(t.type){case"Disjunction":for(let a=0;a<t.value.length;a++)J$(t.value[a],e,r);break;case"Alternative":const n=t.value;for(let a=0;a<n.length;a++){const i=n[a];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const s=i;switch(s.type){case"Character":M_(s.value,e,r);break;case"Set":if(s.complement===!0)throw Error(W$e);Zr(s.value,u=>{if(typeof u=="number")M_(u,e,r);else{const h=u;if(r===!0)for(let d=h.from;d<=h.to;d++)M_(d,e,r);else{for(let d=h.from;d<=h.to&&d<R_;d++)M_(d,e,r);if(h.to>=R_){const d=h.from>=R_?h.from:R_,f=h.to,p=qf(d),g=qf(f);for(let m=p;m<=g;m++)e[m]=m}}}});break;case"Group":J$(s.value,e,r);break;default:throw Error("Non Exhaustive Match")}const o=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&eM(s)===!1||s.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return ms(e)}l(J$,"firstCharOptimizedIndices"),F(J$,"firstCharOptimizedIndices");function M_(t,e,r){const n=qf(t);e[n]=n,r===!0&&G$e(t,e)}l(M_,"addOptimizedIdxToResult"),F(M_,"addOptimizedIdxToResult");function G$e(t,e){const r=String.fromCharCode(t),n=r.toUpperCase();if(n!==r){const a=qf(n.charCodeAt(0));e[a]=a}else{const a=r.toLowerCase();if(a!==r){const i=qf(a.charCodeAt(0));e[i]=i}}}l(G$e,"handleIgnoreCase"),F(G$e,"handleIgnoreCase");function _Z(t,e){return xE(t.value,r=>{if(typeof r=="number")return gl(e,r);{const n=r;return xE(e,a=>n.from<=a&&a<=n.to)!==void 0}})}l(_Z,"findCode"),F(_Z,"findCode");function eM(t){const e=t.quantifier;return e&&e.atLeast===0?!0:t.value?zn(t.value)?ah(t.value,eM):eM(t.value):!1}l(eM,"isWholeOptional"),F(eM,"isWholeOptional");var Urr=(pv=class extends E${constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){gl(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?_Z(e,this.targetCharCodes)===void 0&&(this.found=!0):_Z(e,this.targetCharCodes)!==void 0&&(this.found=!0)}},l(pv,"CharCodeFinder"),F(pv,"CharCodeFinder"),pv);function tM(t,e){if(e instanceof RegExp){const r=$_(e),n=new Urr(t);return n.visit(r),n.found}else return xE(e,r=>gl(t,r.charCodeAt(0)))!==void 0}l(tM,"canMatchCharCode"),F(tM,"canMatchCharCode");var V1="PATTERN",P_="defaultMode",rM="modes";function q$e(t,e){e=xZ(e,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
|
||
`],tracer:F((w,x)=>x(),"tracer")});const r=e.tracer;r("initCharCodeToOptimizedIndexMap",()=>{dMe()});let n;r("Reject Lexer.NA",()=>{n=j$(t,w=>w[V1]===yl.NA)});let a=!1,i;r("Transform Patterns",()=>{a=!1,i=Pr(n,w=>{const x=w[V1];if(Vf(x)){const T=x.source;return T.length===1&&T!=="^"&&T!=="$"&&T!=="."&&!x.ignoreCase?T:T.length===2&&T[0]==="\\"&&!gl(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],T[1])?T[1]:kZ(x)}else{if(Wf(x))return a=!0,{exec:x};if(typeof x=="object")return a=!0,x;if(typeof x=="string"){if(x.length===1)return x;{const T=x.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),C=new RegExp(T);return kZ(C)}}else throw Error("non exhaustive match")}})});let s,o,u,h,d;r("misc mapping",()=>{s=Pr(n,w=>w.tokenTypeIdx),o=Pr(n,w=>{const x=w.GROUP;if(x!==yl.SKIPPED){if(Kl(x))return x;if(Gf(x))return!1;throw Error("non exhaustive match")}}),u=Pr(n,w=>{const x=w.LONGER_ALT;if(x)return zn(x)?Pr(x,C=>f$e(n,C)):[f$e(n,x)]}),h=Pr(n,w=>w.PUSH_MODE),d=Pr(n,w=>Vr(w,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{const w=IZ(e.lineTerminatorCharacters);f=Pr(n,x=>!1),e.positionTracking!=="onlyOffset"&&(f=Pr(n,x=>Vr(x,"LINE_BREAKS")?!!x.LINE_BREAKS:NZ(x,w)===!1&&tM(w,x.PATTERN)))});let p,g,m,y;r("Misc Mapping #2",()=>{p=Pr(n,AZ),g=Pr(i,uMe),m=Ic(n,(w,x)=>{const T=x.GROUP;return Kl(T)&&T!==yl.SKIPPED&&(w[T]=[]),w},{}),y=Pr(i,(w,x)=>({pattern:i[x],longerAlt:u[x],canLineTerminator:f[x],isCustom:p[x],short:g[x],group:o[x],push:h[x],pop:d[x],tokenTypeIdx:s[x],tokenType:n[x]}))});let v=!0,b=[];return e.safeMode||r("First Char Optimization",()=>{b=Ic(n,(w,x,T)=>{if(typeof x.PATTERN=="string"){const C=x.PATTERN.charCodeAt(0),S=qf(C);nM(w,S,y[T])}else if(zn(x.START_CHARS_HINT)){let C;Zr(x.START_CHARS_HINT,S=>{const E=typeof S=="string"?S.charCodeAt(0):S,k=qf(E);C!==k&&(C=k,nM(w,k,y[T]))})}else if(Vf(x.PATTERN))if(x.PATTERN.unicode)v=!1,e.ensureOptimizations&&K$(`${Q$} Unable to analyze < ${x.PATTERN.toString()} > pattern.
|
||
The regexp unicode flag is not currently supported by the regexp-to-ast library.
|
||
This will disable the lexer's first char optimizations.
|
||
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const C=V$e(x.PATTERN,e.ensureOptimizations);Ra(C)&&(v=!1),Zr(C,S=>{nM(w,S,y[T])})}else e.ensureOptimizations&&K$(`${Q$} TokenType: <${x.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
|
||
This will disable the lexer's first char optimizations.
|
||
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),v=!1;return w},[])}),{emptyGroups:m,patternIdxToConfig:y,charCodeToPatternIdxToConfig:b,hasCustom:a,canBeOptimized:v}}l(q$e,"analyzeTokenTypes"),F(q$e,"analyzeTokenTypes");function Y$e(t,e){let r=[];const n=j$e(t);r=r.concat(n.errors);const a=K$e(n.valid),i=a.valid;return r=r.concat(a.errors),r=r.concat(U$e(i)),r=r.concat(tMe(i)),r=r.concat(rMe(i,e)),r=r.concat(nMe(i)),r}l(Y$e,"validatePatterns"),F(Y$e,"validatePatterns");function U$e(t){let e=[];const r=hu(t,n=>Vf(n[V1]));return e=e.concat(X$e(r)),e=e.concat(Q$e(r)),e=e.concat(J$e(r)),e=e.concat(eMe(r)),e=e.concat(Z$e(r)),e}l(U$e,"validateRegExpPattern"),F(U$e,"validateRegExpPattern");function j$e(t){const e=hu(t,a=>!Vr(a,V1)),r=Pr(e,a=>({message:"Token Type: ->"+a.name+"<- missing static 'PATTERN' property",type:Si.MISSING_PATTERN,tokenTypes:[a]})),n=U$(t,e);return{errors:r,valid:n}}l(j$e,"findMissingPatterns"),F(j$e,"findMissingPatterns");function K$e(t){const e=hu(t,a=>{const i=a[V1];return!Vf(i)&&!Wf(i)&&!Vr(i,"exec")&&!Kl(i)}),r=Pr(e,a=>({message:"Token Type: ->"+a.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Si.INVALID_PATTERN,tokenTypes:[a]})),n=U$(t,e);return{errors:r,valid:n}}l(K$e,"findInvalidPatterns"),F(K$e,"findInvalidPatterns");var jrr=/[^\\][$]/;function X$e(t){const a=class a extends E${constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}};l(a,"EndAnchorFinder"),F(a,"EndAnchorFinder");let e=a;const r=hu(t,i=>{const s=i.PATTERN;try{const o=$_(s),u=new e;return u.visit(o),u.found}catch(o){return jrr.test(s.source)}});return Pr(r,i=>({message:`Unexpected RegExp Anchor Error:
|
||
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
|
||
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Si.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}l(X$e,"findEndOfInputAnchor"),F(X$e,"findEndOfInputAnchor");function Z$e(t){const e=hu(t,n=>n.PATTERN.test(""));return Pr(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Si.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}l(Z$e,"findEmptyMatchRegExps"),F(Z$e,"findEmptyMatchRegExps");var Krr=/[^\\[][\^]|^\^/;function Q$e(t){const a=class a extends E${constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}};l(a,"StartAnchorFinder"),F(a,"StartAnchorFinder");let e=a;const r=hu(t,i=>{const s=i.PATTERN;try{const o=$_(s),u=new e;return u.visit(o),u.found}catch(o){return Krr.test(s.source)}});return Pr(r,i=>({message:`Unexpected RegExp Anchor Error:
|
||
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
|
||
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Si.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}l(Q$e,"findStartOfInputAnchor"),F(Q$e,"findStartOfInputAnchor");function J$e(t){const e=hu(t,n=>{const a=n[V1];return a instanceof RegExp&&(a.multiline||a.global)});return Pr(e,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Si.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}l(J$e,"findUnsupportedFlags"),F(J$e,"findUnsupportedFlags");function eMe(t){const e=[];let r=Pr(t,i=>Ic(t,(s,o)=>(i.PATTERN.source===o.PATTERN.source&&!gl(e,o)&&o.PATTERN!==yl.NA&&(e.push(o),s.push(o)),s),[]));r=k_(r);const n=hu(r,i=>i.length>1);return Pr(n,i=>{const s=Pr(i,u=>u.name);return{message:`The same RegExp pattern ->${ih(i).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Si.DUPLICATE_PATTERNS_FOUND,tokenTypes:i}})}l(eMe,"findDuplicatePatterns"),F(eMe,"findDuplicatePatterns");function tMe(t){const e=hu(t,n=>{if(!Vr(n,"GROUP"))return!1;const a=n.GROUP;return a!==yl.SKIPPED&&a!==yl.NA&&!Kl(a)});return Pr(e,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Si.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}l(tMe,"findInvalidGroupType"),F(tMe,"findInvalidGroupType");function rMe(t,e){const r=hu(t,a=>a.PUSH_MODE!==void 0&&!gl(e,a.PUSH_MODE));return Pr(r,a=>({message:`Token Type: ->${a.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${a.PUSH_MODE}<-which does not exist`,type:Si.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[a]}))}l(rMe,"findModesThatDoNotExist"),F(rMe,"findModesThatDoNotExist");function nMe(t){const e=[],r=Ic(t,(n,a,i)=>{const s=a.PATTERN;return s===yl.NA||(Kl(s)?n.push({str:s,idx:i,tokenType:a}):Vf(s)&&iMe(s)&&n.push({str:s.source,idx:i,tokenType:a})),n},[]);return Zr(t,(n,a)=>{Zr(r,({str:i,idx:s,tokenType:o})=>{if(a<s&&aMe(i,n.PATTERN)){const u=`Token: ->${o.name}<- can never be matched.
|
||
Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
|
||
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:u,type:Si.UNREACHABLE_PATTERN,tokenTypes:[n,o]})}})}),e}l(nMe,"findUnreachablePatterns"),F(nMe,"findUnreachablePatterns");function aMe(t,e){if(Vf(e)){if(sMe(e))return!1;const r=e.exec(t);return r!==null&&r.index===0}else{if(Wf(e))return e(t,0,[],{});if(Vr(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}l(aMe,"tryToMatchStrToPattern"),F(aMe,"tryToMatchStrToPattern");function iMe(t){return xE([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>t.source.indexOf(r)!==-1)===void 0}l(iMe,"noMetaChar"),F(iMe,"noMetaChar");function sMe(t){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(t.source)}l(sMe,"usesLookAheadOrBehind"),F(sMe,"usesLookAheadOrBehind");function kZ(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}l(kZ,"addStickyFlag"),F(kZ,"addStickyFlag");function oMe(t,e,r){const n=[];return Vr(t,P_)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+P_+`> property in its definition
|
||
`,type:Si.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Vr(t,rM)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+rM+`> property in its definition
|
||
`,type:Si.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Vr(t,rM)&&Vr(t,P_)&&!Vr(t.modes,t.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${P_}: <${t.defaultMode}>which does not exist
|
||
`,type:Si.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Vr(t,rM)&&Zr(t.modes,(a,i)=>{Zr(a,(s,o)=>{if(Gf(s))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${o}>
|
||
`,type:Si.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(Vr(s,"LONGER_ALT")){const u=zn(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];Zr(u,h=>{!Gf(h)&&!gl(a,h)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${s.name}> outside of mode <${i}>
|
||
`,type:Si.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}l(oMe,"performRuntimeChecks"),F(oMe,"performRuntimeChecks");function lMe(t,e,r){const n=[];let a=!1;const i=k_(nh(ms(t.modes))),s=j$(i,u=>u[V1]===yl.NA),o=IZ(r);return e&&Zr(s,u=>{const h=NZ(u,o);if(h!==!1){const f={message:hMe(u,h),type:h.issue,tokenType:u};n.push(f)}else Vr(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(a=!0):tM(o,u.PATTERN)&&(a=!0)}),e&&!a&&n.push({message:`Warning: No LINE_BREAKS Found.
|
||
This Lexer has been defined to track line and column information,
|
||
But none of the Token Types can be identified as matching a line terminator.
|
||
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
|
||
for details.`,type:Si.NO_LINE_BREAKS_FLAGS}),n}l(lMe,"performWarningRuntimeChecks"),F(lMe,"performWarningRuntimeChecks");function cMe(t){const e={},r=Ac(t);return Zr(r,n=>{const a=t[n];if(zn(a))e[n]=[];else throw Error("non exhaustive match")}),e}l(cMe,"cloneEmptyGroups"),F(cMe,"cloneEmptyGroups");function AZ(t){const e=t.PATTERN;if(Vf(e))return!1;if(Wf(e))return!0;if(Vr(e,"exec"))return!0;if(Kl(e))return!1;throw Error("non exhaustive match")}l(AZ,"isCustomPattern"),F(AZ,"isCustomPattern");function uMe(t){return Kl(t)&&t.length===1?t.charCodeAt(0):!1}l(uMe,"isShortPattern"),F(uMe,"isShortPattern");var Xrr={test:F(function(t){const e=t.length;for(let r=this.lastIndex;r<e;r++){const n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function NZ(t,e){if(Vr(t,"LINE_BREAKS"))return!1;if(Vf(t.PATTERN)){try{tM(e,t.PATTERN)}catch(r){return{issue:Si.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Kl(t.PATTERN))return!1;if(AZ(t))return{issue:Si.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}l(NZ,"checkLineBreaksIssues"),F(NZ,"checkLineBreaksIssues");function hMe(t,e){if(e.issue===Si.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
|
||
The problem is in the <${t.name}> Token Type
|
||
Root cause: ${e.errMsg}.
|
||
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Si.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
|
||
The problem is in the <${t.name}> Token Type
|
||
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}l(hMe,"buildLineBreakIssueMessage"),F(hMe,"buildLineBreakIssueMessage");function IZ(t){return Pr(t,r=>Kl(r)?r.charCodeAt(0):r)}l(IZ,"getCharCodes"),F(IZ,"getCharCodes");function nM(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}l(nM,"addToMapOfArrays"),F(nM,"addToMapOfArrays");var R_=256,aM=[];function qf(t){return t<R_?t:aM[t]}l(qf,"charCodeToOptimizedIndex"),F(qf,"charCodeToOptimizedIndex");function dMe(){if(Ra(aM)){aM=new Array(65536);for(let t=0;t<65536;t++)aM[t]=t>255?255+~~(t/255):t}}l(dMe,"initCharCodeToOptimizedIndexMap"),F(dMe,"initCharCodeToOptimizedIndexMap");function CE(t,e){const r=t.tokenTypeIdx;return r===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[r]===!0}l(CE,"tokenStructuredMatcher"),F(CE,"tokenStructuredMatcher");function O_(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}l(O_,"tokenStructuredMatcherNoCategories"),F(O_,"tokenStructuredMatcherNoCategories");var fMe=1,pMe={};function SE(t){const e=gMe(t);mMe(e),vMe(e),yMe(e),Zr(e,r=>{r.isParent=r.categoryMatches.length>0})}l(SE,"augmentTokenTypes"),F(SE,"augmentTokenTypes");function gMe(t){let e=uo(t),r=t,n=!0;for(;n;){r=k_(nh(Pr(r,i=>i.CATEGORIES)));const a=U$(r,e);e=e.concat(a),Ra(a)?n=!1:r=a}return e}l(gMe,"expandCategories"),F(gMe,"expandCategories");function mMe(t){Zr(t,e=>{$Z(e)||(pMe[fMe]=e,e.tokenTypeIdx=fMe++),MZ(e)&&!zn(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),MZ(e)||(e.CATEGORIES=[]),bMe(e)||(e.categoryMatches=[]),xMe(e)||(e.categoryMatchesMap={})})}l(mMe,"assignTokenDefaultProps"),F(mMe,"assignTokenDefaultProps");function yMe(t){Zr(t,e=>{e.categoryMatches=[],Zr(e.categoryMatchesMap,(r,n)=>{e.categoryMatches.push(pMe[n].tokenTypeIdx)})})}l(yMe,"assignCategoriesTokensProp"),F(yMe,"assignCategoriesTokensProp");function vMe(t){Zr(t,e=>{LZ([],e)})}l(vMe,"assignCategoriesMapProp"),F(vMe,"assignCategoriesMapProp");function LZ(t,e){Zr(t,r=>{e.categoryMatchesMap[r.tokenTypeIdx]=!0}),Zr(e.CATEGORIES,r=>{const n=t.concat(e);gl(n,r)||LZ(n,r)})}l(LZ,"singleAssignCategoriesToksMap"),F(LZ,"singleAssignCategoriesToksMap");function $Z(t){return Vr(t,"tokenTypeIdx")}l($Z,"hasShortKeyProperty"),F($Z,"hasShortKeyProperty");function MZ(t){return Vr(t,"CATEGORIES")}l(MZ,"hasCategoriesProperty"),F(MZ,"hasCategoriesProperty");function bMe(t){return Vr(t,"categoryMatches")}l(bMe,"hasExtendingTokensTypesProperty"),F(bMe,"hasExtendingTokensTypesProperty");function xMe(t){return Vr(t,"categoryMatchesMap")}l(xMe,"hasExtendingTokensTypesMapProperty"),F(xMe,"hasExtendingTokensTypesMapProperty");function wMe(t){return Vr(t,"tokenTypeIdx")}l(wMe,"isTokenType"),F(wMe,"isTokenType");var PZ={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,a,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}},Si;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Si||(Si={}));var D_={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
|
||
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:PZ,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(D_);var yl=(gv=class{constructor(e,r=D_){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(a,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${a}>`);const{time:o,value:u}=EZ(i),h=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&h(`${s}<-- <${a}> time: ${o}ms`),this.traceInitIndent--,u}else return i()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
|
||
a boolean 2nd argument is no longer supported`);this.config=Nc({},D_,r);const n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let a,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===D_.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Xrr;else if(this.config.lineTerminatorCharacters===D_.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
|
||
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),zn(e)?a={modes:{defaultMode:uo(e)},defaultMode:P_}:(i=!1,a=uo(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(oMe(a,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(lMe(a,this.trackStartLines,this.config.lineTerminatorCharacters))})),a.modes=a.modes?a.modes:{},Zr(a.modes,(o,u)=>{a.modes[u]=j$(o,h=>Gf(h))});const s=Ac(a.modes);if(Zr(a.modes,(o,u)=>{this.TRACE_INIT(`Mode: <${u}> processing`,()=>{if(this.modes.push(u),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Y$e(o,s))}),Ra(this.lexerDefinitionErrors)){SE(o);let h;this.TRACE_INIT("analyzeTokenTypes",()=>{h=q$e(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[u]=h.patternIdxToConfig,this.charCodeToPatternIdxToConfig[u]=h.charCodeToPatternIdxToConfig,this.emptyGroups=Nc({},this.emptyGroups,h.emptyGroups),this.hasCustom=h.hasCustom||this.hasCustom,this.canModeBeOptimized[u]=h.canBeOptimized}})}),this.defaultMode=a.defaultMode,!Ra(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const u=Pr(this.lexerDefinitionErrors,h=>h.message).join(`-----------------------
|
||
`);throw new Error(`Errors detected in definition of Lexer:
|
||
`+u)}Zr(this.lexerDefinitionWarning,o=>{TZ(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(i&&(this.handleModes=Hs),this.trackStartLines===!1&&(this.computeNewColumn=g_),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Hs),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const o=Ic(this.canModeBeOptimized,(u,h,d)=>(h===!1&&u.push(d),u),[]);if(r.ensureOptimizations&&!Ra(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized.
|
||
Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
|
||
Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{H$e()}),this.TRACE_INIT("toFastProperties",()=>{CZ(this)})})}tokenize(e,r=this.defaultMode){if(!Ra(this.lexerDefinitionErrors)){const a=Pr(this.lexerDefinitionErrors,i=>i.message).join(`-----------------------
|
||
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
|
||
`+a)}return this.tokenizeInternal(e,r)}tokenizeInternal(e,r){let n,a,i,s,o,u,h,d,f,p,g,m,y,v,b;const w=e,x=w.length;let T=0,C=0;const S=this.hasCustom?0:Math.floor(e.length/10),E=new Array(S),k=[];let A=this.trackStartLines?1:void 0,I=this.trackStartLines?1:void 0;const L=cMe(this.emptyGroups),R=this.trackStartLines,O=this.config.lineTerminatorsPattern;let M=0,P=[],z=[];const D=[],B=[];Object.freeze(B);let W=!1;const U=F(H=>{if(D.length===1&&H.tokenType.PUSH_MODE===void 0){const q=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(H);k.push({offset:H.startOffset,line:H.startLine,column:H.startColumn,length:H.image.length,message:q})}else{D.pop();const q=W1(D);P=this.patternIdxToConfig[q],z=this.charCodeToPatternIdxToConfig[q],M=P.length;const Z=this.canModeBeOptimized[q]&&this.config.safeMode===!1;z&&Z?W=!0:W=!1}},"pop_mode");function j(H){D.push(H),z=this.charCodeToPatternIdxToConfig[H],P=this.patternIdxToConfig[H],M=P.length,M=P.length;const q=this.canModeBeOptimized[H]&&this.config.safeMode===!1;z&&q?W=!0:W=!1}l(j,"push_mode"),F(j,"push_mode"),j.call(this,r);let V;const Y=this.config.recoveryEnabled;for(;T<x;){u=null,f=-1;const H=w.charCodeAt(T);let q;if(W){const K=qf(H),re=z[K];q=re!==void 0?re:B}else q=P;const Z=q.length;for(n=0;n<Z;n++){V=q[n];const K=V.pattern;h=null;const re=V.short;if(re!==!1?H===re&&(f=1,u=K):V.isCustom===!0?(b=K.exec(w,T,E,L),b!==null?(u=b[0],f=u.length,b.payload!==void 0&&(h=b.payload)):u=null):(K.lastIndex=T,f=this.matchLength(K,e,T)),f!==-1){if(o=V.longerAlt,o!==void 0){u=e.substring(T,T+f);const Q=o.length;for(i=0;i<Q;i++){const te=P[o[i]],ee=te.pattern;if(d=null,te.isCustom===!0?(b=ee.exec(w,T,E,L),b!==null?(s=b[0],b.payload!==void 0&&(d=b.payload)):s=null):(ee.lastIndex=T,s=this.match(ee,e,T)),s&&s.length>u.length){u=s,f=s.length,h=d,V=te;break}}}break}}if(f!==-1){if(p=V.group,p!==void 0&&(u=u!==null?u:e.substring(T,T+f),g=V.tokenTypeIdx,m=this.createTokenInstance(u,T,g,V.tokenType,A,I,f),this.handlePayload(m,h),p===!1?C=this.addToken(E,C,m):L[p].push(m)),R===!0&&V.canLineTerminator===!0){let K=0,re,Q;O.lastIndex=0;do u=u!==null?u:e.substring(T,T+f),re=O.test(u),re===!0&&(Q=O.lastIndex-1,K++);while(re===!0);K!==0?(A=A+K,I=f-Q,this.updateTokenEndLineColumnLocation(m,p,Q,K,A,I,f)):I=this.computeNewColumn(I,f)}else I=this.computeNewColumn(I,f);T=T+f,this.handleModes(V,U,j,m)}else{const K=T,re=A,Q=I;let te=Y===!1;for(;te===!1&&T<x;)for(T++,a=0;a<M;a++){const ee=P[a],J=ee.pattern,ae=ee.short;if(ae!==!1?w.charCodeAt(T)===ae&&(te=!0):ee.isCustom===!0?te=J.exec(w,T,E,L)!==null:(J.lastIndex=T,te=J.exec(e)!==null),te===!0)break}if(y=T-K,I=this.computeNewColumn(I,y),v=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,K,y,re,Q,W1(D)),k.push({offset:K,line:re,column:Q,length:y,message:v}),Y===!1)break}}return this.hasCustom||(E.length=C),{tokens:E,groups:L,errors:k}}handleModes(e,r,n,a){if(e.pop===!0){const i=e.push;r(a),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)}updateTokenEndLineColumnLocation(e,r,n,a,i,s,o){let u,h;r!==void 0&&(u=n===o-1,h=u?-1:0,a===1&&u===!0||(e.endLine=i+h,e.endColumn=s-1+-h))}computeNewColumn(e,r){return e+r}createOffsetOnlyToken(e,r,n,a){return{image:e,startOffset:r,tokenTypeIdx:n,tokenType:a}}createStartOnlyToken(e,r,n,a,i,s){return{image:e,startOffset:r,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:a}}createFullToken(e,r,n,a,i,s,o){return{image:e,startOffset:r,endOffset:r+o-1,startLine:i,endLine:i,startColumn:s,endColumn:s+o-1,tokenTypeIdx:n,tokenType:a}}addTokenUsingPush(e,r,n){return e.push(n),r}addTokenUsingMemberAccess(e,r,n){return e[r]=n,r++,r}handlePayloadNoCustom(e,r){}handlePayloadWithCustom(e,r){r!==null&&(e.payload=r)}match(e,r,n){return e.test(r)===!0?r.substring(n,e.lastIndex):null}matchLength(e,r,n){return e.test(r)===!0?e.lastIndex-n:-1}},l(gv,"Lexer"),F(gv,"Lexer"),gv);yl.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",yl.NA=/NOT_APPLICABLE/;function G1(t){return RZ(t)?t.LABEL:t.name}l(G1,"tokenLabel2"),F(G1,"tokenLabel");function RZ(t){return Kl(t.LABEL)&&t.LABEL!==""}l(RZ,"hasTokenLabel2"),F(RZ,"hasTokenLabel");var Zrr="parent",TMe="categories",EMe="label",CMe="group",SMe="push_mode",_Me="pop_mode",kMe="longer_alt",AMe="line_breaks",NMe="start_chars_hint";function _E(t){return IMe(t)}l(_E,"createToken"),F(_E,"createToken");function IMe(t){const e=t.pattern,r={};if(r.name=t.name,Gf(e)||(r.PATTERN=e),Vr(t,Zrr))throw`The parent property is no longer supported.
|
||
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Vr(t,TMe)&&(r.CATEGORIES=t[TMe]),SE([r]),Vr(t,EMe)&&(r.LABEL=t[EMe]),Vr(t,CMe)&&(r.GROUP=t[CMe]),Vr(t,_Me)&&(r.POP_MODE=t[_Me]),Vr(t,SMe)&&(r.PUSH_MODE=t[SMe]),Vr(t,kMe)&&(r.LONGER_ALT=t[kMe]),Vr(t,AMe)&&(r.LINE_BREAKS=t[AMe]),Vr(t,NMe)&&(r.START_CHARS_HINT=t[NMe]),r}l(IMe,"createTokenInternal"),F(IMe,"createTokenInternal");var jp=_E({name:"EOF",pattern:yl.NA});SE([jp]);function F_(t,e,r,n,a,i,s,o){return{image:e,startOffset:r,endOffset:n,startLine:a,endLine:i,startColumn:s,endColumn:o,tokenTypeIdx:t.tokenTypeIdx,tokenType:t}}l(F_,"createTokenInstance"),F(F_,"createTokenInstance");function OZ(t,e){return CE(t,e)}l(OZ,"tokenMatcher"),F(OZ,"tokenMatcher");var kE={buildMismatchTokenMessage({expected:t,actual:e,previous:r,ruleName:n}){return`Expecting ${RZ(t)?`--> ${G1(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:r,customUserDescription:n,ruleName:a}){const i="Expecting: ",o=`
|
||
but found: '`+ih(e).image+"'";if(n)return i+n+o;{const u=Ic(t,(p,g)=>p.concat(g),[]),h=Pr(u,p=>`[${Pr(p,g=>G1(g)).join(", ")}]`),f=`one of these possible Token sequences:
|
||
${Pr(h,(p,g)=>` ${g+1}. ${p}`).join(`
|
||
`)}`;return i+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r,ruleName:n}){const a="Expecting: ",s=`
|
||
but found: '`+ih(e).image+"'";if(r)return a+r+s;{const u=`expecting at least one iteration which starts with one of these possible Token sequences::
|
||
<${Pr(t,h=>`[${Pr(h,d=>G1(d)).join(",")}]`).join(" ,")}>`;return a+u+s}}};Object.freeze(kE);var Qrr={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<-
|
||
inside top level rule: ->`+t.name+"<-"}},q1={buildDuplicateFoundError(t,e){function r(d){return d instanceof ja?d.terminalType.name:d instanceof ml?d.nonTerminalName:""}l(r,"getExtraProductionArgument2"),F(r,"getExtraProductionArgument");const n=t.name,a=ih(e),i=a.idx,s=oh(a),o=r(a),u=i>0;let h=`->${s}${u?i:""}<- ${o?`with argument: ->${o}<-`:""}
|
||
appears more than once (${e.length} times) in the top level rule: ->${n}<-.
|
||
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
|
||
`;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,`
|
||
`),h},buildNamespaceConflictError(t){return`Namespace conflict found in grammar.
|
||
The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>.
|
||
To resolve this make sure each Terminal and Non-Terminal names are unique
|
||
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
|
||
and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){const e=Pr(t.prefixPath,a=>G1(a)).join(", "),r=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix
|
||
in <OR${r}> inside <${t.topLevelRule.name}> Rule,
|
||
<${e}> may appears as a prefix path in all these alternatives.
|
||
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
|
||
For Further details.`},buildAlternationAmbiguityError(t){const e=t.alternation.idx===0?"":t.alternation.idx,r=t.prefixPath.length===0;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in <OR${e}> inside <${t.topLevelRule.name}> Rule,
|
||
`;if(r)n+=`These alternatives are all empty (match no tokens), making them indistinguishable.
|
||
Only the last alternative may be empty.
|
||
`;else{const a=Pr(t.prefixPath,i=>G1(i)).join(", ");n+=`<${a}> may appears as a prefix path in all these alternatives.
|
||
`}return n+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
||
For Further details.`,n},buildEmptyRepetitionError(t){let e=oh(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens.
|
||
This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in <OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
||
Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives:
|
||
<OR${t.alternation.idx}> inside <${t.topLevelRule.name}> Rule.
|
||
has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){const e=t.topLevelRule.name,r=Pr(t.leftRecursionPath,i=>i.name),n=`${e} --> ${r.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar.
|
||
rule: <${e}> can be invoked from itself (directly or indirectly)
|
||
without consuming any Tokens. The grammar path that causes this is:
|
||
${n}
|
||
To fix this refactor your grammar to remove the left recursion.
|
||
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof wE?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function LMe(t,e){const r=new Jrr(t,e);return r.resolveRefs(),r.errors}l(LMe,"resolveGrammar"),F(LMe,"resolveGrammar");var Jrr=(mv=class extends TE{constructor(e,r){super(),this.nameToTopRule=e,this.errMsgProvider=r,this.errors=[]}resolveRefs(){Zr(ms(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const r=this.nameToTopRule[e.nonTerminalName];if(r)e.referencedRule=r;else{const n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:vl.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},l(mv,"GastRefResolverVisitor"),F(mv,"GastRefResolverVisitor"),mv),enr=(yv=class extends X${constructor(e,r){super(),this.topProd=e,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=uo(this.path.ruleStack).reverse(),this.occurrenceStack=uo(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,r=[]){this.found||super.walk(e,r)}walkProdRef(e,r,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const a=r.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,a)}}updateExpectedNext(){Ra(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},l(yv,"AbstractNextPossibleTokensWalker"),F(yv,"AbstractNextPossibleTokensWalker"),yv),tnr=(vv=class extends enr{constructor(e,r){super(e,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,r,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const a=r.concat(n),i=new Xl({definition:a});this.possibleTokTypes=EE(i),this.found=!0}}},l(vv,"NextAfterTokenWalker"),F(vv,"NextAfterTokenWalker"),vv),iM=(bv=class extends X${constructor(e,r){super(),this.topRule=e,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},l(bv,"AbstractNextTerminalAfterProductionWalker"),F(bv,"AbstractNextTerminalAfterProductionWalker"),bv),rnr=(xv=class extends iM{walkMany(e,r,n){if(e.idx===this.occurrence){const a=ih(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof ja&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkMany(e,r,n)}},l(xv,"NextTerminalAfterManyWalker"),F(xv,"NextTerminalAfterManyWalker"),xv),$Me=(wv=class extends iM{walkManySep(e,r,n){if(e.idx===this.occurrence){const a=ih(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof ja&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkManySep(e,r,n)}},l(wv,"NextTerminalAfterManySepWalker"),F(wv,"NextTerminalAfterManySepWalker"),wv),nnr=(Tv=class extends iM{walkAtLeastOne(e,r,n){if(e.idx===this.occurrence){const a=ih(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof ja&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOne(e,r,n)}},l(Tv,"NextTerminalAfterAtLeastOneWalker"),F(Tv,"NextTerminalAfterAtLeastOneWalker"),Tv),MMe=(Ev=class extends iM{walkAtLeastOneSep(e,r,n){if(e.idx===this.occurrence){const a=ih(r.concat(n));this.result.isEndOfRule=a===void 0,a instanceof ja&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else super.walkAtLeastOneSep(e,r,n)}},l(Ev,"NextTerminalAfterAtLeastOneSepWalker"),F(Ev,"NextTerminalAfterAtLeastOneSepWalker"),Ev);function sM(t,e,r=[]){r=uo(r);let n=[],a=0;function i(o){return o.concat(ho(t,a+1))}l(i,"remainingPathWith"),F(i,"remainingPathWith");function s(o){const u=sM(i(o),e,r);return n.concat(u)}for(l(s,"getAlternativesForProd"),F(s,"getAlternativesForProd");r.length<e&&a<t.length;){const o=t[a];if(o instanceof Xl)return s(o.definition);if(o instanceof ml)return s(o.definition);if(o instanceof fo)n=s(o.definition);else if(o instanceof Lc){const u=o.definition.concat([new Ci({definition:o.definition})]);return s(u)}else if(o instanceof $c){const u=[new Xl({definition:o.definition}),new Ci({definition:[new ja({terminalType:o.separator})].concat(o.definition)})];return s(u)}else if(o instanceof Zl){const u=o.definition.concat([new Ci({definition:[new ja({terminalType:o.separator})].concat(o.definition)})]);n=s(u)}else if(o instanceof Ci){const u=o.definition.concat([new Ci({definition:o.definition})]);n=s(u)}else{if(o instanceof Ql)return Zr(o.definition,u=>{Ra(u.definition)===!1&&(n=s(u.definition))}),n;if(o instanceof ja)r.push(o.terminalType);else throw Error("non exhaustive match")}a++}return n.push({partialPath:r,suffixDef:ho(t,a)}),n}l(sM,"possiblePathsFrom"),F(sM,"possiblePathsFrom");function DZ(t,e,r,n){const a="EXIT_NONE_TERMINAL",i=[a],s="EXIT_ALTERNATIVE";let o=!1;const u=e.length,h=u-n-1,d=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!Ra(f);){const p=f.pop();if(p===s){o&&W1(f).idx<=h&&f.pop();continue}const g=p.def,m=p.idx,y=p.ruleStack,v=p.occurrenceStack;if(Ra(g))continue;const b=g[0];if(b===a){const w={idx:m,def:ho(g),ruleStack:N_(y),occurrenceStack:N_(v)};f.push(w)}else if(b instanceof ja)if(m<u-1){const w=m+1,x=e[w];if(r(x,b.terminalType)){const T={idx:w,def:ho(g),ruleStack:y,occurrenceStack:v};f.push(T)}}else if(m===u-1)d.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:y,occurrenceStack:v}),o=!0;else throw Error("non exhaustive match");else if(b instanceof ml){const w=uo(y);w.push(b.nonTerminalName);const x=uo(v);x.push(b.idx);const T={idx:m,def:b.definition.concat(i,ho(g)),ruleStack:w,occurrenceStack:x};f.push(T)}else if(b instanceof fo){const w={idx:m,def:ho(g),ruleStack:y,occurrenceStack:v};f.push(w),f.push(s);const x={idx:m,def:b.definition.concat(ho(g)),ruleStack:y,occurrenceStack:v};f.push(x)}else if(b instanceof Lc){const w=new Ci({definition:b.definition,idx:b.idx}),x=b.definition.concat([w],ho(g)),T={idx:m,def:x,ruleStack:y,occurrenceStack:v};f.push(T)}else if(b instanceof $c){const w=new ja({terminalType:b.separator}),x=new Ci({definition:[w].concat(b.definition),idx:b.idx}),T=b.definition.concat([x],ho(g)),C={idx:m,def:T,ruleStack:y,occurrenceStack:v};f.push(C)}else if(b instanceof Zl){const w={idx:m,def:ho(g),ruleStack:y,occurrenceStack:v};f.push(w),f.push(s);const x=new ja({terminalType:b.separator}),T=new Ci({definition:[x].concat(b.definition),idx:b.idx}),C=b.definition.concat([T],ho(g)),S={idx:m,def:C,ruleStack:y,occurrenceStack:v};f.push(S)}else if(b instanceof Ci){const w={idx:m,def:ho(g),ruleStack:y,occurrenceStack:v};f.push(w),f.push(s);const x=new Ci({definition:b.definition,idx:b.idx}),T=b.definition.concat([x],ho(g)),C={idx:m,def:T,ruleStack:y,occurrenceStack:v};f.push(C)}else if(b instanceof Ql)for(let w=b.definition.length-1;w>=0;w--){const x=b.definition[w],T={idx:m,def:x.definition.concat(ho(g)),ruleStack:y,occurrenceStack:v};f.push(T),f.push(s)}else if(b instanceof Xl)f.push({idx:m,def:b.definition.concat(ho(g)),ruleStack:y,occurrenceStack:v});else if(b instanceof wE)f.push(PMe(b,m,y,v));else throw Error("non exhaustive match")}return d}l(DZ,"nextPossibleTokensAfter"),F(DZ,"nextPossibleTokensAfter");function PMe(t,e,r,n){const a=uo(r);a.push(t.name);const i=uo(n);return i.push(1),{idx:e,def:t.definition,ruleStack:a,occurrenceStack:i}}l(PMe,"expandTopLevelRule"),F(PMe,"expandTopLevelRule");var hi;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(hi||(hi={}));function oM(t){if(t instanceof fo||t==="Option")return hi.OPTION;if(t instanceof Ci||t==="Repetition")return hi.REPETITION;if(t instanceof Lc||t==="RepetitionMandatory")return hi.REPETITION_MANDATORY;if(t instanceof $c||t==="RepetitionMandatoryWithSeparator")return hi.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Zl||t==="RepetitionWithSeparator")return hi.REPETITION_WITH_SEPARATOR;if(t instanceof Ql||t==="Alternation")return hi.ALTERNATION;throw Error("non exhaustive match")}l(oM,"getProdType"),F(oM,"getProdType");function FZ(t){const{occurrence:e,rule:r,prodType:n,maxLookahead:a}=t,i=oM(n);return i===hi.ALTERNATION?B_(e,r,a):z_(e,r,i,a)}l(FZ,"getLookaheadPaths"),F(FZ,"getLookaheadPaths");function RMe(t,e,r,n,a,i){const s=B_(t,e,r),o=HZ(s)?O_:CE;return i(s,n,o,a)}l(RMe,"buildLookaheadFuncForOr"),F(RMe,"buildLookaheadFuncForOr");function OMe(t,e,r,n,a,i){const s=z_(t,e,a,r),o=HZ(s)?O_:CE;return i(s[0],o,n)}l(OMe,"buildLookaheadFuncForOptionalProd"),F(OMe,"buildLookaheadFuncForOptionalProd");function DMe(t,e,r,n){const a=t.length,i=ah(t,s=>ah(s,o=>o.length===1));if(e)return function(s){const o=Pr(s,u=>u.GATE);for(let u=0;u<a;u++){const h=t[u],d=h.length,f=o[u];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<d;p++){const g=h[p],m=g.length;for(let y=0;y<m;y++){const v=this.LA(y+1);if(r(v,g[y])===!1)continue e}return u}}};if(i&&!n){const s=Pr(t,u=>nh(u)),o=Ic(s,(u,h,d)=>(Zr(h,f=>{Vr(u,f.tokenTypeIdx)||(u[f.tokenTypeIdx]=d),Zr(f.categoryMatches,p=>{Vr(u,p)||(u[p]=d)})}),u),{});return function(){const u=this.LA(1);return o[u.tokenTypeIdx]}}else return function(){for(let s=0;s<a;s++){const o=t[s],u=o.length;e:for(let h=0;h<u;h++){const d=o[h],f=d.length;for(let p=0;p<f;p++){const g=this.LA(p+1);if(r(g,d[p])===!1)continue e}return s}}}}l(DMe,"buildAlternativesLookAheadFunc"),F(DMe,"buildAlternativesLookAheadFunc");function FMe(t,e,r){const n=ah(t,i=>i.length===1),a=t.length;if(n&&!r){const i=nh(t);if(i.length===1&&Ra(i[0].categoryMatches)){const o=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const s=Ic(i,(o,u,h)=>(o[u.tokenTypeIdx]=!0,Zr(u.categoryMatches,d=>{o[d]=!0}),o),[]);return function(){const o=this.LA(1);return s[o.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;i<a;i++){const s=t[i],o=s.length;for(let u=0;u<o;u++){const h=this.LA(u+1);if(e(h,s[u])===!1)continue e}return!0}return!1}}l(FMe,"buildSingleAlternativeLookaheadFunction"),F(FMe,"buildSingleAlternativeLookaheadFunction");var anr=(Cv=class extends X${constructor(e,r,n){super(),this.topProd=e,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,r,n,a){return e.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(a),!0):!1}walkOption(e,r,n){this.checkIsTarget(e,hi.OPTION,r,n)||super.walkOption(e,r,n)}walkAtLeastOne(e,r,n){this.checkIsTarget(e,hi.REPETITION_MANDATORY,r,n)||super.walkOption(e,r,n)}walkAtLeastOneSep(e,r,n){this.checkIsTarget(e,hi.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}walkMany(e,r,n){this.checkIsTarget(e,hi.REPETITION,r,n)||super.walkOption(e,r,n)}walkManySep(e,r,n){this.checkIsTarget(e,hi.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(e,r,n)}},l(Cv,"RestDefinitionFinderWalker"),F(Cv,"RestDefinitionFinderWalker"),Cv),BMe=(Sv=class extends TE{constructor(e,r,n){super(),this.targetOccurrence=e,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(e,r){e.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,hi.OPTION)}visitRepetition(e){this.checkIsTarget(e,hi.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,hi.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,hi.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,hi.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,hi.ALTERNATION)}},l(Sv,"InsideDefinitionFinderVisitor"),F(Sv,"InsideDefinitionFinderVisitor"),Sv);function BZ(t){const e=new Array(t);for(let r=0;r<t;r++)e[r]=[];return e}l(BZ,"initializeArrayOfArrays"),F(BZ,"initializeArrayOfArrays");function lM(t){let e=[""];for(let r=0;r<t.length;r++){const n=t[r],a=[];for(let i=0;i<e.length;i++){const s=e[i];a.push(s+"_"+n.tokenTypeIdx);for(let o=0;o<n.categoryMatches.length;o++){const u="_"+n.categoryMatches[o];a.push(s+u)}}e=a}return e}l(lM,"pathToHashKeys"),F(lM,"pathToHashKeys");function zMe(t,e,r){for(let n=0;n<t.length;n++){if(n===r)continue;const a=t[n];for(let i=0;i<e.length;i++){const s=e[i];if(a[s]===!0)return!1}}return!0}l(zMe,"isUniquePrefixHash"),F(zMe,"isUniquePrefixHash");function zZ(t,e){const r=Pr(t,s=>sM([s],1)),n=BZ(r.length),a=Pr(r,s=>{const o={};return Zr(s,u=>{const h=lM(u.partialPath);Zr(h,d=>{o[d]=!0})}),o});let i=r;for(let s=1;s<=e;s++){const o=i;i=BZ(o.length);for(let u=0;u<o.length;u++){const h=o[u];for(let d=0;d<h.length;d++){const f=h[d].partialPath,p=h[d].suffixDef,g=lM(f);if(zMe(a,g,u)||Ra(p)||f.length===e){const y=n[u];if(cM(y,f)===!1){y.push(f);for(let v=0;v<g.length;v++){const b=g[v];a[u][b]=!0}}}else{const y=sM(p,s+1,f);i[u]=i[u].concat(y),Zr(y,v=>{const b=lM(v.partialPath);Zr(b,w=>{a[u][w]=!0})})}}}}return n}l(zZ,"lookAheadSequenceFromAlternatives"),F(zZ,"lookAheadSequenceFromAlternatives");function B_(t,e,r,n){const a=new BMe(t,hi.ALTERNATION,n);return e.accept(a),zZ(a.result,r)}l(B_,"getLookaheadPathsForOr"),F(B_,"getLookaheadPathsForOr");function z_(t,e,r,n){const a=new BMe(t,r);e.accept(a);const i=a.result,o=new anr(e,t,r).startWalking(),u=new Xl({definition:i}),h=new Xl({definition:o});return zZ([u,h],n)}l(z_,"getLookaheadPathsForOptionalProd"),F(z_,"getLookaheadPathsForOptionalProd");function cM(t,e){e:for(let r=0;r<t.length;r++){const n=t[r];if(n.length===e.length){for(let a=0;a<n.length;a++){const i=e[a],s=n[a];if((i===s||s.categoryMatchesMap[i.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}l(cM,"containsPath"),F(cM,"containsPath");function HMe(t,e){return t.length<e.length&&ah(t,(r,n)=>{const a=e[n];return r===a||a.categoryMatchesMap[r.tokenTypeIdx]})}l(HMe,"isStrictPrefixOfPath"),F(HMe,"isStrictPrefixOfPath");function HZ(t){return ah(t,e=>ah(e,r=>ah(r,n=>Ra(n.categoryMatches))))}l(HZ,"areTokenCategoriesNotUsed"),F(HZ,"areTokenCategoriesNotUsed");function WMe(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return Pr(e,r=>Object.assign({type:vl.CUSTOM_LOOKAHEAD_VALIDATION},r))}l(WMe,"validateLookahead"),F(WMe,"validateLookahead");function VMe(t,e,r,n){const a=du(t,u=>GMe(u,r)),i=ePe(t,e,r),s=du(t,u=>XMe(u,r)),o=du(t,u=>YMe(u,t,n,r));return a.concat(i,s,o)}l(VMe,"validateGrammar"),F(VMe,"validateGrammar");function GMe(t,e){const r=new inr;t.accept(r);const n=r.allProductions,a=brr(n,qMe),i=sh(a,o=>o.length>1);return Pr(ms(i),o=>{const u=ih(o),h=e.buildDuplicateFoundError(t,o),d=oh(u),f={message:h,type:vl.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:d,occurrence:u.idx},p=WZ(u);return p&&(f.parameter=p),f})}l(GMe,"validateDuplicateProductions"),F(GMe,"validateDuplicateProductions");function qMe(t){return`${oh(t)}_#_${t.idx}_#_${WZ(t)}`}l(qMe,"identifyProductionForDuplicates"),F(qMe,"identifyProductionForDuplicates");function WZ(t){return t instanceof ja?t.terminalType.name:t instanceof ml?t.nonTerminalName:""}l(WZ,"getExtraProductionArgument"),F(WZ,"getExtraProductionArgument");var inr=(_v=class extends TE{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}},l(_v,"OccurrenceValidationCollector"),F(_v,"OccurrenceValidationCollector"),_v);function YMe(t,e,r,n){const a=[];if(Ic(e,(s,o)=>o.name===t.name?s+1:s,0)>1){const s=n.buildDuplicateRuleNameError({topLevelRule:t,grammarName:r});a.push({message:s,type:vl.DUPLICATE_RULE_NAME,ruleName:t.name})}return a}l(YMe,"validateRuleDoesNotAlreadyExist"),F(YMe,"validateRuleDoesNotAlreadyExist");function UMe(t,e,r){const n=[];let a;return gl(e,t)||(a=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:a,type:vl.INVALID_RULE_OVERRIDE,ruleName:t})),n}l(UMe,"validateRuleIsOverridden"),F(UMe,"validateRuleIsOverridden");function VZ(t,e,r,n=[]){const a=[],i=H_(e.definition);if(Ra(i))return[];{const s=t.name;gl(i,t)&&a.push({message:r.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:n}),type:vl.LEFT_RECURSION,ruleName:s});const u=U$(i,n.concat([t])),h=du(u,d=>{const f=uo(n);return f.push(d),VZ(t,d,r,f)});return a.concat(h)}}l(VZ,"validateNoLeftRecursion"),F(VZ,"validateNoLeftRecursion");function H_(t){let e=[];if(Ra(t))return e;const r=ih(t);if(r instanceof ml)e.push(r.referencedRule);else if(r instanceof Xl||r instanceof fo||r instanceof Lc||r instanceof $c||r instanceof Zl||r instanceof Ci)e=e.concat(H_(r.definition));else if(r instanceof Ql)e=nh(Pr(r.definition,i=>H_(i.definition)));else if(!(r instanceof ja))throw Error("non exhaustive match");const n=L_(r),a=t.length>1;if(n&&a){const i=ho(t);return e.concat(H_(i))}else return e}l(H_,"getFirstNoneTerminal"),F(H_,"getFirstNoneTerminal");var GZ=(kv=class extends TE{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},l(kv,"OrCollector"),F(kv,"OrCollector"),kv);function jMe(t,e){const r=new GZ;t.accept(r);const n=r.alternations;return du(n,i=>{const s=N_(i.definition);return du(s,(o,u)=>{const h=DZ([o],[],CE,1);return Ra(h)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:i,emptyChoiceIdx:u}),type:vl.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:i.idx,alternative:u+1}]:[]})})}l(jMe,"validateEmptyOrAlternative"),F(jMe,"validateEmptyOrAlternative");function KMe(t,e,r){const n=new GZ;t.accept(n);let a=n.alternations;return a=j$(a,s=>s.ignoreAmbiguities===!0),du(a,s=>{const o=s.idx,u=s.maxLookahead||e,h=B_(o,t,u,s),d=QMe(h,s,t,r),f=JMe(h,s,t,r);return d.concat(f)})}l(KMe,"validateAmbiguousAlternationAlternatives"),F(KMe,"validateAmbiguousAlternationAlternatives");var snr=(Av=class extends TE{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}},l(Av,"RepetitionCollector"),F(Av,"RepetitionCollector"),Av);function XMe(t,e){const r=new GZ;t.accept(r);const n=r.alternations;return du(n,i=>i.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:i}),type:vl.TOO_MANY_ALTS,ruleName:t.name,occurrence:i.idx}]:[])}l(XMe,"validateTooManyAlts"),F(XMe,"validateTooManyAlts");function ZMe(t,e,r){const n=[];return Zr(t,a=>{const i=new snr;a.accept(i);const s=i.allProductions;Zr(s,o=>{const u=oM(o),h=o.maxLookahead||e,d=o.idx,p=z_(d,a,u,h)[0];if(Ra(nh(p))){const g=r.buildEmptyRepetitionError({topLevelRule:a,repetition:o});n.push({message:g,type:vl.NO_NON_EMPTY_LOOKAHEAD,ruleName:a.name})}})}),n}l(ZMe,"validateSomeNonEmptyLookaheadPath"),F(ZMe,"validateSomeNonEmptyLookaheadPath");function QMe(t,e,r,n){const a=[],i=Ic(t,(o,u,h)=>(e.definition[h].ignoreAmbiguities===!0||Zr(u,d=>{const f=[h];Zr(t,(p,g)=>{h!==g&&cM(p,d)&&e.definition[g].ignoreAmbiguities!==!0&&f.push(g)}),f.length>1&&!cM(a,d)&&(a.push(d),o.push({alts:f,path:d}))}),o),[]);return Pr(i,o=>{const u=Pr(o.alts,d=>d+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:u,prefixPath:o.path}),type:vl.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:e.idx,alternatives:o.alts}})}l(QMe,"checkAlternativesAmbiguities"),F(QMe,"checkAlternativesAmbiguities");function JMe(t,e,r,n){const a=Ic(t,(s,o,u)=>{const h=Pr(o,d=>({idx:u,path:d}));return s.concat(h)},[]);return k_(du(a,s=>{if(e.definition[s.idx].ignoreAmbiguities===!0)return[];const u=s.idx,h=s.path,d=hu(a,p=>e.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<u&&HMe(p.path,h));return Pr(d,p=>{const g=[p.idx+1,u+1],m=e.idx===0?"":e.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:e,ambiguityIndices:g,prefixPath:p.path}),type:vl.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:m,alternatives:g}})}))}l(JMe,"checkPrefixAlternativesAmbiguities"),F(JMe,"checkPrefixAlternativesAmbiguities");function ePe(t,e,r){const n=[],a=Pr(e,i=>i.name);return Zr(t,i=>{const s=i.name;if(gl(a,s)){const o=r.buildNamespaceConflictError(i);n.push({message:o,type:vl.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),n}l(ePe,"checkTerminalAndNoneTerminalsNameSpace"),F(ePe,"checkTerminalAndNoneTerminalsNameSpace");function tPe(t){const e=xZ(t,{errMsgProvider:Qrr}),r={};return Zr(t.rules,n=>{r[n.name]=n}),LMe(r,e.errMsgProvider)}l(tPe,"resolveGrammar2"),F(tPe,"resolveGrammar");function rPe(t){return t=xZ(t,{errMsgProvider:q1}),VMe(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}l(rPe,"validateGrammar2"),F(rPe,"validateGrammar");var nPe="MismatchedTokenException",aPe="NoViableAltException",iPe="EarlyExitException",sPe="NotAllInputParsedException",oPe=[nPe,aPe,iPe,sPe];Object.freeze(oPe);function W_(t){return gl(oPe,t.name)}l(W_,"isRecognitionException"),F(W_,"isRecognitionException");var uM=(Nv=class extends Error{constructor(e,r){super(e),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},l(Nv,"RecognitionException"),F(Nv,"RecognitionException"),Nv),lPe=(Iv=class extends uM{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=nPe}},l(Iv,"MismatchedTokenException"),F(Iv,"MismatchedTokenException"),Iv),onr=(Lv=class extends uM{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=aPe}},l(Lv,"NoViableAltException"),F(Lv,"NoViableAltException"),Lv),lnr=($v=class extends uM{constructor(e,r){super(e,r),this.name=sPe}},l($v,"NotAllInputParsedException"),F($v,"NotAllInputParsedException"),$v),cnr=(Mv=class extends uM{constructor(e,r,n){super(e,r),this.previousToken=n,this.name=iPe}},l(Mv,"EarlyExitException"),F(Mv,"EarlyExitException"),Mv),qZ={},cPe="InRuleRecoveryException",unr=(Pv=class extends Error{constructor(e){super(e),this.name=cPe}},l(Pv,"InRuleRecoveryException"),F(Pv,"InRuleRecoveryException"),Pv),hnr=(Rv=class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Vr(e,"recoveryEnabled")?e.recoveryEnabled:Yf.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=uPe)}getTokenToInsert(e){const r=F_(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,r,n,a){const i=this.findReSyncTokenType(),s=this.exportLexerState(),o=[];let u=!1;const h=this.LA(1);let d=this.LA(1);const f=F(()=>{const p=this.LA(0),g=this.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:h,previous:p,ruleName:this.getCurrRuleFullName()}),m=new lPe(g,h,this.LA(0));m.resyncedTokens=N_(o),this.SAVE_ERROR(m)},"generateErrorMessage");for(;!u;)if(this.tokenMatcher(d,a)){f();return}else if(n.call(this)){f(),e.apply(this,r);return}else this.tokenMatcher(d,i)?u=!0:(d=this.SKIP_TOKEN(),this.addToResyncTokens(d,o));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,r)))}getFollowsForInRuleRecovery(e,r){const n=this.getCurrentGrammarPath(e,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,r){if(this.canRecoverWithSingleTokenInsertion(e,r))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new unr("sad sad panda")}canPerformInRuleRecovery(e,r){return this.canRecoverWithSingleTokenInsertion(e,r)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,r){if(!this.canTokenTypeBeInsertedInRecovery(e)||Ra(r))return!1;const n=this.LA(1);return xE(r,i=>this.tokenMatcher(n,i))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return gl(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let r=this.LA(1),n=2;for(;;){const a=xE(e,i=>OZ(r,i));if(a!==void 0)return a;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return qZ;const e=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return Pr(e,(n,a)=>a===0?qZ:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[a],inRule:this.shortRuleNameToFullName(e[a-1])})}flattenFollowSet(){const e=Pr(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return nh(e)}getFollowSetFromFollowKey(e){if(e===qZ)return[jp];const r=e.ruleName+e.idxInCallingRule+F$e+e.inRule;return this.resyncFollows[r]}addToResyncTokens(e,r){return this.tokenMatcher(e,jp)||r.push(e),r}reSyncTo(e){const r=[];let n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return N_(r)}attemptInRepetitionRecovery(e,r,n,a,i,s,o){}getCurrentGrammarPath(e,r){const n=this.getHumanReadableRuleStack(),a=uo(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:a,lastTok:e,lastTokOccurrence:r}}getHumanReadableRuleStack(){return Pr(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},l(Rv,"Recoverable"),F(Rv,"Recoverable"),Rv);function uPe(t,e,r,n,a,i,s){const o=this.getKeyForAutomaticLookahead(n,a);let u=this.firstAfterRepMap[o];if(u===void 0){const p=this.getCurrRuleFullName(),g=this.getGAstProductions()[p];u=new i(g,a).startWalking(),this.firstAfterRepMap[o]=u}let h=u.token,d=u.occurrence;const f=u.isEndOfRule;this.RULE_STACK.length===1&&f&&h===void 0&&(h=jp,d=1),!(h===void 0||d===void 0)&&this.shouldInRepetitionRecoveryBeTried(h,d,s)&&this.tryInRepetitionRecovery(t,e,r,h)}l(uPe,"attemptInRepetitionRecovery"),F(uPe,"attemptInRepetitionRecovery");var dnr=4,Kp=8,hPe=1<<Kp,dPe=2<<Kp,YZ=3<<Kp,UZ=4<<Kp,jZ=5<<Kp,hM=6<<Kp;function dM(t,e,r){return r|e|t}l(dM,"getKeyForAutomaticLookahead"),F(dM,"getKeyForAutomaticLookahead");var KZ=(Ov=class{constructor(e){var r;this.maxLookahead=(r=e==null?void 0:e.maxLookahead)!==null&&r!==void 0?r:Yf.maxLookahead}validate(e){const r=this.validateNoLeftRecursion(e.rules);if(Ra(r)){const n=this.validateEmptyOrAlternatives(e.rules),a=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...r,...n,...a,...i]}return r}validateNoLeftRecursion(e){return du(e,r=>VZ(r,r,q1))}validateEmptyOrAlternatives(e){return du(e,r=>jMe(r,q1))}validateAmbiguousAlternationAlternatives(e,r){return du(e,n=>KMe(n,r,q1))}validateSomeNonEmptyLookaheadPath(e,r){return ZMe(e,r,q1)}buildLookaheadForAlternation(e){return RMe(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,DMe)}buildLookaheadForOptional(e){return OMe(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,oM(e.prodType),FMe)}},l(Ov,"LLkLookaheadStrategy"),F(Ov,"LLkLookaheadStrategy"),Ov),fnr=(Dv=class{initLooksAhead(e){this.dynamicTokensEnabled=Vr(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Yf.dynamicTokensEnabled,this.maxLookahead=Vr(e,"maxLookahead")?e.maxLookahead:Yf.maxLookahead,this.lookaheadStrategy=Vr(e,"lookaheadStrategy")?e.lookaheadStrategy:new KZ({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){Zr(e,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{const{alternation:n,repetition:a,option:i,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:u}=fPe(r);Zr(n,h=>{const d=h.idx===0?"":h.idx;this.TRACE_INIT(`${oh(h)}${d}`,()=>{const f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:h.idx,rule:r,maxLookahead:h.maxLookahead||this.maxLookahead,hasPredicates:h.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=dM(this.fullRuleNameToShort[r.name],hPe,h.idx);this.setLaFuncCache(p,f)})}),Zr(a,h=>{this.computeLookaheadFunc(r,h.idx,YZ,"Repetition",h.maxLookahead,oh(h))}),Zr(i,h=>{this.computeLookaheadFunc(r,h.idx,dPe,"Option",h.maxLookahead,oh(h))}),Zr(s,h=>{this.computeLookaheadFunc(r,h.idx,UZ,"RepetitionMandatory",h.maxLookahead,oh(h))}),Zr(o,h=>{this.computeLookaheadFunc(r,h.idx,hM,"RepetitionMandatoryWithSeparator",h.maxLookahead,oh(h))}),Zr(u,h=>{this.computeLookaheadFunc(r,h.idx,jZ,"RepetitionWithSeparator",h.maxLookahead,oh(h))})})})}computeLookaheadFunc(e,r,n,a,i,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{const o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),u=dM(this.fullRuleNameToShort[e.name],n,r);this.setLaFuncCache(u,o)})}getKeyForAutomaticLookahead(e,r){const n=this.getLastExplicitRuleShortName();return dM(n,e,r)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,r){this.lookAheadFuncsCache.set(e,r)}},l(Dv,"LooksAhead"),F(Dv,"LooksAhead"),Dv),pnr=(Fv=class extends TE{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},l(Fv,"DslMethodsCollectorVisitor"),F(Fv,"DslMethodsCollectorVisitor"),Fv),fM=new pnr;function fPe(t){fM.reset(),t.accept(fM);const e=fM.dslMethods;return fM.reset(),e}l(fPe,"collectMethods"),F(fPe,"collectMethods");function XZ(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}l(XZ,"setNodeLocationOnlyOffset"),F(XZ,"setNodeLocationOnlyOffset");function ZZ(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.startColumn=e.startColumn,t.startLine=e.startLine,t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset,t.endColumn=e.endColumn,t.endLine=e.endLine)}l(ZZ,"setNodeLocationFull"),F(ZZ,"setNodeLocationFull");function pPe(t,e,r){t.children[r]===void 0?t.children[r]=[e]:t.children[r].push(e)}l(pPe,"addTerminalToCst"),F(pPe,"addTerminalToCst");function gPe(t,e,r){t.children[e]===void 0?t.children[e]=[r]:t.children[e].push(r)}l(gPe,"addNoneTerminalToCst"),F(gPe,"addNoneTerminalToCst");var gnr="name";function QZ(t,e){Object.defineProperty(t,gnr,{enumerable:!1,configurable:!0,writable:!1,value:e})}l(QZ,"defineNameProp"),F(QZ,"defineNameProp");function mPe(t,e){const r=Ac(t),n=r.length;for(let a=0;a<n;a++){const i=r[a],s=t[i],o=s.length;for(let u=0;u<o;u++){const h=s[u];h.tokenTypeIdx===void 0&&this[h.name](h.children,e)}}}l(mPe,"defaultVisit"),F(mPe,"defaultVisit");function yPe(t,e){const r=F(function(){},"derivedConstructor");QZ(r,t+"BaseSemantics");const n={visit:F(function(a,i){if(zn(a)&&(a=a[0]),!Gf(a))return this[a.name](a.children,i)},"visit"),validateVisitor:F(function(){const a=bPe(this,e);if(!Ra(a)){const i=Pr(a,s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
|
||
${i.join(`
|
||
|
||
`).replace(/\n/g,`
|
||
`)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=e,r}l(yPe,"createBaseSemanticVisitorConstructor"),F(yPe,"createBaseSemanticVisitorConstructor");function vPe(t,e,r){const n=F(function(){},"derivedConstructor");QZ(n,t+"BaseSemanticsWithDefaults");const a=Object.create(r.prototype);return Zr(e,i=>{a[i]=mPe}),n.prototype=a,n.prototype.constructor=n,n}l(vPe,"createBaseVisitorConstructorWithDefaults"),F(vPe,"createBaseVisitorConstructorWithDefaults");var JZ;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(JZ||(JZ={}));function bPe(t,e){return xPe(t,e)}l(bPe,"validateVisitor"),F(bPe,"validateVisitor");function xPe(t,e){const r=hu(e,a=>Wf(t[a])===!1),n=Pr(r,a=>({msg:`Missing visitor method: <${a}> on ${t.constructor.name} CST Visitor.`,type:JZ.MISSING_METHOD,methodName:a}));return k_(n)}l(xPe,"validateMissingCstMethods"),F(xPe,"validateMissingCstMethods");var mnr=(Bv=class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Vr(e,"nodeLocationTracking")?e.nodeLocationTracking:Yf.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Hs,this.cstFinallyStateUpdate=Hs,this.cstPostTerminal=Hs,this.cstPostNonTerminal=Hs,this.cstPostRule=Hs;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ZZ,this.setNodeLocationFromNode=ZZ,this.cstPostRule=Hs,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Hs,this.setNodeLocationFromNode=Hs,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=XZ,this.setNodeLocationFromNode=XZ,this.cstPostRule=Hs,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Hs,this.setNodeLocationFromNode=Hs,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Hs,this.setNodeLocationFromNode=Hs,this.cstPostRule=Hs,this.setInitialNodeLocation=Hs;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const r=this.LA(1);e.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const r={name:e,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const r=this.LA(0),n=e.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(e,r){const n=this.CST_STACK[this.CST_STACK.length-1];pPe(n,r,e),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(e,r){const n=this.CST_STACK[this.CST_STACK.length-1];gPe(n,r,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Gf(this.baseCstVisitorConstructor)){const e=yPe(this.className,Ac(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Gf(this.baseCstVisitorWithDefaultsConstructor)){const e=vPe(this.className,Ac(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},l(Bv,"TreeBuilder"),F(Bv,"TreeBuilder"),Bv),ynr=(zv=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):gM}LA(e){const r=this.currIdx+e;return r<0||this.tokVectorLength<=r?gM:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},l(zv,"LexerAdapter"),F(zv,"LexerAdapter"),zv),vnr=(Hv=class{ACTION(e){return e.call(this)}consume(e,r,n){return this.consumeInternal(r,e,n)}subrule(e,r,n){return this.subruleInternal(r,e,n)}option(e,r){return this.optionInternal(r,e)}or(e,r){return this.orInternal(r,e)}many(e,r){return this.manyInternal(e,r)}atLeastOne(e,r){return this.atLeastOneInternal(e,r)}CONSUME(e,r){return this.consumeInternal(e,0,r)}CONSUME1(e,r){return this.consumeInternal(e,1,r)}CONSUME2(e,r){return this.consumeInternal(e,2,r)}CONSUME3(e,r){return this.consumeInternal(e,3,r)}CONSUME4(e,r){return this.consumeInternal(e,4,r)}CONSUME5(e,r){return this.consumeInternal(e,5,r)}CONSUME6(e,r){return this.consumeInternal(e,6,r)}CONSUME7(e,r){return this.consumeInternal(e,7,r)}CONSUME8(e,r){return this.consumeInternal(e,8,r)}CONSUME9(e,r){return this.consumeInternal(e,9,r)}SUBRULE(e,r){return this.subruleInternal(e,0,r)}SUBRULE1(e,r){return this.subruleInternal(e,1,r)}SUBRULE2(e,r){return this.subruleInternal(e,2,r)}SUBRULE3(e,r){return this.subruleInternal(e,3,r)}SUBRULE4(e,r){return this.subruleInternal(e,4,r)}SUBRULE5(e,r){return this.subruleInternal(e,5,r)}SUBRULE6(e,r){return this.subruleInternal(e,6,r)}SUBRULE7(e,r){return this.subruleInternal(e,7,r)}SUBRULE8(e,r){return this.subruleInternal(e,8,r)}SUBRULE9(e,r){return this.subruleInternal(e,9,r)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,r,n=mM){if(gl(this.definedRulesNames,e)){const s={message:q1.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:vl.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);const a=this.defineRule(e,r,n);return this[e]=a,a}OVERRIDE_RULE(e,r,n=mM){const a=UMe(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(a);const i=this.defineRule(e,r,n);return this[e]=i,i}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,r),!0}catch(a){if(W_(a))return!1;throw a}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return $$e(ms(this.gastProductionsCache))}},l(Hv,"RecognizerApi"),F(Hv,"RecognizerApi"),Hv),bnr=(Wv=class{initRecognizerEngine(e,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=O_,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Vr(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
|
||
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
|
||
For Further details.`);if(zn(e)){if(Ra(e))throw Error(`A Token Vocabulary cannot be empty.
|
||
Note that the first argument for the parser constructor
|
||
is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
|
||
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
|
||
For Further details.`)}if(zn(e))this.tokensMap=Ic(e,(i,s)=>(i[s.name]=s,i),{});else if(Vr(e,"modes")&&ah(nh(ms(e.modes)),wMe)){const i=nh(ms(e.modes)),s=wZ(i);this.tokensMap=Ic(s,(o,u)=>(o[u.name]=u,o),{})}else if(uu(e))this.tokensMap=uo(e);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=jp;const n=Vr(e,"modes")?nh(ms(e.modes)):ms(e),a=ah(n,i=>Ra(i.categoryMatches));this.tokenMatcher=a?O_:CE,SE(ms(this.tokensMap))}defineRule(e,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'
|
||
Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const a=Vr(n,"resyncEnabled")?n.resyncEnabled:mM.resyncEnabled,i=Vr(n,"recoveryValueFunc")?n.recoveryValueFunc:mM.recoveryValueFunc,s=this.ruleShortNameIdx<<dnr+Kp;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s;let o;return this.outputCst===!0?o=F(l(function(...d){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,d);const f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,a,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry2"),"invokeRuleWithTry"):o=F(l(function(...d){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),r.apply(this,d)}catch(f){return this.invokeRuleCatch(f,a,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),"invokeRuleWithTryCst"),Object.assign(o,{ruleName:e,originalGrammarAction:r})}invokeRuleCatch(e,r,n){const a=this.RULE_STACK.length===1,i=r&&!this.isBackTracking()&&this.recoveryEnabled;if(W_(e)){const s=e;if(i){const o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){const u=this.CST_STACK[this.CST_STACK.length-1];return u.recoveredNode=!0,u}else return n(e);else{if(this.outputCst){const u=this.CST_STACK[this.CST_STACK.length-1];u.recoveredNode=!0,s.partialCstResult=u}throw s}}else{if(a)return this.moveToTerminatedState(),n(e);throw s}}else throw e}optionInternal(e,r){const n=this.getKeyForAutomaticLookahead(dPe,r);return this.optionInternalLogic(e,r,n)}optionInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof e!="function"){i=e.DEF;const s=e.GATE;if(s!==void 0){const o=a;a=F(()=>s.call(this)&&o.call(this),"lookAheadFunc")}}else i=e;if(a.call(this)===!0)return i.call(this)}atLeastOneInternal(e,r){const n=this.getKeyForAutomaticLookahead(UZ,e);return this.atLeastOneInternalLogic(e,r,n)}atLeastOneInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;const s=r.GATE;if(s!==void 0){const o=a;a=F(()=>s.call(this)&&o.call(this),"lookAheadFunc")}}else i=r;if(a.call(this)===!0){let s=this.doSingleRepetition(i);for(;a.call(this)===!0&&s===!0;)s=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,hi.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],a,UZ,e,nnr)}atLeastOneSepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(hM,e);this.atLeastOneSepFirstInternalLogic(e,r,n)}atLeastOneSepFirstInternalLogic(e,r,n){const a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);const o=F(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,a,MMe],o,hM,e,MMe)}else throw this.raiseEarlyExitException(e,hi.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(e,r){const n=this.getKeyForAutomaticLookahead(YZ,e);return this.manyInternalLogic(e,r,n)}manyInternalLogic(e,r,n){let a=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;const o=r.GATE;if(o!==void 0){const u=a;a=F(()=>o.call(this)&&u.call(this),"lookaheadFunction")}}else i=r;let s=!0;for(;a.call(this)===!0&&s===!0;)s=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],a,YZ,e,rnr,s)}manySepFirstInternal(e,r){const n=this.getKeyForAutomaticLookahead(jZ,e);this.manySepFirstInternalLogic(e,r,n)}manySepFirstInternalLogic(e,r,n){const a=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){a.call(this);const o=F(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,a,$Me],o,jZ,e,$Me)}}repetitionSepSecondInternal(e,r,n,a,i){for(;n();)this.CONSUME(r),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,r,n,a,i],n,hM,e,i)}doSingleRepetition(e){const r=this.getLexerPosition();return e.call(this),this.getLexerPosition()>r}orInternal(e,r){const n=this.getKeyForAutomaticLookahead(hPe,r),a=zn(e)?e:e.DEF,s=this.getLaFuncFromCache(n).call(this,a);if(s!==void 0)return a[s].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new lnr(r,e))}}subruleInternal(e,r,n){let a;try{const i=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,a=e.apply(this,i),this.cstPostNonTerminal(a,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),a}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,r,n){throw W_(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,r,n){let a;try{const i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),a=i):this.consumeInternalError(e,i,n)}catch(i){a=this.consumeInternalRecovery(e,r,i)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,a),a}consumeInternalError(e,r,n){let a;const i=this.LA(0);throw n!==void 0&&n.ERR_MSG?a=n.ERR_MSG:a=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:r,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new lPe(a,r,i))}consumeInternalRecovery(e,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){const a=this.getFollowsForInRuleRecovery(e,r);try{return this.tryInRuleRecovery(e,a)}catch(i){throw i.name===cPe?n:i}}else throw n}saveRecogState(){const e=this.errors,r=uo(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),jp)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},l(Wv,"RecognizerEngine"),F(Wv,"RecognizerEngine"),Wv),xnr=(Vv=class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Vr(e,"errorMessageProvider")?e.errorMessageProvider:Yf.errorMessageProvider}SAVE_ERROR(e){if(W_(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:uo(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return uo(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,r,n){const a=this.getCurrRuleFullName(),i=this.getGAstProductions()[a],o=z_(e,i,r,this.maxLookahead)[0],u=[];for(let d=1;d<=this.maxLookahead;d++)u.push(this.LA(d));const h=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:u,previous:this.LA(0),customUserDescription:n,ruleName:a});throw this.SAVE_ERROR(new cnr(h,this.LA(1),this.LA(0)))}raiseNoAltException(e,r){const n=this.getCurrRuleFullName(),a=this.getGAstProductions()[n],i=B_(e,a,this.maxLookahead),s=[];for(let h=1;h<=this.maxLookahead;h++)s.push(this.LA(h));const o=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:s,previous:o,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new onr(u,this.LA(1),o))}},l(Vv,"ErrorHandler"),F(Vv,"ErrorHandler"),Vv),wnr=(Gv=class{initContentAssist(){}computeContentAssist(e,r){const n=this.gastProductionsCache[e];if(Gf(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return DZ([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const r=ih(e.ruleStack),a=this.getGAstProductions()[r];return new tnr(a,e).startWalking()}},l(Gv,"ContentAssist"),F(Gv,"ContentAssist"),Gv),pM={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(pM);var wPe=!0,TPe=Math.pow(2,Kp)-1,EPe=_E({name:"RECORDING_PHASE_TOKEN",pattern:yl.NA});SE([EPe]);var CPe=F_(EPe,`This IToken indicates the Parser is in Recording Phase
|
||
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(CPe);var Tnr={name:`This CSTNode indicates the Parser is in Recording Phase
|
||
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Enr=(qv=class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const r=e>0?e:"";this[`CONSUME${r}`]=function(n,a){return this.consumeInternalRecord(n,e,a)},this[`SUBRULE${r}`]=function(n,a){return this.subruleInternalRecord(n,e,a)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,e)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,e)},this[`MANY${r}`]=function(n){this.manyInternalRecord(e,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(e,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(e,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(e,n)}}this.consume=function(e,r,n){return this.consumeInternalRecord(r,e,n)},this.subrule=function(e,r,n){return this.subruleInternalRecord(r,e,n)},this.option=function(e,r){return this.optionInternalRecord(r,e)},this.or=function(e,r){return this.orInternalRecord(r,e)},this.many=function(e,r){this.manyInternalRecord(e,r)},this.atLeastOne=function(e,r){this.atLeastOneInternalRecord(e,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let r=0;r<10;r++){const n=r>0?r:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,r){return()=>!0}LA_RECORD(e){return gM}topLevelRuleRecord(e,r){try{const n=new wE({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
|
||
This error was thrown during the "grammar recording phase" For more info see:
|
||
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch(a){throw n}throw n}}optionInternalRecord(e,r){return AE.call(this,fo,e,r)}atLeastOneInternalRecord(e,r){AE.call(this,Lc,r,e)}atLeastOneSepFirstInternalRecord(e,r){AE.call(this,$c,r,e,wPe)}manyInternalRecord(e,r){AE.call(this,Ci,r,e)}manySepFirstInternalRecord(e,r){AE.call(this,Zl,r,e,wPe)}orInternalRecord(e,r){return SPe.call(this,e,r)}subruleInternalRecord(e,r,n){if(V_(r),!e||Vr(e,"ruleName")===!1){const o=new Error(`<SUBRULE${eQ(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
|
||
inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const a=W1(this.recordingProdStack),i=e.ruleName,s=new ml({idx:r,nonTerminalName:i,label:n==null?void 0:n.LABEL,referencedRule:void 0});return a.definition.push(s),this.outputCst?Tnr:pM}consumeInternalRecord(e,r,n){if(V_(r),!$Z(e)){const s=new Error(`<CONSUME${eQ(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
|
||
inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}const a=W1(this.recordingProdStack),i=new ja({idx:r,terminalType:e,label:n==null?void 0:n.LABEL});return a.definition.push(i),CPe}},l(qv,"GastRecorder"),F(qv,"GastRecorder"),qv);function AE(t,e,r,n=!1){V_(r);const a=W1(this.recordingProdStack),i=Wf(e)?e:e.DEF,s=new t({definition:[],idx:r});return n&&(s.separator=e.SEP),Vr(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),a.definition.push(s),this.recordingProdStack.pop(),pM}l(AE,"recordProd"),F(AE,"recordProd");function SPe(t,e){V_(e);const r=W1(this.recordingProdStack),n=zn(t)===!1,a=n===!1?t:t.DEF,i=new Ql({definition:[],idx:e,ignoreAmbiguities:n&&t.IGNORE_AMBIGUITIES===!0});Vr(t,"MAX_LOOKAHEAD")&&(i.maxLookahead=t.MAX_LOOKAHEAD);const s=k$e(a,o=>Wf(o.GATE));return i.hasPredicates=s,r.definition.push(i),Zr(a,o=>{const u=new Xl({definition:[]});i.definition.push(u),Vr(o,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:Vr(o,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),o.ALT.call(this),this.recordingProdStack.pop()}),pM}l(SPe,"recordOrProd"),F(SPe,"recordOrProd");function eQ(t){return t===0?"":`${t}`}l(eQ,"getIdxSuffix"),F(eQ,"getIdxSuffix");function V_(t){if(t<0||t>TPe){const e=new Error(`Invalid DSL Method idx value: <${t}>
|
||
Idx value must be a none negative value smaller than ${TPe+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}l(V_,"assertMethodIdxIsValid"),F(V_,"assertMethodIdxIsValid");var Cnr=(Yv=class{initPerformanceTracer(e){if(Vr(e,"traceInitPerf")){const r=e.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=Yf.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,r){if(this.traceInitPerf===!0){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);const{time:a,value:i}=EZ(r),s=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${n}<-- <${e}> time: ${a}ms`),this.traceInitIndent--,i}else return r()}},l(Yv,"PerformanceTracer"),F(Yv,"PerformanceTracer"),Yv);function _Pe(t,e){e.forEach(r=>{const n=r.prototype;Object.getOwnPropertyNames(n).forEach(a=>{if(a==="constructor")return;const i=Object.getOwnPropertyDescriptor(n,a);i&&(i.get||i.set)?Object.defineProperty(t.prototype,a,i):t.prototype[a]=r.prototype[a]})})}l(_Pe,"applyMixins"),F(_Pe,"applyMixins");var gM=F_(jp,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(gM);var Yf=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:kE,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),mM=Object.freeze({recoveryValueFunc:F(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),vl;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(vl||(vl={}));function tQ(t=void 0){return function(){return t}}l(tQ,"EMPTY_ALT"),F(tQ,"EMPTY_ALT");var rQ=(pg=class{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const r=this.className;this.TRACE_INIT("toFastProps",()=>{CZ(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),Zr(this.definedRulesNames,a=>{const s=this[a].originalGrammarAction;let o;this.TRACE_INIT(`${a} Rule`,()=>{o=this.topLevelRuleRecord(a,s)}),this.gastProductionsCache[a]=o})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=tPe({rules:ms(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(Ra(n)&&this.skipValidations===!1){const a=rPe({rules:ms(this.gastProductionsCache),tokenTypes:ms(this.tokensMap),errMsgProvider:q1,grammarName:r}),i=WMe({lookaheadStrategy:this.lookaheadStrategy,rules:ms(this.gastProductionsCache),tokenTypes:ms(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(a,i)}}),Ra(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const a=B$e(ms(this.gastProductionsCache));this.resyncFollows=a}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var a,i;(i=(a=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(a,{rules:ms(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(ms(this.gastProductionsCache))})),!pg.DEFER_DEFINITION_ERRORS_HANDLING&&!Ra(this.definitionErrors))throw e=Pr(this.definitionErrors,a=>a.message),new Error(`Parser Definition Errors detected:
|
||
${e.join(`
|
||
-------------------------------
|
||
`)}`)})}constructor(e,r){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(e,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),Vr(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
|
||
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
|
||
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
|
||
For further details.`);this.skipValidations=Vr(r,"skipValidations")?r.skipValidations:Yf.skipValidations}},l(pg,"_Parser"),F(pg,"Parser"),pg);rQ.DEFER_DEFINITION_ERRORS_HANDLING=!1,_Pe(rQ,[hnr,fnr,mnr,ynr,bnr,vnr,xnr,wnr,Enr,Cnr]);var Snr=(Uv=class extends rQ{constructor(e,r=Yf){const n=uo(r);n.outputCst=!1,super(e,n)}},l(Uv,"EmbeddedActionsParser"),F(Uv,"EmbeddedActionsParser"),Uv);function kPe(t,e){for(var r=-1,n=t==null?0:t.length,a=Array(n);++r<n;)a[r]=e(t[r],r,t);return a}l(kPe,"arrayMap2"),F(kPe,"arrayMap");var APe=kPe;function NPe(){this.__data__=[],this.size=0}l(NPe,"listCacheClear2"),F(NPe,"listCacheClear");var _nr=NPe;function IPe(t,e){return t===e||t!==t&&e!==e}l(IPe,"eq2"),F(IPe,"eq");var LPe=IPe;function $Pe(t,e){for(var r=t.length;r--;)if(LPe(t[r][0],e))return r;return-1}l($Pe,"assocIndexOf2"),F($Pe,"assocIndexOf");var yM=$Pe,knr=Array.prototype,Anr=knr.splice;function MPe(t){var e=this.__data__,r=yM(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Anr.call(e,r,1),--this.size,!0}l(MPe,"listCacheDelete2"),F(MPe,"listCacheDelete");var Nnr=MPe;function PPe(t){var e=this.__data__,r=yM(e,t);return r<0?void 0:e[r][1]}l(PPe,"listCacheGet2"),F(PPe,"listCacheGet");var Inr=PPe;function RPe(t){return yM(this.__data__,t)>-1}l(RPe,"listCacheHas2"),F(RPe,"listCacheHas");var Lnr=RPe;function OPe(t,e){var r=this.__data__,n=yM(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}l(OPe,"listCacheSet2"),F(OPe,"listCacheSet");var $nr=OPe;function Y1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(Y1,"ListCache2"),F(Y1,"ListCache"),Y1.prototype.clear=_nr,Y1.prototype.delete=Nnr,Y1.prototype.get=Inr,Y1.prototype.has=Lnr,Y1.prototype.set=$nr;var vM=Y1;function DPe(){this.__data__=new vM,this.size=0}l(DPe,"stackClear2"),F(DPe,"stackClear");var Mnr=DPe;function FPe(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}l(FPe,"stackDelete2"),F(FPe,"stackDelete");var Pnr=FPe;function BPe(t){return this.__data__.get(t)}l(BPe,"stackGet2"),F(BPe,"stackGet");var Rnr=BPe;function zPe(t){return this.__data__.has(t)}l(zPe,"stackHas2"),F(zPe,"stackHas");var Onr=zPe,Dnr=typeof global=="object"&&global&&global.Object===Object&&global,HPe=Dnr,Fnr=typeof self=="object"&&self&&self.Object===Object&&self,Bnr=HPe||Fnr||Function("return this")(),Uf=Bnr,znr=Uf.Symbol,Td=znr,WPe=Object.prototype,Hnr=WPe.hasOwnProperty,Wnr=WPe.toString,G_=Td?Td.toStringTag:void 0;function VPe(t){var e=Hnr.call(t,G_),r=t[G_];try{t[G_]=void 0;var n=!0}catch(i){}var a=Wnr.call(t);return n&&(e?t[G_]=r:delete t[G_]),a}l(VPe,"getRawTag2"),F(VPe,"getRawTag");var Vnr=VPe,Gnr=Object.prototype,qnr=Gnr.toString;function GPe(t){return qnr.call(t)}l(GPe,"objectToString2"),F(GPe,"objectToString");var Ynr=GPe,Unr="[object Null]",jnr="[object Undefined]",qPe=Td?Td.toStringTag:void 0;function YPe(t){return t==null?t===void 0?jnr:Unr:qPe&&qPe in Object(t)?Vnr(t):Ynr(t)}l(YPe,"baseGetTag2"),F(YPe,"baseGetTag");var NE=YPe;function UPe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}l(UPe,"isObject2"),F(UPe,"isObject");var nQ=UPe,Knr="[object AsyncFunction]",Xnr="[object Function]",Znr="[object GeneratorFunction]",Qnr="[object Proxy]";function jPe(t){if(!nQ(t))return!1;var e=NE(t);return e==Xnr||e==Znr||e==Knr||e==Qnr}l(jPe,"isFunction2"),F(jPe,"isFunction");var KPe=jPe,Jnr=Uf["__core-js_shared__"],aQ=Jnr,XPe=function(){var t=/[^.]+$/.exec(aQ&&aQ.keys&&aQ.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ZPe(t){return!!XPe&&XPe in t}l(ZPe,"isMasked2"),F(ZPe,"isMasked");var ear=ZPe,tar=Function.prototype,rar=tar.toString;function QPe(t){if(t!=null){try{return rar.call(t)}catch(e){}try{return t+""}catch(e){}}return""}l(QPe,"toSource2"),F(QPe,"toSource");var U1=QPe,nar=/[\\^$.*+?()[\]{}|]/g,aar=/^\[object .+?Constructor\]$/,iar=Function.prototype,sar=Object.prototype,oar=iar.toString,lar=sar.hasOwnProperty,car=RegExp("^"+oar.call(lar).replace(nar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function JPe(t){if(!nQ(t)||ear(t))return!1;var e=KPe(t)?car:aar;return e.test(U1(t))}l(JPe,"baseIsNative2"),F(JPe,"baseIsNative");var uar=JPe;function eRe(t,e){return t==null?void 0:t[e]}l(eRe,"getValue2"),F(eRe,"getValue");var har=eRe;function tRe(t,e){var r=har(t,e);return uar(r)?r:void 0}l(tRe,"getNative2"),F(tRe,"getNative");var IE=tRe,dar=IE(Uf,"Map"),q_=dar,far=IE(Object,"create"),Y_=far;function rRe(){this.__data__=Y_?Y_(null):{},this.size=0}l(rRe,"hashClear2"),F(rRe,"hashClear");var par=rRe;function nRe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}l(nRe,"hashDelete2"),F(nRe,"hashDelete");var gar=nRe,mar="__lodash_hash_undefined__",yar=Object.prototype,bar=yar.hasOwnProperty;function aRe(t){var e=this.__data__;if(Y_){var r=e[t];return r===mar?void 0:r}return bar.call(e,t)?e[t]:void 0}l(aRe,"hashGet2"),F(aRe,"hashGet");var xar=aRe,war=Object.prototype,Tar=war.hasOwnProperty;function iRe(t){var e=this.__data__;return Y_?e[t]!==void 0:Tar.call(e,t)}l(iRe,"hashHas2"),F(iRe,"hashHas");var Ear=iRe,Car="__lodash_hash_undefined__";function sRe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Y_&&e===void 0?Car:e,this}l(sRe,"hashSet2"),F(sRe,"hashSet");var Sar=sRe;function j1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(j1,"Hash2"),F(j1,"Hash"),j1.prototype.clear=par,j1.prototype.delete=gar,j1.prototype.get=xar,j1.prototype.has=Ear,j1.prototype.set=Sar;var oRe=j1;function lRe(){this.size=0,this.__data__={hash:new oRe,map:new(q_||vM),string:new oRe}}l(lRe,"mapCacheClear2"),F(lRe,"mapCacheClear");var _ar=lRe;function cRe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}l(cRe,"isKeyable2"),F(cRe,"isKeyable");var kar=cRe;function uRe(t,e){var r=t.__data__;return kar(e)?r[typeof e=="string"?"string":"hash"]:r.map}l(uRe,"getMapData2"),F(uRe,"getMapData");var bM=uRe;function hRe(t){var e=bM(this,t).delete(t);return this.size-=e?1:0,e}l(hRe,"mapCacheDelete2"),F(hRe,"mapCacheDelete");var Aar=hRe;function dRe(t){return bM(this,t).get(t)}l(dRe,"mapCacheGet2"),F(dRe,"mapCacheGet");var Nar=dRe;function fRe(t){return bM(this,t).has(t)}l(fRe,"mapCacheHas2"),F(fRe,"mapCacheHas");var Iar=fRe;function pRe(t,e){var r=bM(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}l(pRe,"mapCacheSet2"),F(pRe,"mapCacheSet");var Lar=pRe;function K1(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}l(K1,"MapCache2"),F(K1,"MapCache"),K1.prototype.clear=_ar,K1.prototype.delete=Aar,K1.prototype.get=Nar,K1.prototype.has=Iar,K1.prototype.set=Lar;var xM=K1,$ar=200;function gRe(t,e){var r=this.__data__;if(r instanceof vM){var n=r.__data__;if(!q_||n.length<$ar-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new xM(n)}return r.set(t,e),this.size=r.size,this}l(gRe,"stackSet2"),F(gRe,"stackSet");var Mar=gRe;function X1(t){var e=this.__data__=new vM(t);this.size=e.size}l(X1,"Stack2"),F(X1,"Stack"),X1.prototype.clear=Mnr,X1.prototype.delete=Pnr,X1.prototype.get=Rnr,X1.prototype.has=Onr,X1.prototype.set=Mar;var wM=X1,Par="__lodash_hash_undefined__";function mRe(t){return this.__data__.set(t,Par),this}l(mRe,"setCacheAdd2"),F(mRe,"setCacheAdd");var Rar=mRe;function yRe(t){return this.__data__.has(t)}l(yRe,"setCacheHas2"),F(yRe,"setCacheHas");var Oar=yRe;function U_(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new xM;++e<r;)this.add(t[e])}l(U_,"SetCache2"),F(U_,"SetCache"),U_.prototype.add=U_.prototype.push=Rar,U_.prototype.has=Oar;var vRe=U_;function bRe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}l(bRe,"arraySome2"),F(bRe,"arraySome");var Dar=bRe;function xRe(t,e){return t.has(e)}l(xRe,"cacheHas2"),F(xRe,"cacheHas");var wRe=xRe,Far=1,Bar=2;function TRe(t,e,r,n,a,i){var s=r&Far,o=t.length,u=e.length;if(o!=u&&!(s&&u>o))return!1;var h=i.get(t),d=i.get(e);if(h&&d)return h==e&&d==t;var f=-1,p=!0,g=r&Bar?new vRe:void 0;for(i.set(t,e),i.set(e,t);++f<o;){var m=t[f],y=e[f];if(n)var v=s?n(y,m,f,e,t,i):n(m,y,f,t,e,i);if(v!==void 0){if(v)continue;p=!1;break}if(g){if(!Dar(e,function(b,w){if(!wRe(g,w)&&(m===b||a(m,b,r,n,i)))return g.push(w)})){p=!1;break}}else if(!(m===y||a(m,y,r,n,i))){p=!1;break}}return i.delete(t),i.delete(e),p}l(TRe,"equalArrays2"),F(TRe,"equalArrays");var ERe=TRe,zar=Uf.Uint8Array,CRe=zar;function SRe(t){var e=-1,r=Array(t.size);return t.forEach(function(n,a){r[++e]=[a,n]}),r}l(SRe,"mapToArray2"),F(SRe,"mapToArray");var Har=SRe;function _Re(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}l(_Re,"setToArray2"),F(_Re,"setToArray");var iQ=_Re,War=1,Var=2,Gar="[object Boolean]",qar="[object Date]",Yar="[object Error]",Uar="[object Map]",jar="[object Number]",Kar="[object RegExp]",Xar="[object Set]",Zar="[object String]",Qar="[object Symbol]",Jar="[object ArrayBuffer]",eir="[object DataView]",kRe=Td?Td.prototype:void 0,sQ=kRe?kRe.valueOf:void 0;function ARe(t,e,r,n,a,i,s){switch(r){case eir:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Jar:return!(t.byteLength!=e.byteLength||!i(new CRe(t),new CRe(e)));case Gar:case qar:case jar:return LPe(+t,+e);case Yar:return t.name==e.name&&t.message==e.message;case Kar:case Zar:return t==e+"";case Uar:var o=Har;case Xar:var u=n&War;if(o||(o=iQ),t.size!=e.size&&!u)return!1;var h=s.get(t);if(h)return h==e;n|=Var,s.set(t,e);var d=ERe(o(t),o(e),n,a,i,s);return s.delete(t),d;case Qar:if(sQ)return sQ.call(t)==sQ.call(e)}return!1}l(ARe,"equalByTag2"),F(ARe,"equalByTag");var tir=ARe;function NRe(t,e){for(var r=-1,n=e.length,a=t.length;++r<n;)t[a+r]=e[r];return t}l(NRe,"arrayPush2"),F(NRe,"arrayPush");var IRe=NRe,rir=Array.isArray,bl=rir;function LRe(t,e,r){var n=e(t);return bl(t)?n:IRe(n,r(t))}l(LRe,"baseGetAllKeys2"),F(LRe,"baseGetAllKeys");var nir=LRe;function $Re(t,e){for(var r=-1,n=t==null?0:t.length,a=0,i=[];++r<n;){var s=t[r];e(s,r,t)&&(i[a++]=s)}return i}l($Re,"arrayFilter2"),F($Re,"arrayFilter");var MRe=$Re;function PRe(){return[]}l(PRe,"stubArray2"),F(PRe,"stubArray");var air=PRe,iir=Object.prototype,sir=iir.propertyIsEnumerable,RRe=Object.getOwnPropertySymbols,oir=RRe?function(t){return t==null?[]:(t=Object(t),MRe(RRe(t),function(e){return sir.call(t,e)}))}:air,lir=oir;function ORe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}l(ORe,"baseTimes2"),F(ORe,"baseTimes");var cir=ORe;function DRe(t){return t!=null&&typeof t=="object"}l(DRe,"isObjectLike2"),F(DRe,"isObjectLike");var LE=DRe,uir="[object Arguments]";function FRe(t){return LE(t)&&NE(t)==uir}l(FRe,"baseIsArguments2"),F(FRe,"baseIsArguments");var BRe=FRe,zRe=Object.prototype,hir=zRe.hasOwnProperty,dir=zRe.propertyIsEnumerable,fir=BRe(function(){return arguments}())?BRe:function(t){return LE(t)&&hir.call(t,"callee")&&!dir.call(t,"callee")},TM=fir;function HRe(){return!1}l(HRe,"stubFalse2"),F(HRe,"stubFalse");var pir=HRe,WRe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,VRe=WRe&&typeof module=="object"&&module&&!module.nodeType&&module,gir=VRe&&VRe.exports===WRe,GRe=gir?Uf.Buffer:void 0,mir=GRe?GRe.isBuffer:void 0,yir=mir||pir,EM=yir,vir=9007199254740991,bir=/^(?:0|[1-9]\d*)$/;function qRe(t,e){var r=typeof t;return e=e==null?vir:e,!!e&&(r=="number"||r!="symbol"&&bir.test(t))&&t>-1&&t%1==0&&t<e}l(qRe,"isIndex2"),F(qRe,"isIndex");var YRe=qRe,xir=9007199254740991;function URe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=xir}l(URe,"isLength2"),F(URe,"isLength");var oQ=URe,wir="[object Arguments]",Tir="[object Array]",Eir="[object Boolean]",Cir="[object Date]",Sir="[object Error]",_ir="[object Function]",kir="[object Map]",Air="[object Number]",Nir="[object Object]",Iir="[object RegExp]",Lir="[object Set]",$ir="[object String]",Mir="[object WeakMap]",Pir="[object ArrayBuffer]",Rir="[object DataView]",Oir="[object Float32Array]",Dir="[object Float64Array]",Fir="[object Int8Array]",Bir="[object Int16Array]",zir="[object Int32Array]",Hir="[object Uint8Array]",Wir="[object Uint8ClampedArray]",Vir="[object Uint16Array]",Gir="[object Uint32Array]",Ka={};Ka[Oir]=Ka[Dir]=Ka[Fir]=Ka[Bir]=Ka[zir]=Ka[Hir]=Ka[Wir]=Ka[Vir]=Ka[Gir]=!0,Ka[wir]=Ka[Tir]=Ka[Pir]=Ka[Eir]=Ka[Rir]=Ka[Cir]=Ka[Sir]=Ka[_ir]=Ka[kir]=Ka[Air]=Ka[Nir]=Ka[Iir]=Ka[Lir]=Ka[$ir]=Ka[Mir]=!1;function jRe(t){return LE(t)&&oQ(t.length)&&!!Ka[NE(t)]}l(jRe,"baseIsTypedArray2"),F(jRe,"baseIsTypedArray");var qir=jRe;function KRe(t){return function(e){return t(e)}}l(KRe,"baseUnary2"),F(KRe,"baseUnary");var Yir=KRe,XRe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j_=XRe&&typeof module=="object"&&module&&!module.nodeType&&module,Uir=j_&&j_.exports===XRe,lQ=Uir&&HPe.process,jir=function(){try{var t=j_&&j_.require&&j_.require("util").types;return t||lQ&&lQ.binding&&lQ.binding("util")}catch(e){}}(),ZRe=jir,QRe=ZRe&&ZRe.isTypedArray,Kir=QRe?Yir(QRe):qir,cQ=Kir,Xir=Object.prototype,Zir=Xir.hasOwnProperty;function JRe(t,e){var r=bl(t),n=!r&&TM(t),a=!r&&!n&&EM(t),i=!r&&!n&&!a&&cQ(t),s=r||n||a||i,o=s?cir(t.length,String):[],u=o.length;for(var h in t)(e||Zir.call(t,h))&&!(s&&(h=="length"||a&&(h=="offset"||h=="parent")||i&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||YRe(h,u)))&&o.push(h);return o}l(JRe,"arrayLikeKeys2"),F(JRe,"arrayLikeKeys");var Qir=JRe,Jir=Object.prototype;function e9e(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Jir;return t===r}l(e9e,"isPrototype2"),F(e9e,"isPrototype");var t9e=e9e;function r9e(t,e){return function(r){return t(e(r))}}l(r9e,"overArg2"),F(r9e,"overArg");var esr=r9e,tsr=esr(Object.keys,Object),rsr=tsr,nsr=Object.prototype,asr=nsr.hasOwnProperty;function n9e(t){if(!t9e(t))return rsr(t);var e=[];for(var r in Object(t))asr.call(t,r)&&r!="constructor"&&e.push(r);return e}l(n9e,"baseKeys2"),F(n9e,"baseKeys");var a9e=n9e;function i9e(t){return t!=null&&oQ(t.length)&&!KPe(t)}l(i9e,"isArrayLike2"),F(i9e,"isArrayLike");var CM=i9e;function s9e(t){return CM(t)?Qir(t):a9e(t)}l(s9e,"keys2"),F(s9e,"keys");var uQ=s9e;function o9e(t){return nir(t,uQ,lir)}l(o9e,"getAllKeys2"),F(o9e,"getAllKeys");var l9e=o9e,isr=1,ssr=Object.prototype,osr=ssr.hasOwnProperty;function c9e(t,e,r,n,a,i){var s=r&isr,o=l9e(t),u=o.length,h=l9e(e),d=h.length;if(u!=d&&!s)return!1;for(var f=u;f--;){var p=o[f];if(!(s?p in e:osr.call(e,p)))return!1}var g=i.get(t),m=i.get(e);if(g&&m)return g==e&&m==t;var y=!0;i.set(t,e),i.set(e,t);for(var v=s;++f<u;){p=o[f];var b=t[p],w=e[p];if(n)var x=s?n(w,b,p,e,t,i):n(b,w,p,t,e,i);if(!(x===void 0?b===w||a(b,w,r,n,i):x)){y=!1;break}v||(v=p=="constructor")}if(y&&!v){var T=t.constructor,C=e.constructor;T!=C&&"constructor"in t&&"constructor"in e&&!(typeof T=="function"&&T instanceof T&&typeof C=="function"&&C instanceof C)&&(y=!1)}return i.delete(t),i.delete(e),y}l(c9e,"equalObjects2"),F(c9e,"equalObjects");var lsr=c9e,csr=IE(Uf,"DataView"),hQ=csr,usr=IE(Uf,"Promise"),dQ=usr,hsr=IE(Uf,"Set"),$E=hsr,dsr=IE(Uf,"WeakMap"),fQ=dsr,u9e="[object Map]",fsr="[object Object]",h9e="[object Promise]",d9e="[object Set]",f9e="[object WeakMap]",p9e="[object DataView]",psr=U1(hQ),gsr=U1(q_),msr=U1(dQ),ysr=U1($E),vsr=U1(fQ),Z1=NE;(hQ&&Z1(new hQ(new ArrayBuffer(1)))!=p9e||q_&&Z1(new q_)!=u9e||dQ&&Z1(dQ.resolve())!=h9e||$E&&Z1(new $E)!=d9e||fQ&&Z1(new fQ)!=f9e)&&(Z1=F(function(t){var e=NE(t),r=e==fsr?t.constructor:void 0,n=r?U1(r):"";if(n)switch(n){case psr:return p9e;case gsr:return u9e;case msr:return h9e;case ysr:return d9e;case vsr:return f9e}return e},"getTag"));var pQ=Z1,bsr=1,g9e="[object Arguments]",m9e="[object Array]",SM="[object Object]",xsr=Object.prototype,y9e=xsr.hasOwnProperty;function v9e(t,e,r,n,a,i){var s=bl(t),o=bl(e),u=s?m9e:pQ(t),h=o?m9e:pQ(e);u=u==g9e?SM:u,h=h==g9e?SM:h;var d=u==SM,f=h==SM,p=u==h;if(p&&EM(t)){if(!EM(e))return!1;s=!0,d=!1}if(p&&!d)return i||(i=new wM),s||cQ(t)?ERe(t,e,r,n,a,i):tir(t,e,u,r,n,a,i);if(!(r&bsr)){var g=d&&y9e.call(t,"__wrapped__"),m=f&&y9e.call(e,"__wrapped__");if(g||m){var y=g?t.value():t,v=m?e.value():e;return i||(i=new wM),a(y,v,r,n,i)}}return p?(i||(i=new wM),lsr(t,e,r,n,a,i)):!1}l(v9e,"baseIsEqualDeep2"),F(v9e,"baseIsEqualDeep");var wsr=v9e;function gQ(t,e,r,n,a){return t===e?!0:t==null||e==null||!LE(t)&&!LE(e)?t!==t&&e!==e:wsr(t,e,r,n,gQ,a)}l(gQ,"baseIsEqual2"),F(gQ,"baseIsEqual");var b9e=gQ,Tsr=1,Esr=2;function x9e(t,e,r,n){var a=r.length,i=a,s=!n;if(t==null)return!i;for(t=Object(t);a--;){var o=r[a];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++a<i;){o=r[a];var u=o[0],h=t[u],d=o[1];if(s&&o[2]){if(h===void 0&&!(u in t))return!1}else{var f=new wM;if(n)var p=n(h,d,u,t,e,f);if(!(p===void 0?b9e(d,h,Tsr|Esr,n,f):p))return!1}}return!0}l(x9e,"baseIsMatch2"),F(x9e,"baseIsMatch");var Csr=x9e;function w9e(t){return t===t&&!nQ(t)}l(w9e,"isStrictComparable2"),F(w9e,"isStrictComparable");var T9e=w9e;function E9e(t){for(var e=uQ(t),r=e.length;r--;){var n=e[r],a=t[n];e[r]=[n,a,T9e(a)]}return e}l(E9e,"getMatchData2"),F(E9e,"getMatchData");var Ssr=E9e;function C9e(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}l(C9e,"matchesStrictComparable2"),F(C9e,"matchesStrictComparable");var S9e=C9e;function _9e(t){var e=Ssr(t);return e.length==1&&e[0][2]?S9e(e[0][0],e[0][1]):function(r){return r===t||Csr(r,t,e)}}l(_9e,"baseMatches2"),F(_9e,"baseMatches");var _sr=_9e,ksr="[object Symbol]";function k9e(t){return typeof t=="symbol"||LE(t)&&NE(t)==ksr}l(k9e,"isSymbol2"),F(k9e,"isSymbol");var _M=k9e,Asr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nsr=/^\w*$/;function A9e(t,e){if(bl(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||_M(t)?!0:Nsr.test(t)||!Asr.test(t)||e!=null&&t in Object(e)}l(A9e,"isKey2"),F(A9e,"isKey");var mQ=A9e,Isr="Expected a function";function kM(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Isr);var r=F(function(){var n=arguments,a=e?e.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=t.apply(this,n);return r.cache=i.set(a,s)||i,s},"memoized");return r.cache=new(kM.Cache||xM),r}l(kM,"memoize2"),F(kM,"memoize"),kM.Cache=xM;var Lsr=kM,$sr=500;function N9e(t){var e=Lsr(t,function(n){return r.size===$sr&&r.clear(),n}),r=e.cache;return e}l(N9e,"memoizeCapped2"),F(N9e,"memoizeCapped");var Msr=N9e,Psr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Rsr=/\\(\\)?/g,Osr=Msr(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Psr,function(r,n,a,i){e.push(a?i.replace(Rsr,"$1"):n||r)}),e}),Dsr=Osr,I9e=Td?Td.prototype:void 0,L9e=I9e?I9e.toString:void 0;function yQ(t){if(typeof t=="string")return t;if(bl(t))return APe(t,yQ)+"";if(_M(t))return L9e?L9e.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}l(yQ,"baseToString2"),F(yQ,"baseToString");var Fsr=yQ;function $9e(t){return t==null?"":Fsr(t)}l($9e,"toString3"),F($9e,"toString");var Bsr=$9e;function M9e(t,e){return bl(t)?t:mQ(t,e)?[t]:Dsr(Bsr(t))}l(M9e,"castPath2"),F(M9e,"castPath");var P9e=M9e;function R9e(t){if(typeof t=="string"||_M(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}l(R9e,"toKey2"),F(R9e,"toKey");var AM=R9e;function O9e(t,e){e=P9e(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[AM(e[r++])];return r&&r==n?t:void 0}l(O9e,"baseGet2"),F(O9e,"baseGet");var D9e=O9e;function F9e(t,e,r){var n=t==null?void 0:D9e(t,e);return n===void 0?r:n}l(F9e,"get2"),F(F9e,"get");var zsr=F9e;function B9e(t,e){return t!=null&&e in Object(t)}l(B9e,"baseHasIn2"),F(B9e,"baseHasIn");var Hsr=B9e;function z9e(t,e,r){e=P9e(e,t);for(var n=-1,a=e.length,i=!1;++n<a;){var s=AM(e[n]);if(!(i=t!=null&&r(t,s)))break;t=t[s]}return i||++n!=a?i:(a=t==null?0:t.length,!!a&&oQ(a)&&YRe(s,a)&&(bl(t)||TM(t)))}l(z9e,"hasPath2"),F(z9e,"hasPath");var Wsr=z9e;function H9e(t,e){return t!=null&&Wsr(t,e,Hsr)}l(H9e,"hasIn2"),F(H9e,"hasIn");var Vsr=H9e,Gsr=1,qsr=2;function W9e(t,e){return mQ(t)&&T9e(e)?S9e(AM(t),e):function(r){var n=zsr(r,t);return n===void 0&&n===e?Vsr(r,t):b9e(e,n,Gsr|qsr)}}l(W9e,"baseMatchesProperty2"),F(W9e,"baseMatchesProperty");var Ysr=W9e;function V9e(t){return t}l(V9e,"identity2"),F(V9e,"identity");var vQ=V9e;function G9e(t){return function(e){return e==null?void 0:e[t]}}l(G9e,"baseProperty2"),F(G9e,"baseProperty");var Usr=G9e;function q9e(t){return function(e){return D9e(e,t)}}l(q9e,"basePropertyDeep2"),F(q9e,"basePropertyDeep");var jsr=q9e;function Y9e(t){return mQ(t)?Usr(AM(t)):jsr(t)}l(Y9e,"property2"),F(Y9e,"property");var Ksr=Y9e;function U9e(t){return typeof t=="function"?t:t==null?vQ:typeof t=="object"?bl(t)?Ysr(t[0],t[1]):_sr(t):Ksr(t)}l(U9e,"baseIteratee2"),F(U9e,"baseIteratee");var NM=U9e;function j9e(t){return function(e,r,n){for(var a=-1,i=Object(e),s=n(e),o=s.length;o--;){var u=s[t?o:++a];if(r(i[u],u,i)===!1)break}return e}}l(j9e,"createBaseFor2"),F(j9e,"createBaseFor");var Xsr=j9e,Zsr=Xsr(),Qsr=Zsr;function K9e(t,e){return t&&Qsr(t,e,uQ)}l(K9e,"baseForOwn2"),F(K9e,"baseForOwn");var Jsr=K9e;function X9e(t,e){return function(r,n){if(r==null)return r;if(!CM(r))return t(r,n);for(var a=r.length,i=e?a:-1,s=Object(r);(e?i--:++i<a)&&n(s[i],i,s)!==!1;);return r}}l(X9e,"createBaseEach2"),F(X9e,"createBaseEach");var eor=X9e,tor=eor(Jsr),IM=tor;function Z9e(t,e){var r=-1,n=CM(t)?Array(t.length):[];return IM(t,function(a,i,s){n[++r]=e(a,i,s)}),n}l(Z9e,"baseMap2"),F(Z9e,"baseMap");var ror=Z9e;function Q9e(t,e){var r=bl(t)?APe:ror;return r(t,NM(e))}l(Q9e,"map2"),F(Q9e,"map");var jf=Q9e;function J9e(t,e){var r=[];return IM(t,function(n,a,i){e(n,a,i)&&r.push(n)}),r}l(J9e,"baseFilter2"),F(J9e,"baseFilter");var nor=J9e;function eOe(t,e){var r=bl(t)?MRe:nor;return r(t,NM(e))}l(eOe,"filter2"),F(eOe,"filter");var aor=eOe;function Q1(t,e,r){return`${t.name}_${e}_${r}`}l(Q1,"buildATNKey"),F(Q1,"buildATNKey");var Xp=1,ior=2,tOe=4,rOe=5,K_=7,sor=8,oor=9,lor=10,cor=11,nOe=12,bQ=(jv=class{constructor(e){this.target=e}isEpsilon(){return!1}},l(jv,"AbstractTransition"),F(jv,"AbstractTransition"),jv),xQ=(Kv=class extends bQ{constructor(e,r){super(e),this.tokenType=r}},l(Kv,"AtomTransition"),F(Kv,"AtomTransition"),Kv),aOe=(Xv=class extends bQ{constructor(e){super(e)}isEpsilon(){return!0}},l(Xv,"EpsilonTransition"),F(Xv,"EpsilonTransition"),Xv),wQ=(Zv=class extends bQ{constructor(e,r,n){super(e),this.rule=r,this.followState=n}isEpsilon(){return!0}},l(Zv,"RuleTransition"),F(Zv,"RuleTransition"),Zv);function iOe(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};sOe(e,t);const r=t.length;for(let n=0;n<r;n++){const a=t[n],i=Zp(e,a,a);i!==void 0&&yOe(e,a,i)}return e}l(iOe,"createATN"),F(iOe,"createATN");function sOe(t,e){const r=e.length;for(let n=0;n<r;n++){const a=e[n],i=ys(t,a,void 0,{type:ior}),s=ys(t,a,void 0,{type:K_});i.stop=s,t.ruleToStartState.set(a,i),t.ruleToStopState.set(a,s)}}l(sOe,"createRuleStartAndStopATNStates"),F(sOe,"createRuleStartAndStopATNStates");function TQ(t,e,r){return r instanceof ja?LM(t,e,r.terminalType,r):r instanceof ml?mOe(t,e,r):r instanceof Ql?hOe(t,e,r):r instanceof fo?dOe(t,e,r):r instanceof Ci?oOe(t,e,r):r instanceof Zl?lOe(t,e,r):r instanceof Lc?cOe(t,e,r):r instanceof $c?uOe(t,e,r):Zp(t,e,r)}l(TQ,"atom"),F(TQ,"atom");function oOe(t,e,r){const n=ys(t,e,r,{type:rOe});Kf(t,n);const a=J1(t,e,n,r,Zp(t,e,r));return CQ(t,e,r,a)}l(oOe,"repetition"),F(oOe,"repetition");function lOe(t,e,r){const n=ys(t,e,r,{type:rOe});Kf(t,n);const a=J1(t,e,n,r,Zp(t,e,r)),i=LM(t,e,r.separator,r);return CQ(t,e,r,a,i)}l(lOe,"repetitionSep"),F(lOe,"repetitionSep");function cOe(t,e,r){const n=ys(t,e,r,{type:tOe});Kf(t,n);const a=J1(t,e,n,r,Zp(t,e,r));return EQ(t,e,r,a)}l(cOe,"repetitionMandatory"),F(cOe,"repetitionMandatory");function uOe(t,e,r){const n=ys(t,e,r,{type:tOe});Kf(t,n);const a=J1(t,e,n,r,Zp(t,e,r)),i=LM(t,e,r.separator,r);return EQ(t,e,r,a,i)}l(uOe,"repetitionMandatorySep"),F(uOe,"repetitionMandatorySep");function hOe(t,e,r){const n=ys(t,e,r,{type:Xp});Kf(t,n);const a=jf(r.definition,s=>TQ(t,e,s));return J1(t,e,n,r,...a)}l(hOe,"alternation"),F(hOe,"alternation");function dOe(t,e,r){const n=ys(t,e,r,{type:Xp});Kf(t,n);const a=J1(t,e,n,r,Zp(t,e,r));return fOe(t,e,r,a)}l(dOe,"option"),F(dOe,"option");function Zp(t,e,r){const n=aor(jf(r.definition,a=>TQ(t,e,a)),a=>a!==void 0);return n.length===1?n[0]:n.length===0?void 0:gOe(t,n)}l(Zp,"block"),F(Zp,"block");function EQ(t,e,r,n,a){const i=n.left,s=n.right,o=ys(t,e,r,{type:cor});Kf(t,o);const u=ys(t,e,r,{type:nOe});return i.loopback=o,u.loopback=o,t.decisionMap[Q1(e,a?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,Bi(s,o),a===void 0?(Bi(o,i),Bi(o,u)):(Bi(o,u),Bi(o,a.left),Bi(a.right,i)),{left:i,right:u}}l(EQ,"plus"),F(EQ,"plus");function CQ(t,e,r,n,a){const i=n.left,s=n.right,o=ys(t,e,r,{type:lor});Kf(t,o);const u=ys(t,e,r,{type:nOe}),h=ys(t,e,r,{type:oor});return o.loopback=h,u.loopback=h,Bi(o,i),Bi(o,u),Bi(s,h),a!==void 0?(Bi(h,u),Bi(h,a.left),Bi(a.right,i)):Bi(h,o),t.decisionMap[Q1(e,a?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:u}}l(CQ,"star"),F(CQ,"star");function fOe(t,e,r,n){const a=n.left,i=n.right;return Bi(a,i),t.decisionMap[Q1(e,"Option",r.idx)]=a,n}l(fOe,"optional"),F(fOe,"optional");function Kf(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}l(Kf,"defineDecisionState"),F(Kf,"defineDecisionState");function J1(t,e,r,n,...a){const i=ys(t,e,n,{type:sor,start:r});r.end=i;for(const o of a)o!==void 0?(Bi(r,o.left),Bi(o.right,i)):Bi(r,i);const s={left:r,right:i};return t.decisionMap[Q1(e,pOe(n),n.idx)]=r,s}l(J1,"makeAlts"),F(J1,"makeAlts");function pOe(t){if(t instanceof Ql)return"Alternation";if(t instanceof fo)return"Option";if(t instanceof Ci)return"Repetition";if(t instanceof Zl)return"RepetitionWithSeparator";if(t instanceof Lc)return"RepetitionMandatory";if(t instanceof $c)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}l(pOe,"getProdType2"),F(pOe,"getProdType");function gOe(t,e){const r=e.length;for(let i=0;i<r-1;i++){const s=e[i];let o;s.left.transitions.length===1&&(o=s.left.transitions[0]);const u=o instanceof wQ,h=o,d=e[i+1].left;s.left.type===Xp&&s.right.type===Xp&&o!==void 0&&(u&&h.followState===s.right||o.target===s.right)?(u?h.followState=d:o.target=d,vOe(t,s.right)):Bi(s.right,d)}const n=e[0],a=e[r-1];return{left:n.left,right:a.right}}l(gOe,"makeBlock"),F(gOe,"makeBlock");function LM(t,e,r,n){const a=ys(t,e,n,{type:Xp}),i=ys(t,e,n,{type:Xp});return $M(a,new xQ(i,r)),{left:a,right:i}}l(LM,"tokenRef"),F(LM,"tokenRef");function mOe(t,e,r){const n=r.referencedRule,a=t.ruleToStartState.get(n),i=ys(t,e,r,{type:Xp}),s=ys(t,e,r,{type:Xp}),o=new wQ(a,n,s);return $M(i,o),{left:i,right:s}}l(mOe,"ruleRef"),F(mOe,"ruleRef");function yOe(t,e,r){const n=t.ruleToStartState.get(e);Bi(n,r.left);const a=t.ruleToStopState.get(e);return Bi(r.right,a),{left:n,right:a}}l(yOe,"buildRuleHandle"),F(yOe,"buildRuleHandle");function Bi(t,e){const r=new aOe(e);$M(t,r)}l(Bi,"epsilon$1"),F(Bi,"epsilon");function ys(t,e,r,n){const a=Object.assign({atn:t,production:r,epsilonOnlyTransitions:!1,rule:e,transitions:[],nextTokenWithinRule:[],stateNumber:t.states.length},n);return t.states.push(a),a}l(ys,"newState"),F(ys,"newState");function $M(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}l($M,"addTransition"),F($M,"addTransition");function vOe(t,e){t.states.splice(t.states.indexOf(e),1)}l(vOe,"removeState"),F(vOe,"removeState");var MM={},SQ=(Qv=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const r=_Q(e);r in this.map||(this.map[r]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return jf(this.configs,e=>e.alt)}get key(){let e="";for(const r in this.map)e+=r+":";return e}},l(Qv,"ATNConfigSet"),F(Qv,"ATNConfigSet"),Qv);function _Q(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(r=>r.stateNumber.toString()).join("_")}`}l(_Q,"getATNConfigKey"),F(_Q,"getATNConfigKey");function bOe(t,e,r){for(var n=-1,a=t.length;++n<a;){var i=t[n],s=e(i);if(s!=null&&(o===void 0?s===s&&!_M(s):r(s,o)))var o=s,u=i}return u}l(bOe,"baseExtremum"),F(bOe,"baseExtremum");var uor=bOe;function xOe(t,e){return t<e}l(xOe,"baseLt"),F(xOe,"baseLt");var hor=xOe;function wOe(t){return t&&t.length?uor(t,vQ,hor):void 0}l(wOe,"min$1"),F(wOe,"min");var dor=wOe,TOe=Td?Td.isConcatSpreadable:void 0;function EOe(t){return bl(t)||TM(t)||!!(TOe&&t&&t[TOe])}l(EOe,"isFlattenable2"),F(EOe,"isFlattenable");var por=EOe;function kQ(t,e,r,n,a){var i=-1,s=t.length;for(r||(r=por),a||(a=[]);++i<s;){var o=t[i];e>0&&r(o)?e>1?kQ(o,e-1,r,n,a):IRe(a,o):n||(a[a.length]=o)}return a}l(kQ,"baseFlatten2"),F(kQ,"baseFlatten");var COe=kQ;function SOe(t,e){return COe(jf(t,e),1)}l(SOe,"flatMap2"),F(SOe,"flatMap");var gor=SOe;function _Oe(t,e,r,n){for(var a=t.length,i=r+(n?1:-1);n?i--:++i<a;)if(e(t[i],i,t))return i;return-1}l(_Oe,"baseFindIndex2"),F(_Oe,"baseFindIndex");var mor=_Oe;function kOe(t){return t!==t}l(kOe,"baseIsNaN2"),F(kOe,"baseIsNaN");var yor=kOe;function AOe(t,e,r){for(var n=r-1,a=t.length;++n<a;)if(t[n]===e)return n;return-1}l(AOe,"strictIndexOf2"),F(AOe,"strictIndexOf");var vor=AOe;function NOe(t,e,r){return e===e?vor(t,e,r):mor(t,yor,r)}l(NOe,"baseIndexOf2"),F(NOe,"baseIndexOf");var bor=NOe;function IOe(t,e){var r=t==null?0:t.length;return!!r&&bor(t,e,0)>-1}l(IOe,"arrayIncludes2"),F(IOe,"arrayIncludes");var xor=IOe;function LOe(t,e,r){for(var n=-1,a=t==null?0:t.length;++n<a;)if(r(e,t[n]))return!0;return!1}l(LOe,"arrayIncludesWith2"),F(LOe,"arrayIncludesWith");var wor=LOe;function $Oe(){}l($Oe,"noop2"),F($Oe,"noop");var Tor=$Oe,Eor=1/0,Cor=$E&&1/iQ(new $E([,-0]))[1]==Eor?function(t){return new $E(t)}:Tor,Sor=Cor,_or=200;function MOe(t,e,r){var n=-1,a=xor,i=t.length,s=!0,o=[],u=o;if(r)s=!1,a=wor;else if(i>=_or){var h=e?null:Sor(t);if(h)return iQ(h);s=!1,a=wRe,u=new vRe}else u=e?[]:o;e:for(;++n<i;){var d=t[n],f=e?e(d):d;if(d=r||d!==0?d:0,s&&f===f){for(var p=u.length;p--;)if(u[p]===f)continue e;e&&u.push(f),o.push(d)}else a(u,f,r)||(u!==o&&u.push(f),o.push(d))}return o}l(MOe,"baseUniq2"),F(MOe,"baseUniq");var kor=MOe;function POe(t,e){return t&&t.length?kor(t,NM(e)):[]}l(POe,"uniqBy$1"),F(POe,"uniqBy");var Aor=POe;function ROe(t){var e=t==null?0:t.length;return e?COe(t,1):[]}l(ROe,"flatten2"),F(ROe,"flatten");var Nor=ROe;function OOe(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}l(OOe,"arrayEach2"),F(OOe,"arrayEach");var Ior=OOe;function DOe(t){return typeof t=="function"?t:vQ}l(DOe,"castFunction2"),F(DOe,"castFunction");var Lor=DOe;function FOe(t,e){var r=bl(t)?Ior:IM;return r(t,Lor(e))}l(FOe,"forEach2"),F(FOe,"forEach");var AQ=FOe,$or="[object Map]",Mor="[object Set]",Por=Object.prototype,Ror=Por.hasOwnProperty;function BOe(t){if(t==null)return!0;if(CM(t)&&(bl(t)||typeof t=="string"||typeof t.splice=="function"||EM(t)||cQ(t)||TM(t)))return!t.length;var e=pQ(t);if(e==$or||e==Mor)return!t.size;if(t9e(t))return!a9e(t).length;for(var r in t)if(Ror.call(t,r))return!1;return!0}l(BOe,"isEmpty2"),F(BOe,"isEmpty");var Oor=BOe;function zOe(t,e,r,n){var a=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++a]);++a<i;)r=e(r,t[a],a,t);return r}l(zOe,"arrayReduce2"),F(zOe,"arrayReduce");var Dor=zOe;function HOe(t,e,r,n,a){return a(t,function(i,s,o){r=n?(n=!1,i):e(r,i,s,o)}),r}l(HOe,"baseReduce2"),F(HOe,"baseReduce");var For=HOe;function WOe(t,e,r){var n=bl(t)?Dor:For,a=arguments.length<3;return n(t,NM(e),r,a,IM)}l(WOe,"reduce2"),F(WOe,"reduce");var VOe=WOe;function GOe(t,e){const r={};return n=>{const a=n.toString();let i=r[a];return i!==void 0||(i={atnStartState:t,decision:e,states:{}},r[a]=i),i}}l(GOe,"createDFACache"),F(GOe,"createDFACache");var qOe=(Jv=class{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,r){this.predicates[e]=r}toString(){let e="";const r=this.predicates.length;for(let n=0;n<r;n++)e+=this.predicates[n]===!0?"1":"0";return e}},l(Jv,"PredicateSet"),F(Jv,"PredicateSet"),Jv),YOe=new qOe,Bor=(e2=class extends KZ{constructor(e){var r;super(),this.logging=(r=e==null?void 0:e.logging)!==null&&r!==void 0?r:n=>console.log(n)}initialize(e){this.atn=iOe(e.rules),this.dfas=UOe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:r,rule:n,hasPredicates:a,dynamicTokensEnabled:i}=e,s=this.dfas,o=this.logging,u=Q1(n,"Alternation",r),d=this.atn.decisionMap[u].decision,f=jf(FZ({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>jf(p,g=>g[0]));if(NQ(f,!1)&&!i){const p=VOe(f,(g,m,y)=>(AQ(m,v=>{v&&(g[v.tokenTypeIdx]=y,AQ(v.categoryMatches,b=>{g[b]=y}))}),g),{});return a?function(g){var m;const y=this.LA(1),v=p[y.tokenTypeIdx];if(g!==void 0&&v!==void 0){const b=(m=g[v])===null||m===void 0?void 0:m.GATE;if(b!==void 0&&b.call(this)===!1)return}return v}:function(){const g=this.LA(1);return p[g.tokenTypeIdx]}}else return a?function(p){const g=new qOe,m=p===void 0?0:p.length;for(let v=0;v<m;v++){const b=p==null?void 0:p[v].GATE;g.set(v,b===void 0||b.call(this))}const y=PM.call(this,s,d,g,o);return typeof y=="number"?y:void 0}:function(){const p=PM.call(this,s,d,YOe,o);return typeof p=="number"?p:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:r,rule:n,prodType:a,dynamicTokensEnabled:i}=e,s=this.dfas,o=this.logging,u=Q1(n,a,r),d=this.atn.decisionMap[u].decision,f=jf(FZ({maxLookahead:1,occurrence:r,prodType:a,rule:n}),p=>jf(p,g=>g[0]));if(NQ(f)&&f[0][0]&&!i){const p=f[0],g=Nor(p);if(g.length===1&&Oor(g[0].categoryMatches)){const y=g[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===y}}else{const m=VOe(g,(y,v)=>(v!==void 0&&(y[v.tokenTypeIdx]=!0,AQ(v.categoryMatches,b=>{y[b]=!0})),y),{});return function(){const y=this.LA(1);return m[y.tokenTypeIdx]===!0}}}return function(){const p=PM.call(this,s,d,YOe,o);return typeof p=="object"?!1:p===0}}},l(e2,"LLStarLookaheadStrategy"),F(e2,"LLStarLookaheadStrategy"),e2);function NQ(t,e=!0){const r=new Set;for(const n of t){const a=new Set;for(const i of n){if(i===void 0){if(e)break;return!1}const s=[i.tokenTypeIdx].concat(i.categoryMatches);for(const o of s)if(r.has(o)){if(!a.has(o))return!1}else r.add(o),a.add(o)}}return!0}l(NQ,"isLL1Sequence"),F(NQ,"isLL1Sequence");function UOe(t){const e=t.decisionStates.length,r=Array(e);for(let n=0;n<e;n++)r[n]=GOe(t.decisionStates[n],n);return r}l(UOe,"initATNSimulator"),F(UOe,"initATNSimulator");function PM(t,e,r,n){const a=t[e](r);let i=a.start;if(i===void 0){const o=aDe(a.atnStartState);i=$Q(a,IQ(o)),a.start=i}return jOe.apply(this,[a,i,r,n])}l(PM,"adaptivePredict"),F(PM,"adaptivePredict");function jOe(t,e,r,n){let a=e,i=1;const s=[];let o=this.LA(i++);for(;;){let u=eDe(a,o);if(u===void 0&&(u=KOe.apply(this,[t,a,o,i,r,n])),u===MM)return JOe(s,a,o);if(u.isAcceptState===!0)return u.prediction;a=u,s.push(o),o=this.LA(i++)}}l(jOe,"performLookahead"),F(jOe,"performLookahead");function KOe(t,e,r,n,a,i){const s=tDe(e.configs,r,a);if(s.size===0)return LQ(t,e,r,MM),MM;let o=IQ(s);const u=nDe(s,a);if(u!==void 0)o.isAcceptState=!0,o.prediction=u,o.configs.uniqueAlt=u;else if(lDe(s)){const h=dor(s.alts);o.isAcceptState=!0,o.prediction=h,o.configs.uniqueAlt=h,XOe.apply(this,[t,n,s.alts,i])}return o=LQ(t,e,r,o),o}l(KOe,"computeLookaheadTarget"),F(KOe,"computeLookaheadTarget");function XOe(t,e,r,n){const a=[];for(let h=1;h<=e;h++)a.push(this.LA(h).tokenType);const i=t.atnStartState,s=i.rule,o=i.production,u=ZOe({topLevelRule:s,ambiguityIndices:r,production:o,prefixPath:a});n(u)}l(XOe,"reportLookaheadAmbiguity"),F(XOe,"reportLookaheadAmbiguity");function ZOe(t){const e=jf(t.prefixPath,a=>G1(a)).join(", "),r=t.production.idx===0?"":t.production.idx;let n=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${QOe(t.production)}${r}> inside <${t.topLevelRule.name}> Rule,
|
||
<${e}> may appears as a prefix path in all these alternatives.
|
||
`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
|
||
For Further details.`,n}l(ZOe,"buildAmbiguityError"),F(ZOe,"buildAmbiguityError");function QOe(t){if(t instanceof ml)return"SUBRULE";if(t instanceof fo)return"OPTION";if(t instanceof Ql)return"OR";if(t instanceof Lc)return"AT_LEAST_ONE";if(t instanceof $c)return"AT_LEAST_ONE_SEP";if(t instanceof Zl)return"MANY_SEP";if(t instanceof Ci)return"MANY";if(t instanceof ja)return"CONSUME";throw Error("non exhaustive match")}l(QOe,"getProductionDslName2"),F(QOe,"getProductionDslName");function JOe(t,e,r){const n=gor(e.configs.elements,i=>i.state.transitions),a=Aor(n.filter(i=>i instanceof xQ).map(i=>i.tokenType),i=>i.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:a,tokenPath:t}}l(JOe,"buildAdaptivePredictError"),F(JOe,"buildAdaptivePredictError");function eDe(t,e){return t.edges[e.tokenTypeIdx]}l(eDe,"getExistingTargetState"),F(eDe,"getExistingTargetState");function tDe(t,e,r){const n=new SQ,a=[];for(const s of t.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===K_){a.push(s);continue}const o=s.state.transitions.length;for(let u=0;u<o;u++){const h=s.state.transitions[u],d=rDe(h,e);d!==void 0&&n.add({state:d,alt:s.alt,stack:s.stack})}}let i;if(a.length===0&&n.size===1&&(i=n),i===void 0){i=new SQ;for(const s of n.elements)X_(s,i)}if(a.length>0&&!sDe(i))for(const s of a)i.add(s);return i}l(tDe,"computeReachSet"),F(tDe,"computeReachSet");function rDe(t,e){if(t instanceof xQ&&OZ(e,t.tokenType))return t.target}l(rDe,"getReachableTarget"),F(rDe,"getReachableTarget");function nDe(t,e){let r;for(const n of t.elements)if(e.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}l(nDe,"getUniqueAlt"),F(nDe,"getUniqueAlt");function IQ(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}l(IQ,"newDFAState"),F(IQ,"newDFAState");function LQ(t,e,r,n){return n=$Q(t,n),e.edges[r.tokenTypeIdx]=n,n}l(LQ,"addDFAEdge"),F(LQ,"addDFAEdge");function $Q(t,e){if(e===MM)return e;const r=e.configs.key,n=t.states[r];return n!==void 0?n:(e.configs.finalize(),t.states[r]=e,e)}l($Q,"addDFAState"),F($Q,"addDFAState");function aDe(t){const e=new SQ,r=t.transitions.length;for(let n=0;n<r;n++){const i={state:t.transitions[n].target,alt:n,stack:[]};X_(i,e)}return e}l(aDe,"computeStartState"),F(aDe,"computeStartState");function X_(t,e){const r=t.state;if(r.type===K_){if(t.stack.length>0){const a=[...t.stack],s={state:a.pop(),alt:t.alt,stack:a};X_(s,e)}else e.add(t);return}r.epsilonOnlyTransitions||e.add(t);const n=r.transitions.length;for(let a=0;a<n;a++){const i=r.transitions[a],s=iDe(t,i);s!==void 0&&X_(s,e)}}l(X_,"closure"),F(X_,"closure");function iDe(t,e){if(e instanceof aOe)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof wQ){const r=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:r}}}l(iDe,"getEpsilonTarget"),F(iDe,"getEpsilonTarget");function sDe(t){for(const e of t.elements)if(e.state.type===K_)return!0;return!1}l(sDe,"hasConfigInRuleStopState"),F(sDe,"hasConfigInRuleStopState");function oDe(t){for(const e of t.elements)if(e.state.type!==K_)return!1;return!0}l(oDe,"allConfigsInRuleStopStates"),F(oDe,"allConfigsInRuleStopStates");function lDe(t){if(oDe(t))return!0;const e=cDe(t.elements);return uDe(e)&&!hDe(e)}l(lDe,"hasConflictTerminatingPrediction"),F(lDe,"hasConflictTerminatingPrediction");function cDe(t){const e=new Map;for(const r of t){const n=_Q(r,!1);let a=e.get(n);a===void 0&&(a={},e.set(n,a)),a[r.alt]=!0}return e}l(cDe,"getConflictingAltSets"),F(cDe,"getConflictingAltSets");function uDe(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}l(uDe,"hasConflictingAltSet"),F(uDe,"hasConflictingAltSet");function hDe(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}l(hDe,"hasStateAssociatedWithOneAlt"),F(hDe,"hasStateAssociatedWithOneAlt"),j5();var dDe=(t2=class{constructor(){this.nodeStack=[]}get current(){var e;return(e=this.nodeStack[this.nodeStack.length-1])!=null?e:this.rootNode}buildRootNode(e){return this.rootNode=new PQ(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const r=new OM;return r.grammarSource=e,r.root=this.rootNode,this.current.content.push(r),this.nodeStack.push(r),r}buildLeafNode(e,r){const n=new RM(e.startOffset,e.image.length,l_(e),e.tokenType,!r);return n.grammarSource=r,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){const r=e.container;if(r){const n=r.content.indexOf(e);n>=0&&r.content.splice(n,1)}}addHiddenNodes(e){const r=[];for(const i of e){const s=new RM(i.startOffset,i.image.length,l_(i),i.tokenType,!0);s.root=this.rootNode,r.push(s)}let n=this.current,a=!1;if(n.content.length>0){n.content.push(...r);return}for(;n.container;){const i=n.container.content.indexOf(n);if(i>0){n.container.content.splice(i,0,...r),a=!0;break}n=n.container}a||this.rootNode.content.unshift(...r)}construct(e){const r=this.current;typeof e.$type=="string"&&!e.$infix&&(this.current.astNode=e),e.$cstNode=r;const n=this.nodeStack.pop();(n==null?void 0:n.content.length)===0&&this.removeNode(n)}},l(t2,"CstNodeBuilder"),F(t2,"CstNodeBuilder"),t2),MQ=(r2=class{get hidden(){return!1}get astNode(){var r,n;const e=typeof((r=this._astNode)==null?void 0:r.$type)=="string"?this._astNode:(n=this.container)==null?void 0:n.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},l(r2,"AbstractCstNode"),F(r2,"AbstractCstNode"),r2),RM=(n2=class extends MQ{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,r,n,a,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=a,this._length=r,this._range=n}},l(n2,"LeafCstNodeImpl"),F(n2,"LeafCstNodeImpl"),n2),OM=(a2=class extends MQ{constructor(){super(...arguments),this.content=new zor(this)}get offset(){var e,r;return(r=(e=this.firstNonHiddenNode)==null?void 0:e.offset)!=null?r:0}get length(){return this.end-this.offset}get end(){var e,r;return(r=(e=this.lastNonHiddenNode)==null?void 0:e.end)!=null?r:0}get range(){const e=this.firstNonHiddenNode,r=this.lastNonHiddenNode;if(e&&r){if(this._rangeCache===void 0){const{range:n}=e,{range:a}=r;this._rangeCache={start:n.start,end:a.end.line<n.start.line?n.start:a.end}}return this._rangeCache}else return{start:Jn.create(0,0),end:Jn.create(0,0)}}get firstNonHiddenNode(){for(const e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const r=this.content[e];if(!r.hidden)return r}return this.content[this.content.length-1]}},l(a2,"CompositeCstNodeImpl"),F(a2,"CompositeCstNodeImpl"),a2),zor=(gg=class extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,gg.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,r,...n){return this.addParents(n),super.splice(e,r,...n)}addParents(e){for(const r of e)r.container=this.parent}},l(gg,"_CstNodeContainer"),F(gg,"CstNodeContainer"),gg),PQ=(i2=class extends OM{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e!=null?e:""}},l(i2,"RootCstNodeImpl"),F(i2,"RootCstNodeImpl"),i2),DM=Symbol("Datatype");function FM(t){return t.$type===DM}l(FM,"isDataTypeNode"),F(FM,"isDataTypeNode");var fDe="",pDe=F(t=>t.endsWith(fDe)?t:t+fDe,"withRuleSuffix"),RQ=(s2=class{constructor(e){var a;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";(a=e.shared.profilers.LangiumProfiler)!=null&&a.isActive("parsing")?this.wrapper=new Wor(r,Ne(X({},e.parser.ParserConfig),{skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider}),e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new vDe(r,Ne(X({},e.parser.ParserConfig),{skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,r){this.wrapper.wrapOr(e,r)}optional(e,r){this.wrapper.wrapOption(e,r)}many(e,r){this.wrapper.wrapMany(e,r)}atLeastOne(e,r){this.wrapper.wrapAtLeastOne(e,r)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},l(s2,"AbstractLangiumParser"),F(s2,"AbstractLangiumParser"),s2),gDe=(o2=class extends RQ{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new dDe,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,r){const n=this.computeRuleType(e);let a;oE(e)&&(a=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE(pDe(e.name),this.startImplementation(n,a,r).bind(this));return this.allRules.set(e.name,i),pl(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const r=e.name,n=new Map;for(let a=0;a<e.operators.precedences.length;a++){const i=e.operators.precedences[a];for(const s of i.operators)n.set(s.value,{precedence:a,rightAssoc:i.associativity==="right"})}this.operatorPrecedence.set(r,n)}computeRuleType(e){return oE(e)?$1(e):e.fragment?void 0:c_(e)?DM:$1(e)}parse(e,r={}){this.nodeBuilder.buildRootNode(e);const n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;const a=r.rule?this.allRules.get(r.rule):this.mainRule;if(!a)throw new Error(r.rule?`No rule found with name '${r.rule}'`:"No main rule available.");const i=this.doParse(a);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,nE(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let r=this.wrapper.rule(e);if(this.stack.length>0&&(r=this.construct()),r===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return r}startImplementation(e,r,n){return a=>{const i=!this.isRecording()&&e!==void 0;if(i){const s={$type:e};this.stack.push(s),e===DM?s.value="":r!==void 0&&(s.$infixName=r)}return n(a),i?this.construct():void 0}}extractHiddenTokens(e){const r=this.lexerResult.hidden;if(!r.length)return[];const n=e.startOffset;for(let a=0;a<r.length;a++)if(r[a].startOffset>n)return r.splice(0,a);return r.splice(0,r.length)}consume(e,r,n){const a=this.wrapper.wrapConsume(e,r);if(!this.isRecording()&&this.isValidToken(a)){const i=this.extractHiddenTokens(a);this.nodeBuilder.addHiddenNodes(i);const s=this.nodeBuilder.buildLeafNode(a,n),{assignment:o,crossRef:u}=this.getAssignment(n),h=this.current;if(o){const d=Bf(n)?a.image:this.converter.convert(a.image,s);this.assign(o.operator,o.feature,d,s,u)}else if(FM(h)){let d=a.image;Bf(n)||(d=this.converter.convert(d,s).toString()),h.value+=d}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,r,n,a,i){let s;!this.isRecording()&&!n&&(s=this.nodeBuilder.buildCompositeNode(a));let o;try{o=this.wrapper.wrapSubrule(e,r,i)}finally{this.isRecording()||(o===void 0&&!n&&(o=this.construct()),o!==void 0&&s&&s.length>0&&this.performSubruleAssignment(o,a,s))}}performSubruleAssignment(e,r,n){const{assignment:a,crossRef:i}=this.getAssignment(r);if(a)this.assign(a.operator,a.feature,e,n,i);else if(!a){const s=this.current;if(FM(s))s.value+=e.toString();else if(typeof e=="object"&&e){const u=this.assignWithoutOverride(e,s);this.stack.pop(),this.stack.push(u)}}}action(e,r){if(!this.isRecording()){let n=this.current;if(r.feature&&r.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(r).content.push(n.$cstNode);const i={$type:e};this.stack.push(i),this.assign(r.operator,r.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):FM(e)?this.converter.convert(e.value,e.$cstNode):(ZK(this.astReflection,e),e)}constructInfix(e,r){var y;const n=e.parts;if(!Array.isArray(n)||n.length===0)return;const a=e.operators;if(!Array.isArray(a)||n.length<2)return n[0];let i=0,s=-1;for(let v=0;v<a.length;v++){const b=a[v],w=(y=r.get(b))!=null?y:{precedence:1/0,rightAssoc:!1};w.precedence>s?(s=w.precedence,i=v):w.precedence===s&&(w.rightAssoc||(i=v))}const o=a.slice(0,i),u=a.slice(i+1),h=n.slice(0,i+1),d=n.slice(i+1),f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:h,operators:o},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:d,operators:u},g=this.constructInfix(f,r),m=this.constructInfix(p,r);return{$type:e.$type,$cstNode:e.$cstNode,left:g,operator:a[i],right:m}}getAssignment(e){if(!this.assignmentMap.has(e)){const r=g1(e,Df);this.assignmentMap.set(e,{assignment:r,crossRef:r&&y1(r.terminal)?r.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,r,n,a,i){const s=this.current;let o;switch(i==="single"&&typeof n=="string"?o=this.linker.buildReference(s,r,a,n):i==="multi"&&typeof n=="string"?o=this.linker.buildMultiReference(s,r,a,n):o=n,e){case"=":{s[r]=o;break}case"?=":{s[r]=!0;break}case"+=":Array.isArray(s[r])||(s[r]=[]),s[r].push(o)}}assignWithoutOverride(e,r){for(const[a,i]of Object.entries(r)){const s=e[a];s===void 0?e[a]=i:Array.isArray(s)&&Array.isArray(i)&&(i.push(...s),e[a]=i)}const n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},l(o2,"LangiumParser"),F(o2,"LangiumParser"),o2),mDe=(l2=class{buildMismatchTokenMessage(e){return kE.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return kE.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return kE.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return kE.buildEarlyExitMessage(e)}},l(l2,"AbstractParserErrorMessageProvider"),F(l2,"AbstractParserErrorMessageProvider"),l2),OQ=(c2=class extends mDe{buildMismatchTokenMessage({expected:e,actual:r}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${r.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},l(c2,"LangiumParserErrorMessageProvider"),F(c2,"LangiumParserErrorMessageProvider"),c2),yDe=(u2=class extends RQ{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const r=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=r.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,r){const n=this.wrapper.DEFINE_RULE(pDe(e.name),this.startImplementation(r).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return r=>{const n=this.keepStackSize();try{e(r)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,r,n){this.wrapper.wrapConsume(e,r),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,r,n,a,i){this.before(a),this.wrapper.wrapSubrule(e,r,i),this.after(a)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const r=this.elementStack.lastIndexOf(e);r>=0&&this.elementStack.splice(r)}}get currIdx(){return this.wrapper.currIdx}},l(u2,"LangiumCompletionParser"),F(u2,"LangiumCompletionParser"),u2),Hor={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new OQ},vDe=(h2=class extends Snr{constructor(e,r){const n=r&&"maxLookahead"in r;super(e,X(Ne(X({},Hor),{lookaheadStrategy:n?new KZ({maxLookahead:r.maxLookahead}):new Bor({logging:r.skipValidations?()=>{}:void 0})}),r))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,r,n){return this.RULE(e,r,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,r){return this.consume(e,r,void 0)}wrapSubrule(e,r,n){return this.subrule(e,r,{ARGS:[n]})}wrapOr(e,r){this.or(e,r)}wrapOption(e,r){this.option(e,r)}wrapMany(e,r){this.many(e,r)}wrapAtLeastOne(e,r){this.atLeastOne(e,r)}rule(e){return e.call(this,{})}},l(h2,"ChevrotainWrapper"),F(h2,"ChevrotainWrapper"),h2),Wor=(d2=class extends vDe{constructor(e,r,n){super(e,r),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,r,n){this.task.startSubTask(this.ruleName(r));try{return super.subrule(e,r,n)}finally{this.task.stopSubTask(this.ruleName(r))}}},l(d2,"ProfilerWrapper"),F(d2,"ProfilerWrapper"),d2);function BM(t,e,r){return bDe({parser:e,tokens:r,ruleNames:new Map},t),e}l(BM,"createParser"),F(BM,"createParser");function bDe(t,e){const r=S$(e,!1),n=da(e.rules).filter(pl).filter(i=>r.has(i));for(const i of n){const s=Ne(X({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,Qp(s,i.definition))}const a=da(e.rules).filter(oE).filter(i=>r.has(i));for(const i of a)t.parser.rule(i,xDe(t,i))}l(bDe,"buildRules"),F(bDe,"buildRules");function xDe(t,e){const r=e.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+e.call.rule.$refText);if(lu(r))throw new Error("Cannot use terminal rule in infix expression");const n=e.operators.precedences.flatMap(g=>g.operators),a={$type:"Group",elements:[]},i={$container:a,$type:"Assignment",feature:"parts",operator:"+=",terminal:e.call},s={$container:a,$type:"Group",elements:[],cardinality:"*"};a.elements.push(i,s);const u={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},h=Ne(X({},i),{$container:s});s.elements.push(u,h);const f=n.map(g=>t.tokens[g.value]).map((g,m)=>({ALT:F(()=>t.parser.consume(m,g,u),"ALT")}));let p;return g=>{p!=null||(p=zM(t,r)),t.parser.subrule(0,p,!1,i,g),t.parser.many(0,{DEF:F(()=>{t.parser.alternatives(0,f),t.parser.subrule(1,p,!1,h,g)},"DEF")})}}l(xDe,"buildInfixRule"),F(xDe,"buildInfixRule");function Qp(t,e,r=!1){let n;if(Bf(e))n=kDe(t,e);else if(zp(e))n=wDe(t,e);else if(Df(e))n=Qp(t,e.terminal);else if(y1(e))n=DQ(t,e);else if(zf(e))n=TDe(t,e);else if(QL(e))n=CDe(t,e);else if(g$(e))n=SDe(t,e);else if(b1(e))n=_De(t,e);else if(aX(e)){const a=t.consume++;n=F(()=>t.parser.consume(a,jp,e),"method")}else throw new v$(e.$cstNode,`Unexpected element type: ${e.$type}`);return FQ(t,r?void 0:Z_(e),n,e.cardinality)}l(Qp,"buildElement"),F(Qp,"buildElement");function wDe(t,e){const r=$1(e);return()=>t.parser.action(r,e)}l(wDe,"buildAction"),F(wDe,"buildAction");function TDe(t,e){const r=e.rule.ref;if(m1(r)){const n=t.subrule++,a=pl(r)&&r.fragment,i=e.arguments.length>0?EDe(r,e.arguments):()=>({});let s;return o=>{s!=null||(s=zM(t,r)),t.parser.subrule(n,s,a,e,i(o))}}else if(lu(r)){const n=t.consume++,a=HM(t,r.name);return()=>t.parser.consume(n,a,e)}else if(r)qp();else throw new v$(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}l(TDe,"buildRuleCall"),F(TDe,"buildRuleCall");function EDe(t,e){if(e.some(n=>n.calledByName)){const n=e.map(a=>{var i,s;return{parameterName:(s=(i=a.parameter)==null?void 0:i.ref)==null?void 0:s.name,predicate:lh(a.value)}});return a=>{const i={};for(const{parameterName:s,predicate:o}of n)s&&(i[s]=o(a));return i}}else{const n=e.map(a=>lh(a.value));return a=>{const i={};for(let s=0;s<n.length;s++)if(s<t.parameters.length){const o=t.parameters[s].name,u=n[s];i[o]=u(a)}return i}}}l(EDe,"buildRuleCallPredicate"),F(EDe,"buildRuleCallPredicate");function lh(t){if(nX(t)){const e=lh(t.left),r=lh(t.right);return n=>e(n)||r(n)}else if(rX(t)){const e=lh(t.left),r=lh(t.right);return n=>e(n)&&r(n)}else if(oX(t)){const e=lh(t.value);return r=>!e(r)}else if(lX(t)){const e=t.parameter.ref.name;return r=>r!==void 0&&r[e]===!0}else if(eX(t)){const e=!!t.true;return()=>e}qp()}l(lh,"buildPredicate"),F(lh,"buildPredicate");function CDe(t,e){if(e.elements.length===1)return Qp(t,e.elements[0]);{const r=[];for(const a of e.elements){const i={ALT:Qp(t,a,!0)},s=Z_(a);s&&(i.GATE=lh(s)),r.push(i)}const n=t.or++;return a=>t.parser.alternatives(n,r.map(i=>{const s={ALT:F(()=>i.ALT(a),"ALT")},o=i.GATE;return o&&(s.GATE=()=>o(a)),s}))}}l(CDe,"buildAlternatives"),F(CDe,"buildAlternatives");function SDe(t,e){if(e.elements.length===1)return Qp(t,e.elements[0]);const r=[];for(const o of e.elements){const u={ALT:Qp(t,o,!0)},h=Z_(o);h&&(u.GATE=lh(h)),r.push(u)}const n=t.or++,a=F((o,u)=>{const h=u.getRuleStack().join("-");return`uGroup_${o}_${h}`},"idFunc"),i=F(o=>t.parser.alternatives(n,r.map((u,h)=>{const d={ALT:F(()=>!0,"ALT")},f=t.parser;d.ALT=()=>{if(u.ALT(o),!f.isRecording()){const g=a(n,f);f.unorderedGroups.get(g)||f.unorderedGroups.set(g,[]);const m=f.unorderedGroups.get(g);typeof(m==null?void 0:m[h])=="undefined"&&(m[h]=!0)}};const p=u.GATE;return p?d.GATE=()=>p(o):d.GATE=()=>{const g=f.unorderedGroups.get(a(n,f));return!(g!=null&&g[h])},d})),"alternatives"),s=FQ(t,Z_(e),i,"*");return o=>{s(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(a(n,t.parser))}}l(SDe,"buildUnorderedGroup"),F(SDe,"buildUnorderedGroup");function _De(t,e){const r=e.elements.map(n=>Qp(t,n));return n=>r.forEach(a=>a(n))}l(_De,"buildGroup"),F(_De,"buildGroup");function Z_(t){if(b1(t))return t.guardCondition}l(Z_,"getGuardCondition"),F(Z_,"getGuardCondition");function DQ(t,e,r=e.terminal){if(r)if(zf(r)&&pl(r.rule.ref)){const n=r.rule.ref,a=t.subrule++;let i;return s=>{i!=null||(i=zM(t,n)),t.parser.subrule(a,i,!1,e,s)}}else if(zf(r)&&lu(r.rule.ref)){const n=t.consume++,a=HM(t,r.rule.ref.name);return()=>t.parser.consume(n,a,e)}else if(Bf(r)){const n=t.consume++,a=HM(t,r.value);return()=>t.parser.consume(n,a,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const n=N$(e.type.ref),a=n==null?void 0:n.terminal;if(!a)throw new Error("Could not find name assignment for type: "+$1(e.type.ref));return DQ(t,e,a)}}l(DQ,"buildCrossReference"),F(DQ,"buildCrossReference");function kDe(t,e){const r=t.consume++,n=t.tokens[e.value];if(!n)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(r,n,e)}l(kDe,"buildKeyword"),F(kDe,"buildKeyword");function FQ(t,e,r,n){const a=e&&lh(e);if(!n)if(a){const i=t.or++;return s=>t.parser.alternatives(i,[{ALT:F(()=>r(s),"ALT"),GATE:F(()=>a(s),"GATE")},{ALT:tQ(),GATE:F(()=>!a(s),"GATE")}])}else return r;if(n==="*"){const i=t.many++;return s=>t.parser.many(i,{DEF:F(()=>r(s),"DEF"),GATE:a?()=>a(s):void 0})}else if(n==="+"){const i=t.many++;if(a){const s=t.or++;return o=>t.parser.alternatives(s,[{ALT:F(()=>t.parser.atLeastOne(i,{DEF:F(()=>r(o),"DEF")}),"ALT"),GATE:F(()=>a(o),"GATE")},{ALT:tQ(),GATE:F(()=>!a(o),"GATE")}])}else return s=>t.parser.atLeastOne(i,{DEF:F(()=>r(s),"DEF")})}else if(n==="?"){const i=t.optional++;return s=>t.parser.optional(i,{DEF:F(()=>r(s),"DEF"),GATE:a?()=>a(s):void 0})}else qp()}l(FQ,"wrap$1"),F(FQ,"wrap");function zM(t,e){const r=ADe(t,e),n=t.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}l(zM,"getRule$1"),F(zM,"getRule");function ADe(t,e){if(m1(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let r=e,n=r.$container,a=e.$type;for(;!pl(n);)(b1(n)||QL(n)||g$(n))&&(a=n.elements.indexOf(r).toString()+":"+a),r=n,n=n.$container;return a=n.name+":"+a,t.ruleNames.set(e,a),a}}l(ADe,"getRuleName"),F(ADe,"getRuleName");function HM(t,e){const r=t.tokens[e];if(!r)throw new Error(`Token "${e}" not found."`);return r}l(HM,"getToken"),F(HM,"getToken");function BQ(t){const e=t.Grammar,r=t.parser.Lexer,n=new yDe(t);return BM(e,n,r.definition),n.finalize(),n}l(BQ,"createCompletionParser"),F(BQ,"createCompletionParser");function zQ(t){const e=HQ(t);return e.finalize(),e}l(zQ,"createLangiumParser"),F(zQ,"createLangiumParser");function HQ(t){const e=t.Grammar,r=t.parser.Lexer,n=new gDe(t);return BM(e,n,r.definition)}l(HQ,"prepareLangiumParser"),F(HQ,"prepareLangiumParser");var WM=(f2=class{constructor(){this.diagnostics=[]}buildTokens(e,r){const n=da(S$(e,!1)),a=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,a,r);return i.push(...a),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(lu).filter(r=>!r.fragment).map(r=>this.buildTerminalToken(r)).toArray()}buildTerminalToken(e){const r=h_(e),n=this.requiresCustomPattern(r)?this.regexPatternFunction(r):r,a={name:e.name,PATTERN:n};return typeof n=="function"&&(a.LINE_BREAKS=!0),e.hidden&&(a.GROUP=C$(r)?yl.SKIPPED:"hidden"),a}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){const r=new RegExp(e,e.flags+"y");return(n,a)=>(r.lastIndex=a,r.exec(n))}buildKeywordTokens(e,r,n){return e.filter(m1).flatMap(a=>Of(a).filter(Bf)).distinct(a=>a.value).toArray().sort((a,i)=>i.value.length-a.value.length).map(a=>this.buildKeywordToken(a,r,!!(n!=null&&n.caseInsensitive)))}buildKeywordToken(e,r,n){const a=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:a,LONGER_ALT:this.findLongerAlt(e,r)};return typeof a=="function"&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,r){return r?new RegExp(yE(e.value),"i"):e.value}findLongerAlt(e,r){return r.reduce((n,a)=>{const i=a==null?void 0:a.PATTERN;return i!=null&&i.source&&$X("^"+i.source+"$",e.value)&&n.push(a),n},[])}},l(f2,"DefaultTokenBuilder"),F(f2,"DefaultTokenBuilder"),f2),WQ=(p2=class{convert(e,r){let n=r.grammarSource;if(y1(n)&&(n=DX(n)),zf(n)){const a=n.rule.ref;if(!a)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(a,e,r)}return e}runConverter(e,r,n){var a;switch(e.name.toUpperCase()){case"INT":return Ed.convertInt(r);case"STRING":return Ed.convertString(r);case"ID":return Ed.convertID(r)}switch((a=YX(e))==null?void 0:a.toLowerCase()){case"number":return Ed.convertNumber(r);case"boolean":return Ed.convertBoolean(r);case"bigint":return Ed.convertBigint(r);case"date":return Ed.convertDate(r);default:return r}}},l(p2,"DefaultValueConverter"),F(p2,"DefaultValueConverter"),p2),Ed;(function(t){function e(h){let d="";for(let f=1;f<h.length-1;f++){const p=h.charAt(f);if(p==="\\"){const g=h.charAt(++f);d+=r(g)}else d+=p}return d}l(e,"convertString"),F(e,"convertString"),t.convertString=e;function r(h){switch(h){case"b":return"\b";case"f":return"\f";case"n":return`
|
||
`;case"r":return"\r";case"t":return" ";case"v":return"\v";case"0":return"\0";default:return h}}l(r,"convertEscapeCharacter"),F(r,"convertEscapeCharacter");function n(h){return h.charAt(0)==="^"?h.substring(1):h}l(n,"convertID"),F(n,"convertID"),t.convertID=n;function a(h){return parseInt(h)}l(a,"convertInt"),F(a,"convertInt"),t.convertInt=a;function i(h){return BigInt(h)}l(i,"convertBigint"),F(i,"convertBigint"),t.convertBigint=i;function s(h){return new Date(h)}l(s,"convertDate"),F(s,"convertDate"),t.convertDate=s;function o(h){return Number(h)}l(o,"convertNumber"),F(o,"convertNumber"),t.convertNumber=o;function u(h){return h.toLowerCase()==="true"}l(u,"convertBoolean"),F(u,"convertBoolean"),t.convertBoolean=u})(Ed||(Ed={}));var Oa={};DL(Oa,Wj(YL()));function VM(){return new Promise(t=>{typeof setImmediate=="undefined"?setTimeout(t,0):setImmediate(t)})}l(VM,"delayNextTick"),F(VM,"delayNextTick");var GM=0,NDe=10;function qM(){return GM=performance.now(),new Oa.CancellationTokenSource}l(qM,"startCancelableOperation"),F(qM,"startCancelableOperation");function VQ(t){NDe=t}l(VQ,"setInterruptionPeriod"),F(VQ,"setInterruptionPeriod");var Cd=Symbol("OperationCancelled");function ey(t){return t===Cd}l(ey,"isOperationCancelled"),F(ey,"isOperationCancelled");function Ws(t){return nt(this,null,function*(){if(t===Oa.CancellationToken.None)return;const e=performance.now();if(e-GM>=NDe&&(GM=e,yield VM(),GM=performance.now()),t.isCancellationRequested)throw Cd})}l(Ws,"interruptAndCheck"),F(Ws,"interruptAndCheck");var Xf=(g2=class{constructor(){this.promise=new Promise((e,r)=>{this.resolve=n=>(e(n),this),this.reject=n=>(r(n),this)})}},l(g2,"Deferred"),F(g2,"Deferred"),g2),IDe=(h0=class{constructor(e,r,n,a){this._uri=e,this._languageId=r,this._version=n,this._content=a,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const r=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(r,n)}return this._content}update(e,r){for(const n of e)if(h0.isIncremental(n)){const a=YQ(n.range),i=this.offsetAt(a.start),s=this.offsetAt(a.end);this._content=this._content.substring(0,i)+n.text+this._content.substring(s,this._content.length);const o=Math.max(a.start.line,0),u=Math.max(a.end.line,0);let h=this._lineOffsets;const d=GQ(n.text,!1,i);if(u-o===d.length)for(let p=0,g=d.length;p<g;p++)h[p+o+1]=d[p];else d.length<1e4?h.splice(o+1,u-o,...d):this._lineOffsets=h=h.slice(0,o+1).concat(d,h.slice(u+1));const f=n.text.length-(s-i);if(f!==0)for(let p=o+1+d.length,g=h.length;p<g;p++)h[p]=h[p]+f}else if(h0.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received");this._version=r}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=GQ(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const r=this.getLineOffsets();let n=0,a=r.length;if(a===0)return{line:0,character:e};for(;n<a;){const s=Math.floor((n+a)/2);r[s]>e?a=s:n=s+1}const i=n-1;return e=this.ensureBeforeEOL(e,r[i]),{line:i,character:e-r[i]}}offsetAt(e){const r=this.getLineOffsets();if(e.line>=r.length)return this._content.length;if(e.line<0)return 0;const n=r[e.line];if(e.character<=0)return n;const a=e.line+1<r.length?r[e.line+1]:this._content.length,i=Math.min(n+e.character,a);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,r){for(;e>r&&qQ(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const r=e;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(e){const r=e;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}},l(h0,"_FullTextDocument"),F(h0,"FullTextDocument"),h0),YM;(function(t){function e(a,i,s,o){return new IDe(a,i,s,o)}l(e,"create"),F(e,"create"),t.create=e;function r(a,i,s){if(a instanceof IDe)return a.update(i,s),a;throw new Error("TextDocument.update: document must be created by TextDocument.create")}l(r,"update"),F(r,"update"),t.update=r;function n(a,i){const s=a.getText(),o=UM(i.map(LDe),(d,f)=>{const p=d.range.start.line-f.range.start.line;return p===0?d.range.start.character-f.range.start.character:p});let u=0;const h=[];for(const d of o){const f=a.offsetAt(d.range.start);if(f<u)throw new Error("Overlapping edit");f>u&&h.push(s.substring(u,f)),d.newText.length&&h.push(d.newText),u=a.offsetAt(d.range.end)}return h.push(s.substr(u)),h.join("")}l(n,"applyEdits"),F(n,"applyEdits"),t.applyEdits=n})(YM||(YM={}));function UM(t,e){if(t.length<=1)return t;const r=t.length/2|0,n=t.slice(0,r),a=t.slice(r);UM(n,e),UM(a,e);let i=0,s=0,o=0;for(;i<n.length&&s<a.length;)e(n[i],a[s])<=0?t[o++]=n[i++]:t[o++]=a[s++];for(;i<n.length;)t[o++]=n[i++];for(;s<a.length;)t[o++]=a[s++];return t}l(UM,"mergeSort"),F(UM,"mergeSort");function GQ(t,e,r=0){const n=e?[r]:[];for(let a=0;a<t.length;a++){const i=t.charCodeAt(a);qQ(i)&&(i===13&&a+1<t.length&&t.charCodeAt(a+1)===10&&a++,n.push(r+a+1))}return n}l(GQ,"computeLineOffsets"),F(GQ,"computeLineOffsets");function qQ(t){return t===13||t===10}l(qQ,"isEOL"),F(qQ,"isEOL");function YQ(t){const e=t.start,r=t.end;return e.line>r.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}l(YQ,"getWellformedRange"),F(YQ,"getWellformedRange");function LDe(t){const e=YQ(t.range);return e!==t.range?{newText:t.newText,range:e}:t}l(LDe,"getWellformedEdit"),F(LDe,"getWellformedEdit");var $De;(()=>{var t={975:O=>{function M(D){if(typeof D!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(D))}l(M,"e2"),F(M,"e");function P(D,B){for(var W,U="",j=0,V=-1,Y=0,H=0;H<=D.length;++H){if(H<D.length)W=D.charCodeAt(H);else{if(W===47)break;W=47}if(W===47){if(!(V===H-1||Y===1))if(V!==H-1&&Y===2){if(U.length<2||j!==2||U.charCodeAt(U.length-1)!==46||U.charCodeAt(U.length-2)!==46){if(U.length>2){var q=U.lastIndexOf("/");if(q!==U.length-1){q===-1?(U="",j=0):j=(U=U.slice(0,q)).length-1-U.lastIndexOf("/"),V=H,Y=0;continue}}else if(U.length===2||U.length===1){U="",j=0,V=H,Y=0;continue}}B&&(U.length>0?U+="/..":U="..",j=2)}else U.length>0?U+="/"+D.slice(V+1,H):U=D.slice(V+1,H),j=H-V-1;V=H,Y=0}else W===46&&Y!==-1?++Y:Y=-1}return U}l(P,"r2"),F(P,"r");var z={resolve:F(function(){for(var D,B="",W=!1,U=arguments.length-1;U>=-1&&!W;U--){var j;U>=0?j=arguments[U]:(D===void 0&&(D=process.cwd()),j=D),M(j),j.length!==0&&(B=j+"/"+B,W=j.charCodeAt(0)===47)}return B=P(B,!W),W?B.length>0?"/"+B:"/":B.length>0?B:"."},"resolve"),normalize:F(function(D){if(M(D),D.length===0)return".";var B=D.charCodeAt(0)===47,W=D.charCodeAt(D.length-1)===47;return(D=P(D,!B)).length!==0||B||(D="."),D.length>0&&W&&(D+="/"),B?"/"+D:D},"normalize"),isAbsolute:F(function(D){return M(D),D.length>0&&D.charCodeAt(0)===47},"isAbsolute"),join:F(function(){if(arguments.length===0)return".";for(var D,B=0;B<arguments.length;++B){var W=arguments[B];M(W),W.length>0&&(D===void 0?D=W:D+="/"+W)}return D===void 0?".":z.normalize(D)},"join"),relative:F(function(D,B){if(M(D),M(B),D===B||(D=z.resolve(D))===(B=z.resolve(B)))return"";for(var W=1;W<D.length&&D.charCodeAt(W)===47;++W);for(var U=D.length,j=U-W,V=1;V<B.length&&B.charCodeAt(V)===47;++V);for(var Y=B.length-V,H=j<Y?j:Y,q=-1,Z=0;Z<=H;++Z){if(Z===H){if(Y>H){if(B.charCodeAt(V+Z)===47)return B.slice(V+Z+1);if(Z===0)return B.slice(V+Z)}else j>H&&(D.charCodeAt(W+Z)===47?q=Z:Z===0&&(q=0));break}var K=D.charCodeAt(W+Z);if(K!==B.charCodeAt(V+Z))break;K===47&&(q=Z)}var re="";for(Z=W+q+1;Z<=U;++Z)Z!==U&&D.charCodeAt(Z)!==47||(re.length===0?re+="..":re+="/..");return re.length>0?re+B.slice(V+q):(V+=q,B.charCodeAt(V)===47&&++V,B.slice(V))},"relative"),_makeLong:F(function(D){return D},"_makeLong"),dirname:F(function(D){if(M(D),D.length===0)return".";for(var B=D.charCodeAt(0),W=B===47,U=-1,j=!0,V=D.length-1;V>=1;--V)if((B=D.charCodeAt(V))===47){if(!j){U=V;break}}else j=!1;return U===-1?W?"/":".":W&&U===1?"//":D.slice(0,U)},"dirname"),basename:F(function(D,B){if(B!==void 0&&typeof B!="string")throw new TypeError('"ext" argument must be a string');M(D);var W,U=0,j=-1,V=!0;if(B!==void 0&&B.length>0&&B.length<=D.length){if(B.length===D.length&&B===D)return"";var Y=B.length-1,H=-1;for(W=D.length-1;W>=0;--W){var q=D.charCodeAt(W);if(q===47){if(!V){U=W+1;break}}else H===-1&&(V=!1,H=W+1),Y>=0&&(q===B.charCodeAt(Y)?--Y==-1&&(j=W):(Y=-1,j=H))}return U===j?j=H:j===-1&&(j=D.length),D.slice(U,j)}for(W=D.length-1;W>=0;--W)if(D.charCodeAt(W)===47){if(!V){U=W+1;break}}else j===-1&&(V=!1,j=W+1);return j===-1?"":D.slice(U,j)},"basename"),extname:F(function(D){M(D);for(var B=-1,W=0,U=-1,j=!0,V=0,Y=D.length-1;Y>=0;--Y){var H=D.charCodeAt(Y);if(H!==47)U===-1&&(j=!1,U=Y+1),H===46?B===-1?B=Y:V!==1&&(V=1):B!==-1&&(V=-1);else if(!j){W=Y+1;break}}return B===-1||U===-1||V===0||V===1&&B===U-1&&B===W+1?"":D.slice(B,U)},"extname"),format:F(function(D){if(D===null||typeof D!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof D);return function(B,W){var U=W.dir||W.root,j=W.base||(W.name||"")+(W.ext||"");return U?U===W.root?U+j:U+"/"+j:j}(0,D)},"format"),parse:F(function(D){M(D);var B={root:"",dir:"",base:"",ext:"",name:""};if(D.length===0)return B;var W,U=D.charCodeAt(0),j=U===47;j?(B.root="/",W=1):W=0;for(var V=-1,Y=0,H=-1,q=!0,Z=D.length-1,K=0;Z>=W;--Z)if((U=D.charCodeAt(Z))!==47)H===-1&&(q=!1,H=Z+1),U===46?V===-1?V=Z:K!==1&&(K=1):V!==-1&&(K=-1);else if(!q){Y=Z+1;break}return V===-1||H===-1||K===0||K===1&&V===H-1&&V===Y+1?H!==-1&&(B.base=B.name=Y===0&&j?D.slice(1,H):D.slice(Y,H)):(Y===0&&j?(B.name=D.slice(1,V),B.base=D.slice(1,H)):(B.name=D.slice(Y,V),B.base=D.slice(Y,H)),B.ext=D.slice(V,H)),Y>0?B.dir=D.slice(0,Y-1):j&&(B.dir="/"),B},"parse"),sep:"/",delimiter:":",win32:null,posix:null};z.posix=z,O.exports=z}},e={};function r(O){var M=e[O];if(M!==void 0)return M.exports;var P=e[O]={exports:{}};return t[O](P,P.exports,r),P.exports}l(r,"r"),F(r,"r"),r.d=(O,M)=>{for(var P in M)r.o(M,P)&&!r.o(O,P)&&Object.defineProperty(O,P,{enumerable:!0,get:M[P]})},r.o=(O,M)=>Object.prototype.hasOwnProperty.call(O,M),r.r=O=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})};var n={};let a;r.r(n),r.d(n,{URI:F(()=>p,"URI"),Utils:F(()=>I,"Utils")}),typeof process=="object"?a=process.platform==="win32":typeof navigator=="object"&&(a=navigator.userAgent.indexOf("Windows")>=0);const i=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function u(O,M){if(!O.scheme&&M)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${O.authority}", path: "${O.path}", query: "${O.query}", fragment: "${O.fragment}"}`);if(O.scheme&&!i.test(O.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(O.path){if(O.authority){if(!s.test(O.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(O.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}l(u,"a"),F(u,"a");const h="",d="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,L=class L{constructor(M,P,z,D,B,W=!1){Ln(this,"scheme");Ln(this,"authority");Ln(this,"path");Ln(this,"query");Ln(this,"fragment");typeof M=="object"?(this.scheme=M.scheme||h,this.authority=M.authority||h,this.path=M.path||h,this.query=M.query||h,this.fragment=M.fragment||h):(this.scheme=function(U,j){return U||j?U:"file"}(M,W),this.authority=P||h,this.path=function(U,j){switch(U){case"https":case"http":case"file":j?j[0]!==d&&(j=d+j):j=d}return j}(this.scheme,z||h),this.query=D||h,this.fragment=B||h,u(this,W))}static isUri(M){return M instanceof L||!!M&&typeof M.authority=="string"&&typeof M.fragment=="string"&&typeof M.path=="string"&&typeof M.query=="string"&&typeof M.scheme=="string"&&typeof M.fsPath=="string"&&typeof M.with=="function"&&typeof M.toString=="function"}get fsPath(){return w(this,!1)}with(M){if(!M)return this;let{scheme:P,authority:z,path:D,query:B,fragment:W}=M;return P===void 0?P=this.scheme:P===null&&(P=h),z===void 0?z=this.authority:z===null&&(z=h),D===void 0?D=this.path:D===null&&(D=h),B===void 0?B=this.query:B===null&&(B=h),W===void 0?W=this.fragment:W===null&&(W=h),P===this.scheme&&z===this.authority&&D===this.path&&B===this.query&&W===this.fragment?this:new m(P,z,D,B,W)}static parse(M,P=!1){const z=f.exec(M);return z?new m(z[2]||h,S(z[4]||h),S(z[5]||h),S(z[7]||h),S(z[9]||h),P):new m(h,h,h,h,h)}static file(M){let P=h;if(a&&(M=M.replace(/\\/g,d)),M[0]===d&&M[1]===d){const z=M.indexOf(d,2);z===-1?(P=M.substring(2),M=d):(P=M.substring(2,z),M=M.substring(z)||d)}return new m("file",P,M,h,h)}static from(M){const P=new m(M.scheme,M.authority,M.path,M.query,M.fragment);return u(P,!0),P}toString(M=!1){return x(this,M)}toJSON(){return this}static revive(M){if(M){if(M instanceof L)return M;{const P=new m(M);return P._formatted=M.external,P._fsPath=M._sep===g?M.fsPath:null,P}}return M}};l(L,"l"),F(L,"l");let p=L;const g=a?1:void 0,R=class R extends p{constructor(){super(...arguments);Ln(this,"_formatted",null);Ln(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath}toString(P=!1){return P?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)}toJSON(){const P={$mid:1};return this._fsPath&&(P.fsPath=this._fsPath,P._sep=g),this._formatted&&(P.external=this._formatted),this.path&&(P.path=this.path),this.scheme&&(P.scheme=this.scheme),this.authority&&(P.authority=this.authority),this.query&&(P.query=this.query),this.fragment&&(P.fragment=this.fragment),P}};l(R,"d"),F(R,"d");let m=R;const y={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function v(O,M,P){let z,D=-1;for(let B=0;B<O.length;B++){const W=O.charCodeAt(B);if(W>=97&&W<=122||W>=65&&W<=90||W>=48&&W<=57||W===45||W===46||W===95||W===126||M&&W===47||P&&W===91||P&&W===93||P&&W===58)D!==-1&&(z+=encodeURIComponent(O.substring(D,B)),D=-1),z!==void 0&&(z+=O.charAt(B));else{z===void 0&&(z=O.substr(0,B));const U=y[W];U!==void 0?(D!==-1&&(z+=encodeURIComponent(O.substring(D,B)),D=-1),z+=U):D===-1&&(D=B)}}return D!==-1&&(z+=encodeURIComponent(O.substring(D))),z!==void 0?z:O}l(v,"m"),F(v,"m");function b(O){let M;for(let P=0;P<O.length;P++){const z=O.charCodeAt(P);z===35||z===63?(M===void 0&&(M=O.substr(0,P)),M+=y[z]):M!==void 0&&(M+=O[P])}return M!==void 0?M:O}l(b,"y"),F(b,"y");function w(O,M){let P;return P=O.authority&&O.path.length>1&&O.scheme==="file"?`//${O.authority}${O.path}`:O.path.charCodeAt(0)===47&&(O.path.charCodeAt(1)>=65&&O.path.charCodeAt(1)<=90||O.path.charCodeAt(1)>=97&&O.path.charCodeAt(1)<=122)&&O.path.charCodeAt(2)===58?M?O.path.substr(1):O.path[1].toLowerCase()+O.path.substr(2):O.path,a&&(P=P.replace(/\//g,"\\")),P}l(w,"v"),F(w,"v");function x(O,M){const P=M?b:v;let z="",{scheme:D,authority:B,path:W,query:U,fragment:j}=O;if(D&&(z+=D,z+=":"),(B||D==="file")&&(z+=d,z+=d),B){let V=B.indexOf("@");if(V!==-1){const Y=B.substr(0,V);B=B.substr(V+1),V=Y.lastIndexOf(":"),V===-1?z+=P(Y,!1,!1):(z+=P(Y.substr(0,V),!1,!1),z+=":",z+=P(Y.substr(V+1),!1,!0)),z+="@"}B=B.toLowerCase(),V=B.lastIndexOf(":"),V===-1?z+=P(B,!1,!0):(z+=P(B.substr(0,V),!1,!0),z+=B.substr(V))}if(W){if(W.length>=3&&W.charCodeAt(0)===47&&W.charCodeAt(2)===58){const V=W.charCodeAt(1);V>=65&&V<=90&&(W=`/${String.fromCharCode(V+32)}:${W.substr(3)}`)}else if(W.length>=2&&W.charCodeAt(1)===58){const V=W.charCodeAt(0);V>=65&&V<=90&&(W=`${String.fromCharCode(V+32)}:${W.substr(2)}`)}z+=P(W,!0,!1)}return U&&(z+="?",z+=P(U,!1,!1)),j&&(z+="#",z+=M?j:v(j,!1,!1)),z}l(x,"b"),F(x,"b");function T(O){try{return decodeURIComponent(O)}catch(M){return O.length>3?O.substr(0,3)+T(O.substr(3)):O}}l(T,"C"),F(T,"C");const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function S(O){return O.match(C)?O.replace(C,M=>T(M)):O}l(S,"w"),F(S,"w");var E=r(975);const k=E.posix||E,A="/";var I;(function(O){O.joinPath=function(M,...P){return M.with({path:k.join(M.path,...P)})},O.resolvePath=function(M,...P){let z=M.path,D=!1;z[0]!==A&&(z=A+z,D=!0);let B=k.resolve(z,...P);return D&&B[0]===A&&!M.authority&&(B=B.substring(1)),M.with({path:B})},O.dirname=function(M){if(M.path.length===0||M.path===A)return M;let P=k.dirname(M.path);return P.length===1&&P.charCodeAt(0)===46&&(P=""),M.with({path:P})},O.basename=function(M){return k.basename(M.path)},O.extname=function(M){return k.extname(M.path)}})(I||(I={})),$De=n})();var{URI:Mc,Utils:Q_}=$De,xl;(function(t){t.basename=Q_.basename,t.dirname=Q_.dirname,t.extname=Q_.extname,t.joinPath=Q_.joinPath,t.resolvePath=Q_.resolvePath;const e=typeof process=="object"&&(process==null?void 0:process.platform)==="win32";function r(s,o){return(s==null?void 0:s.toString())===(o==null?void 0:o.toString())}l(r,"equals"),F(r,"equals"),t.equals=r;function n(s,o){const u=typeof s=="string"?Mc.parse(s).path:s.path,h=typeof o=="string"?Mc.parse(o).path:o.path,d=u.split("/").filter(y=>y.length>0),f=h.split("/").filter(y=>y.length>0);if(e){const y=/^[A-Z]:$/;if(d[0]&&y.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]&&y.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]!==f[0])return h.substring(1)}let p=0;for(;p<d.length&&d[p]===f[p];p++);const g="../".repeat(d.length-p),m=f.slice(p).join("/");return g+m}l(n,"relative"),F(n,"relative"),t.relative=n;function a(s){return Mc.parse(s.toString()).toString()}l(a,"normalize"),F(a,"normalize"),t.normalize=a;function i(s,o){let u=typeof s=="string"?s:s.path,h=typeof o=="string"?o:o.path;return h.charAt(h.length-1)==="/"&&(h=h.slice(0,-1)),u.charAt(u.length-1)==="/"&&(u=u.slice(0,-1)),h===u?!0:h.length<u.length||h.charAt(u.length)!=="/"?!1:h.startsWith(u)}l(i,"contains"),F(i,"contains"),t.contains=i})(xl||(xl={}));var UQ=(m2=class{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return xl.normalize(e)}clear(){this.root.children.clear()}insert(e,r){const n=this.getNode(this.normalizeUri(e),!0);n.element=r}delete(e){const r=this.getNode(this.normalizeUri(e),!1);r!=null&&r.parent&&r.parent.children.delete(r.name)}has(e){var r;return((r=this.getNode(this.normalizeUri(e),!1))==null?void 0:r.element)!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){var r;return(r=this.getNode(this.normalizeUri(e),!1))==null?void 0:r.element}findNode(e){const r=this.normalizeUri(e),n=this.getNode(r,!1);if(n)return{name:n.name,uri:xl.joinPath(Mc.parse(r),n.name).toString(),element:n.element}}findChildren(e){const r=this.normalizeUri(e),n=this.getNode(r,!1);return n?Array.from(n.children.values()).map(a=>({name:a.name,uri:xl.joinPath(Mc.parse(r),a.name).toString(),element:a.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const r=this.getNode(xl.normalize(e),!1);return r?this.collectValues(r):[]}getNode(e,r){const n=e.split("/");e.charAt(e.length-1)==="/"&&n.pop();let a=this.root;for(const i of n){let s=a.children.get(i);if(!s)if(r)s={name:i,children:new Map,parent:a},a.children.set(i,s);else return;a=s}return a}collectValues(e){const r=[];e.element&&r.push(e.element);for(const n of e.children.values())r.push(...this.collectValues(n));return r}},l(m2,"UriTrie"),F(m2,"UriTrie"),m2),yn;(function(t){t[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated"})(yn||(yn={}));var MDe=(y2=class{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}fromUri(n){return nt(this,arguments,function*(e,r=Oa.CancellationToken.None){const a=yield this.fileSystemProvider.readFile(e);return this.createAsync(e,a,r)})}fromTextDocument(e,r,n){return r=r!=null?r:Mc.parse(e.uri),Oa.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromString(e,r,n){return Oa.CancellationToken.is(n)?this.createAsync(r,e,n):this.create(r,e,n)}fromModel(e,r){return this.create(r,{$model:e})}create(e,r,n){if(typeof r=="string"){const a=this.parse(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else if("$model"in r){const a={value:r.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(a,e)}else{const a=this.parse(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}}createAsync(e,r,n){return nt(this,null,function*(){if(typeof r=="string"){const a=yield this.parseAsync(e,r,n);return this.createLangiumDocument(a,e,void 0,r)}else{const a=yield this.parseAsync(e,r.getText(),n);return this.createLangiumDocument(a,e,r)}})}createLangiumDocument(e,r,n,a){let i;if(n)i={parseResult:e,uri:r,state:yn.Parsed,references:[],textDocument:n};else{const s=this.createTextDocumentGetter(r,a);i={parseResult:e,uri:r,state:yn.Parsed,references:[],get textDocument(){return s()}}}return e.value.$document=i,i}update(e,r){return nt(this,null,function*(){var s,o;const n=(s=e.parseResult.value.$cstNode)==null?void 0:s.root.fullText,a=(o=this.textDocuments)==null?void 0:o.get(e.uri.toString()),i=a?a.getText():yield this.fileSystemProvider.readFile(e.uri);if(a)Object.defineProperty(e,"textDocument",{value:a});else{const u=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:u})}return n!==i&&(e.parseResult=yield this.parseAsync(e.uri,i,r),e.parseResult.value.$document=e),e.state=yn.Parsed,e})}parse(e,r,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(r,n)}parseAsync(e,r,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(r,n)}createTextDocumentGetter(e,r){const n=this.serviceRegistry;let a;return()=>a!=null?a:a=YM.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,r!=null?r:"")}},l(y2,"DefaultLangiumDocumentFactory"),F(y2,"DefaultLangiumDocumentFactory"),y2),PDe=(v2=class{constructor(e){this.documentTrie=new UQ,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return da(this.documentTrie.all())}addDocument(e){const r=e.uri.toString();if(this.documentTrie.has(r))throw new Error(`A document with the URI '${r}' is already present.`);this.documentTrie.insert(r,e)}getDocument(e){const r=e.toString();return this.documentTrie.find(r)}getDocuments(e){const r=e.toString();return this.documentTrie.findAll(r)}getOrCreateDocument(e,r){return nt(this,null,function*(){let n=this.getDocument(e);return n||(n=yield this.langiumDocumentFactory.fromUri(e,r),this.addDocument(n),n)})}createDocument(e,r,n){if(n)return this.langiumDocumentFactory.fromString(r,e,n).then(a=>(this.addDocument(a),a));{const a=this.langiumDocumentFactory.fromString(r,e);return this.addDocument(a),a}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const r=e.toString(),n=this.documentTrie.find(r);return n&&this.documentBuilder().resetToState(n,yn.Changed),n}deleteDocument(e){const r=e.toString(),n=this.documentTrie.find(r);return n&&(n.state=yn.Changed,this.documentTrie.delete(r)),n}deleteDocuments(e){const r=e.toString(),n=this.documentTrie.findAll(r);for(const a of n)a.state=yn.Changed;return this.documentTrie.delete(r),n}},l(v2,"DefaultLangiumDocuments"),F(v2,"DefaultLangiumDocuments"),v2),ty=Symbol("RefResolving"),RDe=(b2=class{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}link(n){return nt(this,arguments,function*(e,r=Oa.CancellationToken.None){var a;if((a=this.profiler)!=null&&a.isActive("linking")){const i=this.profiler.createTask("linking",this.languageId);i.start();try{for(const s of eh(e.parseResult.value))yield Ws(r),iE(s).forEach(o=>{const u=`${s.$type}:${o.property}`;i.startSubTask(u);try{this.doLink(o,e)}finally{i.stopSubTask(u)}})}finally{i.stop()}}else for(const i of eh(e.parseResult.value))yield Ws(r),iE(i).forEach(s=>this.doLink(s,e))})}doLink(e,r){var a;const n=e.reference;if("_ref"in n&&n._ref===void 0){n._ref=ty;try{const i=this.getCandidate(e);if(f1(i))n._ref=i;else{n._nodeDescription=i;const s=this.loadAstNode(i);n._ref=s!=null?s:this.createLinkingError(e,i)}}catch(i){console.error(`An error occurred while resolving reference to '${n.$refText}':`,i);const s=(a=i.message)!=null?a:String(i);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${s}`}}r.references.push(n)}else if("_items"in n&&n._items===void 0){n._items=ty;try{const i=this.getCandidates(e),s=[];if(f1(i))n._linkingError=i;else for(const o of i){const u=this.loadAstNode(o);u&&s.push({ref:u,$nodeDescription:o})}n._items=s}catch(i){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${i}`},n._items=[]}r.references.push(n)}}unlink(e){for(const r of e.references)"_ref"in r?(r._ref=void 0,delete r._nodeDescription):"_items"in r&&(r._items=void 0,delete r._linkingError);e.references=[]}getCandidate(e){const n=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return n!=null?n:this.createLinkingError(e)}getCandidates(e){const n=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(a=>`${a.documentUri}#${a.path}`).toArray();return n.length>0?n:this.createLinkingError(e)}buildReference(e,r,n,a){const i=this,s={$refNode:n,$refText:a,_ref:void 0,get ref(){var o;if(ts(this._ref))return this._ref;if(jK(this._nodeDescription)){const u=i.loadAstNode(this._nodeDescription);this._ref=u!=null?u:i.createLinkingError({reference:s,container:e,property:r},this._nodeDescription)}else if(this._ref===void 0){this._ref=ty;const u=aE(e).$document,h=i.getLinkedNode({reference:s,container:e,property:r});if(h.error&&u&&u.state<yn.ComputedScopes)return this._ref=void 0;this._ref=(o=h.node)!=null?o:h.error,this._nodeDescription=h.descr,u==null||u.references.push(this)}else this._ref===ty&&i.throwCyclicReferenceError(e,r,a);return ts(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return f1(this._ref)?this._ref:void 0}};return s}buildMultiReference(e,r,n,a){const i=this,s={$refNode:n,$refText:a,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=ty;const o=aE(e).$document,u=i.getCandidates({reference:s,container:e,property:r}),h=[];if(f1(u))this._linkingError=u;else for(const d of u){const f=i.loadAstNode(d);f&&h.push({ref:f,$nodeDescription:d})}this._items=h,o==null||o.references.push(this)}else this._items===ty&&i.throwCyclicReferenceError(e,r,a);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(!(this.items.length>0))return this._linkingError=i.createLinkingError({reference:s,container:e,property:r})}};return s}throwCyclicReferenceError(e,r,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${r} (symbol '${n}')`)}getLinkedNode(e){var r;try{const n=this.getCandidate(e);if(f1(n))return{error:n};const a=this.loadAstNode(n);return a?{node:a,descr:n}:{descr:n,error:this.createLinkingError(e,n)}}catch(n){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,n);const a=(r=n.message)!=null?r:String(n);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${a}`}}}}loadAstNode(e){if(e.node)return e.node;const r=this.langiumDocuments().getDocument(e.documentUri);if(r)return this.astNodeLocator.getAstNode(r.parseResult.value,e.path)}createLinkingError(e,r){const n=aE(e.container).$document;n&&n.state<yn.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`);const a=this.reflection.getReferenceType(e);return{info:e,message:`Could not resolve reference to ${a} named '${e.reference.$refText}'.`,targetDescription:r}}},l(b2,"DefaultLinker"),F(b2,"DefaultLinker"),b2);function jQ(t){return typeof t.name=="string"}l(jQ,"isNamed"),F(jQ,"isNamed");var ODe=(x2=class{getName(e){if(jQ(e))return e.name}getNameNode(e){return _$(e.$cstNode,"name")}},l(x2,"DefaultNameProvider"),F(x2,"DefaultNameProvider"),x2),DDe=(w2=class{constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=eh(e.Grammar).some(r=>y1(r)&&r.isMulti)}findDeclarations(e){if(e){const r=HX(e),n=e.astNode;if(r&&n){const a=n[r.feature];if(dl(a)||fd(a))return jL(a);if(Array.isArray(a)){for(const i of a)if((dl(i)||fd(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return jL(i)}}if(n){const a=this.nameProvider.getNameNode(n);if(a&&(a===e||vX(e,a)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(r.head());if(n){for(const a of iE(n))if(fd(a.reference)&&a.reference.items.some(i=>i.ref===e))return a.reference.items.map(i=>i.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;const r=this.documents.getDocument(e.sourceUri);if(r)return this.nodeLocator.getAstNode(r.parseResult.value,e.sourcePath)}findDeclarationNodes(e){var a;const r=this.findDeclarations(e),n=[];for(const i of r){const s=(a=this.nameProvider.getNameNode(i))!=null?a:i.$cstNode;s&&n.push(s)}return n}findReferences(e,r){const n=[];r.includeDeclaration&&n.push(...this.getSelfReferences(e));let a=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return r.documentUri&&(a=a.filter(i=>xl.equals(i.sourceUri,r.documentUri))),n.push(...a),da(n)}getSelfReferences(e){const r=this.getSelfNodes(e),n=[];for(const a of r){const i=this.nameProvider.getNameNode(a);if(i){const s=Ju(a),o=this.nodeLocator.getAstNodePath(a);n.push({sourceUri:s.uri,sourcePath:o,targetUri:s.uri,targetPath:o,segment:gE(i),local:!0})}}return n}},l(w2,"DefaultReferences"),F(w2,"DefaultReferences"),w2),Zf=(T2=class{constructor(e){if(this.map=new Map,e)for(const[r,n]of e)this.add(r,n)}get size(){return Z5.sum(da(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,r){if(r===void 0)return this.map.delete(e);{const n=this.map.get(e);if(n){const a=n.indexOf(r);if(a>=0)return n.length===1?this.map.delete(e):n.splice(a,1),!0}return!1}}get(e){var r;return(r=this.map.get(e))!=null?r:[]}getStream(e){const r=this.map.get(e);return r?da(r):tE}has(e,r){if(r===void 0)return this.map.has(e);{const n=this.map.get(e);return n?n.indexOf(r)>=0:!1}}add(e,r){return this.map.has(e)?this.map.get(e).push(r):this.map.set(e,[r]),this}addAll(e,r){return this.map.has(e)?this.map.get(e).push(...r):this.map.set(e,Array.from(r)),this}forEach(e){this.map.forEach((r,n)=>r.forEach(a=>e(a,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return da(this.map.entries()).flatMap(([e,r])=>r.map(n=>[e,n]))}keys(){return da(this.map.keys())}values(){return da(this.map.values()).flat()}entriesGroupedByKey(){return da(this.map.entries())}},l(T2,"MultiMap"),F(T2,"MultiMap"),T2),jM=(E2=class{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[r,n]of e)this.set(r,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,r){return this.map.set(e,r),this.inverse.set(r,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const r=this.map.get(e);return r!==void 0?(this.map.delete(e),this.inverse.delete(r),!0):!1}},l(E2,"BiMap"),F(E2,"BiMap"),E2),FDe=(C2=class{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}collectExportedSymbols(n){return nt(this,arguments,function*(e,r=Oa.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,r)})}collectExportedSymbolsForNode(i,s){return nt(this,arguments,function*(e,r,n=Q5,a=Oa.CancellationToken.None){const o=[];this.addExportedSymbol(e,o,r);for(const u of n(e))yield Ws(a),this.addExportedSymbol(u,o,r);return o})}addExportedSymbol(e,r,n){const a=this.nameProvider.getName(e);a&&r.push(this.descriptions.createDescription(e,a,n))}collectLocalSymbols(n){return nt(this,arguments,function*(e,r=Oa.CancellationToken.None){const a=e.parseResult.value,i=new Zf;for(const s of Of(a))yield Ws(r),this.addLocalSymbol(s,e,i);return i})}addLocalSymbol(e,r,n){const a=e.$container;if(a){const i=this.nameProvider.getName(e);i&&n.add(a,this.descriptions.createDescription(e,i,r))}}},l(C2,"DefaultScopeComputation"),F(C2,"DefaultScopeComputation"),C2),KQ=(S2=class{constructor(e,r,n){var a,i;this.elements=e,this.outerScope=r,this.caseInsensitive=(a=n==null?void 0:n.caseInsensitive)!=null?a:!1,this.concatOuterScope=(i=n==null?void 0:n.concatOuterScope)!=null?i:!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(a=>a.name.toLowerCase()===r):this.elements.find(a=>a.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(a=>a.name.toLowerCase()===r):this.elements.filter(a=>a.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},l(S2,"StreamScope"),F(S2,"StreamScope"),S2),Vor=(_2=class{constructor(e,r,n){var a,i;this.elements=new Map,this.caseInsensitive=(a=n==null?void 0:n.caseInsensitive)!=null?a:!1,this.concatOuterScope=(i=n==null?void 0:n.concatOuterScope)!=null?i:!0;for(const s of e){const o=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.set(o,s)}this.outerScope=r}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r),a=n?[n]:[];return(this.concatOuterScope||a.length>0)&&this.outerScope?da(a).concat(this.outerScope.getElements(e)):da(a)}getAllElements(){let e=da(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},l(_2,"MapScope"),F(_2,"MapScope"),_2),BDe=(k2=class{constructor(e,r,n){var a,i;this.elements=new Zf,this.caseInsensitive=(a=n==null?void 0:n.caseInsensitive)!=null?a:!1,this.concatOuterScope=(i=n==null?void 0:n.concatOuterScope)!=null?i:!0;for(const s of e){const o=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.add(o,s)}this.outerScope=r}getElement(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){const r=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(r);return(this.concatOuterScope||n.length===0)&&this.outerScope?da(n).concat(this.outerScope.getElements(e)):da(n)}getAllElements(){let e=da(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},l(k2,"MultiMapScope"),F(k2,"MultiMapScope"),k2),Gor={getElement(){},getElements(){return tE},getAllElements(){return tE}},KM=(A2=class{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},l(A2,"DisposableCache"),F(A2,"DisposableCache"),A2),XQ=(N2=class extends KM{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,r){this.throwIfDisposed(),this.cache.set(e,r)}get(e,r){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(r){const n=r();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},l(N2,"SimpleCache"),F(N2,"SimpleCache"),N2),XM=(I2=class extends KM{constructor(e){super(),this.cache=new Map,this.converter=e!=null?e:r=>r}has(e,r){return this.throwIfDisposed(),this.cacheForContext(e).has(r)}set(e,r,n){this.throwIfDisposed(),this.cacheForContext(e).set(r,n)}get(e,r,n){this.throwIfDisposed();const a=this.cacheForContext(e);if(a.has(r))return a.get(r);if(n){const i=n();return a.set(r,i),i}else return}delete(e,r){return this.throwIfDisposed(),this.cacheForContext(e).delete(r)}clear(e){if(this.throwIfDisposed(),e){const r=this.converter(e);this.cache.delete(r)}else this.cache.clear()}cacheForContext(e){const r=this.converter(e);let n=this.cache.get(r);return n||(n=new Map,this.cache.set(r,n)),n}},l(I2,"ContextCache"),F(I2,"ContextCache"),I2),zDe=(L2=class extends XM{constructor(e,r){super(n=>n.toString()),r?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(r,n=>{this.clear(n.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{for(const i of a)this.clear(i)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{const i=n.concat(a);for(const s of i)this.clear(s)}))}},l(L2,"DocumentCache"),F(L2,"DocumentCache"),L2),ZQ=($2=class extends XQ{constructor(e,r){super(),r?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(r,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((n,a)=>{a.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},l($2,"WorkspaceCache"),F($2,"WorkspaceCache"),$2),HDe=(M2=class{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new ZQ(e.shared)}getScope(e){const r=[],n=this.reflection.getReferenceType(e),a=Ju(e.container).localSymbols;if(a){let s=e.container;do a.has(s)&&r.push(a.getStream(s).filter(o=>this.reflection.isSubtype(o.type,n))),s=s.$container;while(s)}let i=this.getGlobalScope(n,e);for(let s=r.length-1;s>=0;s--)i=this.createScope(r[s],i);return i}createScope(e,r,n){return new KQ(da(e),r,n)}createScopeForNodes(e,r,n){const a=da(e).map(i=>{const s=this.nameProvider.getName(i);if(s)return this.descriptions.createDescription(i,s)}).nonNullable();return new KQ(a,r,n)}getGlobalScope(e,r){return this.globalScopeCache.get(e,()=>new BDe(this.indexManager.allElements(e)))}},l(M2,"DefaultScopeProvider"),F(M2,"DefaultScopeProvider"),M2);function QQ(t){return typeof t.$comment=="string"}l(QQ,"isAstNodeWithComment"),F(QQ,"isAstNodeWithComment");function JQ(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}l(JQ,"isIntermediateReference"),F(JQ,"isIntermediateReference");var WDe=(P2=class{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,r){const n=r!=null?r:{},a=r==null?void 0:r.replacer,i=F((o,u)=>this.replacer(o,u,n),"defaultReplacer"),s=a?(o,u)=>a(o,u,i):i;try{return this.currentDocument=Ju(e),JSON.stringify(e,s,r==null?void 0:r.space)}finally{this.currentDocument=void 0}}deserialize(e,r){const n=r!=null?r:{},a=JSON.parse(e);return this.linkNode(a,a,n),a}replacer(e,r,{refText:n,sourceText:a,textRegions:i,comments:s,uriConverter:o}){var u,h,d,f;if(!this.ignoreProperties.has(e))if(dl(r)){const p=r.ref,g=n?r.$refText:void 0;if(p){const m=Ju(p);let y="";this.currentDocument&&this.currentDocument!==m&&(o?y=o(m.uri,p):y=m.uri.toString());const v=this.astNodeLocator.getAstNodePath(p);return{$ref:`${y}#${v}`,$refText:g}}else return{$error:(h=(u=r.error)==null?void 0:u.message)!=null?h:"Could not resolve reference",$refText:g}}else if(fd(r)){const p=n?r.$refText:void 0,g=[];for(const m of r.items){const y=m.ref,v=Ju(m.ref);let b="";this.currentDocument&&this.currentDocument!==v&&(o?b=o(v.uri,y):b=v.uri.toString());const w=this.astNodeLocator.getAstNodePath(y);g.push(`${b}#${w}`)}return{$refs:g,$refText:p}}else if(ts(r)){let p;if(i&&(p=this.addAstNodeRegionWithAssignmentsTo(X({},r)),(!e||r.$document)&&(p!=null&&p.$textRegion)&&(p.$textRegion.documentURI=(d=this.currentDocument)==null?void 0:d.uri.toString())),a&&!e&&(p!=null||(p=X({},r)),p.$sourceText=(f=r.$cstNode)==null?void 0:f.text),s){p!=null||(p=X({},r));const g=this.commentProvider.getComment(r);g&&(p.$comment=g.replace(/\r/g,""))}return p!=null?p:r}else return r}addAstNodeRegionWithAssignmentsTo(e){const r=F(n=>({offset:n.offset,end:n.end,length:n.length,range:n.range}),"createDocumentSegment");if(e.$cstNode){const n=e.$textRegion=r(e.$cstNode),a=n.assignments={};return Object.keys(e).filter(i=>!i.startsWith("$")).forEach(i=>{const s=BX(e.$cstNode,i).map(r);s.length!==0&&(a[i]=s)}),e}}linkNode(e,r,n,a,i,s){for(const[u,h]of Object.entries(e))if(Array.isArray(h))for(let d=0;d<h.length;d++){const f=h[d];JQ(f)?h[d]=this.reviveReference(e,u,r,f,n):ts(f)&&this.linkNode(f,r,n,e,u,d)}else JQ(h)?e[u]=this.reviveReference(e,u,r,h,n):ts(h)&&this.linkNode(h,r,n,e,u);const o=e;o.$container=a,o.$containerProperty=i,o.$containerIndex=s}reviveReference(e,r,n,a,i){let s=a.$refText,o=a.$error,u;if(a.$ref){const h=this.getRefNode(n,a.$ref,i.uriConverter);if(ts(h))return s||(s=this.nameProvider.getName(h)),{$refText:s!=null?s:"",ref:h};o=h}else if(a.$refs){const h=[];for(const d of a.$refs){const f=this.getRefNode(n,d,i.uriConverter);ts(f)&&h.push({ref:f})}if(h.length===0)u={$refText:s!=null?s:"",items:h},o!=null||(o="Could not resolve multi-reference");else return{$refText:s!=null?s:"",items:h}}if(o)return u!=null||(u={$refText:s!=null?s:"",ref:void 0}),u.error={info:{container:e,property:r,reference:u},message:o},u}getRefNode(e,r,n){try{const a=r.indexOf("#");if(a===0){const u=this.astNodeLocator.getAstNode(e,r.substring(1));return u||"Could not resolve path: "+r}if(a<0){const u=n?n(r):Mc.parse(r),h=this.langiumDocuments.getDocument(u);return h?h.parseResult.value:"Could not find document for URI: "+r}const i=n?n(r.substring(0,a)):Mc.parse(r.substring(0,a)),s=this.langiumDocuments.getDocument(i);if(!s)return"Could not find document for URI: "+r;if(a===r.length-1)return s.parseResult.value;const o=this.astNodeLocator.getAstNode(s.parseResult.value,r.substring(a+1));return o||"Could not resolve URI: "+r}catch(a){return String(a)}}},l(P2,"DefaultJsonSerializer"),F(P2,"DefaultJsonSerializer"),P2),VDe=(R2=class{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e==null?void 0:e.workspace.TextDocuments}register(e){const r=e.LanguageMetaData;for(const n of r.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(n,e);if(r.fileNames)for(const n of r.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(r.languageId,e)}getServices(e){var s,o,u;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const r=(o=(s=this.textDocuments)==null?void 0:s.get(e))==null?void 0:o.languageId;if(r!==void 0){const h=this.languageIdMap.get(r);if(h)return h}const n=xl.extname(e),a=xl.basename(e),i=(u=this.fileNameMap.get(a))!=null?u:this.fileExtensionMap.get(n);if(!i)throw r?new Error(`The service registry contains no services for the extension '${n}' for language '${r}'.`):new Error(`The service registry contains no services for the extension '${n}'.`);return i}hasServices(e){try{return this.getServices(e),!0}catch(r){return!1}}get all(){return Array.from(this.languageIdMap.values())}},l(R2,"DefaultServiceRegistry"),F(R2,"DefaultServiceRegistry"),R2);function ry(t){return{code:t}}l(ry,"diagnosticData"),F(ry,"diagnosticData");var ZM;(function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults})(ZM||(ZM={}));var GDe=(O2=class{constructor(e){this.entries=new Zf,this.knownCategories=new Set(ZM.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,r=this,n="fast"){if(n==="built-in")throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(n);for(const[a,i]of Object.entries(e)){const s=i;if(Array.isArray(s))for(const o of s){const u={check:this.wrapValidationException(o,r),category:n};this.addEntry(a,u)}else if(typeof s=="function"){const o={check:this.wrapValidationException(s,r),category:n};this.addEntry(a,o)}else qp()}}wrapValidationException(e,r){return(n,a,i)=>nt(this,null,function*(){yield this.handleException(()=>e.call(r,n,a,i),"An error occurred during validation",a,n)})}handleException(e,r,n,a){return nt(this,null,function*(){try{yield e()}catch(i){if(ey(i))throw i;console.error(`${r}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);const s=i instanceof Error?i.message:String(i);n("error",`${r}: ${s}`,{node:a})}})}addEntry(e,r){if(e==="AstNode"){this.entries.add("AstNode",r);return}for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,r)}getChecks(e,r){let n=da(this.entries.get(e)).concat(this.entries.get("AstNode"));return r&&(n=n.filter(a=>r.includes(a.category))),n.map(a=>a.check)}registerBeforeDocument(e,r=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",r))}registerAfterDocument(e,r=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",r))}wrapPreparationException(e,r,n){return(a,i,s,o)=>nt(this,null,function*(){yield this.handleException(()=>e.call(n,a,i,s,o),r,i,a)})}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},l(O2,"ValidationRegistry"),F(O2,"ValidationRegistry"),O2),qDe=Object.freeze({validateNode:!0,validateChildren:!0}),YDe=(D2=class{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}validateDocument(a){return nt(this,arguments,function*(e,r={},n=Oa.CancellationToken.None){const i=e.parseResult,s=[];if(yield Ws(n),(!r.categories||r.categories.includes("built-in"))&&(this.processLexingErrors(i,s,r),r.stopAfterLexingErrors&&s.some(o=>{var u;return((u=o.data)==null?void 0:u.code)===fu.LexingError})||(this.processParsingErrors(i,s,r),r.stopAfterParsingErrors&&s.some(o=>{var u;return((u=o.data)==null?void 0:u.code)===fu.ParsingError}))||(this.processLinkingErrors(e,s,r),r.stopAfterLinkingErrors&&s.some(o=>{var u;return((u=o.data)==null?void 0:u.code)===fu.LinkingError}))))return s;try{s.push(...yield this.validateAst(i.value,r,n))}catch(o){if(ey(o))throw o;console.error("An error occurred during validation:",o)}return yield Ws(n),s})}processLexingErrors(e,r,n){var i,s,o;const a=[...e.lexerErrors,...(s=(i=e.lexerReport)==null?void 0:i.diagnostics)!=null?s:[]];for(const u of a){const h=(o=u.severity)!=null?o:"error",d={severity:J_(h),range:{start:{line:u.line-1,character:u.column-1},end:{line:u.line-1,character:u.column+u.length-1}},message:u.message,data:tJ(h),source:this.getSource()};r.push(d)}}processParsingErrors(e,r,n){for(const a of e.parserErrors){let i;if(isNaN(a.token.startOffset)){if("previousToken"in a){const s=a.previousToken;if(isNaN(s.startOffset)){const o={line:0,character:0};i={start:o,end:o}}else{const o={line:s.endLine-1,character:s.endColumn};i={start:o,end:o}}}}else i=l_(a.token);if(i){const s={severity:J_("error"),range:i,message:a.message,data:ry(fu.ParsingError),source:this.getSource()};r.push(s)}}}processLinkingErrors(e,r,n){var a;for(const i of e.references){const s=i.error;if(s){const o={node:s.info.container,range:(a=i.$refNode)==null?void 0:a.range,property:s.info.property,index:s.info.index,data:{code:fu.LinkingError,containerType:s.info.container.$type,property:s.info.property,refText:s.info.reference.$refText}};r.push(this.toDiagnostic("error",s.message,o))}}}validateAst(a,i){return nt(this,arguments,function*(e,r,n=Oa.CancellationToken.None){const s=[],o=F((u,h,d)=>{s.push(this.toDiagnostic(u,h,d))},"acceptor");return yield this.validateAstBefore(e,r,o,n),yield this.validateAstNodes(e,r,o,n),yield this.validateAstAfter(e,r,o,n),s})}validateAstBefore(i,s,o){return nt(this,arguments,function*(e,r,n,a=Oa.CancellationToken.None){var h;const u=this.validationRegistry.checksBefore;for(const d of u)yield Ws(a),yield d(e,n,(h=r.categories)!=null?h:[],a)})}validateAstNodes(i,s,o){return nt(this,arguments,function*(e,r,n,a=Oa.CancellationToken.None){var u;if((u=this.profiler)!=null&&u.isActive("validating")){const h=this.profiler.createTask("validating",this.languageId);h.start();try{const d=eh(e).iterator();for(const f of d){h.startSubTask(f.$type);const p=this.validateSingleNodeOptions(f,r);if(p.validateNode)try{const g=this.validationRegistry.getChecks(f.$type,r.categories);for(const m of g)yield m(f,n,a)}finally{h.stopSubTask(f.$type)}p.validateChildren||d.prune()}}finally{h.stop()}}else{const h=eh(e).iterator();for(const d of h){yield Ws(a);const f=this.validateSingleNodeOptions(d,r);if(f.validateNode){const p=this.validationRegistry.getChecks(d.$type,r.categories);for(const g of p)yield g(d,n,a)}f.validateChildren||h.prune()}}})}validateSingleNodeOptions(e,r){return qDe}validateAstAfter(i,s,o){return nt(this,arguments,function*(e,r,n,a=Oa.CancellationToken.None){var h;const u=this.validationRegistry.checksAfter;for(const d of u)yield Ws(a),yield d(e,n,(h=r.categories)!=null?h:[],a)})}toDiagnostic(e,r,n){return{message:r,range:eJ(n),severity:J_(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},l(D2,"DefaultDocumentValidator"),F(D2,"DefaultDocumentValidator"),D2);function eJ(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=_$(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=zX(t.node.$cstNode,t.keyword,t.index)),e!=null||(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}l(eJ,"getDiagnosticRange"),F(eJ,"getDiagnosticRange");function J_(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}l(J_,"toDiagnosticSeverity"),F(J_,"toDiagnosticSeverity");function tJ(t){switch(t){case"error":return ry(fu.LexingError);case"warning":return ry(fu.LexingWarning);case"info":return ry(fu.LexingInfo);case"hint":return ry(fu.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}l(tJ,"toDiagnosticData"),F(tJ,"toDiagnosticData");var fu;(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(fu||(fu={}));var UDe=(F2=class{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,r,n){const a=n!=null?n:Ju(e);r!=null||(r=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!r)throw new Error(`Node at path ${i} has no name.`);let s;const o=F(()=>{var u;return s!=null?s:s=gE((u=this.nameProvider.getNameNode(e))!=null?u:e.$cstNode)},"nameSegmentGetter");return{node:e,name:r,get nameSegment(){return o()},selectionSegment:gE(e.$cstNode),type:e.$type,documentUri:a.uri,path:i}}},l(F2,"DefaultAstNodeDescriptionProvider"),F(F2,"DefaultAstNodeDescriptionProvider"),F2),jDe=(B2=class{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}createDescriptions(n){return nt(this,arguments,function*(e,r=Oa.CancellationToken.None){const a=[],i=e.parseResult.value;for(const s of eh(i))yield Ws(r),iE(s).forEach(o=>{o.reference.error||a.push(...this.createInfoDescriptions(o))});return a})}createInfoDescriptions(e){const r=e.reference;if(r.error||!r.$refNode)return[];let n=[];dl(r)&&r.$nodeDescription?n=[r.$nodeDescription]:fd(r)&&(n=r.items.map(u=>u.$nodeDescription).filter(u=>u!==void 0));const a=Ju(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),s=[],o=gE(r.$refNode);for(const u of n)s.push({sourceUri:a,sourcePath:i,targetUri:u.documentUri,targetPath:u.path,segment:o,local:xl.equals(u.documentUri,a)});return s}},l(B2,"DefaultReferenceDescriptionProvider"),F(B2,"DefaultReferenceDescriptionProvider"),B2),KDe=(z2=class{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const r=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return r+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:r}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return r!==void 0?e+this.indexSeparator+r:e}getAstNode(e,r){return r.split(this.segmentSeparator).reduce((a,i)=>{if(!a||i.length===0)return a;const s=i.indexOf(this.indexSeparator);if(s>0){const o=i.substring(0,s),u=parseInt(i.substring(s+1)),h=a[o];return h==null?void 0:h[u]}return a[i]},e)}},l(z2,"DefaultAstNodeLocator"),F(z2,"DefaultAstNodeLocator"),z2),QM={};DL(QM,Wj(JT()));var XDe=(H2=class{constructor(e){this._ready=new Xf,this.onConfigurationSectionUpdateEmitter=new QM.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var r,n;this.workspaceConfig=(n=(r=e.capabilities.workspace)==null?void 0:r.configuration)!=null?n:!1}initialized(e){return nt(this,null,function*(){if(this.workspaceConfig){if(e.register){const r=this.serviceRegistry.all;e.register({section:r.map(n=>this.toSectionName(n.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const r=this.serviceRegistry.all.map(a=>({section:this.toSectionName(a.LanguageMetaData.languageId)})),n=yield e.fetchConfiguration(r);r.forEach((a,i)=>{this.updateSectionConfiguration(a.section,n[i])})}}this._ready.resolve()})}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([r,n])=>{this.updateSectionConfiguration(r,n),this.onConfigurationSectionUpdateEmitter.fire({section:r,configuration:n})})}updateSectionConfiguration(e,r){this.settings[e]=r}getConfiguration(e,r){return nt(this,null,function*(){yield this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][r]})}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},l(H2,"DefaultConfigurationProvider"),F(H2,"DefaultConfigurationProvider"),H2),JM=Wj(TXt()),ny;(function(t){function e(r){return{dispose:F(()=>nt(this,null,function*(){return yield r()}),"dispose")}}l(e,"create"),F(e,"create"),t.create=e})(ny||(ny={}));var ZDe=(W2=class{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Zf,this.documentPhaseListeners=new Zf,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=yn.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}build(a){return nt(this,arguments,function*(e,r={},n=Oa.CancellationToken.None){var i;for(const s of e){const o=s.uri.toString();if(s.state===yn.Validated){if(typeof r.validation=="boolean"&&r.validation)this.resetToState(s,yn.IndexedReferences);else if(typeof r.validation=="object"){const u=this.findMissingValidationCategories(s,r);u.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:{categories:u}},result:(i=this.buildState.get(o))==null?void 0:i.result}),s.state=yn.IndexedReferences)}}else this.buildState.delete(o)}this.currentState=yn.Changed,yield this.emitUpdate(e.map(s=>s.uri),[]),yield this.buildDocuments(e,r,n)})}update(a,i){return nt(this,arguments,function*(e,r,n=Oa.CancellationToken.None){this.currentState=yn.Changed;const s=[];for(const d of r){const f=this.langiumDocuments.deleteDocuments(d);for(const p of f)s.push(p.uri),this.cleanUpDeleted(p)}const o=(yield Promise.all(e.map(d=>this.findChangedUris(d)))).flat();for(const d of o){let f=this.langiumDocuments.getDocument(d);f===void 0&&(f=this.langiumDocumentFactory.fromModel({$type:"INVALID"},d),f.state=yn.Changed,this.langiumDocuments.addDocument(f)),this.resetToState(f,yn.Changed)}const u=da(o).concat(s).map(d=>d.toString()).toSet();this.langiumDocuments.all.filter(d=>!u.has(d.uri.toString())&&this.shouldRelink(d,u)).forEach(d=>this.resetToState(d,yn.ComputedScopes)),yield this.emitUpdate(o,s),yield Ws(n);const h=this.sortDocuments(this.langiumDocuments.all.filter(d=>{var f;return d.state<yn.Validated||!((f=this.buildState.get(d.uri.toString()))!=null&&f.completed)||this.resultsAreIncomplete(d,this.updateBuildOptions)}).toArray());yield this.buildDocuments(h,this.updateBuildOptions,n)})}resultsAreIncomplete(e,r){return this.findMissingValidationCategories(e,r).length>=1}findMissingValidationCategories(e,r){var o,u,h;const n=this.buildState.get(e.uri.toString()),a=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=(o=n==null?void 0:n.result)!=null&&o.validationChecks?new Set((u=n==null?void 0:n.result)==null?void 0:u.validationChecks):n!=null&&n.completed?a:new Set,s=r===void 0||r.validation===!0?a:typeof r.validation=="object"?(h=r.validation.categories)!=null?h:a:[];return da(s).filter(d=>!i.has(d)).toArray()}findChangedUris(e){return nt(this,null,function*(){var n,a;if((a=this.langiumDocuments.getDocument(e))!=null?a:(n=this.textDocuments)==null?void 0:n.get(e))return[e];try{const i=yield this.fileSystemProvider.stat(e);if(i.isDirectory)return yield this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(i))return[e]}catch(i){}return[]})}emitUpdate(e,r){return nt(this,null,function*(){yield Promise.all(this.updateListeners.map(n=>n(e,r)))})}sortDocuments(e){let r=0,n=e.length-1;for(;r<n;){for(;r<e.length&&this.hasTextDocument(e[r]);)r++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;r<n&&([e[r],e[n]]=[e[n],e[r]])}return e}hasTextDocument(e){var r;return!!((r=this.textDocuments)!=null&&r.get(e.uri))}shouldRelink(e,r){return e.references.some(n=>n.error!==void 0)?!0:this.indexManager.isAffected(e,r)}onUpdate(e){return this.updateListeners.push(e),ny.create(()=>{const r=this.updateListeners.indexOf(e);r>=0&&this.updateListeners.splice(r,1)})}resetToState(e,r){switch(r){case yn.Changed:case yn.Parsed:this.indexManager.removeContent(e.uri);case yn.IndexedContent:e.localSymbols=void 0;case yn.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case yn.Linked:this.indexManager.removeReferences(e.uri);case yn.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case yn.Validated:}e.state>r&&(e.state=r)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=yn.Changed}buildDocuments(e,r,n){return nt(this,null,function*(){this.prepareBuild(e,r),yield this.runCancelable(e,yn.Parsed,n,s=>this.langiumDocumentFactory.update(s,n)),yield this.runCancelable(e,yn.IndexedContent,n,s=>this.indexManager.updateContent(s,n)),yield this.runCancelable(e,yn.ComputedScopes,n,s=>nt(this,null,function*(){const o=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.localSymbols=yield o.collectLocalSymbols(s,n)}));const a=e.filter(s=>this.shouldLink(s));yield this.runCancelable(a,yn.Linked,n,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,n)),yield this.runCancelable(a,yn.IndexedReferences,n,s=>this.indexManager.updateReferences(s,n));const i=e.filter(s=>this.shouldValidate(s)?!0:(this.markAsCompleted(s),!1));yield this.runCancelable(i,yn.Validated,n,s=>nt(this,null,function*(){yield this.validate(s,n),this.markAsCompleted(s)}))})}markAsCompleted(e){const r=this.buildState.get(e.uri.toString());r&&(r.completed=!0)}prepareBuild(e,r){for(const n of e){const a=n.uri.toString(),i=this.buildState.get(a);(!i||i.completed)&&this.buildState.set(a,{completed:!1,options:r,result:i==null?void 0:i.result})}}runCancelable(e,r,n,a){return nt(this,null,function*(){for(const s of e)s.state<r&&(yield Ws(n),yield a(s),s.state=r,yield this.notifyDocumentPhase(s,r,n));const i=e.filter(s=>s.state===r);yield this.notifyBuildPhase(i,r,n),this.currentState=r})}onBuildPhase(e,r){return this.buildPhaseListeners.add(e,r),ny.create(()=>{this.buildPhaseListeners.delete(e,r)})}onDocumentPhase(e,r){return this.documentPhaseListeners.add(e,r),ny.create(()=>{this.documentPhaseListeners.delete(e,r)})}waitUntil(e,r,n){let a;return r&&"path"in r?a=r:n=r,n!=null||(n=Oa.CancellationToken.None),a?this.awaitDocumentState(e,a,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,r,n){const a=this.langiumDocuments.getDocument(r);if(a){if(a.state>=e)return Promise.resolve(r);if(n.isCancellationRequested)return Promise.reject(Cd);if(this.currentState>=e&&e>a.state)return Promise.reject(new JM.ResponseError(JM.LSPErrorCodes.RequestFailed,`Document state of ${r.toString()} is ${yn[a.state]}, requiring ${yn[e]}, but workspace state is already ${yn[this.currentState]}. Returning undefined.`))}else return Promise.reject(new JM.ResponseError(JM.LSPErrorCodes.ServerCancelled,`No document found for URI: ${r.toString()}`));return new Promise((i,s)=>{const o=this.onDocumentPhase(e,h=>{xl.equals(h.uri,r)&&(o.dispose(),u.dispose(),i(h.uri))}),u=n.onCancellationRequested(()=>{o.dispose(),u.dispose(),s(Cd)})})}awaitBuilderState(e,r){return this.currentState>=e?Promise.resolve():r.isCancellationRequested?Promise.reject(Cd):new Promise((n,a)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),s.dispose(),n()}),s=r.onCancellationRequested(()=>{i.dispose(),s.dispose(),a(Cd)})})}notifyDocumentPhase(e,r,n){return nt(this,null,function*(){const i=this.documentPhaseListeners.get(r).slice();for(const s of i)try{yield Ws(n),yield s(e,n)}catch(o){if(!ey(o))throw o}})}notifyBuildPhase(e,r,n){return nt(this,null,function*(){if(e.length===0)return;const i=this.buildPhaseListeners.get(r).slice();for(const s of i)yield Ws(n),yield s(e,n)})}shouldLink(e){var r;return(r=this.getBuildOptions(e).eagerLinking)!=null?r:!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}validate(e,r){return nt(this,null,function*(){var u;const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e),i=typeof a.validation=="object"?X({},a.validation):{};i.categories=this.findMissingValidationCategories(e,a);const s=yield n.validateDocument(e,i,r);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;const o=this.buildState.get(e.uri.toString());o&&((u=o.result)!=null||(o.result={}),o.result.validationChecks?o.result.validationChecks=da(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])})}getBuildOptions(e){var r,n;return(n=(r=this.buildState.get(e.uri.toString()))==null?void 0:r.options)!=null?n:{}}},l(W2,"DefaultDocumentBuilder"),F(W2,"DefaultDocumentBuilder"),W2),QDe=(V2=class{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new XM,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,r){const n=Ju(e).uri,a=[];return this.referenceIndex.forEach(i=>{i.forEach(s=>{xl.equals(s.targetUri,n)&&s.targetPath===r&&a.push(s)})}),da(a)}allElements(e,r){let n=da(this.symbolIndex.keys());return r&&(n=n.filter(a=>!r||r.has(a))),n.map(a=>this.getFileDescriptions(a,e)).flat()}getFileDescriptions(e,r){var a;return r?this.symbolByTypeIndex.get(e,r,()=>{var s;return((s=this.symbolIndex.get(e))!=null?s:[]).filter(o=>this.astReflection.isSubtype(o.type,r))}):(a=this.symbolIndex.get(e))!=null?a:[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const r=e.toString();this.symbolIndex.delete(r),this.symbolByTypeIndex.clear(r)}removeReferences(e){const r=e.toString();this.referenceIndex.delete(r)}updateContent(n){return nt(this,arguments,function*(e,r=Oa.CancellationToken.None){const i=yield this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,r),s=e.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)})}updateReferences(n){return nt(this,arguments,function*(e,r=Oa.CancellationToken.None){const i=yield this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,r);this.referenceIndex.set(e.uri.toString(),i)})}isAffected(e,r){const n=this.referenceIndex.get(e.uri.toString());return n?n.some(a=>!a.local&&r.has(a.targetUri.toString())):!1}},l(V2,"DefaultIndexManager"),F(V2,"DefaultIndexManager"),V2),JDe=(G2=class{constructor(e){this.initialBuildOptions={},this._ready=new Xf,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){var r;this.folders=(r=e.workspaceFolders)!=null?r:void 0}initialized(e){return this.mutex.write(r=>{var n;return this.initializeWorkspace((n=this.folders)!=null?n:[],r)})}initializeWorkspace(n){return nt(this,arguments,function*(e,r=Oa.CancellationToken.None){const a=yield this.performStartup(e);yield Ws(r),yield this.documentBuilder.build(a,this.initialBuildOptions,r)})}performStartup(e){return nt(this,null,function*(){const r=[],n=F(s=>{r.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)},"collector");yield this.loadAdditionalDocuments(e,n);const a=[];yield Promise.all(e.map(s=>this.getRootFolder(s)).map(s=>nt(this,null,function*(){return this.traverseFolder(s,a)})));const i=da(a).distinct(s=>s.toString()).filter(s=>!this.langiumDocuments.hasDocument(s));return yield this.loadWorkspaceDocuments(i,n),this._ready.resolve(),r})}loadWorkspaceDocuments(e,r){return nt(this,null,function*(){yield Promise.all(e.map(n=>nt(this,null,function*(){const a=yield this.langiumDocuments.getOrCreateDocument(n);r(a)})))})}loadAdditionalDocuments(e,r){return Promise.resolve()}getRootFolder(e){return Mc.parse(e.uri)}traverseFolder(e,r){return nt(this,null,function*(){try{const n=yield this.fileSystemProvider.readDirectory(e);yield Promise.all(n.map(a=>nt(this,null,function*(){this.shouldIncludeEntry(a)&&(a.isDirectory?yield this.traverseFolder(a.uri,r):a.isFile&&r.push(a.uri))})))}catch(n){console.error("Failure to read directory content of "+e.toString(!0),n)}})}searchFolder(e){return nt(this,null,function*(){const r=[];return yield this.traverseFolder(e,r),r})}shouldIncludeEntry(e){const r=xl.basename(e.uri);return r.startsWith(".")?!1:e.isDirectory?r!=="node_modules"&&r!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},l(G2,"DefaultWorkspaceManager"),F(G2,"DefaultWorkspaceManager"),G2),eFe=(q2=class{buildUnexpectedCharactersMessage(e,r,n,a,i){return PZ.buildUnexpectedCharactersMessage(e,r,n,a,i)}buildUnableToPopLexerModeMessage(e){return PZ.buildUnableToPopLexerModeMessage(e)}},l(q2,"DefaultLexerErrorMessageProvider"),F(q2,"DefaultLexerErrorMessageProvider"),q2),rJ={mode:"full"},nJ=(Y2=class{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const r=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(r);const n=rP(r)?Object.values(r):r,a=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new yl(n,{positionTracking:"full",skipValidations:a,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,r=rJ){var a,i,s;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:(a=n.groups.hidden)!=null?a:[],report:(s=(i=this.tokenBuilder).flushLexingReport)==null?void 0:s.call(i,e)}}toTokenTypeDictionary(e){if(rP(e))return e;const r=tP(e)?Object.values(e.modes).flat():e,n={};return r.forEach(a=>n[a.name]=a),n}},l(Y2,"DefaultLexer"),F(Y2,"DefaultLexer"),Y2);function eP(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}l(eP,"isTokenTypeArray"),F(eP,"isTokenTypeArray");function tP(t){return t&&"modes"in t&&"defaultMode"in t}l(tP,"isIMultiModeLexerDefinition"),F(tP,"isIMultiModeLexerDefinition");function rP(t){return!eP(t)&&!tP(t)}l(rP,"isTokenTypeDictionary"),F(rP,"isTokenTypeDictionary"),j5();function aJ(t,e,r){let n,a;typeof t=="string"?(a=e,n=r):(a=t.range.start,n=e),a||(a=Jn.create(0,0));const i=sJ(t),s=aP(n),o=rFe({lines:i,position:a,options:s});return iFe({index:0,tokens:o,position:a})}l(aJ,"parseJSDoc"),F(aJ,"parseJSDoc");function iJ(t,e){const r=aP(e),n=sJ(t);if(n.length===0)return!1;const a=n[0],i=n[n.length-1],s=r.start,o=r.end;return!!(s!=null&&s.exec(a))&&!!(o!=null&&o.exec(i))}l(iJ,"isJSDoc"),F(iJ,"isJSDoc");function sJ(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(B8e)}l(sJ,"getLines"),F(sJ,"getLines");var tFe=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,qor=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function rFe(t){var a,i,s;const e=[];let r=t.position.line,n=t.position.character;for(let o=0;o<t.lines.length;o++){const u=o===0,h=o===t.lines.length-1;let d=t.lines[o],f=0;if(u&&t.options.start){const g=(a=t.options.start)==null?void 0:a.exec(d);g&&(f=g.index+g[0].length)}else{const g=(i=t.options.line)==null?void 0:i.exec(d);g&&(f=g.index+g[0].length)}if(h){const g=(s=t.options.end)==null?void 0:s.exec(d);g&&(d=d.substring(0,g.index))}if(d=d.substring(0,aFe(d)),nP(d,f)>=d.length){if(e.length>0){const g=Jn.create(r,n);e.push({type:"break",content:"",range:Nn.create(g,g)})}}else{tFe.lastIndex=f;const g=tFe.exec(d);if(g){const m=g[0],y=g[1],v=Jn.create(r,n+f),b=Jn.create(r,n+f+m.length);e.push({type:"tag",content:y,range:Nn.create(v,b)}),f+=m.length,f=nP(d,f)}if(f<d.length){const m=d.substring(f),y=Array.from(m.matchAll(qor));e.push(...nFe(y,m,r,n+f))}}r++,n=0}return e.length>0&&e[e.length-1].type==="break"?e.slice(0,-1):e}l(rFe,"tokenize"),F(rFe,"tokenize");function nFe(t,e,r,n){const a=[];if(t.length===0){const i=Jn.create(r,n),s=Jn.create(r,n+e.length);a.push({type:"text",content:e,range:Nn.create(i,s)})}else{let i=0;for(const o of t){const u=o.index,h=e.substring(i,u);h.length>0&&a.push({type:"text",content:e.substring(i,u),range:Nn.create(Jn.create(r,i+n),Jn.create(r,u+n))});let d=h.length+1;const f=o[1];if(a.push({type:"inline-tag",content:f,range:Nn.create(Jn.create(r,i+d+n),Jn.create(r,i+d+f.length+n))}),d+=f.length,o.length===4){d+=o[2].length;const p=o[3];a.push({type:"text",content:p,range:Nn.create(Jn.create(r,i+d+n),Jn.create(r,i+d+p.length+n))})}else a.push({type:"text",content:"",range:Nn.create(Jn.create(r,i+d+n),Jn.create(r,i+d+n))});i=u+o[0].length}const s=e.substring(i);s.length>0&&a.push({type:"text",content:s,range:Nn.create(Jn.create(r,i+n),Jn.create(r,i+n+s.length))})}return a}l(nFe,"buildInlineTokens"),F(nFe,"buildInlineTokens");var Yor=/\S/,Uor=/\s*$/;function nP(t,e){const r=t.substring(e).match(Yor);return r?e+r.index:t.length}l(nP,"skipWhitespace"),F(nP,"skipWhitespace");function aFe(t){const e=t.match(Uor);if(e&&typeof e.index=="number")return e.index}l(aFe,"lastCharacter"),F(aFe,"lastCharacter");function iFe(t){var i,s,o,u;const e=Jn.create(t.position.line,t.position.character);if(t.tokens.length===0)return new cFe([],Nn.create(e,e));const r=[];for(;t.index<t.tokens.length;){const h=sFe(t,r[r.length-1]);h&&r.push(h)}const n=(s=(i=r[0])==null?void 0:i.range.start)!=null?s:e,a=(u=(o=r[r.length-1])==null?void 0:o.range.end)!=null?u:e;return new cFe(r,Nn.create(n,a))}l(iFe,"parseJSDocComment"),F(iFe,"parseJSDocComment");function sFe(t,e){const r=t.tokens[t.index];if(r.type==="tag")return lJ(t,!1);if(r.type==="text"||r.type==="inline-tag")return oJ(t);oFe(r,e),t.index++}l(sFe,"parseJSDocElement"),F(sFe,"parseJSDocElement");function oFe(t,e){if(e){const r=new dFe("",t.range);"inlines"in e?e.inlines.push(r):e.content.inlines.push(r)}}l(oFe,"appendEmptyLine"),F(oFe,"appendEmptyLine");function oJ(t){let e=t.tokens[t.index];const r=e;let n=e;const a=[];for(;e&&e.type!=="break"&&e.type!=="tag";)a.push(lFe(t)),n=e,e=t.tokens[t.index];return new hJ(a,Nn.create(r.range.start,n.range.end))}l(oJ,"parseJSDocText"),F(oJ,"parseJSDocText");function lFe(t){return t.tokens[t.index].type==="inline-tag"?lJ(t,!0):cJ(t)}l(lFe,"parseJSDocInline"),F(lFe,"parseJSDocInline");function lJ(t,e){const r=t.tokens[t.index++],n=r.content.substring(1),a=t.tokens[t.index];if((a==null?void 0:a.type)==="text")if(e){const i=cJ(t);return new uJ(n,new hJ([i],i.range),e,Nn.create(r.range.start,i.range.end))}else{const i=oJ(t);return new uJ(n,i,e,Nn.create(r.range.start,i.range.end))}else{const i=r.range;return new uJ(n,new hJ([],i),e,i)}}l(lJ,"parseJSDocTag"),F(lJ,"parseJSDocTag");function cJ(t){const e=t.tokens[t.index++];return new dFe(e.content,e.range)}l(cJ,"parseJSDocLine"),F(cJ,"parseJSDocLine");function aP(t){if(!t)return aP({start:"/**",end:"*/",line:"*"});const{start:e,end:r,line:n}=t;return{start:iP(e,!0),end:iP(r,!1),line:iP(n,!0)}}l(aP,"normalizeOptions"),F(aP,"normalizeOptions");function iP(t,e){if(typeof t=="string"||typeof t=="object"){const r=typeof t=="string"?yE(t):t.source;return e?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}else return t}l(iP,"normalizeOption"),F(iP,"normalizeOption");var cFe=(U2=class{constructor(e,r){this.elements=e,this.range=r}getTag(e){return this.getAllTags().find(r=>r.name===e)}getTags(e){return this.getAllTags().filter(r=>r.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const r of this.elements)if(e.length===0)e=r.toString();else{const n=r.toString();e+=dJ(e)+n}return e.trim()}toMarkdown(e){let r="";for(const n of this.elements)if(r.length===0)r=n.toMarkdown(e);else{const a=n.toMarkdown(e);r+=dJ(r)+a}return r.trim()}},l(U2,"JSDocCommentImpl"),F(U2,"JSDocCommentImpl"),U2),uJ=(j2=class{constructor(e,r,n,a){this.name=e,this.content=r,this.inline=n,this.range=a}toString(){let e=`@${this.name}`;const r=this.content.toString();return this.content.inlines.length===1?e=`${e} ${r}`:this.content.inlines.length>1&&(e=`${e}
|
||
${r}`),this.inline?`{${e}}`:e}toMarkdown(e){var r,n;return(n=(r=e==null?void 0:e.renderTag)==null?void 0:r.call(e,this))!=null?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){const r=this.content.toMarkdown(e);if(this.inline){const i=uFe(this.name,r,e!=null?e:{});if(typeof i=="string")return i}let n="";(e==null?void 0:e.tag)==="italic"||(e==null?void 0:e.tag)===void 0?n="*":(e==null?void 0:e.tag)==="bold"?n="**":(e==null?void 0:e.tag)==="bold-italic"&&(n="***");let a=`${n}@${this.name}${n}`;return this.content.inlines.length===1?a=`${a} — ${r}`:this.content.inlines.length>1&&(a=`${a}
|
||
${r}`),this.inline?`{${a}}`:a}},l(j2,"JSDocTagImpl"),F(j2,"JSDocTagImpl"),j2);function uFe(t,e,r){var n,a;if(t==="linkplain"||t==="linkcode"||t==="link"){const i=e.indexOf(" ");let s=e;if(i>0){const u=nP(e,i);s=e.substring(u),e=e.substring(0,i)}return(t==="linkcode"||t==="link"&&r.link==="code")&&(s=`\`${s}\``),(a=(n=r.renderLink)==null?void 0:n.call(r,e,s))!=null?a:hFe(e,s)}}l(uFe,"renderInlineTag"),F(uFe,"renderInlineTag");function hFe(t,e){try{return Mc.parse(t,!0),`[${e}](${t})`}catch(r){return t}}l(hFe,"renderLinkDefault"),F(hFe,"renderLinkDefault");var hJ=(K2=class{constructor(e,r){this.inlines=e,this.range=r}toString(){let e="";for(let r=0;r<this.inlines.length;r++){const n=this.inlines[r],a=this.inlines[r+1];e+=n.toString(),a&&a.range.start.line>n.range.start.line&&(e+=`
|
||
`)}return e}toMarkdown(e){let r="";for(let n=0;n<this.inlines.length;n++){const a=this.inlines[n],i=this.inlines[n+1];r+=a.toMarkdown(e),i&&i.range.start.line>a.range.start.line&&(r+=`
|
||
`)}return r}},l(K2,"JSDocTextImpl"),F(K2,"JSDocTextImpl"),K2),dFe=(X2=class{constructor(e,r){this.text=e,this.range=r}toString(){return this.text}toMarkdown(){return this.text}},l(X2,"JSDocLineImpl"),F(X2,"JSDocLineImpl"),X2);function dJ(t){return t.endsWith(`
|
||
`)?`
|
||
`:`
|
||
|
||
`}l(dJ,"fillNewlines"),F(dJ,"fillNewlines");var fFe=(Z2=class{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const r=this.commentProvider.getComment(e);if(r&&iJ(r))return aJ(r).toMarkdown({renderLink:F((a,i)=>this.documentationLinkRenderer(e,a,i),"renderLink"),renderTag:F(a=>this.documentationTagRenderer(e,a),"renderTag")})}documentationLinkRenderer(e,r,n){var i;const a=(i=this.findNameInLocalSymbols(e,r))!=null?i:this.findNameInGlobalScope(e,r);if(a&&a.nameSegment){const s=a.nameSegment.range.start.line+1,o=a.nameSegment.range.start.character+1,u=a.documentUri.with({fragment:`L${s},${o}`});return`[${n}](${u.toString()})`}else return}documentationTagRenderer(e,r){}findNameInLocalSymbols(e,r){const a=Ju(e).localSymbols;if(!a)return;let i=e;do{const o=a.getStream(i).find(u=>u.name===r);if(o)return o;i=i.$container}while(i)}findNameInGlobalScope(e,r){return this.indexManager.allElements().find(a=>a.name===r)}},l(Z2,"JSDocDocumentationProvider"),F(Z2,"JSDocDocumentationProvider"),Z2),pFe=(Q2=class{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var r;return QQ(e)?e.$comment:(r=TX(e.$cstNode,this.grammarConfig().multilineCommentRules))==null?void 0:r.text}},l(Q2,"DefaultCommentProvider"),F(Q2,"DefaultCommentProvider"),Q2),gFe=(J2=class{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,r){return Promise.resolve(this.syncParser.parse(e))}},l(J2,"DefaultAsyncParser"),F(J2,"DefaultAsyncParser"),J2),jor=(eb=class{constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){const e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){const r=this.queue.shift();r&&(e.lock(),r.resolve(e))}}),this.workerPool.push(e)}}parse(e,r){return nt(this,null,function*(){const n=yield this.acquireParserWorker(r),a=new Xf;let i;const s=r.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(o=>{const u=this.hydrator.hydrate(o);a.resolve(u)}).catch(o=>{a.reject(o)}).finally(()=>{s.dispose(),clearTimeout(i)}),a.promise})}terminateWorker(e){e.terminate();const r=this.workerPool.indexOf(e);r>=0&&this.workerPool.splice(r,1)}acquireParserWorker(e){return nt(this,null,function*(){this.initializeWorkers();for(const n of this.workerPool)if(n.ready)return n.lock(),n;const r=new Xf;return e.onCancellationRequested(()=>{const n=this.queue.indexOf(r);n>=0&&this.queue.splice(n,1),r.reject(Cd)}),this.queue.push(r),r.promise})}},l(eb,"AbstractThreadedAsyncParser"),F(eb,"AbstractThreadedAsyncParser"),eb),Kor=(tb=class{get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,r,n,a){this.onReadyEmitter=new QM.Emitter,this.deferred=new Xf,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=a,r(i=>{const s=i;this.deferred.resolve(s),this.unlock()}),n(i=>{this.deferred.reject(i),this.unlock()})}terminate(){this.deferred.reject(Cd),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Xf,this.sendMessage(e),this.deferred.promise}},l(tb,"ParserWorker"),F(tb,"ParserWorker"),tb),mFe=(rb=class{constructor(){this.previousTokenSource=new Oa.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const r=qM();return this.previousTokenSource=r,this.enqueue(this.writeQueue,e,r.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,r,n=Oa.CancellationToken.None){const a=new Xf,i={action:r,deferred:a,cancellationToken:n};return e.push(i),this.performNextOperation(),a.promise}performNextOperation(){return nt(this,null,function*(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,yield Promise.all(e.map(i=>nt(this,[i],function*({action:r,deferred:n,cancellationToken:a}){try{const s=yield Promise.resolve().then(()=>r(a));n.resolve(s)}catch(s){ey(s)?n.resolve(void 0):n.reject(s)}}))),this.done=!0,this.performNextOperation()})}cancelWrite(){this.previousTokenSource.cancel()}},l(rb,"DefaultWorkspaceLock"),F(rb,"DefaultWorkspaceLock"),rb),yFe=(nb=class{constructor(e){this.grammarElementIdMap=new jM,this.tokenTypeIdMap=new jM,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(r=>Ne(X({},r),{message:r.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const r=new Map,n=new Map;for(const a of eh(e))r.set(a,{});if(e.$cstNode)for(const a of pE(e.$cstNode))n.set(a,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,r){const n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,r));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){const s=[];n[a]=s;for(const o of i)ts(o)?s.push(this.dehydrateAstNode(o,r)):dl(o)?s.push(this.dehydrateReference(o,r)):s.push(o)}else ts(i)?n[a]=this.dehydrateAstNode(i,r):dl(i)?n[a]=this.dehydrateReference(i,r):i!==void 0&&(n[a]=i);return n}dehydrateReference(e,r){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=r.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,r){const n=r.cstNodes.get(e);return UL(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=r.astNodes.get(e.astNode),Rf(e)?n.content=e.content.map(a=>this.dehydrateCstNode(a,r)):p1(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const r=e.value,n=this.createHydrationContext(r);return"$cstNode"in r&&this.hydrateCstNode(r.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(r,n)}}createHydrationContext(e){const r=new Map,n=new Map;for(const i of eh(e))r.set(i,{});let a;if(e.$cstNode)for(const i of pE(e.$cstNode)){let s;"fullText"in i?(s=new PQ(i.fullText),a=s):"content"in i?s=new OM:"tokenType"in i&&(s=this.hydrateCstLeafNode(i)),s&&(n.set(i,s),s.root=a)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,r){const n=r.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=r.cstNodes.get(e.$cstNode));for(const[a,i]of Object.entries(e))if(!a.startsWith("$"))if(Array.isArray(i)){const s=[];n[a]=s;for(const o of i)ts(o)?s.push(this.setParent(this.hydrateAstNode(o,r),n)):dl(o)?s.push(this.hydrateReference(o,n,a,r)):s.push(o)}else ts(i)?n[a]=this.setParent(this.hydrateAstNode(i,r),n):dl(i)?n[a]=this.hydrateReference(i,n,a,r):i!==void 0&&(n[a]=i);return n}setParent(e,r){return e.$container=r,e}hydrateReference(e,r,n,a){return this.linker.buildReference(r,n,a.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,r,n=0){const a=r.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(a.grammarSource=this.getGrammarElement(e.grammarSource)),a.astNode=r.astNodes.get(e.astNode),Rf(a))for(const i of e.content){const s=this.hydrateCstNode(i,r,n++);a.content.push(s)}return a}hydrateCstLeafNode(e){const r=this.getTokenType(e.tokenType),n=e.offset,a=e.length,i=e.startLine,s=e.startColumn,o=e.endLine,u=e.endColumn,h=e.hidden;return new RM(n,a,{start:{line:i,character:s},end:{line:o,character:u}},r,h)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const r of eh(this.grammar))ZL(r)&&this.grammarElementIdMap.set(r,e++)}},l(nb,"DefaultHydrator"),F(nb,"DefaultHydrator"),nb);function Vs(t){return{documentation:{CommentProvider:F(e=>new pFe(e),"CommentProvider"),DocumentationProvider:F(e=>new fFe(e),"DocumentationProvider")},parser:{AsyncParser:F(e=>new gFe(e),"AsyncParser"),GrammarConfig:F(e=>jX(e),"GrammarConfig"),LangiumParser:F(e=>zQ(e),"LangiumParser"),CompletionParser:F(e=>BQ(e),"CompletionParser"),ValueConverter:F(()=>new WQ,"ValueConverter"),TokenBuilder:F(()=>new WM,"TokenBuilder"),Lexer:F(e=>new nJ(e),"Lexer"),ParserErrorMessageProvider:F(()=>new OQ,"ParserErrorMessageProvider"),LexerErrorMessageProvider:F(()=>new eFe,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:F(()=>new KDe,"AstNodeLocator"),AstNodeDescriptionProvider:F(e=>new UDe(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:F(e=>new jDe(e),"ReferenceDescriptionProvider")},references:{Linker:F(e=>new RDe(e),"Linker"),NameProvider:F(()=>new ODe,"NameProvider"),ScopeProvider:F(e=>new HDe(e),"ScopeProvider"),ScopeComputation:F(e=>new FDe(e),"ScopeComputation"),References:F(e=>new DDe(e),"References")},serializer:{Hydrator:F(e=>new yFe(e),"Hydrator"),JsonSerializer:F(e=>new WDe(e),"JsonSerializer")},validation:{DocumentValidator:F(e=>new YDe(e),"DocumentValidator"),ValidationRegistry:F(e=>new GDe(e),"ValidationRegistry")},shared:F(()=>t.shared,"shared")}}l(Vs,"createDefaultCoreModule"),F(Vs,"createDefaultCoreModule");function Gs(t){return{ServiceRegistry:F(e=>new VDe(e),"ServiceRegistry"),workspace:{LangiumDocuments:F(e=>new PDe(e),"LangiumDocuments"),LangiumDocumentFactory:F(e=>new MDe(e),"LangiumDocumentFactory"),DocumentBuilder:F(e=>new ZDe(e),"DocumentBuilder"),IndexManager:F(e=>new QDe(e),"IndexManager"),WorkspaceManager:F(e=>new JDe(e),"WorkspaceManager"),FileSystemProvider:F(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:F(()=>new mFe,"WorkspaceLock"),ConfigurationProvider:F(e=>new XDe(e),"ConfigurationProvider")},profilers:{}}}l(Gs,"createDefaultSharedCoreModule"),F(Gs,"createDefaultSharedCoreModule");var fJ;(function(t){t.merge=(e,r)=>ME(ME({},e),r)})(fJ||(fJ={}));function Mn(t,e,r,n,a,i,s,o,u){const h=[t,e,r,n,a,i,s,o,u].reduce(ME,{});return gJ(h)}l(Mn,"inject"),F(Mn,"inject");var vFe=Symbol("isProxy");function pJ(t){if(t&&t[vFe])for(const e of Object.values(t))pJ(e);return t}l(pJ,"eagerLoad"),F(pJ,"eagerLoad");function gJ(t,e){const r=new Proxy({},{deleteProperty:F(()=>!1,"deleteProperty"),set:F(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:F((n,a)=>a===vFe?!0:mJ(n,a,t,e||r),"get"),getOwnPropertyDescriptor:F((n,a)=>(mJ(n,a,t,e||r),Object.getOwnPropertyDescriptor(n,a)),"getOwnPropertyDescriptor"),has:F((n,a)=>a in t,"has"),ownKeys:F(()=>[...Object.getOwnPropertyNames(t)],"ownKeys")});return r}l(gJ,"_inject"),F(gJ,"_inject");var bFe=Symbol();function mJ(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+t[e]);if(t[e]===bFe)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in r){const a=r[e];t[e]=bFe;try{t[e]=typeof a=="function"?a(n):gJ(a,n)}catch(i){throw t[e]=i instanceof Error?i:void 0,i}return t[e]}else return}l(mJ,"_resolve"),F(mJ,"_resolve");function ME(t,e){if(e){for(const[r,n]of Object.entries(e))if(n!=null)if(typeof n=="object"){const a=t[r];typeof a=="object"&&a!==null?t[r]=ME(a,n):t[r]=ME({},n)}else t[r]=n}return t}l(ME,"_merge"),F(ME,"_merge");var yJ={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},ay;(function(t){t.REGULAR="indentation-sensitive",t.IGNORE_INDENTATION="ignore-indentation"})(ay||(ay={}));var xFe=(ab=class extends WM{constructor(e=yJ){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=X(X({},yJ),e),this.indentTokenType=_E({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=_E({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,r){const n=super.buildTokens(e,r);if(!eP(n))throw new Error("Invalid tokens built by default builder");const{indentTokenName:a,dedentTokenName:i,whitespaceTokenName:s,ignoreIndentationDelimiters:o}=this.options;let u,h,d;const f=[];for(const p of n){for(const[g,m]of o)p.name===g?p.PUSH_MODE=ay.IGNORE_INDENTATION:p.name===m&&(p.POP_MODE=!0);p.name===i?u=p:p.name===a?h=p:p.name===s?d=p:f.push(p)}if(!u||!h||!d)throw new Error("Some indentation/whitespace tokens not found!");return o.length>0?{modes:{[ay.REGULAR]:[u,h,...f,d],[ay.IGNORE_INDENTATION]:[...f,d]},defaultMode:ay.REGULAR}:[u,h,d,...f]}flushLexingReport(e){const r=super.flushLexingReport(e);return Ne(X({},r),{remainingDedents:this.flushRemainingDedents(e)})}isStartOfLine(e,r){return r===0||`\r
|
||
`.includes(e[r-1])}matchWhitespace(e,r,n,a){var s;this.whitespaceRegExp.lastIndex=r;const i=this.whitespaceRegExp.exec(e);return{currIndentLevel:(s=i==null?void 0:i[0].length)!=null?s:0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,r,n,a){const i=this.getLineNumber(r,a);return F_(e,n,a,a+n.length,i,i,1,n.length)}getLineNumber(e,r){return e.substring(0,r).split(/\r\n|\r|\n/).length}indentMatcher(e,r,n,a){if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:s,match:o}=this.matchWhitespace(e,r,n,a);return i<=s?null:(this.indentationStack.push(i),o)}dedentMatcher(e,r,n,a){var f,p,g,m;if(!this.isStartOfLine(e,r))return null;const{currIndentLevel:i,prevIndentLevel:s,match:o}=this.matchWhitespace(e,r,n,a);if(i>=s)return null;const u=this.indentationStack.lastIndexOf(i);if(u===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${i} at offset: ${r}. Current indentation stack: ${this.indentationStack}`,offset:r,length:(p=(f=o==null?void 0:o[0])==null?void 0:f.length)!=null?p:0,line:this.getLineNumber(e,r),column:1}),null;const h=this.indentationStack.length-u-1,d=(m=(g=e.substring(0,r).match(/[\r\n]+$/))==null?void 0:g[0].length)!=null?m:1;for(let y=0;y<h;y++){const v=this.createIndentationTokenInstance(this.dedentTokenType,e,"",r-(d-1));n.push(v),this.indentationStack.pop()}return null}buildTerminalToken(e){const r=super.buildTerminalToken(e),{indentTokenName:n,dedentTokenName:a,whitespaceTokenName:i}=this.options;return r.name===n?this.indentTokenType:r.name===a?this.dedentTokenType:r.name===i?_E({name:i,pattern:this.whitespaceRegExp,group:yl.SKIPPED}):r}flushRemainingDedents(e){const r=[];for(;this.indentationStack.length>1;)r.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],r}},l(ab,"IndentationAwareTokenBuilder"),F(ab,"IndentationAwareTokenBuilder"),ab),Xor=(ib=class extends nJ{constructor(e){if(super(e),e.parser.TokenBuilder instanceof xFe)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,r=rJ){const n=super.tokenize(e),a=n.report;(r==null?void 0:r.mode)==="full"&&n.tokens.push(...a.remainingDedents),a.remainingDedents=[];const{indentTokenType:i,dedentTokenType:s}=this.indentationTokenBuilder,o=i.tokenTypeIdx,u=s.tokenTypeIdx,h=[],d=n.tokens.length-1;for(let f=0;f<d;f++){const p=n.tokens[f],g=n.tokens[f+1];if(p.tokenTypeIdx===o&&g.tokenTypeIdx===u){f++;continue}h.push(p)}return d>=0&&h.push(n.tokens[d]),n.tokens=h,n}},l(ib,"IndentationAwareLexer"),F(ib,"IndentationAwareLexer"),ib),vJ={};Fp(vJ,{AstUtils:l(()=>XK,"AstUtils"),BiMap:l(()=>jM,"BiMap"),Cancellation:l(()=>Oa,"Cancellation"),ContextCache:l(()=>XM,"ContextCache"),CstUtils:l(()=>UK,"CstUtils"),DONE_RESULT:l(()=>fl,"DONE_RESULT"),Deferred:l(()=>Xf,"Deferred"),Disposable:l(()=>ny,"Disposable"),DisposableCache:l(()=>KM,"DisposableCache"),DocumentCache:l(()=>zDe,"DocumentCache"),EMPTY_STREAM:l(()=>tE,"EMPTY_STREAM"),ErrorWithLocation:l(()=>v$,"ErrorWithLocation"),GrammarUtils:l(()=>kX,"GrammarUtils"),MultiMap:l(()=>Zf,"MultiMap"),OperationCancelled:l(()=>Cd,"OperationCancelled"),Reduction:l(()=>Z5,"Reduction"),RegExpUtils:l(()=>NX,"RegExpUtils"),SimpleCache:l(()=>XQ,"SimpleCache"),StreamImpl:l(()=>pd,"StreamImpl"),TreeStreamImpl:l(()=>rE,"TreeStreamImpl"),URI:l(()=>Mc,"URI"),UriTrie:l(()=>UQ,"UriTrie"),UriUtils:l(()=>xl,"UriUtils"),WorkspaceCache:l(()=>ZQ,"WorkspaceCache"),assertCondition:l(()=>AX,"assertCondition"),assertUnreachable:l(()=>qp,"assertUnreachable"),delayNextTick:l(()=>VM,"delayNextTick"),interruptAndCheck:l(()=>Ws,"interruptAndCheck"),isOperationCancelled:l(()=>ey,"isOperationCancelled"),loadGrammarFromJson:l(()=>qs,"loadGrammarFromJson"),setInterruptionPeriod:l(()=>VQ,"setInterruptionPeriod"),startCancelableOperation:l(()=>qM,"startCancelableOperation"),stream:l(()=>da,"stream")}),DL(vJ,QM);var wFe=(sb=class{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}exists(){return nt(this,null,function*(){return!1})}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}readDirectory(){return nt(this,null,function*(){return[]})}readDirectorySync(){return[]}},l(sb,"EmptyFileSystemProvider"),F(sb,"EmptyFileSystemProvider"),sb),po={fileSystemProvider:F(()=>new wFe,"fileSystemProvider")},Zor={Grammar:F(()=>{},"Grammar"),LanguageMetaData:F(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Qor={AstReflection:F(()=>new yX,"AstReflection")};function TFe(){const t=Mn(Gs(po),Qor),e=Mn(Vs({shared:t}),Zor);return t.ServiceRegistry.register(e),e}l(TFe,"createMinimalGrammarServices"),F(TFe,"createMinimalGrammarServices");function qs(t){var n;const e=TFe(),r=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(r,Mc.parse(`memory:/${(n=r.name)!=null?n:"grammar"}.langium`)),r}l(qs,"loadGrammarFromJson"),F(qs,"loadGrammarFromJson"),DL(c8e,vJ);var Jor=(ob=class{constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e!=null?e:new Set(this.allCategories),this.records=new Zf}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(r=>this.activeCategories.add(r)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(r=>this.activeCategories.delete(r)):this.activeCategories.clear()}createTask(e,r){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${r}'.`),new EFe(n=>this.records.add(e,this.dumpRecord(e,n)),r)}dumpRecord(e,r){console.info(`Task ${e}.${r.identifier} executed in ${r.duration.toFixed(2)}ms and ended at ${r.date.toISOString()}`);const n=[];for(const s of r.entries.keys()){const o=r.entries.get(s),u=o.reduce((h,d)=>h+d);n.push({name:`${r.identifier}.${s}`,count:o.length,duration:u})}const a=r.duration-n.map(s=>s.duration).reduce((s,o)=>s+o,0);n.push({name:r.identifier,count:1,duration:a}),n.sort((s,o)=>o.duration-s.duration);function i(s){return Math.round(100*s)/100}return l(i,"Round"),F(i,"Round"),console.table(n.map(s=>({Element:s.name,Count:s.count,"Self %":i(100*s.duration/r.duration),"Time (ms)":i(s.duration)}))),r}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(r=>e.some(n=>n===r[0])).flatMap(r=>r[1])}},l(ob,"DefaultLangiumProfiler"),F(ob,"DefaultLangiumProfiler"),ob),EFe=(lb=class{constructor(e,r){this.stack=[],this.entries=new Zf,this.addRecord=e,this.identifier=r}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(r=>r.id).join(", ")}.`);const e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){const r=this.stack.pop();if(!r)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(r.id!==e)throw new Error(`Sub-Task "${r.id}" is not already stopped.`);const n=performance.now()-r.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);const a=n-r.content;this.entries.add(e,a)}},l(lb,"ProfilingTask"),F(lb,"ProfilingTask"),lb),bJ;(t=>{t.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(bJ||(bJ={}));var xJ;(t=>{t.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(xJ||(xJ={}));var wJ;(t=>{t.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(wJ||(wJ={}));var TJ;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(TJ||(TJ={}));var EJ;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(EJ||(EJ={}));var CJ;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(CJ||(CJ={}));var SJ;(t=>{t.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(SJ||(SJ={}));var _J;(t=>{t.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(_J||(_J={}));var kJ;(t=>{t.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})(kJ||(kJ={}));var AJ;(t=>{t.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(AJ||(AJ={}));var NJ;(t=>{t.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(NJ||(NJ={}));var IJ;(t=>{t.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(IJ||(IJ={}));var LJ;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(LJ||(LJ={}));var $J;(t=>{t.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})($J||($J={}));var MJ;(t=>{t.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(MJ||(MJ={})),X(X(X(X(X(X(X(X(X(X(X(X(X(X(X({},bJ.Terminals),xJ.Terminals),wJ.Terminals),TJ.Terminals),EJ.Terminals),CJ.Terminals),SJ.Terminals),_J.Terminals),kJ.Terminals),AJ.Terminals),NJ.Terminals),IJ.Terminals),$J.Terminals),LJ.Terminals),MJ.Terminals);var CFe={$type:"AbnfAlternation",alternatives:"alternatives"},SFe={$type:"AbnfConcatenation",elements:"elements"},PJ={$type:"AbnfElement",primary:"primary",repeat:"repeat"},_Fe={$type:"AbnfGroup",element:"element"},kFe={$type:"AbnfNumVal",value:"value"},AFe={$type:"AbnfOptionalGroup",element:"element"},PE={$type:"AbnfPrimary"},RJ={$type:"AbnfRule",definition:"definition",name:"name"},NFe={$type:"AbnfRuleName",name:"name"},IFe={$type:"AbnfStringLiteral",value:"value"},sP={$type:"Accelerator",name:"name",x:"x",y:"y"},OJ={$type:"Alignment",direction:"direction",members:"members"},oP={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},ek={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},DJ={$type:"Annotations",x:"x",y:"y"},Sd={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",alignments:"alignments",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function elr(t){return zi.isInstance(t,Sd.$type)}l(elr,"isArchitecture"),F(elr,"isArchitecture");var lP={$type:"Axis",label:"label",name:"name"},cP={$type:"Branch",name:"name",order:"order"};function tlr(t){return zi.isInstance(t,cP.$type)}l(tlr,"isBranch"),F(tlr,"isBranch");var LFe={$type:"Checkout",branch:"branch"},uP={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},FJ={$type:"ClassDefStatement",className:"className",styleText:"styleText"},RE={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function rlr(t){return zi.isInstance(t,RE.$type)}l(rlr,"isCommit"),F(rlr,"isCommit");var hP={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},iy={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},dP={$type:"Curve",entries:"entries",label:"label",name:"name"},sy={$type:"Cynefin",accDescr:"accDescr",accTitle:"accTitle",domains:"domains",title:"title",transitions:"transitions"};function nlr(t){return zi.isInstance(t,sy.$type)}l(nlr,"isCynefin"),F(nlr,"isCynefin");var fP={$type:"Deaccelerator",name:"name",x:"x",y:"y"},$Fe={$type:"Decorator",strategy:"strategy"},OE={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},pP={$type:"DomainBlock",domain:"domain",items:"items"};function alr(t){return zi.isInstance(t,pP.$type)}l(alr,"isDomainBlock"),F(alr,"isDomainBlock");var BJ={$type:"DomainItem",label:"label"};function ilr(t){return zi.isInstance(t,BJ.$type)}l(ilr,"isDomainItem"),F(ilr,"isDomainItem");var MFe={$type:"EbnfChoice",alternatives:"alternatives"},PFe={$type:"EbnfExceptionPostfix",except:"except"},RFe={$type:"EbnfGroup",element:"element"},OFe={$type:"EbnfNonTerminal",name:"name"},DFe={$type:"EbnfOneOrMorePostfix",operator:"operator"},FFe={$type:"EbnfOptional",element:"element"},BFe={$type:"EbnfOptionalPostfix",operator:"operator"},tk={$type:"EbnfPostfix"},oy={$type:"EbnfPrimary"},zFe={$type:"EbnfRepetition",element:"element"},zJ={$type:"EbnfRule",definition:"definition",name:"name"},HFe={$type:"EbnfSequence",elements:"elements"},WFe={$type:"EbnfSpecial",text:"text"},HJ={$type:"EbnfTerm",base:"base",postfixes:"postfixes"},VFe={$type:"EbnfTerminal",value:"value"},GFe={$type:"EbnfZeroOrMorePostfix",operator:"operator"},_d={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},DE={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},ly={$type:"EmFrame"},rk={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},qFe={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},WJ={$type:"EmModelEntity",name:"name"};function slr(t){return t==="rmo"||t==="readmodel"||t==="ui"||t==="cmd"||t==="command"||t==="evt"||t==="event"||t==="pcr"||t==="processor"}l(slr,"isEmModelEntityType"),F(slr,"isEmModelEntityType");var gP={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},Qf={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};function YFe(t){return zi.isInstance(t,Qf.$type)}l(YFe,"isEmResetFrame"),F(YFe,"isEmResetFrame");var Jp={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},VJ={$type:"Entry",axis:"axis",value:"value"},Jf={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},UFe={$type:"Evolution",stages:"stages"},mP={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},GJ={$type:"Evolve",component:"component",target:"target"},cy={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function olr(t){return zi.isInstance(t,cy.$type)}l(olr,"isGitGraph"),F(olr,"isGitGraph");var nk={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},ak={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function llr(t){return zi.isInstance(t,ak.$type)}l(llr,"isInfo"),F(llr,"isInfo");var ik={$type:"Item",classSelector:"classSelector",name:"name"},qJ={$type:"Junction",id:"id",in:"in"},sk={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},yP={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},uy={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},FE={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function clr(t){return zi.isInstance(t,FE.$type)}l(clr,"isMerge"),F(clr,"isMerge");var vP={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},YJ={$type:"Option",name:"name",value:"value"},BE={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function ulr(t){return zi.isInstance(t,BE.$type)}l(ulr,"isPacket"),F(ulr,"isPacket");var zE={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function hlr(t){return zi.isInstance(t,zE.$type)}l(hlr,"isPacketBlock"),F(hlr,"isPacketBlock");var jFe={$type:"PegAny",dot:"dot"},KFe={$type:"PegGroup",element:"element"},XFe={$type:"PegIdentifier",name:"name"},ZFe={$type:"PegLiteral",value:"value"},QFe={$type:"PegOrderedChoice",alternatives:"alternatives"},UJ={$type:"PegPrefix",operator:"operator",suffix:"suffix"},ok={$type:"PegPrimary"},jJ={$type:"PegRule",definition:"definition",name:"name"},JFe={$type:"PegSequence",elements:"elements"},KJ={$type:"PegSuffix",operator:"operator",primary:"primary"},hy={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function dlr(t){return zi.isInstance(t,hy.$type)}l(dlr,"isPie"),F(dlr,"isPie");var bP={$type:"PieSection",label:"label",value:"value"};function flr(t){return zi.isInstance(t,bP.$type)}l(flr,"isPieSection"),F(flr,"isPieSection");var XJ={$type:"Pipeline",components:"components",parent:"parent"},xP={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},dy={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},HE={$type:"Railroad",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function plr(t){return zi.isInstance(t,HE.$type)}l(plr,"isRailroad"),F(plr,"isRailroad");var WE={$type:"RailroadAbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function glr(t){return zi.isInstance(t,WE.$type)}l(glr,"isRailroadAbnf"),F(glr,"isRailroadAbnf");var eBe={$type:"RailroadChoiceExpr",alternatives:"alternatives"},VE={$type:"RailroadEbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function mlr(t){return zi.isInstance(t,VE.$type)}l(mlr,"isRailroadEbnf"),F(mlr,"isRailroadEbnf");var e0={$type:"RailroadExpression"},tBe={$type:"RailroadNonTerminalExpr",name:"name"},rBe={$type:"RailroadOneOrMoreExpr",element:"element"},nBe={$type:"RailroadOptionalExpr",element:"element"},GE={$type:"RailroadPeg",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};function ylr(t){return zi.isInstance(t,GE.$type)}l(ylr,"isRailroadPeg"),F(ylr,"isRailroadPeg");var ZJ={$type:"RailroadRule",definition:"definition",name:"name"},aBe={$type:"RailroadSequenceExpr",elements:"elements"},iBe={$type:"RailroadSpecialExpr",text:"text"},sBe={$type:"RailroadTerminalExpr",value:"value"},oBe={$type:"RailroadZeroOrMoreExpr",element:"element"},QJ={$type:"Section",classSelector:"classSelector",name:"name"},qE={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},JJ={$type:"Size",height:"height",width:"width"},YE={$type:"Statement"},lk={$type:"Transition",from:"from",label:"label",to:"to"};function vlr(t){return zi.isInstance(t,lk.$type)}l(vlr,"isTransition"),F(vlr,"isTransition");var UE={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function blr(t){return zi.isInstance(t,UE.$type)}l(blr,"isTreemap"),F(blr,"isTreemap");var eee={$type:"TreemapRow",indent:"indent",item:"item"},jE={$type:"TreeNode",classAnnotation:"classAnnotation",descAnnotation:"descAnnotation",iconAnnotation:"iconAnnotation",indent:"indent",name:"name"},ck={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},go={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};function xlr(t){return zi.isInstance(t,go.$type)}l(xlr,"isWardley"),F(xlr,"isWardley");var lBe=(cb=class extends KK{constructor(){super(...arguments),this.types={AbnfAlternation:{name:CFe.$type,properties:{alternatives:{name:CFe.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:SFe.$type,properties:{elements:{name:SFe.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:PJ.$type,properties:{primary:{name:PJ.primary},repeat:{name:PJ.repeat}},superTypes:[]},AbnfGroup:{name:_Fe.$type,properties:{element:{name:_Fe.element}},superTypes:[PE.$type]},AbnfNumVal:{name:kFe.$type,properties:{value:{name:kFe.value}},superTypes:[PE.$type]},AbnfOptionalGroup:{name:AFe.$type,properties:{element:{name:AFe.element}},superTypes:[PE.$type]},AbnfPrimary:{name:PE.$type,properties:{},superTypes:[]},AbnfRule:{name:RJ.$type,properties:{definition:{name:RJ.definition},name:{name:RJ.name}},superTypes:[]},AbnfRuleName:{name:NFe.$type,properties:{name:{name:NFe.name}},superTypes:[PE.$type]},AbnfStringLiteral:{name:IFe.$type,properties:{value:{name:IFe.value}},superTypes:[PE.$type]},Accelerator:{name:sP.$type,properties:{name:{name:sP.name},x:{name:sP.x},y:{name:sP.y}},superTypes:[]},Alignment:{name:OJ.$type,properties:{direction:{name:OJ.direction},members:{name:OJ.members,defaultValue:[]}},superTypes:[]},Anchor:{name:oP.$type,properties:{evolution:{name:oP.evolution},name:{name:oP.name},visibility:{name:oP.visibility}},superTypes:[]},Annotation:{name:ek.$type,properties:{number:{name:ek.number},text:{name:ek.text},x:{name:ek.x},y:{name:ek.y}},superTypes:[]},Annotations:{name:DJ.$type,properties:{x:{name:DJ.x},y:{name:DJ.y}},superTypes:[]},Architecture:{name:Sd.$type,properties:{accDescr:{name:Sd.accDescr},accTitle:{name:Sd.accTitle},alignments:{name:Sd.alignments,defaultValue:[]},edges:{name:Sd.edges,defaultValue:[]},groups:{name:Sd.groups,defaultValue:[]},junctions:{name:Sd.junctions,defaultValue:[]},services:{name:Sd.services,defaultValue:[]},title:{name:Sd.title}},superTypes:[]},Axis:{name:lP.$type,properties:{label:{name:lP.label},name:{name:lP.name}},superTypes:[]},Branch:{name:cP.$type,properties:{name:{name:cP.name},order:{name:cP.order}},superTypes:[YE.$type]},Checkout:{name:LFe.$type,properties:{branch:{name:LFe.branch}},superTypes:[YE.$type]},CherryPicking:{name:uP.$type,properties:{id:{name:uP.id},parent:{name:uP.parent},tags:{name:uP.tags,defaultValue:[]}},superTypes:[YE.$type]},ClassDefStatement:{name:FJ.$type,properties:{className:{name:FJ.className},styleText:{name:FJ.styleText}},superTypes:[]},Commit:{name:RE.$type,properties:{id:{name:RE.id},message:{name:RE.message},tags:{name:RE.tags,defaultValue:[]},type:{name:RE.type}},superTypes:[YE.$type]},Common:{name:hP.$type,properties:{accDescr:{name:hP.accDescr},accTitle:{name:hP.accTitle},title:{name:hP.title}},superTypes:[]},Component:{name:iy.$type,properties:{decorator:{name:iy.decorator},evolution:{name:iy.evolution},inertia:{name:iy.inertia,defaultValue:!1},label:{name:iy.label},name:{name:iy.name},visibility:{name:iy.visibility}},superTypes:[]},Curve:{name:dP.$type,properties:{entries:{name:dP.entries,defaultValue:[]},label:{name:dP.label},name:{name:dP.name}},superTypes:[]},Cynefin:{name:sy.$type,properties:{accDescr:{name:sy.accDescr},accTitle:{name:sy.accTitle},domains:{name:sy.domains,defaultValue:[]},title:{name:sy.title},transitions:{name:sy.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:fP.$type,properties:{name:{name:fP.name},x:{name:fP.x},y:{name:fP.y}},superTypes:[]},Decorator:{name:$Fe.$type,properties:{strategy:{name:$Fe.strategy}},superTypes:[]},Direction:{name:OE.$type,properties:{accDescr:{name:OE.accDescr},accTitle:{name:OE.accTitle},dir:{name:OE.dir},statements:{name:OE.statements,defaultValue:[]},title:{name:OE.title}},superTypes:[cy.$type]},DomainBlock:{name:pP.$type,properties:{domain:{name:pP.domain},items:{name:pP.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:BJ.$type,properties:{label:{name:BJ.label}},superTypes:[]},EbnfChoice:{name:MFe.$type,properties:{alternatives:{name:MFe.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:PFe.$type,properties:{except:{name:PFe.except}},superTypes:[tk.$type]},EbnfGroup:{name:RFe.$type,properties:{element:{name:RFe.element}},superTypes:[oy.$type]},EbnfNonTerminal:{name:OFe.$type,properties:{name:{name:OFe.name}},superTypes:[oy.$type]},EbnfOneOrMorePostfix:{name:DFe.$type,properties:{operator:{name:DFe.operator}},superTypes:[tk.$type]},EbnfOptional:{name:FFe.$type,properties:{element:{name:FFe.element}},superTypes:[oy.$type]},EbnfOptionalPostfix:{name:BFe.$type,properties:{operator:{name:BFe.operator}},superTypes:[tk.$type]},EbnfPostfix:{name:tk.$type,properties:{},superTypes:[]},EbnfPrimary:{name:oy.$type,properties:{},superTypes:[]},EbnfRepetition:{name:zFe.$type,properties:{element:{name:zFe.element}},superTypes:[oy.$type]},EbnfRule:{name:zJ.$type,properties:{definition:{name:zJ.definition},name:{name:zJ.name}},superTypes:[]},EbnfSequence:{name:HFe.$type,properties:{elements:{name:HFe.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:WFe.$type,properties:{text:{name:WFe.text}},superTypes:[oy.$type]},EbnfTerm:{name:HJ.$type,properties:{base:{name:HJ.base},postfixes:{name:HJ.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:VFe.$type,properties:{value:{name:VFe.value}},superTypes:[oy.$type]},EbnfZeroOrMorePostfix:{name:GFe.$type,properties:{operator:{name:GFe.operator}},superTypes:[tk.$type]},Edge:{name:_d.$type,properties:{lhsDir:{name:_d.lhsDir},lhsGroup:{name:_d.lhsGroup,defaultValue:!1},lhsId:{name:_d.lhsId},lhsInto:{name:_d.lhsInto,defaultValue:!1},rhsDir:{name:_d.rhsDir},rhsGroup:{name:_d.rhsGroup,defaultValue:!1},rhsId:{name:_d.rhsId},rhsInto:{name:_d.rhsInto,defaultValue:!1},title:{name:_d.title}},superTypes:[]},EmDataEntity:{name:DE.$type,properties:{dataBlockValue:{name:DE.dataBlockValue},dataType:{name:DE.dataType},name:{name:DE.name}},superTypes:[]},EmFrame:{name:ly.$type,properties:{},superTypes:[]},EmGwt:{name:rk.$type,properties:{givenStatements:{name:rk.givenStatements,defaultValue:[]},sourceFrame:{name:rk.sourceFrame,referenceType:ly.$type},thenStatements:{name:rk.thenStatements,defaultValue:[]},whenStatements:{name:rk.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:qFe.$type,properties:{entityIdentifier:{name:qFe.entityIdentifier,referenceType:WJ.$type}},superTypes:[]},EmModelEntity:{name:WJ.$type,properties:{name:{name:WJ.name}},superTypes:[]},EmNoteEntity:{name:gP.$type,properties:{dataBlockValue:{name:gP.dataBlockValue},dataType:{name:gP.dataType},sourceFrame:{name:gP.sourceFrame,referenceType:ly.$type}},superTypes:[]},EmResetFrame:{name:Qf.$type,properties:{dataInlineValue:{name:Qf.dataInlineValue},dataReference:{name:Qf.dataReference,referenceType:DE.$type},dataType:{name:Qf.dataType},entityIdentifier:{name:Qf.entityIdentifier},modelEntityType:{name:Qf.modelEntityType},name:{name:Qf.name},sourceFrames:{name:Qf.sourceFrames,defaultValue:[],referenceType:ly.$type}},superTypes:[ly.$type]},EmTimeFrame:{name:Jp.$type,properties:{dataInlineValue:{name:Jp.dataInlineValue},dataReference:{name:Jp.dataReference,referenceType:DE.$type},dataType:{name:Jp.dataType},entityIdentifier:{name:Jp.entityIdentifier},modelEntityType:{name:Jp.modelEntityType},name:{name:Jp.name},sourceFrames:{name:Jp.sourceFrames,defaultValue:[],referenceType:ly.$type}},superTypes:[ly.$type]},Entry:{name:VJ.$type,properties:{axis:{name:VJ.axis,referenceType:lP.$type},value:{name:VJ.value}},superTypes:[]},EventModel:{name:Jf.$type,properties:{accDescr:{name:Jf.accDescr},accTitle:{name:Jf.accTitle},dataEntities:{name:Jf.dataEntities,defaultValue:[]},frames:{name:Jf.frames,defaultValue:[]},gwtEntities:{name:Jf.gwtEntities,defaultValue:[]},modelEntities:{name:Jf.modelEntities,defaultValue:[]},noteEntities:{name:Jf.noteEntities,defaultValue:[]},title:{name:Jf.title}},superTypes:[]},Evolution:{name:UFe.$type,properties:{stages:{name:UFe.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:mP.$type,properties:{boundary:{name:mP.boundary},name:{name:mP.name},secondName:{name:mP.secondName}},superTypes:[]},Evolve:{name:GJ.$type,properties:{component:{name:GJ.component},target:{name:GJ.target}},superTypes:[]},GitGraph:{name:cy.$type,properties:{accDescr:{name:cy.accDescr},accTitle:{name:cy.accTitle},statements:{name:cy.statements,defaultValue:[]},title:{name:cy.title}},superTypes:[]},Group:{name:nk.$type,properties:{icon:{name:nk.icon},id:{name:nk.id},in:{name:nk.in},title:{name:nk.title}},superTypes:[]},Info:{name:ak.$type,properties:{accDescr:{name:ak.accDescr},accTitle:{name:ak.accTitle},title:{name:ak.title}},superTypes:[]},Item:{name:ik.$type,properties:{classSelector:{name:ik.classSelector},name:{name:ik.name}},superTypes:[]},Junction:{name:qJ.$type,properties:{id:{name:qJ.id},in:{name:qJ.in}},superTypes:[]},Label:{name:sk.$type,properties:{negX:{name:sk.negX,defaultValue:!1},negY:{name:sk.negY,defaultValue:!1},offsetX:{name:sk.offsetX},offsetY:{name:sk.offsetY}},superTypes:[]},Leaf:{name:yP.$type,properties:{classSelector:{name:yP.classSelector},name:{name:yP.name},value:{name:yP.value}},superTypes:[ik.$type]},Link:{name:uy.$type,properties:{arrow:{name:uy.arrow},from:{name:uy.from},fromPort:{name:uy.fromPort},linkLabel:{name:uy.linkLabel},to:{name:uy.to},toPort:{name:uy.toPort}},superTypes:[]},Merge:{name:FE.$type,properties:{branch:{name:FE.branch},id:{name:FE.id},tags:{name:FE.tags,defaultValue:[]},type:{name:FE.type}},superTypes:[YE.$type]},Note:{name:vP.$type,properties:{evolution:{name:vP.evolution},text:{name:vP.text},visibility:{name:vP.visibility}},superTypes:[]},Option:{name:YJ.$type,properties:{name:{name:YJ.name},value:{name:YJ.value,defaultValue:!1}},superTypes:[]},Packet:{name:BE.$type,properties:{accDescr:{name:BE.accDescr},accTitle:{name:BE.accTitle},blocks:{name:BE.blocks,defaultValue:[]},title:{name:BE.title}},superTypes:[]},PacketBlock:{name:zE.$type,properties:{bits:{name:zE.bits},end:{name:zE.end},label:{name:zE.label},start:{name:zE.start}},superTypes:[]},PegAny:{name:jFe.$type,properties:{dot:{name:jFe.dot}},superTypes:[ok.$type]},PegGroup:{name:KFe.$type,properties:{element:{name:KFe.element}},superTypes:[ok.$type]},PegIdentifier:{name:XFe.$type,properties:{name:{name:XFe.name}},superTypes:[ok.$type]},PegLiteral:{name:ZFe.$type,properties:{value:{name:ZFe.value}},superTypes:[ok.$type]},PegOrderedChoice:{name:QFe.$type,properties:{alternatives:{name:QFe.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:UJ.$type,properties:{operator:{name:UJ.operator},suffix:{name:UJ.suffix}},superTypes:[]},PegPrimary:{name:ok.$type,properties:{},superTypes:[]},PegRule:{name:jJ.$type,properties:{definition:{name:jJ.definition},name:{name:jJ.name}},superTypes:[]},PegSequence:{name:JFe.$type,properties:{elements:{name:JFe.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:KJ.$type,properties:{operator:{name:KJ.operator},primary:{name:KJ.primary}},superTypes:[]},Pie:{name:hy.$type,properties:{accDescr:{name:hy.accDescr},accTitle:{name:hy.accTitle},sections:{name:hy.sections,defaultValue:[]},showData:{name:hy.showData,defaultValue:!1},title:{name:hy.title}},superTypes:[]},PieSection:{name:bP.$type,properties:{label:{name:bP.label},value:{name:bP.value}},superTypes:[]},Pipeline:{name:XJ.$type,properties:{components:{name:XJ.components,defaultValue:[]},parent:{name:XJ.parent}},superTypes:[]},PipelineComponent:{name:xP.$type,properties:{evolution:{name:xP.evolution},label:{name:xP.label},name:{name:xP.name}},superTypes:[]},Radar:{name:dy.$type,properties:{accDescr:{name:dy.accDescr},accTitle:{name:dy.accTitle},axes:{name:dy.axes,defaultValue:[]},curves:{name:dy.curves,defaultValue:[]},options:{name:dy.options,defaultValue:[]},title:{name:dy.title}},superTypes:[]},Railroad:{name:HE.$type,properties:{accDescr:{name:HE.accDescr},accTitle:{name:HE.accTitle},rules:{name:HE.rules,defaultValue:[]},title:{name:HE.title}},superTypes:[]},RailroadAbnf:{name:WE.$type,properties:{accDescr:{name:WE.accDescr},accTitle:{name:WE.accTitle},rules:{name:WE.rules,defaultValue:[]},title:{name:WE.title}},superTypes:[]},RailroadChoiceExpr:{name:eBe.$type,properties:{alternatives:{name:eBe.alternatives,defaultValue:[]}},superTypes:[e0.$type]},RailroadEbnf:{name:VE.$type,properties:{accDescr:{name:VE.accDescr},accTitle:{name:VE.accTitle},rules:{name:VE.rules,defaultValue:[]},title:{name:VE.title}},superTypes:[]},RailroadExpression:{name:e0.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:tBe.$type,properties:{name:{name:tBe.name}},superTypes:[e0.$type]},RailroadOneOrMoreExpr:{name:rBe.$type,properties:{element:{name:rBe.element}},superTypes:[e0.$type]},RailroadOptionalExpr:{name:nBe.$type,properties:{element:{name:nBe.element}},superTypes:[e0.$type]},RailroadPeg:{name:GE.$type,properties:{accDescr:{name:GE.accDescr},accTitle:{name:GE.accTitle},rules:{name:GE.rules,defaultValue:[]},title:{name:GE.title}},superTypes:[]},RailroadRule:{name:ZJ.$type,properties:{definition:{name:ZJ.definition},name:{name:ZJ.name}},superTypes:[]},RailroadSequenceExpr:{name:aBe.$type,properties:{elements:{name:aBe.elements,defaultValue:[]}},superTypes:[e0.$type]},RailroadSpecialExpr:{name:iBe.$type,properties:{text:{name:iBe.text}},superTypes:[e0.$type]},RailroadTerminalExpr:{name:sBe.$type,properties:{value:{name:sBe.value}},superTypes:[e0.$type]},RailroadZeroOrMoreExpr:{name:oBe.$type,properties:{element:{name:oBe.element}},superTypes:[e0.$type]},Section:{name:QJ.$type,properties:{classSelector:{name:QJ.classSelector},name:{name:QJ.name}},superTypes:[ik.$type]},Service:{name:qE.$type,properties:{icon:{name:qE.icon},iconText:{name:qE.iconText},id:{name:qE.id},in:{name:qE.in},title:{name:qE.title}},superTypes:[]},Size:{name:JJ.$type,properties:{height:{name:JJ.height},width:{name:JJ.width}},superTypes:[]},Statement:{name:YE.$type,properties:{},superTypes:[]},Transition:{name:lk.$type,properties:{from:{name:lk.from},label:{name:lk.label},to:{name:lk.to}},superTypes:[]},TreeNode:{name:jE.$type,properties:{classAnnotation:{name:jE.classAnnotation},descAnnotation:{name:jE.descAnnotation},iconAnnotation:{name:jE.iconAnnotation},indent:{name:jE.indent},name:{name:jE.name}},superTypes:[]},TreeView:{name:ck.$type,properties:{accDescr:{name:ck.accDescr},accTitle:{name:ck.accTitle},nodes:{name:ck.nodes,defaultValue:[]},title:{name:ck.title}},superTypes:[]},Treemap:{name:UE.$type,properties:{accDescr:{name:UE.accDescr},accTitle:{name:UE.accTitle},title:{name:UE.title},TreemapRows:{name:UE.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:eee.$type,properties:{indent:{name:eee.indent},item:{name:eee.item}},superTypes:[]},Wardley:{name:go.$type,properties:{accDescr:{name:go.accDescr},accelerators:{name:go.accelerators,defaultValue:[]},accTitle:{name:go.accTitle},anchors:{name:go.anchors,defaultValue:[]},annotation:{name:go.annotation,defaultValue:[]},annotations:{name:go.annotations,defaultValue:[]},components:{name:go.components,defaultValue:[]},deaccelerators:{name:go.deaccelerators,defaultValue:[]},evolution:{name:go.evolution},evolves:{name:go.evolves,defaultValue:[]},links:{name:go.links,defaultValue:[]},notes:{name:go.notes,defaultValue:[]},pipelines:{name:go.pipelines,defaultValue:[]},size:{name:go.size},title:{name:go.title}},superTypes:[]}}}},l(cb,"MermaidAstReflection"),F(cb,"MermaidAstReflection"),cb),zi=new lBe,wP,wlr=F(()=>wP!=null?wP:wP=qs(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),"ArchitectureGrammarGrammar"),TP,Tlr=F(()=>TP!=null?TP:TP=qs(`{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"CynefinGrammarGrammar"),EP,Elr=F(()=>EP!=null?EP:EP=qs('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}'),"EventModelingGrammar"),CP,Clr=F(()=>CP!=null?CP:CP=qs(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),"GitGraphGrammarGrammar"),SP,Slr=F(()=>SP!=null?SP:SP=qs(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"InfoGrammarGrammar"),_P,_lr=F(()=>_P!=null?_P:_P=qs(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"PacketGrammarGrammar"),kP,klr=F(()=>kP!=null?kP:kP=qs(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"PieGrammarGrammar"),AP,Alr=F(()=>AP!=null?AP:AP=qs(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`),"RadarGrammarGrammar"),NP,Nlr=F(()=>NP!=null?NP:NP=qs('{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}'),"RailroadAbnfGrammarGrammar"),IP,Ilr=F(()=>IP!=null?IP:IP=qs(`{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}`),"RailroadEbnfGrammarGrammar"),LP,Llr=F(()=>LP!=null?LP:LP=qs(`{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`),"RailroadGrammarGrammar"),$P,$lr=F(()=>$P!=null?$P:$P=qs(`{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`),"RailroadPegGrammarGrammar"),MP,Mlr=F(()=>MP!=null?MP:MP=qs(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),"TreemapGrammarGrammar"),PP,Plr=F(()=>PP!=null?PP:PP=qs(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`),"TreeViewGrammarGrammar"),RP,Rlr=F(()=>RP!=null?RP:RP=qs(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'</","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'>/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),"WardleyGrammarGrammar"),Olr={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Dlr={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Flr={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Blr={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},zlr={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Hlr={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Wlr={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Vlr={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Glr={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},qlr={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Ylr={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Ulr={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},jlr={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Klr={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Xlr={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},wl={AstReflection:F(()=>new lBe,"AstReflection")},Zlr={Grammar:F(()=>wlr(),"Grammar"),LanguageMetaData:F(()=>Olr,"LanguageMetaData"),parser:{}},Qlr={Grammar:F(()=>Tlr(),"Grammar"),LanguageMetaData:F(()=>Dlr,"LanguageMetaData"),parser:{}},Jlr={Grammar:F(()=>Elr(),"Grammar"),LanguageMetaData:F(()=>Flr,"LanguageMetaData"),parser:{}},ecr={Grammar:F(()=>Clr(),"Grammar"),LanguageMetaData:F(()=>Blr,"LanguageMetaData"),parser:{}},tcr={Grammar:F(()=>Slr(),"Grammar"),LanguageMetaData:F(()=>zlr,"LanguageMetaData"),parser:{}},rcr={Grammar:F(()=>_lr(),"Grammar"),LanguageMetaData:F(()=>Hlr,"LanguageMetaData"),parser:{}},ncr={Grammar:F(()=>klr(),"Grammar"),LanguageMetaData:F(()=>Wlr,"LanguageMetaData"),parser:{}},acr={Grammar:F(()=>Alr(),"Grammar"),LanguageMetaData:F(()=>Vlr,"LanguageMetaData"),parser:{}},icr={Grammar:F(()=>Nlr(),"Grammar"),LanguageMetaData:F(()=>Glr,"LanguageMetaData"),parser:{}},scr={Grammar:F(()=>Ilr(),"Grammar"),LanguageMetaData:F(()=>qlr,"LanguageMetaData"),parser:{}},ocr={Grammar:F(()=>Llr(),"Grammar"),LanguageMetaData:F(()=>Ylr,"LanguageMetaData"),parser:{}},lcr={Grammar:F(()=>$lr(),"Grammar"),LanguageMetaData:F(()=>Ulr,"LanguageMetaData"),parser:{}},ccr={Grammar:F(()=>Mlr(),"Grammar"),LanguageMetaData:F(()=>jlr,"LanguageMetaData"),parser:{}},ucr={Grammar:F(()=>Plr(),"Grammar"),LanguageMetaData:F(()=>Klr,"LanguageMetaData"),parser:{}},hcr={Grammar:F(()=>Rlr(),"Grammar"),LanguageMetaData:F(()=>Xlr,"LanguageMetaData"),parser:{}},dcr=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,fcr=/accTitle[\t ]*:([^\n\r]*)/,pcr=/title([\t ][^\n\r]*|)/,gcr={ACC_DESCR:dcr,ACC_TITLE:fcr,TITLE:pcr},kd=(ub=class extends WQ{runConverter(e,r,n){let a=this.runCommonConverter(e,r,n);return a===void 0&&(a=this.runCustomConverter(e,r,n)),a===void 0?super.runConverter(e,r,n):a}runCommonConverter(e,r,n){const a=gcr[e.name];if(a===void 0)return;const i=a.exec(r);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
|
||
`)}}},l(ub,"AbstractMermaidValueConverter"),F(ub,"AbstractMermaidValueConverter"),ub),KE=(hb=class extends kd{runCustomConverter(e,r,n){}},l(hb,"CommonValueConverter"),F(hb,"CommonValueConverter"),hb),Tl=(db=class extends WM{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,r,n){const a=super.buildKeywordTokens(e,r,n);return a.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),a}},l(db,"AbstractMermaidTokenBuilder"),F(db,"AbstractMermaidTokenBuilder"),db);HC=class extends Tl{},F(HC,"CommonTokenBuilder");var mcr=(fb=class extends Tl{constructor(){super(["radar-beta"])}},l(fb,"RadarTokenBuilder"),F(fb,"RadarTokenBuilder"),fb),cBe={parser:{TokenBuilder:F(()=>new mcr,"TokenBuilder"),ValueConverter:F(()=>new KE,"ValueConverter")}};function uBe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),acr,cBe);return e.ServiceRegistry.register(r),{shared:e,Radar:r}}l(uBe,"createRadarServices"),F(uBe,"createRadarServices");var ycr=(pb=class extends Tl{constructor(){super(["railroad-beta"])}},l(pb,"RailroadTokenBuilder"),F(pb,"RailroadTokenBuilder"),pb),hBe=F(t=>{const e=t.slice(1,-1);let r="";for(let n=0;n<e.length;n++){const a=e[n];if(a==="\\"&&n+1<e.length){n++;const i=e[n];switch(i){case"n":r+=`
|
||
`;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=i}continue}r+=a}return r},"decodeEscapedString"),vcr=(gb=class extends kd{runConverter(e,r,n){const a=super.runConverter(e,r,n);if(e.name==="TITLE"&&typeof a=="string"){const i=a.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return hBe(i)}return a}runCustomConverter(e,r,n){if(e.name==="RR_STRING")return hBe(r)}},l(gb,"RailroadValueConverter"),F(gb,"RailroadValueConverter"),gb),dBe={parser:{TokenBuilder:F(()=>new ycr,"TokenBuilder"),ValueConverter:F(()=>new vcr,"ValueConverter")}};function tee(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),ocr,dBe);return e.ServiceRegistry.register(r),{shared:e,Railroad:r}}l(tee,"createRailroadServices"),F(tee,"createRailroadServices");var bcr=(mb=class extends Tl{constructor(){super(["railroad-ebnf-beta"])}},l(mb,"RailroadEbnfTokenBuilder"),F(mb,"RailroadEbnfTokenBuilder"),mb),fBe=F(t=>{const e=t.slice(1,-1);let r="";for(let n=0;n<e.length;n++){const a=e[n];if(a==="\\"&&n+1<e.length){n++;const i=e[n];switch(i){case"n":r+=`
|
||
`;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=i}continue}r+=a}return r},"decodeEscapedString"),xcr=(yb=class extends kd{runConverter(e,r,n){const a=super.runConverter(e,r,n);if(e.name==="TITLE"&&typeof a=="string"){const i=a.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return fBe(i)}return a}runCustomConverter(e,r,n){if(e.name==="EBNF_STRING")return fBe(r);if(e.name==="EBNF_SPECIAL_SEQUENCE")return r.slice(1,-1).trim()}},l(yb,"RailroadEbnfValueConverter"),F(yb,"RailroadEbnfValueConverter"),yb),pBe={parser:{TokenBuilder:F(()=>new bcr,"TokenBuilder"),ValueConverter:F(()=>new xcr,"ValueConverter")}};function ree(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),scr,pBe);return e.ServiceRegistry.register(r),{shared:e,RailroadEbnf:r}}l(ree,"createRailroadEbnfServices"),F(ree,"createRailroadEbnfServices");var wcr=(vb=class extends Tl{constructor(){super(["railroad-abnf-beta"])}},l(vb,"RailroadAbnfTokenBuilder"),F(vb,"RailroadAbnfTokenBuilder"),vb),Tcr=(bb=class extends kd{runConverter(e,r,n){const a=super.runConverter(e,r,n);if(e.name==="TITLE"&&typeof a=="string"){const i=a.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1)}return a}runCustomConverter(e,r,n){if(e.name==="ABNF_STRING")return r.slice(1,-1)}},l(bb,"RailroadAbnfValueConverter"),F(bb,"RailroadAbnfValueConverter"),bb),gBe={parser:{TokenBuilder:F(()=>new wcr,"TokenBuilder"),ValueConverter:F(()=>new Tcr,"ValueConverter")}};function nee(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),icr,gBe);return e.ServiceRegistry.register(r),{shared:e,RailroadAbnf:r}}l(nee,"createRailroadAbnfServices"),F(nee,"createRailroadAbnfServices");var Ecr=(xb=class extends Tl{constructor(){super(["railroad-peg-beta"])}},l(xb,"RailroadPegTokenBuilder"),F(xb,"RailroadPegTokenBuilder"),xb),mBe=F(t=>{const e=t.slice(1,-1);let r="";for(let n=0;n<e.length;n++){const a=e[n];if(a==="\\"&&n+1<e.length){n++;const i=e[n];switch(i){case"n":r+=`
|
||
`;break;case"r":r+="\r";break;case"t":r+=" ";break;default:r+=i}continue}r+=a}return r},"decodeEscapedString"),Ccr=(wb=class extends kd{runConverter(e,r,n){const a=super.runConverter(e,r,n);if(e.name==="TITLE"&&typeof a=="string"){const i=a.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return mBe(i)}return a}runCustomConverter(e,r,n){if(e.name==="PEG_STRING")return mBe(r)}},l(wb,"RailroadPegValueConverter"),F(wb,"RailroadPegValueConverter"),wb),yBe={parser:{TokenBuilder:F(()=>new Ecr,"TokenBuilder"),ValueConverter:F(()=>new Ccr,"ValueConverter")}};function aee(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),lcr,yBe);return e.ServiceRegistry.register(r),{shared:e,RailroadPeg:r}}l(aee,"createRailroadPegServices"),F(aee,"createRailroadPegServices");var Scr=(Tb=class extends Tl{constructor(){super(["treemap"])}},l(Tb,"TreemapTokenBuilder"),F(Tb,"TreemapTokenBuilder"),Tb),_cr=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,kcr=(Eb=class extends kd{runCustomConverter(e,r,n){if(e.name==="NUMBER2")return parseFloat(r.replace(/,/g,""));if(e.name==="SEPARATOR")return r.substring(1,r.length-1);if(e.name==="STRING2")return r.substring(1,r.length-1);if(e.name==="INDENTATION")return r.length;if(e.name==="ClassDef"){if(typeof r!="string")return r;const a=_cr.exec(r);if(a)return{$type:"ClassDefStatement",className:a[1],styleText:a[2]||void 0}}}},l(Eb,"TreemapValueConverter"),F(Eb,"TreemapValueConverter"),Eb);function vBe(t){const e=t.validation.TreemapValidator,r=t.validation.ValidationRegistry;if(r){const n={Treemap:e.checkSingleRoot.bind(e)};r.register(n,e)}}l(vBe,"registerValidationChecks$1"),F(vBe,"registerValidationChecks");var Acr=(Cb=class{checkSingleRoot(e,r){let n;for(const a of e.TreemapRows)a.item&&(n===void 0&&a.indent===void 0?n=0:a.indent===void 0?r("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}):n!==void 0&&n>=parseInt(a.indent,10)&&r("error","Multiple root nodes are not allowed in a treemap.",{node:a,property:"item"}))}},l(Cb,"TreemapValidator"),F(Cb,"TreemapValidator"),Cb),bBe={parser:{TokenBuilder:F(()=>new Scr,"TokenBuilder"),ValueConverter:F(()=>new kcr,"ValueConverter")},validation:{TreemapValidator:F(()=>new Acr,"TreemapValidator")}};function xBe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),ccr,bBe);return e.ServiceRegistry.register(r),vBe(r),{shared:e,Treemap:r}}l(xBe,"createTreemapServices"),F(xBe,"createTreemapServices");var Ncr=(Sb=class extends kd{runCustomConverter(e,r,n){switch(e.name.toUpperCase()){case"LINK_LABEL":return r.substring(1).trim();default:return}}},l(Sb,"WardleyValueConverter"),F(Sb,"WardleyValueConverter"),Sb),wBe={parser:{ValueConverter:F(()=>new Ncr,"ValueConverter")}};function TBe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),hcr,wBe);return e.ServiceRegistry.register(r),{shared:e,Wardley:r}}l(TBe,"createWardleyServices"),F(TBe,"createWardleyServices");var Icr=(_b=class extends Tl{constructor(){super(["cynefin-beta"])}},l(_b,"CynefinTokenBuilder"),F(_b,"CynefinTokenBuilder"),_b),EBe={parser:{TokenBuilder:F(()=>new Icr,"TokenBuilder"),ValueConverter:F(()=>new KE,"ValueConverter")}};function CBe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),Qlr,EBe);return e.ServiceRegistry.register(r),{shared:e,Cynefin:r}}l(CBe,"createCynefinServices"),F(CBe,"createCynefinServices");var Lcr=(kb=class extends Tl{constructor(){super(["gitGraph"])}},l(kb,"GitGraphTokenBuilder"),F(kb,"GitGraphTokenBuilder"),kb),SBe={parser:{TokenBuilder:F(()=>new Lcr,"TokenBuilder"),ValueConverter:F(()=>new KE,"ValueConverter")}};function _Be(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),ecr,SBe);return e.ServiceRegistry.register(r),{shared:e,GitGraph:r}}l(_Be,"createGitGraphServices"),F(_Be,"createGitGraphServices");var $cr=(Ab=class extends Tl{constructor(){super(["info","showInfo"])}},l(Ab,"InfoTokenBuilder"),F(Ab,"InfoTokenBuilder"),Ab),kBe={parser:{TokenBuilder:F(()=>new $cr,"TokenBuilder"),ValueConverter:F(()=>new KE,"ValueConverter")}};function ABe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),tcr,kBe);return e.ServiceRegistry.register(r),{shared:e,Info:r}}l(ABe,"createInfoServices"),F(ABe,"createInfoServices");var Mcr=(Nb=class extends Tl{constructor(){super(["packet"])}},l(Nb,"PacketTokenBuilder"),F(Nb,"PacketTokenBuilder"),Nb),NBe={parser:{TokenBuilder:F(()=>new Mcr,"TokenBuilder"),ValueConverter:F(()=>new KE,"ValueConverter")}};function IBe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),rcr,NBe);return e.ServiceRegistry.register(r),{shared:e,Packet:r}}l(IBe,"createPacketServices"),F(IBe,"createPacketServices");var Pcr=(Ib=class extends Tl{constructor(){super(["pie","showData"])}},l(Ib,"PieTokenBuilder"),F(Ib,"PieTokenBuilder"),Ib),Rcr=(Lb=class extends kd{runCustomConverter(e,r,n){if(e.name==="PIE_SECTION_LABEL")return r.replace(/"/g,"").trim()}},l(Lb,"PieValueConverter"),F(Lb,"PieValueConverter"),Lb),LBe={parser:{TokenBuilder:F(()=>new Pcr,"TokenBuilder"),ValueConverter:F(()=>new Rcr,"ValueConverter")}};function $Be(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),ncr,LBe);return e.ServiceRegistry.register(r),{shared:e,Pie:r}}l($Be,"createPieServices"),F($Be,"createPieServices");var Ocr=($b=class extends kd{runCustomConverter(e,r,n){if(e.name==="INDENTATION")return(r==null?void 0:r.length)||0;if(e.name==="QUOTED_NAME")return r.substring(1,r.length-1);if(e.name==="BARE_NAME")return r.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return r.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){const a=r.trim();return a.substring(5,a.length-1)}if(e.name==="DESC_ANNOTATION")return r.trim().substring(2).trim()}},l($b,"TreeViewValueConverter"),F($b,"TreeViewValueConverter"),$b),Dcr=(Mb=class extends Tl{constructor(){super(["treeView-beta"])}},l(Mb,"TreeViewTokenBuilder"),F(Mb,"TreeViewTokenBuilder"),Mb),MBe={parser:{TokenBuilder:F(()=>new Dcr,"TokenBuilder"),ValueConverter:F(()=>new Ocr,"ValueConverter")}};function PBe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),ucr,MBe);return e.ServiceRegistry.register(r),{shared:e,TreeView:r}}l(PBe,"createTreeViewServices"),F(PBe,"createTreeViewServices");var Fcr=(Pb=class extends Tl{constructor(){super(["architecture"])}},l(Pb,"ArchitectureTokenBuilder"),F(Pb,"ArchitectureTokenBuilder"),Pb),Bcr=(Rb=class extends kd{runCustomConverter(e,r,n){if(e.name==="ARCH_ICON")return r.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return r.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let a=r.replace(/^\[|]$/g,"").trim();return(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1),a=a.replace(/\\"/g,'"').replace(/\\'/g,"'")),a.trim()}}},l(Rb,"ArchitectureValueConverter"),F(Rb,"ArchitectureValueConverter"),Rb),RBe={parser:{TokenBuilder:F(()=>new Fcr,"TokenBuilder"),ValueConverter:F(()=>new Bcr,"ValueConverter")}};function OBe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),Zlr,RBe);return e.ServiceRegistry.register(r),{shared:e,Architecture:r}}l(OBe,"createArchitectureServices"),F(OBe,"createArchitectureServices");var zcr=(Ob=class extends Tl{constructor(){super(["eventmodeling"])}},l(Ob,"EventModelingTokenBuilder"),F(Ob,"EventModelingTokenBuilder"),Ob),DBe=new Set(["cmd","command"]),FBe=new Set(["evt","event"]),iee=new Set(["rmo","readmodel"]),BBe=new Set(["pcr","processor"]),zBe=new Set(["ui"]);function HBe(t){const e=t.validation.EventModelingValidator,r=t.validation.ValidationRegistry;if(r){const n={EmTimeFrame:e.checkSourceFrameTypes.bind(e),EmResetFrame:e.checkSourceFrameTypes.bind(e)};r.register(n,e)}}l(HBe,"registerValidationChecks"),F(HBe,"registerValidationChecks");var Hcr=(Db=class{checkSourceFrameTypes(e,r){e.sourceFrames.length!==0&&(DBe.has(e.modelEntityType)?this.validateSources(e,new Set([...zBe,...BBe]),"command","ui or processor",r):FBe.has(e.modelEntityType)?this.validateSources(e,DBe,"event","command",r):iee.has(e.modelEntityType)?this.validateSources(e,FBe,"read model","event",r):BBe.has(e.modelEntityType)?this.validateSources(e,iee,"processor","read model",r):zBe.has(e.modelEntityType)&&this.validateSources(e,iee,"ui","read model",r))}validateSources(e,r,n,a,i){for(const s of e.sourceFrames){const o=s.ref;o!==void 0&&!r.has(o.modelEntityType)&&i("error",`A ${n} can only receive input from a ${a}, not from '${o.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},l(Db,"EventModelingValidator"),F(Db,"EventModelingValidator"),Db),WBe={parser:{TokenBuilder:F(()=>new zcr,"TokenBuilder"),ValueConverter:F(()=>new KE,"ValueConverter")},validation:{EventModelingValidator:F(()=>new Hcr,"EventModelingValidator")}};function VBe(t=po){const e=Mn(Gs(t),wl),r=Mn(Vs({shared:e}),Jlr,WBe);return e.ServiceRegistry.register(r),HBe(r),{shared:e,EventModel:r}}l(VBe,"createEventModelingServices"),F(VBe,"createEventModelingServices");var mo={},Wcr={info:F(()=>nt(this,null,function*(){const{createInfoServices:t}=yield Promise.resolve().then(function(){return uxr}),e=t().Info.parser.LangiumParser;mo.info=e}),"info"),packet:F(()=>nt(this,null,function*(){const{createPacketServices:t}=yield Promise.resolve().then(function(){return hxr}),e=t().Packet.parser.LangiumParser;mo.packet=e}),"packet"),pie:F(()=>nt(this,null,function*(){const{createPieServices:t}=yield Promise.resolve().then(function(){return dxr}),e=t().Pie.parser.LangiumParser;mo.pie=e}),"pie"),treeView:F(()=>nt(this,null,function*(){const{createTreeViewServices:t}=yield Promise.resolve().then(function(){return fxr}),e=t().TreeView.parser.LangiumParser;mo.treeView=e}),"treeView"),architecture:F(()=>nt(this,null,function*(){const{createArchitectureServices:t}=yield Promise.resolve().then(function(){return pxr}),e=t().Architecture.parser.LangiumParser;mo.architecture=e}),"architecture"),gitGraph:F(()=>nt(this,null,function*(){const{createGitGraphServices:t}=yield Promise.resolve().then(function(){return gxr}),e=t().GitGraph.parser.LangiumParser;mo.gitGraph=e}),"gitGraph"),eventmodeling:F(()=>nt(this,null,function*(){const{createEventModelingServices:t}=yield Promise.resolve().then(function(){return mxr}),e=t().EventModel.parser.LangiumParser;mo.eventmodeling=e}),"eventmodeling"),radar:F(()=>nt(this,null,function*(){const{createRadarServices:t}=yield Promise.resolve().then(function(){return yxr}),e=t().Radar.parser.LangiumParser;mo.radar=e}),"radar"),railroad:F(()=>nt(this,null,function*(){const{createRailroadServices:t}=yield Promise.resolve().then(function(){return vxr}),e=t().Railroad.parser.LangiumParser;mo.railroad=e}),"railroad"),railroadEbnf:F(()=>nt(this,null,function*(){const{createRailroadEbnfServices:t}=yield Promise.resolve().then(function(){return bxr}),e=t().RailroadEbnf.parser.LangiumParser;mo.railroadEbnf=e}),"railroadEbnf"),railroadAbnf:F(()=>nt(this,null,function*(){const{createRailroadAbnfServices:t}=yield Promise.resolve().then(function(){return xxr}),e=t().RailroadAbnf.parser.LangiumParser;mo.railroadAbnf=e}),"railroadAbnf"),railroadPeg:F(()=>nt(this,null,function*(){const{createRailroadPegServices:t}=yield Promise.resolve().then(function(){return wxr}),e=t().RailroadPeg.parser.LangiumParser;mo.railroadPeg=e}),"railroadPeg"),treemap:F(()=>nt(this,null,function*(){const{createTreemapServices:t}=yield Promise.resolve().then(function(){return Txr}),e=t().Treemap.parser.LangiumParser;mo.treemap=e}),"treemap"),wardley:F(()=>nt(this,null,function*(){const{createWardleyServices:t}=yield Promise.resolve().then(function(){return Exr}),e=t().Wardley.parser.LangiumParser;mo.wardley=e}),"wardley"),cynefin:F(()=>nt(this,null,function*(){const{createCynefinServices:t}=yield Promise.resolve().then(function(){return Cxr}),e=t().Cynefin.parser.LangiumParser;mo.cynefin=e}),"cynefin")};function pu(t,e){return nt(this,null,function*(){const r=Wcr[t];if(!r)throw new Error(`Unknown diagram type: ${t}`);mo[t]||(yield r());const a=mo[t].parse(e);if(a.lexerErrors.length>0||a.parserErrors.length>0)throw new uk(a);return a.value})}l(pu,"parse"),F(pu,"parse");var uk=(Fb=class extends Error{constructor(e){const r=e.lexerErrors.map(a=>{const i=a.line!==void 0&&!isNaN(a.line)?a.line:"?",s=a.column!==void 0&&!isNaN(a.column)?a.column:"?";return`Lexer error on line ${i}, column ${s}: ${a.message}`}).join(`
|
||
`),n=e.parserErrors.map(a=>{const i=a.token.startLine!==void 0&&!isNaN(a.token.startLine)?a.token.startLine:"?",s=a.token.startColumn!==void 0&&!isNaN(a.token.startColumn)?a.token.startColumn:"?";return`Parse error on line ${i}, column ${s}: ${a.message}`}).join(`
|
||
`);super(`Parsing failed: ${r} ${n}`),this.result=e}},l(Fb,"MermaidParseError"),F(Fb,"MermaidParseError"),Fb),va={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Vcr=hn.gitGraph,fy=_(()=>Ga(X(X({},Vcr),Ar().gitGraph)),"getConfig"),yr=new Bj(()=>{const t=fy(),e=t.mainBranchName,r=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:r}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function OP(){return M2e({length:7})}l(OP,"getID"),_(OP,"getID");function GBe(t,e){const r=Object.create(null);return t.reduce((n,a)=>{const i=e(a);return r[i]||(r[i]=!0,n.push(a)),n},[])}l(GBe,"uniqBy"),_(GBe,"uniqBy");var Gcr=_(function(t){yr.records.direction=t},"setDirection"),qcr=_(function(t){Le.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{yr.records.options=JSON.parse(t)}catch(e){Le.error("error while parsing gitGraph options",e.message)}},"setOptions"),Ycr=_(function(){return yr.records.options},"getOptions"),Ucr=_(function(t){let e=t.msg,r=t.id;const n=t.type;let a=t.tags;Le.info("commit",e,r,n,a),Le.debug("Entering commit:",e,r,n,a);const i=fy();r=or.sanitizeText(r,i),e=or.sanitizeText(e,i),a=a==null?void 0:a.map(o=>or.sanitizeText(o,i));const s={id:r||yr.records.seq+"-"+OP(),message:e,seq:yr.records.seq++,type:n!=null?n:va.NORMAL,tags:a!=null?a:[],parents:yr.records.head==null?[]:[yr.records.head.id],branch:yr.records.currBranch};yr.records.head=s,Le.info("main branch",i.mainBranchName),yr.records.commits.has(s.id)&&Le.warn(`Commit ID ${s.id} already exists`),yr.records.commits.set(s.id,s),yr.records.branches.set(yr.records.currBranch,s.id),Le.debug("in pushCommit "+s.id)},"commit"),jcr=_(function(t){let e=t.name;const r=t.order;if(e=or.sanitizeText(e,fy()),yr.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);yr.records.branches.set(e,yr.records.head!=null?yr.records.head.id:null),yr.records.branchConfig.set(e,{name:e,order:r}),qBe(e),Le.debug("in createBranch")},"branch"),Kcr=_(t=>{let e=t.branch,r=t.id;const n=t.type,a=t.tags,i=fy();e=or.sanitizeText(e,i),r&&(r=or.sanitizeText(r,i));const s=yr.records.branches.get(yr.records.currBranch),o=yr.records.branches.get(e),u=s?yr.records.commits.get(s):void 0,h=o?yr.records.commits.get(o):void 0;if(u&&h&&u.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(yr.records.currBranch===e){const p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p}if(u===void 0||!u){const p=new Error(`Incorrect usage of "merge". Current branch (${yr.records.currBranch})has no commits`);throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},p}if(!yr.records.branches.has(e)){const p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},p}if(h===void 0||!h){const p=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},p}if(u===h){const p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},p}if(r&&yr.records.commits.has(r)){const p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw p.hash={text:`merge ${e} ${r} ${n} ${a==null?void 0:a.join(" ")}`,token:`merge ${e} ${r} ${n} ${a==null?void 0:a.join(" ")}`,expected:[`merge ${e} ${r}_UNIQUE ${n} ${a==null?void 0:a.join(" ")}`]},p}const d=o||"",f={id:r||`${yr.records.seq}-${OP()}`,message:`merged branch ${e} into ${yr.records.currBranch}`,seq:yr.records.seq++,parents:yr.records.head==null?[]:[yr.records.head.id,d],branch:yr.records.currBranch,type:va.MERGE,customType:n,customId:!!r,tags:a!=null?a:[]};yr.records.head=f,yr.records.commits.set(f.id,f),yr.records.branches.set(yr.records.currBranch,f.id),Le.debug(yr.records.branches),Le.debug("in mergeBranch")},"merge"),Xcr=_(function(t){let e=t.id,r=t.targetId,n=t.tags,a=t.parent;Le.debug("Entering cherryPick:",e,r,n);const i=fy();if(e=or.sanitizeText(e,i),r=or.sanitizeText(r,i),n=n==null?void 0:n.map(u=>or.sanitizeText(u,i)),a=or.sanitizeText(a,i),!e||!yr.records.commits.has(e)){const u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},u}const s=yr.records.commits.get(e);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=s.branch;if(s.type===va.MERGE&&!a)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!yr.records.commits.has(r)){if(o===yr.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}const u=yr.records.branches.get(yr.records.currBranch);if(u===void 0||!u){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${yr.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}const h=yr.records.commits.get(u);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${yr.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${e} ${r}`,token:`cherryPick ${e} ${r}`,expected:["cherry-pick abc"]},f}const d={id:yr.records.seq+"-"+OP(),message:`cherry-picked ${s==null?void 0:s.message} into ${yr.records.currBranch}`,seq:yr.records.seq++,parents:yr.records.head==null?[]:[yr.records.head.id,s.id],branch:yr.records.currBranch,type:va.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===va.MERGE?`|parent:${a}`:""}`]};yr.records.head=d,yr.records.commits.set(d.id,d),yr.records.branches.set(yr.records.currBranch,d.id),Le.debug(yr.records.branches),Le.debug("in cherryPick")}},"cherryPick"),qBe=_(function(t){var e;if(t=or.sanitizeText(t,fy()),yr.records.branches.has(t)){yr.records.currBranch=t;const r=yr.records.branches.get(yr.records.currBranch);r===void 0||!r?yr.records.head=null:yr.records.head=(e=yr.records.commits.get(r))!=null?e:null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function see(t,e,r){const n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}l(see,"upsert"),_(see,"upsert");function oee(t){const e=t.reduce((a,i)=>a.seq>i.seq?a:i,t[0]);let r="";t.forEach(function(a){a===e?r+=" *":r+=" |"});const n=[r,e.id,e.seq];for(const a in yr.records.branches)yr.records.branches.get(a)===e.id&&n.push(a);if(Le.debug(n.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const a=yr.records.commits.get(e.parents[0]);see(t,e,a),e.parents[1]&&t.push(yr.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const a=yr.records.commits.get(e.parents[0]);see(t,e,a)}}t=GBe(t,a=>a.id),oee(t)}l(oee,"prettyPrintCommitHistory"),_(oee,"prettyPrintCommitHistory");var Zcr=_(function(){Le.debug(yr.records.commits);const t=YBe()[0];oee([t])},"prettyPrint"),Qcr=_(function(){yr.reset(),Ca()},"clear"),Jcr=_(function(){return[...yr.records.branchConfig.values()].map((e,r)=>e.order!==null&&e.order!==void 0?e:Ne(X({},e),{order:parseFloat(`0.${r}`)})).sort((e,r)=>{var n,a;return((n=e.order)!=null?n:0)-((a=r.order)!=null?a:0)}).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),eur=_(function(){return yr.records.branches},"getBranches"),tur=_(function(){return yr.records.commits},"getCommits"),YBe=_(function(){const t=[...yr.records.commits.values()];return t.forEach(function(e){Le.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},"getCommitsArray"),rur=_(function(){return yr.records.currBranch},"getCurrentBranch"),nur=_(function(){return yr.records.direction},"getDirection"),aur=_(function(){return yr.records.head},"getHead"),UBe={commitType:va,getConfig:fy,setDirection:Gcr,setOptions:qcr,getOptions:Ycr,commit:Ucr,branch:jcr,merge:Kcr,cherryPick:Xcr,checkout:qBe,prettyPrint:Zcr,clear:Qcr,getBranchesAsObjArray:Jcr,getBranches:eur,getCommits:tur,getCommitsArray:YBe,getCurrentBranch:rur,getDirection:nur,getHead:aur,setAccTitle:Na,getAccTitle:za,getAccDescription:Wa,setAccDescription:Ha,setDiagramTitle:Va,getDiagramTitle:Ia},iur=_((t,e)=>{hl(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)sur(r,e)},"populate"),sur=_((t,e)=>{const n={Commit:_(a=>e.commit(our(a)),"Commit"),Branch:_(a=>e.branch(lur(a)),"Branch"),Merge:_(a=>e.merge(cur(a)),"Merge"),Checkout:_(a=>e.checkout(uur(a)),"Checkout"),CherryPicking:_(a=>e.cherryPick(hur(a)),"CherryPicking")}[t.$type];n?n(t):Le.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),our=_(t=>{var r,n;return{id:t.id,msg:(r=t.message)!=null?r:"",type:t.type!==void 0?va[t.type]:va.NORMAL,tags:(n=t.tags)!=null?n:void 0}},"parseCommit"),lur=_(t=>{var r;return{name:t.name,order:(r=t.order)!=null?r:0}},"parseBranch"),cur=_(t=>{var r,n;return{branch:t.branch,id:(r=t.id)!=null?r:"",type:t.type!==void 0?va[t.type]:void 0,tags:(n=t.tags)!=null?n:void 0}},"parseMerge"),uur=_(t=>t.branch,"parseCheckout"),hur=_(t=>{var r;return{id:t.id,targetId:"",tags:((r=t.tags)==null?void 0:r.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),dur={parse:_(t=>nt(this,null,function*(){const e=yield pu("gitGraph",t);Le.debug(e),iur(e,UBe)}),"parse")},eg=10,tg=40,Ad=4,t0=2,py=8,DP=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),lee=12,cee=new Set(["redux-color","redux-dark-color"]),fur=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),gy=_((t,e,r=!1)=>r&&t>0?(t-1)%(e-1)+1:t%e,"calcColorIndex"),Jl=new Map,ec=new Map,FP=30,hk=new Map,BP=[],r0=0,bn="LR",pur=_(()=>{Jl.clear(),ec.clear(),hk.clear(),r0=0,BP=[],bn="LR"},"clear"),jBe=_(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),a.setAttribute("class","row"),a.textContent=n.trim(),e.appendChild(a)}),e},"drawText"),KBe=_(t=>{let e,r,n;return bn==="BT"?(r=_((a,i)=>a<=i,"comparisonFunc"),n=1/0):(r=_((a,i)=>a>=i,"comparisonFunc"),n=0),t.forEach(a=>{var s,o;const i=bn==="TB"||bn=="BT"?(s=ec.get(a))==null?void 0:s.y:(o=ec.get(a))==null?void 0:o.x;i!==void 0&&r(i,n)&&(e=a,n=i)}),e},"findClosestParent"),gur=_(t=>{let e="",r=1/0;return t.forEach(n=>{const a=ec.get(n).y;a<=r&&(e=n,r=a)}),e||void 0},"findClosestParentBT"),mur=_((t,e,r)=>{let n=r,a=r;const i=[];t.forEach(s=>{const o=e.get(s);if(!o)throw new Error(`Commit not found for key ${s}`);o.parents.length?(n=vur(o),a=Math.max(n,a)):i.push(o),bur(o,n)}),n=a,i.forEach(s=>{xur(s,n,r)}),t.forEach(s=>{const o=e.get(s);if(o!=null&&o.parents.length){const u=gur(o.parents);n=ec.get(u).y-tg,n<=a&&(a=n);const h=Jl.get(o.branch).pos,d=n-eg;ec.set(o.id,{x:h,y:d})}})},"setParallelBTPos"),yur=_(t=>{var n;const e=KBe(t.parents.filter(a=>a!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const r=(n=ec.get(e))==null?void 0:n.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return r},"findClosestParentPos"),vur=_(t=>yur(t)+tg,"calculateCommitPosition"),bur=_((t,e)=>{const r=Jl.get(t.branch);if(!r)throw new Error(`Branch not found for commit ${t.id}`);const n=r.pos,a=e+eg;return ec.set(t.id,{x:n,y:a}),{x:n,y:a}},"setCommitPosition"),xur=_((t,e,r)=>{const n=Jl.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const a=e+r,i=n.pos;ec.set(t.id,{x:i,y:a})},"setRootPosition"),wur=_((t,e,r,n,a,i)=>{const{theme:s}=ft(),o=DP.has(s!=null?s:""),u=cee.has(s!=null?s:""),h=fur.has(s!=null?s:"");if(i===va.HIGHLIGHT)t.append("rect").attr("x",r.x-10+(o?3:0)).attr("y",r.y-10+(o?3:0)).attr("width",o?14:20).attr("height",o?14:20).attr("class",`commit ${e.id} commit-highlight${gy(a,py,u)} ${n}-outer`),t.append("rect").attr("x",r.x-6+(o?2:0)).attr("y",r.y-6+(o?2:0)).attr("width",o?8:12).attr("height",o?8:12).attr("class",`commit ${e.id} commit${gy(a,py,u)} ${n}-inner`);else if(i===va.CHERRY_PICK)t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",o?7:10).attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${e.id} ${n}`),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",o?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${e.id} ${n}`),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${e.id} ${n}`);else{const d=t.append("circle");if(d.attr("cx",r.x),d.attr("cy",r.y),d.attr("r",o?7:10),d.attr("class",`commit ${e.id} commit${gy(a,py,u)}`),i===va.MERGE){const f=t.append("circle");f.attr("cx",r.x),f.attr("cy",r.y),f.attr("r",o?5:6),f.attr("class",`commit ${n} ${e.id} commit${gy(a,py,u)}`)}if(i===va.REVERSE){const f=t.append("path"),p=o?4:5;f.attr("d",`M ${r.x-p},${r.y-p}L${r.x+p},${r.y+p}M${r.x-p},${r.y+p}L${r.x+p},${r.y-p}`).attr("class",`commit ${n} ${e.id} commit${gy(a,py,u)}`)}}},"drawCommitBullet"),Tur=_((t,e,r,n,a)=>{var i;if(e.type!==va.CHERRY_PICK&&(e.customId&&e.type===va.MERGE||e.type!==va.MERGE)&&a.showCommitLabel){const s=t.append("g"),o=s.insert("rect").attr("class","commit-label-bkg"),u=s.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id),h=(i=u.node())==null?void 0:i.getBBox();if(h&&(o.attr("x",r.posWithOffset-h.width/2-t0).attr("y",r.y+13.5).attr("width",h.width+2*t0).attr("height",h.height+2*t0),bn==="TB"||bn==="BT"?(o.attr("x",r.x-(h.width+4*Ad+5)).attr("y",r.y-12),u.attr("x",r.x-(h.width+4*Ad)).attr("y",r.y+h.height-12)):u.attr("x",r.posWithOffset-h.width/2),a.rotateCommitLabel))if(bn==="TB"||bn==="BT")u.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),o.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{const d=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;s.attr("transform","translate("+d+", "+f+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),Eur=_((t,e,r,n)=>{var a;if(e.tags.length>0){let i=0,s=0,o=0;const u=[];for(const h of e.tags.reverse()){const d=t.insert("polygon"),f=t.append("circle"),p=t.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(h),g=(a=p.node())==null?void 0:a.getBBox();if(!g)throw new Error("Tag bbox not found");s=Math.max(s,g.width),o=Math.max(o,g.height),p.attr("x",r.posWithOffset-g.width/2),u.push({tag:p,hole:f,rect:d,yOffset:i}),i+=20}for(const{tag:h,hole:d,rect:f,yOffset:p}of u){const g=o/2,m=r.y-19.2-p;if(f.attr("class","tag-label-bkg").attr("points",`
|
||
${n-s/2-Ad/2},${m+t0}
|
||
${n-s/2-Ad/2},${m-t0}
|
||
${r.posWithOffset-s/2-Ad},${m-g-t0}
|
||
${r.posWithOffset+s/2+Ad},${m-g-t0}
|
||
${r.posWithOffset+s/2+Ad},${m+g+t0}
|
||
${r.posWithOffset-s/2-Ad},${m+g+t0}`),d.attr("cy",m).attr("cx",n-s/2+Ad/2).attr("r",1.5).attr("class","tag-hole"),bn==="TB"||bn==="BT"){const y=n+p;f.attr("class","tag-label-bkg").attr("points",`
|
||
${r.x},${y+2}
|
||
${r.x},${y-2}
|
||
${r.x+eg},${y-g-2}
|
||
${r.x+eg+s+4},${y-g-2}
|
||
${r.x+eg+s+4},${y+g+2}
|
||
${r.x+eg},${y+g+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),d.attr("cx",r.x+Ad/2).attr("cy",y).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),h.attr("x",r.x+5).attr("y",y+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),Cur=_(t=>{var r;switch((r=t.customType)!=null?r:t.type){case va.NORMAL:return"commit-normal";case va.REVERSE:return"commit-reverse";case va.HIGHLIGHT:return"commit-highlight";case va.MERGE:return"commit-merge";case va.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Sur=_((t,e,r,n)=>{var i,s,o;const a={x:0,y:0};if(t.parents.length>0){const u=KBe(t.parents);if(u){const h=(i=n.get(u))!=null?i:a;return e==="TB"?h.y+tg:e==="BT"?((s=n.get(t.id))!=null?s:a).y-tg:h.x+tg}}else return e==="TB"?FP:e==="BT"?((o=n.get(t.id))!=null?o:a).y-tg:0;return 0},"calculatePosition"),_ur=_((t,e,r)=>{var u,h,d;const n=bn==="BT"&&r?e:e+eg,a=(u=Jl.get(t.branch))==null?void 0:u.pos,i=bn==="TB"||bn==="BT"?(h=Jl.get(t.branch))==null?void 0:h.pos:n;if(i===void 0||a===void 0)throw new Error(`Position were undefined for commit ${t.id}`);const s=DP.has((d=ft().theme)!=null?d:""),o=bn==="TB"||bn==="BT"?n:a+(s?lee/2+1:-2);return{x:i,y:o,posWithOffset:n}},"getCommitPosition"),XBe=_((t,e,r,n)=>{var f;const a=t.append("g").attr("class","commit-bullets"),i=t.append("g").attr("class","commit-labels");let s=bn==="TB"||bn==="BT"?FP:0;const o=[...e.keys()],u=(f=n.parallelCommits)!=null?f:!1,h=_((p,g)=>{var v,b;const m=(v=e.get(p))==null?void 0:v.seq,y=(b=e.get(g))==null?void 0:b.seq;return m!==void 0&&y!==void 0?m-y:0},"sortKeys");let d=o.sort(h);bn==="BT"&&(u&&mur(d,e,s),d=d.reverse()),d.forEach(p=>{var y,v,b;const g=e.get(p);if(!g)throw new Error(`Commit not found for key ${p}`);u&&(s=Sur(g,bn,s,ec));const m=_ur(g,s,u);if(r){const w=Cur(g),x=(y=g.customType)!=null?y:g.type,T=(b=(v=Jl.get(g.branch))==null?void 0:v.index)!=null?b:0;wur(a,g,m,w,T,x),Tur(i,g,m,s,n),Eur(i,g,m,s)}bn==="TB"||bn==="BT"?ec.set(g.id,{x:m.x,y:m.posWithOffset}):ec.set(g.id,{x:m.posWithOffset,y:m.y}),s=bn==="BT"&&u?s+tg:s+tg+eg,s>r0&&(r0=s)})},"drawCommits"),kur=_((t,e,r,n,a)=>{const s=(bn==="TB"||bn==="BT"?r.x<n.x:r.y<n.y)?e.branch:t.branch,o=_(h=>h.branch===s,"isOnBranchToGetCurve"),u=_(h=>h.seq>t.seq&&h.seq<e.seq,"isBetweenCommits");return[...a.values()].some(h=>u(h)&&o(h))},"shouldRerouteArrow"),dk=_((t,e,r=0)=>{const n=t+Math.abs(t-e)/2;if(r>5)return n;if(BP.every(s=>Math.abs(s-n)>=10))return BP.push(n),n;const i=Math.abs(t-e);return dk(t,e-i/5,r+1)},"findLane"),Aur=_((t,e,r,n)=>{var y,v,b,w,x;const{theme:a}=ft(),i=cee.has(a!=null?a:""),s=ec.get(e.id),o=ec.get(r.id);if(s===void 0||o===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${r.id}`);const u=kur(e,r,s,o,n);let h="",d="",f=0,p=0,g=(y=Jl.get(r.branch))==null?void 0:y.index;r.type===va.MERGE&&e.id!==r.parents[0]&&(g=(v=Jl.get(e.branch))==null?void 0:v.index);let m;if(u){h="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",f=10,p=10;const T=s.y<o.y?dk(s.y,o.y):dk(o.y,s.y),C=s.x<o.x?dk(s.x,o.x):dk(o.x,s.x);bn==="TB"?s.x<o.x?m=`M ${s.x} ${s.y} L ${C-f} ${s.y} ${d} ${C} ${s.y+p} L ${C} ${o.y-f} ${h} ${C+p} ${o.y} L ${o.x} ${o.y}`:(g=(b=Jl.get(e.branch))==null?void 0:b.index,m=`M ${s.x} ${s.y} L ${C+f} ${s.y} ${h} ${C} ${s.y+p} L ${C} ${o.y-f} ${d} ${C-p} ${o.y} L ${o.x} ${o.y}`):bn==="BT"?s.x<o.x?m=`M ${s.x} ${s.y} L ${C-f} ${s.y} ${h} ${C} ${s.y-p} L ${C} ${o.y+f} ${d} ${C+p} ${o.y} L ${o.x} ${o.y}`:(g=(w=Jl.get(e.branch))==null?void 0:w.index,m=`M ${s.x} ${s.y} L ${C+f} ${s.y} ${d} ${C} ${s.y-p} L ${C} ${o.y+f} ${h} ${C-p} ${o.y} L ${o.x} ${o.y}`):s.y<o.y?m=`M ${s.x} ${s.y} L ${s.x} ${T-f} ${h} ${s.x+p} ${T} L ${o.x-f} ${T} ${d} ${o.x} ${T+p} L ${o.x} ${o.y}`:(g=(x=Jl.get(e.branch))==null?void 0:x.index,m=`M ${s.x} ${s.y} L ${s.x} ${T+f} ${d} ${s.x+p} ${T} L ${o.x-f} ${T} ${h} ${o.x} ${T-p} L ${o.x} ${o.y}`)}else h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,bn==="TB"?(s.x<o.x&&(r.type===va.MERGE&&e.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${s.x} ${o.y-f} ${h} ${s.x+p} ${o.y} L ${o.x} ${o.y}`:m=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${d} ${o.x} ${s.y+p} L ${o.x} ${o.y}`),s.x>o.x&&(h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,r.type===va.MERGE&&e.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${s.x} ${o.y-f} ${d} ${s.x-p} ${o.y} L ${o.x} ${o.y}`:m=`M ${s.x} ${s.y} L ${o.x+f} ${s.y} ${h} ${o.x} ${s.y+p} L ${o.x} ${o.y}`),s.x===o.x&&(m=`M ${s.x} ${s.y} L ${o.x} ${o.y}`)):bn==="BT"?(s.x<o.x&&(r.type===va.MERGE&&e.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${d} ${s.x+p} ${o.y} L ${o.x} ${o.y}`:m=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${h} ${o.x} ${s.y-p} L ${o.x} ${o.y}`),s.x>o.x&&(h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,r.type===va.MERGE&&e.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${h} ${s.x-p} ${o.y} L ${o.x} ${o.y}`:m=`M ${s.x} ${s.y} L ${o.x+f} ${s.y} ${d} ${o.x} ${s.y-p} L ${o.x} ${o.y}`),s.x===o.x&&(m=`M ${s.x} ${s.y} L ${o.x} ${o.y}`)):(s.y<o.y&&(r.type===va.MERGE&&e.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${d} ${o.x} ${s.y+p} L ${o.x} ${o.y}`:m=`M ${s.x} ${s.y} L ${s.x} ${o.y-f} ${h} ${s.x+p} ${o.y} L ${o.x} ${o.y}`),s.y>o.y&&(r.type===va.MERGE&&e.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${o.x-f} ${s.y} ${h} ${o.x} ${s.y-p} L ${o.x} ${o.y}`:m=`M ${s.x} ${s.y} L ${s.x} ${o.y+f} ${d} ${s.x+p} ${o.y} L ${o.x} ${o.y}`),s.y===o.y&&(m=`M ${s.x} ${s.y} L ${o.x} ${o.y}`));if(m===void 0)throw new Error("Line definition not found");t.append("path").attr("d",m).attr("class","arrow arrow"+gy(g,py,i))},"drawArrow"),Nur=_((t,e)=>{const r=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(n=>{const a=e.get(n);a.parents&&a.parents.length>0&&a.parents.forEach(i=>{Aur(r,e.get(i),a,e)})})},"drawArrows"),Iur=_((t,e,r,n)=>{const{look:a,theme:i,themeVariables:s}=ft(),{dropShadow:o,THEME_COLOR_LIMIT:u}=s,h=DP.has(i!=null?i:""),d=cee.has(i!=null?i:""),f=t.append("g");e.forEach((p,g)=>{var L;const m=gy(g,h?u:py,d),y=(L=Jl.get(p.name))==null?void 0:L.pos;if(y===void 0)throw new Error(`Position not found for branch ${p.name}`);const v=bn==="TB"||bn==="BT"?y:h?y+lee/2+1:y-2,b=f.append("line");b.attr("x1",0),b.attr("y1",v),b.attr("x2",r0),b.attr("y2",v),b.attr("class","branch branch"+m),bn==="TB"?(b.attr("y1",FP),b.attr("x1",y),b.attr("y2",r0),b.attr("x2",y)):bn==="BT"&&(b.attr("y1",r0),b.attr("x1",y),b.attr("y2",FP),b.attr("x2",y)),BP.push(v);const w=p.name,x=jBe(w),T=f.insert("rect"),S=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+m);S.node().appendChild(x);const E=x.getBBox(),k=h?0:4,A=h?16:0,I=h?lee:0;a==="neo"&&T.attr("data-look","neo"),T.attr("class","branchLabelBkg label"+m).attr("style",a==="neo"?`filter:${h?`url(#${n}-drop-shadow)`:o}`:"").attr("rx",k).attr("ry",k).attr("x",-E.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-E.height/2+10).attr("width",E.width+18+A).attr("height",E.height+4+I),S.attr("transform","translate("+(-E.width-14-(r.rotateCommitLabel===!0?30:0)+A/2)+", "+(v-E.height/2-2)+")"),bn==="TB"?(T.attr("x",y-E.width/2-10).attr("y",0),S.attr("transform","translate("+(y-E.width/2-5)+", 0)"),h&&(T.attr("transform",`translate(${-A/2-3}, ${-I-10})`),S.attr("transform","translate("+(y-E.width/2-5)+", "+(-I*2+7)+")"))):bn==="BT"?(T.attr("x",y-E.width/2-10).attr("y",r0),S.attr("transform","translate("+(y-E.width/2-5)+", "+r0+")"),h&&(T.attr("transform",`translate(${-A/2-3}, ${I+10})`),S.attr("transform","translate("+(y-E.width/2-5)+", "+(r0+I*2+4)+")"))):T.attr("transform","translate(-19, "+(v-12-I/2)+")")})},"drawBranches"),Lur=_(function(t,e,r,n,a){return Jl.set(t,{pos:e,index:r}),e+=50+(a?40:0)+(bn==="TB"||bn==="BT"?n.width/2:0),e},"setBranchPosition"),$ur=_(function(t,e,r,n){var b,w;pur(),Le.debug("in gitgraph renderer",t+`
|
||
`,"id:",e,r);const a=n.db;if(!a.getConfig){Le.error("getConfig method is not available on db");return}const i=a.getConfig(),s=(b=i.rotateCommitLabel)!=null?b:!1;hk=a.getCommits();const o=a.getBranchesAsObjArray();bn=a.getDirection();const u=Yt(`[id="${e}"]`),{look:h,theme:d,themeVariables:f}=ft(),{useGradient:p,gradientStart:g,gradientStop:m,filterColor:y}=f;if(p){const x=u.append("defs").append("linearGradient").attr("id",e+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");x.append("stop").attr("offset","0%").attr("stop-color",g).attr("stop-opacity",1),x.append("stop").attr("offset","100%").attr("stop-color",m).attr("stop-opacity",1)}h==="neo"&&DP.has(d!=null?d:"")&&u.append("defs").append("filter").attr("id",e+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",y);let v=0;o.forEach((x,T)=>{var I;const C=jBe(x.name),S=u.append("g"),E=S.insert("g").attr("class","branchLabel"),k=E.insert("g").attr("class","label branch-label");(I=k.node())==null||I.appendChild(C);const A=C.getBBox();v=Lur(x.name,v,T,A,s),k.remove(),E.remove(),S.remove()}),XBe(u,hk,!1,i),i.showBranches&&Iur(u,o,i,e),Nur(u,hk),XBe(u,hk,!0,i),Wr.insertTitle(u,"gitTitleText",(w=i.titleTopMargin)!=null?w:0,a.getDiagramTitle()),Bz(void 0,u,i.diagramPadding,i.useMaxWidth)},"draw"),Mur={draw:$ur},ZBe=8,QBe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Pur=new Set(["redux-color","redux-dark-color"]),Rur=new Set(["neo","neo-dark"]),Our=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Dur=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),Fur=_(t=>{const{svgId:e}=t;let r="";if(t.useGradient&&e)for(let n=0;n<t.THEME_COLOR_LIMIT;n++)r+=`
|
||
.label${n} { fill: ${t.mainBkg}; stroke: url(${e}-gradient); stroke-width: ${t.strokeWidth};}
|
||
`;return r},"genGitGraphGradient"),Bur=_(t=>{const e=Ar(),{theme:r,themeVariables:n}=e,{borderColorArray:a}=n,i=QBe.has(r);if(Rur.has(r)){let s="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(o===0)s+=`
|
||
.branch-label${o} { fill: ${t.nodeBorder};}
|
||
.commit${o} { stroke: ${t.nodeBorder}; }
|
||
.commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }
|
||
.arrow${o} { stroke: ${t.nodeBorder}; }
|
||
.commit-bullets { fill: ${t.nodeBorder}; }
|
||
.commit-cherry-pick${o} { stroke: ${t.nodeBorder}; }
|
||
${Fur(t)}`;else{const u=o%ZBe;s+=`
|
||
.branch-label${o} { fill: ${t["gitBranchLabel"+u]}; }
|
||
.commit${o} { stroke: ${t["git"+u]}; fill: ${t["git"+u]}; }
|
||
.commit-highlight${o} { stroke: ${t["gitInv"+u]}; fill: ${t["gitInv"+u]}; }
|
||
.arrow${o} { stroke: ${t["git"+u]}; }
|
||
`}return s}else if(Pur.has(r)){let s="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(o===0)s+=`
|
||
.branch-label${o} { fill: ${t.nodeBorder}; ${i?`font-weight:${t.noteFontWeight}`:""} }
|
||
.commit${o} { stroke: ${t.nodeBorder}; }
|
||
.commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }
|
||
.label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${i?`font-weight:${t.noteFontWeight}`:""} }
|
||
.arrow${o} { stroke: ${t.nodeBorder}; }
|
||
.commit-bullets { fill: ${t.nodeBorder}; }
|
||
`;else{const u=o%a.length;s+=`
|
||
.branch-label${o} { fill: ${t.nodeBorder}; ${i?`font-weight:${t.noteFontWeight}`:""} }
|
||
.commit${o} { stroke: ${a[u]}; fill: ${a[u]}; }
|
||
.commit-highlight${o} { stroke: ${a[u]}; fill: ${a[u]}; }
|
||
.label${o} { fill: ${Our.has(r)?t.mainBkg:a[u]}; stroke: ${a[u]}; stroke-width: ${t.strokeWidth}; }
|
||
.arrow${o} { stroke: ${a[u]}; }
|
||
`}return s}else{let s="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)s+=`
|
||
.branch-label${o} { fill: ${t.nodeBorder}; ${i?`font-weight:${t.noteFontWeight}`:""} }
|
||
.commit${o} { stroke: ${t.nodeBorder}; }
|
||
.commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }
|
||
.label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${i?`font-weight:${t.noteFontWeight}`:""}}
|
||
.arrow${o} { stroke: ${t.nodeBorder}; }
|
||
.commit-bullets { fill: ${t.nodeBorder}; }
|
||
.commit-cherry-pick${o} { stroke: ${t.nodeBorder}; }
|
||
`;return s}},"genColor"),zur=_(t=>`${Array.from({length:t.THEME_COLOR_LIMIT},(e,r)=>r).map(e=>{const r=e%ZBe;return`
|
||
.branch-label${e} { fill: ${t["gitBranchLabel"+r]}; }
|
||
.commit${e} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }
|
||
.commit-highlight${e} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }
|
||
.label${e} { fill: ${t["git"+r]}; }
|
||
.arrow${e} { stroke: ${t["git"+r]}; }
|
||
`}).join(`
|
||
`)}`,"normalTheme"),Hur=_(t=>{var a;const e=Ar(),{theme:r}=e,n=Dur.has(r);return`
|
||
.commit-id,
|
||
.commit-msg,
|
||
.branch-label {
|
||
fill: lightgrey;
|
||
color: lightgrey;
|
||
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
||
font-family: var(--mermaid-font-family);
|
||
}
|
||
|
||
${n?Bur(t):zur(t)}
|
||
|
||
.branch {
|
||
stroke-width: ${t.strokeWidth};
|
||
stroke: ${(a=t.commitLineColor)!=null?a:t.lineColor};
|
||
stroke-dasharray: ${n?"4 2":"2"};
|
||
}
|
||
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${n?t.nodeBorder:t.commitLabelColor}; ${n?`font-weight:${t.noteFontWeight};`:""}}
|
||
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${n?"transparent":t.commitLabelBackground}; opacity: ${n?"":.5}; }
|
||
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
||
.tag-label-bkg { fill: ${n?t.mainBkg:t.tagLabelBackground}; stroke: ${n?t.nodeBorder:t.tagLabelBorder}; ${n?`filter:${t.dropShadow}`:""} }
|
||
.tag-hole { fill: ${t.textColor}; }
|
||
|
||
.commit-merge {
|
||
stroke: ${n?t.mainBkg:t.primaryColor};
|
||
fill: ${n?t.mainBkg:t.primaryColor};
|
||
}
|
||
.commit-reverse {
|
||
stroke: ${n?t.mainBkg:t.primaryColor};
|
||
fill: ${n?t.mainBkg:t.primaryColor};
|
||
stroke-width: ${n?t.strokeWidth:3};
|
||
}
|
||
.commit-highlight-outer {
|
||
}
|
||
.commit-highlight-inner {
|
||
stroke: ${n?t.mainBkg:t.primaryColor};
|
||
fill: ${n?t.mainBkg:t.primaryColor};
|
||
}
|
||
|
||
.arrow {
|
||
/* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
|
||
stroke-width: ${QBe.has(r)?t.strokeWidth:8};
|
||
stroke-linecap: round;
|
||
fill: none
|
||
}
|
||
.gitTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
`},"getStyles"),Wur=Hur,Vur={parser:dur,db:UBe,renderer:Mur,styles:Wur},Gur=Object.freeze({__proto__:null,diagram:Vur}),JBe={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Nl,function(){var r="day";return function(n,a,i){var s=l(function(h){return h.add(4-h.isoWeekday(),r)},"a"),o=a.prototype;o.isoWeekYear=function(){return s(this).year()},o.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),r);var d,f,p,g,m=s(this),y=(d=this.isoWeekYear(),f=this.$u,p=(f?i.utc:i)().year(d).startOf("year"),g=4-p.isoWeekday(),p.isoWeekday()>4&&(g+=7),p.add(g,r));return m.diff(y,"week")+1},o.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var u=o.startOf;o.startOf=function(h,d){var f=this.$utils(),p=!!f.u(d)||d;return f.p(h)==="isoweek"?p?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(h,d)}}})})(JBe);var qur=JBe.exports,Yur=Pd(qur),eze={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Nl,function(){var r={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,i=/\d\d/,s=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,u={},h=l(function(v){return(v=+v)+(v>68?1900:2e3)},"a"),d=l(function(v){return function(b){this[v]=+b}},"f"),f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var w=b.match(/([+-]|\d\d)/g),x=60*w[1]+(+w[2]||0);return x===0?0:w[0]==="+"?-x:x}(v)}],p=l(function(v){var b=u[v];return b&&(b.indexOf?b:b.s.concat(b.f))},"u"),g=l(function(v,b){var w,x=u.meridiem;if(x){for(var T=1;T<=24;T+=1)if(v.indexOf(x(T,0,b))>-1){w=T>12;break}}else w=v===(b?"pm":"PM");return w},"d"),m={A:[o,function(v){this.afternoon=g(v,!1)}],a:[o,function(v){this.afternoon=g(v,!0)}],Q:[a,function(v){this.month=3*(v-1)+1}],S:[a,function(v){this.milliseconds=100*+v}],SS:[i,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[s,d("seconds")],ss:[s,d("seconds")],m:[s,d("minutes")],mm:[s,d("minutes")],H:[s,d("hours")],h:[s,d("hours")],HH:[s,d("hours")],hh:[s,d("hours")],D:[s,d("day")],DD:[i,d("day")],Do:[o,function(v){var b=u.ordinal,w=v.match(/\d+/);if(this.day=w[0],b)for(var x=1;x<=31;x+=1)b(x).replace(/\[|\]/g,"")===v&&(this.day=x)}],w:[s,d("week")],ww:[i,d("week")],M:[s,d("month")],MM:[i,d("month")],MMM:[o,function(v){var b=p("months"),w=(p("monthsShort")||b.map(function(x){return x.slice(0,3)})).indexOf(v)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[o,function(v){var b=p("months").indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,d("year")],YY:[i,function(v){this.year=h(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function y(v){var b,w;b=v,w=u&&u.formats;for(var x=(v=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,L,R){var O=R&&R.toUpperCase();return L||w[R]||r[R]||w[O].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(M,P,z){return P||z.slice(1)})})).match(n),T=x.length,C=0;C<T;C+=1){var S=x[C],E=m[S],k=E&&E[0],A=E&&E[1];x[C]=A?{regex:k,parser:A}:S.replace(/^\[|\]$/g,"")}return function(I){for(var L={},R=0,O=0;R<T;R+=1){var M=x[R];if(typeof M=="string")O+=M.length;else{var P=M.regex,z=M.parser,D=I.slice(O),B=P.exec(D)[0];z.call(L,B),I=I.replace(B,"")}}return function(W){var U=W.afternoon;if(U!==void 0){var j=W.hours;U?j<12&&(W.hours+=12):j===12&&(W.hours=0),delete W.afternoon}}(L),L}}return l(y,"l"),function(v,b,w){w.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(h=v.parseTwoDigitYear);var x=b.prototype,T=x.parse;x.parse=function(C){var S=C.date,E=C.utc,k=C.args;this.$u=E;var A=k[1];if(typeof A=="string"){var I=k[2]===!0,L=k[3]===!0,R=I||L,O=k[2];L&&(O=k[2]),u=this.$locale(),!I&&O&&(u=w.Ls[O]),this.$d=function(D,B,W,U){try{if(["x","X"].indexOf(B)>-1)return new Date((B==="X"?1e3:1)*D);var j=y(B)(D),V=j.year,Y=j.month,H=j.day,q=j.hours,Z=j.minutes,K=j.seconds,re=j.milliseconds,Q=j.zone,te=j.week,ee=new Date,J=H||(V||Y?1:ee.getDate()),ae=V||ee.getFullYear(),se=0;V&&!Y||(se=Y>0?Y-1:ee.getMonth());var fe,ve=q||0,de=Z||0,Ee=K||0,Ce=re||0;return Q?new Date(Date.UTC(ae,se,J,ve,de,Ee,Ce+60*Q.offset*1e3)):W?new Date(Date.UTC(ae,se,J,ve,de,Ee,Ce)):(fe=new Date(ae,se,J,ve,de,Ee,Ce),te&&(fe=U(fe).week(te).toDate()),fe)}catch(De){return new Date("")}}(S,A,E,w),this.init(),O&&O!==!0&&(this.$L=this.locale(O).$L),R&&S!=this.format(A)&&(this.$d=new Date("")),u={}}else if(A instanceof Array)for(var M=A.length,P=1;P<=M;P+=1){k[1]=A[P-1];var z=w.apply(this,k);if(z.isValid()){this.$d=z.$d,this.$L=z.$L,this.init();break}P===M&&(this.$d=new Date(""))}else T.call(this,C)}}})})(eze);var Uur=eze.exports,jur=Pd(Uur),tze={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Nl,function(){return function(r,n){var a=n.prototype,i=a.format;a.format=function(s){var o=this,u=this.$locale();if(!this.isValid())return i.bind(this)(s);var h=this.$utils(),d=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(f){switch(f){case"Q":return Math.ceil((o.$M+1)/3);case"Do":return u.ordinal(o.$D);case"gggg":return o.weekYear();case"GGGG":return o.isoWeekYear();case"wo":return u.ordinal(o.week(),"W");case"w":case"ww":return h.s(o.week(),f==="w"?1:2,"0");case"W":case"WW":return h.s(o.isoWeek(),f==="W"?1:2,"0");case"k":case"kk":return h.s(String(o.$H===0?24:o.$H),f==="k"?1:2,"0");case"X":return Math.floor(o.$d.getTime()/1e3);case"x":return o.$d.getTime();case"z":return"["+o.offsetName()+"]";case"zzz":return"["+o.offsetName("long")+"]";default:return f}});return i.bind(this)(d)}}})})(tze);var Kur=tze.exports,Xur=Pd(Kur),rze={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Nl,function(){var r,n,a=1e3,i=6e4,s=36e5,o=864e5,u=31536e6,h=2628e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,f=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,p={years:u,months:h,days:o,hours:s,minutes:i,seconds:a,milliseconds:1,weeks:6048e5},g=l(function(S){return S instanceof T},"c"),m=l(function(S,E,k){return new T(S,k,E.$l)},"f"),y=l(function(S){return n.p(S)+"s"},"m"),v=l(function(S){return S<0},"l"),b=l(function(S){return v(S)?Math.ceil(S):Math.floor(S)},"$"),w=l(function(S){return Math.abs(S)},"y"),x=l(function(S,E){return S?v(S)?{negative:!0,format:""+w(S)+E}:{negative:!1,format:""+S+E}:{negative:!1,format:""}},"v"),T=function(){function S(k,A,I){var L=this;if(this.$d={},this.$l=I,k===void 0&&(this.$ms=0,this.parseFromMilliseconds()),A)return m(k*p[y(A)],this);if(typeof k=="number")return this.$ms=k,this.parseFromMilliseconds(),this;if(typeof k=="object")return Object.keys(k).forEach(function(M){L.$d[y(M)]=k[M]}),this.calMilliseconds(),this;if(typeof k=="string"){var R=k.match(d);if(R){var O=R.slice(2).map(function(M){return M!=null?Number(M):0});return this.$d.years=O[0],this.$d.months=O[1],this.$d.weeks=O[2],this.$d.days=O[3],this.$d.hours=O[4],this.$d.minutes=O[5],this.$d.seconds=O[6],this.calMilliseconds(),this}}return this}l(S,"l");var E=S.prototype;return E.calMilliseconds=function(){var k=this;this.$ms=Object.keys(this.$d).reduce(function(A,I){return A+(k.$d[I]||0)*p[I]},0)},E.parseFromMilliseconds=function(){var k=this.$ms;this.$d.years=b(k/u),k%=u,this.$d.months=b(k/h),k%=h,this.$d.days=b(k/o),k%=o,this.$d.hours=b(k/s),k%=s,this.$d.minutes=b(k/i),k%=i,this.$d.seconds=b(k/a),k%=a,this.$d.milliseconds=k},E.toISOString=function(){var k=x(this.$d.years,"Y"),A=x(this.$d.months,"M"),I=+this.$d.days||0;this.$d.weeks&&(I+=7*this.$d.weeks);var L=x(I,"D"),R=x(this.$d.hours,"H"),O=x(this.$d.minutes,"M"),M=this.$d.seconds||0;this.$d.milliseconds&&(M+=this.$d.milliseconds/1e3,M=Math.round(1e3*M)/1e3);var P=x(M,"S"),z=k.negative||A.negative||L.negative||R.negative||O.negative||P.negative,D=R.format||O.format||P.format?"T":"",B=(z?"-":"")+"P"+k.format+A.format+L.format+D+R.format+O.format+P.format;return B==="P"||B==="-P"?"P0D":B},E.toJSON=function(){return this.toISOString()},E.format=function(k){var A=k||"YYYY-MM-DDTHH:mm:ss",I={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return A.replace(f,function(L,R){return R||String(I[L])})},E.as=function(k){return this.$ms/p[y(k)]},E.get=function(k){var A=this.$ms,I=y(k);return I==="milliseconds"?A%=1e3:A=I==="weeks"?b(A/p[I]):this.$d[I],A||0},E.add=function(k,A,I){var L;return L=A?k*p[y(A)]:g(k)?k.$ms:m(k,this).$ms,m(this.$ms+L*(I?-1:1),this)},E.subtract=function(k,A){return this.add(k,A,!0)},E.locale=function(k){var A=this.clone();return A.$l=k,A},E.clone=function(){return m(this.$ms,this)},E.humanize=function(k){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!k)},E.valueOf=function(){return this.asMilliseconds()},E.milliseconds=function(){return this.get("milliseconds")},E.asMilliseconds=function(){return this.as("milliseconds")},E.seconds=function(){return this.get("seconds")},E.asSeconds=function(){return this.as("seconds")},E.minutes=function(){return this.get("minutes")},E.asMinutes=function(){return this.as("minutes")},E.hours=function(){return this.get("hours")},E.asHours=function(){return this.as("hours")},E.days=function(){return this.get("days")},E.asDays=function(){return this.as("days")},E.weeks=function(){return this.get("weeks")},E.asWeeks=function(){return this.as("weeks")},E.months=function(){return this.get("months")},E.asMonths=function(){return this.as("months")},E.years=function(){return this.get("years")},E.asYears=function(){return this.as("years")},S}(),C=l(function(S,E,k){return S.add(E.years()*k,"y").add(E.months()*k,"M").add(E.days()*k,"d").add(E.hours()*k,"h").add(E.minutes()*k,"m").add(E.seconds()*k,"s").add(E.milliseconds()*k,"ms")},"p");return function(S,E,k){r=k,n=k().$utils(),k.duration=function(L,R){var O=k.locale();return m(L,{$l:O},R)},k.isDuration=g;var A=E.prototype.add,I=E.prototype.subtract;E.prototype.add=function(L,R){return g(L)?C(this,L,1):A.bind(this)(L,R)},E.prototype.subtract=function(L,R){return g(L)?C(this,L,-1):I.bind(this)(L,R)}}})})(rze);var Zur=rze.exports,Qur=Pd(Zur),uee=function(){var t=_(function(O,M,P,z){for(P=P||{},z=O.length;z--;P[O[z]]=M);return P},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],n=[1,27],a=[1,28],i=[1,29],s=[1,30],o=[1,31],u=[1,32],h=[1,33],d=[1,34],f=[1,9],p=[1,10],g=[1,11],m=[1,12],y=[1,13],v=[1,14],b=[1,15],w=[1,16],x=[1,19],T=[1,20],C=[1,21],S=[1,22],E=[1,23],k=[1,25],A=[1,35],I={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:_(l(function(M,P,z,D,B,W,U){var j=W.length-1;switch(B){case 1:return W[j-1];case 2:this.$=[];break;case 3:W[j-1].push(W[j]),this.$=W[j-1];break;case 4:case 5:this.$=W[j];break;case 6:case 7:this.$=[];break;case 8:D.setWeekday("monday");break;case 9:D.setWeekday("tuesday");break;case 10:D.setWeekday("wednesday");break;case 11:D.setWeekday("thursday");break;case 12:D.setWeekday("friday");break;case 13:D.setWeekday("saturday");break;case 14:D.setWeekday("sunday");break;case 15:D.setWeekend("friday");break;case 16:D.setWeekend("saturday");break;case 17:D.setDateFormat(W[j].substr(11)),this.$=W[j].substr(11);break;case 18:D.enableInclusiveEndDates(),this.$=W[j].substr(18);break;case 19:D.TopAxis(),this.$=W[j].substr(8);break;case 20:D.setAxisFormat(W[j].substr(11)),this.$=W[j].substr(11);break;case 21:D.setTickInterval(W[j].substr(13)),this.$=W[j].substr(13);break;case 22:D.setExcludes(W[j].substr(9)),this.$=W[j].substr(9);break;case 23:D.setIncludes(W[j].substr(9)),this.$=W[j].substr(9);break;case 24:D.setTodayMarker(W[j].substr(12)),this.$=W[j].substr(12);break;case 27:D.setDiagramTitle(W[j].substr(6)),this.$=W[j].substr(6);break;case 28:this.$=W[j].trim(),D.setAccTitle(this.$);break;case 29:case 30:this.$=W[j].trim(),D.setAccDescription(this.$);break;case 31:D.addSection(W[j].substr(8)),this.$=W[j].substr(8);break;case 33:D.addTask(W[j-1],W[j]),this.$="task";break;case 34:this.$=W[j-1],D.setClickEvent(W[j-1],W[j],null);break;case 35:this.$=W[j-2],D.setClickEvent(W[j-2],W[j-1],W[j]);break;case 36:this.$=W[j-2],D.setClickEvent(W[j-2],W[j-1],null),D.setLink(W[j-2],W[j]);break;case 37:this.$=W[j-3],D.setClickEvent(W[j-3],W[j-2],W[j-1]),D.setLink(W[j-3],W[j]);break;case 38:this.$=W[j-2],D.setClickEvent(W[j-2],W[j],null),D.setLink(W[j-2],W[j-1]);break;case 39:this.$=W[j-3],D.setClickEvent(W[j-3],W[j-1],W[j]),D.setLink(W[j-3],W[j-2]);break;case 40:this.$=W[j-1],D.setLink(W[j-1],W[j]);break;case 41:case 47:this.$=W[j-1]+" "+W[j];break;case 42:case 43:case 45:this.$=W[j-2]+" "+W[j-1]+" "+W[j];break;case 44:case 46:this.$=W[j-3]+" "+W[j-2]+" "+W[j-1]+" "+W[j];break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:a,15:i,16:s,17:o,18:u,19:18,20:h,21:d,22:f,23:p,24:g,25:m,26:y,27:v,28:b,29:w,30:x,31:T,33:C,35:S,36:E,37:24,38:k,40:A},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:r,13:n,14:a,15:i,16:s,17:o,18:u,19:18,20:h,21:d,22:f,23:p,24:g,25:m,26:y,27:v,28:b,29:w,30:x,31:T,33:C,35:S,36:E,37:24,38:k,40:A},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:_(l(function(M,P){if(P.recoverable)this.trace(M);else{var z=new Error(M);throw z.hash=P,z}},"parseError"),"parseError"),parse:_(l(function(M){var P=this,z=[0],D=[],B=[null],W=[],U=this.table,j="",V=0,Y=0,H=2,q=1,Z=W.slice.call(arguments,1),K=Object.create(this.lexer),re={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(re.yy[Q]=this.yy[Q]);K.setInput(M,re.yy),re.yy.lexer=K,re.yy.parser=this,typeof K.yylloc=="undefined"&&(K.yylloc={});var te=K.yylloc;W.push(te);var ee=K.options&&K.options.ranges;typeof re.yy.parseError=="function"?this.parseError=re.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function J(pe){z.length=z.length-2*pe,B.length=B.length-pe,W.length=W.length-pe}l(J,"popStack"),_(J,"popStack");function ae(){var pe;return pe=D.pop()||K.lex()||q,typeof pe!="number"&&(pe instanceof Array&&(D=pe,pe=D.pop()),pe=P.symbols_[pe]||pe),pe}l(ae,"lex"),_(ae,"lex");for(var se,fe,ve,de,Ee={},Ce,De,ce,Ie;;){if(fe=z[z.length-1],this.defaultActions[fe]?ve=this.defaultActions[fe]:((se===null||typeof se=="undefined")&&(se=ae()),ve=U[fe]&&U[fe][se]),typeof ve=="undefined"||!ve.length||!ve[0]){var ye="";Ie=[];for(Ce in U[fe])this.terminals_[Ce]&&Ce>H&&Ie.push("'"+this.terminals_[Ce]+"'");K.showPosition?ye="Parse error on line "+(V+1)+`:
|
||
`+K.showPosition()+`
|
||
Expecting `+Ie.join(", ")+", got '"+(this.terminals_[se]||se)+"'":ye="Parse error on line "+(V+1)+": Unexpected "+(se==q?"end of input":"'"+(this.terminals_[se]||se)+"'"),this.parseError(ye,{text:K.match,token:this.terminals_[se]||se,line:K.yylineno,loc:te,expected:Ie})}if(ve[0]instanceof Array&&ve.length>1)throw new Error("Parse Error: multiple actions possible at state: "+fe+", token: "+se);switch(ve[0]){case 1:z.push(se),B.push(K.yytext),W.push(K.yylloc),z.push(ve[1]),se=null,Y=K.yyleng,j=K.yytext,V=K.yylineno,te=K.yylloc;break;case 2:if(De=this.productions_[ve[1]][1],Ee.$=B[B.length-De],Ee._$={first_line:W[W.length-(De||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(De||1)].first_column,last_column:W[W.length-1].last_column},ee&&(Ee._$.range=[W[W.length-(De||1)].range[0],W[W.length-1].range[1]]),de=this.performAction.apply(Ee,[j,Y,V,re.yy,ve[1],B,W].concat(Z)),typeof de!="undefined")return de;De&&(z=z.slice(0,-1*De*2),B=B.slice(0,-1*De),W=W.slice(0,-1*De)),z.push(this.productions_[ve[1]][0]),B.push(Ee.$),W.push(Ee._$),ce=U[z[z.length-2]][z[z.length-1]],z.push(ce);break;case 3:return!0}}return!0},"parse"),"parse")},L=function(){var O={EOF:1,parseError:_(l(function(P,z){if(this.yy.parser)this.yy.parser.parseError(P,z);else throw new Error(P)},"parseError"),"parseError"),setInput:_(function(M,P){return this.yy=P||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var P=M.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},"input"),unput:_(function(M){var P=M.length,z=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var D=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),z.length-1&&(this.yylineno-=z.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:z?(z.length===D.length?this.yylloc.first_column:0)+D[D.length-z.length].length-z[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(M){this.unput(this.match.slice(M))},"less"),pastInput:_(function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var M=this.pastInput(),P=new Array(M.length+1).join("-");return M+this.upcomingInput()+`
|
||
`+P+"^"},"showPosition"),test_match:_(function(M,P){var z,D,B;if(this.options.backtrack_lexer&&(B={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(B.yylloc.range=this.yylloc.range.slice(0))),D=M[0].match(/(?:\r\n?|\n).*/g),D&&(this.yylineno+=D.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:D?D[D.length-1].length-D[D.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],z=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var W in B)this[W]=B[W];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,P,z,D;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),W=0;W<B.length;W++)if(z=this._input.match(this.rules[B[W]]),z&&(!P||z[0].length>P[0].length)){if(P=z,D=W,this.options.backtrack_lexer){if(M=this.test_match(z,B[W]),M!==!1)return M;if(this._backtrack){P=!1;continue}else return!1}else if(!this.options.flex)break}return P?(M=this.test_match(P,B[D]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var P=this.next();return P||this.lex()},"lex"),"lex"),begin:_(l(function(P){this.conditionStack.push(P)},"begin"),"begin"),popState:_(l(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(P){this.begin(P)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(P,z,D,B){switch(D){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return O}();I.lexer=L;function R(){this.yy={}}return l(R,"Parser"),_(R,"Parser"),R.prototype=I,I.Parser=R,new R}();uee.parser=uee;var Jur=uee;As.extend(Yur),As.extend(jur),As.extend(Xur);var nze={friday:5,saturday:6},Nd="",hee="",dee=void 0,fee="",XE=[],ZE=[],pee=new Map,gee=[],zP=[],QE="",mee="",aze=["active","done","crit","milestone","vert"],yee=[],JE="",fk=!1,vee=!1,bee="sunday",HP="saturday",xee=0,ehr=_(function(){gee=[],zP=[],QE="",yee=[],WP=0,Tee=void 0,VP=void 0,vs=[],Nd="",hee="",mee="",dee=void 0,fee="",XE=[],ZE=[],fk=!1,vee=!1,xee=0,pee=new Map,JE="",Ca(),bee="sunday",HP="saturday"},"clear"),thr=_(function(t){JE=t},"setDiagramId"),rhr=_(function(t){hee=t},"setAxisFormat"),nhr=_(function(){return hee},"getAxisFormat"),ahr=_(function(t){dee=t},"setTickInterval"),ihr=_(function(){return dee},"getTickInterval"),shr=_(function(t){fee=t},"setTodayMarker"),ohr=_(function(){return fee},"getTodayMarker"),lhr=_(function(t){Nd=t},"setDateFormat"),chr=_(function(){fk=!0},"enableInclusiveEndDates"),uhr=_(function(){return fk},"endDatesAreInclusive"),hhr=_(function(){vee=!0},"enableTopAxis"),dhr=_(function(){return vee},"topAxisEnabled"),fhr=_(function(t){mee=t},"setDisplayMode"),phr=_(function(){return mee},"getDisplayMode"),ghr=_(function(){return Nd},"getDateFormat"),ize=_((t,e)=>{const r=e.toLowerCase().split(/[\s,]+/).filter(n=>n!=="");return[...new Set([...t,...r])]},"mergeTokens"),mhr=_(function(t){XE=ize(XE,t)},"setIncludes"),yhr=_(function(){return XE},"getIncludes"),vhr=_(function(t){ZE=ize(ZE,t)},"setExcludes"),bhr=_(function(){return ZE},"getExcludes"),xhr=_(function(){return pee},"getLinks"),whr=_(function(t){QE=t,gee.push(t)},"addSection"),Thr=_(function(){return gee},"getSections"),Ehr=_(function(){let t=hze();const e=10;let r=0;for(;!t&&r<e;)t=hze(),r++;return zP=vs,zP},"getTasks"),sze=_(function(t,e,r,n){const a=t.format(e.trim()),i=t.format("YYYY-MM-DD");return n.includes(a)||n.includes(i)?!1:r.includes("weekends")&&(t.isoWeekday()===nze[HP]||t.isoWeekday()===nze[HP]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(a)||r.includes(i)},"isInvalidDate"),Chr=_(function(t){bee=t},"setWeekday"),Shr=_(function(){return bee},"getWeekday"),_hr=_(function(t){HP=t},"setWeekend"),oze=_(function(t,e,r,n){if(!r.length||t.manualEndTime)return;let a;t.startTime instanceof Date?a=As(t.startTime):a=As(t.startTime,e,!0),a=a.add(1,"d");let i;t.endTime instanceof Date?i=As(t.endTime):i=As(t.endTime,e,!0);const[s,o]=khr(a,i,e,r,n);t.endTime=s.toDate(),t.renderEndTime=o},"checkTaskDates"),khr=_(function(t,e,r,n,a){let i=!1,s=null;const o=e.add(1e4,"d");for(;t<=e;){if(i||(s=e.toDate()),i=sze(t,r,n,a),i&&(e=e.add(1,"d"),e>o))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,s]},"fixTaskDates"),wee=_(function(t,e,r){if(r=r.trim(),_(o=>{const u=o.trim();return u==="x"||u==="X"},"isTimestampFormat")(e)&&/^\d+$/.test(r))return new Date(Number(r));const i=new RegExp("^after\\s+(?<ids>[\\d\\w- ]+)").exec(r);if(i!==null){let o=null;for(const h of i.groups.ids.split(" ")){let d=my(h);d!==void 0&&(!o||d.endTime>o.endTime)&&(o=d)}if(o)return o.endTime;const u=new Date;return u.setHours(0,0,0,0),u}let s=As(r,e.trim(),!0);if(s.isValid())return s.toDate();{Le.debug("Invalid date:"+r),Le.debug("With date format:"+e.trim());const o=new Date(r);if(o===void 0||isNaN(o.getTime())||o.getFullYear()<-1e4||o.getFullYear()>1e4)throw new Error("Invalid date:"+r);return o}},"getStartDate"),lze=_(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),cze=_(function(t,e,r,n=!1){r=r.trim();const i=new RegExp("^until\\s+(?<ids>[\\d\\w- ]+)").exec(r);if(i!==null){let d=null;for(const p of i.groups.ids.split(" ")){let g=my(p);g!==void 0&&(!d||g.startTime<d.startTime)&&(d=g)}if(d)return d.startTime;const f=new Date;return f.setHours(0,0,0,0),f}let s=As(r,e.trim(),!0);if(s.isValid())return n&&(s=s.add(1,"d")),s.toDate();let o=As(t);const[u,h]=lze(r);if(!Number.isNaN(u)){const d=o.add(u,h);d.isValid()&&(o=d)}return o.toDate()},"getEndDate"),WP=0,eC=_(function(t){return t===void 0?(WP=WP+1,"task"+WP):t},"parseId"),Ahr=_(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const n=r.split(","),a={};Eee(n,a,aze);for(let s=0;s<n.length;s++)n[s]=n[s].trim();let i="";switch(n.length){case 1:a.id=eC(),a.startTime=t.endTime,i=n[0];break;case 2:a.id=eC(),a.startTime=wee(void 0,Nd,n[0]),i=n[1];break;case 3:a.id=eC(n[0]),a.startTime=wee(void 0,Nd,n[1]),i=n[2];break}return i&&(a.endTime=cze(a.startTime,Nd,i,fk),a.manualEndTime=As(i,"YYYY-MM-DD",!0).isValid(),oze(a,Nd,ZE,XE)),a},"compileData"),Nhr=_(function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const n=r.split(","),a={};Eee(n,a,aze);for(let i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:a.id=eC(),a.startTime={type:"prevTaskEnd",id:t},a.endTime={data:n[0]};break;case 2:a.id=eC(),a.startTime={type:"getStartDate",startData:n[0]},a.endTime={data:n[1]};break;case 3:a.id=eC(n[0]),a.startTime={type:"getStartDate",startData:n[1]},a.endTime={data:n[2]};break}return a},"parseData"),Tee,VP,vs=[],uze={},Ihr=_(function(t,e){const r={section:QE,type:QE,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=Nhr(VP,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=VP,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,r.vert?r.order=-1:(r.order=xee,xee++);const a=vs.push(r);VP=r.id,uze[r.id]=a-1},"addTask"),my=_(function(t){const e=uze[t];return vs[e]},"findTaskById"),Lhr=_(function(t,e){const r={section:QE,type:QE,description:t,task:t,classes:[]},n=Ahr(Tee,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.vert=n.vert,Tee=r,zP.push(r)},"addTaskOrg"),hze=_(function(){const t=_(function(r){const n=vs[r];let a="";switch(vs[r].raw.startTime.type){case"prevTaskEnd":{const i=my(n.prevTaskId);n.startTime=i.endTime;break}case"getStartDate":a=wee(void 0,Nd,vs[r].raw.startTime.startData),a&&(vs[r].startTime=a);break}return vs[r].startTime&&(vs[r].endTime=cze(vs[r].startTime,Nd,vs[r].raw.endTime.data,fk),vs[r].endTime&&(vs[r].processed=!0,vs[r].manualEndTime=As(vs[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),oze(vs[r],Nd,ZE,XE))),vs[r].processed},"compileTask");let e=!0;for(const[r,n]of vs.entries())t(r),e=e&&n.processed;return e},"compileTasks"),$hr=_(function(t,e){let r=e;ft().securityLevel!=="loose"&&(r=Cm(e)),t.split(",").forEach(function(n){my(n)!==void 0&&(fze(n,()=>{window.open(r,"_self")}),pee.set(n,r))}),dze(t,"clickable")},"setLink"),dze=_(function(t,e){t.split(",").forEach(function(r){let n=my(r);n!==void 0&&n.classes.push(e)})},"setClass"),Mhr=_(function(t,e,r){if(ft().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i<n.length;i++){let s=n[i].trim();s.startsWith('"')&&s.endsWith('"')&&(s=s.substr(1,s.length-2)),n[i]=s}}n.length===0&&n.push(t),my(t)!==void 0&&fze(t,()=>{Wr.runFunc(e,...n)})},"setClickFun"),fze=_(function(t,e){yee.push(function(){const r=JE?`${JE}-${t}`:t,n=document.querySelector(`[id="${r}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const r=JE?`${JE}-${t}`:t,n=document.querySelector(`[id="${r}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},"pushFun"),Phr=_(function(t,e,r){t.split(",").forEach(function(n){Mhr(n,e,r)}),dze(t,"clickable")},"setClickEvent"),Rhr=_(function(t){yee.forEach(function(e){e(t)})},"bindFunctions"),Ohr={getConfig:_(()=>ft().gantt,"getConfig"),clear:ehr,setDateFormat:lhr,getDateFormat:ghr,enableInclusiveEndDates:chr,endDatesAreInclusive:uhr,enableTopAxis:hhr,topAxisEnabled:dhr,setAxisFormat:rhr,getAxisFormat:nhr,setTickInterval:ahr,getTickInterval:ihr,setTodayMarker:shr,getTodayMarker:ohr,setAccTitle:Na,getAccTitle:za,setDiagramTitle:Va,getDiagramTitle:Ia,setDiagramId:thr,setDisplayMode:fhr,getDisplayMode:phr,setAccDescription:Ha,getAccDescription:Wa,addSection:whr,getSections:Thr,getTasks:Ehr,addTask:Ihr,findTaskById:my,addTaskOrg:Lhr,setIncludes:mhr,getIncludes:yhr,setExcludes:vhr,getExcludes:bhr,setClickEvent:Phr,setLink:$hr,getLinks:xhr,bindFunctions:Rhr,parseDuration:lze,isInvalidDate:sze,setWeekday:Chr,getWeekday:Shr,setWeekend:_hr};function Eee(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(a){const i="^\\s*"+a+"\\s*$",s=new RegExp(i);t[0].match(s)&&(e[a]=!0,t.shift(1),n=!0)})}l(Eee,"getTaskTags"),_(Eee,"getTaskTags"),As.extend(Qur);var Dhr=_(function(){Le.debug("Something is calling, setConf, remove the call")},"setConf"),pze={monday:q4,tuesday:x1e,wednesday:w1e,thursday:mm,friday:T1e,saturday:E1e,sunday:G4},Fhr=_((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((i,s)=>i.startTime-s.startTime||i.order-s.order),a=0;for(const i of n)for(let s=0;s<r.length;s++)if(i.startTime>=r[s]){r[s]=i.endTime,i.order=s+e,s>a&&(a=s);break}return a},"getMaxIntersections"),n0,Cee=1e4,Bhr=_(function(t,e,r,n){const a=ft().gantt;n.db.setDiagramId(e);const i=ft().securityLevel;let s;i==="sandbox"&&(s=Yt("#i"+e));const o=Yt(i==="sandbox"?s.nodes()[0].contentDocument.body:"body"),u=i==="sandbox"?s.nodes()[0].contentDocument:document,h=u.getElementById(e);n0=h.parentElement.offsetWidth,n0===void 0&&(n0=1200),a.useWidth!==void 0&&(n0=a.useWidth);const d=n.db.getTasks(),f=d.filter(I=>!I.vert);let p=[];for(const I of f)p.push(I.type);p=A(p);const g={};let m=2*a.topPadding;if(n.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const I={};for(const R of f)I[R.section]===void 0?I[R.section]=[R]:I[R.section].push(R);let L=0;for(const R of Object.keys(I)){const O=Fhr(I[R],L)+1;L+=O,m+=O*(a.barHeight+a.barGap),g[R]=O}}else{m+=f.length*(a.barHeight+a.barGap);for(const I of p)g[I]=f.filter(L=>L.type===I).length}h.setAttribute("viewBox","0 0 "+n0+" "+m);const y=o.select(`[id="${e}"]`),v=Nkt().domain([zCt(d,function(I){return I.startTime}),BCt(d,function(I){return I.endTime})]).rangeRound([0,n0-a.leftPadding-a.rightPadding]);function b(I,L){const R=I.startTime,O=L.startTime;let M=0;return R>O?M=1:R<O&&(M=-1),M}l(b,"taskCompare"),_(b,"taskCompare"),d.sort(b),w(d,n0,m),yi(y,m,n0,a.useMaxWidth),y.append("text").text(n.db.getDiagramTitle()).attr("x",n0/2).attr("y",a.titleTopMargin).attr("class","titleText");function w(I,L,R){const O=a.barHeight,M=O+a.barGap,P=a.topPadding,z=a.leftPadding,D=kw().domain([0,p.length]).range(["#00B9FA","#F95002"]).interpolate(c3t);T(M,P,z,L,R,I,n.db.getExcludes(),n.db.getIncludes()),S(z,P,L,R),x(I,M,P,z,O,D,L),E(M,P),k(z,P,L,R)}l(w,"makeGantt"),_(w,"makeGantt");function x(I,L,R,O,M,P,z){I.sort((Y,H)=>Y.vert===H.vert?0:Y.vert?1:-1);const D=I.filter(Y=>!Y.vert),W=[...new Set(D.map(Y=>Y.order))].map(Y=>D.find(H=>H.order===Y));y.append("g").selectAll("rect").data(W).enter().append("rect").attr("x",0).attr("y",function(Y,H){return H=Y.order,H*L+R-2}).attr("width",function(){return z-a.rightPadding/2}).attr("height",L).attr("class",function(Y){for(const[H,q]of p.entries())if(Y.type===q)return"section section"+H%a.numberSectionStyles;return"section section0"}).enter();const U=y.append("g").selectAll("rect").data(I).enter(),j=n.db.getLinks();if(U.append("rect").attr("id",function(Y){return e+"-"+Y.id}).attr("rx",3).attr("ry",3).attr("x",function(Y){return Y.milestone?v(Y.startTime)+O+.5*(v(Y.endTime)-v(Y.startTime))-.5*M:v(Y.startTime)+O}).attr("y",function(Y,H){return H=Y.order,Y.vert?a.gridLineStartPadding:H*L+R}).attr("width",function(Y){return Y.milestone?M:Y.vert?.08*M:v(Y.renderEndTime||Y.endTime)-v(Y.startTime)}).attr("height",function(Y){return Y.vert?D.length*(a.barHeight+a.barGap)+a.barHeight*2:M}).attr("transform-origin",function(Y,H){return H=Y.order,(v(Y.startTime)+O+.5*(v(Y.endTime)-v(Y.startTime))).toString()+"px "+(H*L+R+.5*M).toString()+"px"}).attr("class",function(Y){const H="task";let q="";Y.classes.length>0&&(q=Y.classes.join(" "));let Z=0;for(const[re,Q]of p.entries())Y.type===Q&&(Z=re%a.numberSectionStyles);let K="";return Y.active?Y.crit?K+=" activeCrit":K=" active":Y.done?Y.crit?K=" doneCrit":K=" done":Y.crit&&(K+=" crit"),K.length===0&&(K=" task"),Y.milestone&&(K=" milestone "+K),Y.vert&&(K=" vert "+K),K+=Z,K+=" "+q,H+K}),U.append("text").attr("id",function(Y){return e+"-"+Y.id+"-text"}).text(function(Y){return Y.task}).attr("font-size",a.fontSize).attr("x",function(Y){let H=v(Y.startTime),q=v(Y.renderEndTime||Y.endTime);if(Y.milestone&&(H+=.5*(v(Y.endTime)-v(Y.startTime))-.5*M,q=H+M),Y.vert)return v(Y.startTime)+O;const Z=this.getBBox().width;return Z>q-H?q+Z+1.5*a.leftPadding>z?H+O-5:q+O+5:(q-H)/2+H+O}).attr("y",function(Y,H){return Y.vert?a.gridLineStartPadding+D.length*(a.barHeight+a.barGap)+60:(H=Y.order,H*L+a.barHeight/2+(a.fontSize/2-2)+R)}).attr("text-height",M).attr("class",function(Y){const H=v(Y.startTime);let q=v(Y.endTime);Y.milestone&&(q=H+M);const Z=this.getBBox().width;let K="";Y.classes.length>0&&(K=Y.classes.join(" "));let re=0;for(const[te,ee]of p.entries())Y.type===ee&&(re=te%a.numberSectionStyles);let Q="";return Y.active&&(Y.crit?Q="activeCritText"+re:Q="activeText"+re),Y.done?Y.crit?Q=Q+" doneCritText"+re:Q=Q+" doneText"+re:Y.crit&&(Q=Q+" critText"+re),Y.milestone&&(Q+=" milestoneText"),Y.vert&&(Q+=" vertText"),Z>q-H?q+Z+1.5*a.leftPadding>z?K+" taskTextOutsideLeft taskTextOutside"+re+" "+Q:K+" taskTextOutsideRight taskTextOutside"+re+" "+Q+" width-"+Z:K+" taskText taskText"+re+" "+Q+" width-"+Z}),ft().securityLevel==="sandbox"){let Y;Y=Yt("#i"+e);const H=Y.nodes()[0].contentDocument;U.filter(function(q){return j.has(q.id)}).each(function(q){var Z=H.querySelector("#"+CSS.escape(e+"-"+q.id)),K=H.querySelector("#"+CSS.escape(e+"-"+q.id+"-text"));const re=Z.parentNode;var Q=H.createElement("a");Q.setAttribute("xlink:href",j.get(q.id)),Q.setAttribute("target","_top"),re.appendChild(Q),Q.appendChild(Z),Q.appendChild(K)})}}l(x,"drawRects"),_(x,"drawRects");function T(I,L,R,O,M,P,z,D){if(z.length===0&&D.length===0)return;let B,W;for(const{startTime:q,endTime:Z}of P)(B===void 0||q<B)&&(B=q),(W===void 0||Z>W)&&(W=Z);if(!B||!W)return;if(As(W).diff(As(B),"year")>5){Le.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const U=n.db.getDateFormat(),j=[];let V=null,Y=As(B);for(;Y.valueOf()<=W;)n.db.isInvalidDate(Y,U,z,D)?V?V.end=Y:V={start:Y,end:Y}:V&&(j.push(V),V=null),Y=Y.add(1,"d");y.append("g").selectAll("rect").data(j).enter().append("rect").attr("id",q=>e+"-exclude-"+q.start.format("YYYY-MM-DD")).attr("x",q=>v(q.start.startOf("day"))+R).attr("y",a.gridLineStartPadding).attr("width",q=>v(q.end.endOf("day"))-v(q.start.startOf("day"))).attr("height",M-L-a.gridLineStartPadding).attr("transform-origin",function(q,Z){return(v(q.start)+R+.5*(v(q.end)-v(q.start))).toString()+"px "+(Z*I+.5*M).toString()+"px"}).attr("class","exclude-range")}l(T,"drawExcludeDays"),_(T,"drawExcludeDays");function C(I,L,R,O){if(R<=0||I>L)return 1/0;const M=L-I,P=As.duration({[O!=null?O:"day"]:R}).asMilliseconds();return P<=0?1/0:Math.ceil(M/P)}l(C,"getEstimatedTickCount"),_(C,"getEstimatedTickCount");function S(I,L,R,O){var U;const M=n.db.getDateFormat(),P=n.db.getAxisFormat();let z;P?z=P:M==="D"?z="%d":z=(U=a.axisFormat)!=null?U:"%Y-%m-%d";let D=KCt(v).tickSize(-O+L+a.gridLineStartPadding).tickFormat(i7(z));const W=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||a.tickInterval);if(W!==null){const j=parseInt(W[1],10);if(isNaN(j)||j<=0)Le.warn(`Invalid tick interval value: "${W[1]}". Skipping custom tick interval.`);else{const V=W[2],Y=n.db.getWeekday()||a.weekday,H=v.domain(),q=H[0],Z=H[1],K=C(q,Z,j,V);if(K>Cee)Le.warn(`The tick interval "${j}${V}" would generate ${K} ticks, which exceeds the maximum allowed (${Cee}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(V){case"millisecond":D.ticks(Aw.every(j));break;case"second":D.ticks(j0.every(j));break;case"minute":D.ticks(W4.every(j));break;case"hour":D.ticks(V4.every(j));break;case"day":D.ticks(pm.every(j));break;case"week":D.ticks(pze[Y].every(j));break;case"month":D.ticks(Y4.every(j));break}}}if(y.append("g").attr("class","grid").attr("transform","translate("+I+", "+(O-50)+")").call(D).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||a.topAxis){let j=jCt(v).tickSize(-O+L+a.gridLineStartPadding).tickFormat(i7(z));if(W!==null){const V=parseInt(W[1],10);if(isNaN(V)||V<=0)Le.warn(`Invalid tick interval value: "${W[1]}". Skipping custom tick interval.`);else{const Y=W[2],H=n.db.getWeekday()||a.weekday,q=v.domain(),Z=q[0],K=q[1];if(C(Z,K,V,Y)<=Cee)switch(Y){case"millisecond":j.ticks(Aw.every(V));break;case"second":j.ticks(j0.every(V));break;case"minute":j.ticks(W4.every(V));break;case"hour":j.ticks(V4.every(V));break;case"day":j.ticks(pm.every(V));break;case"week":j.ticks(pze[H].every(V));break;case"month":j.ticks(Y4.every(V));break}}}y.append("g").attr("class","grid").attr("transform","translate("+I+", "+L+")").call(j).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}l(S,"makeGrid"),_(S,"makeGrid");function E(I,L){let R=0;const O=Object.keys(g).map(M=>[M,g[M]]);y.append("g").selectAll("text").data(O).enter().append(function(M){const P=M[0].split(or.lineBreakRegex),z=-(P.length-1)/2,D=u.createElementNS("http://www.w3.org/2000/svg","text");D.setAttribute("dy",z+"em");for(const[B,W]of P.entries()){const U=u.createElementNS("http://www.w3.org/2000/svg","tspan");U.setAttribute("alignment-baseline","central"),U.setAttribute("x","10"),B>0&&U.setAttribute("dy","1em"),U.textContent=W,D.appendChild(U)}return D}).attr("x",10).attr("y",function(M,P){if(P>0)for(let z=0;z<P;z++)return R+=O[P-1][1],M[1]*I/2+R*I+L;else return M[1]*I/2+L}).attr("font-size",a.sectionFontSize).attr("class",function(M){for(const[P,z]of p.entries())if(M[0]===z)return"sectionTitle sectionTitle"+P%a.numberSectionStyles;return"sectionTitle"})}l(E,"vertLabels"),_(E,"vertLabels");function k(I,L,R,O){const M=n.db.getTodayMarker();if(M==="off")return;const P=y.append("g").attr("class","today"),z=new Date,D=P.append("line");D.attr("x1",v(z)+I).attr("x2",v(z)+I).attr("y1",a.titleTopMargin).attr("y2",O-a.titleTopMargin).attr("class","today"),M!==""&&D.attr("style",M.replace(/,/g,";"))}l(k,"drawToday"),_(k,"drawToday");function A(I){const L={},R=[];for(let O=0,M=I.length;O<M;++O)Object.prototype.hasOwnProperty.call(L,I[O])||(L[I[O]]=!0,R.push(I[O]));return R}l(A,"checkUnique"),_(A,"checkUnique")},"draw"),zhr={setConf:Dhr,draw:Bhr},Hhr=_(t=>`
|
||
.mermaid-main-font {
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
.exclude-range {
|
||
fill: ${t.excludeBkgColor};
|
||
}
|
||
|
||
.section {
|
||
stroke: none;
|
||
opacity: 0.2;
|
||
}
|
||
|
||
.section0 {
|
||
fill: ${t.sectionBkgColor};
|
||
}
|
||
|
||
.section2 {
|
||
fill: ${t.sectionBkgColor2};
|
||
}
|
||
|
||
.section1,
|
||
.section3 {
|
||
fill: ${t.altSectionBkgColor};
|
||
opacity: 0.2;
|
||
}
|
||
|
||
.sectionTitle0 {
|
||
fill: ${t.titleColor};
|
||
}
|
||
|
||
.sectionTitle1 {
|
||
fill: ${t.titleColor};
|
||
}
|
||
|
||
.sectionTitle2 {
|
||
fill: ${t.titleColor};
|
||
}
|
||
|
||
.sectionTitle3 {
|
||
fill: ${t.titleColor};
|
||
}
|
||
|
||
.sectionTitle {
|
||
text-anchor: start;
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
|
||
/* Grid and axis */
|
||
|
||
.grid .tick {
|
||
stroke: ${t.gridColor};
|
||
opacity: 0.8;
|
||
shape-rendering: crispEdges;
|
||
}
|
||
|
||
.grid .tick text {
|
||
font-family: ${t.fontFamily};
|
||
fill: ${t.textColor};
|
||
}
|
||
|
||
.grid path {
|
||
stroke-width: 0;
|
||
}
|
||
|
||
|
||
/* Today line */
|
||
|
||
.today {
|
||
fill: none;
|
||
stroke: ${t.todayLineColor};
|
||
stroke-width: 2px;
|
||
}
|
||
|
||
|
||
/* Task styling */
|
||
|
||
/* Default task */
|
||
|
||
.task {
|
||
stroke-width: 2;
|
||
}
|
||
|
||
.taskText {
|
||
text-anchor: middle;
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
.taskTextOutsideRight {
|
||
fill: ${t.taskTextDarkColor};
|
||
text-anchor: start;
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
.taskTextOutsideLeft {
|
||
fill: ${t.taskTextDarkColor};
|
||
text-anchor: end;
|
||
}
|
||
|
||
|
||
/* Special case clickable */
|
||
|
||
.task.clickable {
|
||
cursor: pointer;
|
||
}
|
||
|
||
.taskText.clickable {
|
||
cursor: pointer;
|
||
fill: ${t.taskTextClickableColor} !important;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.taskTextOutsideLeft.clickable {
|
||
cursor: pointer;
|
||
fill: ${t.taskTextClickableColor} !important;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.taskTextOutsideRight.clickable {
|
||
cursor: pointer;
|
||
fill: ${t.taskTextClickableColor} !important;
|
||
font-weight: bold;
|
||
}
|
||
|
||
|
||
/* Specific task settings for the sections*/
|
||
|
||
.taskText0,
|
||
.taskText1,
|
||
.taskText2,
|
||
.taskText3 {
|
||
fill: ${t.taskTextColor};
|
||
}
|
||
|
||
.task0,
|
||
.task1,
|
||
.task2,
|
||
.task3 {
|
||
fill: ${t.taskBkgColor};
|
||
stroke: ${t.taskBorderColor};
|
||
}
|
||
|
||
.taskTextOutside0,
|
||
.taskTextOutside2
|
||
{
|
||
fill: ${t.taskTextOutsideColor};
|
||
}
|
||
|
||
.taskTextOutside1,
|
||
.taskTextOutside3 {
|
||
fill: ${t.taskTextOutsideColor};
|
||
}
|
||
|
||
|
||
/* Active task */
|
||
|
||
.active0,
|
||
.active1,
|
||
.active2,
|
||
.active3 {
|
||
fill: ${t.activeTaskBkgColor};
|
||
stroke: ${t.activeTaskBorderColor};
|
||
}
|
||
|
||
.activeText0,
|
||
.activeText1,
|
||
.activeText2,
|
||
.activeText3 {
|
||
fill: ${t.taskTextDarkColor} !important;
|
||
}
|
||
|
||
|
||
/* Completed task */
|
||
|
||
.done0,
|
||
.done1,
|
||
.done2,
|
||
.done3 {
|
||
stroke: ${t.doneTaskBorderColor};
|
||
fill: ${t.doneTaskBkgColor};
|
||
stroke-width: 2;
|
||
}
|
||
|
||
.doneText0,
|
||
.doneText1,
|
||
.doneText2,
|
||
.doneText3 {
|
||
fill: ${t.taskTextDarkColor} !important;
|
||
}
|
||
|
||
/* Done task text displayed outside the bar sits against the diagram background,
|
||
not against the done-task bar, so it must use the outside/contrast color. */
|
||
.doneText0.taskTextOutsideLeft,
|
||
.doneText0.taskTextOutsideRight,
|
||
.doneText1.taskTextOutsideLeft,
|
||
.doneText1.taskTextOutsideRight,
|
||
.doneText2.taskTextOutsideLeft,
|
||
.doneText2.taskTextOutsideRight,
|
||
.doneText3.taskTextOutsideLeft,
|
||
.doneText3.taskTextOutsideRight {
|
||
fill: ${t.taskTextOutsideColor} !important;
|
||
}
|
||
|
||
|
||
/* Tasks on the critical line */
|
||
|
||
.crit0,
|
||
.crit1,
|
||
.crit2,
|
||
.crit3 {
|
||
stroke: ${t.critBorderColor};
|
||
fill: ${t.critBkgColor};
|
||
stroke-width: 2;
|
||
}
|
||
|
||
.activeCrit0,
|
||
.activeCrit1,
|
||
.activeCrit2,
|
||
.activeCrit3 {
|
||
stroke: ${t.critBorderColor};
|
||
fill: ${t.activeTaskBkgColor};
|
||
stroke-width: 2;
|
||
}
|
||
|
||
.doneCrit0,
|
||
.doneCrit1,
|
||
.doneCrit2,
|
||
.doneCrit3 {
|
||
stroke: ${t.critBorderColor};
|
||
fill: ${t.doneTaskBkgColor};
|
||
stroke-width: 2;
|
||
cursor: pointer;
|
||
shape-rendering: crispEdges;
|
||
}
|
||
|
||
.milestone {
|
||
transform: rotate(45deg) scale(0.8,0.8);
|
||
}
|
||
|
||
.milestoneText {
|
||
font-style: italic;
|
||
}
|
||
.doneCritText0,
|
||
.doneCritText1,
|
||
.doneCritText2,
|
||
.doneCritText3 {
|
||
fill: ${t.taskTextDarkColor} !important;
|
||
}
|
||
|
||
/* Done-crit task text outside the bar — same reasoning as doneText above. */
|
||
.doneCritText0.taskTextOutsideLeft,
|
||
.doneCritText0.taskTextOutsideRight,
|
||
.doneCritText1.taskTextOutsideLeft,
|
||
.doneCritText1.taskTextOutsideRight,
|
||
.doneCritText2.taskTextOutsideLeft,
|
||
.doneCritText2.taskTextOutsideRight,
|
||
.doneCritText3.taskTextOutsideLeft,
|
||
.doneCritText3.taskTextOutsideRight {
|
||
fill: ${t.taskTextOutsideColor} !important;
|
||
}
|
||
|
||
.vert {
|
||
stroke: ${t.vertLineColor};
|
||
}
|
||
|
||
.vertText {
|
||
font-size: 15px;
|
||
text-anchor: middle;
|
||
fill: ${t.vertLineColor} !important;
|
||
}
|
||
|
||
.activeCritText0,
|
||
.activeCritText1,
|
||
.activeCritText2,
|
||
.activeCritText3 {
|
||
fill: ${t.taskTextDarkColor} !important;
|
||
}
|
||
|
||
.titleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.titleColor||t.textColor};
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
`,"getStyles"),Whr=Hhr,Vhr={parser:Jur,db:Ohr,renderer:zhr,styles:Whr},Ghr=Object.freeze({__proto__:null,diagram:Vhr}),qhr={parse:_(t=>nt(this,null,function*(){const e=yield pu("info",t);Le.debug(e)}),"parse")},Yhr={version:"11.16.0"},Uhr=_(()=>Yhr.version,"getVersion"),jhr={getVersion:Uhr},Khr=_((t,e,r)=>{Le.debug(`rendering info diagram
|
||
`+t);const n=$o(e);yi(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),Xhr={draw:Khr},Zhr={parser:qhr,db:jhr,renderer:Xhr},Qhr=Object.freeze({__proto__:null,diagram:Zhr}),Jhr=hn.pie,See={sections:new Map,showData:!1},GP=See.sections,_ee=See.showData,edr=structuredClone(Jhr),tdr=_(()=>structuredClone(edr),"getConfig"),rdr=_(()=>{GP=new Map,_ee=See.showData,Ca()},"clear"),ndr=_(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);GP.has(t)||(GP.set(t,e),Le.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),adr=_(()=>GP,"getSections"),idr=_(t=>{_ee=t},"setShowData"),sdr=_(()=>_ee,"getShowData"),gze={getConfig:tdr,clear:rdr,setDiagramTitle:Va,getDiagramTitle:Ia,setAccTitle:Na,getAccTitle:za,setAccDescription:Ha,getAccDescription:Wa,addSection:ndr,getSections:adr,setShowData:idr,getShowData:sdr},odr=_((t,e)=>{hl(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),ldr={parse:_(t=>nt(this,null,function*(){const e=yield pu("pie",t);Le.debug(e),odr(e,gze)}),"parse")},cdr=_(t=>`
|
||
.pieCircle{
|
||
stroke: ${t.pieStrokeColor};
|
||
stroke-width : ${t.pieStrokeWidth};
|
||
opacity : ${t.pieOpacity};
|
||
}
|
||
.pieCircle.highlighted{
|
||
scale: 1.05;
|
||
opacity: 1;
|
||
}
|
||
.pieCircle.highlightedOnHover:hover{
|
||
transition-duration: 250ms;
|
||
scale: 1.05;
|
||
opacity: 1;
|
||
}
|
||
.pieOuterCircle{
|
||
stroke: ${t.pieOuterStrokeColor};
|
||
stroke-width: ${t.pieOuterStrokeWidth};
|
||
fill: none;
|
||
}
|
||
.pieTitleText {
|
||
text-anchor: middle;
|
||
font-size: ${t.pieTitleTextSize};
|
||
fill: ${t.pieTitleTextColor};
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
.slice {
|
||
font-family: ${t.fontFamily};
|
||
fill: ${t.pieSectionTextColor};
|
||
font-size:${t.pieSectionTextSize};
|
||
// fill: white;
|
||
}
|
||
.legend text {
|
||
fill: ${t.pieLegendTextColor};
|
||
font-family: ${t.fontFamily};
|
||
font-size: ${t.pieLegendTextSize};
|
||
}
|
||
`,"getStyles"),udr=cdr,hdr=_(t=>{const e=[...t.values()].reduce((a,i)=>a+i,0),r=[...t.entries()].map(([a,i])=>({label:a,value:i})).filter(a=>a.value/e*100>=1);return Gkt().value(a=>a.value).sort(null)(r)},"createPieArcs"),ddr=_((t,e,r,n)=>{var K,re;Le.debug(`rendering pie chart
|
||
`+t);const a=n.db,i=ft(),s=Ga(a.getConfig(),i.pie),o=40,u=18,h=4,d=450,f=d,p=$o(e),g=p.append("g");g.attr("transform","translate("+f/2+","+d/2+")");const{themeVariables:m}=i;let[y]=cf(m.pieOuterStrokeWidth);y!=null||(y=2);const v=s.legendPosition,b=s.textPosition,w=s.donutHole>0&&s.donutHole<=.9?s.donutHole:0,x=Math.min(f,d)/2-o,T=$w().innerRadius(w*x).outerRadius(x),C=$w().innerRadius(x*b).outerRadius(x*b),S=g.append("g");S.append("circle").attr("cx",0).attr("cy",0).attr("r",x+y/2).attr("class","pieOuterCircle");const E=a.getSections(),k=hdr(E),A=[m.pie1,m.pie2,m.pie3,m.pie4,m.pie5,m.pie6,m.pie7,m.pie8,m.pie9,m.pie10,m.pie11,m.pie12];let I=0;E.forEach(Q=>{I+=Q});const L=k.filter(Q=>(Q.data.value/I*100).toFixed(0)!=="0"),R=fm(A).domain([...E.keys()]);S.selectAll("mySlices").data(L).enter().append("path").attr("d",T).attr("fill",Q=>R(Q.data.label)).attr("class",Q=>{let te="pieCircle";return s.highlightSlice==="hover"?te+=" highlightedOnHover":s.highlightSlice===Q.data.label&&(te+=" highlighted"),te}),S.selectAll("mySlices").data(L).enter().append("text").text(Q=>(Q.data.value/I*100).toFixed(0)+"%").attr("transform",Q=>"translate("+C.centroid(Q)+")").style("text-anchor","middle").attr("class","slice");const O=g.append("text").text(a.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),M=[...E.entries()].map(([Q,te])=>({label:Q,value:te})),P=g.selectAll(".legend").data(M).enter().append("g").attr("class","legend");P.append("rect").attr("width",u).attr("height",u).style("fill",Q=>R(Q.label)).style("stroke",Q=>R(Q.label)),P.append("text").attr("x",u+h).attr("y",u-h).text(Q=>a.getShowData()?`${Q.label} [${Q.value}]`:Q.label);const z=Math.max(...P.selectAll("text").nodes().map(Q=>{var te;return(te=Q==null?void 0:Q.getBoundingClientRect().width)!=null?te:0}));let D=d,B=f+o;const W=u+h,U=M.length*W;switch(v){case"center":P.attr("transform",(Q,te)=>{const ee=W*M.length/2,J=-z/2-(u+h),ae=te*W-ee;return"translate("+J+","+ae+")"});break;case"top":D+=U,P.attr("transform",(Q,te)=>{const ee=x,J=-z/2-(u+h),ae=te*W-ee;return`translate(${J}, ${ae})`}),S.attr("transform",()=>`translate(0, ${U+W})`);break;case"bottom":D+=U,P.attr("transform",(Q,te)=>{const ee=-x-W,J=-z/2-(u+h),ae=te*W-ee;return"translate("+J+","+ae+")"});break;case"left":B+=u+h+z,P.attr("transform",(Q,te)=>{const ee=W*M.length/2,J=-x-(u+h),ae=te*W-ee;return"translate("+J+","+ae+")"}),S.attr("transform",()=>`translate(${z+u+h}, 0)`);break;case"right":default:B+=u+h+z,P.attr("transform",(Q,te)=>{const ee=W*M.length/2,J=12*u,ae=te*W-ee;return"translate("+J+","+ae+")"});break}const j=(re=(K=O.node())==null?void 0:K.getBoundingClientRect().width)!=null?re:0,V=f/2-j/2,Y=f/2+j/2,H=Math.min(0,V),Z=Math.max(B,Y)-H;p.attr("viewBox",`${H} 0 ${Z} ${D}`),yi(p,D,Z,s.useMaxWidth)},"draw"),fdr={draw:ddr},pdr={parser:ldr,db:gze,renderer:fdr,styles:udr},gdr=Object.freeze({__proto__:null,diagram:pdr}),kee=function(){var t=_(function(oe,_e,ue,tt){for(ue=ue||{},tt=oe.length;tt--;ue[oe[tt]]=_e);return ue},"o"),e=[1,3],r=[1,4],n=[1,5],a=[1,6],i=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],u=[55,56,57],h=[2,36],d=[1,37],f=[1,36],p=[1,38],g=[1,35],m=[1,43],y=[1,41],v=[1,45],b=[1,14],w=[1,23],x=[1,18],T=[1,19],C=[1,20],S=[1,21],E=[1,22],k=[1,24],A=[1,25],I=[1,26],L=[1,27],R=[1,28],O=[1,29],M=[1,32],P=[1,33],z=[1,34],D=[1,39],B=[1,40],W=[1,42],U=[1,44],j=[1,63],V=[1,62],Y=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],H=[1,66],q=[1,67],Z=[1,68],K=[1,69],re=[1,70],Q=[1,71],te=[1,72],ee=[1,73],J=[1,74],ae=[1,75],se=[1,76],fe=[1,77],ve=[4,5,6,7,8,9,10,11,12,13,14,15,18],de=[1,91],Ee=[1,92],Ce=[1,93],De=[1,100],ce=[1,94],Ie=[1,97],ye=[1,95],pe=[1,96],Ae=[1,98],Ve=[1,99],ze=[1,103],We=[10,55,56,57],me=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],Se={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:_(l(function(_e,ue,tt,Re,et,Xe,ot){var Ge=Xe.length-1;switch(et){case 23:this.$=Xe[Ge];break;case 24:this.$=Xe[Ge-1]+""+Xe[Ge];break;case 26:this.$=Xe[Ge-1]+Xe[Ge];break;case 27:this.$=[Xe[Ge].trim()];break;case 28:Xe[Ge-2].push(Xe[Ge].trim()),this.$=Xe[Ge-2];break;case 29:this.$=Xe[Ge-4],Re.addClass(Xe[Ge-2],Xe[Ge]);break;case 37:this.$=[];break;case 42:this.$=Xe[Ge].trim(),Re.setDiagramTitle(this.$);break;case 43:this.$=Xe[Ge].trim(),Re.setAccTitle(this.$);break;case 44:case 45:this.$=Xe[Ge].trim(),Re.setAccDescription(this.$);break;case 46:Re.addSection(Xe[Ge].substr(8)),this.$=Xe[Ge].substr(8);break;case 47:Re.addPoint(Xe[Ge-3],"",Xe[Ge-1],Xe[Ge],[]);break;case 48:Re.addPoint(Xe[Ge-4],Xe[Ge-3],Xe[Ge-1],Xe[Ge],[]);break;case 49:Re.addPoint(Xe[Ge-4],"",Xe[Ge-2],Xe[Ge-1],Xe[Ge]);break;case 50:Re.addPoint(Xe[Ge-5],Xe[Ge-4],Xe[Ge-2],Xe[Ge-1],Xe[Ge]);break;case 51:Re.setXAxisLeftText(Xe[Ge-2]),Re.setXAxisRightText(Xe[Ge]);break;case 52:Xe[Ge-1].text+=" ⟶ ",Re.setXAxisLeftText(Xe[Ge-1]);break;case 53:Re.setXAxisLeftText(Xe[Ge]);break;case 54:Re.setYAxisBottomText(Xe[Ge-2]),Re.setYAxisTopText(Xe[Ge]);break;case 55:Xe[Ge-1].text+=" ⟶ ",Re.setYAxisBottomText(Xe[Ge-1]);break;case 56:Re.setYAxisBottomText(Xe[Ge]);break;case 57:Re.setQuadrant1Text(Xe[Ge]);break;case 58:Re.setQuadrant2Text(Xe[Ge]);break;case 59:Re.setQuadrant3Text(Xe[Ge]);break;case 60:Re.setQuadrant4Text(Xe[Ge]);break;case 64:this.$={text:Xe[Ge],type:"text"};break;case 65:this.$={text:Xe[Ge-1].text+""+Xe[Ge],type:Xe[Ge-1].type};break;case 66:this.$={text:Xe[Ge],type:"text"};break;case 67:this.$={text:Xe[Ge],type:"markdown"};break;case 68:this.$=Xe[Ge];break;case 69:this.$=Xe[Ge-1]+""+Xe[Ge];break}},"anonymous"),"anonymous"),table:[{18:e,26:1,27:2,28:r,55:n,56:a,57:i},{1:[3]},{18:e,26:8,27:2,28:r,55:n,56:a,57:i},{18:e,26:9,27:2,28:r,55:n,56:a,57:i},t(s,[2,33],{29:10}),t(o,[2,61]),t(o,[2,62]),t(o,[2,63]),{1:[2,30]},{1:[2,31]},t(u,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:g,13:m,14:y,15:v,18:b,25:w,35:x,37:T,39:C,41:S,42:E,48:k,50:A,51:I,52:L,53:R,54:O,60:M,61:P,63:z,64:D,65:B,66:W,67:U}),t(s,[2,34]),{27:46,55:n,56:a,57:i},t(u,[2,37]),t(u,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:g,13:m,14:y,15:v,18:b,25:w,35:x,37:T,39:C,41:S,42:E,48:k,50:A,51:I,52:L,53:R,54:O,60:M,61:P,63:z,64:D,65:B,66:W,67:U}),t(u,[2,39]),t(u,[2,40]),t(u,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(u,[2,45]),t(u,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:g,13:m,14:y,15:v,43:52,58:31,60:M,61:P,63:z,64:D,65:B,66:W,67:U},{4:d,5:f,10:p,12:g,13:m,14:y,15:v,43:53,58:31,60:M,61:P,63:z,64:D,65:B,66:W,67:U},{4:d,5:f,10:p,12:g,13:m,14:y,15:v,43:54,58:31,60:M,61:P,63:z,64:D,65:B,66:W,67:U},{4:d,5:f,10:p,12:g,13:m,14:y,15:v,43:55,58:31,60:M,61:P,63:z,64:D,65:B,66:W,67:U},{4:d,5:f,10:p,12:g,13:m,14:y,15:v,43:56,58:31,60:M,61:P,63:z,64:D,65:B,66:W,67:U},{4:d,5:f,10:p,12:g,13:m,14:y,15:v,43:57,58:31,60:M,61:P,63:z,64:D,65:B,66:W,67:U},{4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,44:[1,58],47:[1,59],58:61,59:60,63:z,64:D,65:B,66:W,67:U},t(Y,[2,64]),t(Y,[2,66]),t(Y,[2,67]),t(Y,[2,70]),t(Y,[2,71]),t(Y,[2,72]),t(Y,[2,73]),t(Y,[2,74]),t(Y,[2,75]),t(Y,[2,76]),t(Y,[2,77]),t(Y,[2,78]),t(Y,[2,79]),t(Y,[2,80]),t(Y,[2,81]),t(s,[2,35]),t(u,[2,38]),t(u,[2,42]),t(u,[2,43]),t(u,[2,44]),{3:65,4:H,5:q,6:Z,7:K,8:re,9:Q,10:te,11:ee,12:J,13:ae,14:se,15:fe,21:64},t(u,[2,53],{59:60,58:61,4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,49:[1,78],63:z,64:D,65:B,66:W,67:U}),t(u,[2,56],{59:60,58:61,4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,49:[1,79],63:z,64:D,65:B,66:W,67:U}),t(u,[2,57],{59:60,58:61,4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,63:z,64:D,65:B,66:W,67:U}),t(u,[2,58],{59:60,58:61,4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,63:z,64:D,65:B,66:W,67:U}),t(u,[2,59],{59:60,58:61,4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,63:z,64:D,65:B,66:W,67:U}),t(u,[2,60],{59:60,58:61,4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,63:z,64:D,65:B,66:W,67:U}),{45:[1,80]},{44:[1,81]},t(Y,[2,65]),t(Y,[2,82]),t(Y,[2,83]),t(Y,[2,84]),{3:83,4:H,5:q,6:Z,7:K,8:re,9:Q,10:te,11:ee,12:J,13:ae,14:se,15:fe,18:[1,82]},t(ve,[2,23]),t(ve,[2,1]),t(ve,[2,2]),t(ve,[2,3]),t(ve,[2,4]),t(ve,[2,5]),t(ve,[2,6]),t(ve,[2,7]),t(ve,[2,8]),t(ve,[2,9]),t(ve,[2,10]),t(ve,[2,11]),t(ve,[2,12]),t(u,[2,52],{58:31,43:84,4:d,5:f,10:p,12:g,13:m,14:y,15:v,60:M,61:P,63:z,64:D,65:B,66:W,67:U}),t(u,[2,55],{58:31,43:85,4:d,5:f,10:p,12:g,13:m,14:y,15:v,60:M,61:P,63:z,64:D,65:B,66:W,67:U}),{46:[1,86]},{45:[1,87]},{4:de,5:Ee,6:Ce,8:De,11:ce,13:Ie,16:90,17:ye,18:pe,19:Ae,20:Ve,22:89,23:88},t(ve,[2,24]),t(u,[2,51],{59:60,58:61,4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,63:z,64:D,65:B,66:W,67:U}),t(u,[2,54],{59:60,58:61,4:d,5:f,8:j,10:p,12:g,13:m,14:y,15:v,18:V,63:z,64:D,65:B,66:W,67:U}),t(u,[2,47],{22:89,16:90,23:101,4:de,5:Ee,6:Ce,8:De,11:ce,13:Ie,17:ye,18:pe,19:Ae,20:Ve}),{46:[1,102]},t(u,[2,29],{10:ze}),t(We,[2,27],{16:104,4:de,5:Ee,6:Ce,8:De,11:ce,13:Ie,17:ye,18:pe,19:Ae,20:Ve}),t(me,[2,25]),t(me,[2,13]),t(me,[2,14]),t(me,[2,15]),t(me,[2,16]),t(me,[2,17]),t(me,[2,18]),t(me,[2,19]),t(me,[2,20]),t(me,[2,21]),t(me,[2,22]),t(u,[2,49],{10:ze}),t(u,[2,48],{22:89,16:90,23:105,4:de,5:Ee,6:Ce,8:De,11:ce,13:Ie,17:ye,18:pe,19:Ae,20:Ve}),{4:de,5:Ee,6:Ce,8:De,11:ce,13:Ie,16:90,17:ye,18:pe,19:Ae,20:Ve,22:106},t(me,[2,26]),t(u,[2,50],{10:ze}),t(We,[2,28],{16:104,4:de,5:Ee,6:Ce,8:De,11:ce,13:Ie,17:ye,18:pe,19:Ae,20:Ve})],defaultActions:{8:[2,30],9:[2,31]},parseError:_(l(function(_e,ue){if(ue.recoverable)this.trace(_e);else{var tt=new Error(_e);throw tt.hash=ue,tt}},"parseError"),"parseError"),parse:_(l(function(_e){var ue=this,tt=[0],Re=[],et=[null],Xe=[],ot=this.table,Ge="",ht=0,Je=0,St=2,He=1,dt=Xe.slice.call(arguments,1),Oe=Object.create(this.lexer),vt={yy:{}};for(var qe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qe)&&(vt.yy[qe]=this.yy[qe]);Oe.setInput(_e,vt.yy),vt.yy.lexer=Oe,vt.yy.parser=this,typeof Oe.yylloc=="undefined"&&(Oe.yylloc={});var Me=Oe.yylloc;Xe.push(Me);var lt=Oe.options&&Oe.options.ranges;typeof vt.yy.parseError=="function"?this.parseError=vt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function it(Qe){tt.length=tt.length-2*Qe,et.length=et.length-Qe,Xe.length=Xe.length-Qe}l(it,"popStack"),_(it,"popStack");function Ue(){var Qe;return Qe=Re.pop()||Oe.lex()||He,typeof Qe!="number"&&(Qe instanceof Array&&(Re=Qe,Qe=Re.pop()),Qe=ue.symbols_[Qe]||Qe),Qe}l(Ue,"lex"),_(Ue,"lex");for(var we,gt,ge,ie,be={},$e,le,ke,je;;){if(gt=tt[tt.length-1],this.defaultActions[gt]?ge=this.defaultActions[gt]:((we===null||typeof we=="undefined")&&(we=Ue()),ge=ot[gt]&&ot[gt][we]),typeof ge=="undefined"||!ge.length||!ge[0]){var ut="";je=[];for($e in ot[gt])this.terminals_[$e]&&$e>St&&je.push("'"+this.terminals_[$e]+"'");Oe.showPosition?ut="Parse error on line "+(ht+1)+`:
|
||
`+Oe.showPosition()+`
|
||
Expecting `+je.join(", ")+", got '"+(this.terminals_[we]||we)+"'":ut="Parse error on line "+(ht+1)+": Unexpected "+(we==He?"end of input":"'"+(this.terminals_[we]||we)+"'"),this.parseError(ut,{text:Oe.match,token:this.terminals_[we]||we,line:Oe.yylineno,loc:Me,expected:je})}if(ge[0]instanceof Array&&ge.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+we);switch(ge[0]){case 1:tt.push(we),et.push(Oe.yytext),Xe.push(Oe.yylloc),tt.push(ge[1]),we=null,Je=Oe.yyleng,Ge=Oe.yytext,ht=Oe.yylineno,Me=Oe.yylloc;break;case 2:if(le=this.productions_[ge[1]][1],be.$=et[et.length-le],be._$={first_line:Xe[Xe.length-(le||1)].first_line,last_line:Xe[Xe.length-1].last_line,first_column:Xe[Xe.length-(le||1)].first_column,last_column:Xe[Xe.length-1].last_column},lt&&(be._$.range=[Xe[Xe.length-(le||1)].range[0],Xe[Xe.length-1].range[1]]),ie=this.performAction.apply(be,[Ge,Je,ht,vt.yy,ge[1],et,Xe].concat(dt)),typeof ie!="undefined")return ie;le&&(tt=tt.slice(0,-1*le*2),et=et.slice(0,-1*le),Xe=Xe.slice(0,-1*le)),tt.push(this.productions_[ge[1]][0]),et.push(be.$),Xe.push(be._$),ke=ot[tt[tt.length-2]][tt[tt.length-1]],tt.push(ke);break;case 3:return!0}}return!0},"parse"),"parse")},ne=function(){var oe={EOF:1,parseError:_(l(function(ue,tt){if(this.yy.parser)this.yy.parser.parseError(ue,tt);else throw new Error(ue)},"parseError"),"parseError"),setInput:_(function(_e,ue){return this.yy=ue||this.yy||{},this._input=_e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var _e=this._input[0];this.yytext+=_e,this.yyleng++,this.offset++,this.match+=_e,this.matched+=_e;var ue=_e.match(/(?:\r\n?|\n).*/g);return ue?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_e},"input"),unput:_(function(_e){var ue=_e.length,tt=_e.split(/(?:\r\n?|\n)/g);this._input=_e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ue),this.offset-=ue;var Re=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),tt.length-1&&(this.yylineno-=tt.length-1);var et=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:tt?(tt.length===Re.length?this.yylloc.first_column:0)+Re[Re.length-tt.length].length-tt[0].length:this.yylloc.first_column-ue},this.options.ranges&&(this.yylloc.range=[et[0],et[0]+this.yyleng-ue]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(_e){this.unput(this.match.slice(_e))},"less"),pastInput:_(function(){var _e=this.matched.substr(0,this.matched.length-this.match.length);return(_e.length>20?"...":"")+_e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var _e=this.match;return _e.length<20&&(_e+=this._input.substr(0,20-_e.length)),(_e.substr(0,20)+(_e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var _e=this.pastInput(),ue=new Array(_e.length+1).join("-");return _e+this.upcomingInput()+`
|
||
`+ue+"^"},"showPosition"),test_match:_(function(_e,ue){var tt,Re,et;if(this.options.backtrack_lexer&&(et={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(et.yylloc.range=this.yylloc.range.slice(0))),Re=_e[0].match(/(?:\r\n?|\n).*/g),Re&&(this.yylineno+=Re.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Re?Re[Re.length-1].length-Re[Re.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_e[0].length},this.yytext+=_e[0],this.match+=_e[0],this.matches=_e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_e[0].length),this.matched+=_e[0],tt=this.performAction.call(this,this.yy,this,ue,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),tt)return tt;if(this._backtrack){for(var Xe in et)this[Xe]=et[Xe];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _e,ue,tt,Re;this._more||(this.yytext="",this.match="");for(var et=this._currentRules(),Xe=0;Xe<et.length;Xe++)if(tt=this._input.match(this.rules[et[Xe]]),tt&&(!ue||tt[0].length>ue[0].length)){if(ue=tt,Re=Xe,this.options.backtrack_lexer){if(_e=this.test_match(tt,et[Xe]),_e!==!1)return _e;if(this._backtrack){ue=!1;continue}else return!1}else if(!this.options.flex)break}return ue?(_e=this.test_match(ue,et[Re]),_e!==!1?_e:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var ue=this.next();return ue||this.lex()},"lex"),"lex"),begin:_(l(function(ue){this.conditionStack.push(ue)},"begin"),"begin"),popState:_(l(function(){var ue=this.conditionStack.length-1;return ue>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(ue){return ue=this.conditionStack.length-1-Math.abs(ue||0),ue>=0?this.conditionStack[ue]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(ue){this.begin(ue)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(ue,tt,Re,et){switch(Re){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},"anonymous"),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return oe}();Se.lexer=ne;function xe(){this.yy={}}return l(xe,"Parser"),_(xe,"Parser"),xe.prototype=Se,Se.Parser=xe,new xe}();kee.parser=kee;var mdr=kee,El=Qd(),ydr=(Bb=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var e,r,n,a,i,s,o,u,h,d,f,p,g,m,y,v,b,w;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((e=hn.quadrantChart)==null?void 0:e.chartWidth)||500,chartWidth:((r=hn.quadrantChart)==null?void 0:r.chartHeight)||500,titlePadding:((n=hn.quadrantChart)==null?void 0:n.titlePadding)||10,titleFontSize:((a=hn.quadrantChart)==null?void 0:a.titleFontSize)||20,quadrantPadding:((i=hn.quadrantChart)==null?void 0:i.quadrantPadding)||5,xAxisLabelPadding:((s=hn.quadrantChart)==null?void 0:s.xAxisLabelPadding)||5,yAxisLabelPadding:((o=hn.quadrantChart)==null?void 0:o.yAxisLabelPadding)||5,xAxisLabelFontSize:((u=hn.quadrantChart)==null?void 0:u.xAxisLabelFontSize)||16,yAxisLabelFontSize:((h=hn.quadrantChart)==null?void 0:h.yAxisLabelFontSize)||16,quadrantLabelFontSize:((d=hn.quadrantChart)==null?void 0:d.quadrantLabelFontSize)||16,quadrantTextTopPadding:((f=hn.quadrantChart)==null?void 0:f.quadrantTextTopPadding)||5,pointTextPadding:((p=hn.quadrantChart)==null?void 0:p.pointTextPadding)||5,pointLabelFontSize:((g=hn.quadrantChart)==null?void 0:g.pointLabelFontSize)||12,pointRadius:((m=hn.quadrantChart)==null?void 0:m.pointRadius)||5,xAxisPosition:((y=hn.quadrantChart)==null?void 0:y.xAxisPosition)||"top",yAxisPosition:((v=hn.quadrantChart)==null?void 0:v.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((b=hn.quadrantChart)==null?void 0:b.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((w=hn.quadrantChart)==null?void 0:w.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:El.quadrant1Fill,quadrant2Fill:El.quadrant2Fill,quadrant3Fill:El.quadrant3Fill,quadrant4Fill:El.quadrant4Fill,quadrant1TextFill:El.quadrant1TextFill,quadrant2TextFill:El.quadrant2TextFill,quadrant3TextFill:El.quadrant3TextFill,quadrant4TextFill:El.quadrant4TextFill,quadrantPointFill:El.quadrantPointFill,quadrantPointTextFill:El.quadrantPointTextFill,quadrantXAxisTextFill:El.quadrantXAxisTextFill,quadrantYAxisTextFill:El.quadrantYAxisTextFill,quadrantTitleFill:El.quadrantTitleFill,quadrantInternalBorderStrokeFill:El.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:El.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,Le.info("clear called")}setData(e){this.data=X(X({},this.data),e)}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,r){this.classes.set(e,r)}setConfig(e){Le.trace("setConfig called with: ",e),this.config=X(X({},this.config),e)}setThemeConfig(e){Le.trace("setThemeConfig called with: ",e),this.themeConfig=X(X({},this.themeConfig),e)}calculateSpace(e,r,n,a){const i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,s={top:e==="top"&&r?i:0,bottom:e==="bottom"&&r?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&n?o:0,right:this.config.yAxisPosition==="right"&&n?o:0},h=this.config.titleFontSize+this.config.titlePadding*2,d={top:a?h:0},f=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+s.top+d.top,g=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,m=this.config.chartHeight-this.config.quadrantPadding*2-s.top-s.bottom-d.top,y=g/2,v=m/2;return{xAxisSpace:s,yAxisSpace:u,titleSpace:d,quadrantSpace:{quadrantLeft:f,quadrantTop:p,quadrantWidth:g,quadrantHalfWidth:y,quadrantHeight:m,quadrantHalfHeight:v}}}getAxisLabels(e,r,n,a){const{quadrantSpace:i,titleSpace:s}=a,{quadrantHalfHeight:o,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:d,quadrantTop:f,quadrantWidth:p}=i,g=!!this.data.xAxisRightText,m=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(g?d/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+f+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+d+(g?d/2:0),y:e==="top"?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+f+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:f+u-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:f+o-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:-90}),y}getQuadrants(e){const{quadrantSpace:r}=e,{quadrantHalfHeight:n,quadrantLeft:a,quadrantHalfWidth:i,quadrantTop:s}=r,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+i,y:s,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+i,y:s+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(const u of o)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return o}getQuadrantPoints(e){const{quadrantSpace:r}=e,{quadrantHeight:n,quadrantLeft:a,quadrantTop:i,quadrantWidth:s}=r,o=kw().domain([0,1]).range([a,s+a]),u=kw().domain([0,1]).range([n+i,i]);return this.data.points.map(d=>{var g,m,y,v;const f=this.classes.get(d.className);return f&&(d=X(X({},f),d)),{x:o(d.x),y:u(d.y),fill:(g=d.color)!=null?g:this.themeConfig.quadrantPointFill,radius:(m=d.radius)!=null?m:this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:o(d.x),y:u(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:(y=d.strokeColor)!=null?y:this.themeConfig.quadrantPointFill,strokeWidth:(v=d.strokeWidth)!=null?v:"0px"}})}getBorders(e){const r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:a,quadrantHeight:i,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:u,quadrantWidth:h}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:u,x2:s+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+h,y1:u+r,x2:s+h,y2:u+i-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-r,y1:u+i,x2:s+h+r,y2:u+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:u+r,x2:s,y2:u+i-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+o,y1:u+r,x2:s+o,y2:u+i-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:u+a,x2:s+h-r,y2:u+a}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,i=this.calculateSpace(a,e,r,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(a,e,r,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},l(Bb,"QuadrantBuilder"),_(Bb,"QuadrantBuilder"),Bb),qP=(zb=class extends Error{constructor(e,r,n){super(`value for ${e} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}},l(zb,"InvalidStyleError"),_(zb,"InvalidStyleError"),zb);function Aee(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}l(Aee,"validateHexCode"),_(Aee,"validateHexCode");function mze(t){return!/^\d+$/.test(t)}l(mze,"validateNumber"),_(mze,"validateNumber");function yze(t){return!/^\d+px$/.test(t)}l(yze,"validateSizeInPixels"),_(yze,"validateSizeInPixels");function Id(t){return mn(t.trim(),ft())}l(Id,"textSanitizer$1"),_(Id,"textSanitizer");var yo=new ydr;function vze(t){yo.setData({quadrant1Text:Id(t.text)})}l(vze,"setQuadrant1Text"),_(vze,"setQuadrant1Text");function bze(t){yo.setData({quadrant2Text:Id(t.text)})}l(bze,"setQuadrant2Text"),_(bze,"setQuadrant2Text");function xze(t){yo.setData({quadrant3Text:Id(t.text)})}l(xze,"setQuadrant3Text"),_(xze,"setQuadrant3Text");function wze(t){yo.setData({quadrant4Text:Id(t.text)})}l(wze,"setQuadrant4Text"),_(wze,"setQuadrant4Text");function Tze(t){yo.setData({xAxisLeftText:Id(t.text)})}l(Tze,"setXAxisLeftText"),_(Tze,"setXAxisLeftText");function Eze(t){yo.setData({xAxisRightText:Id(t.text)})}l(Eze,"setXAxisRightText"),_(Eze,"setXAxisRightText");function Cze(t){yo.setData({yAxisTopText:Id(t.text)})}l(Cze,"setYAxisTopText"),_(Cze,"setYAxisTopText");function Sze(t){yo.setData({yAxisBottomText:Id(t.text)})}l(Sze,"setYAxisBottomText"),_(Sze,"setYAxisBottomText");function YP(t){const e={};for(const r of t){const[n,a]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(mze(a))throw new qP(n,a,"number");e.radius=parseInt(a)}else if(n==="color"){if(Aee(a))throw new qP(n,a,"hex code");e.color=a}else if(n==="stroke-color"){if(Aee(a))throw new qP(n,a,"hex code");e.strokeColor=a}else if(n==="stroke-width"){if(yze(a))throw new qP(n,a,"number of pixels (eg. 10px)");e.strokeWidth=a}else throw new Error(`style named ${n} is not supported.`)}return e}l(YP,"parseStyles"),_(YP,"parseStyles");function _ze(t,e,r,n,a){const i=YP(a);yo.addPoints([X({x:r,y:n,text:Id(t.text),className:e},i)])}l(_ze,"addPoint"),_(_ze,"addPoint");function kze(t,e){yo.addClass(t,YP(e))}l(kze,"addClass"),_(kze,"addClass");function Aze(t){yo.setConfig({chartWidth:t})}l(Aze,"setWidth"),_(Aze,"setWidth");function Nze(t){yo.setConfig({chartHeight:t})}l(Nze,"setHeight"),_(Nze,"setHeight");function Ize(){const t=ft(),{themeVariables:e,quadrantChart:r}=t;return r&&yo.setConfig(r),yo.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),yo.setData({titleText:Ia()}),yo.build()}l(Ize,"getQuadrantData"),_(Ize,"getQuadrantData");var vdr=_(function(){yo.clear(),Ca()},"clear"),bdr={setWidth:Aze,setHeight:Nze,setQuadrant1Text:vze,setQuadrant2Text:bze,setQuadrant3Text:xze,setQuadrant4Text:wze,setXAxisLeftText:Tze,setXAxisRightText:Eze,setYAxisTopText:Cze,setYAxisBottomText:Sze,parseStyles:YP,addPoint:_ze,addClass:kze,getQuadrantData:Ize,clear:vdr,setAccTitle:Na,getAccTitle:za,setDiagramTitle:Va,getDiagramTitle:Ia,getAccDescription:Wa,setAccDescription:Ha},xdr=_((t,e,r,n)=>{var k,A,I,L,R,O;function a(M){return M==="top"?"hanging":"middle"}l(a,"getDominantBaseLine"),_(a,"getDominantBaseLine");function i(M){return M==="left"?"start":"middle"}l(i,"getTextAnchor"),_(i,"getTextAnchor");function s(M){return`translate(${M.x}, ${M.y}) rotate(${M.rotation||0})`}l(s,"getTransformation"),_(s,"getTransformation");const o=ft();Le.debug(`Rendering quadrant chart
|
||
`+t);const u=o.securityLevel;let h;u==="sandbox"&&(h=Yt("#i"+e));const f=Yt(u==="sandbox"?h.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`),p=f.append("g").attr("class","main"),g=(A=(k=o.quadrantChart)==null?void 0:k.chartWidth)!=null?A:500,m=(L=(I=o.quadrantChart)==null?void 0:I.chartHeight)!=null?L:500;yi(f,m,g,(O=(R=o.quadrantChart)==null?void 0:R.useMaxWidth)!=null?O:!0),f.attr("viewBox","0 0 "+g+" "+m),n.db.setHeight(m),n.db.setWidth(g);const y=n.db.getQuadrantData(),v=p.append("g").attr("class","quadrants"),b=p.append("g").attr("class","border"),w=p.append("g").attr("class","data-points"),x=p.append("g").attr("class","labels"),T=p.append("g").attr("class","title");y.title&&T.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",a(y.title.horizontalPos)).attr("text-anchor",i(y.title.verticalPos)).attr("transform",s(y.title)).text(y.title.text),y.borderLines&&b.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",M=>M.x1).attr("y1",M=>M.y1).attr("x2",M=>M.x2).attr("y2",M=>M.y2).style("stroke",M=>M.strokeFill).style("stroke-width",M=>M.strokeWidth);const C=v.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");C.append("rect").attr("x",M=>M.x).attr("y",M=>M.y).attr("width",M=>M.width).attr("height",M=>M.height).attr("fill",M=>M.fill),C.append("text").attr("x",0).attr("y",0).attr("fill",M=>M.text.fill).attr("font-size",M=>M.text.fontSize).attr("dominant-baseline",M=>a(M.text.horizontalPos)).attr("text-anchor",M=>i(M.text.verticalPos)).attr("transform",M=>s(M.text)).text(M=>M.text.text),x.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(M=>M.text).attr("fill",M=>M.fill).attr("font-size",M=>M.fontSize).attr("dominant-baseline",M=>a(M.horizontalPos)).attr("text-anchor",M=>i(M.verticalPos)).attr("transform",M=>s(M));const E=w.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");E.append("circle").attr("cx",M=>M.x).attr("cy",M=>M.y).attr("r",M=>M.radius).attr("fill",M=>M.fill).attr("stroke",M=>M.strokeColor).attr("stroke-width",M=>M.strokeWidth),E.append("text").attr("x",0).attr("y",0).text(M=>M.text.text).attr("fill",M=>M.text.fill).attr("font-size",M=>M.text.fontSize).attr("dominant-baseline",M=>a(M.text.horizontalPos)).attr("text-anchor",M=>i(M.text.verticalPos)).attr("transform",M=>s(M.text))},"draw"),wdr={draw:xdr},Tdr={parser:mdr,db:bdr,renderer:wdr,styles:_(()=>"","styles")},Edr=Object.freeze({__proto__:null,diagram:Tdr}),Nee=function(){var t=_(function(z,D,B,W){for(B=B||{},W=z.length;W--;B[z[W]]=D);return B},"o"),e=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],a=[1,5],i=[1,6],s=[1,7],o=[1,5,10,12,14,16,18,19,21,23,36,37,38],u=[1,25],h=[1,26],d=[1,28],f=[1,29],p=[1,30],g=[1,31],m=[1,32],y=[1,33],v=[1,34],b=[1,35],w=[1,36],x=[1,37],T=[1,43],C=[1,42],S=[1,47],E=[1,50],k=[1,10,12,14,16,18,19,21,23,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],I=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],L=[1,65],R=[26,28],O={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:_(l(function(D,B,W,U,j,V,Y){var H=V.length-1;switch(j){case 5:U.setOrientation(V[H]);break;case 9:U.setDiagramTitle(V[H].text.trim());break;case 12:U.setLineData({text:"",type:"text"},V[H]);break;case 13:U.setLineData(V[H-1],V[H]);break;case 14:U.setBarData({text:"",type:"text"},V[H]);break;case 15:U.setBarData(V[H-1],V[H]);break;case 16:this.$=V[H].trim(),U.setAccTitle(this.$);break;case 17:case 18:this.$=V[H].trim(),U.setAccDescription(this.$);break;case 19:this.$=V[H-1];break;case 20:case 30:this.$=[V[H-2],...V[H]];break;case 21:case 31:this.$=[V[H]];break;case 22:this.$={value:Number(V[H-1]),label:V[H]};break;case 23:this.$={value:Number(V[H]),label:""};break;case 24:U.setXAxisTitle(V[H]);break;case 25:U.setXAxisTitle(V[H-1]);break;case 26:U.setXAxisTitle({type:"text",text:""});break;case 27:U.setXAxisBand(V[H]);break;case 28:U.setXAxisRangeData(Number(V[H-2]),Number(V[H]));break;case 29:this.$=V[H-1];break;case 32:U.setYAxisTitle(V[H]);break;case 33:U.setYAxisTitle(V[H-1]);break;case 34:U.setYAxisTitle({type:"text",text:""});break;case 35:U.setYAxisRangeData(Number(V[H-2]),Number(V[H]));break;case 39:this.$={text:V[H],type:"text"};break;case 40:this.$={text:V[H],type:"text"};break;case 41:this.$={text:V[H],type:"markdown"};break;case 42:this.$=V[H];break;case 43:this.$=V[H-1]+""+V[H];break}},"anonymous"),"anonymous"),table:[t(e,r,{3:1,4:2,7:4,5:n,36:a,37:i,38:s}),{1:[3]},t(e,r,{4:2,7:4,3:8,5:n,36:a,37:i,38:s}),t(e,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:i,38:s}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(o,[2,36]),t(o,[2,37]),t(o,[2,38]),{1:[2,1]},t(e,r,{4:2,7:4,3:21,5:n,36:a,37:i,38:s}),{1:[2,3]},t(o,[2,5]),t(e,[2,7],{4:22,36:a,37:i,38:s}),{11:23,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:g,46:m,47:y,48:v,49:b,50:w,51:x},{11:39,13:38,24:T,29:C,30:u,31:40,32:41,39:24,40:h,41:27,42:d,43:f,44:p,45:g,46:m,47:y,48:v,49:b,50:w,51:x},{11:45,15:44,29:S,30:u,35:46,39:24,40:h,41:27,42:d,43:f,44:p,45:g,46:m,47:y,48:v,49:b,50:w,51:x},{11:49,17:48,24:E,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:g,46:m,47:y,48:v,49:b,50:w,51:x},{11:52,17:51,24:E,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:g,46:m,47:y,48:v,49:b,50:w,51:x},{20:[1,53]},{22:[1,54]},t(k,[2,18]),{1:[2,2]},t(k,[2,8]),t(k,[2,9]),t(A,[2,39],{41:55,42:d,43:f,44:p,45:g,46:m,47:y,48:v,49:b,50:w,51:x}),t(A,[2,40]),t(A,[2,41]),t(I,[2,42]),t(I,[2,44]),t(I,[2,45]),t(I,[2,46]),t(I,[2,47]),t(I,[2,48]),t(I,[2,49]),t(I,[2,50]),t(I,[2,51]),t(I,[2,52]),t(I,[2,53]),t(k,[2,10]),t(k,[2,24],{32:41,31:56,24:T,29:C}),t(k,[2,26]),t(k,[2,27]),{33:[1,57]},{11:59,30:u,34:58,39:24,40:h,41:27,42:d,43:f,44:p,45:g,46:m,47:y,48:v,49:b,50:w,51:x},t(k,[2,11]),t(k,[2,32],{35:60,29:S}),t(k,[2,34]),{33:[1,61]},t(k,[2,12]),{17:62,24:E},{25:63,27:64,29:L},t(k,[2,14]),{17:66,24:E},t(k,[2,16]),t(k,[2,17]),t(I,[2,43]),t(k,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},t(k,[2,33]),{29:[1,70]},t(k,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},t(R,[2,23],{30:[1,73]}),t(k,[2,15]),t(k,[2,28]),t(k,[2,29]),{11:59,30:u,34:74,39:24,40:h,41:27,42:d,43:f,44:p,45:g,46:m,47:y,48:v,49:b,50:w,51:x},t(k,[2,35]),t(k,[2,19]),{25:75,27:64,29:L},t(R,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:_(l(function(D,B){if(B.recoverable)this.trace(D);else{var W=new Error(D);throw W.hash=B,W}},"parseError"),"parseError"),parse:_(l(function(D){var B=this,W=[0],U=[],j=[null],V=[],Y=this.table,H="",q=0,Z=0,K=2,re=1,Q=V.slice.call(arguments,1),te=Object.create(this.lexer),ee={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(ee.yy[J]=this.yy[J]);te.setInput(D,ee.yy),ee.yy.lexer=te,ee.yy.parser=this,typeof te.yylloc=="undefined"&&(te.yylloc={});var ae=te.yylloc;V.push(ae);var se=te.options&&te.options.ranges;typeof ee.yy.parseError=="function"?this.parseError=ee.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fe(ze){W.length=W.length-2*ze,j.length=j.length-ze,V.length=V.length-ze}l(fe,"popStack"),_(fe,"popStack");function ve(){var ze;return ze=U.pop()||te.lex()||re,typeof ze!="number"&&(ze instanceof Array&&(U=ze,ze=U.pop()),ze=B.symbols_[ze]||ze),ze}l(ve,"lex"),_(ve,"lex");for(var de,Ee,Ce,De,ce={},Ie,ye,pe,Ae;;){if(Ee=W[W.length-1],this.defaultActions[Ee]?Ce=this.defaultActions[Ee]:((de===null||typeof de=="undefined")&&(de=ve()),Ce=Y[Ee]&&Y[Ee][de]),typeof Ce=="undefined"||!Ce.length||!Ce[0]){var Ve="";Ae=[];for(Ie in Y[Ee])this.terminals_[Ie]&&Ie>K&&Ae.push("'"+this.terminals_[Ie]+"'");te.showPosition?Ve="Parse error on line "+(q+1)+`:
|
||
`+te.showPosition()+`
|
||
Expecting `+Ae.join(", ")+", got '"+(this.terminals_[de]||de)+"'":Ve="Parse error on line "+(q+1)+": Unexpected "+(de==re?"end of input":"'"+(this.terminals_[de]||de)+"'"),this.parseError(Ve,{text:te.match,token:this.terminals_[de]||de,line:te.yylineno,loc:ae,expected:Ae})}if(Ce[0]instanceof Array&&Ce.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+de);switch(Ce[0]){case 1:W.push(de),j.push(te.yytext),V.push(te.yylloc),W.push(Ce[1]),de=null,Z=te.yyleng,H=te.yytext,q=te.yylineno,ae=te.yylloc;break;case 2:if(ye=this.productions_[Ce[1]][1],ce.$=j[j.length-ye],ce._$={first_line:V[V.length-(ye||1)].first_line,last_line:V[V.length-1].last_line,first_column:V[V.length-(ye||1)].first_column,last_column:V[V.length-1].last_column},se&&(ce._$.range=[V[V.length-(ye||1)].range[0],V[V.length-1].range[1]]),De=this.performAction.apply(ce,[H,Z,q,ee.yy,Ce[1],j,V].concat(Q)),typeof De!="undefined")return De;ye&&(W=W.slice(0,-1*ye*2),j=j.slice(0,-1*ye),V=V.slice(0,-1*ye)),W.push(this.productions_[Ce[1]][0]),j.push(ce.$),V.push(ce._$),pe=Y[W[W.length-2]][W[W.length-1]],W.push(pe);break;case 3:return!0}}return!0},"parse"),"parse")},M=function(){var z={EOF:1,parseError:_(l(function(B,W){if(this.yy.parser)this.yy.parser.parseError(B,W);else throw new Error(B)},"parseError"),"parseError"),setInput:_(function(D,B){return this.yy=B||this.yy||{},this._input=D,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var D=this._input[0];this.yytext+=D,this.yyleng++,this.offset++,this.match+=D,this.matched+=D;var B=D.match(/(?:\r\n?|\n).*/g);return B?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),D},"input"),unput:_(function(D){var B=D.length,W=D.split(/(?:\r\n?|\n)/g);this._input=D+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-B),this.offset-=B;var U=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),W.length-1&&(this.yylineno-=W.length-1);var j=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:W?(W.length===U.length?this.yylloc.first_column:0)+U[U.length-W.length].length-W[0].length:this.yylloc.first_column-B},this.options.ranges&&(this.yylloc.range=[j[0],j[0]+this.yyleng-B]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(D){this.unput(this.match.slice(D))},"less"),pastInput:_(function(){var D=this.matched.substr(0,this.matched.length-this.match.length);return(D.length>20?"...":"")+D.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var D=this.match;return D.length<20&&(D+=this._input.substr(0,20-D.length)),(D.substr(0,20)+(D.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var D=this.pastInput(),B=new Array(D.length+1).join("-");return D+this.upcomingInput()+`
|
||
`+B+"^"},"showPosition"),test_match:_(function(D,B){var W,U,j;if(this.options.backtrack_lexer&&(j={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(j.yylloc.range=this.yylloc.range.slice(0))),U=D[0].match(/(?:\r\n?|\n).*/g),U&&(this.yylineno+=U.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:U?U[U.length-1].length-U[U.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+D[0].length},this.yytext+=D[0],this.match+=D[0],this.matches=D,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(D[0].length),this.matched+=D[0],W=this.performAction.call(this,this.yy,this,B,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),W)return W;if(this._backtrack){for(var V in j)this[V]=j[V];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var D,B,W,U;this._more||(this.yytext="",this.match="");for(var j=this._currentRules(),V=0;V<j.length;V++)if(W=this._input.match(this.rules[j[V]]),W&&(!B||W[0].length>B[0].length)){if(B=W,U=V,this.options.backtrack_lexer){if(D=this.test_match(W,j[V]),D!==!1)return D;if(this._backtrack){B=!1;continue}else return!1}else if(!this.options.flex)break}return B?(D=this.test_match(B,j[U]),D!==!1?D:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var B=this.next();return B||this.lex()},"lex"),"lex"),begin:_(l(function(B){this.conditionStack.push(B)},"begin"),"begin"),popState:_(l(function(){var B=this.conditionStack.length-1;return B>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(B){return B=this.conditionStack.length-1-Math.abs(B||0),B>=0?this.conditionStack[B]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(B){this.begin(B)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(B,W,U,j){switch(U){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"anonymous"),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return z}();O.lexer=M;function P(){this.yy={}}return l(P,"Parser"),_(P,"Parser"),P.prototype=O,O.Parser=P,new P}();Nee.parser=Nee;var Cdr=Nee;function Iee(t){return t.type==="bar"}l(Iee,"isBarPlot"),_(Iee,"isBarPlot");function UP(t){return t.type==="band"}l(UP,"isBandAxisData"),_(UP,"isBandAxisData");function tC(t){return t.type==="linear"}l(tC,"isLinearAxisData"),_(tC,"isLinearAxisData");var Lze=(Hb=class{constructor(e){this.parentGroup=e}getMaxDimension(e,r){if(!this.parentGroup)return{width:e.reduce((i,s)=>Math.max(s.length,i),0)*r,height:r};const n={width:0,height:0},a=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(const i of e){const s=vbe(a,1,i),o=s?s.width:i.length*r,u=s?s.height:r;n.width=Math.max(n.width,o),n.height=Math.max(n.height,u)}return a.remove(),n}},l(Hb,"TextDimensionCalculatorWithFont"),_(Hb,"TextDimensionCalculatorWithFont"),Hb),$ze=.7,Mze=.2,Pze=(Wb=class{constructor(e,r,n,a){this.axisConfig=e,this.title=r,this.textDimensionCalculator=n,this.axisThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){const e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){$ze*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor($ze*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let r=e.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const n=this.getLabelDimension(),a=Mze*e.width;this.outerPadding=Math.min(n.width/2,a);let i=n.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=r&&(r-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,a<=r&&(r-=a,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-r}calculateSpaceIfDrawnVertical(e){let r=e.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const n=this.getLabelDimension(),a=Mze*e.height;this.outerPadding=Math.min(n.height/2,a);const i=n.width+this.axisConfig.labelPadding*2;i<=r&&(r-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),a=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,a<=r&&(r-=a,this.showTitle=!0)}this.boundingRect.width=e.width-r,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){const r=this.normalizedLabelRotationInRad;return r===0?0:Math.sin(r)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){const e=[];if(this.showAxisLine){const r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForBottomAxis(){const e=[];if(this.showAxisLine){const r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElementsForTopAxis(){const e=[];if(this.showAxisLine){const r=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const r=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},l(Wb,"BaseAxis"),_(Wb,"BaseAxis"),Wb),Sdr=(Vb=class extends Pze{constructor(e,r,n,a,i){super(e,a,i,r),this.categories=n,this.scale=mH().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=mH().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Le.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){var r;return(r=this.scale(e))!=null?r:this.getRange()[0]}},l(Vb,"BandAxis"),_(Vb,"BandAxis"),Vb),_dr=(Gb=class extends Pze{constructor(e,r,n,a,i){super(e,a,i,r),this.domain=n,this.scale=kw().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=kw().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}},l(Gb,"LinearAxis"),_(Gb,"LinearAxis"),Gb);function Lee(t,e,r,n){const a=new Lze(n);return UP(t)?new Sdr(e,r,t.categories,t.title,a):new _dr(e,r,[t.min,t.max],t.title,a)}l(Lee,"getAxis"),_(Lee,"getAxis");var kdr=(qb=class{constructor(e,r,n,a){this.textDimensionCalculator=e,this.chartConfig=r,this.chartData=n,this.chartThemeConfig=a,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){const r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,e.width),a=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=a&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=a,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const e=[];return this.showChartTitle&&e.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}},l(qb,"ChartTitle"),_(qb,"ChartTitle"),qb);function Rze(t,e,r,n){const a=new Lze(n);return new kdr(a,t,e,r)}l(Rze,"getChartTitleComponent"),_(Rze,"getChartTitleComponent");var Adr=(Yb=class{constructor(e,r,n,a,i){this.plotData=e,this.xAxis=r,this.yAxis=n,this.orientation=a,this.plotIndex=i}getDrawableElement(){const e=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);let r;if(this.orientation==="horizontal"?r=Q4().y(a=>a[0]).x(a=>a[1])(e):r=Q4().x(a=>a[0]).y(a=>a[1])(e),!r)return[];const n=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){const s=[];for(const[o,[u,h]]of e.entries()){const d=this.plotData.pointLabels[o];d&&(this.orientation==="horizontal"?s.push({x:h+10,y:u,text:d,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):s.push({x:u,y:h-10,text:d,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}s.length>0&&n.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:s})}return n}},l(Yb,"LinePlot"),_(Yb,"LinePlot"),Yb),Ndr=(Ub=class{constructor(e,r,n,a,i,s){this.barData=e,this.boundingRect=r,this.xAxis=n,this.yAxis=a,this.orientation=i,this.plotIndex=s}getDrawableElement(){const e=this.barData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),a=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(i=>({x:this.boundingRect.x,y:i[0]-a,height:n,width:i[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(i=>({x:i[0]-a,y:i[1],width:n,height:this.boundingRect.y+this.boundingRect.height-i[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},l(Ub,"BarPlot"),_(Ub,"BarPlot"),Ub),Idr=(jb=class{constructor(e,r,n){this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(e,r){this.xAxis=e,this.yAxis=r}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const e=[];for(const[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{const a=new Adr(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...a.getDrawableElement())}break;case"bar":{const a=new Ndr(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);e.push(...a.getDrawableElement())}break}return e}},l(jb,"BasePlot"),_(jb,"BasePlot"),jb);function Oze(t,e,r){return new Idr(t,e,r)}l(Oze,"getPlotComponent"),_(Oze,"getPlotComponent");var Ldr=(Kb=class{constructor(e,r,n,a){this.chartConfig=e,this.chartData=r,this.componentStore={title:Rze(e,r,n,a),plot:Oze(e,r,n),xAxis:Lee(r.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},a),yAxis:Lee(r.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},a)}}calculateVerticalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,a=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:s});e-=o.width,r-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),a=o.height,r-=o.height,this.componentStore.xAxis.setAxisPosition("bottom"),o=this.componentStore.xAxis.calculateSpace({width:e,height:r}),r-=o.height,this.componentStore.yAxis.setAxisPosition("left"),o=this.componentStore.yAxis.calculateSpace({width:e,height:r}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),r>0&&(s+=r,r=0),this.componentStore.plot.calculateSpace({width:i,height:s}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:a+s}),this.componentStore.yAxis.setRange([a,a+s]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(u=>Iee(u))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,r=this.chartConfig.height,n=0,a=0,i=0,s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:s,height:o});e-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("left"),u=this.componentStore.xAxis.calculateSpace({width:e,height:r}),e-=u.width,a=u.width,this.componentStore.yAxis.setAxisPosition("top"),u=this.componentStore.yAxis.calculateSpace({width:e,height:r}),r-=u.height,i=n+u.height,e>0&&(s+=e,e=0),r>0&&(o+=r,r=0),this.componentStore.plot.calculateSpace({width:s,height:o}),this.componentStore.plot.setBoundingBoxXY({x:a,y:i}),this.componentStore.yAxis.setRange([a,a+s]),this.componentStore.yAxis.setBoundingBoxXY({x:a,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(h=>Iee(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const r of Object.values(this.componentStore))e.push(...r.getDrawableElements());return e}},l(Kb,"Orchestrator"),_(Kb,"Orchestrator"),Kb),$dr=(Xb=class{static build(e,r,n,a){return new Ldr(e,r,n,a).getDrawableElement()}},l(Xb,"XYChartBuilder"),_(Xb,"XYChartBuilder"),Xb),pk=0,Dze,gk=Ree(),mk=Pee(),Hn=Oee(),$ee=mk.plotColorPalette.split(",").map(t=>t.trim()),jP=!1,Mee=!1;function Pee(){const t=Qd(),e=Ar();return Ga(t.xyChart,e.themeVariables.xyChart)}l(Pee,"getChartDefaultThemeConfig"),_(Pee,"getChartDefaultThemeConfig");function Ree(){const t=Ar();return Ga(hn.xyChart,t.xyChart)}l(Ree,"getChartDefaultConfig"),_(Ree,"getChartDefaultConfig");function Oee(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}l(Oee,"getChartDefaultData"),_(Oee,"getChartDefaultData");function yk(t){const e=Ar();return mn(t.trim(),e)}l(yk,"textSanitizer"),_(yk,"textSanitizer");function Fze(t){Dze=t}l(Fze,"setTmpSVGG"),_(Fze,"setTmpSVGG");function Bze(t){t==="horizontal"?gk.chartOrientation="horizontal":gk.chartOrientation="vertical"}l(Bze,"setOrientation"),_(Bze,"setOrientation");function zze(t){Hn.xAxis.title=yk(t.text)}l(zze,"setXAxisTitle"),_(zze,"setXAxisTitle");function Dee(t,e){Hn.xAxis={type:"linear",title:Hn.xAxis.title,min:t,max:e},jP=!0}l(Dee,"setXAxisRangeData"),_(Dee,"setXAxisRangeData");function Hze(t){Hn.xAxis={type:"band",title:Hn.xAxis.title,categories:t.map(e=>yk(e.text))},jP=!0}l(Hze,"setXAxisBand"),_(Hze,"setXAxisBand");function Wze(t){Hn.yAxis.title=yk(t.text)}l(Wze,"setYAxisTitle"),_(Wze,"setYAxisTitle");function Vze(t,e){Hn.yAxis={type:"linear",title:Hn.yAxis.title,min:t,max:e},Mee=!0}l(Vze,"setYAxisRangeData"),_(Vze,"setYAxisRangeData");function Gze(t){const e=Math.min(...t),r=Math.max(...t),n=tC(Hn.yAxis)?Hn.yAxis.min:1/0,a=tC(Hn.yAxis)?Hn.yAxis.max:-1/0;Hn.yAxis={type:"linear",title:Hn.yAxis.title,min:Math.min(n,e),max:Math.max(a,r)}}l(Gze,"setYAxisRangeFromPlotData"),_(Gze,"setYAxisRangeFromPlotData");function Fee(t){let e=[];if(t.length===0)return e;if(!jP){const r=tC(Hn.xAxis)?Hn.xAxis.min:1/0,n=tC(Hn.xAxis)?Hn.xAxis.max:-1/0;Dee(Math.min(r,1),Math.max(n,t.length))}if(UP(Hn.xAxis)&&t.length>Hn.xAxis.categories.length&&(t=t.slice(0,Hn.xAxis.categories.length)),Mee||Gze(t),UP(Hn.xAxis)&&(e=Hn.xAxis.categories.map((r,n)=>[r,t[n]])),tC(Hn.xAxis)){const r=Hn.xAxis.min,n=Hn.xAxis.max,a=(n-r)/(t.length-1),i=[];for(let s=r;s<=n;s+=a)i.push(`${s}`);e=i.map((s,o)=>[s,t[o]])}return e}l(Fee,"transformDataWithoutCategory"),_(Fee,"transformDataWithoutCategory");function Bee(t){return $ee[t===0?0:t%$ee.length]}l(Bee,"getPlotColorFromPalette"),_(Bee,"getPlotColorFromPalette");function qze(t,e){const r=e.map(s=>s.value),n=e.map(s=>s.label?yk(s.label):""),a=Fee(r),i=n.some(s=>s!=="");Hn.plots.push(X({type:"line",strokeFill:Bee(pk),strokeWidth:2,data:a},i?{pointLabels:n}:{})),pk++}l(qze,"setLineData"),_(qze,"setLineData");function Yze(t,e){const r=e.map(a=>a.value),n=Fee(r);Hn.plots.push({type:"bar",fill:Bee(pk),data:n}),pk++}l(Yze,"setBarData"),_(Yze,"setBarData");function Uze(){if(Hn.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return Hn.title=Ia(),$dr.build(gk,Hn,mk,Dze)}l(Uze,"getDrawableElem"),_(Uze,"getDrawableElem");function jze(){return mk}l(jze,"getChartThemeConfig"),_(jze,"getChartThemeConfig");function Kze(){return gk}l(Kze,"getChartConfig"),_(Kze,"getChartConfig");function Xze(){return Hn}l(Xze,"getXYChartData"),_(Xze,"getXYChartData");var Mdr=_(function(){Ca(),pk=0,gk=Ree(),Hn=Oee(),mk=Pee(),$ee=mk.plotColorPalette.split(",").map(t=>t.trim()),jP=!1,Mee=!1},"clear"),Pdr={getDrawableElem:Uze,clear:Mdr,setAccTitle:Na,getAccTitle:za,setDiagramTitle:Va,getDiagramTitle:Ia,getAccDescription:Wa,setAccDescription:Ha,setOrientation:Bze,setXAxisTitle:zze,setXAxisRangeData:Dee,setXAxisBand:Hze,setYAxisTitle:Wze,setYAxisRangeData:Vze,setLineData:qze,setBarData:Yze,setTmpSVGG:Fze,getChartThemeConfig:jze,getChartConfig:Kze,getXYChartData:Xze},Rdr=_((t,e,r,n)=>{const a=n.db,i=a.getChartThemeConfig(),s=a.getChartConfig(),o=a.getXYChartData().plots[0].data.map(b=>b[1]);function u(b){return b==="top"?"text-before-edge":"middle"}l(u,"getDominantBaseLine"),_(u,"getDominantBaseLine");function h(b){return b==="left"?"start":b==="right"?"end":"middle"}l(h,"getTextAnchor"),_(h,"getTextAnchor");function d(b){return`translate(${b.x}, ${b.y}) rotate(${b.rotation||0})`}l(d,"getTextTransformation"),_(d,"getTextTransformation"),Le.debug(`Rendering xychart chart
|
||
`+t);const f=$o(e),p=f.append("g").attr("class","main"),g=p.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");yi(f,s.height,s.width,!0),f.attr("viewBox",`0 0 ${s.width} ${s.height}`),g.attr("fill",i.backgroundColor),a.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));const m=a.getDrawableElem(),y={};function v(b){let w=p,x="";for(const[T]of b.entries()){let C=p;T>0&&y[x]&&(C=y[x]),x+=b[T],w=y[x],w||(w=y[x]=C.append("g").attr("class",b[T]))}return w}l(v,"getGroup"),_(v,"getGroup");for(const b of m){if(b.data.length===0)continue;const w=v(b.groupTexts);switch(b.type){case"rect":if(w.selectAll("rect").data(b.data).enter().append("rect").attr("x",x=>x.x).attr("y",x=>x.y).attr("width",x=>x.width).attr("height",x=>x.height).attr("fill",x=>x.fill).attr("stroke",x=>x.strokeFill).attr("stroke-width",x=>x.strokeWidth),s.showDataLabel){const x=s.showDataLabelOutsideBar;if(s.chartOrientation==="horizontal"){let T=l(function(L,R){const{data:O,label:M}=L;return R*M.length*C<=O.width-S},"fitsHorizontally2");_(T,"fitsHorizontally");const C=.7,S=10,E=b.data.map((L,R)=>({data:L,label:o[R].toString()})).filter(L=>L.data.width>0&&L.data.height>0),k=E.map(L=>{const{data:R}=L;let O=R.height*.7;for(;!T(L,O)&&O>0;)O-=1;return O}),A=Math.floor(Math.min(...k)),I=_(L=>x?L.data.x+L.data.width+S:L.data.x+L.data.width-S,"determineLabelXPosition");w.selectAll("text").data(E).enter().append("text").attr("x",I).attr("y",L=>L.data.y+L.data.height/2).attr("text-anchor",x?"start":"end").attr("dominant-baseline","middle").attr("fill",i.dataLabelColor).attr("font-size",`${A}px`).text(L=>L.label)}else{let T=l(function(I,L,R){const{data:O,label:M}=I,z=L*M.length*.7,D=O.x+O.width/2,B=D-z/2,W=D+z/2,U=B>=O.x&&W<=O.x+O.width,j=O.y+R+L<=O.y+O.height;return U&&j},"fitsInBar2");_(T,"fitsInBar");const C=10,S=b.data.map((I,L)=>({data:I,label:o[L].toString()})).filter(I=>I.data.width>0&&I.data.height>0),E=S.map(I=>{const{data:L,label:R}=I;let O=L.width/(R.length*.7);for(;!T(I,O,C)&&O>0;)O-=1;return O}),k=Math.floor(Math.min(...E)),A=_(I=>x?I.data.y-C:I.data.y+C,"determineLabelYPosition");w.selectAll("text").data(S).enter().append("text").attr("x",I=>I.data.x+I.data.width/2).attr("y",A).attr("text-anchor","middle").attr("dominant-baseline",x?"auto":"hanging").attr("fill",i.dataLabelColor).attr("font-size",`${k}px`).text(I=>I.label)}}break;case"text":w.selectAll("text").data(b.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",x=>x.fill).attr("font-size",x=>x.fontSize).attr("dominant-baseline",x=>u(x.verticalPos)).attr("text-anchor",x=>h(x.horizontalPos)).attr("transform",x=>d(x)).text(x=>x.text);break;case"path":w.selectAll("path").data(b.data).enter().append("path").attr("d",x=>x.path).attr("fill",x=>x.fill?x.fill:"none").attr("stroke",x=>x.strokeFill).attr("stroke-width",x=>x.strokeWidth);break}}},"draw"),Odr={draw:Rdr},Ddr={parser:Cdr,db:Pdr,renderer:Odr},Fdr=Object.freeze({__proto__:null,diagram:Ddr}),zee=function(){var t=_(function(me,Se,ne,xe){for(ne=ne||{},xe=me.length;xe--;ne[me[xe]]=Se);return ne},"o"),e=[1,3],r=[1,4],n=[1,5],a=[1,6],i=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],o=[2,7],u=[1,26],h=[1,27],d=[1,28],f=[1,29],p=[1,33],g=[1,34],m=[1,35],y=[1,36],v=[1,37],b=[1,38],w=[1,24],x=[1,31],T=[1,32],C=[1,30],S=[1,39],E=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],A=[1,61],I=[89,90],L=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],R=[27,29],O=[1,70],M=[1,71],P=[1,72],z=[1,73],D=[1,74],B=[1,75],W=[1,76],U=[1,83],j=[1,80],V=[1,84],Y=[1,85],H=[1,86],q=[1,87],Z=[1,88],K=[1,89],re=[1,90],Q=[1,91],te=[1,92],ee=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],J=[63,64],ae=[1,101],se=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],ve=[1,110],de=[1,106],Ee=[1,107],Ce=[1,108],De=[1,109],ce=[1,111],Ie=[1,116],ye=[1,117],pe=[1,114],Ae=[1,115],Ve={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:_(l(function(Se,ne,xe,oe,_e,ue,tt){var Re=ue.length-1;switch(_e){case 4:this.$=ue[Re].trim(),oe.setAccTitle(this.$);break;case 5:case 6:this.$=ue[Re].trim(),oe.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:oe.setDirection("TB");break;case 18:oe.setDirection("BT");break;case 19:oe.setDirection("RL");break;case 20:oe.setDirection("LR");break;case 21:oe.addRequirement(ue[Re-3],ue[Re-4]);break;case 22:oe.addRequirement(ue[Re-5],ue[Re-6]),oe.setClass([ue[Re-5]],ue[Re-3]);break;case 23:oe.setNewReqId(ue[Re-2]);break;case 24:oe.setNewReqText(ue[Re-2]);break;case 25:oe.setNewReqRisk(ue[Re-2]);break;case 26:oe.setNewReqVerifyMethod(ue[Re-2]);break;case 29:this.$=oe.RequirementType.REQUIREMENT;break;case 30:this.$=oe.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=oe.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=oe.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=oe.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=oe.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=oe.RiskLevel.LOW_RISK;break;case 36:this.$=oe.RiskLevel.MED_RISK;break;case 37:this.$=oe.RiskLevel.HIGH_RISK;break;case 38:this.$=oe.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=oe.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=oe.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=oe.VerifyType.VERIFY_TEST;break;case 42:oe.addElement(ue[Re-3]);break;case 43:oe.addElement(ue[Re-5]),oe.setClass([ue[Re-5]],ue[Re-3]);break;case 44:oe.setNewElementType(ue[Re-2]);break;case 45:oe.setNewElementDocRef(ue[Re-2]);break;case 48:oe.addRelationship(ue[Re-2],ue[Re],ue[Re-4]);break;case 49:oe.addRelationship(ue[Re-2],ue[Re-4],ue[Re]);break;case 50:this.$=oe.Relationships.CONTAINS;break;case 51:this.$=oe.Relationships.COPIES;break;case 52:this.$=oe.Relationships.DERIVES;break;case 53:this.$=oe.Relationships.SATISFIES;break;case 54:this.$=oe.Relationships.VERIFIES;break;case 55:this.$=oe.Relationships.REFINES;break;case 56:this.$=oe.Relationships.TRACES;break;case 57:this.$=ue[Re-2],oe.defineClass(ue[Re-1],ue[Re]);break;case 58:oe.setClass(ue[Re-1],ue[Re]);break;case 59:oe.setClass([ue[Re-2]],ue[Re]);break;case 60:case 62:this.$=[ue[Re]];break;case 61:case 63:this.$=ue[Re-2].concat([ue[Re]]);break;case 64:this.$=ue[Re-2],oe.setCssStyle(ue[Re-1],ue[Re]);break;case 65:this.$=[ue[Re]];break;case 66:ue[Re-2].push(ue[Re]),this.$=ue[Re-2];break;case 68:this.$=ue[Re-1]+ue[Re];break}},"anonymous"),"anonymous"),table:[{3:1,4:2,6:e,9:r,11:n,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(i,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:a},{1:[2,2]},{4:17,5:s,7:13,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},t(i,[2,4]),t(i,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{4:17,5:s,7:43,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{4:17,5:s,7:44,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{4:17,5:s,7:45,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{4:17,5:s,7:46,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{4:17,5:s,7:47,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{4:17,5:s,7:48,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{4:17,5:s,7:49,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{4:17,5:s,7:50,8:o,9:r,11:n,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:g,43:m,44:y,45:v,46:b,54:w,72:x,74:T,77:C,89:S,90:E},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(k,[2,17]),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),{30:60,33:62,75:A,89:S,90:E},{30:63,33:62,75:A,89:S,90:E},{30:64,33:62,75:A,89:S,90:E},t(I,[2,29]),t(I,[2,30]),t(I,[2,31]),t(I,[2,32]),t(I,[2,33]),t(I,[2,34]),t(L,[2,81]),t(L,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(R,[2,79]),t(R,[2,80]),{27:[1,67],29:[1,68]},t(R,[2,85]),t(R,[2,86]),{62:69,65:O,66:M,67:P,68:z,69:D,70:B,71:W},{62:77,65:O,66:M,67:P,68:z,69:D,70:B,71:W},{30:78,33:62,75:A,89:S,90:E},{73:79,75:U,76:j,78:81,79:82,80:V,81:Y,82:H,83:q,84:Z,85:K,86:re,87:Q,88:te},t(ee,[2,60]),t(ee,[2,62]),{73:93,75:U,76:j,78:81,79:82,80:V,81:Y,82:H,83:q,84:Z,85:K,86:re,87:Q,88:te},{30:94,33:62,75:A,76:j,89:S,90:E},{5:[1,95]},{30:96,33:62,75:A,89:S,90:E},{5:[1,97]},{30:98,33:62,75:A,89:S,90:E},{63:[1,99]},t(J,[2,50]),t(J,[2,51]),t(J,[2,52]),t(J,[2,53]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),{64:[1,100]},t(k,[2,59],{76:j}),t(k,[2,64],{76:ae}),{33:103,75:[1,102],89:S,90:E},t(se,[2,65],{79:104,75:U,80:V,81:Y,82:H,83:q,84:Z,85:K,86:re,87:Q,88:te}),t(fe,[2,67]),t(fe,[2,69]),t(fe,[2,70]),t(fe,[2,71]),t(fe,[2,72]),t(fe,[2,73]),t(fe,[2,74]),t(fe,[2,75]),t(fe,[2,76]),t(fe,[2,77]),t(fe,[2,78]),t(k,[2,57],{76:ae}),t(k,[2,58],{76:j}),{5:ve,28:105,31:de,34:Ee,36:Ce,38:De,40:ce},{27:[1,112],76:j},{5:Ie,40:ye,56:113,57:pe,59:Ae},{27:[1,118],76:j},{33:119,89:S,90:E},{33:120,89:S,90:E},{75:U,78:121,79:82,80:V,81:Y,82:H,83:q,84:Z,85:K,86:re,87:Q,88:te},t(ee,[2,61]),t(ee,[2,63]),t(fe,[2,68]),t(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:ve,28:126,31:de,34:Ee,36:Ce,38:De,40:ce},t(k,[2,28]),{5:[1,127]},t(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:Ie,40:ye,56:130,57:pe,59:Ae},t(k,[2,47]),{5:[1,131]},t(k,[2,48]),t(k,[2,49]),t(se,[2,66],{79:104,75:U,80:V,81:Y,82:H,83:q,84:Z,85:K,86:re,87:Q,88:te}),{33:132,89:S,90:E},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(k,[2,27]),{5:ve,28:145,31:de,34:Ee,36:Ce,38:De,40:ce},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(k,[2,46]),{5:Ie,40:ye,56:152,57:pe,59:Ae},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(k,[2,43]),{5:ve,28:159,31:de,34:Ee,36:Ce,38:De,40:ce},{5:ve,28:160,31:de,34:Ee,36:Ce,38:De,40:ce},{5:ve,28:161,31:de,34:Ee,36:Ce,38:De,40:ce},{5:ve,28:162,31:de,34:Ee,36:Ce,38:De,40:ce},{5:Ie,40:ye,56:163,57:pe,59:Ae},{5:Ie,40:ye,56:164,57:pe,59:Ae},t(k,[2,23]),t(k,[2,24]),t(k,[2,25]),t(k,[2,26]),t(k,[2,44]),t(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:_(l(function(Se,ne){if(ne.recoverable)this.trace(Se);else{var xe=new Error(Se);throw xe.hash=ne,xe}},"parseError"),"parseError"),parse:_(l(function(Se){var ne=this,xe=[0],oe=[],_e=[null],ue=[],tt=this.table,Re="",et=0,Xe=0,ot=2,Ge=1,ht=ue.slice.call(arguments,1),Je=Object.create(this.lexer),St={yy:{}};for(var He in this.yy)Object.prototype.hasOwnProperty.call(this.yy,He)&&(St.yy[He]=this.yy[He]);Je.setInput(Se,St.yy),St.yy.lexer=Je,St.yy.parser=this,typeof Je.yylloc=="undefined"&&(Je.yylloc={});var dt=Je.yylloc;ue.push(dt);var Oe=Je.options&&Je.options.ranges;typeof St.yy.parseError=="function"?this.parseError=St.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function vt(le){xe.length=xe.length-2*le,_e.length=_e.length-le,ue.length=ue.length-le}l(vt,"popStack"),_(vt,"popStack");function qe(){var le;return le=oe.pop()||Je.lex()||Ge,typeof le!="number"&&(le instanceof Array&&(oe=le,le=oe.pop()),le=ne.symbols_[le]||le),le}l(qe,"lex"),_(qe,"lex");for(var Me,lt,it,Ue,we={},gt,ge,ie,be;;){if(lt=xe[xe.length-1],this.defaultActions[lt]?it=this.defaultActions[lt]:((Me===null||typeof Me=="undefined")&&(Me=qe()),it=tt[lt]&&tt[lt][Me]),typeof it=="undefined"||!it.length||!it[0]){var $e="";be=[];for(gt in tt[lt])this.terminals_[gt]&>>ot&&be.push("'"+this.terminals_[gt]+"'");Je.showPosition?$e="Parse error on line "+(et+1)+`:
|
||
`+Je.showPosition()+`
|
||
Expecting `+be.join(", ")+", got '"+(this.terminals_[Me]||Me)+"'":$e="Parse error on line "+(et+1)+": Unexpected "+(Me==Ge?"end of input":"'"+(this.terminals_[Me]||Me)+"'"),this.parseError($e,{text:Je.match,token:this.terminals_[Me]||Me,line:Je.yylineno,loc:dt,expected:be})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+lt+", token: "+Me);switch(it[0]){case 1:xe.push(Me),_e.push(Je.yytext),ue.push(Je.yylloc),xe.push(it[1]),Me=null,Xe=Je.yyleng,Re=Je.yytext,et=Je.yylineno,dt=Je.yylloc;break;case 2:if(ge=this.productions_[it[1]][1],we.$=_e[_e.length-ge],we._$={first_line:ue[ue.length-(ge||1)].first_line,last_line:ue[ue.length-1].last_line,first_column:ue[ue.length-(ge||1)].first_column,last_column:ue[ue.length-1].last_column},Oe&&(we._$.range=[ue[ue.length-(ge||1)].range[0],ue[ue.length-1].range[1]]),Ue=this.performAction.apply(we,[Re,Xe,et,St.yy,it[1],_e,ue].concat(ht)),typeof Ue!="undefined")return Ue;ge&&(xe=xe.slice(0,-1*ge*2),_e=_e.slice(0,-1*ge),ue=ue.slice(0,-1*ge)),xe.push(this.productions_[it[1]][0]),_e.push(we.$),ue.push(we._$),ie=tt[xe[xe.length-2]][xe[xe.length-1]],xe.push(ie);break;case 3:return!0}}return!0},"parse"),"parse")},ze=function(){var me={EOF:1,parseError:_(l(function(ne,xe){if(this.yy.parser)this.yy.parser.parseError(ne,xe);else throw new Error(ne)},"parseError"),"parseError"),setInput:_(function(Se,ne){return this.yy=ne||this.yy||{},this._input=Se,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var Se=this._input[0];this.yytext+=Se,this.yyleng++,this.offset++,this.match+=Se,this.matched+=Se;var ne=Se.match(/(?:\r\n?|\n).*/g);return ne?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Se},"input"),unput:_(function(Se){var ne=Se.length,xe=Se.split(/(?:\r\n?|\n)/g);this._input=Se+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ne),this.offset-=ne;var oe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),xe.length-1&&(this.yylineno-=xe.length-1);var _e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:xe?(xe.length===oe.length?this.yylloc.first_column:0)+oe[oe.length-xe.length].length-xe[0].length:this.yylloc.first_column-ne},this.options.ranges&&(this.yylloc.range=[_e[0],_e[0]+this.yyleng-ne]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(Se){this.unput(this.match.slice(Se))},"less"),pastInput:_(function(){var Se=this.matched.substr(0,this.matched.length-this.match.length);return(Se.length>20?"...":"")+Se.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var Se=this.match;return Se.length<20&&(Se+=this._input.substr(0,20-Se.length)),(Se.substr(0,20)+(Se.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var Se=this.pastInput(),ne=new Array(Se.length+1).join("-");return Se+this.upcomingInput()+`
|
||
`+ne+"^"},"showPosition"),test_match:_(function(Se,ne){var xe,oe,_e;if(this.options.backtrack_lexer&&(_e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_e.yylloc.range=this.yylloc.range.slice(0))),oe=Se[0].match(/(?:\r\n?|\n).*/g),oe&&(this.yylineno+=oe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:oe?oe[oe.length-1].length-oe[oe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Se[0].length},this.yytext+=Se[0],this.match+=Se[0],this.matches=Se,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Se[0].length),this.matched+=Se[0],xe=this.performAction.call(this,this.yy,this,ne,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),xe)return xe;if(this._backtrack){for(var ue in _e)this[ue]=_e[ue];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Se,ne,xe,oe;this._more||(this.yytext="",this.match="");for(var _e=this._currentRules(),ue=0;ue<_e.length;ue++)if(xe=this._input.match(this.rules[_e[ue]]),xe&&(!ne||xe[0].length>ne[0].length)){if(ne=xe,oe=ue,this.options.backtrack_lexer){if(Se=this.test_match(xe,_e[ue]),Se!==!1)return Se;if(this._backtrack){ne=!1;continue}else return!1}else if(!this.options.flex)break}return ne?(Se=this.test_match(ne,_e[oe]),Se!==!1?Se:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var ne=this.next();return ne||this.lex()},"lex"),"lex"),begin:_(l(function(ne){this.conditionStack.push(ne)},"begin"),"begin"),popState:_(l(function(){var ne=this.conditionStack.length-1;return ne>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(ne){return ne=this.conditionStack.length-1-Math.abs(ne||0),ne>=0?this.conditionStack[ne]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(ne){this.begin(ne)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(ne,xe,oe,_e){switch(oe){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return xe.yytext=xe.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return me}();Ve.lexer=ze;function We(){this.yy={}}return l(We,"Parser"),_(We,"Parser"),We.prototype=Ve,Ve.Parser=We,new We}();zee.parser=zee;var Bdr=zee,zdr=(Zb=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=Na,this.getAccTitle=za,this.setAccDescription=Ha,this.getAccDescription=Wa,this.setDiagramTitle=Va,this.getDiagramTitle=Ia,this.getConfig=_(()=>ft().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,r){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:r,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),Le.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,r,n){this.relations.push({type:e,src:r,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Ca()}setCssStyle(e,r){var n;for(const a of e){const i=(n=this.requirements.get(a))!=null?n:this.elements.get(a);if(!r||!i)return;for(const s of r)s.includes(",")?i.cssStyles.push(...s.split(",")):i.cssStyles.push(s)}}setClass(e,r){var n,a;for(const i of e){const s=(n=this.requirements.get(i))!=null?n:this.elements.get(i);if(s)for(const o of r){s.classes.push(o);const u=(a=this.classes.get(o))==null?void 0:a.styles;u&&s.cssStyles.push(...u)}}}defineClass(e,r){for(const n of e){let a=this.classes.get(n);a===void 0&&(a={id:n,styles:[],textStyles:[]},this.classes.set(n,a)),r&&r.forEach(function(i){if(/color/.exec(i)){const s=i.replace("fill","bgFill");a.textStyles.push(s)}a.styles.push(i)}),this.requirements.forEach(i=>{i.classes.includes(n)&&i.cssStyles.push(...r.flatMap(s=>s.split(",")))}),this.elements.forEach(i=>{i.classes.includes(n)&&i.cssStyles.push(...r.flatMap(s=>s.split(",")))})}}getClasses(){return this.classes}getData(){var a,i,s,o,u,h;const e=ft(),r=[],n=[];for(const d of this.requirements.values()){const f=d;f.id=d.name,f.cssStyles=d.cssStyles,f.cssClasses=d.classes.join(" "),f.shape="requirementBox",f.look=e.look,f.colorIndex=r.length,r.push(f)}for(const d of this.elements.values()){const f=d;f.shape="requirementBox",f.look=e.look,f.id=d.name,f.cssStyles=d.cssStyles,f.cssClasses=d.classes.join(" "),f.colorIndex=r.length,r.push(f)}for(const d of this.relations){let f=0;const p=d.type===this.Relationships.CONTAINS,g={id:`${d.src}-${d.dst}-${f}`,start:(s=(a=this.requirements.get(d.src))==null?void 0:a.name)!=null?s:(i=this.elements.get(d.src))==null?void 0:i.name,end:(h=(o=this.requirements.get(d.dst))==null?void 0:o.name)!=null?h:(u=this.elements.get(d.dst))==null?void 0:u.name,label:`<<${d.type}>>`,classes:"relationshipLine",style:["fill:none",p?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:p?"normal":"dashed",arrowTypeStart:p?"requirement_contains":"",arrowTypeEnd:p?"":"requirement_arrow",look:e.look,labelType:"markdown"};n.push(g),f++}return{nodes:r,edges:n,other:{},config:e,direction:this.getDirection()}}},l(Zb,"RequirementDB"),_(Zb,"RequirementDB"),Zb),Hdr=_(t=>{const e=Ar(),{themeVariables:r,look:n}=e,{bkgColorArray:a,borderColorArray:i}=r;if(!(i!=null&&i.length))return"";let s="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)s+=`
|
||
|
||
[data-look="${n}"][data-color-id="color-${o}"].node path {
|
||
stroke: ${i[o]};
|
||
fill: ${a!=null&&a.length?a[o]:""};
|
||
}
|
||
|
||
[data-look="${n}"][data-color-id="color-${o}"].node rect {
|
||
stroke: ${i[o]};
|
||
fill: ${a!=null&&a.length?a[o]:""};
|
||
}
|
||
`;return s},"genColor"),Wdr=_(t=>{const e=Ar(),{look:r,themeVariables:n}=e,{requirementEdgeLabelBackground:a}=n;return`
|
||
${Hdr(t)}
|
||
marker {
|
||
fill: ${t.relationColor};
|
||
stroke: ${t.relationColor};
|
||
}
|
||
|
||
marker.cross {
|
||
stroke: ${t.lineColor};
|
||
}
|
||
|
||
svg {
|
||
font-family: ${t.fontFamily};
|
||
font-size: ${t.fontSize};
|
||
}
|
||
|
||
.reqBox {
|
||
fill: ${t.requirementBackground};
|
||
fill-opacity: 1.0;
|
||
stroke: ${t.requirementBorderColor};
|
||
stroke-width: ${t.requirementBorderSize};
|
||
}
|
||
|
||
.reqTitle, .reqLabel{
|
||
fill: ${t.requirementTextColor};
|
||
}
|
||
.reqLabelBox {
|
||
fill: ${t.relationLabelBackground};
|
||
fill-opacity: 1.0;
|
||
}
|
||
|
||
.req-title-line {
|
||
stroke: ${t.requirementBorderColor};
|
||
stroke-width: ${t.requirementBorderSize};
|
||
}
|
||
.relationshipLine {
|
||
stroke: ${t.relationColor};
|
||
stroke-width: ${r==="neo"?t.strokeWidth:"1px"};
|
||
}
|
||
.relationshipLabel {
|
||
fill: ${t.relationLabelColor};
|
||
}
|
||
.edgeLabel {
|
||
background-color: ${t.edgeLabelBackground};
|
||
}
|
||
.edgeLabel .label rect {
|
||
fill: ${t.edgeLabelBackground};
|
||
}
|
||
.edgeLabel .label text {
|
||
fill: ${t.relationLabelColor};
|
||
}
|
||
.divider {
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: 1;
|
||
}
|
||
.label {
|
||
font-family: ${t.fontFamily};
|
||
color: ${t.nodeTextColor||t.textColor};
|
||
}
|
||
.label text,span {
|
||
fill: ${t.nodeTextColor||t.textColor};
|
||
color: ${t.nodeTextColor||t.textColor};
|
||
}
|
||
.labelBkg {
|
||
background-color: ${a!=null?a:t.edgeLabelBackground};
|
||
}
|
||
|
||
`},"getStyles"),Vdr=Wdr,Zze={};g8(Zze,{draw:l(()=>Gdr,"draw")});var Gdr=_(function(t,e,r,n){return nt(this,null,function*(){var f,p,g,m;Le.info("REF0:"),Le.info("Drawing requirement diagram (unified)",e);const{securityLevel:a,state:i,layout:s,look:o}=ft(),u=n.db.getData(),h=jT(e,a);u.type=n.type,u.layoutAlgorithm=k3(s),u.nodeSpacing=(f=i==null?void 0:i.nodeSpacing)!=null?f:50,u.rankSpacing=(p=i==null?void 0:i.rankSpacing)!=null?p:50,u.markers=o==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],u.diagramId=e,yield Uw(u,h);const d=8;Wr.insertTitle(h,"requirementDiagramTitleText",(g=i==null?void 0:i.titleTopMargin)!=null?g:25,n.db.getDiagramTitle()),c1(h,d,"requirementDiagram",(m=i==null?void 0:i.useMaxWidth)!=null?m:!0)})},"draw"),qdr={parser:Bdr,get db(){return new zdr},renderer:Zze,styles:Vdr},Ydr=Object.freeze({__proto__:null,diagram:qdr}),Hee=function(){var t=_(function(Xe,ot,Ge,ht){for(Ge=Ge||{},ht=Xe.length;ht--;Ge[Xe[ht]]=ot);return Ge},"o"),e=[1,2],r=[1,3],n=[1,4],a=[2,4],i=[1,9],s=[1,11],o=[1,12],u=[1,14],h=[1,15],d=[1,17],f=[1,18],p=[1,19],g=[1,25],m=[1,26],y=[1,27],v=[1,28],b=[1,29],w=[1,30],x=[1,31],T=[1,32],C=[1,33],S=[1,34],E=[1,35],k=[1,36],A=[1,37],I=[1,38],L=[1,39],R=[1,40],O=[1,42],M=[1,43],P=[1,44],z=[1,45],D=[1,46],B=[1,47],W=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],U=[1,74],j=[1,80],V=[1,81],Y=[1,82],H=[1,83],q=[1,84],Z=[1,85],K=[1,86],re=[1,87],Q=[1,88],te=[1,89],ee=[1,90],J=[1,91],ae=[1,92],se=[1,93],fe=[1,94],ve=[1,95],de=[1,96],Ee=[1,97],Ce=[1,98],De=[1,99],ce=[1,100],Ie=[1,101],ye=[1,102],pe=[1,103],Ae=[1,104],Ve=[1,105],ze=[2,78],We=[4,5,17,51,53,54],me=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],ne=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],oe=[5,52],_e=[70,71,72,73],ue=[1,151],tt={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:_(l(function(ot,Ge,ht,Je,St,He,dt){var Oe=He.length-1;switch(St){case 3:return Je.apply(He[Oe]),He[Oe];case 4:case 10:this.$=[];break;case 5:case 11:He[Oe-1].push(He[Oe]),this.$=He[Oe-1];break;case 6:case 7:case 12:case 13:this.$=He[Oe];break;case 8:case 9:case 14:this.$=[];break;case 16:He[Oe].type="createParticipant",this.$=He[Oe];break;case 17:He[Oe-1].unshift({type:"boxStart",boxData:Je.parseBoxData(He[Oe-2])}),He[Oe-1].push({type:"boxEnd",boxText:He[Oe-2]}),this.$=He[Oe-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(He[Oe-2]),sequenceIndexStep:Number(He[Oe-1]),sequenceVisible:!0,signalType:Je.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(He[Oe-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:Je.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:Je.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:Je.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:Je.LINETYPE.ACTIVE_START,actor:He[Oe-1].actor};break;case 24:this.$={type:"activeEnd",signalType:Je.LINETYPE.ACTIVE_END,actor:He[Oe-1].actor};break;case 30:Je.setDiagramTitle(He[Oe].substring(6)),this.$=He[Oe].substring(6);break;case 31:Je.setDiagramTitle(He[Oe].substring(7)),this.$=He[Oe].substring(7);break;case 32:this.$=He[Oe].trim(),Je.setAccTitle(this.$);break;case 33:case 34:this.$=He[Oe].trim(),Je.setAccDescription(this.$);break;case 35:He[Oe-1].unshift({type:"loopStart",loopText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.LOOP_START}),He[Oe-1].push({type:"loopEnd",loopText:He[Oe-2],signalType:Je.LINETYPE.LOOP_END}),this.$=He[Oe-1];break;case 36:He[Oe-1].unshift({type:"rectStart",color:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.RECT_START}),He[Oe-1].push({type:"rectEnd",color:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.RECT_END}),this.$=He[Oe-1];break;case 37:He[Oe-1].unshift({type:"optStart",optText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.OPT_START}),He[Oe-1].push({type:"optEnd",optText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.OPT_END}),this.$=He[Oe-1];break;case 38:He[Oe-1].unshift({type:"altStart",altText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.ALT_START}),He[Oe-1].push({type:"altEnd",signalType:Je.LINETYPE.ALT_END}),this.$=He[Oe-1];break;case 39:He[Oe-1].unshift({type:"parStart",parText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.PAR_START}),He[Oe-1].push({type:"parEnd",signalType:Je.LINETYPE.PAR_END}),this.$=He[Oe-1];break;case 40:He[Oe-1].unshift({type:"parStart",parText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.PAR_OVER_START}),He[Oe-1].push({type:"parEnd",signalType:Je.LINETYPE.PAR_END}),this.$=He[Oe-1];break;case 41:He[Oe-1].unshift({type:"criticalStart",criticalText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.CRITICAL_START}),He[Oe-1].push({type:"criticalEnd",signalType:Je.LINETYPE.CRITICAL_END}),this.$=He[Oe-1];break;case 42:He[Oe-1].unshift({type:"breakStart",breakText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.BREAK_START}),He[Oe-1].push({type:"breakEnd",optText:Je.parseMessage(He[Oe-2]),signalType:Je.LINETYPE.BREAK_END}),this.$=He[Oe-1];break;case 44:this.$=He[Oe-3].concat([{type:"option",optionText:Je.parseMessage(He[Oe-1]),signalType:Je.LINETYPE.CRITICAL_OPTION},He[Oe]]);break;case 46:this.$=He[Oe-3].concat([{type:"and",parText:Je.parseMessage(He[Oe-1]),signalType:Je.LINETYPE.PAR_AND},He[Oe]]);break;case 48:this.$=He[Oe-3].concat([{type:"else",altText:Je.parseMessage(He[Oe-1]),signalType:Je.LINETYPE.ALT_ELSE},He[Oe]]);break;case 49:He[Oe-3].draw="participant",He[Oe-3].type="addParticipant",He[Oe-3].description=Je.parseMessage(He[Oe-1]),this.$=He[Oe-3];break;case 50:He[Oe-1].draw="participant",He[Oe-1].type="addParticipant",this.$=He[Oe-1];break;case 51:He[Oe-3].draw="actor",He[Oe-3].type="addParticipant",He[Oe-3].description=Je.parseMessage(He[Oe-1]),this.$=He[Oe-3];break;case 52:case 57:He[Oe-1].draw="actor",He[Oe-1].type="addParticipant",this.$=He[Oe-1];break;case 53:He[Oe-1].type="destroyParticipant",this.$=He[Oe-1];break;case 54:He[Oe-3].draw="participant",He[Oe-3].type="addParticipant",He[Oe-3].description=Je.parseMessage(He[Oe-1]),this.$=He[Oe-3];break;case 55:He[Oe-1].draw="participant",He[Oe-1].type="addParticipant",this.$=He[Oe-1];break;case 56:He[Oe-3].draw="actor",He[Oe-3].type="addParticipant",He[Oe-3].description=Je.parseMessage(He[Oe-1]),this.$=He[Oe-3];break;case 58:this.$=[He[Oe-1],{type:"addNote",placement:He[Oe-2],actor:He[Oe-1].actor,text:He[Oe]}];break;case 59:He[Oe-2]=[].concat(He[Oe-1],He[Oe-1]).slice(0,2),He[Oe-2][0]=He[Oe-2][0].actor,He[Oe-2][1]=He[Oe-2][1].actor,this.$=[He[Oe-1],{type:"addNote",placement:Je.PLACEMENT.OVER,actor:He[Oe-2].slice(0,2),text:He[Oe]}];break;case 60:this.$=[He[Oe-1],{type:"addLinks",actor:He[Oe-1].actor,text:He[Oe]}];break;case 61:this.$=[He[Oe-1],{type:"addALink",actor:He[Oe-1].actor,text:He[Oe]}];break;case 62:this.$=[He[Oe-1],{type:"addProperties",actor:He[Oe-1].actor,text:He[Oe]}];break;case 63:this.$=[He[Oe-1],{type:"addDetails",actor:He[Oe-1].actor,text:He[Oe]}];break;case 66:this.$=[He[Oe-2],He[Oe]];break;case 67:this.$=He[Oe];break;case 68:this.$=Je.PLACEMENT.LEFTOF;break;case 69:this.$=Je.PLACEMENT.RIGHTOF;break;case 70:this.$=[He[Oe-4],He[Oe-1],{type:"addMessage",from:He[Oe-4].actor,to:He[Oe-1].actor,signalType:He[Oe-3],msg:He[Oe],activate:!0},{type:"activeStart",signalType:Je.LINETYPE.ACTIVE_START,actor:He[Oe-1].actor}];break;case 71:this.$=[He[Oe-4],He[Oe-1],{type:"addMessage",from:He[Oe-4].actor,to:He[Oe-1].actor,signalType:He[Oe-3],msg:He[Oe]},{type:"activeEnd",signalType:Je.LINETYPE.ACTIVE_END,actor:He[Oe-4].actor}];break;case 72:this.$=[He[Oe-4],He[Oe-1],{type:"addMessage",from:He[Oe-4].actor,to:He[Oe-1].actor,signalType:He[Oe-3],msg:He[Oe],activate:!0,centralConnection:Je.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:Je.LINETYPE.CENTRAL_CONNECTION,actor:He[Oe-1].actor}];break;case 73:this.$=[He[Oe-4],He[Oe-1],{type:"addMessage",from:He[Oe-4].actor,to:He[Oe-1].actor,signalType:He[Oe-2],msg:He[Oe],activate:!1,centralConnection:Je.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:Je.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:He[Oe-4].actor}];break;case 74:this.$=[He[Oe-5],He[Oe-1],{type:"addMessage",from:He[Oe-5].actor,to:He[Oe-1].actor,signalType:He[Oe-3],msg:He[Oe],activate:!0,centralConnection:Je.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:Je.LINETYPE.CENTRAL_CONNECTION,actor:He[Oe-1].actor},{type:"centralConnectionReverse",signalType:Je.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:He[Oe-5].actor}];break;case 75:this.$=[He[Oe-3],He[Oe-1],{type:"addMessage",from:He[Oe-3].actor,to:He[Oe-1].actor,signalType:He[Oe-2],msg:He[Oe]}];break;case 76:this.$={type:"addParticipant",actor:He[Oe-1],config:He[Oe]};break;case 77:this.$=He[Oe-1].trim();break;case 78:this.$={type:"addParticipant",actor:He[Oe]};break;case 79:this.$=Je.LINETYPE.SOLID_OPEN;break;case 80:this.$=Je.LINETYPE.DOTTED_OPEN;break;case 81:this.$=Je.LINETYPE.SOLID;break;case 82:this.$=Je.LINETYPE.SOLID_TOP;break;case 83:this.$=Je.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=Je.LINETYPE.STICK_TOP;break;case 85:this.$=Je.LINETYPE.STICK_BOTTOM;break;case 86:this.$=Je.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=Je.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=Je.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=Je.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=Je.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=Je.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=Je.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=Je.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=Je.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=Je.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=Je.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=Je.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=Je.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=Je.LINETYPE.DOTTED;break;case 100:this.$=Je.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=Je.LINETYPE.SOLID_CROSS;break;case 102:this.$=Je.LINETYPE.DOTTED_CROSS;break;case 103:this.$=Je.LINETYPE.SOLID_POINT;break;case 104:this.$=Je.LINETYPE.DOTTED_POINT;break;case 105:this.$=Je.parseMessage(He[Oe].trim().substring(1));break}},"anonymous"),"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:s,8:8,9:10,10:o,13:13,14:u,15:h,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},t(W,[2,5]),{9:48,13:13,14:u,15:h,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},t(W,[2,7]),t(W,[2,8]),t(W,[2,9]),t(W,[2,15]),{13:49,51:I,53:L,54:R},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:B},{23:56,73:B},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(W,[2,30]),t(W,[2,31]),{33:[1,62]},{35:[1,63]},t(W,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:U},{23:75,55:76,73:U},{23:77,73:B},{69:78,72:[1,79],78:j,79:V,80:Y,81:H,82:q,83:Z,84:K,85:re,86:Q,87:te,88:ee,89:J,90:ae,91:se,92:fe,93:ve,94:de,95:Ee,96:Ce,97:De,98:ce,99:Ie,100:ye,101:pe,102:Ae,103:Ve},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:B},{23:111,73:B},{23:112,73:B},{23:113,73:B},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],ze),t(W,[2,6]),t(W,[2,16]),t(We,[2,10],{11:114}),t(W,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(W,[2,22]),{5:[1,118]},{5:[1,119]},t(W,[2,25]),t(W,[2,26]),t(W,[2,27]),t(W,[2,28]),t(W,[2,29]),t(W,[2,32]),t(W,[2,33]),t(me,a,{7:120}),t(me,a,{7:121}),t(me,a,{7:122}),t(Se,a,{41:123,7:124}),t(ne,a,{43:125,7:126}),t(ne,a,{7:126,43:127}),t(xe,a,{46:128,7:129}),t(me,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(oe,ze,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:B},{69:146,78:j,79:V,80:Y,81:H,82:q,83:Z,84:K,85:re,86:Q,87:te,88:ee,89:J,90:ae,91:se,92:fe,93:ve,94:de,95:Ee,96:Ce,97:De,98:ce,99:Ie,100:ye,101:pe,102:Ae,103:Ve},t(_e,[2,79]),t(_e,[2,80]),t(_e,[2,81]),t(_e,[2,82]),t(_e,[2,83]),t(_e,[2,84]),t(_e,[2,85]),t(_e,[2,86]),t(_e,[2,87]),t(_e,[2,88]),t(_e,[2,89]),t(_e,[2,90]),t(_e,[2,91]),t(_e,[2,92]),t(_e,[2,93]),t(_e,[2,94]),t(_e,[2,95]),t(_e,[2,96]),t(_e,[2,97]),t(_e,[2,98]),t(_e,[2,99]),t(_e,[2,100]),t(_e,[2,101]),t(_e,[2,102]),t(_e,[2,103]),t(_e,[2,104]),{23:147,73:B},{23:149,60:148,73:B},{73:[2,68]},{73:[2,69]},{58:150,104:ue},{58:152,104:ue},{58:153,104:ue},{58:154,104:ue},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:I,53:L,54:R},{5:[1,160]},t(W,[2,20]),t(W,[2,21]),t(W,[2,23]),t(W,[2,24]),{4:i,5:s,8:8,9:10,10:o,13:13,14:u,15:h,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},{4:i,5:s,8:8,9:10,10:o,13:13,14:u,15:h,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},{4:i,5:s,8:8,9:10,10:o,13:13,14:u,15:h,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},{17:[1,164]},{4:i,5:s,8:8,9:10,10:o,13:13,14:u,15:h,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,50:[1,165],51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},{17:[1,166]},{4:i,5:s,8:8,9:10,10:o,13:13,14:u,15:h,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,49:[1,167],51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},{17:[1,168]},{17:[1,169]},{4:i,5:s,8:8,9:10,10:o,13:13,14:u,15:h,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,48:[1,170],51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},{4:i,5:s,8:8,9:10,10:o,13:13,14:u,15:h,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:v,36:b,37:w,38:x,39:T,40:C,42:S,44:E,45:k,47:A,51:I,53:L,54:R,56:O,61:M,62:P,63:z,64:D,73:B},{16:[1,172]},t(W,[2,50]),{16:[1,173]},t(W,[2,55]),t(oe,[2,76]),{76:[1,174]},{16:[1,175]},t(W,[2,52]),{16:[1,176]},t(W,[2,57]),t(W,[2,53]),{23:177,73:B},{23:178,73:B},{23:179,73:B},{58:180,104:ue},{23:181,72:[1,182],73:B},{58:183,104:ue},{58:184,104:ue},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(W,[2,17]),t(We,[2,11]),{13:186,51:I,53:L,54:R},t(We,[2,13]),t(We,[2,14]),t(W,[2,19]),t(W,[2,35]),t(W,[2,36]),t(W,[2,37]),t(W,[2,38]),{16:[1,187]},t(W,[2,39]),{16:[1,188]},t(W,[2,40]),t(W,[2,41]),{16:[1,189]},t(W,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ue},{58:196,104:ue},{58:197,104:ue},{5:[2,75]},{58:198,104:ue},{23:199,73:B},{5:[2,58]},{5:[2,59]},{23:200,73:B},t(We,[2,12]),t(Se,a,{7:124,41:201}),t(ne,a,{7:126,43:202}),t(xe,a,{7:129,46:203}),t(W,[2,49]),t(W,[2,54]),t(oe,[2,77]),t(W,[2,51]),t(W,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ue},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:_(l(function(ot,Ge){if(Ge.recoverable)this.trace(ot);else{var ht=new Error(ot);throw ht.hash=Ge,ht}},"parseError"),"parseError"),parse:_(l(function(ot){var Ge=this,ht=[0],Je=[],St=[null],He=[],dt=this.table,Oe="",vt=0,qe=0,Me=2,lt=1,it=He.slice.call(arguments,1),Ue=Object.create(this.lexer),we={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(we.yy[gt]=this.yy[gt]);Ue.setInput(ot,we.yy),we.yy.lexer=Ue,we.yy.parser=this,typeof Ue.yylloc=="undefined"&&(Ue.yylloc={});var ge=Ue.yylloc;He.push(ge);var ie=Ue.options&&Ue.options.ranges;typeof we.yy.parseError=="function"?this.parseError=we.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(Pt){ht.length=ht.length-2*Pt,St.length=St.length-Pt,He.length=He.length-Pt}l(be,"popStack"),_(be,"popStack");function $e(){var Pt;return Pt=Je.pop()||Ue.lex()||lt,typeof Pt!="number"&&(Pt instanceof Array&&(Je=Pt,Pt=Je.pop()),Pt=Ge.symbols_[Pt]||Pt),Pt}l($e,"lex"),_($e,"lex");for(var le,ke,je,ut,Qe={},Ze,st,Ct,Mt;;){if(ke=ht[ht.length-1],this.defaultActions[ke]?je=this.defaultActions[ke]:((le===null||typeof le=="undefined")&&(le=$e()),je=dt[ke]&&dt[ke][le]),typeof je=="undefined"||!je.length||!je[0]){var Bt="";Mt=[];for(Ze in dt[ke])this.terminals_[Ze]&&Ze>Me&&Mt.push("'"+this.terminals_[Ze]+"'");Ue.showPosition?Bt="Parse error on line "+(vt+1)+`:
|
||
`+Ue.showPosition()+`
|
||
Expecting `+Mt.join(", ")+", got '"+(this.terminals_[le]||le)+"'":Bt="Parse error on line "+(vt+1)+": Unexpected "+(le==lt?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(Bt,{text:Ue.match,token:this.terminals_[le]||le,line:Ue.yylineno,loc:ge,expected:Mt})}if(je[0]instanceof Array&&je.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ke+", token: "+le);switch(je[0]){case 1:ht.push(le),St.push(Ue.yytext),He.push(Ue.yylloc),ht.push(je[1]),le=null,qe=Ue.yyleng,Oe=Ue.yytext,vt=Ue.yylineno,ge=Ue.yylloc;break;case 2:if(st=this.productions_[je[1]][1],Qe.$=St[St.length-st],Qe._$={first_line:He[He.length-(st||1)].first_line,last_line:He[He.length-1].last_line,first_column:He[He.length-(st||1)].first_column,last_column:He[He.length-1].last_column},ie&&(Qe._$.range=[He[He.length-(st||1)].range[0],He[He.length-1].range[1]]),ut=this.performAction.apply(Qe,[Oe,qe,vt,we.yy,je[1],St,He].concat(it)),typeof ut!="undefined")return ut;st&&(ht=ht.slice(0,-1*st*2),St=St.slice(0,-1*st),He=He.slice(0,-1*st)),ht.push(this.productions_[je[1]][0]),St.push(Qe.$),He.push(Qe._$),Ct=dt[ht[ht.length-2]][ht[ht.length-1]],ht.push(Ct);break;case 3:return!0}}return!0},"parse"),"parse")},Re=function(){var Xe={EOF:1,parseError:_(l(function(Ge,ht){if(this.yy.parser)this.yy.parser.parseError(Ge,ht);else throw new Error(Ge)},"parseError"),"parseError"),setInput:_(function(ot,Ge){return this.yy=Ge||this.yy||{},this._input=ot,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var ot=this._input[0];this.yytext+=ot,this.yyleng++,this.offset++,this.match+=ot,this.matched+=ot;var Ge=ot.match(/(?:\r\n?|\n).*/g);return Ge?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ot},"input"),unput:_(function(ot){var Ge=ot.length,ht=ot.split(/(?:\r\n?|\n)/g);this._input=ot+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ge),this.offset-=Ge;var Je=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ht.length-1&&(this.yylineno-=ht.length-1);var St=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ht?(ht.length===Je.length?this.yylloc.first_column:0)+Je[Je.length-ht.length].length-ht[0].length:this.yylloc.first_column-Ge},this.options.ranges&&(this.yylloc.range=[St[0],St[0]+this.yyleng-Ge]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(ot){this.unput(this.match.slice(ot))},"less"),pastInput:_(function(){var ot=this.matched.substr(0,this.matched.length-this.match.length);return(ot.length>20?"...":"")+ot.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var ot=this.match;return ot.length<20&&(ot+=this._input.substr(0,20-ot.length)),(ot.substr(0,20)+(ot.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var ot=this.pastInput(),Ge=new Array(ot.length+1).join("-");return ot+this.upcomingInput()+`
|
||
`+Ge+"^"},"showPosition"),test_match:_(function(ot,Ge){var ht,Je,St;if(this.options.backtrack_lexer&&(St={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(St.yylloc.range=this.yylloc.range.slice(0))),Je=ot[0].match(/(?:\r\n?|\n).*/g),Je&&(this.yylineno+=Je.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Je?Je[Je.length-1].length-Je[Je.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ot[0].length},this.yytext+=ot[0],this.match+=ot[0],this.matches=ot,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ot[0].length),this.matched+=ot[0],ht=this.performAction.call(this,this.yy,this,Ge,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ht)return ht;if(this._backtrack){for(var He in St)this[He]=St[He];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ot,Ge,ht,Je;this._more||(this.yytext="",this.match="");for(var St=this._currentRules(),He=0;He<St.length;He++)if(ht=this._input.match(this.rules[St[He]]),ht&&(!Ge||ht[0].length>Ge[0].length)){if(Ge=ht,Je=He,this.options.backtrack_lexer){if(ot=this.test_match(ht,St[He]),ot!==!1)return ot;if(this._backtrack){Ge=!1;continue}else return!1}else if(!this.options.flex)break}return Ge?(ot=this.test_match(Ge,St[Je]),ot!==!1?ot:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var Ge=this.next();return Ge||this.lex()},"lex"),"lex"),begin:_(l(function(Ge){this.conditionStack.push(Ge)},"begin"),"begin"),popState:_(l(function(){var Ge=this.conditionStack.length-1;return Ge>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(Ge){return Ge=this.conditionStack.length-1-Math.abs(Ge||0),Ge>=0?this.conditionStack[Ge]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(Ge){this.begin(Ge)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(Ge,ht,Je,St){switch(Je){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return ht.yytext=ht.yytext.trim(),73;case 12:return ht.yytext=ht.yytext.trim(),this.begin("ALIAS"),73;case 13:return ht.yytext=ht.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return ht.yytext=ht.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return ht.yytext=ht.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},"anonymous"),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}};return Xe}();tt.lexer=Re;function et(){this.yy={}}return l(et,"Parser"),_(et,"Parser"),et.prototype=tt,tt.Parser=et,new et}();Hee.parser=Hee;var Udr=Hee,jdr={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},Kdr={FILLED:0,OPEN:1},Xdr={LEFTOF:0,RIGHTOF:1,OVER:2},KP={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},Zdr=(Qb=class{constructor(){this.state=new Bj(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=Na,this.setAccDescription=Ha,this.setDiagramTitle=Va,this.getAccTitle=za,this.getAccDescription=Wa,this.getDiagramTitle=Ia,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(ft().wrap),this.LINETYPE=jdr,this.ARROWTYPE=Kdr,this.PLACEMENT=Xdr}addBox(e){var r;this.state.records.boxes.push({name:e.text,wrap:(r=e.wrap)!=null?r:this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,r,n,a,i){var h,d;let s=this.state.records.currentBox,o;if(i!==void 0){let f;i.includes(`
|
||
`)?f=i+`
|
||
`:f=`{
|
||
`+i+`
|
||
}`,o=_7(f,{schema:S7})}a=(h=o==null?void 0:o.type)!=null?h:a,o!=null&&o.alias&&(!n||n.text===r)&&(n={text:o.alias,wrap:n==null?void 0:n.wrap,type:a});const u=this.state.records.actors.get(e);if(u){if(this.state.records.currentBox&&u.box&&this.state.records.currentBox!==u.box)throw new Error(`A same participant should only be defined in one Box: ${u.name} can't be in '${u.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(s=u.box?u.box:this.state.records.currentBox,u.box=s,u&&r===u.name&&n==null)return}if((n==null?void 0:n.text)==null&&(n={text:r,type:a}),(a==null||n.text==null)&&(n={text:r,type:a}),this.state.records.actors.set(e,{box:s,name:r,description:n.text,wrap:(d=n.wrap)!=null?d:this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:a!=null?a:"participant"}),this.state.records.prevActor){const f=this.state.records.actors.get(this.state.records.prevActor);f&&(f.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let r,n=0;if(!e)return 0;for(r=0;r<this.state.records.messages.length;r++)this.state.records.messages[r].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[r].from===e&&n++,this.state.records.messages[r].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[r].from===e&&n--;return n}addMessage(e,r,n,a){var i;this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:r,message:n.text,wrap:(i=n.wrap)!=null?i:this.autoWrap(),answer:a})}addSignal(e,r,n,a,i=!1,s){var o,u;if(a===this.LINETYPE.ACTIVE_END&&this.activationCount(e!=null?e:"")<1){const d=new Error("Trying to inactivate an inactive participant ("+e+")");throw d.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},d}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:r,message:(o=n==null?void 0:n.text)!=null?o:"",wrap:(u=n==null?void 0:n.wrap)!=null?u:this.autoWrap(),type:a,activate:i,centralConnection:s!=null?s:0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();const r=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(r===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:r}}autoWrap(){var e,r;return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:(r=(e=ft().sequence)==null?void 0:e.wrap)!=null?r:!1}clear(){this.state.reset(),Ca()}parseMessage(e){const r=e.trim(),{wrap:n,cleanedText:a}=this.extractWrap(r),i={text:a,wrap:n};return Le.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){const r=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e);let n=r!=null&&r[1]?r[1].trim():"transparent",a=r!=null&&r[2]?r[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",n)||(n="transparent",a=e.trim());else{const o=new Option().style;o.color=n,o.color!==n&&(n="transparent",a=e.trim())}const{wrap:i,cleanedText:s}=this.extractWrap(a);return{text:s?mn(s,ft()):void 0,color:n,wrap:i}}addNote(e,r,n){var s,o;const a={actor:e,placement:r,message:n.text,wrap:(s=n.wrap)!=null?s:this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(a),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:(o=n.wrap)!=null?o:this.autoWrap(),type:this.LINETYPE.NOTE,placement:r})}addLinks(e,r){const n=this.getActor(e);try{let a=mn(r.text,ft());a=a.replace(/=/g,"="),a=a.replace(/&/g,"&");const i=JSON.parse(a);this.insertLinks(n,i)}catch(a){Le.error("error while parsing actor link text",a)}}addALink(e,r){const n=this.getActor(e);try{const a={};let i=mn(r.text,ft());const s=i.indexOf("@");i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");const o=i.slice(0,s-1).trim(),u=i.slice(s+1).trim();a[o]=u,this.insertLinks(n,a)}catch(a){Le.error("error while parsing actor link text",a)}}insertLinks(e,r){if(e.links==null)e.links=r;else for(const n in r)e.links[n]=r[n]}addProperties(e,r){const n=this.getActor(e);try{const a=mn(r.text,ft()),i=JSON.parse(a);this.insertProperties(n,i)}catch(a){Le.error("error while parsing actor properties text",a)}}insertProperties(e,r){if(e.properties==null)e.properties=r;else for(const n in r)e.properties[n]=r[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,r){const n=this.getActor(e),a=document.getElementById(r.text);try{const i=a.innerHTML,s=JSON.parse(i);s.properties&&this.insertProperties(n,s.properties),s.links&&this.insertLinks(n,s.links)}catch(i){Le.error("error while parsing actor details text",i)}}getActorProperty(e,r){if((e==null?void 0:e.properties)!==void 0)return e.properties[r]}apply(e){if(Array.isArray(e))e.forEach(r=>{this.apply(r)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnection":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnectionReverse":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":Na(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return ft().sequence}},l(Qb,"SequenceDB"),_(Qb,"SequenceDB"),Qb),Qdr=_(t=>{var n,a;const e=(n=t.dropShadow)!=null?n:"none",{look:r}=ft();return`.actor {
|
||
stroke: ${t.actorBorder};
|
||
fill: ${t.actorBkg};
|
||
stroke-width: ${(a=t.strokeWidth)!=null?a:1};
|
||
}
|
||
|
||
rect.actor.outer-path[data-look="neo"] {
|
||
filter: ${e};
|
||
}
|
||
|
||
rect.note[data-look="neo"] {
|
||
stroke:${t.noteBorderColor};
|
||
fill:${t.noteBkgColor};
|
||
filter: ${e};
|
||
}
|
||
|
||
text.actor > tspan {
|
||
fill: ${t.actorTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.actor-line {
|
||
stroke: ${t.actorLineColor};
|
||
}
|
||
|
||
.innerArc {
|
||
stroke-width: 1.5;
|
||
stroke-dasharray: none;
|
||
}
|
||
|
||
.messageLine0 {
|
||
stroke-width: 1.5;
|
||
stroke-dasharray: none;
|
||
stroke: ${t.signalColor};
|
||
}
|
||
|
||
.messageLine1 {
|
||
stroke-width: 1.5;
|
||
stroke-dasharray: 2, 2;
|
||
stroke: ${t.signalColor};
|
||
}
|
||
|
||
[id$="-arrowhead"] path {
|
||
fill: ${t.signalColor};
|
||
stroke: ${t.signalColor};
|
||
}
|
||
|
||
.sequenceNumber {
|
||
fill: ${t.sequenceNumberColor};
|
||
}
|
||
|
||
[id$="-sequencenumber"] {
|
||
fill: ${t.signalColor};
|
||
}
|
||
|
||
[id$="-crosshead"] path {
|
||
fill: ${t.signalColor};
|
||
stroke: ${t.signalColor};
|
||
}
|
||
|
||
.messageText {
|
||
fill: ${t.signalTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.labelBox {
|
||
stroke: ${t.labelBoxBorderColor};
|
||
fill: ${t.labelBoxBkgColor};
|
||
filter: ${r==="neo"?e:"none"};
|
||
}
|
||
|
||
.labelText, .labelText > tspan {
|
||
fill: ${t.labelTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.loopText, .loopText > tspan {
|
||
fill: ${t.loopTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.sectionTitle, .sectionTitle > tspan {
|
||
fill: ${t.loopTextColor};
|
||
stroke: none;
|
||
}
|
||
|
||
.loopLine {
|
||
stroke-width: 2px;
|
||
stroke-dasharray: 2, 2;
|
||
stroke: ${t.labelBoxBorderColor};
|
||
fill: ${t.labelBoxBorderColor};
|
||
}
|
||
|
||
.note {
|
||
//stroke: #decc93;
|
||
stroke: ${t.noteBorderColor};
|
||
fill: ${t.noteBkgColor};
|
||
}
|
||
|
||
.noteText, .noteText > tspan {
|
||
fill: ${t.noteTextColor};
|
||
stroke: none;
|
||
${t.noteFontWeight?`font-weight: ${t.noteFontWeight};`:""}
|
||
}
|
||
|
||
.activation0 {
|
||
fill: ${t.activationBkgColor};
|
||
stroke: ${t.activationBorderColor};
|
||
}
|
||
|
||
.activation1 {
|
||
fill: ${t.activationBkgColor};
|
||
stroke: ${t.activationBorderColor};
|
||
}
|
||
|
||
.activation2 {
|
||
fill: ${t.activationBkgColor};
|
||
stroke: ${t.activationBorderColor};
|
||
}
|
||
|
||
.actorPopupMenu {
|
||
position: absolute;
|
||
}
|
||
|
||
.actorPopupMenuPanel {
|
||
position: absolute;
|
||
fill: ${t.actorBkg};
|
||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
|
||
filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
|
||
}
|
||
.actor-man circle, line {
|
||
fill: ${t.actorBkg};
|
||
stroke-width: 2px;
|
||
}
|
||
|
||
g rect.rect {
|
||
filter: ${e};
|
||
stroke: ${t.nodeBorder};
|
||
}
|
||
`},"getStyles"),Jdr=Qdr,yy=18*2,rg="actor-top",ng="actor-bottom",XP="actor-box",vy="actor-man",a0=new Set(["redux-color","redux-dark-color"]),vk=_(function(t,e){const r=NL(t,e);return Ar().look==="neo"&&r.attr("data-look","neo"),r},"drawRect"),efr=_(function(t,e,r,n,a){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const i=e.links,s=e.actorCnt,o=e.rectData;var u="none";a&&(u="block !important");const h=t.append("g");h.attr("id","actor"+s+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var d="";o.class!==void 0&&(d=" "+o.class);let f=o.width>r?o.width:r;const p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",o.x),p.attr("y",o.height),p.attr("fill",o.fill),p.attr("stroke",o.stroke),p.attr("width",f),p.attr("height",o.height),p.attr("rx",o.rx),p.attr("ry",o.ry),i!=null){var g=20;for(let v in i){var m=h.append("a"),y=Cm(i[v]);m.attr("xlink:href",y),m.attr("target","_blank"),Efr(n)(v,m,o.x+10,o.height+g,f,20,{class:"actor"},n),g+=30}}return p.attr("height",g),{height:o.height+g,width:f}},"drawPopup"),ZP=_(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),QP=_(function(t,e,r=null){return nt(this,null,function*(){let n=t.append("foreignObject");const a=yield C8(e.text,Ar()),s=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();if(n.attr("height",Math.round(s.height)).attr("width",Math.round(s.width)),e.class==="noteText"){const o=t.node().firstChild;o.setAttribute("height",s.height+2*e.textMargin);const u=o.getBBox();n.attr("x",Math.round(u.x+u.width/2-s.width/2)).attr("y",Math.round(u.y+u.height/2-s.height/2))}else if(r){let{startx:o,stopx:u,starty:h}=r;if(o>u){const d=o;o=u,u=d}n.attr("x",Math.round(o+Math.abs(o-u)/2-s.width/2)),e.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-s.height))}return[n]})},"drawKatex"),rC=_(function(t,e){let r=0,n=0;const a=e.text.split(or.lineBreakRegex),[i,s]=cf(e.fontSize);let o=[],u=0,h=_(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":h=_(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":h=_(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":h=_(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[d,f]of a.entries()){e.textMargin!==void 0&&e.textMargin===0&&i!==void 0&&(u=d*i);const p=t.append("text");p.attr("x",e.x),p.attr("y",h()),e.anchor!==void 0&&p.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&p.style("font-family",e.fontFamily),s!==void 0&&p.style("font-size",s),e.fontWeight!==void 0&&p.style("font-weight",e.fontWeight),e.fill!==void 0&&p.attr("fill",e.fill),e.class!==void 0&&p.attr("class",e.class),e.dy!==void 0?p.attr("dy",e.dy):u!==0&&p.attr("dy",u);const g=f||E2e;if(e.tspan){const m=p.append("tspan");m.attr("x",e.x),e.fill!==void 0&&m.attr("fill",e.fill),m.text(g)}else p.text(g);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),o.push(p)}return o},"drawText"),Qze=_(function(t,e){function r(a,i,s,o,u){return a+","+i+" "+(a+s)+","+i+" "+(a+s)+","+(i+o-u)+" "+(a+s-u*1.2)+","+(i+o)+" "+a+","+(i+o)}l(r,"genPoints"),_(r,"genPoints");const n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,rC(t,e),n},"drawLabel"),Sn=-1,Jze=_((t,e,r,n)=>{t.select&&r.forEach(a=>{const i=e.get(a),s=t.select("#actor"+i.actorCnt);!n.mirrorActors&&i.stopy?s.attr("y2",i.stopy+i.height/2):n.mirrorActors&&s.attr("y2",i.stopy)})},"fixLifeLineHeights"),tfr=_(function(t,e,r,n,a){var T,C,S;const i=n?e.stopy:e.starty,s=e.x+e.width/2,o=i+e.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,g=t.append("g").lower();var m=g;n||(Sn++,Object.keys(e.links||{}).length&&!r.forceMenus&&m.attr("onclick",ZP(`actor${Sn}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+Sn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),m=g.append("g"),e.actorCnt=Sn,e.links!=null&&m.attr("id","root-"+Sn),u==="neo"&&m.attr("data-look","neo"));const y=_c();var v="actor";(T=e.properties)!=null&&T.class?v=e.properties.class:y.fill="#eaeaea",n?v+=` ${ng}`:v+=` ${rg}`,y.x=e.x,y.y=i,y.width=e.width,y.height=e.height,y.class=v,y.rx=3,y.ry=3,y.name=e.name,u==="neo"&&(y.rx=6,y.ry=6);const b=vk(m,y),w=(C=a.get(e.name))!=null?C:0;if(a0.has(h)&&(b.style("stroke",p[w%p.length]),b.style("fill",f[w%p.length])),u==="neo"&&b.attr("filter","url(#drop-shadow)"),e.rectData=y,(S=e.properties)!=null&&S.icon){const E=e.properties.icon.trim();E.charAt(0)==="@"?Sj(m,y.x+y.width-20,y.y+10,E.substr(1)):Cj(m,y.x+y.width-20,y.y+10,E)}n||(m.attr("data-et","participant"),m.attr("data-type","participant"),m.attr("data-id",e.name)),i0(r,Mi(e.description))(e.description,m,y.x,y.y,y.width,y.height,{class:`actor ${XP}`},r);let x=e.height;if(b.node){const E=b.node().getBBox();e.height=E.height,x=E.height}return x},"drawActorTypeParticipant"),rfr=_(function(t,e,r,n,a){var E,k,A;const i=n?e.stopy:e.starty,s=e.x+e.width/2,o=i+e.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,g=t.append("g").lower();var m=g;n||(Sn++,Object.keys(e.links||{}).length&&!r.forceMenus&&m.attr("onclick",ZP(`actor${Sn}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+Sn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),m=g.append("g"),e.actorCnt=Sn,e.links!=null&&m.attr("id","root-"+Sn),u==="neo"&&m.attr("data-look","neo"));const y=_c();var v="actor";(E=e.properties)!=null&&E.class?v=e.properties.class:y.fill="#eaeaea",n?v+=` ${ng}`:v+=` ${rg}`,y.x=e.x,y.y=i,y.width=e.width,y.height=e.height,y.class=v,y.name=e.name;const b=6,w=Ne(X({},y),{x:y.x+-b,y:y.y+ +b,class:"actor"}),x=vk(m,y),T=vk(m,w);e.rectData=y,u==="neo"&&m.attr("filter","url(#drop-shadow)");const C=(k=a.get(e.name))!=null?k:0;if(a0.has(h)&&(x.style("stroke",p[C%p.length]),x.style("fill",f[C%p.length]),T.style("stroke",p[C%p.length]),T.style("fill",f[C%p.length])),(A=e.properties)!=null&&A.icon){const I=e.properties.icon.trim();I.charAt(0)==="@"?Sj(m,y.x+y.width-20,y.y+10,I.substr(1)):Cj(m,y.x+y.width-20,y.y+10,I)}i0(r,Mi(e.description))(e.description,m,y.x-b,y.y+b,y.width,y.height,{class:`actor ${XP}`},r);let S=e.height;if(x.node){const I=x.node().getBBox();e.height=I.height,S=I.height}return n||(m.attr("data-et","participant"),m.attr("data-type","collections"),m.attr("data-id",e.name)),S},"drawActorTypeCollections"),nfr=_(function(t,e,r,n,a){var A,I,L;const i=n?e.stopy:e.starty,s=e.x+e.width/2,o=i+e.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,g=t.append("g").lower();let m=g;n||(Sn++,Object.keys(e.links||{}).length&&!r.forceMenus&&m.attr("onclick",ZP(`actor${Sn}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+Sn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),m=g.append("g"),e.actorCnt=Sn,e.links!=null&&m.attr("id","root-"+Sn),u==="neo"&&m.attr("data-look","neo"));const y=_c();let v="actor";(A=e.properties)!=null&&A.class?v=e.properties.class:y.fill="#eaeaea",n?v+=` ${ng}`:v+=` ${rg}`,m.attr("class",v),y.x=e.x,y.y=i,y.width=e.width,y.height=e.height,y.name=e.name;const b=y.height/2,w=b/(2.5+y.height/50),x=m.append("g"),T=m.append("g"),C=`M ${y.x},${y.y+b}
|
||
a ${w},${b} 0 0 0 0,${y.height}
|
||
h ${y.width-2*w}
|
||
a ${w},${b} 0 0 0 0,-${y.height}
|
||
Z
|
||
`;x.append("path").attr("d",C),T.append("path").attr("d",`M ${y.x},${y.y+b}
|
||
a ${w},${b} 0 0 0 0,${y.height}`),x.attr("transform",`translate(${w}, ${-(y.height/2)})`),T.attr("transform",`translate(${y.width-w}, ${-y.height/2})`),e.rectData=y,u==="neo"&&x.attr("filter","url(#drop-shadow)");const S=(I=a.get(e.name))!=null?I:0;if(a0.has(h)&&(x.style("stroke",p[S%p.length]),x.style("fill",f[S%p.length]),T.style("stroke",p[S%p.length]),T.style("fill",f[S%p.length])),(L=e.properties)!=null&&L.icon){const R=e.properties.icon.trim(),O=y.x+y.width-20,M=y.y+10;R.charAt(0)==="@"?Sj(m,O,M,R.substr(1)):Cj(m,O,M,R)}i0(r,Mi(e.description))(e.description,m,y.x,y.y,y.width,y.height,{class:`actor ${XP}`},r);let E=e.height;const k=x.select("path:last-child");if(k.node()){const R=k.node().getBBox();e.height=R.height,E=R.height}return n||(m.attr("data-et","participant"),m.attr("data-type","queue"),m.attr("data-id",e.name)),E},"drawActorTypeQueue"),afr=_(function(t,e,r,n,a,i){var A,I,L;const s=n?e.stopy:e.starty,o=e.x+e.width/2,u=s+75,{look:h,theme:d,themeVariables:f}=r,{bkgColorArray:p,borderColorArray:g,actorBorder:m,actorBkg:y}=f,v=t.append("g").lower();n||(Sn++,v.append("line").attr("id","actor"+Sn).attr("x1",o).attr("y1",u).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Sn);const b=t.append("g");let w=vy;n?w+=` ${ng}`:w+=` ${rg}`,b.attr("class",w),b.attr("name",e.name);const x=_c();x.x=e.x,x.y=s,x.fill="#eaeaea",x.width=e.width,x.height=e.height,x.class="actor";const T=e.x+e.width/2,C=s+32,S=22;b.append("defs").append("marker").attr("id",a+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),b.append("circle").attr("cx",T).attr("cy",C).attr("r",S).attr("filter",`${h==="neo"?"url(#drop-shadow)":""}`),b.append("line").attr("marker-end","url(#"+a+"-filled-head-control)").attr("transform",`translate(${T}, ${C-S})`);const E=(A=i.get(e.name))!=null?A:0;a0.has(d)?(b.style("stroke",g[E%g.length]),b.style("fill",p[E%g.length])):(b.style("stroke",m),b.style("fill",y));const k=b.node().getBBox();return e.height=k.height+2*((L=(I=r==null?void 0:r.sequence)==null?void 0:I.labelBoxHeight)!=null?L:0),i0(r,Mi(e.description))(e.description,b,x.x,x.y+S+(n?5:12),x.width,x.height,{class:`actor ${vy}`},r),n||(b.attr("data-et","participant"),b.attr("data-type","control"),b.attr("data-id",e.name)),e.height},"drawActorTypeControl"),ifr=_(function(t,e,r,n,a){var S,E,k;const i=n?e.stopy:e.starty,s=e.x+e.width/2,o=i+75,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,g=t.append("g").lower(),m=t.append("g");let y="actor";n?y+=` ${ng}`:y+=` ${rg}`,m.attr("class",y),m.attr("name",e.name);const v=_c();v.x=e.x,v.y=i,v.fill="#eaeaea",v.width=e.width,v.height=e.height,v.class="actor";const b=e.x+e.width/2,w=i+(n?10:25),x=22;m.append("circle").attr("cx",b).attr("cy",w).attr("r",x).attr("width",e.width).attr("height",e.height),m.append("line").attr("x1",b-x).attr("x2",b+x).attr("y1",w+x).attr("y2",w+x).attr("stroke-width",2),u==="neo"&&m.attr("filter","url(#drop-shadow)");const T=(S=a.get(e.name))!=null?S:0;a0.has(h)&&(m.style("stroke",p[T%p.length]),m.style("fill",f[T%p.length]));const C=m.node().getBBox();return e.height=C.height+((k=(E=r==null?void 0:r.sequence)==null?void 0:E.labelBoxHeight)!=null?k:0),n||(Sn++,g.append("line").attr("id","actor"+Sn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Sn),i0(r,Mi(e.description))(e.description,m,v.x,v.y+(n?15:30),v.width,v.height,{class:`actor ${vy}`},r),n?m.attr("transform",`translate(0, ${x})`):(m.attr("transform",`translate(0, ${x/2-5})`),m.attr("data-et","participant"),m.attr("data-type","entity"),m.attr("data-id",e.name)),e.height},"drawActorTypeEntity"),sfr=_(function(t,e,r,n,a){var I,L,R;const i=n?e.stopy:e.starty,s=e.x+e.width/2,o=i+e.height+2*r.boxTextMargin,{theme:u,themeVariables:h,look:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:g}=h,m=t.append("g").lower();let y=m;n||(Sn++,Object.keys(e.links||{}).length&&!r.forceMenus&&y.attr("onclick",ZP(`actor${Sn}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+Sn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),y=m.append("g"),e.actorCnt=Sn,e.links!=null&&y.attr("id","root-"+Sn),d==="neo"&&y.attr("data-look","neo"));const v=_c();let b="actor";(I=e.properties)!=null&&I.class?b=e.properties.class:v.fill="#eaeaea",n?b+=` ${ng}`:b+=` ${rg}`,v.x=e.x,v.y=i,v.width=e.width,v.height=e.height,v.class=b,v.name=e.name,v.x=e.x,v.y=i;const w=v.width/3,x=v.width/3,T=w/2,C=T/(2.5+w/50),S=y.append("g");S.attr("class",b);const E=`
|
||
M ${v.x},${v.y+C}
|
||
a ${T},${C} 0 0 0 ${w},0
|
||
a ${T},${C} 0 0 0 -${w},0
|
||
l 0,${x-2*C}
|
||
a ${T},${C} 0 0 0 ${w},0
|
||
l 0,-${x-2*C}
|
||
`;S.append("path").attr("d",E),d==="neo"&&S.attr("filter","url(#drop-shadow)");const k=(L=a.get(e.name))!=null?L:0;a0.has(u)?(S.style("stroke",p[k%p.length]),S.style("fill",f[k%p.length])):S.style("stroke",g),S.attr("transform",`translate(${w}, ${C})`),e.rectData=v,i0(r,Mi(e.description))(e.description,y,v.x,v.y+35,v.width,v.height,{class:`actor ${XP}`},r);const A=S.select("path:last-child");if(A.node()){const O=A.node().getBBox();e.height=O.height+((R=r.sequence.labelBoxHeight)!=null?R:0)}return n||(y.attr("data-et","participant"),y.attr("data-type","database"),y.attr("data-id",e.name)),e.height},"drawActorTypeDatabase"),ofr=_(function(t,e,r,n,a){var C,S;const i=n?e.stopy:e.starty,s=e.x+e.width/2,o=i+80,u=22,h=t.append("g").lower(),{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:g,borderColorArray:m,actorBorder:y}=p;n||(Sn++,h.append("line").attr("id","actor"+Sn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Sn);const v=t.append("g");let b=vy;n?b+=` ${ng}`:b+=` ${rg}`,v.attr("class",b),v.attr("name",e.name);const w=_c();w.x=e.x,w.y=i,w.fill="#eaeaea",w.width=e.width,w.height=e.height,w.class="actor",v.append("line").attr("id","actor-man-torso"+Sn).attr("x1",e.x+e.width/2-u*2.5).attr("y1",i+12).attr("x2",e.x+e.width/2-15).attr("y2",i+12),v.append("line").attr("id","actor-man-arms"+Sn).attr("x1",e.x+e.width/2-u*2.5).attr("y1",i+2).attr("x2",e.x+e.width/2-u*2.5).attr("y2",i+22),v.append("circle").attr("cx",e.x+e.width/2).attr("cy",i+12).attr("r",u),d==="neo"&&v.attr("filter","url(#drop-shadow)");const x=(C=a.get(e.name))!=null?C:0;a0.has(f)?(v.style("stroke",m[x%m.length]),v.style("fill",g[x%m.length])):v.style("stroke",y);const T=v.node().getBBox();return e.height=T.height+((S=r.sequence.labelBoxHeight)!=null?S:0),i0(r,Mi(e.description))(e.description,v,w.x,w.y+15,w.width,w.height,{class:`actor ${vy}`},r),v.attr("transform",`translate(0,${u/2+10})`),n||(v.attr("data-et","participant"),v.attr("data-type","boundary"),v.attr("data-id",e.name)),e.height},"drawActorTypeBoundary"),lfr=_(function(t,e,r,n,a){var E;const i=n?e.stopy:e.starty,s=e.x+e.width/2,o=i+80,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:g}=d,m=t.append("g").lower();n||(Sn++,m.append("line").attr("id","actor"+Sn).attr("x1",s).attr("y1",o).attr("x2",s).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=Sn);const y=t.append("g");let v=vy;n?v+=` ${ng}`:v+=` ${rg}`,y.attr("class",v),y.attr("name",e.name),n||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);const b=u==="neo"?.5:1,w=u==="neo"?i+(1-b)*30:i;y.append("line").attr("id","actor-man-torso"+Sn).attr("x1",s).attr("y1",w+25*b).attr("x2",s).attr("y2",w+45*b),y.append("line").attr("id","actor-man-arms"+Sn).attr("x1",s-yy/2*b).attr("y1",w+33*b).attr("x2",s+yy/2*b).attr("y2",w+33*b),y.append("line").attr("x1",s-yy/2*b).attr("y1",w+60*b).attr("x2",s).attr("y2",w+45*b),y.append("line").attr("x1",s).attr("y1",w+45*b).attr("x2",s+(yy/2-2)*b).attr("y2",w+60*b);const x=y.append("circle");x.attr("cx",e.x+e.width/2),x.attr("cy",w+10*b),x.attr("r",15*b),x.attr("width",e.width*b),x.attr("height",e.height*b);const T=y.node().getBBox();e.height=T.height;const C=_c();C.x=e.x,C.y=w,C.fill="#eaeaea",C.width=e.width,C.height=e.height/b,C.class="actor",C.rx=3,C.ry=3;const S=(E=a.get(e.name))!=null?E:0;return a0.has(h)?(y.style("stroke",p[S%p.length]),y.style("fill",f[S%p.length])):y.style("stroke",g),i0(r,Mi(e.description))(e.description,y,C.x,w+35*b-(u==="neo"?10:0),C.width,C.height,{class:`actor ${vy}`},r),e.height},"drawActorTypeActor"),cfr=_(function(t,e,r,n,a,i,s){return nt(this,null,function*(){const o=s!=null?s:new Map([...i.db.getActors().values()].map((u,h)=>[u.name,h]));switch(e.type){case"actor":return yield lfr(t,e,r,n,o);case"participant":return yield tfr(t,e,r,n,o);case"boundary":return yield ofr(t,e,r,n,o);case"control":return yield afr(t,e,r,n,a,o);case"entity":return yield ifr(t,e,r,n,o);case"database":return yield sfr(t,e,r,n,o);case"collections":return yield rfr(t,e,r,n,o);case"queue":return yield nfr(t,e,r,n,o)}})},"drawActor"),ufr=_(function(t,e,r){const a=t.append("g");eHe(a,e),e.name&&i0(r)(e.name,a,e.x,e.y+r.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),a.lower()},"drawBox"),hfr=_(function(t){return t.append("g")},"anchorElement"),dfr=_(function(t,e,r,n,a,i,s){var w,x;const{theme:o,themeVariables:u}=n,{bkgColorArray:h,borderColorArray:d,mainBkg:f}=u,p=_c(),g=e.anchored,m=e.actor;p.x=e.startx,p.y=e.starty,p.class="activation"+a%3,p.width=e.stopx-e.startx,p.height=r-e.starty;const y=vk(g,p),b=(w=(s!=null?s:new Map([...i.db.getActors().values()].map((T,C)=>[T.name,C]))).get(m))!=null?w:0;a0.has(o)&&(y.style("stroke",d[b%d.length]),y.style("fill",(x=h[b%d.length])!=null?x:f))},"drawActivation"),ffr=_(function(t,e,r,n,a){return nt(this,null,function*(){const{boxMargin:i,boxTextMargin:s,labelBoxHeight:o,labelBoxWidth:u,messageFontFamily:h,messageFontSize:d,messageFontWeight:f}=n,p=t.append("g").attr("data-et","control-structure").attr("data-id","i"+a.id),g=_(function(v,b,w,x){return p.append("line").attr("x1",v).attr("y1",b).attr("x2",w).attr("y2",x).attr("class","loopLine")},"drawLoopLine");g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(v){g(e.startx,v.y,e.stopx,v.y).style("stroke-dasharray","3, 3")});let m=_j();m.text=r,m.x=e.startx,m.y=e.starty,m.fontFamily=h,m.fontSize=d,m.fontWeight=f,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=Math.max(u!=null?u:0,50),m.height=o+(n.look==="neo"?15:0)||20,m.textMargin=s,m.class="labelText",Qze(p,m),m=tHe(),m.text=e.title,m.x=e.startx+u/2+(e.stopx-e.startx)/2,m.y=e.starty+i+s,m.anchor="middle",m.valign="middle",m.textMargin=s,m.class="loopText",m.fontFamily=h,m.fontSize=d,m.fontWeight=f,m.wrap=!0;let y=Mi(m.text)?yield QP(p,m,e):rC(p,m);if(e.sectionTitles!==void 0){for(const[v,b]of Object.entries(e.sectionTitles))if(b.message){m.text=b.message,m.x=e.startx+(e.stopx-e.startx)/2,m.y=e.sections[v].y+i+s,m.class="sectionTitle",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=h,m.fontSize=d,m.fontWeight=f,m.wrap=e.wrap,Mi(m.text)?(e.starty=e.sections[v].y,yield QP(p,m,e)):rC(p,m);let w=Math.round(y.map(x=>(x._groups||x)[0][0].getBBox().height).reduce((x,T)=>x+T));e.sections[v].height+=w-(i+s)}}return e.height=Math.round(e.stopy-e.starty),p})},"drawLoop"),eHe=_(function(t,e){zAe(t,e)},"drawBackgroundRect"),pfr=_(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),gfr=_(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),mfr=_(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),yfr=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),vfr=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),bfr=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),xfr=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),wfr=_(function(t,e){const{theme:r}=e;t.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${r==="redux"||r==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),tHe=_(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),Tfr=_(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),i0=function(){function t(i,s,o,u,h,d,f){const p=s.append("text").attr("x",o+h/2).attr("y",u+d/2+5).style("text-anchor","middle").text(i);a(p,f)}l(t,"byText"),_(t,"byText");function e(i,s,o,u,h,d,f,p){const{actorFontSize:g,actorFontFamily:m,actorFontWeight:y}=p,[v,b]=cf(g),w=i.split(or.lineBreakRegex);for(let x=0;x<w.length;x++){const T=x*v-v*(w.length-1)/2,C=s.append("text").attr("x",o+h/2).attr("y",u).style("text-anchor","middle").style("font-size",b).style("font-weight",y).style("font-family",m);C.append("tspan").attr("x",o+h/2).attr("dy",T).text(w[x]),C.attr("y",u+d/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),a(C,f)}}l(e,"byTspan"),_(e,"byTspan");function r(i,s,o,u,h,d,f,p){const g=s.append("switch"),y=g.append("foreignObject").attr("x",o).attr("y",u).attr("width",h).attr("height",d).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");y.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,g,o,u,h,d,f,p),a(y,f)}l(r,"byFo"),_(r,"byFo");function n(i,s,o,u,h,d,f,p){return nt(this,null,function*(){const g=yield I4(i,Ar()),m=s.append("switch"),v=m.append("foreignObject").attr("x",o+h/2-g.width/2).attr("y",u+d/2-g.height/2).attr("width",g.width).attr("height",g.height).append("xhtml:div").style("height","100%").style("width","100%");v.append("div").style("text-align","center").style("vertical-align","middle").html(yield C8(i,Ar())),e(i,m,o,u,h,d,f,p),a(v,f)})}l(n,"byKatex"),_(n,"byKatex");function a(i,s){for(const o in s)s.hasOwnProperty(o)&&i.attr(o,s[o])}return l(a,"_setTextAttrs"),_(a,"_setTextAttrs"),function(i,s=!1){return s?n:i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),Efr=function(){function t(a,i,s,o,u,h,d){const f=i.append("text").attr("x",s).attr("y",o).style("text-anchor","start").text(a);n(f,d)}l(t,"byText"),_(t,"byText");function e(a,i,s,o,u,h,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:m}=f,y=a.split(or.lineBreakRegex);for(let v=0;v<y.length;v++){const b=v*p-p*(y.length-1)/2,w=i.append("text").attr("x",s).attr("y",o).style("text-anchor","start").style("font-size",p).style("font-weight",m).style("font-family",g);w.append("tspan").attr("x",s).attr("dy",b).text(y[v]),w.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(w,d)}}l(e,"byTspan"),_(e,"byTspan");function r(a,i,s,o,u,h,d,f){const p=i.append("switch"),m=p.append("foreignObject").attr("x",s).attr("y",o).attr("width",u).attr("height",h).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),e(a,p,s,o,u,h,d,f),n(m,d)}l(r,"byFo"),_(r,"byFo");function n(a,i){for(const s in i)i.hasOwnProperty(s)&&a.attr(s,i[s])}return l(n,"_setTextAttrs"),_(n,"_setTextAttrs"),function(a){return a.textPlacement==="fo"?r:a.textPlacement==="old"?t:e}}(),Cfr=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-solidTopArrowHead").attr("refX",7.9).attr("refY",7.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 8 L 0 8 z")},"insertSolidTopArrowHead"),Sfr=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-solidBottomArrowHead").attr("refX",7.9).attr("refY",.75).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 0 L 0 8 z")},"insertSolidBottomArrowHead"),_fr=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-stickTopArrowHead").attr("refX",7.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 7 7").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickTopArrowHead"),kfr=_(function(t,e){t.append("defs").append("marker").attr("id",e+"-stickBottomArrowHead").attr("refX",7.5).attr("refY",0).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M 0 7 L 7 0").attr("stroke","black").attr("stroke-width",1.5).attr("fill","none")},"insertStickBottomArrowHead"),Da={drawRect:vk,drawText:rC,drawLabel:Qze,drawActor:cfr,drawBox:ufr,drawPopup:efr,anchorElement:hfr,drawActivation:dfr,drawLoop:ffr,drawBackgroundRect:eHe,insertArrowHead:yfr,insertArrowFilledHead:vfr,insertSequenceNumber:bfr,insertArrowCrossHead:xfr,insertDatabaseIcon:pfr,insertComputerIcon:gfr,insertClockIcon:mfr,getTextObj:tHe,getNoteRect:Tfr,fixLifeLineHeights:Jze,sanitizeUrl:Cm,insertDropShadow:wfr,insertSolidTopArrowHead:Cfr,insertSolidBottomArrowHead:Sfr,insertStickTopArrowHead:_fr,insertStickBottomArrowHead:kfr},It={},rr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:_(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:_(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:_(function(t){this.boxes.push(t)},"addBox"),addActor:_(function(t){this.actors.push(t)},"addActor"),addLoop:_(function(t){this.loops.push(t)},"addLoop"),addMessage:_(function(t){this.messages.push(t)},"addMessage"),addNote:_(function(t){this.notes.push(t)},"addNote"),lastActor:_(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:_(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:_(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:_(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:_(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,iHe(ft())},"init"),updateVal:_(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:_(function(t,e,r,n){const a=this;let i=0;function s(o){return _(l(function(h){i++;const d=a.sequenceItems.length-i+1;a.updateVal(h,"starty",e-d*It.boxMargin,Math.min),a.updateVal(h,"stopy",n+d*It.boxMargin,Math.max),a.updateVal(rr.data,"startx",t-d*It.boxMargin,Math.min),a.updateVal(rr.data,"stopx",r+d*It.boxMargin,Math.max),o!=="activation"&&(a.updateVal(h,"startx",t-d*It.boxMargin,Math.min),a.updateVal(h,"stopx",r+d*It.boxMargin,Math.max),a.updateVal(rr.data,"starty",e-d*It.boxMargin,Math.min),a.updateVal(rr.data,"stopy",n+d*It.boxMargin,Math.max))},"updateItemBounds"),"updateItemBounds")}l(s,"updateFn"),_(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:_(function(t,e,r,n){const a=or.getMin(t,r),i=or.getMax(t,r),s=or.getMin(e,n),o=or.getMax(e,n);this.updateVal(rr.data,"startx",a,Math.min),this.updateVal(rr.data,"starty",s,Math.min),this.updateVal(rr.data,"stopx",i,Math.max),this.updateVal(rr.data,"stopy",o,Math.max),this.updateBounds(a,s,i,o)},"insert"),newActivation:_(function(t,e,r){const n=r.get(t.from),a=JP(t.from).length||0,i=n.x+n.width/2+(a-1)*It.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+It.activationWidth,stopy:void 0,actor:t.from,anchored:Da.anchorElement(e)})},"newActivation"),endActivation:_(function(t){const e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:_(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:_(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:_(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:_(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:_(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:rr.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:_(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:_(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:_(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=or.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:_(function(){return this.verticalPos},"getVerticalPos"),getBounds:_(function(){return{bounds:this.data,models:this.models}},"getBounds")},Afr=_(function(t,e,r){return nt(this,null,function*(){rr.bumpVerticalPos(It.boxMargin),e.height=It.boxMargin,e.starty=rr.getVerticalPos();const n=_c();n.x=e.startx,n.y=e.starty,n.width=e.width||It.width,n.class="note";const a=t.append("g");a.attr("data-et","note"),a.attr("data-id","i"+r);const i=Da.drawRect(a,n),s=_j();s.x=e.startx,s.y=e.starty,s.width=n.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=It.noteFontFamily,s.fontSize=It.noteFontSize,s.fontWeight=It.noteFontWeight,s.anchor=It.noteAlign,s.textMargin=It.noteMargin,s.valign="center";const o=Mi(s.text)?yield QP(a,s):rC(a,s),u=Math.round(o.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,d)=>h+d));i.attr("height",u+2*It.noteMargin),e.height+=u+2*It.noteMargin,rr.bumpVerticalPos(u+2*It.noteMargin),e.stopy=e.starty+u+2*It.noteMargin,e.stopx=e.startx+n.width,rr.insert(e.startx,e.starty,e.stopx,e.stopy),rr.models.addNote(e)})},"drawNote"),rHe=_(function(t,e,r,n,a,i,s){const o=n.db.getActors(),u=o.get(e.from),h=o.get(e.to),d=r.sequenceVisible;let f=u.x+u.width/2,p=h.x+h.width/2;const g=f<=p,m=uHe(e,n),y=t.append("g"),v=16.5,b=_((S,E)=>{const k=S?v:-v;return E?-k:k},"getCircleOffset"),w=_(S=>{y.append("circle").attr("cx",S).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:x,CENTRAL_CONNECTION_REVERSE:T,CENTRAL_CONNECTION_DUAL:C}=n.db.LINETYPE;if(d)switch(e.centralConnection){case x:m&&(p+=b(g,!0));break;case T:m||(f+=b(g,!1));break;case C:m?p+=b(g,!0):f+=b(g,!1);break}switch(e.centralConnection){case x:w(p);break;case T:w(f);break;case C:w(f),w(p);break}},"drawCentralConnection"),by=_(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),nC=_(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),Wee=_(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");function nHe(t,e){return nt(this,null,function*(){rr.bumpVerticalPos(10);const{startx:r,stopx:n,message:a}=e,i=or.splitBreaks(a).length,s=Mi(a),o=s?yield I4(a,ft()):Wr.calculateTextDimensions(a,by(It));if(!s){const f=o.height/i;e.height+=f,rr.bumpVerticalPos(f)}let u,h=o.height-10;const d=o.width;if(r===n){u=rr.getVerticalPos()+h,It.rightAngles||(h+=It.boxMargin,u=rr.getVerticalPos()+h),h+=30;const f=or.getMax(d/2,It.width/2);rr.insert(r-f,rr.getVerticalPos()-10+h,n+f,rr.getVerticalPos()+30+h)}else h+=It.boxMargin,u=rr.getVerticalPos()+h,rr.insert(r,u-10,n,u);return rr.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,rr.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),u})}l(nHe,"boundMessage"),_(nHe,"boundMessage");var Nfr=_(function(t,e,r,n,a,i){return nt(this,null,function*(){const{startx:s,stopx:o,starty:u,message:h,type:d,sequenceIndex:f,sequenceVisible:p}=e,g=Wr.calculateTextDimensions(h,by(It)),m=_j();m.x=Math.min(s,o),m.y=u+10,m.width=Math.abs(o-s),m.class="messageText",m.dy="1em",m.text=h,m.fontFamily=It.messageFontFamily,m.fontSize=It.messageFontSize,m.fontWeight=It.messageFontWeight,m.anchor=It.messageAlign,m.valign="center",m.textMargin=It.wrapPadding,m.tspan=!1,Mi(m.text)?yield QP(t,m,{startx:s,stopx:o,starty:r}):rC(t,m);const y=g.width;let v;if(s===o){const w=p||It.showSequenceNumbers,x=uHe(a,n),T=Ofr(a,n),C=s+(w&&(x||T)?10:0);It.rightAngles?v=t.append("path").attr("d",`M ${C},${r} H ${s+or.getMax(It.width/2,y/2)} V ${r+25} H ${s}`):v=t.append("path").attr("d","M "+C+","+r+" C "+(C+60)+","+(r-10)+" "+(s+60)+","+(r+30)+" "+s+","+(r+20)),Gee(a,n)&&rHe(t,a,e,n,s,o,r)}else v=t.append("line"),v.attr("x1",s),v.attr("y1",r),v.attr("x2",o),v.attr("y2",r),Gee(a,n)&&rHe(t,a,e,n,s,o,r);d===n.db.LINETYPE.DOTTED||d===n.db.LINETYPE.DOTTED_CROSS||d===n.db.LINETYPE.DOTTED_POINT||d===n.db.LINETYPE.DOTTED_OPEN||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===n.db.LINETYPE.SOLID_TOP_DOTTED||d===n.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===n.db.LINETYPE.STICK_TOP_DOTTED||d===n.db.LINETYPE.STICK_BOTTOM_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(v.style("stroke-dasharray","3, 3"),v.attr("class","messageLine1")):v.attr("class","messageLine0"),v.attr("data-et","message"),v.attr("data-id","i"+e.id),v.attr("data-from",e.from),v.attr("data-to",e.to);let b="";if(It.arrowMarkerAbsolute&&(b=E8(!0)),v.attr("stroke-width",2),v.attr("stroke","none"),v.style("fill","none"),(d===n.db.LINETYPE.SOLID_TOP||d===n.db.LINETYPE.SOLID_TOP_DOTTED)&&v.attr("marker-end","url("+b+"#"+i+"-solidTopArrowHead)"),(d===n.db.LINETYPE.SOLID_BOTTOM||d===n.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&v.attr("marker-end","url("+b+"#"+i+"-solidBottomArrowHead)"),(d===n.db.LINETYPE.STICK_TOP||d===n.db.LINETYPE.STICK_TOP_DOTTED)&&v.attr("marker-end","url("+b+"#"+i+"-stickTopArrowHead)"),(d===n.db.LINETYPE.STICK_BOTTOM||d===n.db.LINETYPE.STICK_BOTTOM_DOTTED)&&v.attr("marker-end","url("+b+"#"+i+"-stickBottomArrowHead)"),(d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&v.attr("marker-start","url("+b+"#"+i+"-solidBottomArrowHead)"),(d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&v.attr("marker-start","url("+b+"#"+i+"-solidTopArrowHead)"),(d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&v.attr("marker-start","url("+b+"#"+i+"-stickBottomArrowHead)"),(d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&v.attr("marker-start","url("+b+"#"+i+"-stickTopArrowHead)"),(d===n.db.LINETYPE.SOLID||d===n.db.LINETYPE.DOTTED)&&v.attr("marker-end","url("+b+"#"+i+"-arrowhead)"),(d===n.db.LINETYPE.BIDIRECTIONAL_SOLID||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(v.attr("marker-start","url("+b+"#"+i+"-arrowhead)"),v.attr("marker-end","url("+b+"#"+i+"-arrowhead)")),(d===n.db.LINETYPE.SOLID_POINT||d===n.db.LINETYPE.DOTTED_POINT)&&v.attr("marker-end","url("+b+"#"+i+"-filled-head)"),(d===n.db.LINETYPE.SOLID_CROSS||d===n.db.LINETYPE.DOTTED_CROSS)&&v.attr("marker-end","url("+b+"#"+i+"-crosshead)"),p||It.showSequenceNumbers){const w=d===n.db.LINETYPE.BIDIRECTIONAL_SOLID||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED,x=d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,T=6,C=Gee(a,n);let S=s,E=o;w?(s<o?S=s+T*2:(S=s-T+(C?-5:0),S+=(a==null?void 0:a.centralConnection)===n.db.LINETYPE.CENTRAL_CONNECTION_DUAL||(a==null?void 0:a.centralConnection)===n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),v.attr("x1",S)):x?(o>s?E=o-2*T:(E=o-T,S+=(a==null?void 0:a.centralConnection)===n.db.LINETYPE.CENTRAL_CONNECTION_DUAL||(a==null?void 0:a.centralConnection)===n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),E+=C?15:0,v.attr("x2",E),v.attr("x1",S)):v.attr("x1",s+T);let k=0;const A=s===o,I=s<=o;A?k=e.fromBounds+1:x?k=I?e.toBounds-1:e.fromBounds+1:k=I?e.fromBounds+1:e.toBounds-1;let L="12px";const R=f.toString().length;R>5?L="7px":R>3&&(L="9px"),t.append("line").attr("x1",k).attr("y1",r).attr("x2",k).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+b+"#"+i+"-sequencenumber)"),t.append("text").attr("x",k).attr("y",r+4).attr("font-family","sans-serif").attr("font-size",L).attr("text-anchor","middle").attr("class","sequenceNumber").text(f)}})},"drawMessage"),Ifr=_(function(t,e,r,n,a,i,s){let o=0,u=0,h,d=0;for(const f of n){const p=e.get(f),g=p.box;h&&h!=g&&(s||rr.models.addBox(h),u+=It.boxMargin+h.margin),g&&g!=h&&(s||(g.x=o+u,g.y=a),u+=g.margin),p.width=or.getMax(p.width||It.width,It.width),p.height=or.getMax(p.height||It.height,It.height),p.margin=p.margin||It.actorMargin,d=or.getMax(d,p.height),r.get(p.name)&&(u+=p.width/2),p.x=o+u,p.starty=rr.getVerticalPos(),rr.insert(p.x,a,p.x+p.width,p.height),o+=p.width+u,p.box&&(p.box.width=o+g.margin-p.box.x),u=p.margin,h=p.box,rr.models.addActor(p)}h&&!s&&rr.models.addBox(h),rr.bumpVerticalPos(d)},"addActorRenderingData"),Vee=_(function(t,e,r,n,a,i,s){return nt(this,null,function*(){if(n){let o=0;rr.bumpVerticalPos(It.boxMargin*2);for(const u of r){const h=e.get(u);h.stopy||(h.stopy=rr.getVerticalPos());const d=yield Da.drawActor(t,h,It,!0,a,i,s);o=or.getMax(o,d)}rr.bumpVerticalPos(o+It.boxMargin)}else for(const o of r){const u=e.get(o);yield Da.drawActor(t,u,It,!1,a,i,s)}})},"drawActors"),aHe=_(function(t,e,r,n){let a=0,i=0;for(const s of r){const o=e.get(s),u=$fr(o),h=Da.drawPopup(t,o,u,It,It.forceMenus,n);h.height>a&&(a=h.height),h.width+o.x>i&&(i=h.width+o.x)}return{maxHeight:a,maxWidth:i}},"drawActorsPopup"),iHe=_(function(t){$i(It,t),t.fontFamily&&(It.actorFontFamily=It.noteFontFamily=It.messageFontFamily=t.fontFamily),t.fontSize&&(It.actorFontSize=It.noteFontSize=It.messageFontSize=t.fontSize),t.fontWeight&&(It.actorFontWeight=It.noteFontWeight=It.messageFontWeight=t.fontWeight)},"setConf"),JP=_(function(t){return rr.activations.filter(function(e){return e.actor===t})},"actorActivations"),sHe=_(function(t,e){const r=e.get(t),n=JP(t),a=n.reduce(function(s,o){return or.getMin(s,o.startx)},r.x+r.width/2-1),i=n.reduce(function(s,o){return or.getMax(s,o.stopx)},r.x+r.width/2+1);return[a,i]},"activationBounds");function ch(t,e,r,n,a){rr.bumpVerticalPos(r);let i=n;if(e.id&&e.message&&t[e.id]){const s=t[e.id].width,o=by(It);e.message=Wr.wrapLabel(`[${e.message}]`,s-2*It.wrapPadding,o),e.width=s,e.wrap=!0;const u=Wr.calculateTextDimensions(e.message,o),h=or.getMax(u.height,It.labelBoxHeight);i=n+h,Le.debug(`${h} - ${e.message}`)}a(e),rr.bumpVerticalPos(i)}l(ch,"adjustLoopHeightForWrap"),_(ch,"adjustLoopHeightForWrap");function oHe(t,e,r,n,a,i,s){function o(d,f){d.x<a.get(t.from).x?(rr.insert(e.stopx-f,e.starty,e.startx,e.stopy+d.height/2+It.noteMargin),e.stopx=e.stopx+f):(rr.insert(e.startx,e.starty,e.stopx+f,e.stopy+d.height/2+It.noteMargin),e.stopx=e.stopx-f)}l(o,"receiverAdjustment"),_(o,"receiverAdjustment");function u(d,f){d.x<a.get(t.to).x?(rr.insert(e.startx-f,e.starty,e.stopx,e.stopy+d.height/2+It.noteMargin),e.startx=e.startx+f):(rr.insert(e.stopx,e.starty,e.startx+f,e.stopy+d.height/2+It.noteMargin),e.startx=e.startx-f)}l(u,"senderAdjustment"),_(u,"senderAdjustment");const h=[KP.ACTOR,KP.CONTROL,KP.ENTITY,KP.DATABASE];if(i.get(t.to)==n){const d=a.get(t.to),f=h.includes(d.type)?yy/2+3:d.width/2+3;o(d,f),d.starty=r-d.height/2,rr.bumpVerticalPos(d.height/2)}else if(s.get(t.from)==n){const d=a.get(t.from);if(It.mirrorActors){const f=h.includes(d.type)?yy/2:d.width/2;u(d,f)}d.stopy=r-d.height/2,rr.bumpVerticalPos(d.height/2)}else if(s.get(t.to)==n){const d=a.get(t.to);if(It.mirrorActors){const f=h.includes(d.type)?yy/2+3:d.width/2+3;o(d,f)}d.stopy=r-d.height/2,rr.bumpVerticalPos(d.height/2)}}l(oHe,"adjustCreatedDestroyedData"),_(oHe,"adjustCreatedDestroyedData");var Lfr=_(function(t,e,r,n){return nt(this,null,function*(){const{securityLevel:a,sequence:i,look:s,themeVariables:o}=ft();It=i;let u;a==="sandbox"&&(u=Yt("#i"+e));const h=Yt(a==="sandbox"?u.nodes()[0].contentDocument.body:"body"),d=a==="sandbox"?u.nodes()[0].contentDocument:document;rr.init(),Le.debug(n.db);const f=a==="sandbox"?h.select(`[id="${e}"]`):Yt(`[id="${e}"]`),p=n.db.getActors(),g=n.db.getCreatedActors(),m=n.db.getDestroyedActors(),y=n.db.getBoxes();let v=n.db.getActorKeys();const b=n.db.getMessages(),w=n.db.getDiagramTitle(),x=n.db.hasAtLeastOneBox(),T=n.db.hasAtLeastOneBoxWithTitle(),C=yield lHe(p,b,n);if(It.height=yield cHe(p,C,y),Da.insertComputerIcon(f,e),Da.insertDatabaseIcon(f,e),Da.insertClockIcon(f,e),x&&(rr.bumpVerticalPos(It.boxMargin),T&&rr.bumpVerticalPos(y[0].textMaxHeight)),It.hideUnusedParticipants===!0){const V=new Set;b.forEach(Y=>{V.add(Y.from),V.add(Y.to)}),v=v.filter(Y=>V.has(Y))}const S=new Map(v.map((V,Y)=>{var H,q;return[(q=(H=p.get(V))==null?void 0:H.name)!=null?q:V,Y]}));Ifr(f,p,g,v,0,b,!1);const E=yield Ffr(b,p,C,n);Da.insertArrowHead(f,e),Da.insertArrowCrossHead(f,e),Da.insertArrowFilledHead(f,e),Da.insertSequenceNumber(f,e),Da.insertSolidTopArrowHead(f,e),Da.insertSolidBottomArrowHead(f,e),Da.insertStickTopArrowHead(f,e),Da.insertStickBottomArrowHead(f,e),s==="neo"&&Da.insertDropShadow(f,It);function k(V,Y){const H=rr.endActivation(V);H.starty+18>Y&&(H.starty=Y-6,Y+=12),Da.drawActivation(f,H,Y,It,JP(V.from).length,n,S),rr.insert(H.startx,Y-10,H.stopx,Y)}l(k,"activeEnd"),_(k,"activeEnd");let A=1,I=1;const L=[],R=[];let O=0;for(const V of b){let Y,H,q;switch(V.type){case n.db.LINETYPE.NOTE:rr.resetVerticalPos(),H=V.noteModel,yield Afr(f,H,V.id);break;case n.db.LINETYPE.ACTIVE_START:rr.newActivation(V,f,p);break;case n.db.LINETYPE.CENTRAL_CONNECTION:rr.newActivation(V,f,p);break;case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:rr.newActivation(V,f,p);break;case n.db.LINETYPE.ACTIVE_END:k(V,rr.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:ch(E,V,It.boxMargin,It.boxMargin+It.boxTextMargin,Z=>rr.newLoop(Z));break;case n.db.LINETYPE.LOOP_END:Y=rr.endLoop(),yield Da.drawLoop(f,Y,"loop",It,V),rr.bumpVerticalPos(Y.stopy-rr.getVerticalPos()),rr.models.addLoop(Y);break;case n.db.LINETYPE.RECT_START:ch(E,V,It.boxMargin,It.boxMargin,Z=>{let K=Z.message;K||(K=(o==null?void 0:o.rectBkgColor)||(o==null?void 0:o.actorBkg)||"rgba(128, 128, 128, 0.5)"),rr.newLoop(void 0,K)});break;case n.db.LINETYPE.RECT_END:Y=rr.endLoop(),R.push(Y),rr.models.addLoop(Y),rr.bumpVerticalPos(Y.stopy-rr.getVerticalPos());break;case n.db.LINETYPE.OPT_START:ch(E,V,It.boxMargin,It.boxMargin+It.boxTextMargin,Z=>rr.newLoop(Z));break;case n.db.LINETYPE.OPT_END:Y=rr.endLoop(),yield Da.drawLoop(f,Y,"opt",It,V),rr.bumpVerticalPos(Y.stopy-rr.getVerticalPos()),rr.models.addLoop(Y);break;case n.db.LINETYPE.ALT_START:ch(E,V,It.boxMargin,It.boxMargin+It.boxTextMargin,Z=>rr.newLoop(Z));break;case n.db.LINETYPE.ALT_ELSE:ch(E,V,It.boxMargin+It.boxTextMargin,It.boxMargin,Z=>rr.addSectionToLoop(Z));break;case n.db.LINETYPE.ALT_END:Y=rr.endLoop(),yield Da.drawLoop(f,Y,"alt",It,V),rr.bumpVerticalPos(Y.stopy-rr.getVerticalPos()),rr.models.addLoop(Y);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:ch(E,V,It.boxMargin,It.boxMargin+It.boxTextMargin,Z=>rr.newLoop(Z)),rr.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:ch(E,V,It.boxMargin+It.boxTextMargin,It.boxMargin,Z=>rr.addSectionToLoop(Z));break;case n.db.LINETYPE.PAR_END:Y=rr.endLoop(),yield Da.drawLoop(f,Y,"par",It,V),rr.bumpVerticalPos(Y.stopy-rr.getVerticalPos()),rr.models.addLoop(Y);break;case n.db.LINETYPE.AUTONUMBER:A=V.message.start||A,I=V.message.step||I,V.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:ch(E,V,It.boxMargin,It.boxMargin+It.boxTextMargin,Z=>rr.newLoop(Z));break;case n.db.LINETYPE.CRITICAL_OPTION:ch(E,V,It.boxMargin+It.boxTextMargin,It.boxMargin,Z=>rr.addSectionToLoop(Z));break;case n.db.LINETYPE.CRITICAL_END:Y=rr.endLoop(),yield Da.drawLoop(f,Y,"critical",It,V),rr.bumpVerticalPos(Y.stopy-rr.getVerticalPos()),rr.models.addLoop(Y);break;case n.db.LINETYPE.BREAK_START:ch(E,V,It.boxMargin,It.boxMargin+It.boxTextMargin,Z=>rr.newLoop(Z));break;case n.db.LINETYPE.BREAK_END:Y=rr.endLoop(),yield Da.drawLoop(f,Y,"break",It,V),rr.bumpVerticalPos(Y.stopy-rr.getVerticalPos()),rr.models.addLoop(Y);break;default:try{q=V.msgModel,q.starty=rr.getVerticalPos(),q.sequenceIndex=A,q.sequenceVisible=n.db.showSequenceNumbers(),q.id=V.id,q.from=V.from,q.to=V.to;const Z=yield nHe(f,q);oHe(V,q,Z,O,p,g,m),L.push({messageModel:q,lineStartY:Z,msg:V}),rr.models.addMessage(q)}catch(Z){Le.error("error while drawing message",Z)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(V.type)&&(A=Math.round((A+I)*100)/100),O++}Le.debug("createdActors",g),Le.debug("destroyedActors",m),yield Vee(f,p,v,!1,e,n,S);for(const V of L)yield Nfr(f,V.messageModel,V.lineStartY,n,V.msg,e);It.mirrorActors&&(yield Vee(f,p,v,!0,e,n,S)),R.forEach(V=>Da.drawBackgroundRect(f,V)),Jze(f,p,v,It);for(const V of rr.models.boxes){V.height=rr.getVerticalPos()-V.y,rr.insert(V.x,V.y,V.x+V.width,V.height);const Y=It.boxMargin*2;V.startx=V.x-Y,V.starty=V.y-Y*.25,V.stopx=V.startx+V.width+2*Y,V.stopy=V.starty+V.height+Y*.75,V.stroke="rgb(0,0,0, 0.5)",Da.drawBox(f,V,It)}x&&rr.bumpVerticalPos(It.boxMargin);const M=aHe(f,p,v,d),{bounds:P}=rr.getBounds();P.startx===void 0&&(P.startx=0),P.starty===void 0&&(P.starty=0),P.stopx===void 0&&(P.stopx=0),P.stopy===void 0&&(P.stopy=0);let z=P.stopy-P.starty;z<M.maxHeight&&(z=M.maxHeight);let D=z+2*It.diagramMarginY;It.mirrorActors&&(D=D-It.boxMargin+It.bottomMarginAdj);let B=P.stopx-P.startx;B<M.maxWidth&&(B=M.maxWidth);const W=B+2*It.diagramMarginX;w&&f.append("text").text(w).attr("x",(P.stopx-P.startx)/2-2*It.diagramMarginX).attr("y",-25),yi(f,D,W,It.useMaxWidth);const U=w?40:0,j=p.size&&s==="neo"?30:0;f.attr("viewBox",P.startx-It.diagramMarginX+" -"+(It.diagramMarginY+U)+" "+W+" "+(D+U+j)),Le.debug("models:",rr.models)})},"draw");function lHe(t,e,r){return nt(this,null,function*(){const n={};for(const a of e)if(t.get(a.to)&&t.get(a.from)){const i=t.get(a.to);if(a.placement===r.db.PLACEMENT.LEFTOF&&!i.prevActor||a.placement===r.db.PLACEMENT.RIGHTOF&&!i.nextActor)continue;const s=a.placement!==void 0,o=!s,u=s?nC(It):by(It),h=a.wrap?Wr.wrapLabel(a.message,It.width-2*It.wrapPadding,u):a.message,f=(Mi(h)?yield I4(a.message,ft()):Wr.calculateTextDimensions(h,u)).width+2*It.wrapPadding;o&&a.from===i.nextActor?n[a.to]=or.getMax(n[a.to]||0,f):o&&a.from===i.prevActor?n[a.from]=or.getMax(n[a.from]||0,f):o&&a.from===a.to?(n[a.from]=or.getMax(n[a.from]||0,f/2),n[a.to]=or.getMax(n[a.to]||0,f/2)):a.placement===r.db.PLACEMENT.RIGHTOF?n[a.from]=or.getMax(n[a.from]||0,f):a.placement===r.db.PLACEMENT.LEFTOF?n[i.prevActor]=or.getMax(n[i.prevActor]||0,f):a.placement===r.db.PLACEMENT.OVER&&(i.prevActor&&(n[i.prevActor]=or.getMax(n[i.prevActor]||0,f/2)),i.nextActor&&(n[a.from]=or.getMax(n[a.from]||0,f/2)))}return Le.debug("maxMessageWidthPerActor:",n),n})}l(lHe,"getMaxMessageWidthPerActor"),_(lHe,"getMaxMessageWidthPerActor");var $fr=_(function(t){let e=0;const r=Wee(It);for(const n in t.links){const i=Wr.calculateTextDimensions(n,r).width+2*It.wrapPadding+2*It.boxMargin;e<i&&(e=i)}return e},"getRequiredPopupWidth");function cHe(t,e,r){return nt(this,null,function*(){let n=0;for(const i of t.keys()){const s=t.get(i);s.wrap&&(s.description=Wr.wrapLabel(s.description,It.width-2*It.wrapPadding,Wee(It)));const o=Mi(s.description)?yield I4(s.description,ft()):Wr.calculateTextDimensions(s.description,Wee(It));s.width=s.wrap?It.width:or.getMax(It.width,o.width+2*It.wrapPadding),s.height=s.wrap?or.getMax(o.height,It.height):It.height,n=or.getMax(n,s.height)}for(const i in e){const s=t.get(i);if(!s)continue;const o=t.get(s.nextActor);if(!o){const f=e[i]+It.actorMargin-s.width/2;s.margin=or.getMax(f,It.actorMargin);continue}const h=e[i]+It.actorMargin-s.width/2-o.width/2;s.margin=or.getMax(h,It.actorMargin)}let a=0;return r.forEach(i=>{const s=by(It);let o=i.actorKeys.reduce((f,p)=>f+=t.get(p).width+(t.get(p).margin||0),0);const u=It.boxMargin*8;o+=u,o-=2*It.boxTextMargin,i.wrap&&(i.name=Wr.wrapLabel(i.name,o-2*It.wrapPadding,s));const h=Wr.calculateTextDimensions(i.name,s);a=or.getMax(h.height,a);const d=or.getMax(o,h.width+2*It.wrapPadding);if(i.margin=It.boxTextMargin,o<d){const f=(d-o)/2;i.margin+=f}}),r.forEach(i=>i.textMaxHeight=a),or.getMax(n,It.height)})}l(cHe,"calculateActorMargins"),_(cHe,"calculateActorMargins");var Mfr=_(function(t,e,r){return nt(this,null,function*(){const n=e.get(t.from),a=e.get(t.to),i=n.x,s=a.x,o=t.wrap&&t.message;let u=Mi(t.message)?yield I4(t.message,ft()):Wr.calculateTextDimensions(o?Wr.wrapLabel(t.message,It.width,nC(It)):t.message,nC(It));const h={width:o?It.width:or.getMax(It.width,u.width+2*It.noteMargin),height:0,startx:n.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(h.width=o?or.getMax(It.width,u.width):or.getMax(n.width/2+a.width/2,u.width+2*It.noteMargin),h.startx=i+(n.width+It.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(h.width=o?or.getMax(It.width,u.width+2*It.noteMargin):or.getMax(n.width/2+a.width/2,u.width+2*It.noteMargin),h.startx=i-h.width+(n.width-It.actorMargin)/2):t.to===t.from?(u=Wr.calculateTextDimensions(o?Wr.wrapLabel(t.message,or.getMax(It.width,n.width),nC(It)):t.message,nC(It)),h.width=o?or.getMax(It.width,n.width):or.getMax(n.width,It.width,u.width+2*It.noteMargin),h.startx=i+(n.width-h.width)/2):(h.width=Math.abs(i+n.width/2-(s+a.width/2))+It.actorMargin,h.startx=i<s?i+n.width/2-It.actorMargin/2:s+a.width/2-It.actorMargin/2),o&&(h.message=Wr.wrapLabel(t.message,h.width-2*It.wrapPadding,nC(It))),Le.debug(`NM:[${h.startx},${h.stopx},${h.starty},${h.stopy}:${h.width},${h.height}=${t.message}]`),h})},"buildNoteModel"),Pfr=4,Gee=_(function(t,e){const{CENTRAL_CONNECTION:r,CENTRAL_CONNECTION_REVERSE:n,CENTRAL_CONNECTION_DUAL:a}=e.db.LINETYPE;return[r,n,a].includes(t.centralConnection)},"hasCentralConnection"),Rfr=_(function(t,e,r){const{CENTRAL_CONNECTION_REVERSE:n,CENTRAL_CONNECTION_DUAL:a,BIDIRECTIONAL_SOLID:i,BIDIRECTIONAL_DOTTED:s}=e.db.LINETYPE;let o=0;return(t.centralConnection===n||t.centralConnection===a)&&(o+=Pfr),(t.centralConnection===n||t.centralConnection===a)&&(t.type===i||t.type===s)&&(o+=r?0:-6),o},"calculateCentralConnectionOffset"),uHe=_(function(t,e){const{SOLID_ARROW_TOP_REVERSE:r,SOLID_ARROW_TOP_REVERSE_DOTTED:n,SOLID_ARROW_BOTTOM_REVERSE:a,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:i,STICK_ARROW_TOP_REVERSE:s,STICK_ARROW_TOP_REVERSE_DOTTED:o,STICK_ARROW_BOTTOM_REVERSE:u,STICK_ARROW_BOTTOM_REVERSE_DOTTED:h}=e.db.LINETYPE;return[r,n,a,i,s,o,u,h].includes(t.type)},"isReverseArrowType"),Ofr=_(function(t,e){const{BIDIRECTIONAL_SOLID:r,BIDIRECTIONAL_DOTTED:n}=e.db.LINETYPE;return[r,n].includes(t.type)},"isBidirectionalArrowType"),Dfr=_(function(t,e,r){const{look:n}=ft();if(![r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type))return{};const[a,i]=sHe(t.from,e),[s,o]=sHe(t.to,e),u=a<=s;let h=u?i:a,d=u?s:o;n==="neo"&&(t.type!==r.db.LINETYPE.SOLID_OPEN&&(d+=u?-3:3),(t.type===r.db.LINETYPE.BIDIRECTIONAL_SOLID||t.type===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(h+=u?3:-3)),h+=Rfr(t,r,u);const f=Math.abs(s-o)>2,p=_(v=>u?-v:v,"adjustValue");t.from===t.to?d=h:(t.activate&&!f&&(d+=p(It.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(d+=p(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(h-=p(3)));const g=[a,i,s,o],m=Math.abs(h-d);t.wrap&&t.message&&(t.message=Wr.wrapLabel(t.message,or.getMax(m+2*It.wrapPadding,It.width),by(It)));const y=Wr.calculateTextDimensions(t.message,by(It));return{width:or.getMax(t.wrap?0:y.width+2*It.wrapPadding,m+2*It.wrapPadding,It.width),height:0,startx:h,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),Ffr=_(function(t,e,r,n){return nt(this,null,function*(){const a={},i=[];let s,o,u;for(const h of t){switch(h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:i.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(s=i.pop(),a[s.id]=s,a[h.id]=s,i.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=i.pop(),a[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{const f=e.get(h.from?h.from:h.to.actor),p=JP(h.from?h.from:h.to.actor).length,g=f.x+f.width/2+(p-1)*It.activationWidth/2,m={startx:g,stopx:g+It.activationWidth,actor:h.from,enabled:!0};rr.activations.push(m)}break;case n.db.LINETYPE.ACTIVE_END:{const f=rr.activations.map(p=>p.actor).lastIndexOf(h.from);rr.activations.splice(f,1).splice(0,1)}break}h.placement!==void 0?(o=yield Mfr(h,e,n),h.noteModel=o,i.forEach(f=>{s=f,s.from=or.getMin(s.from,o.startx),s.to=or.getMax(s.to,o.startx+o.width),s.width=or.getMax(s.width,Math.abs(s.from-s.to))-It.labelBoxWidth})):(u=Dfr(h,e,n),h.msgModel=u,u.startx&&u.stopx&&i.length>0&&i.forEach(f=>{if(s=f,u.startx===u.stopx){const p=e.get(h.from),g=e.get(h.to);s.from=or.getMin(p.x-u.width/2,p.x-p.width/2,s.from),s.to=or.getMax(g.x+u.width/2,g.x+p.width/2,s.to),s.width=or.getMax(s.width,Math.abs(s.to-s.from))-It.labelBoxWidth}else s.from=or.getMin(u.startx,s.from),s.to=or.getMax(u.stopx,s.to),s.width=or.getMax(s.width,u.width)-It.labelBoxWidth}))}return rr.activations=[],Le.debug("Loop type widths:",a),a})},"calculateLoopBounds"),Bfr={bounds:rr,drawActors:Vee,drawActorsPopup:aHe,setConf:iHe,draw:Lfr},zfr={parser:Udr,get db(){return new Zdr},renderer:Bfr,styles:Jdr,init:_(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,Dz({sequence:{wrap:t.wrap}}))},"init")},Hfr=Object.freeze({__proto__:null,diagram:zfr}),qee=function(){var t=_(function(ze,We,me,Se){for(me=me||{},Se=ze.length;Se--;me[ze[Se]]=We);return me},"o"),e=[1,18],r=[1,19],n=[1,20],a=[1,41],i=[1,26],s=[1,42],o=[1,24],u=[1,25],h=[1,32],d=[1,33],f=[1,34],p=[1,45],g=[1,35],m=[1,36],y=[1,37],v=[1,38],b=[1,27],w=[1,28],x=[1,29],T=[1,30],C=[1,31],S=[1,44],E=[1,46],k=[1,43],A=[1,47],I=[1,9],L=[1,8,9],R=[1,58],O=[1,59],M=[1,60],P=[1,61],z=[1,62],D=[1,63],B=[1,64],W=[1,8,9,41],U=[1,77],j=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],V=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],Y=[13,60,86,100,102,103],H=[13,60,73,74,86,100,102,103],q=[13,60,68,69,70,71,72,86,100,102,103],Z=[1,103],K=[1,121],re=[1,117],Q=[1,113],te=[1,119],ee=[1,114],J=[1,115],ae=[1,116],se=[1,118],fe=[1,120],ve=[22,50,60,61,82,86,87,88,89,90],de=[1,128],Ee=[12,39],Ce=[1,8,9,39,41,44,46],De=[1,8,9,22],ce=[1,153],Ie=[1,8,9,61],ye=[1,8,9,22,50,60,61,82,86,87,88,89,90],pe={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:_(l(function(We,me,Se,ne,xe,oe,_e){var ue=oe.length-1;switch(xe){case 8:this.$=oe[ue-1];break;case 9:case 10:case 13:case 15:this.$=oe[ue];break;case 11:case 14:this.$=oe[ue-2]+"."+oe[ue];break;case 12:case 16:this.$=oe[ue-1]+oe[ue];break;case 17:case 18:this.$=oe[ue-1]+"~"+oe[ue]+"~";break;case 19:ne.addRelation(oe[ue]);break;case 20:oe[ue-1].title=ne.cleanupLabel(oe[ue]),ne.addRelation(oe[ue-1]);break;case 31:this.$=oe[ue].trim(),ne.setAccTitle(this.$);break;case 32:case 33:this.$=oe[ue].trim(),ne.setAccDescription(this.$);break;case 34:ne.addClassesToNamespace(oe[ue-3],oe[ue-1][0],oe[ue-1][1]),ne.popNamespace();break;case 35:ne.addClassesToNamespace(oe[ue-4],oe[ue-1][0],oe[ue-1][1]),ne.popNamespace();break;case 36:this.$=ne.addNamespace(oe[ue]);break;case 37:this.$=ne.addNamespace(oe[ue-1],oe[ue]);break;case 38:this.$=[[oe[ue]],[]];break;case 39:this.$=[[oe[ue-1]],[]];break;case 40:oe[ue][0].unshift(oe[ue-2]),this.$=oe[ue];break;case 41:this.$=[[],[oe[ue]]];break;case 42:this.$=[[],[oe[ue-1]]];break;case 43:oe[ue][1].unshift(oe[ue-2]),this.$=oe[ue];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=oe[ue];break;case 48:ne.setCssClass(oe[ue-2],oe[ue]);break;case 49:ne.addMembers(oe[ue-3],oe[ue-1]);break;case 51:ne.setCssClass(oe[ue-5],oe[ue-3]),ne.addMembers(oe[ue-5],oe[ue-1]);break;case 52:ne.addAnnotation(oe[ue-3],oe[ue-1]);break;case 53:ne.addAnnotation(oe[ue-6],oe[ue-4]),ne.addMembers(oe[ue-6],oe[ue-1]);break;case 54:ne.addAnnotation(oe[ue-5],oe[ue-3]);break;case 55:this.$=oe[ue],ne.addClass(oe[ue]);break;case 56:this.$=oe[ue-1],ne.addClass(oe[ue-1]),ne.setClassLabel(oe[ue-1],oe[ue]);break;case 60:ne.addAnnotation(oe[ue],oe[ue-2]);break;case 61:case 74:this.$=[oe[ue]];break;case 62:oe[ue].push(oe[ue-1]),this.$=oe[ue];break;case 63:break;case 64:ne.addMember(oe[ue-1],ne.cleanupLabel(oe[ue]));break;case 65:break;case 66:break;case 67:this.$={id1:oe[ue-2],id2:oe[ue],relation:oe[ue-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:oe[ue-3],id2:oe[ue],relation:oe[ue-1],relationTitle1:oe[ue-2],relationTitle2:"none"};break;case 69:this.$={id1:oe[ue-3],id2:oe[ue],relation:oe[ue-2],relationTitle1:"none",relationTitle2:oe[ue-1]};break;case 70:this.$={id1:oe[ue-4],id2:oe[ue],relation:oe[ue-2],relationTitle1:oe[ue-3],relationTitle2:oe[ue-1]};break;case 71:this.$=ne.addNote(oe[ue],oe[ue-1]);break;case 72:this.$=ne.addNote(oe[ue]);break;case 73:this.$=oe[ue-2],ne.defineClass(oe[ue-1],oe[ue]);break;case 75:this.$=oe[ue-2].concat([oe[ue]]);break;case 76:ne.setDirection("TB");break;case 77:ne.setDirection("BT");break;case 78:ne.setDirection("RL");break;case 79:ne.setDirection("LR");break;case 80:this.$={type1:oe[ue-2],type2:oe[ue],lineType:oe[ue-1]};break;case 81:this.$={type1:"none",type2:oe[ue],lineType:oe[ue-1]};break;case 82:this.$={type1:oe[ue-1],type2:"none",lineType:oe[ue]};break;case 83:this.$={type1:"none",type2:"none",lineType:oe[ue]};break;case 84:this.$=ne.relationType.AGGREGATION;break;case 85:this.$=ne.relationType.EXTENSION;break;case 86:this.$=ne.relationType.COMPOSITION;break;case 87:this.$=ne.relationType.DEPENDENCY;break;case 88:this.$=ne.relationType.LOLLIPOP;break;case 89:this.$=ne.lineType.LINE;break;case 90:this.$=ne.lineType.DOTTED_LINE;break;case 91:case 97:this.$=oe[ue-2],ne.setClickEvent(oe[ue-1],oe[ue]);break;case 92:case 98:this.$=oe[ue-3],ne.setClickEvent(oe[ue-2],oe[ue-1]),ne.setTooltip(oe[ue-2],oe[ue]);break;case 93:this.$=oe[ue-2],ne.setLink(oe[ue-1],oe[ue]);break;case 94:this.$=oe[ue-3],ne.setLink(oe[ue-2],oe[ue-1],oe[ue]);break;case 95:this.$=oe[ue-3],ne.setLink(oe[ue-2],oe[ue-1]),ne.setTooltip(oe[ue-2],oe[ue]);break;case 96:this.$=oe[ue-4],ne.setLink(oe[ue-3],oe[ue-2],oe[ue]),ne.setTooltip(oe[ue-3],oe[ue-1]);break;case 99:this.$=oe[ue-3],ne.setClickEvent(oe[ue-2],oe[ue-1],oe[ue]);break;case 100:this.$=oe[ue-4],ne.setClickEvent(oe[ue-3],oe[ue-2],oe[ue-1]),ne.setTooltip(oe[ue-3],oe[ue]);break;case 101:this.$=oe[ue-3],ne.setLink(oe[ue-2],oe[ue]);break;case 102:this.$=oe[ue-4],ne.setLink(oe[ue-3],oe[ue-1],oe[ue]);break;case 103:this.$=oe[ue-4],ne.setLink(oe[ue-3],oe[ue-1]),ne.setTooltip(oe[ue-3],oe[ue]);break;case 104:this.$=oe[ue-5],ne.setLink(oe[ue-4],oe[ue-2],oe[ue]),ne.setTooltip(oe[ue-4],oe[ue-1]);break;case 105:this.$=oe[ue-2],ne.setCssStyle(oe[ue-1],oe[ue]);break;case 106:ne.setCssClass(oe[ue-1],oe[ue]);break;case 107:this.$=[oe[ue]];break;case 108:oe[ue-2].push(oe[ue]),this.$=oe[ue-2];break;case 110:this.$=oe[ue-1]+oe[ue];break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:a,43:23,46:i,48:s,51:o,52:u,54:h,56:d,57:f,60:p,62:g,63:m,64:y,65:v,75:b,76:w,78:x,82:T,83:C,86:S,100:E,102:k,103:A},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(I,[2,5],{8:[1,48]}),{8:[1,49]},t(L,[2,19],{22:[1,50]}),t(L,[2,21]),t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),t(L,[2,26]),t(L,[2,27]),t(L,[2,28]),t(L,[2,29]),t(L,[2,30]),{34:[1,51]},{36:[1,52]},t(L,[2,33]),t(L,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:R,69:O,70:M,71:P,72:z,73:D,74:B}),{39:[1,65]},t(W,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(L,[2,65]),t(L,[2,66]),{16:69,60:p,86:S,100:E,102:k},{16:39,17:40,19:70,60:p,86:S,100:E,102:k,103:A},{16:39,17:40,19:71,60:p,86:S,100:E,102:k,103:A},{16:39,17:40,19:72,60:p,86:S,100:E,102:k,103:A},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:S,100:E,102:k,103:A},{13:U,55:76},{58:78,60:[1,79]},t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(j,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:S,100:E,102:k,103:A}),t(j,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:S,100:E,102:k,103:A},{16:39,17:40,19:87,60:p,86:S,100:E,102:k,103:A},t(V,[2,133]),t(V,[2,134]),t(V,[2,135]),t(V,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(I,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:e,35:r,37:n,42:a,46:i,48:s,51:o,52:u,54:h,56:d,57:f,60:p,62:g,63:m,64:y,65:v,75:b,76:w,78:x,82:T,83:C,86:S,100:E,102:k,103:A}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:r,37:n,38:22,42:a,43:23,46:i,48:s,51:o,52:u,54:h,56:d,57:f,60:p,62:g,63:m,64:y,65:v,75:b,76:w,78:x,82:T,83:C,86:S,100:E,102:k,103:A},t(L,[2,20]),t(L,[2,31]),t(L,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:S,100:E,102:k,103:A},{53:92,66:56,67:57,68:R,69:O,70:M,71:P,72:z,73:D,74:B},t(L,[2,64]),{67:93,73:D,74:B},t(Y,[2,83],{66:94,68:R,69:O,70:M,71:P,72:z}),t(H,[2,84]),t(H,[2,85]),t(H,[2,86]),t(H,[2,87]),t(H,[2,88]),t(q,[2,89]),t(q,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:h,56:d},{16:100,60:p,86:S,100:E,102:k},{41:[1,102],45:101,51:Z},{16:104,60:p,86:S,100:E,102:k},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:K,50:re,59:110,60:Q,82:te,84:111,85:112,86:ee,87:J,88:ae,89:se,90:fe},{60:[1,122]},{13:U,55:123},t(W,[2,72]),t(W,[2,138]),{22:K,50:re,59:124,60:Q,61:[1,125],82:te,84:111,85:112,86:ee,87:J,88:ae,89:se,90:fe},t(ve,[2,74]),{16:39,17:40,19:126,60:p,86:S,100:E,102:k,103:A},t(j,[2,16]),t(j,[2,17]),t(j,[2,18]),{11:127,12:de,39:[2,36]},t(Ee,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:S,100:E,102:k,103:A}),t(Ee,[2,10]),t(Ce,[2,55],{11:131,12:de}),t(I,[2,7]),{9:[1,132]},t(De,[2,67]),{16:39,17:40,19:133,60:p,86:S,100:E,102:k,103:A},{13:[1,135],16:39,17:40,19:134,60:p,86:S,100:E,102:k,103:A},t(Y,[2,82],{66:136,68:R,69:O,70:M,71:P,72:z}),t(Y,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:h,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(W,[2,48],{39:[1,142]}),{41:[1,143]},t(W,[2,50]),{41:[2,61],45:144,51:Z},{47:[1,145]},{16:39,17:40,19:146,60:p,86:S,100:E,102:k,103:A},t(L,[2,91],{13:[1,147]}),t(L,[2,93],{13:[1,149],77:[1,148]}),t(L,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(L,[2,105],{61:ce}),t(Ie,[2,107],{85:154,22:K,50:re,60:Q,82:te,86:ee,87:J,88:ae,89:se,90:fe}),t(ye,[2,109]),t(ye,[2,111]),t(ye,[2,112]),t(ye,[2,113]),t(ye,[2,114]),t(ye,[2,115]),t(ye,[2,116]),t(ye,[2,117]),t(ye,[2,118]),t(ye,[2,119]),t(L,[2,106]),t(W,[2,71]),t(L,[2,73],{61:ce}),{60:[1,155]},t(j,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:S,100:E,102:k,103:A},t(Ee,[2,12]),t(Ce,[2,56]),{1:[2,4]},t(De,[2,69]),t(De,[2,68]),{16:39,17:40,19:158,60:p,86:S,100:E,102:k,103:A},t(Y,[2,80]),t(W,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:h,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:h,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:h,56:d},{45:163,51:Z},t(W,[2,49]),{41:[2,62]},t(W,[2,52],{39:[1,164]}),t(L,[2,60]),t(L,[2,92]),t(L,[2,94]),t(L,[2,95],{77:[1,165]}),t(L,[2,98]),t(L,[2,99],{13:[1,166]}),t(L,[2,101],{13:[1,168],77:[1,167]}),{22:K,50:re,60:Q,82:te,84:169,85:112,86:ee,87:J,88:ae,89:se,90:fe},t(ye,[2,110]),t(ve,[2,75]),{14:[1,170]},t(Ee,[2,11]),t(De,[2,70]),t(W,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Z},t(L,[2,96]),t(L,[2,100]),t(L,[2,102]),t(L,[2,103],{77:[1,174]}),t(Ie,[2,108],{85:154,22:K,50:re,60:Q,82:te,86:ee,87:J,88:ae,89:se,90:fe}),t(Ce,[2,8]),t(W,[2,51]),{41:[1,175]},t(W,[2,54]),t(L,[2,104]),t(W,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:_(l(function(We,me){if(me.recoverable)this.trace(We);else{var Se=new Error(We);throw Se.hash=me,Se}},"parseError"),"parseError"),parse:_(l(function(We){var me=this,Se=[0],ne=[],xe=[null],oe=[],_e=this.table,ue="",tt=0,Re=0,et=2,Xe=1,ot=oe.slice.call(arguments,1),Ge=Object.create(this.lexer),ht={yy:{}};for(var Je in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Je)&&(ht.yy[Je]=this.yy[Je]);Ge.setInput(We,ht.yy),ht.yy.lexer=Ge,ht.yy.parser=this,typeof Ge.yylloc=="undefined"&&(Ge.yylloc={});var St=Ge.yylloc;oe.push(St);var He=Ge.options&&Ge.options.ranges;typeof ht.yy.parseError=="function"?this.parseError=ht.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(be){Se.length=Se.length-2*be,xe.length=xe.length-be,oe.length=oe.length-be}l(dt,"popStack"),_(dt,"popStack");function Oe(){var be;return be=ne.pop()||Ge.lex()||Xe,typeof be!="number"&&(be instanceof Array&&(ne=be,be=ne.pop()),be=me.symbols_[be]||be),be}l(Oe,"lex"),_(Oe,"lex");for(var vt,qe,Me,lt,it={},Ue,we,gt,ge;;){if(qe=Se[Se.length-1],this.defaultActions[qe]?Me=this.defaultActions[qe]:((vt===null||typeof vt=="undefined")&&(vt=Oe()),Me=_e[qe]&&_e[qe][vt]),typeof Me=="undefined"||!Me.length||!Me[0]){var ie="";ge=[];for(Ue in _e[qe])this.terminals_[Ue]&&Ue>et&&ge.push("'"+this.terminals_[Ue]+"'");Ge.showPosition?ie="Parse error on line "+(tt+1)+`:
|
||
`+Ge.showPosition()+`
|
||
Expecting `+ge.join(", ")+", got '"+(this.terminals_[vt]||vt)+"'":ie="Parse error on line "+(tt+1)+": Unexpected "+(vt==Xe?"end of input":"'"+(this.terminals_[vt]||vt)+"'"),this.parseError(ie,{text:Ge.match,token:this.terminals_[vt]||vt,line:Ge.yylineno,loc:St,expected:ge})}if(Me[0]instanceof Array&&Me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+qe+", token: "+vt);switch(Me[0]){case 1:Se.push(vt),xe.push(Ge.yytext),oe.push(Ge.yylloc),Se.push(Me[1]),vt=null,Re=Ge.yyleng,ue=Ge.yytext,tt=Ge.yylineno,St=Ge.yylloc;break;case 2:if(we=this.productions_[Me[1]][1],it.$=xe[xe.length-we],it._$={first_line:oe[oe.length-(we||1)].first_line,last_line:oe[oe.length-1].last_line,first_column:oe[oe.length-(we||1)].first_column,last_column:oe[oe.length-1].last_column},He&&(it._$.range=[oe[oe.length-(we||1)].range[0],oe[oe.length-1].range[1]]),lt=this.performAction.apply(it,[ue,Re,tt,ht.yy,Me[1],xe,oe].concat(ot)),typeof lt!="undefined")return lt;we&&(Se=Se.slice(0,-1*we*2),xe=xe.slice(0,-1*we),oe=oe.slice(0,-1*we)),Se.push(this.productions_[Me[1]][0]),xe.push(it.$),oe.push(it._$),gt=_e[Se[Se.length-2]][Se[Se.length-1]],Se.push(gt);break;case 3:return!0}}return!0},"parse"),"parse")},Ae=function(){var ze={EOF:1,parseError:_(l(function(me,Se){if(this.yy.parser)this.yy.parser.parseError(me,Se);else throw new Error(me)},"parseError"),"parseError"),setInput:_(function(We,me){return this.yy=me||this.yy||{},this._input=We,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var We=this._input[0];this.yytext+=We,this.yyleng++,this.offset++,this.match+=We,this.matched+=We;var me=We.match(/(?:\r\n?|\n).*/g);return me?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),We},"input"),unput:_(function(We){var me=We.length,Se=We.split(/(?:\r\n?|\n)/g);this._input=We+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-me),this.offset-=me;var ne=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Se.length-1&&(this.yylineno-=Se.length-1);var xe=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Se?(Se.length===ne.length?this.yylloc.first_column:0)+ne[ne.length-Se.length].length-Se[0].length:this.yylloc.first_column-me},this.options.ranges&&(this.yylloc.range=[xe[0],xe[0]+this.yyleng-me]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(We){this.unput(this.match.slice(We))},"less"),pastInput:_(function(){var We=this.matched.substr(0,this.matched.length-this.match.length);return(We.length>20?"...":"")+We.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var We=this.match;return We.length<20&&(We+=this._input.substr(0,20-We.length)),(We.substr(0,20)+(We.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var We=this.pastInput(),me=new Array(We.length+1).join("-");return We+this.upcomingInput()+`
|
||
`+me+"^"},"showPosition"),test_match:_(function(We,me){var Se,ne,xe;if(this.options.backtrack_lexer&&(xe={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(xe.yylloc.range=this.yylloc.range.slice(0))),ne=We[0].match(/(?:\r\n?|\n).*/g),ne&&(this.yylineno+=ne.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ne?ne[ne.length-1].length-ne[ne.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+We[0].length},this.yytext+=We[0],this.match+=We[0],this.matches=We,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(We[0].length),this.matched+=We[0],Se=this.performAction.call(this,this.yy,this,me,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Se)return Se;if(this._backtrack){for(var oe in xe)this[oe]=xe[oe];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var We,me,Se,ne;this._more||(this.yytext="",this.match="");for(var xe=this._currentRules(),oe=0;oe<xe.length;oe++)if(Se=this._input.match(this.rules[xe[oe]]),Se&&(!me||Se[0].length>me[0].length)){if(me=Se,ne=oe,this.options.backtrack_lexer){if(We=this.test_match(Se,xe[oe]),We!==!1)return We;if(this._backtrack){me=!1;continue}else return!1}else if(!this.options.flex)break}return me?(We=this.test_match(me,xe[ne]),We!==!1?We:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var me=this.next();return me||this.lex()},"lex"),"lex"),begin:_(l(function(me){this.conditionStack.push(me)},"begin"),"begin"),popState:_(l(function(){var me=this.conditionStack.length-1;return me>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(me){return me=this.conditionStack.length-1-Math.abs(me||0),me>=0?this.conditionStack[me]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(me){this.begin(me)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{},performAction:_(l(function(me,Se,ne,xe){switch(ne){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 44:return this.popState(),41;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},"anonymous"),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};return ze}();pe.lexer=Ae;function Ve(){this.yy={}}return l(Ve,"Parser"),_(Ve,"Parser"),Ve.prototype=pe,pe.Parser=Ve,new Ve}();qee.parser=qee;var hHe=qee,dHe=["#","+","~","-",""],fHe=(Jb=class{constructor(e,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";const n=mn(e,ft());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+U0(this.id);this.memberType==="method"&&(e+=`(${U0(this.parameters.trim())})`,this.returnType&&(e+=" : "+U0(this.returnType))),e=e.trim();const r=this.parseClassifier();return{displayText:e,cssStyle:r}}parseMember(e){let r="";if(this.memberType==="method"){const i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(i){const s=i[1]?i[1].trim():"";if(dHe.includes(s)&&(this.visibility=s),this.id=i[2],this.parameters=i[3]?i[3].trim():"",r=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",r===""){const o=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(o)&&(r=o,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const a=e.length,i=e.substring(0,1),s=e.substring(a-1);dHe.includes(i)&&(this.visibility=i),/[$*]/.exec(s)&&(r=s),this.id=e.substring(this.visibility===""?0:1,r===""?a:a-1)}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const n=`${this.visibility?"\\"+this.visibility:""}${U0(this.id)}${this.memberType==="method"?`(${U0(this.parameters)})${this.returnType?" : "+U0(this.returnType):""}`:""}`;this.text=n.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},l(Jb,"ClassMember"),_(Jb,"ClassMember"),Jb),eR="classId-",pHe=0,xy=_(t=>or.sanitizeText(t,ft()),"sanitizeText"),gHe=(d0=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=_(e=>{const r=kj();Yt(e).select("svg").selectAll("g").filter(function(){return Yt(this).attr("title")!==null}).on("mouseover",i=>{const s=Yt(i.currentTarget),o=s.attr("title");if(!o)return;const u=i.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(Zd.sanitize(o)).style("left",`${window.scrollX+u.left+u.width/2}px`).style("top",`${window.scrollY+u.bottom+4}px`),s.classed("hover",!0)}).on("mouseout",i=>{r.transition().duration(500).style("opacity",0),Yt(i.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=Na,this.getAccTitle=za,this.setAccDescription=Ha,this.getAccDescription=Wa,this.setDiagramTitle=Va,this.getDiagramTitle=Ia,this.getConfig=_(()=>ft().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}splitClassNameAndType(e){const r=or.sanitizeText(e,ft());let n="",a=r;if(r.indexOf("~")>0){const i=r.split("~");a=xy(i[0]),n=xy(i[1])}return{className:a,type:n}}setClassLabel(e,r){const n=or.sanitizeText(e,ft());r&&(r=xy(r));const{className:a}=this.splitClassNameAndType(n);this.classes.get(a).label=r,this.classes.get(a).text=`${r}${this.classes.get(a).type?`<${this.classes.get(a).type}>`:""}`}addClass(e){const r=or.sanitizeText(e,ft()),{className:n,type:a}=this.splitClassNameAndType(r);if(this.classes.has(n))return;const i=or.sanitizeText(n,ft());this.classes.set(i,{id:i,type:a,label:i,text:`${i}${a?`<${a}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:eR+i+"-"+pHe}),pHe++}addInterface(e,r){const n={id:`interface${this.interfaces.length}`,label:e,classId:r};this.interfaces.push(n)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){const r=or.sanitizeText(e,ft());if(this.classes.has(r)){const n=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${n}`:n}throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",Ca()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){const r=typeof e=="number"?`note${e}`:e;return this.notes.get(r)}getNotes(){return this.notes}addRelation(e){Le.debug("Adding relation: "+JSON.stringify(e));const r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!r.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!r.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=or.sanitizeText(e.relationTitle1.trim(),ft()),e.relationTitle2=or.sanitizeText(e.relationTitle2.trim(),ft()),this.relations.push(e)}addAnnotation(e,r){const n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(r)}addMember(e,r){this.addClass(e);const n=this.splitClassNameAndType(e).className,a=this.classes.get(n);if(typeof r=="string"){const i=r.trim();i.startsWith("<<")&&i.endsWith(">>")?a.annotations.push(xy(i.substring(2,i.length-2))):i.indexOf(")")>0?a.methods.push(new fHe(i,"method")):i&&a.members.push(new fHe(i,"attribute"))}}addMembers(e,r){Array.isArray(r)&&(r.reverse(),r.forEach(n=>this.addMember(e,n)))}addNote(e,r){const n=this.notes.size,a={id:`note${n}`,class:r,text:e,index:n};return this.notes.set(a.id,a),a.id}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),xy(e.trim())}setCssClass(e,r){e.split(",").forEach(n=>{let a=n;/\d/.exec(n[0])&&(a=eR+a),a=this.splitClassNameAndType(a).className;const i=this.classes.get(a);i&&(i.cssClasses+=" "+r)})}defineClass(e,r){for(const n of e){let a=this.styleClasses.get(n);a===void 0&&(a={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,a)),r&&r.forEach(i=>{if(/color/.exec(i)){const s=i.replace("fill","bgFill");a.textStyles.push(s)}a.styles.push(i)}),this.classes.forEach(i=>{i.cssClasses.includes(n)&&i.styles.push(...r.flatMap(s=>s.split(",")))})}}setTooltip(e,r){e.split(",").forEach(n=>{if(r!==void 0){const a=this.splitClassNameAndType(n).className,i=this.classes.get(a);i&&(i.tooltip=xy(r))}})}getTooltip(e,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,r,n){const a=ft();e.split(",").forEach(i=>{let s=i;/\d/.exec(i[0])&&(s=eR+s),s=this.splitClassNameAndType(s).className;const o=this.classes.get(s);o&&(o.link=Wr.formatUrl(r,a),a.securityLevel==="sandbox"?o.linkTarget="_top":typeof n=="string"?o.linkTarget=xy(n):o.linkTarget="_blank")}),this.setCssClass(e,"clickable")}setClickEvent(e,r,n){e.split(",").forEach(a=>{this.setClickFunc(a,r,n);const i=this.splitClassNameAndType(a).className,s=this.classes.get(i);s&&(s.haveCallback=!0)}),this.setCssClass(e,"clickable")}setClickFunc(e,r,n){const a=or.sanitizeText(e,ft());if(ft().securityLevel!=="loose"||r===void 0)return;const s=this.splitClassNameAndType(a).className;if(this.classes.has(s)){let o=[];if(typeof n=="string"){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u<o.length;u++){let h=o[u].trim();h.startsWith('"')&&h.endsWith('"')&&(h=h.substr(1,h.length-2)),o[u]=h}}o.length===0&&o.push(s),this.functions.push(()=>{const u=this.lookUpDomId(s),h=document.querySelector(`[id="${u}"]`);h!==null&&h.addEventListener("click",()=>{Wr.runFunc(r,...o)},!1)})}}bindFunctions(e){this.functions.forEach(r=>{r(e)})}escapeHtml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,r){const n=r.at(-1);return n?`${n}.${e}`:e}static getAncestorIds(e){const r=e.split("."),n=new Array(r.length);n[0]=r[0];for(let a=1;a<r.length;a++)n[a]=`${n[a-1]}.${r[a]}`;return n}createNamespaceNode(e,r,n,a=!1){return{id:e,label:r,classes:new Map,notes:new Map,children:new Map,domId:eR+e+"-"+this.namespaceCounter++,parent:n,explicit:a}}linkParentChild(e,r){var i;const n=this.namespaces.get(e),a=this.namespaces.get(r);!n||!a||(n.children.has(r)||n.children.set(r,a),(i=a.parent)!=null||(a.parent=e))}addNamespace(e,r){const n=d0.resolveQualifiedId(e,this.namespaceStack);if(this.namespaceStack.push(n),this.namespaces.has(n)){const s=this.namespaces.get(n);return s.explicit=!0,r&&(s.label=r),n}const a=n.split("."),i=d0.getAncestorIds(n);for(let s=0;s<i.length;s++){const o=i[s],u=s>0?i[s-1]:void 0,h=s===i.length-1,d=h&&r?r:a[s];this.namespaces.has(o)?h&&(this.namespaces.get(o).explicit=!0):this.namespaces.set(o,this.createNamespaceNode(o,d,u,h)),u&&this.linkParentChild(u,o)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,r,n){if(this.namespaces.has(e)){for(const a of r){const{className:i}=this.splitClassNameAndType(a),s=this.getClass(i);s.parent=e,this.namespaces.get(e).classes.set(i,s)}for(const a of n){const i=this.getNote(a);i.parent=e,this.namespaces.get(e).notes.set(a,i)}}}setCssStyle(e,r){const n=this.classes.get(e);if(!(!r||!n))for(const a of r)a.includes(",")?n.styles.push(...a.split(",")):n.styles.push(a)}getArrowMarker(e){let r;switch(e){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}resolveExplicitAncestor(e){let r=e;for(;r;){const n=this.namespaces.get(r);if(!n)return;if(n.explicit)return r;r=n.parent}}getData(){var s,o,u,h,d;const e=[],r=[],n=ft(),a=(o=(s=n.class)==null?void 0:s.hierarchicalNamespaces)!=null?o:!0;for(const f of this.namespaces.values()){if(!a&&!f.explicit)continue;const p={id:f.id,label:a?f.label:f.id,isGroup:!0,padding:(u=n.class.padding)!=null?u:16,shape:"rect",cssStyles:[],look:n.look,parentId:a?f.parent:void 0};e.push(p)}for(const f of this.classes.values()){const p=a?f.parent:this.resolveExplicitAncestor(f.parent),g=Ne(X({},f),{type:void 0,isGroup:!1,parentId:p,look:n.look});e.push(g)}for(const f of this.notes.values()){const p=a?f.parent:this.resolveExplicitAncestor(f.parent),g={id:f.id,label:f.text,isGroup:!1,shape:"note",padding:(h=n.class.padding)!=null?h:6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:p,labelType:"markdown"};e.push(g);const m=(d=this.classes.get(f.class))==null?void 0:d.id;if(m){const y={id:`edgeNote${f.index}`,start:f.id,end:m,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(y)}}for(const f of this.interfaces){const p={id:f.id,label:f.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};e.push(p)}let i=0;for(const f of this.relations){i++;const p={id:Bw(f.id1,f.id2,{prefix:"id",counter:i}),start:f.id1,end:f.id2,type:"normal",label:f.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(f.relation.type1),arrowTypeEnd:this.getArrowMarker(f.relation.type2),startLabelRight:f.relationTitle1==="none"?"":f.relationTitle1,endLabelLeft:f.relationTitle2==="none"?"":f.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:f.style||"",pattern:f.relation.lineType==1?"dashed":"solid",look:n.look,labelType:"markdown"};r.push(p)}return{nodes:e,edges:r,other:{},config:n,direction:this.getDirection()}}},l(d0,"_ClassDB"),_(d0,"ClassDB"),d0),Wfr=_(t=>`g.classGroup text {
|
||
fill: ${t.nodeBorder||t.classText};
|
||
stroke: none;
|
||
font-family: ${t.fontFamily};
|
||
font-size: 10px;
|
||
|
||
.title {
|
||
font-weight: bolder;
|
||
}
|
||
|
||
}
|
||
|
||
.cluster-label text {
|
||
fill: ${t.titleColor};
|
||
}
|
||
.cluster-label span {
|
||
color: ${t.titleColor};
|
||
}
|
||
.cluster-label span p {
|
||
background-color: transparent;
|
||
}
|
||
|
||
.cluster rect {
|
||
fill: ${t.clusterBkg};
|
||
stroke: ${t.clusterBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.cluster text {
|
||
fill: ${t.titleColor};
|
||
}
|
||
|
||
.cluster span {
|
||
color: ${t.titleColor};
|
||
}
|
||
|
||
.nodeLabel, .edgeLabel {
|
||
color: ${t.classText};
|
||
}
|
||
|
||
.noteLabel .nodeLabel, .noteLabel .edgeLabel {
|
||
color: ${t.noteTextColor};
|
||
}
|
||
.edgeLabel .label rect {
|
||
fill: ${t.mainBkg};
|
||
}
|
||
.label text {
|
||
fill: ${t.classText};
|
||
}
|
||
|
||
.labelBkg {
|
||
background: ${t.mainBkg};
|
||
}
|
||
.edgeLabel .label span {
|
||
background: ${t.mainBkg};
|
||
}
|
||
|
||
.classTitle {
|
||
font-weight: bolder;
|
||
}
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon,
|
||
.node path {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: ${t.strokeWidth};
|
||
}
|
||
|
||
|
||
.divider {
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: 1;
|
||
}
|
||
|
||
g.clickable {
|
||
cursor: pointer;
|
||
}
|
||
|
||
g.classGroup rect {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.nodeBorder};
|
||
}
|
||
|
||
g.classGroup line {
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: 1;
|
||
}
|
||
|
||
.classLabel .box {
|
||
stroke: none;
|
||
stroke-width: 0;
|
||
fill: ${t.mainBkg};
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.classLabel .label {
|
||
fill: ${t.nodeBorder};
|
||
font-size: 10px;
|
||
}
|
||
|
||
.relation {
|
||
stroke: ${t.lineColor};
|
||
stroke-width: ${t.strokeWidth};
|
||
fill: none;
|
||
}
|
||
|
||
.dashed-line{
|
||
stroke-dasharray: 3;
|
||
}
|
||
|
||
.dotted-line{
|
||
stroke-dasharray: 1 2;
|
||
}
|
||
|
||
[id$="-compositionStart"], .composition {
|
||
fill: ${t.lineColor} !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-compositionEnd"], .composition {
|
||
fill: ${t.lineColor} !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-dependencyStart"], .dependency {
|
||
fill: ${t.lineColor} !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-dependencyEnd"], .dependency {
|
||
fill: ${t.lineColor} !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-extensionStart"], .extension {
|
||
fill: transparent !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-extensionEnd"], .extension {
|
||
fill: transparent !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-aggregationStart"], .aggregation {
|
||
fill: transparent !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-aggregationEnd"], .aggregation {
|
||
fill: transparent !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-lollipopStart"], .lollipop {
|
||
fill: ${t.mainBkg} !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
[id$="-lollipopEnd"], .lollipop {
|
||
fill: ${t.mainBkg} !important;
|
||
stroke: ${t.lineColor} !important;
|
||
stroke-width: 1;
|
||
}
|
||
|
||
.edgeTerminals {
|
||
font-size: 11px;
|
||
line-height: initial;
|
||
}
|
||
|
||
.classTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
|
||
.edgeLabel[data-look="neo"] {
|
||
background-color: ${t.edgeLabelBackground};
|
||
p {
|
||
background-color: ${t.edgeLabelBackground};
|
||
}
|
||
rect {
|
||
opacity: 0.5;
|
||
background-color: ${t.edgeLabelBackground};
|
||
fill: ${t.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
${F5()}
|
||
`,"getStyles"),mHe=Wfr,Vfr=_((t,e="TB")=>{if(!t.doc)return e;let r=e;for(const n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Gfr=_(function(t,e){return e.db.getClasses()},"getClasses"),qfr=_(function(t,e,r,n){return nt(this,null,function*(){var d,f;Le.info("REF0:"),Le.info("Drawing class diagram (v3)",e);const{securityLevel:a,state:i,layout:s}=ft();n.db.setDiagramId(e);const o=n.db.getData(),u=jT(e,a);o.type=n.type,o.layoutAlgorithm=k3(s),o.nodeSpacing=(i==null?void 0:i.nodeSpacing)||50,o.rankSpacing=(i==null?void 0:i.rankSpacing)||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,yield Uw(o,u);const h=8;Wr.insertTitle(u,"classDiagramTitleText",(d=i==null?void 0:i.titleTopMargin)!=null?d:25,n.db.getDiagramTitle()),c1(u,h,"classDiagram",(f=i==null?void 0:i.useMaxWidth)!=null?f:!0)})},"draw"),yHe={getClasses:Gfr,draw:qfr,getDir:Vfr},Yfr={parser:hHe,get db(){return new gHe},renderer:yHe,styles:mHe,init:_(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")},Ufr=Object.freeze({__proto__:null,diagram:Yfr}),jfr={parser:hHe,get db(){return new gHe},renderer:yHe,styles:mHe,init:_(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")},Kfr=Object.freeze({__proto__:null,diagram:jfr}),Yee=function(){var t=_(function(W,U,j,V){for(j=j||{},V=W.length;V--;j[W[V]]=U);return j},"o"),e=[1,2],r=[1,3],n=[1,4],a=[2,4],i=[1,9],s=[1,11],o=[1,16],u=[1,17],h=[1,18],d=[1,19],f=[1,33],p=[1,20],g=[1,21],m=[1,22],y=[1,23],v=[1,24],b=[1,26],w=[1,27],x=[1,28],T=[1,29],C=[1,30],S=[1,31],E=[1,32],k=[1,35],A=[1,36],I=[1,37],L=[1,38],R=[1,34],O=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],M=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],P=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],z={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:_(l(function(U,j,V,Y,H,q,Z){var K=q.length-1;switch(H){case 3:return Y.setRootDoc(q[K]),q[K];case 4:this.$=[];break;case 5:q[K]!="nl"&&(q[K-1].push(q[K]),this.$=q[K-1]);break;case 6:case 7:this.$=q[K];break;case 8:this.$="nl";break;case 12:this.$=q[K];break;case 13:const ee=q[K-1];ee.description=Y.trimColon(q[K]),this.$=ee;break;case 14:this.$={stmt:"relation",state1:q[K-2],state2:q[K]};break;case 15:const J=Y.trimColon(q[K]);this.$={stmt:"relation",state1:q[K-3],state2:q[K-1],description:J};break;case 19:this.$={stmt:"state",id:q[K-3],type:"default",description:"",doc:q[K-1]};break;case 20:var re=q[K],Q=q[K-2].trim();if(q[K].match(":")){var te=q[K].split(":");re=te[0],Q=[Q,te[1]]}this.$={stmt:"state",id:re,type:"default",description:Q};break;case 21:this.$={stmt:"state",id:q[K-3],type:"default",description:q[K-5],doc:q[K-1]};break;case 22:this.$={stmt:"state",id:q[K],type:"fork"};break;case 23:this.$={stmt:"state",id:q[K],type:"join"};break;case 24:this.$={stmt:"state",id:q[K],type:"choice"};break;case 25:this.$={stmt:"state",id:Y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:q[K-1].trim(),note:{position:q[K-2].trim(),text:q[K].trim()}};break;case 29:this.$=q[K].trim(),Y.setAccTitle(this.$);break;case 30:case 31:this.$=q[K].trim(),Y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:q[K-3],url:q[K-2],tooltip:q[K-1]};break;case 33:this.$={stmt:"click",id:q[K-3],url:q[K-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:q[K-1].trim(),classes:q[K].trim()};break;case 36:this.$={stmt:"style",id:q[K-1].trim(),styleClass:q[K].trim()};break;case 37:this.$={stmt:"applyClass",id:q[K-1].trim(),styleClass:q[K].trim()};break;case 38:Y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:Y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:Y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:Y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:q[K].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:q[K-2].trim(),classes:[q[K].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:q[K-2].trim(),classes:[q[K].trim()],type:"default",description:""};break}},"anonymous"),"anonymous"),table:[{3:1,4:e,5:r,6:n},{1:[3]},{3:5,4:e,5:r,6:n},{3:6,4:e,5:r,6:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:u,19:h,22:d,24:f,25:p,26:g,27:m,28:y,29:v,32:25,33:b,35:w,37:x,38:T,41:C,45:S,48:E,51:k,52:A,53:I,54:L,57:R},t(O,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:o,17:u,19:h,22:d,24:f,25:p,26:g,27:m,28:y,29:v,32:25,33:b,35:w,37:x,38:T,41:C,45:S,48:E,51:k,52:A,53:I,54:L,57:R},t(O,[2,7]),t(O,[2,8]),t(O,[2,9]),t(O,[2,10]),t(O,[2,11]),t(O,[2,12],{14:[1,40],15:[1,41]}),t(O,[2,16]),{18:[1,42]},t(O,[2,18],{20:[1,43]}),{23:[1,44]},t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(O,[2,28]),{34:[1,49]},{36:[1,50]},t(O,[2,31]),{13:51,24:f,57:R},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(M,[2,44],{58:[1,56]}),t(M,[2,45],{58:[1,57]}),t(O,[2,38]),t(O,[2,39]),t(O,[2,40]),t(O,[2,41]),t(O,[2,6]),t(O,[2,13]),{13:58,24:f,57:R},t(O,[2,17]),t(P,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(O,[2,29]),t(O,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(O,[2,14],{14:[1,71]}),{4:i,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:u,19:h,21:[1,72],22:d,24:f,25:p,26:g,27:m,28:y,29:v,32:25,33:b,35:w,37:x,38:T,41:C,45:S,48:E,51:k,52:A,53:I,54:L,57:R},t(O,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(O,[2,34]),t(O,[2,35]),t(O,[2,36]),t(O,[2,37]),t(M,[2,46]),t(M,[2,47]),t(O,[2,15]),t(O,[2,19]),t(P,a,{7:78}),t(O,[2,26]),t(O,[2,27]),{5:[1,79]},{5:[1,80]},{4:i,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:o,17:u,19:h,21:[1,81],22:d,24:f,25:p,26:g,27:m,28:y,29:v,32:25,33:b,35:w,37:x,38:T,41:C,45:S,48:E,51:k,52:A,53:I,54:L,57:R},t(O,[2,32]),t(O,[2,33]),t(O,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:_(l(function(U,j){if(j.recoverable)this.trace(U);else{var V=new Error(U);throw V.hash=j,V}},"parseError"),"parseError"),parse:_(l(function(U){var j=this,V=[0],Y=[],H=[null],q=[],Z=this.table,K="",re=0,Q=0,te=2,ee=1,J=q.slice.call(arguments,1),ae=Object.create(this.lexer),se={yy:{}};for(var fe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,fe)&&(se.yy[fe]=this.yy[fe]);ae.setInput(U,se.yy),se.yy.lexer=ae,se.yy.parser=this,typeof ae.yylloc=="undefined"&&(ae.yylloc={});var ve=ae.yylloc;q.push(ve);var de=ae.options&&ae.options.ranges;typeof se.yy.parseError=="function"?this.parseError=se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ee(Se){V.length=V.length-2*Se,H.length=H.length-Se,q.length=q.length-Se}l(Ee,"popStack"),_(Ee,"popStack");function Ce(){var Se;return Se=Y.pop()||ae.lex()||ee,typeof Se!="number"&&(Se instanceof Array&&(Y=Se,Se=Y.pop()),Se=j.symbols_[Se]||Se),Se}l(Ce,"lex"),_(Ce,"lex");for(var De,ce,Ie,ye,pe={},Ae,Ve,ze,We;;){if(ce=V[V.length-1],this.defaultActions[ce]?Ie=this.defaultActions[ce]:((De===null||typeof De=="undefined")&&(De=Ce()),Ie=Z[ce]&&Z[ce][De]),typeof Ie=="undefined"||!Ie.length||!Ie[0]){var me="";We=[];for(Ae in Z[ce])this.terminals_[Ae]&&Ae>te&&We.push("'"+this.terminals_[Ae]+"'");ae.showPosition?me="Parse error on line "+(re+1)+`:
|
||
`+ae.showPosition()+`
|
||
Expecting `+We.join(", ")+", got '"+(this.terminals_[De]||De)+"'":me="Parse error on line "+(re+1)+": Unexpected "+(De==ee?"end of input":"'"+(this.terminals_[De]||De)+"'"),this.parseError(me,{text:ae.match,token:this.terminals_[De]||De,line:ae.yylineno,loc:ve,expected:We})}if(Ie[0]instanceof Array&&Ie.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ce+", token: "+De);switch(Ie[0]){case 1:V.push(De),H.push(ae.yytext),q.push(ae.yylloc),V.push(Ie[1]),De=null,Q=ae.yyleng,K=ae.yytext,re=ae.yylineno,ve=ae.yylloc;break;case 2:if(Ve=this.productions_[Ie[1]][1],pe.$=H[H.length-Ve],pe._$={first_line:q[q.length-(Ve||1)].first_line,last_line:q[q.length-1].last_line,first_column:q[q.length-(Ve||1)].first_column,last_column:q[q.length-1].last_column},de&&(pe._$.range=[q[q.length-(Ve||1)].range[0],q[q.length-1].range[1]]),ye=this.performAction.apply(pe,[K,Q,re,se.yy,Ie[1],H,q].concat(J)),typeof ye!="undefined")return ye;Ve&&(V=V.slice(0,-1*Ve*2),H=H.slice(0,-1*Ve),q=q.slice(0,-1*Ve)),V.push(this.productions_[Ie[1]][0]),H.push(pe.$),q.push(pe._$),ze=Z[V[V.length-2]][V[V.length-1]],V.push(ze);break;case 3:return!0}}return!0},"parse"),"parse")},D=function(){var W={EOF:1,parseError:_(l(function(j,V){if(this.yy.parser)this.yy.parser.parseError(j,V);else throw new Error(j)},"parseError"),"parseError"),setInput:_(function(U,j){return this.yy=j||this.yy||{},this._input=U,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var U=this._input[0];this.yytext+=U,this.yyleng++,this.offset++,this.match+=U,this.matched+=U;var j=U.match(/(?:\r\n?|\n).*/g);return j?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),U},"input"),unput:_(function(U){var j=U.length,V=U.split(/(?:\r\n?|\n)/g);this._input=U+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-j),this.offset-=j;var Y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),V.length-1&&(this.yylineno-=V.length-1);var H=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:V?(V.length===Y.length?this.yylloc.first_column:0)+Y[Y.length-V.length].length-V[0].length:this.yylloc.first_column-j},this.options.ranges&&(this.yylloc.range=[H[0],H[0]+this.yyleng-j]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(U){this.unput(this.match.slice(U))},"less"),pastInput:_(function(){var U=this.matched.substr(0,this.matched.length-this.match.length);return(U.length>20?"...":"")+U.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var U=this.match;return U.length<20&&(U+=this._input.substr(0,20-U.length)),(U.substr(0,20)+(U.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var U=this.pastInput(),j=new Array(U.length+1).join("-");return U+this.upcomingInput()+`
|
||
`+j+"^"},"showPosition"),test_match:_(function(U,j){var V,Y,H;if(this.options.backtrack_lexer&&(H={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(H.yylloc.range=this.yylloc.range.slice(0))),Y=U[0].match(/(?:\r\n?|\n).*/g),Y&&(this.yylineno+=Y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Y?Y[Y.length-1].length-Y[Y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+U[0].length},this.yytext+=U[0],this.match+=U[0],this.matches=U,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(U[0].length),this.matched+=U[0],V=this.performAction.call(this,this.yy,this,j,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),V)return V;if(this._backtrack){for(var q in H)this[q]=H[q];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var U,j,V,Y;this._more||(this.yytext="",this.match="");for(var H=this._currentRules(),q=0;q<H.length;q++)if(V=this._input.match(this.rules[H[q]]),V&&(!j||V[0].length>j[0].length)){if(j=V,Y=q,this.options.backtrack_lexer){if(U=this.test_match(V,H[q]),U!==!1)return U;if(this._backtrack){j=!1;continue}else return!1}else if(!this.options.flex)break}return j?(U=this.test_match(j,H[Y]),U!==!1?U:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var j=this.next();return j||this.lex()},"lex"),"lex"),begin:_(l(function(j){this.conditionStack.push(j)},"begin"),"begin"),popState:_(l(function(){var j=this.conditionStack.length-1;return j>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(j){return j=this.conditionStack.length-1-Math.abs(j||0),j>=0?this.conditionStack[j]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(j){this.begin(j)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(j,V,Y,H){function q(){const Z=V.yytext.indexOf("%%");if(Z===0)return!1;if(Z>0){const K=V.yytext.slice(0,Z),re=V.yytext.slice(Z);re&&j.lexer.unput(re),V.yytext=K}return!0}switch(l(q,"processId"),_(q,"processId"),Y){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 33:return this.pushState("SCALE"),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),V.yytext=V.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),V.yytext=V.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),V.yytext=V.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),V.yytext=V.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),V.yytext=V.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),V.yytext=V.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:return q()?(this.popState(),"ID"):void 0;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+V.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:return this.popState(),21;case 57:break;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 63:break;case 64:return"NOTE_TEXT";case 65:return q()?(this.popState(),"ID"):void 0;case 66:return q()?(this.popState(),this.pushState("NOTE_TEXT"),24):void 0;case 67:return this.popState(),V.yytext=V.yytext.substr(2).trim(),31;case 68:return this.popState(),V.yytext=V.yytext.slice(0,-8).trim(),31;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return q()?24:void 0;case 74:return V.yytext=V.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return W}();z.lexer=D;function B(){this.yy={}}return l(B,"Parser"),_(B,"Parser"),B.prototype=z,z.Parser=B,new B}();Yee.parser=Yee;var vHe=Yee,Xfr="TB",bHe="TB",xHe="dir",aC="state",iC="root",Uee="relation",Zfr="classDef",Qfr="style",Jfr="applyClass",bk="default",wHe="divider",THe="fill:none",EHe="fill: #333",CHe="c",SHe="markdown",_He="normal",jee="rect",Kee="rectWithTitle",e0r="stateStart",t0r="stateEnd",kHe="divider",AHe="roundedWithTitle",r0r="note",n0r="noteGroup",xk="statediagram",a0r="state",i0r=`${xk}-${a0r}`,NHe="transition",s0r="note",o0r="note-edge",l0r=`${NHe} ${o0r}`,c0r=`${xk}-${s0r}`,u0r="cluster",h0r=`${xk}-${u0r}`,d0r="cluster-alt",f0r=`${xk}-${d0r}`,IHe="parent",LHe="note",p0r="state",Xee="----",g0r=`${Xee}${LHe}`,$He=`${Xee}${IHe}`,MHe=_((t,e=bHe)=>{if(!t.doc)return e;let r=e;for(const n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),m0r=_(function(t,e){return e.db.getClasses()},"getClasses"),y0r=_(function(t,e,r,n){return nt(this,null,function*(){var f,p;Le.info("REF0:"),Le.info("Drawing state diagram (v2)",e);const{securityLevel:a,state:i,layout:s}=ft();n.db.extract(n.db.getRootDocV2());const o=n.db.getData(),u=jT(e,a);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=(i==null?void 0:i.nodeSpacing)||50,o.rankSpacing=(i==null?void 0:i.rankSpacing)||50,ft().look==="neo"?o.markers=["barbNeo"]:o.markers=["barb"],o.diagramId=e,yield Uw(o,u);const d=8;try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map).forEach((m,y)=>{var E;const v=typeof y=="string"?y:typeof(y==null?void 0:y.id)=="string"?y.id:"",b=o.nodes.find(k=>k.id===v);if(!v){Le.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(y));return}const w=(E=u.node())==null?void 0:E.querySelectorAll("g.node, g.rough-node");let x;if(w==null||w.forEach(k=>{var I;const A=(I=k.textContent)==null?void 0:I.trim();(k.id===(b==null?void 0:b.domId)||A===v)&&(x=k)}),!x){Le.warn("⚠️ Could not find node matching text:",v);return}const T=x.parentNode;if(!T){Le.warn("⚠️ Node has no parent, cannot wrap:",v);return}const C=document.createElementNS("http://www.w3.org/2000/svg","a"),S=m.url.replace(/^"+|"+$/g,"");if(C.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",S),C.setAttribute("target","_blank"),m.tooltip){const k=m.tooltip.replace(/^"+|"+$/g,"");C.setAttribute("title",k),x.setAttribute("title",k)}T.replaceChild(C,x),C.appendChild(x),Le.info("🔗 Wrapped node in <a> tag for:",v,m.url)})}catch(g){Le.error("❌ Error injecting clickable links:",g)}Wr.insertTitle(u,"statediagramTitleText",(f=i==null?void 0:i.titleTopMargin)!=null?f:25,n.db.getDiagramTitle()),c1(u,d,xk,(p=i==null?void 0:i.useMaxWidth)!=null?p:!0)})},"draw"),v0r={getClasses:m0r,draw:y0r,getDir:MHe},tR=new Map,ag=0;function rR(t="",e=0,r="",n=Xee){const a=r!==null&&r.length>0?`${n}${r}`:"";return`${p0r}-${t}${a}-${e}`}l(rR,"stateDomId"),_(rR,"stateDomId");var b0r=_((t,e,r,n,a,i,s,o)=>{Le.trace("items",e),e.forEach(u=>{var h;switch(u.stmt){case aC:Tk(t,u,r,n,a,i,s,o);break;case bk:Tk(t,u,r,n,a,i,s,o);break;case Uee:{Tk(t,u.state1,r,n,a,i,s,o),Tk(t,u.state2,r,n,a,i,s,o);const d=s==="neo",f={id:"edge"+ag,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:d?"arrow_barb_neo":"arrow_barb",style:THe,labelStyle:"",label:or.sanitizeText((h=u.description)!=null?h:"",ft()),arrowheadStyle:EHe,labelpos:CHe,labelType:SHe,thickness:_He,classes:NHe,look:s};a.push(f),ag++}break}})},"setupDoc"),PHe=_((t,e=bHe)=>{let r=e;if(t.doc)for(const n of t.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");function wk(t,e,r){if(!e.id||e.id==="</join></fork>"||e.id==="</choice>")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(a=>{var s;const i=r.get(a);i&&(e.cssCompiledStyles=[...(s=e.cssCompiledStyles)!=null?s:[],...i.styles])}));const n=t.find(a=>a.id===e.id);n?Object.assign(n,e):t.push(e)}l(wk,"insertOrUpdateNode"),_(wk,"insertOrUpdateNode");function RHe(t){var e,r;return(r=(e=t==null?void 0:t.classes)==null?void 0:e.join(" "))!=null?r:""}l(RHe,"getClassesFromDbInfo"),_(RHe,"getClassesFromDbInfo");function OHe(t){var e;return(e=t==null?void 0:t.styles)!=null?e:[]}l(OHe,"getStylesFromDbInfo"),_(OHe,"getStylesFromDbInfo");var Tk=_((t,e,r,n,a,i,s,o)=>{var g,m,y;const u=e.id,h=r.get(u),d=RHe(h),f=OHe(h),p=ft();if(Le.info("dataFetcher parsedItem",e,h,f),u!=="root"){let v=jee;e.start===!0?v=e0r:e.start===!1&&(v=t0r),e.type!==bk&&(v=e.type),tR.get(u)||tR.set(u,{id:u,shape:v,description:or.sanitizeText(u,p),cssClasses:`${d} ${i0r}`,cssStyles:f});const b=tR.get(u);e.description&&(Array.isArray(b.description)?(b.shape=Kee,b.description.push(e.description)):(g=b.description)!=null&&g.length&&b.description.length>0?(b.shape=Kee,b.description===u?b.description=[e.description]:b.description=[b.description,e.description]):(b.shape=jee,b.description=e.description),b.description=or.sanitizeTextOrArray(b.description,p)),((m=b.description)==null?void 0:m.length)===1&&b.shape===Kee&&(b.type==="group"?b.shape=AHe:b.shape=jee),!b.type&&e.doc&&(Le.info("Setting cluster for XCX",u,PHe(e)),b.type="group",b.isGroup=!0,b.dir=PHe(e),b.explicitDir=e.doc.some(x=>x.stmt==="dir"),b.shape=e.type===wHe?kHe:AHe,b.cssClasses=`${b.cssClasses} ${h0r} ${i?f0r:""}`);const w={labelStyle:"",shape:b.shape,label:b.description,cssClasses:b.cssClasses,cssCompiledStyles:[],cssStyles:b.cssStyles,id:u,dir:b.dir,domId:rR(u,ag),type:b.type,isGroup:b.type==="group",padding:8,rx:10,ry:10,look:s,labelType:"markdown"};if(w.shape===kHe&&(w.label=""),t&&t.id!=="root"&&(Le.trace("Setting node ",u," to be child of its parent ",t.id),w.parentId=t.id),w.centerLabel=!0,e.note){const x={labelStyle:"",shape:r0r,label:e.note.text,labelType:"markdown",cssClasses:c0r,cssStyles:[],cssCompiledStyles:[],id:u+g0r+"-"+ag,domId:rR(u,ag,LHe),type:b.type,isGroup:b.type==="group",padding:(y=p.flowchart)==null?void 0:y.padding,look:s,position:e.note.position},T=u+$He,C={labelStyle:"",shape:n0r,label:e.note.text,cssClasses:b.cssClasses,cssStyles:[],id:u+$He,domId:rR(u,ag,IHe),type:"group",isGroup:!0,padding:16,look:s,position:e.note.position};ag++,C.id=T,x.parentId=T,wk(n,C,o),wk(n,x,o),wk(n,w,o);let S=u,E=x.id;e.note.position==="left of"&&(S=x.id,E=u),a.push({id:S+"-"+E,start:S,end:E,arrowhead:"none",arrowTypeEnd:"",style:THe,labelStyle:"",classes:l0r,arrowheadStyle:EHe,labelpos:CHe,labelType:SHe,thickness:_He,look:s})}else wk(n,w,o)}e.doc&&(Le.trace("Adding nodes children "),b0r(e,e.doc,r,n,a,!i,s,o))},"dataFetcher"),x0r=_(()=>{tR.clear(),ag=0},"reset"),Cl={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},DHe=_(()=>new Map,"newClassesList"),FHe=_(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),nR=_(t=>JSON.parse(JSON.stringify(t)),"clone"),wy=(mg=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=DHe(),this.documents={root:FHe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=za,this.setAccTitle=Na,this.getAccDescription=Wa,this.setAccDescription=Ha,this.setDiagramTitle=Va,this.getDiagramTitle=Ia,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}extract(e){this.clear(!0);for(const a of Array.isArray(e)?e:e.doc)switch(a.stmt){case aC:this.addState(a.id.trim(),a.type,a.doc,a.description,a.note);break;case Uee:this.addRelation(a.state1,a.state2,a.description);break;case Zfr:this.addStyleClass(a.id.trim(),a.classes);break;case Qfr:this.handleStyleDef(a);break;case Jfr:this.setCssClass(a.id.trim(),a.styleClass);break;case"click":this.addLink(a.id,a.url,a.tooltip);break}const r=this.getStates(),n=ft();x0r(),Tk(void 0,this.getRootDocV2(),r,this.nodes,this.edges,!0,n.look,this.classes);for(const a of this.nodes)if(Array.isArray(a.label)){if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(e){const r=e.id.trim().split(","),n=e.styleClass.split(",");for(const a of r){let i=this.getState(a);if(!i){const s=a.trim();this.addState(s),i=this.getState(s)}i&&(i.styles=n.map(s=>{var o;return(o=s.replace(/;/g,""))==null?void 0:o.trim()}))}}setRootDoc(e){Le.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,r,n){if(r.stmt===Uee){this.docTranslator(e,r.state1,!0),this.docTranslator(e,r.state2,!1);return}if(r.stmt===aC&&(r.id===Cl.START_NODE?(r.id=e.id+(n?"_start":"_end"),r.start=n):r.id=r.id.trim()),r.stmt!==iC&&r.stmt!==aC||!r.doc)return;const a=[];let i=[];for(const s of r.doc)if(s.type===wHe){const o=nR(s);o.doc=nR(i),a.push(o),i=[]}else i.push(s);if(a.length>0&&i.length>0){const s={stmt:aC,id:L2e(),type:"divider",doc:nR(i)};a.push(nR(s)),r.doc=a}r.doc.forEach(s=>this.docTranslator(r,s,!0))}getRootDocV2(){return this.docTranslator({id:iC,stmt:iC},{id:iC,stmt:iC,doc:this.rootDoc},!0),{id:iC,doc:this.rootDoc}}addState(e,r=bk,n=void 0,a=void 0,i=void 0,s=void 0,o=void 0,u=void 0){const h=e==null?void 0:e.trim();if(!this.currentDocument.states.has(h))Le.info("Adding state ",h,a),this.currentDocument.states.set(h,{stmt:aC,id:h,descriptions:[],type:r,doc:n,note:i,classes:[],styles:[],textStyles:[]});else{const d=this.currentDocument.states.get(h);if(!d)throw new Error(`State not found: ${h}`);d.doc||(d.doc=n),d.type||(d.type=r)}if(a&&(Le.info("Setting state description",h,a),(Array.isArray(a)?a:[a]).forEach(f=>this.addDescription(h,f.trim()))),i){const d=this.currentDocument.states.get(h);if(!d)throw new Error(`State not found: ${h}`);d.note=i,d.note.text=or.sanitizeText(d.note.text,ft())}s&&(Le.info("Setting state classes",h,s),(Array.isArray(s)?s:[s]).forEach(f=>this.setCssClass(h,f.trim()))),o&&(Le.info("Setting state styles",h,o),(Array.isArray(o)?o:[o]).forEach(f=>this.setStyle(h,f.trim()))),u&&(Le.info("Setting state styles",h,o),(Array.isArray(u)?u:[u]).forEach(f=>this.setTextStyle(h,f.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:FHe()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=DHe(),e||(this.links=new Map,Ca())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){Le.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,r,n){this.links.set(e,{url:r,tooltip:n}),Le.warn("Adding link",e,r,n)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===Cl.START_NODE?(this.startEndCount++,`${Cl.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",r=bk){return e===Cl.START_NODE?Cl.START_TYPE:r}endIdIfNeeded(e=""){return e===Cl.END_NODE?(this.startEndCount++,`${Cl.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",r=bk){return e===Cl.END_NODE?Cl.END_TYPE:r}addRelationObjs(e,r,n=""){const a=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),s=this.startIdIfNeeded(r.id.trim()),o=this.startTypeIfNeeded(r.id.trim(),r.type);this.addState(a,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(s,o,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles),this.currentDocument.relations.push({id1:a,id2:s,relationTitle:or.sanitizeText(n,ft())})}addRelation(e,r,n){if(typeof e=="object"&&typeof r=="object")this.addRelationObjs(e,r,n);else if(typeof e=="string"&&typeof r=="string"){const a=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),s=this.endIdIfNeeded(r.trim()),o=this.endTypeIfNeeded(r);this.addState(a,i),this.addState(s,o),this.currentDocument.relations.push({id1:a,id2:s,relationTitle:n?or.sanitizeText(n,ft()):void 0})}}addDescription(e,r){var i;const n=this.currentDocument.states.get(e),a=r.startsWith(":")?r.replace(":","").trim():r;(i=n==null?void 0:n.descriptions)==null||i.push(or.sanitizeText(a,ft()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,r=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});const n=this.classes.get(e);r&&n&&r.split(Cl.STYLECLASS_SEP).forEach(a=>{const i=a.replace(/([^;]*);/,"$1").trim();if(RegExp(Cl.COLOR_KEYWORD).exec(a)){const o=i.replace(Cl.FILL_KEYWORD,Cl.BG_FILL).replace(Cl.COLOR_KEYWORD,Cl.FILL_KEYWORD);n.textStyles.push(o)}n.styles.push(i)})}getClasses(){return this.classes}setupToolTips(e){const r=kj();Yt(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover",i=>{var h;const s=Yt(i.currentTarget),o=s.attr("title");if(o===null)return;const u=(h=i.currentTarget)==null?void 0:h.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Zd.sanitize(o)),s.classed("hover",!0)}).on("mouseout",i=>{r.transition().duration(500).style("opacity",0),Yt(i.currentTarget).classed("hover",!1)})}setCssClass(e,r){e.split(",").forEach(n=>{var i;let a=this.getState(n);if(!a){const s=n.trim();this.addState(s),a=this.getState(s)}(i=a==null?void 0:a.classes)==null||i.push(r)})}setStyle(e,r){var n,a;(a=(n=this.getState(e))==null?void 0:n.styles)==null||a.push(r)}setTextStyle(e,r){var n,a;(a=(n=this.getState(e))==null?void 0:n.textStyles)==null||a.push(r)}bindFunctions(e){this.funs.forEach(r=>{r(e)})}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===xHe)}getDirection(){var e,r;return(r=(e=this.getDirectionStatement())==null?void 0:e.value)!=null?r:Xfr}setDirection(e){const r=this.getDirectionStatement();r?r.value=e:this.rootDoc.unshift({stmt:xHe,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){const e=ft();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:MHe(this.getRootDocV2())}}getConfig(){return ft().state}},l(mg,"StateDB"),_(mg,"StateDB"),mg.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},mg),w0r=_(t=>{var e;return`
|
||
defs [id$="-barbEnd"] {
|
||
fill: ${t.transitionColor};
|
||
stroke: ${t.transitionColor};
|
||
}
|
||
g.stateGroup text {
|
||
fill: ${t.nodeBorder};
|
||
stroke: none;
|
||
font-size: 10px;
|
||
}
|
||
g.stateGroup text {
|
||
fill: ${t.textColor};
|
||
stroke: none;
|
||
font-size: 10px;
|
||
|
||
}
|
||
g.stateGroup .state-title {
|
||
font-weight: bolder;
|
||
fill: ${t.stateLabelColor};
|
||
}
|
||
|
||
g.stateGroup rect {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.nodeBorder};
|
||
}
|
||
|
||
g.stateGroup line {
|
||
stroke: ${t.lineColor};
|
||
stroke-width: ${t.strokeWidth||1};
|
||
}
|
||
|
||
.transition {
|
||
stroke: ${t.transitionColor};
|
||
stroke-width: ${t.strokeWidth||1};
|
||
fill: none;
|
||
}
|
||
|
||
.stateGroup .composit {
|
||
fill: ${t.background};
|
||
border-bottom: 1px
|
||
}
|
||
|
||
.stateGroup .alt-composit {
|
||
fill: #e0e0e0;
|
||
border-bottom: 1px
|
||
}
|
||
|
||
.state-note {
|
||
stroke: ${t.noteBorderColor};
|
||
fill: ${t.noteBkgColor};
|
||
|
||
text {
|
||
fill: ${t.noteTextColor};
|
||
stroke: none;
|
||
font-size: 10px;
|
||
}
|
||
}
|
||
|
||
.stateLabel .box {
|
||
stroke: none;
|
||
stroke-width: 0;
|
||
fill: ${t.mainBkg};
|
||
opacity: 0.5;
|
||
}
|
||
|
||
.edgeLabel .label rect {
|
||
fill: ${t.labelBackgroundColor};
|
||
opacity: 0.5;
|
||
}
|
||
.edgeLabel {
|
||
background-color: ${t.edgeLabelBackground};
|
||
p {
|
||
background-color: ${t.edgeLabelBackground};
|
||
}
|
||
rect {
|
||
opacity: 0.5;
|
||
background-color: ${t.edgeLabelBackground};
|
||
fill: ${t.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
.edgeLabel .label text {
|
||
fill: ${t.transitionLabelColor||t.tertiaryTextColor};
|
||
}
|
||
.label div .edgeLabel {
|
||
color: ${t.transitionLabelColor||t.tertiaryTextColor};
|
||
}
|
||
|
||
.stateLabel text {
|
||
fill: ${t.stateLabelColor};
|
||
font-size: 10px;
|
||
font-weight: bold;
|
||
}
|
||
|
||
.node circle.state-start {
|
||
fill: ${t.specialStateColor};
|
||
stroke: ${t.specialStateColor};
|
||
}
|
||
|
||
.node .fork-join {
|
||
fill: ${t.specialStateColor};
|
||
stroke: ${t.specialStateColor};
|
||
}
|
||
|
||
.node circle.state-end {
|
||
fill: ${t.innerEndBackground};
|
||
stroke: ${t.background};
|
||
stroke-width: 1.5
|
||
}
|
||
.end-state-inner {
|
||
fill: ${t.compositeBackground||t.background};
|
||
// stroke: ${t.background};
|
||
stroke-width: 1.5
|
||
}
|
||
|
||
.node rect {
|
||
fill: ${t.stateBkg||t.mainBkg};
|
||
stroke: ${t.stateBorder||t.nodeBorder};
|
||
stroke-width: ${t.strokeWidth||1}px;
|
||
}
|
||
.node polygon {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.stateBorder||t.nodeBorder};;
|
||
stroke-width: ${t.strokeWidth||1}px;
|
||
}
|
||
[id$="-barbEnd"] {
|
||
fill: ${t.lineColor};
|
||
}
|
||
|
||
.statediagram-cluster rect {
|
||
fill: ${t.compositeTitleBackground};
|
||
stroke: ${t.stateBorder||t.nodeBorder};
|
||
stroke-width: ${t.strokeWidth||1}px;
|
||
}
|
||
|
||
.cluster-label, .nodeLabel {
|
||
color: ${t.stateLabelColor};
|
||
// line-height: 1;
|
||
}
|
||
|
||
.statediagram-cluster rect.outer {
|
||
rx: 5px;
|
||
ry: 5px;
|
||
}
|
||
.statediagram-state .divider {
|
||
stroke: ${t.stateBorder||t.nodeBorder};
|
||
}
|
||
|
||
.statediagram-state .title-state {
|
||
rx: 5px;
|
||
ry: 5px;
|
||
}
|
||
.statediagram-cluster.statediagram-cluster .inner {
|
||
fill: ${t.compositeBackground||t.background};
|
||
}
|
||
.statediagram-cluster.statediagram-cluster-alt .inner {
|
||
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
||
}
|
||
|
||
.statediagram-cluster .inner {
|
||
rx:0;
|
||
ry:0;
|
||
}
|
||
|
||
.statediagram-state rect.basic {
|
||
rx: 5px;
|
||
ry: 5px;
|
||
}
|
||
.statediagram-state rect.divider {
|
||
stroke-dasharray: 10,10;
|
||
fill: ${t.altBackground?t.altBackground:"#efefef"};
|
||
}
|
||
|
||
.note-edge {
|
||
stroke-dasharray: 5;
|
||
}
|
||
|
||
.statediagram-note rect {
|
||
fill: ${t.noteBkgColor};
|
||
stroke: ${t.noteBorderColor};
|
||
stroke-width: 1px;
|
||
rx: 0;
|
||
ry: 0;
|
||
}
|
||
.statediagram-note rect {
|
||
fill: ${t.noteBkgColor};
|
||
stroke: ${t.noteBorderColor};
|
||
stroke-width: 1px;
|
||
rx: 0;
|
||
ry: 0;
|
||
}
|
||
|
||
.statediagram-note text {
|
||
fill: ${t.noteTextColor};
|
||
}
|
||
|
||
.statediagram-note .nodeLabel {
|
||
color: ${t.noteTextColor};
|
||
}
|
||
.statediagram .edgeLabel {
|
||
color: red; // ${t.noteTextColor};
|
||
}
|
||
|
||
[id$="-dependencyStart"], [id$="-dependencyEnd"] {
|
||
fill: ${t.lineColor};
|
||
stroke: ${t.lineColor};
|
||
stroke-width: ${t.strokeWidth||1};
|
||
}
|
||
|
||
.statediagramTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
|
||
[data-look="neo"].statediagram-cluster rect {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};
|
||
stroke-width: ${(e=t.strokeWidth)!=null?e:1};
|
||
}
|
||
[data-look="neo"].statediagram-cluster rect.outer {
|
||
rx: ${t.radius}px;
|
||
ry: ${t.radius}px;
|
||
filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}
|
||
}
|
||
`},"getStyles"),BHe=w0r,T0r=_(t=>t.append("circle").attr("class","start-state").attr("r",ft().state.sizeUnit).attr("cx",ft().state.padding+ft().state.sizeUnit).attr("cy",ft().state.padding+ft().state.sizeUnit),"drawStartState"),E0r=_(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",ft().state.textHeight).attr("class","divider").attr("x2",ft().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),C0r=_((t,e)=>{const r=t.append("text").attr("x",2*ft().state.padding).attr("y",ft().state.textHeight+2*ft().state.padding).attr("font-size",ft().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",ft().state.padding).attr("y",ft().state.padding).attr("width",n.width+2*ft().state.padding).attr("height",n.height+2*ft().state.padding).attr("rx",ft().state.radius),r},"drawSimpleState"),S0r=_((t,e)=>{const r=_(function(p,g,m){const y=p.append("tspan").attr("x",2*ft().state.padding).text(g);m||y.attr("dy",ft().state.textHeight)},"addTspan"),a=t.append("text").attr("x",2*ft().state.padding).attr("y",ft().state.textHeight+1.3*ft().state.padding).attr("font-size",ft().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=a.height,s=t.append("text").attr("x",ft().state.padding).attr("y",i+ft().state.padding*.4+ft().state.dividerMargin+ft().state.textHeight).attr("class","state-description");let o=!0,u=!0;e.descriptions.forEach(function(p){o||(r(s,p,u),u=!1),o=!1});const h=t.append("line").attr("x1",ft().state.padding).attr("y1",ft().state.padding+i+ft().state.dividerMargin/2).attr("y2",ft().state.padding+i+ft().state.dividerMargin/2).attr("class","descr-divider"),d=s.node().getBBox(),f=Math.max(d.width,a.width);return h.attr("x2",f+3*ft().state.padding),t.insert("rect",":first-child").attr("x",ft().state.padding).attr("y",ft().state.padding).attr("width",f+2*ft().state.padding).attr("height",d.height+i+2*ft().state.padding).attr("rx",ft().state.radius),t},"drawDescrState"),_0r=_((t,e,r)=>{const n=ft().state.padding,a=2*ft().state.padding,i=t.node().getBBox(),s=i.width,o=i.x,u=t.append("text").attr("x",0).attr("y",ft().state.titleShift).attr("font-size",ft().state.fontSize).attr("class","state-title").text(e.id),d=u.node().getBBox().width+a;let f=Math.max(d,s);f===s&&(f=f+a);let p;const g=t.node().getBBox();e.doc,p=o-n,d>s&&(p=(s-f)/2+n),Math.abs(o-g.x)<n&&d>s&&(p=o-(d-s)/2);const m=1-ft().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",m).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",g.height+ft().state.textHeight+ft().state.titleShift+1).attr("rx","0"),u.attr("x",p+n),d<=s&&u.attr("x",o+(f-a)/2-d/2+n),t.insert("rect",":first-child").attr("x",p).attr("y",ft().state.titleShift-ft().state.textHeight-ft().state.padding).attr("width",f).attr("height",ft().state.textHeight*3).attr("rx",ft().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",ft().state.titleShift-ft().state.textHeight-ft().state.padding).attr("width",f).attr("height",g.height+3+2*ft().state.textHeight).attr("rx",ft().state.radius),t},"addTitleAndBox"),k0r=_(t=>(t.append("circle").attr("class","end-state-outer").attr("r",ft().state.sizeUnit+ft().state.miniPadding).attr("cx",ft().state.padding+ft().state.sizeUnit+ft().state.miniPadding).attr("cy",ft().state.padding+ft().state.sizeUnit+ft().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",ft().state.sizeUnit).attr("cx",ft().state.padding+ft().state.sizeUnit+2).attr("cy",ft().state.padding+ft().state.sizeUnit+2)),"drawEndState"),A0r=_((t,e)=>{let r=ft().state.forkWidth,n=ft().state.forkHeight;if(e.parentId){let a=r;r=n,n=a}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",ft().state.padding).attr("y",ft().state.padding)},"drawForkJoinState"),N0r=_((t,e,r,n)=>{let a=0;const i=n.append("text");i.style("text-anchor","start"),i.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");s=s.replace(/\n/g,"<br/>");const o=s.split(or.lineBreakRegex);let u=1.25*ft().state.noteMargin;for(const h of o){const d=h.trim();if(d.length>0){const f=i.append("tspan");if(f.text(d),u===0){const p=f.node().getBBox();u+=p.height}a+=u,f.attr("x",e+ft().state.noteMargin),f.attr("y",r+a+1.25*ft().state.noteMargin)}}return{textWidth:i.node().getBBox().width,textHeight:a}},"_drawLongText"),I0r=_((t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",ft().state.padding),n=e.append("g"),{textWidth:a,textHeight:i}=N0r(t,0,0,n);return r.attr("height",i+2*ft().state.noteMargin),r.attr("width",a+ft().state.noteMargin*2),r},"drawNote"),zHe=_(function(t,e){const r=e.id,n={id:r,label:e.id,width:0,height:0},a=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&T0r(a),e.type==="end"&&k0r(a),(e.type==="fork"||e.type==="join")&&A0r(a,e),e.type==="note"&&I0r(e.note.text,a),e.type==="divider"&&E0r(a),e.type==="default"&&e.descriptions.length===0&&C0r(a,e),e.type==="default"&&e.descriptions.length>0&&S0r(a,e);const i=a.node().getBBox();return n.width=i.width+2*ft().state.padding,n.height=i.height+2*ft().state.padding,n},"drawState"),HHe=0,L0r=_(function(t,e,r){const n=_(function(u){switch(u){case wy.relationType.AGGREGATION:return"aggregation";case wy.relationType.EXTENSION:return"extension";case wy.relationType.COMPOSITION:return"composition";case wy.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(u=>!Number.isNaN(u.y));const a=e.points,i=Q4().x(function(u){return u.x}).y(function(u){return u.y}).curve(J4),s=t.append("path").attr("d",i(a)).attr("id","edge"+HHe).attr("class","transition");let o="";if(ft().state.arrowMarkerAbsolute&&(o=E8(!0)),s.attr("marker-end","url("+o+"#"+n(wy.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const u=t.append("g").attr("class","stateLabel"),{x:h,y:d}=Wr.calcLabelPosition(e.points),f=or.getRows(r.title);let p=0;const g=[];let m=0,y=0;for(let w=0;w<=f.length;w++){const x=u.append("text").attr("text-anchor","middle").text(f[w]).attr("x",h).attr("y",d+p),T=x.node().getBBox();m=Math.max(m,T.width),y=Math.min(y,T.x),Le.info(T.x,h,d+p),p===0&&(p=x.node().getBBox().height,Le.info("Title height",p,d)),g.push(x)}let v=p*f.length;if(f.length>1){const w=(f.length-1)*p*.5;g.forEach((x,T)=>x.attr("y",d+T*p-w)),v=p*f.length}const b=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",h-m/2-ft().state.padding/2).attr("y",d-v/2-ft().state.padding/2-3.5).attr("width",m+ft().state.padding).attr("height",v+ft().state.padding),Le.info(b)}HHe++},"drawEdge"),Pc,Zee={},$0r=_(function(){},"setConf"),M0r=_(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),P0r=_(function(t,e,r,n){Pc=ft().state;const a=ft().securityLevel;let i;a==="sandbox"&&(i=Yt("#i"+e));const s=Yt(a==="sandbox"?i.nodes()[0].contentDocument.body:"body"),o=a==="sandbox"?i.nodes()[0].contentDocument:document;Le.debug("Rendering diagram "+t);const u=s.select(`[id='${e}']`);M0r(u);const h=n.db.getRootDoc(),d=u.append("g").attr("id",e+"-root");WHe(h,d,void 0,!1,s,o,n);const f=Pc.padding,p=u.node().getBBox(),g=p.width+f*2,m=p.height+f*2,y=g*1.75;yi(u,m,y,Pc.useMaxWidth),u.attr("viewBox",`${p.x-Pc.padding} ${p.y-Pc.padding} `+g+" "+m)},"draw"),R0r=_(t=>t?t.length*Pc.fontSizeFactor:1,"getLabelWidth"),WHe=_((t,e,r,n,a,i,s)=>{const o=new Rs({compound:!0,multigraph:!0});let u,h=!0;for(u=0;u<t.length;u++)if(t[u].stmt==="relation"){h=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:h?1:Pc.edgeLengthFactor,nodeSep:h?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:h?1:Pc.edgeLengthFactor,nodeSep:h?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}});const d=s.db.getStates(),f=s.db.getRelations(),p=Object.keys(d);for(const b of p){const w=d[b];r&&(w.parentId=r);let x;if(w.doc){let T=e.append("g").attr("id",w.id).attr("class","stateGroup");x=WHe(w.doc,T,w.id,!n,a,i,s);{T=_0r(T,w,n);let C=T.node().getBBox();x.width=C.width,x.height=C.height+Pc.padding/2,Zee[w.id]={y:Pc.compositTitleSize}}}else x=zHe(e,w,o);if(w.note){const T={descriptions:[],id:w.id+"-note",note:w.note,type:"note"},C=zHe(e,T,o);w.note.position==="left of"?(o.setNode(x.id+"-note",C),o.setNode(x.id,x)):(o.setNode(x.id,x),o.setNode(x.id+"-note",C)),o.setParent(x.id,x.id+"-group"),o.setParent(x.id+"-note",x.id+"-group")}else o.setNode(x.id,x)}Le.debug("Count=",o.nodeCount(),o);let g=0;f.forEach(function(b){g++,Le.debug("Setting edge",b),o.setEdge(b.id1,b.id2,{relation:b,width:R0r(b.title),height:Pc.labelHeight*or.getRows(b.title).length,labelpos:"c"},"id"+g)}),v4e(o),Le.debug("Graph after layout",o.nodes());const m=e.node();o.nodes().forEach(function(b){b!==void 0&&o.node(b)!==void 0?(Le.warn("Node "+b+": "+JSON.stringify(o.node(b))),a.select("#"+m.id+" #"+b).attr("transform","translate("+(o.node(b).x-o.node(b).width/2)+","+(o.node(b).y+(Zee[b]?Zee[b].y:0)-o.node(b).height/2)+" )"),a.select("#"+m.id+" #"+b).attr("data-x-shift",o.node(b).x-o.node(b).width/2),i.querySelectorAll("#"+m.id+" #"+b+" .divider").forEach(x=>{const T=x.parentElement;let C=0,S=0;T&&(T.parentElement&&(C=T.parentElement.getBBox().width),S=parseInt(T.getAttribute("data-x-shift"),10),Number.isNaN(S)&&(S=0)),x.setAttribute("x1",0-S+8),x.setAttribute("x2",C-S-8)})):Le.debug("No Node "+b+": "+JSON.stringify(o.node(b)))});let y=m.getBBox();o.edges().forEach(function(b){b!==void 0&&o.edge(b)!==void 0&&(Le.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(o.edge(b))),L0r(e,o.edge(b),o.edge(b).relation))}),y=m.getBBox();const v={id:r||"root",label:r||"root",width:0,height:0};return v.width=y.width+2*Pc.padding,v.height=y.height+2*Pc.padding,Le.debug("Doc rendered",v,o),v},"renderDoc"),O0r={setConf:$0r,draw:P0r},D0r={parser:vHe,get db(){return new wy(1)},renderer:O0r,styles:BHe,init:_(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")},F0r=Object.freeze({__proto__:null,diagram:D0r}),B0r={parser:vHe,get db(){return new wy(2)},renderer:v0r,styles:BHe,init:_(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")},z0r=Object.freeze({__proto__:null,diagram:B0r}),Qee=function(){var t=_(function(f,p,g,m){for(g=g||{},m=f.length;m--;g[f[m]]=p);return g},"o"),e=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],a=[1,11],i=[1,12],s=[1,13],o=[1,14],u={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:_(l(function(p,g,m,y,v,b,w){var x=b.length-1;switch(v){case 1:return b[x-1];case 2:this.$=[];break;case 3:b[x-1].push(b[x]),this.$=b[x-1];break;case 4:case 5:this.$=b[x];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(b[x].substr(6)),this.$=b[x].substr(6);break;case 9:this.$=b[x].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=b[x].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(b[x].substr(8)),this.$=b[x].substr(8);break;case 13:y.addTask(b[x-1],b[x]),this.$="task";break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:a,16:i,17:s,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:r,12:n,14:a,16:i,17:s,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:_(l(function(p,g){if(g.recoverable)this.trace(p);else{var m=new Error(p);throw m.hash=g,m}},"parseError"),"parseError"),parse:_(l(function(p){var g=this,m=[0],y=[],v=[null],b=[],w=this.table,x="",T=0,C=0,S=2,E=1,k=b.slice.call(arguments,1),A=Object.create(this.lexer),I={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(I.yy[L]=this.yy[L]);A.setInput(p,I.yy),I.yy.lexer=A,I.yy.parser=this,typeof A.yylloc=="undefined"&&(A.yylloc={});var R=A.yylloc;b.push(R);var O=A.options&&A.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function M(Z){m.length=m.length-2*Z,v.length=v.length-Z,b.length=b.length-Z}l(M,"popStack"),_(M,"popStack");function P(){var Z;return Z=y.pop()||A.lex()||E,typeof Z!="number"&&(Z instanceof Array&&(y=Z,Z=y.pop()),Z=g.symbols_[Z]||Z),Z}l(P,"lex"),_(P,"lex");for(var z,D,B,W,U={},j,V,Y,H;;){if(D=m[m.length-1],this.defaultActions[D]?B=this.defaultActions[D]:((z===null||typeof z=="undefined")&&(z=P()),B=w[D]&&w[D][z]),typeof B=="undefined"||!B.length||!B[0]){var q="";H=[];for(j in w[D])this.terminals_[j]&&j>S&&H.push("'"+this.terminals_[j]+"'");A.showPosition?q="Parse error on line "+(T+1)+`:
|
||
`+A.showPosition()+`
|
||
Expecting `+H.join(", ")+", got '"+(this.terminals_[z]||z)+"'":q="Parse error on line "+(T+1)+": Unexpected "+(z==E?"end of input":"'"+(this.terminals_[z]||z)+"'"),this.parseError(q,{text:A.match,token:this.terminals_[z]||z,line:A.yylineno,loc:R,expected:H})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+z);switch(B[0]){case 1:m.push(z),v.push(A.yytext),b.push(A.yylloc),m.push(B[1]),z=null,C=A.yyleng,x=A.yytext,T=A.yylineno,R=A.yylloc;break;case 2:if(V=this.productions_[B[1]][1],U.$=v[v.length-V],U._$={first_line:b[b.length-(V||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(V||1)].first_column,last_column:b[b.length-1].last_column},O&&(U._$.range=[b[b.length-(V||1)].range[0],b[b.length-1].range[1]]),W=this.performAction.apply(U,[x,C,T,I.yy,B[1],v,b].concat(k)),typeof W!="undefined")return W;V&&(m=m.slice(0,-1*V*2),v=v.slice(0,-1*V),b=b.slice(0,-1*V)),m.push(this.productions_[B[1]][0]),v.push(U.$),b.push(U._$),Y=w[m[m.length-2]][m[m.length-1]],m.push(Y);break;case 3:return!0}}return!0},"parse"),"parse")},h=function(){var f={EOF:1,parseError:_(l(function(g,m){if(this.yy.parser)this.yy.parser.parseError(g,m);else throw new Error(g)},"parseError"),"parseError"),setInput:_(function(p,g){return this.yy=g||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var g=p.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:_(function(p){var g=p.length,m=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),m.length-1&&(this.yylineno-=m.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:m?(m.length===y.length?this.yylloc.first_column:0)+y[y.length-m.length].length-m[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(p){this.unput(this.match.slice(p))},"less"),pastInput:_(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var p=this.pastInput(),g=new Array(p.length+1).join("-");return p+this.upcomingInput()+`
|
||
`+g+"^"},"showPosition"),test_match:_(function(p,g){var m,y,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),y=p[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],m=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var b in v)this[b]=v[b];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,g,m,y;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),b=0;b<v.length;b++)if(m=this._input.match(this.rules[v[b]]),m&&(!g||m[0].length>g[0].length)){if(g=m,y=b,this.options.backtrack_lexer){if(p=this.test_match(m,v[b]),p!==!1)return p;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(p=this.test_match(g,v[y]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var g=this.next();return g||this.lex()},"lex"),"lex"),begin:_(l(function(g){this.conditionStack.push(g)},"begin"),"begin"),popState:_(l(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(g){this.begin(g)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(g,m,y,v){switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return f}();u.lexer=h;function d(){this.yy={}}return l(d,"Parser"),_(d,"Parser"),d.prototype=u,u.Parser=d,new d}();Qee.parser=Qee;var H0r=Qee,sC="",Jee=[],Ek=[],Ck=[],W0r=_(function(){Jee.length=0,Ek.length=0,sC="",Ck.length=0,Ca()},"clear"),V0r=_(function(t){sC=t,Jee.push(t)},"addSection"),G0r=_(function(){return Jee},"getSections"),q0r=_(function(){let t=VHe();const e=100;let r=0;for(;!t&&r<e;)t=VHe(),r++;return Ek.push(...Ck),Ek},"getTasks"),Y0r=_(function(){const t=[];return Ek.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},"updateActors"),U0r=_(function(t,e){const r=e.substr(1).split(":");let n=0,a=[];r.length===1?(n=Number(r[0]),a=[]):(n=Number(r[0]),a=r[1].split(","));const i=a.map(o=>o.trim()),s={section:sC,type:sC,people:i,task:t,score:n};Ck.push(s)},"addTask"),j0r=_(function(t){const e={section:sC,type:sC,description:t,task:t,classes:[]};Ek.push(e)},"addTaskOrg"),VHe=_(function(){const t=_(function(r){return Ck[r].processed},"compileTask");let e=!0;for(const[r,n]of Ck.entries())t(r),e=e&&n.processed;return e},"compileTasks"),K0r=_(function(){return Y0r()},"getActors"),GHe={getConfig:_(()=>ft().journey,"getConfig"),clear:W0r,setDiagramTitle:Va,getDiagramTitle:Ia,setAccTitle:Na,getAccTitle:za,setAccDescription:Ha,getAccDescription:Wa,addSection:V0r,getSections:G0r,getTasks:q0r,addTask:U0r,addTaskOrg:j0r,getActors:K0r},X0r=_(t=>`.label {
|
||
font-family: ${t.fontFamily};
|
||
color: ${t.textColor};
|
||
}
|
||
.mouth {
|
||
stroke: #666;
|
||
}
|
||
|
||
line {
|
||
stroke: ${t.textColor}
|
||
}
|
||
|
||
.legend {
|
||
fill: ${t.textColor};
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
.label text {
|
||
fill: #333;
|
||
}
|
||
.label {
|
||
color: ${t.textColor}
|
||
}
|
||
|
||
.face {
|
||
${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
|
||
stroke: #999;
|
||
}
|
||
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon,
|
||
.node path {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.node .label {
|
||
text-align: center;
|
||
}
|
||
.node.clickable {
|
||
cursor: pointer;
|
||
}
|
||
|
||
.arrowheadPath {
|
||
fill: ${t.arrowheadColor};
|
||
}
|
||
|
||
.edgePath .path {
|
||
stroke: ${t.lineColor};
|
||
stroke-width: 1.5px;
|
||
}
|
||
|
||
.flowchart-link {
|
||
stroke: ${t.lineColor};
|
||
fill: none;
|
||
}
|
||
|
||
.edgeLabel {
|
||
background-color: ${t.edgeLabelBackground};
|
||
rect {
|
||
opacity: 0.5;
|
||
}
|
||
text-align: center;
|
||
}
|
||
|
||
.cluster rect {
|
||
}
|
||
|
||
.cluster text {
|
||
fill: ${t.titleColor};
|
||
}
|
||
|
||
div.mermaidTooltip {
|
||
position: absolute;
|
||
text-align: center;
|
||
max-width: 200px;
|
||
padding: 2px;
|
||
font-family: ${t.fontFamily};
|
||
font-size: 12px;
|
||
background: ${t.tertiaryColor};
|
||
border: 1px solid ${t.border2};
|
||
border-radius: 2px;
|
||
pointer-events: none;
|
||
z-index: 100;
|
||
}
|
||
|
||
.task-type-0, .section-type-0 {
|
||
${t.fillType0?`fill: ${t.fillType0}`:""};
|
||
}
|
||
.task-type-1, .section-type-1 {
|
||
${t.fillType0?`fill: ${t.fillType1}`:""};
|
||
}
|
||
.task-type-2, .section-type-2 {
|
||
${t.fillType0?`fill: ${t.fillType2}`:""};
|
||
}
|
||
.task-type-3, .section-type-3 {
|
||
${t.fillType0?`fill: ${t.fillType3}`:""};
|
||
}
|
||
.task-type-4, .section-type-4 {
|
||
${t.fillType0?`fill: ${t.fillType4}`:""};
|
||
}
|
||
.task-type-5, .section-type-5 {
|
||
${t.fillType0?`fill: ${t.fillType5}`:""};
|
||
}
|
||
.task-type-6, .section-type-6 {
|
||
${t.fillType0?`fill: ${t.fillType6}`:""};
|
||
}
|
||
.task-type-7, .section-type-7 {
|
||
${t.fillType0?`fill: ${t.fillType7}`:""};
|
||
}
|
||
|
||
.actor-0 {
|
||
${t.actor0?`fill: ${t.actor0}`:""};
|
||
}
|
||
.actor-1 {
|
||
${t.actor1?`fill: ${t.actor1}`:""};
|
||
}
|
||
.actor-2 {
|
||
${t.actor2?`fill: ${t.actor2}`:""};
|
||
}
|
||
.actor-3 {
|
||
${t.actor3?`fill: ${t.actor3}`:""};
|
||
}
|
||
.actor-4 {
|
||
${t.actor4?`fill: ${t.actor4}`:""};
|
||
}
|
||
.actor-5 {
|
||
${t.actor5?`fill: ${t.actor5}`:""};
|
||
}
|
||
${F5()}
|
||
`,"getStyles"),Z0r=X0r,ete=_(function(t,e){return NL(t,e)},"drawRect"),Q0r=_(function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");a.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function i(u){const h=$w().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}l(i,"smile"),_(i,"smile");function s(u){const h=$w().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}l(s,"sad"),_(s,"sad");function o(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return l(o,"ambivalent"),_(o,"ambivalent"),e.score>3?i(a):e.score<3?s(a):o(a),n},"drawFace"),qHe=_(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),YHe=_(function(t,e){return Tjt(t,e)},"drawText"),J0r=_(function(t,e){function r(a,i,s,o,u){return a+","+i+" "+(a+s)+","+i+" "+(a+s)+","+(i+o-u)+" "+(a+s-u*1.2)+","+(i+o)+" "+a+","+(i+o)}l(r,"genPoints"),_(r,"genPoints");const n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,YHe(t,e)},"drawLabel"),epr=_(function(t,e,r){const n=t.append("g"),a=_c();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width*e.taskCount+r.diagramMarginX*(e.taskCount-1),a.height=r.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,ete(n,a),UHe(r)(e.text,n,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),tte=-1,tpr=_(function(t,e,r,n){const a=e.x+r.width/2,i=t.append("g");tte++;const s=300+5*30;i.append("line").attr("id",n+"-task"+tte).attr("x1",a).attr("y1",e.y).attr("x2",a).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Q0r(i,{cx:a,cy:300+(5-e.score)*30,score:e.score});const o=_c();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,ete(i,o);let u=e.x+14;e.people.forEach(h=>{const d=e.actors[h].color,f={cx:u,cy:e.y,r:7,fill:d,stroke:"#000",title:h,pos:e.actors[h].position};qHe(i,f),u+=10}),UHe(r)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),rpr=_(function(t,e){zAe(t,e)},"drawBackgroundRect"),UHe=function(){function t(a,i,s,o,u,h,d,f){const p=i.append("text").attr("x",s+u/2).attr("y",o+h/2+5).style("font-color",f).style("text-anchor","middle").text(a);n(p,d)}l(t,"byText"),_(t,"byText");function e(a,i,s,o,u,h,d,f,p){const{taskFontSize:g,taskFontFamily:m}=f,y=a.split(/<br\s*\/?>/gi);for(let v=0;v<y.length;v++){const b=v*g-g*(y.length-1)/2,w=i.append("text").attr("x",s+u/2).attr("y",o).attr("fill",p).style("text-anchor","middle").style("font-size",g).style("font-family",m);w.append("tspan").attr("x",s+u/2).attr("dy",b).text(y[v]),w.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(w,d)}}l(e,"byTspan"),_(e,"byTspan");function r(a,i,s,o,u,h,d,f){const p=i.append("switch"),m=p.append("foreignObject").attr("x",s).attr("y",o).attr("width",u).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),e(a,p,s,o,u,h,d,f),n(m,d)}l(r,"byFo"),_(r,"byFo");function n(a,i){for(const s in i)s in i&&a.attr(s,i[s])}return l(n,"_setTextAttrs"),_(n,"_setTextAttrs"),function(a){return a.textPlacement==="fo"?r:a.textPlacement==="old"?t:e}}(),npr=_(function(t,e){tte=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),Sk={drawRect:ete,drawCircle:qHe,drawSection:epr,drawText:YHe,drawLabel:J0r,drawTask:tpr,drawBackgroundRect:rpr,initGraphics:npr},apr=_(function(t){Object.keys(t).forEach(function(r){uh[r]=t[r]})},"setConf"),s0={},aR=0;function jHe(t){const e=ft().journey,r=e.maxLabelWidth;aR=0;let n=60;Object.keys(s0).forEach(a=>{const i=s0[a].color,s={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:s0[a].position};Sk.drawCircle(t,s);let o=t.append("text").attr("visibility","hidden").text(a);const u=o.node().getBoundingClientRect().width;o.remove();let h=[];if(u<=r)h=[a];else{const d=a.split(" ");let f="";o=t.append("text").attr("visibility","hidden"),d.forEach(p=>{const g=f?`${f} ${p}`:p;if(o.text(g),o.node().getBoundingClientRect().width>r){if(f&&h.push(f),f=p,o.text(p),o.node().getBoundingClientRect().width>r){let y="";for(const v of p)y+=v,o.text(y+"-"),o.node().getBoundingClientRect().width>r&&(h.push(y.slice(0,-1)+"-"),y=v);f=y}}else f=g}),f&&h.push(f),o.remove()}h.forEach((d,f)=>{var y;const p={x:40,y:n+7+f*20,fill:"#666",text:d,textMargin:(y=e.boxTextMargin)!=null?y:5},m=Sk.drawText(t,p).node().getBoundingClientRect().width;m>aR&&m>e.leftMargin-m&&(aR=m)}),n+=Math.max(20,h.length*20)})}l(jHe,"drawActorLegend"),_(jHe,"drawActorLegend");var uh=ft().journey,ig=0,ipr=_(function(t,e,r,n){const a=ft(),i=a.journey.titleColor,s=a.journey.titleFontSize,o=a.journey.titleFontFamily,u=a.securityLevel;let h;u==="sandbox"&&(h=Yt("#i"+e));const d=Yt(u==="sandbox"?h.nodes()[0].contentDocument.body:"body");gu.init();const f=d.select("#"+e);Sk.initGraphics(f,e);const p=n.db.getTasks(),g=n.db.getDiagramTitle(),m=n.db.getActors();for(const T in s0)delete s0[T];let y=0;m.forEach(T=>{s0[T]={color:uh.actorColours[y%uh.actorColours.length],position:y},y++}),jHe(f),ig=uh.leftMargin+aR,gu.insert(0,0,ig,Object.keys(s0).length*50),spr(f,p,0,e);const v=gu.getBounds();g&&f.append("text").text(g).attr("x",ig).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",i).attr("font-family",o);const b=v.stopy-v.starty+2*uh.diagramMarginY,w=ig+v.stopx+2*uh.diagramMarginX;yi(f,b,w,uh.useMaxWidth),f.append("line").attr("x1",ig).attr("y1",uh.height*4).attr("x2",w-ig-4).attr("y2",uh.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const x=g?70:0;f.attr("viewBox",`${v.startx} -25 ${w} ${b+x}`),f.attr("preserveAspectRatio","xMinYMin meet"),f.attr("height",b+x+25)},"draw"),gu={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:_(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:_(function(t,e,r,n){t[e]===void 0?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:_(function(t,e,r,n){const a=ft().journey,i=this;let s=0;function o(u){return _(l(function(d){s++;const f=i.sequenceItems.length-s+1;i.updateVal(d,"starty",e-f*a.boxMargin,Math.min),i.updateVal(d,"stopy",n+f*a.boxMargin,Math.max),i.updateVal(gu.data,"startx",t-f*a.boxMargin,Math.min),i.updateVal(gu.data,"stopx",r+f*a.boxMargin,Math.max),u!=="activation"&&(i.updateVal(d,"startx",t-f*a.boxMargin,Math.min),i.updateVal(d,"stopx",r+f*a.boxMargin,Math.max),i.updateVal(gu.data,"starty",e-f*a.boxMargin,Math.min),i.updateVal(gu.data,"stopy",n+f*a.boxMargin,Math.max))},"updateItemBounds"),"updateItemBounds")}l(o,"updateFn"),_(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:_(function(t,e,r,n){const a=Math.min(t,r),i=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(gu.data,"startx",a,Math.min),this.updateVal(gu.data,"starty",s,Math.min),this.updateVal(gu.data,"stopx",i,Math.max),this.updateVal(gu.data,"stopy",o,Math.max),this.updateBounds(a,s,i,o)},"insert"),bumpVerticalPos:_(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:_(function(){return this.verticalPos},"getVerticalPos"),getBounds:_(function(){return this.data},"getBounds")},rte=uh.sectionFills,KHe=uh.sectionColours,spr=_(function(t,e,r,n){const a=ft().journey;let i="";const s=a.height*2+a.diagramMarginY,o=r+s;let u=0,h="#CCC",d="black",f=0;for(const[p,g]of e.entries()){if(i!==g.section){h=rte[u%rte.length],f=u%rte.length,d=KHe[u%KHe.length];let y=0;const v=g.section;for(let w=p;w<e.length&&e[w].section==v;w++)y=y+1;const b={x:p*a.taskMargin+p*a.width+ig,y:50,text:g.section,fill:h,num:f,colour:d,taskCount:y};Sk.drawSection(t,b,a),i=g.section,u++}const m=g.people.reduce((y,v)=>(s0[v]&&(y[v]=s0[v]),y),{});g.x=p*a.taskMargin+p*a.width+ig,g.y=o,g.width=a.diagramMarginX,g.height=a.diagramMarginY,g.colour=d,g.fill=h,g.num=f,g.actors=m,Sk.drawTask(t,g,a,n),gu.insert(g.x,g.y,g.x+g.width+a.taskMargin,300+5*30)}},"drawTasks"),XHe={setConf:apr,draw:ipr},opr={parser:H0r,db:GHe,renderer:XHe,styles:Z0r,init:_(t=>{XHe.setConf(t.journey),GHe.clear()},"init")},lpr=Object.freeze({__proto__:null,diagram:opr}),nte=function(){var t=_(function(p,g,m,y){for(m=m||{},y=p.length;y--;m[p[y]]=g);return m},"o"),e=[6,11,13,14,15,17,19,20,23,24],r=[1,12],n=[1,13],a=[1,14],i=[1,15],s=[1,16],o=[1,19],u=[1,20],h={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:_(l(function(g,m,y,v,b,w,x){var T=w.length-1;switch(b){case 1:return w[T-1];case 3:v.setDirection("LR");break;case 4:v.setDirection("TD");break;case 5:this.$=[];break;case 6:w[T-1].push(w[T]),this.$=w[T-1];break;case 7:case 8:this.$=w[T];break;case 9:case 10:this.$=[];break;case 11:v.getCommonDb().setDiagramTitle(w[T].substr(6)),this.$=w[T].substr(6);break;case 12:this.$=w[T].trim(),v.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=w[T].trim(),v.getCommonDb().setAccDescription(this.$);break;case 15:v.addSection(w[T].substr(8)),this.$=w[T].substr(8);break;case 18:v.addTask(w[T],0,""),this.$=w[T];break;case 19:v.addEvent(w[T].substr(2)),this.$=w[T];break}},"anonymous"),"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(e,[2,5],{5:6}),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:n,17:a,19:i,20:s,21:17,22:18,23:o,24:u},t(e,[2,10],{1:[2,1]}),t(e,[2,6]),{12:21,14:r,15:n,17:a,19:i,20:s,21:17,22:18,23:o,24:u},t(e,[2,8]),t(e,[2,9]),t(e,[2,11]),{16:[1,22]},{18:[1,23]},t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,7]),t(e,[2,12]),t(e,[2,13])],defaultActions:{},parseError:_(l(function(g,m){if(m.recoverable)this.trace(g);else{var y=new Error(g);throw y.hash=m,y}},"parseError"),"parseError"),parse:_(l(function(g){var m=this,y=[0],v=[],b=[null],w=[],x=this.table,T="",C=0,S=0,E=2,k=1,A=w.slice.call(arguments,1),I=Object.create(this.lexer),L={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(L.yy[R]=this.yy[R]);I.setInput(g,L.yy),L.yy.lexer=I,L.yy.parser=this,typeof I.yylloc=="undefined"&&(I.yylloc={});var O=I.yylloc;w.push(O);var M=I.options&&I.options.ranges;typeof L.yy.parseError=="function"?this.parseError=L.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function P(K){y.length=y.length-2*K,b.length=b.length-K,w.length=w.length-K}l(P,"popStack"),_(P,"popStack");function z(){var K;return K=v.pop()||I.lex()||k,typeof K!="number"&&(K instanceof Array&&(v=K,K=v.pop()),K=m.symbols_[K]||K),K}l(z,"lex"),_(z,"lex");for(var D,B,W,U,j={},V,Y,H,q;;){if(B=y[y.length-1],this.defaultActions[B]?W=this.defaultActions[B]:((D===null||typeof D=="undefined")&&(D=z()),W=x[B]&&x[B][D]),typeof W=="undefined"||!W.length||!W[0]){var Z="";q=[];for(V in x[B])this.terminals_[V]&&V>E&&q.push("'"+this.terminals_[V]+"'");I.showPosition?Z="Parse error on line "+(C+1)+`:
|
||
`+I.showPosition()+`
|
||
Expecting `+q.join(", ")+", got '"+(this.terminals_[D]||D)+"'":Z="Parse error on line "+(C+1)+": Unexpected "+(D==k?"end of input":"'"+(this.terminals_[D]||D)+"'"),this.parseError(Z,{text:I.match,token:this.terminals_[D]||D,line:I.yylineno,loc:O,expected:q})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+D);switch(W[0]){case 1:y.push(D),b.push(I.yytext),w.push(I.yylloc),y.push(W[1]),D=null,S=I.yyleng,T=I.yytext,C=I.yylineno,O=I.yylloc;break;case 2:if(Y=this.productions_[W[1]][1],j.$=b[b.length-Y],j._$={first_line:w[w.length-(Y||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-(Y||1)].first_column,last_column:w[w.length-1].last_column},M&&(j._$.range=[w[w.length-(Y||1)].range[0],w[w.length-1].range[1]]),U=this.performAction.apply(j,[T,S,C,L.yy,W[1],b,w].concat(A)),typeof U!="undefined")return U;Y&&(y=y.slice(0,-1*Y*2),b=b.slice(0,-1*Y),w=w.slice(0,-1*Y)),y.push(this.productions_[W[1]][0]),b.push(j.$),w.push(j._$),H=x[y[y.length-2]][y[y.length-1]],y.push(H);break;case 3:return!0}}return!0},"parse"),"parse")},d=function(){var p={EOF:1,parseError:_(l(function(m,y){if(this.yy.parser)this.yy.parser.parseError(m,y);else throw new Error(m)},"parseError"),"parseError"),setInput:_(function(g,m){return this.yy=m||this.yy||{},this._input=g,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var m=g.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),g},"input"),unput:_(function(g){var m=g.length,y=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===v.length?this.yylloc.first_column:0)+v[v.length-y.length].length-y[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(g){this.unput(this.match.slice(g))},"less"),pastInput:_(function(){var g=this.matched.substr(0,this.matched.length-this.match.length);return(g.length>20?"...":"")+g.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var g=this.match;return g.length<20&&(g+=this._input.substr(0,20-g.length)),(g.substr(0,20)+(g.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var g=this.pastInput(),m=new Array(g.length+1).join("-");return g+this.upcomingInput()+`
|
||
`+m+"^"},"showPosition"),test_match:_(function(g,m){var y,v,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),v=g[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+g[0].length},this.yytext+=g[0],this.match+=g[0],this.matches=g,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(g[0].length),this.matched+=g[0],y=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var w in b)this[w]=b[w];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var g,m,y,v;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),w=0;w<b.length;w++)if(y=this._input.match(this.rules[b[w]]),y&&(!m||y[0].length>m[0].length)){if(m=y,v=w,this.options.backtrack_lexer){if(g=this.test_match(y,b[w]),g!==!1)return g;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(g=this.test_match(m,b[v]),g!==!1?g:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var m=this.next();return m||this.lex()},"lex"),"lex"),begin:_(l(function(m){this.conditionStack.push(m)},"begin"),"begin"),popState:_(l(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(m){this.begin(m)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(m,y,v,b){switch(v){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return p}();h.lexer=d;function f(){this.yy={}}return l(f,"Parser"),_(f,"Parser"),f.prototype=h,h.Parser=f,new f}();nte.parser=nte;var cpr=nte,ZHe={};g8(ZHe,{addEvent:l(()=>oWe,"addEvent"),addSection:l(()=>nWe,"addSection"),addTask:l(()=>sWe,"addTask"),addTaskOrg:l(()=>lWe,"addTaskOrg"),clear:l(()=>eWe,"clear"),default:l(()=>upr,"default"),getCommonDb:l(()=>JHe,"getCommonDb"),getDirection:l(()=>rWe,"getDirection"),getSections:l(()=>aWe,"getSections"),getTasks:l(()=>iWe,"getTasks"),setDirection:l(()=>tWe,"setDirection")});var oC="",QHe=0,ate="LR",ite=[],iR=[],lC=[],JHe=_(()=>$z,"getCommonDb"),eWe=_(function(){ite.length=0,iR.length=0,oC="",lC.length=0,ate="LR",Ca()},"clear"),tWe=_(function(t){ate=t},"setDirection"),rWe=_(function(){return ate},"getDirection"),nWe=_(function(t){oC=t,ite.push(t)},"addSection"),aWe=_(function(){return ite},"getSections"),iWe=_(function(){let t=cWe();const e=100;let r=0;for(;!t&&r<e;)t=cWe(),r++;return iR.push(...lC),iR},"getTasks"),sWe=_(function(t,e,r){const n={id:QHe++,section:oC,type:oC,task:t,score:e||0,events:r?[r]:[]};lC.push(n)},"addTask"),oWe=_(function(t){lC.find(r=>r.id===QHe-1).events.push(t)},"addEvent"),lWe=_(function(t){const e={section:oC,type:oC,description:t,task:t,classes:[]};iR.push(e)},"addTaskOrg"),cWe=_(function(){const t=_(function(r){return lC[r].processed},"compileTask");let e=!0;for(const[r,n]of lC.entries())t(r),e=e&&n.processed;return e},"compileTasks"),upr={clear:eWe,getCommonDb:JHe,getDirection:rWe,setDirection:tWe,addSection:nWe,getSections:aWe,getTasks:iWe,addTask:sWe,addTaskOrg:lWe,addEvent:oWe},uWe=0,sR=_(function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},"drawRect"),hpr=_(function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");a.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function i(u){const h=$w().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}l(i,"smile"),_(i,"smile");function s(u){const h=$w().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}l(s,"sad"),_(s,"sad");function o(u){u.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return l(o,"ambivalent"),_(o,"ambivalent"),e.score>3?i(a):e.score<3?s(a):o(a),n},"drawFace"),dpr=_(function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},"drawCircle"),hWe=_(function(t,e){const r=e.text.replace(/<br\s*\/?>/gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class!==void 0&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.text(r),n},"drawText"),fpr=_(function(t,e){function r(a,i,s,o,u){return a+","+i+" "+(a+s)+","+i+" "+(a+s)+","+(i+o-u)+" "+(a+s-u*1.2)+","+(i+o)+" "+a+","+(i+o)}l(r,"genPoints"),_(r,"genPoints");const n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,hWe(t,e)},"drawLabel"),ppr=_(function(t,e,r){const n=t.append("g"),a=ote();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="journey-section section-type-"+e.num,a.rx=3,a.ry=3,sR(n,a),dWe(r)(e.text,n,a.x,a.y,a.width,a.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),ste=-1,gpr=_(function(t,e,r,n){const a=e.x+r.width/2,i=t.append("g");ste++;const s=300+5*30;i.append("line").attr("id",n+"-task"+ste).attr("x1",a).attr("y1",e.y).attr("x2",a).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),hpr(i,{cx:a,cy:300+(5-e.score)*30,score:e.score});const o=ote();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=r.width,o.height=r.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,sR(i,o),dWe(r)(e.task,i,o.x,o.y,o.width,o.height,{class:"task"},r,e.colour)},"drawTask"),mpr=_(function(t,e){sR(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),ypr=_(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),ote=_(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),dWe=function(){function t(a,i,s,o,u,h,d,f){const p=i.append("text").attr("x",s+u/2).attr("y",o+h/2+5).style("font-color",f).style("text-anchor","middle").text(a);n(p,d)}l(t,"byText"),_(t,"byText");function e(a,i,s,o,u,h,d,f,p){const{taskFontSize:g,taskFontFamily:m}=f,y=a.split(/<br\s*\/?>/gi);for(let v=0;v<y.length;v++){const b=v*g-g*(y.length-1)/2,w=i.append("text").attr("x",s+u/2).attr("y",o).attr("fill",p).style("text-anchor","middle").style("font-size",g).style("font-family",m);w.append("tspan").attr("x",s+u/2).attr("dy",b).text(y[v]),w.attr("y",o+h/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(w,d)}}l(e,"byTspan"),_(e,"byTspan");function r(a,i,s,o,u,h,d,f){const p=i.append("switch"),m=p.append("foreignObject").attr("x",s).attr("y",o).attr("width",u).attr("height",h).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(a),e(a,p,s,o,u,h,d,f),n(m,d)}l(r,"byFo"),_(r,"byFo");function n(a,i){for(const s in i)s in i&&a.attr(s,i[s])}return l(n,"_setTextAttrs"),_(n,"_setTextAttrs"),function(a){return a.textPlacement==="fo"?r:a.textPlacement==="old"?t:e}}(),vpr=_(function(t,e){uWe=0,ste=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function lte(t,e){t.each(function(){var r=Yt(this),n=r.text().split(/(\s+|<br>)/).reverse(),a,i=[],s=1.1,o=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",u+"em");for(let d=0;d<n.length;d++)a=n[n.length-1-d],i.push(a),h.text(i.join(" ").trim()),(h.node().getComputedTextLength()>e||a==="<br>")&&(i.pop(),h.text(i.join(" ").trim()),a==="<br>"?i=[""]:i=[a],h=r.append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em").text(a))})}l(lte,"wrap"),_(lte,"wrap");var bpr=_(function(t,e,r,n,a,i=!1){var b,w,x,T,C,S;const{theme:s,look:o}=n,u=s==null?void 0:s.includes("redux"),h=(w=(b=n==null?void 0:n.themeVariables)==null?void 0:b.THEME_COLOR_LIMIT)!=null?w:12,d=r%h-1,f=t.append("g");e.section=d,f.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+d));const p=f.append("g"),g=f.append("g"),y=g.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(lte,e.width).node().getBBox(),v=(x=n.fontSize)!=null&&x.replace?n.fontSize.replace("px",""):n.fontSize;if(e.height=y.height+v*1.1*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,g.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),u&&g.attr("transform",`translate(${e.width/2}, ${i?e.padding/2+3:e.padding})`),wpr(p,e,d,a,n),o==="neo"&&(f.attr("data-look","neo"),u)){const E=s.includes("dark"),k=(C=(T=t.node())==null?void 0:T.ownerSVGElement)!=null?C:t.node(),A=Yt(k),I=(S=A.attr("id"))!=null?S:"",L=I?`${I}-drop-shadow`:"drop-shadow";if(A.select(`#${L}`).empty()){const R=A.select("defs");(R.empty()?A.append("defs"):R).append("filter").attr("id",L).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",E?"0.2":"0.06").attr("flood-color",E?"#FFFFFF":"#000000")}}return e},"drawNode"),xpr=_(function(t,e,r){var o;const n=t.append("g"),i=n.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(lte,e.width).node().getBBox(),s=(o=r.fontSize)!=null&&o.replace?r.fontSize.replace("px",""):r.fontSize;return n.remove(),i.height+s*1.1*.5+e.padding},"getVirtualNodeHeight"),wpr=_(function(t,e,r,n,a){const{theme:i}=a,s=i!=null&&i.includes("redux")?0:5,o=5,u=s>0?`M0 ${e.height-o} v${-e.height+2*o} q0,-${s},${s},-${s} h${e.width-2*o} q${s},0,${s},${s} v${e.height-o} H0 Z`:`M0 ${e.height-o} v${-(e.height-o)} h${e.width} v${e.height} H0 Z`;t.append("path").attr("id",n+"-node-"+uWe++).attr("class","node-bkg node-"+e.type).attr("d",u),i!=null&&i.includes("redux")||t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),tc={drawRect:sR,drawCircle:dpr,drawSection:ppr,drawText:hWe,drawLabel:fpr,drawTask:gpr,drawBackgroundRect:mpr,getTextObj:ypr,getNoteRect:ote,initGraphics:vpr,drawNode:bpr,getVirtualNodeHeight:xpr},Tpr=_(function(t,e,r,n){var P,z,D,B,W,U;const a=ft(),{look:i,theme:s,themeVariables:o}=a,{useGradient:u,gradientStart:h,gradientStop:d}=o,f=(z=(P=a.timeline)==null?void 0:P.leftMargin)!=null?z:50;Le.debug("timeline",n.db);const p=a.securityLevel;let g;p==="sandbox"&&(g=Yt("#i"+e));const y=Yt(p==="sandbox"?g.nodes()[0].contentDocument.body:"body").select("#"+e);y.append("g");const v=n.db.getTasks(),b=n.db.getCommonDb().getDiagramTitle();Le.debug("task",v),tc.initGraphics(y,e);const w=n.db.getSections();Le.debug("sections",w);let x=0,T=0,C=0,S=0,E=50+f,k=50;S=50;let A=0,I=!0;w.forEach(function(j){const V={number:A,descr:j,section:A,width:150,padding:20,maxHeight:x},Y=tc.getVirtualNodeHeight(y,V,a);Le.debug("sectionHeight before draw",Y),x=Math.max(x,Y+20)});let L=0,R=0;Le.debug("tasks.length",v.length);for(const[j,V]of v.entries()){const Y={number:j,descr:V,section:V.section,width:150,padding:20,maxHeight:T},H=tc.getVirtualNodeHeight(y,Y,a);Le.debug("taskHeight before draw",H),T=Math.max(T,H+20),L=Math.max(L,V.events.length);let q=0;for(const Z of V.events){const K={descr:Z,section:V.section,number:V.section,width:150,padding:20,maxHeight:50};q+=tc.getVirtualNodeHeight(y,K,a)}V.events.length>0&&(q+=(V.events.length-1)*10),R=Math.max(R,q)}Le.debug("maxSectionHeight before draw",x),Le.debug("maxTaskHeight before draw",T),w&&w.length>0?w.forEach(j=>{const V=v.filter(Z=>Z.section===j),Y={number:A,descr:j,section:A,width:200*Math.max(V.length,1)-50,padding:20,maxHeight:x};Le.debug("sectionNode",Y);const H=y.append("g"),q=tc.drawNode(H,Y,A,a,e);Le.debug("sectionNode output",q),H.attr("transform",`translate(${E}, ${S})`),k+=x+50,V.length>0&&fWe(y,V,A,E,k,T,a,L,R,x,!1,e),E+=200*Math.max(V.length,1),k=S,A++}):(I=!1,fWe(y,v,A,E,k,T,a,L,R,x,!0,e));const O=y.node().getBBox();if(Le.debug("bounds",O),b&&y.append("text").text(b).attr("x",i==="neo"?O.x*2+f:O.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),C=I?x+T+150:T+100,y.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",C).attr("x2",O.width+3*f).attr("y2",C).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),i==="neo"&&u&&s!=="neutral"){const j=y.select("defs"),Y=(j.empty()?y.append("defs"):j).append("linearGradient").attr("id",y.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");Y.append("stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),Y.append("stop").attr("offset","100%").attr("stop-color",d).attr("stop-opacity",1)}xw(void 0,y,(B=(D=a.timeline)==null?void 0:D.padding)!=null?B:50,(U=(W=a.timeline)==null?void 0:W.useMaxWidth)!=null?U:!1)},"draw"),fWe=_(function(t,e,r,n,a,i,s,o,u,h,d,f){var p;for(const g of e){const m={descr:g.task,section:r,number:r,width:150,padding:20,maxHeight:i};Le.debug("taskNode",m);const y=t.append("g").attr("class","taskWrapper"),b=tc.drawNode(y,m,r,s,f).height;if(Le.debug("taskHeight after draw",b),y.attr("transform",`translate(${n}, ${a})`),i=Math.max(i,b),g.events){const w=t.append("g").attr("class","lineWrapper");let x=i;a+=100,x=x+Epr(t,g.events,r,n,a,s,f),a-=100,w.append("line").attr("x1",n+190/2).attr("y1",a+i).attr("x2",n+190/2).attr("y2",a+i+100+u+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${f}-arrowhead)`).attr("stroke-dasharray","5,5")}n=n+200,d&&!((p=s.timeline)!=null&&p.disableMulticolor)&&r++}a=a-10},"drawTasks"),Epr=_(function(t,e,r,n,a,i,s){let o=0;const u=a;a=a+100;for(const h of e){const d={descr:h,section:r,number:r,width:150,padding:20,maxHeight:50};Le.debug("eventNode",d);const f=t.append("g").attr("class","eventWrapper"),g=tc.drawNode(f,d,r,i,s,!0).height;o=o+g,f.attr("transform",`translate(${n}, ${a})`),a=a+10+g}return a=u,o},"drawEvents"),Cpr={setConf:_(()=>{},"setConf"),draw:Tpr},oR=200,o0=5,Spr=oR+o0*2,cte=oR+100,_pr=cte+o0*2,pWe=10,kpr=0,gWe=20,mWe=20,yWe=30,vWe=50,Apr=_(function(t,e,r,n){var P,z,D,B,W,U,j,V;const a=ft(),i=(z=(P=a.timeline)==null?void 0:P.leftMargin)!=null?z:50;Le.debug("timeline",n.db);const s=$o(e);s.append("g");const o=n.db.getTasks(),u=n.db.getCommonDb().getDiagramTitle();Le.debug("task",o),tc.initGraphics(s);const h=n.db.getSections();Le.debug("sections",h);let d=0,f=0;const p=50+i;let g=50;const m=g,y=p,v=Spr+mWe,b=_pr+vWe,w=y+v;let x=0;const T=h&&h.length>0,C=T?w:p+v,S=Math.max(50,v+b-o0*2);h.forEach(function(Y){const H={number:x,descr:Y,section:x,width:S,padding:o0,maxHeight:d},q=tc.getVirtualNodeHeight(s,H,a);Le.debug("sectionHeight before draw",q),d=Math.max(d,q)});let E=0;Le.debug("tasks.length",o.length);for(const[Y,H]of o.entries()){const q={number:Y,descr:H,section:H.section,width:oR,padding:o0,maxHeight:f},Z=tc.getVirtualNodeHeight(s,q,a);Le.debug("taskHeight before draw",Z),f=Math.max(f,Z);let K=0;for(const re of H.events){const Q={descr:re,section:H.section,number:H.section,width:cte,padding:o0,maxHeight:50};K+=tc.getVirtualNodeHeight(s,Q,a)}H.events.length>0&&(K+=(H.events.length-1)*pWe),E=Math.max(E,K)+kpr}Le.debug("maxSectionHeight before draw",d),Le.debug("maxTaskHeight before draw",f);const A=Math.max(f,E)+yWe;T?h.forEach(Y=>{const H=o.filter(J=>J.section===Y),q={number:x,descr:Y,section:x,width:S,padding:o0,maxHeight:d};Le.debug("sectionNode",q);const Z=s.append("g"),K=tc.drawNode(Z,q,x,a);Le.debug("sectionNode output",K);const re=C-v;Z.attr("transform",`translate(${re}, ${g})`);const Q=g+K.height+gWe;H.length>0&&bWe(s,H,x,C,Q,f,a,A,!1);const te=H.length,ee=K.height+gWe+A*Math.max(te,1)-(te>0?yWe*2:0);g+=ee,x++}):bWe(s,o,x,C,g,f,a,A,!0);let I=(D=s.node())==null?void 0:D.getBBox();if(!I)throw new Error("bbox not found");if(Le.debug("bounds",I),u){if(s.append("text").text(u).attr("x",I.width/2-i).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),I=(B=s.node())==null?void 0:B.getBBox(),!I)throw new Error("bbox not found");Le.debug("bounds after title",I)}const[L]=cf(a.fontSize),R=(L!=null?L:16)*2,O=(L!=null?L:16)*.5+20,M=s.append("g").attr("class","lineWrapper");M.append("line").attr("x1",C).attr("y1",m-R).attr("x2",C).attr("y2",I.y+I.height+O).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),M.lower(),xw(void 0,s,(U=(W=a.timeline)==null?void 0:W.padding)!=null?U:50,(V=(j=a.timeline)==null?void 0:j.useMaxWidth)!=null?V:!1)},"draw"),bWe=_(function(t,e,r,n,a,i,s,o,u){var h;for(const d of e){const f={descr:d.task,section:r,number:r,width:oR,padding:o0,maxHeight:i};Le.debug("taskNode",f);const p=t.append("g").attr("class","taskWrapper"),g=tc.drawNode(p,f,r,s),m=g.height;Le.debug("taskHeight after draw",m);const y=n-mWe-g.width;if(p.attr("transform",`translate(${y}, ${a})`),i=Math.max(i,m),d.events&&d.events.length>0){const v=a,b=n+vWe;Npr(t,d.events,r,n,b,v,s)}a=a+o,u&&!((h=s.timeline)!=null&&h.disableMulticolor)&&r++}},"drawTasks"),Npr=_(function(t,e,r,n,a,i,s){let o=i;for(const u of e){const h={descr:u,section:r,number:r,width:cte,padding:o0,maxHeight:0};Le.debug("eventNode",h);const d=t.append("g").attr("class","eventWrapper"),p=tc.drawNode(d,h,r,s).height;d.attr("transform",`translate(${a}, ${o})`);const g=t.append("g").attr("class","lineWrapper"),m=o+p/2;g.append("line").attr("x1",n).attr("y1",m).attr("x2",a).attr("y2",m).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),o=o+p+pWe}return o-i},"drawEvents"),Ipr={setConf:_(()=>{},"setConf"),draw:Apr},Lpr=_(t=>{var o,u,h,d,f;const{theme:e}=Ar(),r=e==null?void 0:e.includes("dark"),n=e==null?void 0:e.includes("color"),a=(u=(o=t.svgId)==null?void 0:o.replace(/^#/,""))!=null?u:"",i=a?`url(#${a}-drop-shadow)`:(h=t.dropShadow)!=null?h:"none";let s="";for(let p=0;p<t.THEME_COLOR_LIMIT;p++){const g=`${17-3*p}`,m=n?t.borderColorArray[p]:t.mainBkg,y=n?t.borderColorArray[p]:t.nodeBorder;s+=`
|
||
.section-${p-1} rect,
|
||
.section-${p-1} path,
|
||
.section-${p-1} circle {
|
||
fill: ${r&&n?t.mainBkg:m};
|
||
stroke: ${y};
|
||
stroke-width: ${t.strokeWidth};
|
||
filter: ${i};
|
||
}
|
||
|
||
.section-${p-1} text {
|
||
fill: ${t.nodeBorder};
|
||
font-weight: ${t.fontWeight}
|
||
}
|
||
|
||
.node-icon-${p-1} {
|
||
font-size: 40px;
|
||
color: ${t["cScaleLabel"+p]};
|
||
}
|
||
|
||
.section-edge-${p-1} {
|
||
stroke: ${t["cScale"+p]};
|
||
}
|
||
|
||
.edge-depth-${p-1} {
|
||
stroke-width: ${g};
|
||
}
|
||
|
||
.section-${p-1} line {
|
||
stroke: ${t["cScaleInv"+p]};
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.lineWrapper line {
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width:${t.strokeWidth}
|
||
}
|
||
|
||
.disabled,
|
||
.disabled circle,
|
||
.disabled text {
|
||
fill: ${(d=t.tertiaryColor)!=null?d:"lightgray"};
|
||
}
|
||
|
||
.disabled text {
|
||
fill: ${(f=t.clusterBorder)!=null?f:"#efefef"};
|
||
}
|
||
`}return s},"genReduxSections"),$pr=_(t=>{var r,n;let e="";for(let a=0;a<t.THEME_COLOR_LIMIT;a++)t["lineColor"+a]=t["lineColor"+a]||t["cScaleInv"+a],Ko(t["lineColor"+a])?t["lineColor"+a]=Wt(t["lineColor"+a],20):t["lineColor"+a]=Vt(t["lineColor"+a],20);for(let a=0;a<t.THEME_COLOR_LIMIT;a++){const i=""+(17-3*a);e+=`
|
||
.section-${a-1} rect, .section-${a-1} path, .section-${a-1} circle, .section-${a-1} path {
|
||
fill: ${t["cScale"+a]};
|
||
}
|
||
.section-${a-1} text {
|
||
fill: ${t["cScaleLabel"+a]};
|
||
}
|
||
.node-icon-${a-1} {
|
||
font-size: 40px;
|
||
color: ${t["cScaleLabel"+a]};
|
||
}
|
||
.section-edge-${a-1}{
|
||
stroke: ${t["cScale"+a]};
|
||
}
|
||
.edge-depth-${a-1}{
|
||
stroke-width: ${i};
|
||
}
|
||
.section-${a-1} line {
|
||
stroke: ${t["cScaleInv"+a]} ;
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.lineWrapper line{
|
||
stroke: ${t["cScaleLabel"+a]} ;
|
||
}
|
||
|
||
.disabled, .disabled circle, .disabled text {
|
||
fill: ${(r=t.tertiaryColor)!=null?r:"lightgray"};
|
||
}
|
||
.disabled text {
|
||
fill: ${(n=t.clusterBorder)!=null?n:"#efefef"};
|
||
}
|
||
`}return e},"genSections"),Mpr=_(t=>{var s,o;const{theme:e}=Ar(),r=e==null?void 0:e.includes("redux"),n=e==="neutral",a=(o=(s=t.svgId)==null?void 0:s.replace(/^#/,""))!=null?o:"";let i="";if(t.useGradient&&a&&t.THEME_COLOR_LIMIT&&!n)for(let u=0;u<t.THEME_COLOR_LIMIT;u++)i+=`
|
||
.section-${u-1}[data-look="neo"] rect,
|
||
.section-${u-1}[data-look="neo"] path,
|
||
.section-${u-1}[data-look="neo"] circle {
|
||
fill: ${t.mainBkg};
|
||
stroke: url(#${a}-gradient);
|
||
stroke-width: 2;
|
||
}
|
||
.section-${u-1}[data-look="neo"] line {
|
||
stroke: url(#${a}-gradient);
|
||
stroke-width: 2;
|
||
}`;return`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${r?Lpr(t):$pr(t)}
|
||
${i}
|
||
.section-root rect, .section-root path, .section-root circle {
|
||
fill: ${t.git0};
|
||
}
|
||
.section-root text {
|
||
fill: ${t.gitBranchLabel0};
|
||
}
|
||
.icon-container {
|
||
height:100%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.edge {
|
||
fill: none;
|
||
}
|
||
.eventWrapper {
|
||
filter: brightness(120%);
|
||
}
|
||
`},"getStyles"),Ppr=Mpr,Rpr={setConf:_(()=>{},"setConf"),draw:_((t,e,r,n)=>{var i,s,o;return((o=(s=(i=n==null?void 0:n.db)==null?void 0:i.getDirection)==null?void 0:s.call(i))!=null?o:"LR")==="TD"?Ipr.draw(t,e,r,n):Cpr.draw(t,e,r,n)},"draw")},Opr={db:ZHe,renderer:Rpr,parser:cpr,styles:Ppr},Dpr=Object.freeze({__proto__:null,diagram:Opr});const vo=[];for(let t=0;t<256;++t)vo.push((t+256).toString(16).slice(1));function Fpr(t,e=0){return(vo[t[e+0]]+vo[t[e+1]]+vo[t[e+2]]+vo[t[e+3]]+"-"+vo[t[e+4]]+vo[t[e+5]]+"-"+vo[t[e+6]]+vo[t[e+7]]+"-"+vo[t[e+8]]+vo[t[e+9]]+"-"+vo[t[e+10]]+vo[t[e+11]]+vo[t[e+12]]+vo[t[e+13]]+vo[t[e+14]]+vo[t[e+15]]).toLowerCase()}l(Fpr,"unsafeStringify");const Bpr=new Uint8Array(16);function zpr(){return crypto.getRandomValues(Bpr)}l(zpr,"rng");function Hpr(t,e,r){return crypto.randomUUID?crypto.randomUUID():Wpr(t)}l(Hpr,"v4");function Wpr(t,e,r){var a,i,s;t=t||{};const n=(s=(i=t.random)!=null?i:(a=t.rng)==null?void 0:a.call(t))!=null?s:zpr();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Fpr(n)}l(Wpr,"_v4");var ute=function(){var t=_(function(T,C,S,E){for(S=S||{},E=T.length;E--;S[T[E]]=C);return S},"o"),e=[1,4],r=[1,13],n=[1,12],a=[1,15],i=[1,16],s=[1,20],o=[1,19],u=[6,7,8],h=[1,26],d=[1,24],f=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],m=[1,33],y=[1,34],v=[1,6,7,11,13,15,16,19,22],b={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:_(l(function(C,S,E,k,A,I,L){var R=I.length-1;switch(A){case 6:case 7:return k;case 8:k.getLogger().trace("Stop NL ");break;case 9:k.getLogger().trace("Stop EOF ");break;case 11:k.getLogger().trace("Stop NL2 ");break;case 12:k.getLogger().trace("Stop EOF2 ");break;case 15:k.getLogger().info("Node: ",I[R].id),k.addNode(I[R-1].length,I[R].id,I[R].descr,I[R].type);break;case 16:k.getLogger().trace("Icon: ",I[R]),k.decorateNode({icon:I[R]});break;case 17:case 21:k.decorateNode({class:I[R]});break;case 18:k.getLogger().trace("SPACELIST");break;case 19:k.getLogger().trace("Node: ",I[R].id),k.addNode(0,I[R].id,I[R].descr,I[R].type);break;case 20:k.decorateNode({icon:I[R]});break;case 25:k.getLogger().trace("node found ..",I[R-2]),this.$={id:I[R-1],descr:I[R-1],type:k.getType(I[R-2],I[R])};break;case 26:this.$={id:I[R],descr:I[R],type:k.nodeType.DEFAULT};break;case 27:k.getLogger().trace("node found ..",I[R-3]),this.$={id:I[R-3],descr:I[R-1],type:k.getType(I[R-2],I[R])};break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:a,16:i,17:17,18:18,19:s,22:o},t(u,[2,3]),{1:[2,2]},t(u,[2,4]),t(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:a,16:i,17:17,18:18,19:s,22:o},{6:r,9:22,12:11,13:n,14:14,15:a,16:i,17:17,18:18,19:s,22:o},{6:h,7:d,10:23,11:f},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:o}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:a,16:i,17:17,18:18,19:s,22:o},t(g,[2,14],{7:m,11:y}),t(v,[2,8]),t(v,[2,9]),t(v,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(g,[2,13],{7:m,11:y}),t(v,[2,11]),t(v,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:_(l(function(C,S){if(S.recoverable)this.trace(C);else{var E=new Error(C);throw E.hash=S,E}},"parseError"),"parseError"),parse:_(l(function(C){var S=this,E=[0],k=[],A=[null],I=[],L=this.table,R="",O=0,M=0,P=2,z=1,D=I.slice.call(arguments,1),B=Object.create(this.lexer),W={yy:{}};for(var U in this.yy)Object.prototype.hasOwnProperty.call(this.yy,U)&&(W.yy[U]=this.yy[U]);B.setInput(C,W.yy),W.yy.lexer=B,W.yy.parser=this,typeof B.yylloc=="undefined"&&(B.yylloc={});var j=B.yylloc;I.push(j);var V=B.options&&B.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(fe){E.length=E.length-2*fe,A.length=A.length-fe,I.length=I.length-fe}l(Y,"popStack"),_(Y,"popStack");function H(){var fe;return fe=k.pop()||B.lex()||z,typeof fe!="number"&&(fe instanceof Array&&(k=fe,fe=k.pop()),fe=S.symbols_[fe]||fe),fe}l(H,"lex"),_(H,"lex");for(var q,Z,K,re,Q={},te,ee,J,ae;;){if(Z=E[E.length-1],this.defaultActions[Z]?K=this.defaultActions[Z]:((q===null||typeof q=="undefined")&&(q=H()),K=L[Z]&&L[Z][q]),typeof K=="undefined"||!K.length||!K[0]){var se="";ae=[];for(te in L[Z])this.terminals_[te]&&te>P&&ae.push("'"+this.terminals_[te]+"'");B.showPosition?se="Parse error on line "+(O+1)+`:
|
||
`+B.showPosition()+`
|
||
Expecting `+ae.join(", ")+", got '"+(this.terminals_[q]||q)+"'":se="Parse error on line "+(O+1)+": Unexpected "+(q==z?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(se,{text:B.match,token:this.terminals_[q]||q,line:B.yylineno,loc:j,expected:ae})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+q);switch(K[0]){case 1:E.push(q),A.push(B.yytext),I.push(B.yylloc),E.push(K[1]),q=null,M=B.yyleng,R=B.yytext,O=B.yylineno,j=B.yylloc;break;case 2:if(ee=this.productions_[K[1]][1],Q.$=A[A.length-ee],Q._$={first_line:I[I.length-(ee||1)].first_line,last_line:I[I.length-1].last_line,first_column:I[I.length-(ee||1)].first_column,last_column:I[I.length-1].last_column},V&&(Q._$.range=[I[I.length-(ee||1)].range[0],I[I.length-1].range[1]]),re=this.performAction.apply(Q,[R,M,O,W.yy,K[1],A,I].concat(D)),typeof re!="undefined")return re;ee&&(E=E.slice(0,-1*ee*2),A=A.slice(0,-1*ee),I=I.slice(0,-1*ee)),E.push(this.productions_[K[1]][0]),A.push(Q.$),I.push(Q._$),J=L[E[E.length-2]][E[E.length-1]],E.push(J);break;case 3:return!0}}return!0},"parse"),"parse")},w=function(){var T={EOF:1,parseError:_(l(function(S,E){if(this.yy.parser)this.yy.parser.parseError(S,E);else throw new Error(S)},"parseError"),"parseError"),setInput:_(function(C,S){return this.yy=S||this.yy||{},this._input=C,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var S=C.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),C},"input"),unput:_(function(C){var S=C.length,E=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var k=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),E.length-1&&(this.yylineno-=E.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===k.length?this.yylloc.first_column:0)+k[k.length-E.length].length-E[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(C){this.unput(this.match.slice(C))},"less"),pastInput:_(function(){var C=this.matched.substr(0,this.matched.length-this.match.length);return(C.length>20?"...":"")+C.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var C=this.match;return C.length<20&&(C+=this._input.substr(0,20-C.length)),(C.substr(0,20)+(C.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var C=this.pastInput(),S=new Array(C.length+1).join("-");return C+this.upcomingInput()+`
|
||
`+S+"^"},"showPosition"),test_match:_(function(C,S){var E,k,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),k=C[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+C[0].length},this.yytext+=C[0],this.match+=C[0],this.matches=C,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(C[0].length),this.matched+=C[0],E=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var I in A)this[I]=A[I];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,S,E,k;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),I=0;I<A.length;I++)if(E=this._input.match(this.rules[A[I]]),E&&(!S||E[0].length>S[0].length)){if(S=E,k=I,this.options.backtrack_lexer){if(C=this.test_match(E,A[I]),C!==!1)return C;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(C=this.test_match(S,A[k]),C!==!1?C:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var S=this.next();return S||this.lex()},"lex"),"lex"),begin:_(l(function(S){this.conditionStack.push(S)},"begin"),"begin"),popState:_(l(function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(S){this.begin(S)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(S,E,k,A){switch(k){case 0:return S.getLogger().trace("Found comment",E.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:S.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return S.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:S.getLogger().trace("end icon"),this.popState();break;case 10:return S.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return S.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return S.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return S.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:S.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return S.getLogger().trace("description:",E.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),S.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),S.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),S.getLogger().trace("node end ...",E.yytext),"NODE_DEND";case 30:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),S.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),S.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),S.getLogger().trace("node end (("),"NODE_DEND";case 35:return S.getLogger().trace("Long description:",E.yytext),20;case 36:return S.getLogger().trace("Long description:",E.yytext),20}},"anonymous"),"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return T}();b.lexer=w;function x(){this.yy={}}return l(x,"Parser"),_(x,"Parser"),x.prototype=b,b.Parser=x,new x}();ute.parser=ute;var Vpr=ute,Gpr=12,l0={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},qpr=(ex=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=l0,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let r=this.nodes.length-1;r>=0;r--)if(this.nodes[r].level<e)return this.nodes[r];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,r,n,a){var d,f,p,g;Le.info("addNode",e,r,n,a);let i=!1;this.nodes.length===0?(this.baseLevel=e,e=0,i=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,i=!1);const s=ft();let o=(f=(d=s.mindmap)==null?void 0:d.padding)!=null?f:hn.mindmap.padding;switch(a){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:o*=2;break}const u={id:this.count++,nodeId:mn(r,s),level:e,descr:mn(n,s),type:a,children:[],width:(g=(p=s.mindmap)==null?void 0:p.maxNodeWidth)!=null?g:hn.mindmap.maxNodeWidth,padding:o,isRoot:i},h=this.getParent(e);if(h)h.children.push(u),this.nodes.push(u);else if(i)this.nodes.push(u);else throw new Error(`There can be only one root. No parent could be found for ("${u.descr}")`)}getType(e,r){switch(Le.debug("In get type",e,r),e){case"[":return this.nodeType.RECT;case"(":return r===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,r){this.elements[e]=r}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const r=ft(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=mn(e.icon,r)),e.class&&(n.class=mn(e.class,r))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,r){if(e.level===0?e.section=void 0:e.section=r,e.children)for(const[n,a]of e.children.entries()){const i=e.level===0?n%(Gpr-1):r;this.assignSections(a,i)}}flattenNodes(e,r){var u;const n=ft(),a=["mindmap-node"];e.isRoot===!0?a.push("section-root","section--1"):e.section!==void 0&&a.push(`section-${e.section}`),e.class&&a.push(e.class);const i=a.join(" "),s=_(h=>{var p,g;const f=((g=(p=n.theme)==null?void 0:p.toLowerCase())!=null?g:"").includes("redux");switch(h){case l0.CIRCLE:return"mindmapCircle";case l0.RECT:return"rect";case l0.ROUNDED_RECT:return"rounded";case l0.CLOUD:return"cloud";case l0.BANG:return"bang";case l0.HEXAGON:return"hexagon";case l0.DEFAULT:return f?"rounded":"defaultMindmapNode";case l0.NO_BORDER:default:return"rect"}},"getShapeFromType"),o={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:s(e.type),width:e.width,height:(u=e.height)!=null?u:0,padding:e.padding,cssClasses:i,cssStyles:[],look:n.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(r.push(o),e.children)for(const h of e.children)this.flattenNodes(h,r)}generateEdges(e,r){if(!e.children)return;const n=ft();for(const a of e.children){let i="edge";a.section!==void 0&&(i+=` section-edge-${a.section}`);const s=e.level+1;i+=` edge-depth-${s}`;const o={id:`edge_${e.id}_${a.id}`,start:e.id.toString(),end:a.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:i,depth:e.level,section:a.section};r.push(o),this.generateEdges(a,r)}}getData(){const e=this.getMindmap(),r=ft(),a=eme().layout!==void 0,i=r;if(a||(i.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:i};Le.debug("getData: mindmapRoot",e,r),this.assignSections(e);const s=[],o=[];this.flattenNodes(e,s),this.generateEdges(e,o),Le.debug(`getData: processed ${s.length} nodes and ${o.length} edges`);const u=new Map;for(const h of s)u.set(h.id,{shape:h.shape,width:h.width,height:h.height,padding:h.padding});return{nodes:s,edges:o,config:i,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(u),type:"mindmap",diagramId:"mindmap-"+Hpr()}}getLogger(){return Le}},l(ex,"MindmapDB"),_(ex,"MindmapDB"),ex),Ypr=_((t,e,r,n)=>nt(this,null,function*(){var p,g,m,y;Le.debug(`Rendering mindmap diagram
|
||
`+t);const a=n.db,i=a.getData(),s=jT(e,i.config.securityLevel);if(i.type=n.type,i.layoutAlgorithm=k3(i.config.layout,{fallback:"cose-bilkent"}),i.diagramId=e,!a.getMindmap())return;i.nodes.forEach(v=>{v.shape==="rounded"?(v.radius=15,v.taper=15,v.stroke="none",v.width=0,v.padding=15):v.shape==="circle"?v.padding=10:v.shape==="rect"?(v.width=0,v.padding=10):v.shape==="hexagon"&&(v.width=0,v.height=0)}),yield Uw(i,s);const{themeVariables:u}=Ar(),{useGradient:h,gradientStart:d,gradientStop:f}=u;if(h&&d&&f){const v=s.attr("id"),b=s.append("defs").append("linearGradient").attr("id",`${v}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",d).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",f).attr("stop-opacity",1)}c1(s,(g=(p=i.config.mindmap)==null?void 0:p.padding)!=null?g:hn.mindmap.padding,"mindmapDiagram",(y=(m=i.config.mindmap)==null?void 0:m.useMaxWidth)!=null?y:hn.mindmap.useMaxWidth)}),"draw"),Upr={draw:Ypr},jpr=_(t=>{var a;const{theme:e,look:r}=t;let n="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],Ko(t["lineColor"+i])?t["lineColor"+i]=Wt(t["lineColor"+i],20):t["lineColor"+i]=Vt(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){const s=""+(r==="neo"?Math.max(10-(i-1)*2,2):17-3*i);n+=`
|
||
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
|
||
fill: ${t["cScale"+i]};
|
||
}
|
||
.section-${i-1} text {
|
||
fill: ${t["cScaleLabel"+i]};
|
||
}
|
||
.section-${i-1} span {
|
||
color: ${t["cScaleLabel"+i]};
|
||
}
|
||
.node-icon-${i-1} {
|
||
font-size: 40px;
|
||
color: ${t["cScaleLabel"+i]};
|
||
}
|
||
.section-edge-${i-1}{
|
||
stroke: ${t["cScale"+i]};
|
||
}
|
||
.edge-depth-${i-1}{
|
||
stroke-width: ${s};
|
||
}
|
||
.section-${i-1} line {
|
||
stroke: ${t["cScaleInv"+i]} ;
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.disabled, .disabled circle, .disabled text {
|
||
fill: lightgray;
|
||
}
|
||
.disabled text {
|
||
fill: #efefef;
|
||
}
|
||
[data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {
|
||
fill: ${e==="redux"||e==="redux-dark"||e==="neutral"?t.mainBkg:t["cScale"+i]};
|
||
stroke: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScale"+i]};
|
||
stroke-width: ${(a=t.strokeWidth)!=null?a:2}px;
|
||
}
|
||
[data-look="neo"].section-edge-${i-1}{
|
||
stroke: ${e!=null&&e.includes("redux")||e==="neo-dark"?t.nodeBorder:t["cScale"+i]};
|
||
}
|
||
[data-look="neo"].mindmap-node.section-${i-1} text {
|
||
fill: ${e==="redux"||e==="redux-dark"?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:i)]};
|
||
}
|
||
`}return n},"genSections"),Kpr=_((t,e,r)=>{let n="";for(let a=0;a<t;a++)n+=`
|
||
[data-look="neo"].mindmap-node.section-${a-1} rect, [data-look="neo"].mindmap-node.section-${a-1} path, [data-look="neo"].mindmap-node.section-${a-1} circle, [data-look="neo"].mindmap-node.section-${a-1} polygon {
|
||
stroke: url(${e}-gradient);
|
||
fill: ${r};
|
||
}
|
||
.section-${a-1} line {
|
||
stroke-width: 0;
|
||
}`;return n},"genGradient"),Xpr=_(t=>{const{theme:e}=t,r=t.svgId,n=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${r}-drop-shadow)`):"none";return`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${jpr(t)}
|
||
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
||
fill: ${t.git0};
|
||
}
|
||
.section-root text {
|
||
fill: ${t.gitBranchLabel0};
|
||
}
|
||
.section-root span {
|
||
color: ${e!=null&&e.includes("redux")?t.nodeBorder:t.gitBranchLabel0};
|
||
}
|
||
.icon-container {
|
||
height:100%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.edge {
|
||
fill: none;
|
||
}
|
||
.mindmap-node-label {
|
||
dy: 1em;
|
||
alignment-baseline: middle;
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
text-align: center;
|
||
}
|
||
[data-look="neo"].mindmap-node {
|
||
filter: ${n};
|
||
}
|
||
[data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
|
||
fill: ${e!=null&&e.includes("redux")?t.mainBkg:t.git0};
|
||
}
|
||
[data-look="neo"].mindmap-node.section-root .text-inner-tspan {
|
||
fill: ${e!=null&&e.includes("redux")?t.nodeBorder:t["cScaleLabel"+(e==="neutral"?1:0)]};
|
||
}
|
||
${t.useGradient&&r&&t.mainBkg?Kpr(t.THEME_COLOR_LIMIT,r,t.mainBkg):""}
|
||
`},"getStyles"),Zpr=Xpr,Qpr={get db(){return new qpr},renderer:Upr,parser:Vpr,styles:Zpr},Jpr=Object.freeze({__proto__:null,diagram:Qpr}),hte=function(){var t=_(function(E,k,A,I){for(A=A||{},I=E.length;I--;A[E[I]]=k);return A},"o"),e=[1,4],r=[1,13],n=[1,12],a=[1,15],i=[1,16],s=[1,20],o=[1,19],u=[6,7,8],h=[1,26],d=[1,24],f=[1,25],p=[6,7,11],g=[1,31],m=[6,7,11,24],y=[1,6,13,16,17,20,23],v=[1,35],b=[1,36],w=[1,6,7,11,13,16,17,20,23],x=[1,38],T={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:_(l(function(k,A,I,L,R,O,M){var P=O.length-1;switch(R){case 6:case 7:return L;case 8:L.getLogger().trace("Stop NL ");break;case 9:L.getLogger().trace("Stop EOF ");break;case 11:L.getLogger().trace("Stop NL2 ");break;case 12:L.getLogger().trace("Stop EOF2 ");break;case 15:L.getLogger().info("Node: ",O[P-1].id),L.addNode(O[P-2].length,O[P-1].id,O[P-1].descr,O[P-1].type,O[P]);break;case 16:L.getLogger().info("Node: ",O[P].id),L.addNode(O[P-1].length,O[P].id,O[P].descr,O[P].type);break;case 17:L.getLogger().trace("Icon: ",O[P]),L.decorateNode({icon:O[P]});break;case 18:case 23:L.decorateNode({class:O[P]});break;case 19:L.getLogger().trace("SPACELIST");break;case 20:L.getLogger().trace("Node: ",O[P-1].id),L.addNode(0,O[P-1].id,O[P-1].descr,O[P-1].type,O[P]);break;case 21:L.getLogger().trace("Node: ",O[P].id),L.addNode(0,O[P].id,O[P].descr,O[P].type);break;case 22:L.decorateNode({icon:O[P]});break;case 27:L.getLogger().trace("node found ..",O[P-2]),this.$={id:O[P-1],descr:O[P-1],type:L.getType(O[P-2],O[P])};break;case 28:this.$={id:O[P],descr:O[P],type:0};break;case 29:L.getLogger().trace("node found ..",O[P-3]),this.$={id:O[P-3],descr:O[P-1],type:L.getType(O[P-2],O[P])};break;case 30:this.$=O[P-1]+O[P];break;case 31:this.$=O[P];break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:a,17:i,18:17,19:18,20:s,23:o},t(u,[2,3]),{1:[2,2]},t(u,[2,4]),t(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:a,17:i,18:17,19:18,20:s,23:o},{6:r,9:22,12:11,13:n,14:14,16:a,17:i,18:17,19:18,20:s,23:o},{6:h,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:o}),t(p,[2,19]),t(p,[2,21],{15:30,24:g}),t(p,[2,22]),t(p,[2,23]),t(m,[2,25]),t(m,[2,26]),t(m,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:a,17:i,18:17,19:18,20:s,23:o},t(y,[2,14],{7:v,11:b}),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:x}),t(m,[2,31]),{21:[1,39]},{22:[1,40]},t(y,[2,13],{7:v,11:b}),t(w,[2,11]),t(w,[2,12]),t(p,[2,15],{24:x}),t(m,[2,30]),{22:[1,41]},t(m,[2,27]),t(m,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:_(l(function(k,A){if(A.recoverable)this.trace(k);else{var I=new Error(k);throw I.hash=A,I}},"parseError"),"parseError"),parse:_(l(function(k){var A=this,I=[0],L=[],R=[null],O=[],M=this.table,P="",z=0,D=0,B=2,W=1,U=O.slice.call(arguments,1),j=Object.create(this.lexer),V={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(V.yy[Y]=this.yy[Y]);j.setInput(k,V.yy),V.yy.lexer=j,V.yy.parser=this,typeof j.yylloc=="undefined"&&(j.yylloc={});var H=j.yylloc;O.push(H);var q=j.options&&j.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(Ee){I.length=I.length-2*Ee,R.length=R.length-Ee,O.length=O.length-Ee}l(Z,"popStack"),_(Z,"popStack");function K(){var Ee;return Ee=L.pop()||j.lex()||W,typeof Ee!="number"&&(Ee instanceof Array&&(L=Ee,Ee=L.pop()),Ee=A.symbols_[Ee]||Ee),Ee}l(K,"lex"),_(K,"lex");for(var re,Q,te,ee,J={},ae,se,fe,ve;;){if(Q=I[I.length-1],this.defaultActions[Q]?te=this.defaultActions[Q]:((re===null||typeof re=="undefined")&&(re=K()),te=M[Q]&&M[Q][re]),typeof te=="undefined"||!te.length||!te[0]){var de="";ve=[];for(ae in M[Q])this.terminals_[ae]&&ae>B&&ve.push("'"+this.terminals_[ae]+"'");j.showPosition?de="Parse error on line "+(z+1)+`:
|
||
`+j.showPosition()+`
|
||
Expecting `+ve.join(", ")+", got '"+(this.terminals_[re]||re)+"'":de="Parse error on line "+(z+1)+": Unexpected "+(re==W?"end of input":"'"+(this.terminals_[re]||re)+"'"),this.parseError(de,{text:j.match,token:this.terminals_[re]||re,line:j.yylineno,loc:H,expected:ve})}if(te[0]instanceof Array&&te.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+re);switch(te[0]){case 1:I.push(re),R.push(j.yytext),O.push(j.yylloc),I.push(te[1]),re=null,D=j.yyleng,P=j.yytext,z=j.yylineno,H=j.yylloc;break;case 2:if(se=this.productions_[te[1]][1],J.$=R[R.length-se],J._$={first_line:O[O.length-(se||1)].first_line,last_line:O[O.length-1].last_line,first_column:O[O.length-(se||1)].first_column,last_column:O[O.length-1].last_column},q&&(J._$.range=[O[O.length-(se||1)].range[0],O[O.length-1].range[1]]),ee=this.performAction.apply(J,[P,D,z,V.yy,te[1],R,O].concat(U)),typeof ee!="undefined")return ee;se&&(I=I.slice(0,-1*se*2),R=R.slice(0,-1*se),O=O.slice(0,-1*se)),I.push(this.productions_[te[1]][0]),R.push(J.$),O.push(J._$),fe=M[I[I.length-2]][I[I.length-1]],I.push(fe);break;case 3:return!0}}return!0},"parse"),"parse")},C=function(){var E={EOF:1,parseError:_(l(function(A,I){if(this.yy.parser)this.yy.parser.parseError(A,I);else throw new Error(A)},"parseError"),"parseError"),setInput:_(function(k,A){return this.yy=A||this.yy||{},this._input=k,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var A=k.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),k},"input"),unput:_(function(k){var A=k.length,I=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),I.length-1&&(this.yylineno-=I.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:I?(I.length===L.length?this.yylloc.first_column:0)+L[L.length-I.length].length-I[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(k){this.unput(this.match.slice(k))},"less"),pastInput:_(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var k=this.pastInput(),A=new Array(k.length+1).join("-");return k+this.upcomingInput()+`
|
||
`+A+"^"},"showPosition"),test_match:_(function(k,A){var I,L,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),L=k[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(k[0].length),this.matched+=k[0],I=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),I)return I;if(this._backtrack){for(var O in R)this[O]=R[O];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var k,A,I,L;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),O=0;O<R.length;O++)if(I=this._input.match(this.rules[R[O]]),I&&(!A||I[0].length>A[0].length)){if(A=I,L=O,this.options.backtrack_lexer){if(k=this.test_match(I,R[O]),k!==!1)return k;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(k=this.test_match(A,R[L]),k!==!1?k:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var A=this.next();return A||this.lex()},"lex"),"lex"),begin:_(l(function(A){this.conditionStack.push(A)},"begin"),"begin"),popState:_(l(function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(A){this.begin(A)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(A,I,L,R){switch(L){case 0:return this.pushState("shapeData"),I.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const O=/\n\s*/g;return I.yytext=I.yytext.replace(O,"<br/>"),24;case 4:return 24;case 5:this.popState();break;case 6:return A.getLogger().trace("Found comment",I.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:A.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return A.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:A.getLogger().trace("end icon"),this.popState();break;case 16:return A.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return A.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return A.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return A.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:A.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return A.getLogger().trace("description:",I.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),A.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),A.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),A.getLogger().trace("node end ...",I.yytext),"NODE_DEND";case 36:return this.popState(),A.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),A.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),A.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),A.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),A.getLogger().trace("node end (("),"NODE_DEND";case 41:return A.getLogger().trace("Long description:",I.yytext),21;case 42:return A.getLogger().trace("Long description:",I.yytext),21}},"anonymous"),"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return E}();T.lexer=C;function S(){this.yy={}}return l(S,"Parser"),_(S,"Parser"),S.prototype=T,T.Parser=S,new S}();hte.parser=hte;var egr=hte,mu=[],dte=[],fte=0,pte={},tgr=_(()=>{mu=[],dte=[],fte=0,pte={}},"clear"),rgr=_(t=>{if(mu.length===0)return null;const e=mu[0].level;let r=null;for(let n=mu.length-1;n>=0;n--)if(mu[n].level===e&&!r&&(r=mu[n]),mu[n].level<e)throw new Error('Items without section detected, found section ("'+mu[n].label+'")');return t===(r==null?void 0:r.level)?null:r},"getSection"),xWe=_(function(){return dte},"getSections"),ngr=_(function(){var a,i;const t=[],e=[],r=xWe(),n=ft();for(const s of r){const o={id:s.id,label:mn((a=s.label)!=null?a:"",n),labelType:"markdown",isGroup:!0,ticket:s.ticket,shape:"kanbanSection",level:s.level,look:n.look};e.push(o);const u=mu.filter(h=>h.parentId===s.id);for(const h of u){const d={id:h.id,parentId:s.id,label:mn((i=h.label)!=null?i:"",n),labelType:"markdown",isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(d)}}return{nodes:e,edges:t,other:{},config:ft()}},"getData"),agr=_((t,e,r,n,a)=>{var h,d,f,p;const i=ft();let s=(d=(h=i.mindmap)==null?void 0:h.padding)!=null?d:hn.mindmap.padding;switch(n){case bs.ROUNDED_RECT:case bs.RECT:case bs.HEXAGON:s*=2}const o={id:mn(e,i)||"kbn"+fte++,level:t,label:mn(r,i),width:(p=(f=i.mindmap)==null?void 0:f.maxNodeWidth)!=null?p:hn.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(a!==void 0){let g;a.includes(`
|
||
`)?g=a+`
|
||
`:g=`{
|
||
`+a+`
|
||
}`;const m=_7(g,{schema:S7});if(m.shape&&(m.shape!==m.shape.toLowerCase()||m.shape.includes("_")))throw new Error(`No such shape: ${m.shape}. Shape names should be lowercase.`);m!=null&&m.shape&&m.shape==="kanbanItem"&&(o.shape=m==null?void 0:m.shape),m!=null&&m.label&&(o.label=m==null?void 0:m.label),m!=null&&m.icon&&(o.icon=m==null?void 0:m.icon.toString()),m!=null&&m.assigned&&(o.assigned=m==null?void 0:m.assigned.toString()),m!=null&&m.ticket&&(o.ticket=m==null?void 0:m.ticket.toString()),m!=null&&m.priority&&(o.priority=m==null?void 0:m.priority)}const u=rgr(t);u?o.parentId=u.id||"kbn"+fte++:dte.push(o),mu.push(o)},"addNode"),bs={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},igr=_((t,e)=>{switch(Le.debug("In get type",t,e),t){case"[":return bs.RECT;case"(":return e===")"?bs.ROUNDED_RECT:bs.CLOUD;case"((":return bs.CIRCLE;case")":return bs.CLOUD;case"))":return bs.BANG;case"{{":return bs.HEXAGON;default:return bs.DEFAULT}},"getType"),sgr=_((t,e)=>{pte[t]=e},"setElementForId"),ogr=_(t=>{if(!t)return;const e=ft(),r=mu[mu.length-1];t.icon&&(r.icon=mn(t.icon,e)),t.class&&(r.cssClasses=mn(t.class,e))},"decorateNode"),lgr=_(t=>{switch(t){case bs.DEFAULT:return"no-border";case bs.RECT:return"rect";case bs.ROUNDED_RECT:return"rounded-rect";case bs.CIRCLE:return"circle";case bs.CLOUD:return"cloud";case bs.BANG:return"bang";case bs.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),cgr=_(()=>Le,"getLogger"),ugr=_(t=>pte[t],"getElementById"),hgr={clear:tgr,addNode:agr,getSections:xWe,getData:ngr,nodeType:bs,getType:igr,setElementForId:sgr,decorateNode:ogr,type2Str:lgr,getLogger:cgr,getElementById:ugr},dgr=hgr,fgr=_((t,e,r,n)=>nt(this,null,function*(){var v,b,w,x,T,C,S;Le.debug(`Rendering kanban diagram
|
||
`+t);const i=n.db.getData(),s=ft();s.htmlLabels=!1;const o=$o(e);for(const E of i.nodes)E.domId=`${e}-${E.id}`;const u=o.append("g");u.attr("class","sections");const h=o.append("g");h.attr("class","items");const d=i.nodes.filter(E=>E.isGroup);let f=0;const p=10,g=[];let m=25;for(const E of d){const k=((v=s==null?void 0:s.kanban)==null?void 0:v.sectionWidth)||200;f=f+1,E.x=k*f+(f-1)*p/2,E.width=k,E.y=0,E.height=k*3,E.rx=5,E.ry=5,E.cssClasses=E.cssClasses+" section-"+f;const A=yield Z7(u,E);m=Math.max(m,(b=A==null?void 0:A.labelBBox)==null?void 0:b.height),g.push(A)}let y=0;for(const E of d){const k=g[y];y=y+1;const A=((w=s==null?void 0:s.kanban)==null?void 0:w.sectionWidth)||200,I=-A*3/2+m;let L=I;const R=i.nodes.filter(P=>P.parentId===E.id);for(const P of R){if(P.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");P.x=E.x,P.width=A-1.5*p;const D=(yield w3(h,P,{config:s})).node().getBBox();P.y=L+D.height/2,yield eN(P),L=P.y+D.height/2+p/2}const O=k.cluster.select("rect"),M=Math.max(L-I+3*p,50)+(m-25);O.attr("height",M)}xw(void 0,o,(T=(x=s.mindmap)==null?void 0:x.padding)!=null?T:hn.kanban.padding,(S=(C=s.mindmap)==null?void 0:C.useMaxWidth)!=null?S:hn.kanban.useMaxWidth)}),"draw"),pgr={draw:fgr},ggr=_(t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],Ko(t["lineColor"+n])?t["lineColor"+n]=Wt(t["lineColor"+n],20):t["lineColor"+n]=Vt(t["lineColor"+n],20);const r=_((n,a)=>t.darkMode?Vt(n,a):Wt(n,a),"adjuster");for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const a=""+(17-3*n);e+=`
|
||
.section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
|
||
fill: ${r(t["cScale"+n],10)};
|
||
stroke: ${r(t["cScale"+n],10)};
|
||
|
||
}
|
||
.section-${n-1} text {
|
||
fill: ${t["cScaleLabel"+n]};
|
||
}
|
||
.node-icon-${n-1} {
|
||
font-size: 40px;
|
||
color: ${t["cScaleLabel"+n]};
|
||
}
|
||
.section-edge-${n-1}{
|
||
stroke: ${t["cScale"+n]};
|
||
}
|
||
.edge-depth-${n-1}{
|
||
stroke-width: ${a};
|
||
}
|
||
.section-${n-1} line {
|
||
stroke: ${t["cScaleInv"+n]} ;
|
||
stroke-width: 3;
|
||
}
|
||
|
||
.disabled, .disabled circle, .disabled text {
|
||
fill: lightgray;
|
||
}
|
||
.disabled text {
|
||
fill: #efefef;
|
||
}
|
||
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon,
|
||
.node path {
|
||
fill: ${t.background};
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.kanban-ticket-link {
|
||
fill: ${t.background};
|
||
stroke: ${t.nodeBorder};
|
||
text-decoration: underline;
|
||
}
|
||
`}return e},"genSections"),mgr=_(t=>`
|
||
.edge {
|
||
stroke-width: 3;
|
||
}
|
||
${ggr(t)}
|
||
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
||
fill: ${t.git0};
|
||
}
|
||
.section-root text {
|
||
fill: ${t.gitBranchLabel0};
|
||
}
|
||
.icon-container {
|
||
height:100%;
|
||
display: flex;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.edge {
|
||
fill: none;
|
||
}
|
||
.cluster-label, .label {
|
||
color: ${t.textColor};
|
||
fill: ${t.textColor};
|
||
}
|
||
.kanban-label {
|
||
dy: 1em;
|
||
alignment-baseline: middle;
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
text-align: center;
|
||
}
|
||
${F5()}
|
||
`,"getStyles"),ygr=mgr,vgr={db:dgr,renderer:pgr,parser:egr,styles:ygr},bgr=Object.freeze({__proto__:null,diagram:vgr});function wWe(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}l(wWe,"max");function TWe(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let a of t)(a=e(a,++n,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}l(TWe,"min");function gte(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let a of t)(a=+e(a,++n,t))&&(r+=a)}return r}l(gte,"sum");function xgr(t){return t.target.depth}l(xgr,"targetDepth");function wgr(t){return t.depth}l(wgr,"left");function Tgr(t,e){return e-1-t.height}l(Tgr,"right");function EWe(t,e){return t.sourceLinks.length?t.depth:e-1}l(EWe,"justify");function Egr(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?TWe(t.sourceLinks,xgr)-1:0}l(Egr,"center");function lR(t){return function(){return t}}l(lR,"constant$1");function CWe(t,e){return cR(t.source,e.source)||t.index-e.index}l(CWe,"ascendingSourceBreadth");function SWe(t,e){return cR(t.target,e.target)||t.index-e.index}l(SWe,"ascendingTargetBreadth");function cR(t,e){return t.y0-e.y0}l(cR,"ascendingBreadth");function mte(t){return t.value}l(mte,"value");function Cgr(t){return t.index}l(Cgr,"defaultId");function Sgr(t){return t.nodes}l(Sgr,"defaultNodes");function _gr(t){return t.links}l(_gr,"defaultLinks");function _We(t,e){const r=t.get(e);if(!r)throw new Error("missing: "+e);return r}l(_We,"find");function kWe({nodes:t}){for(const e of t){let r=e.y0,n=r;for(const a of e.sourceLinks)a.y0=r+a.width/2,r+=a.width;for(const a of e.targetLinks)a.y1=n+a.width/2,n+=a.width}}l(kWe,"computeLinkBreadths");function kgr(){let t=0,e=0,r=1,n=1,a=24,i=8,s,o=Cgr,u=EWe,h,d,f=Sgr,p=_gr,g=6;function m(){const P={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return y(P),v(P),b(P),w(P),C(P),kWe(P),P}l(m,"sankey"),m.update=function(P){return kWe(P),P},m.nodeId=function(P){return arguments.length?(o=typeof P=="function"?P:lR(P),m):o},m.nodeAlign=function(P){return arguments.length?(u=typeof P=="function"?P:lR(P),m):u},m.nodeSort=function(P){return arguments.length?(h=P,m):h},m.nodeWidth=function(P){return arguments.length?(a=+P,m):a},m.nodePadding=function(P){return arguments.length?(i=s=+P,m):i},m.nodes=function(P){return arguments.length?(f=typeof P=="function"?P:lR(P),m):f},m.links=function(P){return arguments.length?(p=typeof P=="function"?P:lR(P),m):p},m.linkSort=function(P){return arguments.length?(d=P,m):d},m.size=function(P){return arguments.length?(t=e=0,r=+P[0],n=+P[1],m):[r-t,n-e]},m.extent=function(P){return arguments.length?(t=+P[0][0],r=+P[1][0],e=+P[0][1],n=+P[1][1],m):[[t,e],[r,n]]},m.iterations=function(P){return arguments.length?(g=+P,m):g};function y({nodes:P,links:z}){for(const[B,W]of P.entries())W.index=B,W.sourceLinks=[],W.targetLinks=[];const D=new Map(P.map((B,W)=>[o(B,W,P),B]));for(const[B,W]of z.entries()){W.index=B;let{source:U,target:j}=W;typeof U!="object"&&(U=W.source=_We(D,U)),typeof j!="object"&&(j=W.target=_We(D,j)),U.sourceLinks.push(W),j.targetLinks.push(W)}if(d!=null)for(const{sourceLinks:B,targetLinks:W}of P)B.sort(d),W.sort(d)}l(y,"computeNodeLinks");function v({nodes:P}){for(const z of P)z.value=z.fixedValue===void 0?Math.max(gte(z.sourceLinks,mte),gte(z.targetLinks,mte)):z.fixedValue}l(v,"computeNodeValues");function b({nodes:P}){const z=P.length;let D=new Set(P),B=new Set,W=0;for(;D.size;){for(const U of D){U.depth=W;for(const{target:j}of U.sourceLinks)B.add(j)}if(++W>z)throw new Error("circular link");D=B,B=new Set}}l(b,"computeNodeDepths");function w({nodes:P}){const z=P.length;let D=new Set(P),B=new Set,W=0;for(;D.size;){for(const U of D){U.height=W;for(const{source:j}of U.targetLinks)B.add(j)}if(++W>z)throw new Error("circular link");D=B,B=new Set}}l(w,"computeNodeHeights");function x({nodes:P}){const z=wWe(P,W=>W.depth)+1,D=(r-t-a)/(z-1),B=new Array(z);for(const W of P){const U=Math.max(0,Math.min(z-1,Math.floor(u.call(null,W,z))));W.layer=U,W.x0=t+U*D,W.x1=W.x0+a,B[U]?B[U].push(W):B[U]=[W]}if(h)for(const W of B)W.sort(h);return B}l(x,"computeNodeLayers");function T(P){const z=TWe(P,D=>(n-e-(D.length-1)*s)/gte(D,mte));for(const D of P){let B=e;for(const W of D){W.y0=B,W.y1=B+W.value*z,B=W.y1+s;for(const U of W.sourceLinks)U.width=U.value*z}B=(n-B+s)/(D.length+1);for(let W=0;W<D.length;++W){const U=D[W];U.y0+=B*(W+1),U.y1+=B*(W+1)}R(D)}}l(T,"initializeNodeBreadths");function C(P){const z=x(P);s=Math.min(i,(n-e)/(wWe(z,D=>D.length)-1)),T(z);for(let D=0;D<g;++D){const B=Math.pow(.99,D),W=Math.max(1-B,(D+1)/g);E(z,B,W),S(z,B,W)}}l(C,"computeNodeBreadths");function S(P,z,D){for(let B=1,W=P.length;B<W;++B){const U=P[B];for(const j of U){let V=0,Y=0;for(const{source:q,value:Z}of j.targetLinks){let K=Z*(j.layer-q.layer);V+=O(q,j)*K,Y+=K}if(!(Y>0))continue;let H=(V/Y-j.y0)*z;j.y0+=H,j.y1+=H,L(j)}h===void 0&&U.sort(cR),k(U,D)}}l(S,"relaxLeftToRight");function E(P,z,D){for(let B=P.length,W=B-2;W>=0;--W){const U=P[W];for(const j of U){let V=0,Y=0;for(const{target:q,value:Z}of j.sourceLinks){let K=Z*(q.layer-j.layer);V+=M(j,q)*K,Y+=K}if(!(Y>0))continue;let H=(V/Y-j.y0)*z;j.y0+=H,j.y1+=H,L(j)}h===void 0&&U.sort(cR),k(U,D)}}l(E,"relaxRightToLeft");function k(P,z){const D=P.length>>1,B=P[D];I(P,B.y0-s,D-1,z),A(P,B.y1+s,D+1,z),I(P,n,P.length-1,z),A(P,e,0,z)}l(k,"resolveCollisions");function A(P,z,D,B){for(;D<P.length;++D){const W=P[D],U=(z-W.y0)*B;U>1e-6&&(W.y0+=U,W.y1+=U),z=W.y1+s}}l(A,"resolveCollisionsTopToBottom");function I(P,z,D,B){for(;D>=0;--D){const W=P[D],U=(W.y1-z)*B;U>1e-6&&(W.y0-=U,W.y1-=U),z=W.y0-s}}l(I,"resolveCollisionsBottomToTop");function L({sourceLinks:P,targetLinks:z}){if(d===void 0){for(const{source:{sourceLinks:D}}of z)D.sort(SWe);for(const{target:{targetLinks:D}}of P)D.sort(CWe)}}l(L,"reorderNodeLinks");function R(P){if(d===void 0)for(const{sourceLinks:z,targetLinks:D}of P)z.sort(SWe),D.sort(CWe)}l(R,"reorderLinks");function O(P,z){let D=P.y0-(P.sourceLinks.length-1)*s/2;for(const{target:B,width:W}of P.sourceLinks){if(B===z)break;D+=W+s}for(const{source:B,width:W}of z.targetLinks){if(B===P)break;D-=W}return D}l(O,"targetTop");function M(P,z){let D=z.y0-(z.targetLinks.length-1)*s/2;for(const{source:B,width:W}of z.targetLinks){if(B===P)break;D+=W+s}for(const{target:B,width:W}of P.sourceLinks){if(B===z)break;D-=W}return D}return l(M,"sourceTop"),m}l(kgr,"Sankey");var yte=Math.PI,vte=2*yte,Ty=1e-6,Agr=vte-Ty;function bte(){this._x0=this._y0=this._x1=this._y1=null,this._=""}l(bte,"Path");function AWe(){return new bte}l(AWe,"path"),bte.prototype=AWe.prototype={constructor:bte,moveTo:l(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:l(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:l(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:l(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:l(function(t,e,r,n,a,i){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+a)+","+(this._y1=+i)},"bezierCurveTo"),arcTo:l(function(t,e,r,n,a){t=+t,e=+e,r=+r,n=+n,a=+a;var i=this._x1,s=this._y1,o=r-t,u=n-e,h=i-t,d=s-e,f=h*h+d*d;if(a<0)throw new Error("negative radius: "+a);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>Ty)if(!(Math.abs(d*o-u*h)>Ty)||!a)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var p=r-i,g=n-s,m=o*o+u*u,y=p*p+g*g,v=Math.sqrt(m),b=Math.sqrt(f),w=a*Math.tan((yte-Math.acos((m+f-y)/(2*v*b)))/2),x=w/b,T=w/v;Math.abs(x-1)>Ty&&(this._+="L"+(t+x*h)+","+(e+x*d)),this._+="A"+a+","+a+",0,0,"+ +(d*p>h*g)+","+(this._x1=t+T*o)+","+(this._y1=e+T*u)}},"arcTo"),arc:l(function(t,e,r,n,a,i){t=+t,e=+e,r=+r,i=!!i;var s=r*Math.cos(n),o=r*Math.sin(n),u=t+s,h=e+o,d=1^i,f=i?n-a:a-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+h:(Math.abs(this._x1-u)>Ty||Math.abs(this._y1-h)>Ty)&&(this._+="L"+u+","+h),r&&(f<0&&(f=f%vte+vte),f>Agr?this._+="A"+r+","+r+",0,1,"+d+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+d+","+(this._x1=u)+","+(this._y1=h):f>Ty&&(this._+="A"+r+","+r+",0,"+ +(f>=yte)+","+d+","+(this._x1=t+r*Math.cos(a))+","+(this._y1=e+r*Math.sin(a))))},"arc"),rect:l(function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:l(function(){return this._},"toString")};function NWe(t){return l(function(){return t},"constant")}l(NWe,"constant");function Ngr(t){return t[0]}l(Ngr,"x");function Igr(t){return t[1]}l(Igr,"y");var Lgr=Array.prototype.slice;function $gr(t){return t.source}l($gr,"linkSource");function Mgr(t){return t.target}l(Mgr,"linkTarget");function Pgr(t){var e=$gr,r=Mgr,n=Ngr,a=Igr,i=null;function s(){var o,u=Lgr.call(arguments),h=e.apply(this,u),d=r.apply(this,u);if(i||(i=o=AWe()),t(i,+n.apply(this,(u[0]=h,u)),+a.apply(this,u),+n.apply(this,(u[0]=d,u)),+a.apply(this,u)),o)return i=null,o+""||null}return l(s,"link"),s.source=function(o){return arguments.length?(e=o,s):e},s.target=function(o){return arguments.length?(r=o,s):r},s.x=function(o){return arguments.length?(n=typeof o=="function"?o:NWe(+o),s):n},s.y=function(o){return arguments.length?(a=typeof o=="function"?o:NWe(+o),s):a},s.context=function(o){return arguments.length?(i=o==null?null:o,s):i},s}l(Pgr,"link");function Rgr(t,e,r,n,a){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,a,n,a)}l(Rgr,"curveHorizontal");function Ogr(){return Pgr(Rgr)}l(Ogr,"linkHorizontal");function Dgr(t){return[t.source.x1,t.y0]}l(Dgr,"horizontalSource");function Fgr(t){return[t.target.x0,t.y1]}l(Fgr,"horizontalTarget");function Bgr(){return Ogr().source(Dgr).target(Fgr)}l(Bgr,"d3SankeyLinkHorizontal");var xte=function(){var t=_(function(o,u,h,d){for(h=h||{},d=o.length;d--;h[o[d]]=u);return h},"o"),e=[1,9],r=[1,10],n=[1,5,10,12],a={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:_(l(function(u,h,d,f,p,g,m){var y=g.length-1;switch(p){case 7:const v=f.findOrCreateNode(g[y-4].trim().replaceAll('""','"')),b=f.findOrCreateNode(g[y-2].trim().replaceAll('""','"')),w=parseFloat(g[y].trim());f.addLink(v,b,w);break;case 8:case 9:case 11:this.$=g[y];break;case 10:this.$=g[y-1];break}},"anonymous"),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(n,[2,8]),t(n,[2,9]),{19:[1,16]},t(n,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:r},{15:18,16:7,17:8,18:e,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(n,[2,10]),{15:21,16:7,17:8,18:e,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:_(l(function(u,h){if(h.recoverable)this.trace(u);else{var d=new Error(u);throw d.hash=h,d}},"parseError"),"parseError"),parse:_(l(function(u){var h=this,d=[0],f=[],p=[null],g=[],m=this.table,y="",v=0,b=0,w=2,x=1,T=g.slice.call(arguments,1),C=Object.create(this.lexer),S={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(S.yy[E]=this.yy[E]);C.setInput(u,S.yy),S.yy.lexer=C,S.yy.parser=this,typeof C.yylloc=="undefined"&&(C.yylloc={});var k=C.yylloc;g.push(k);var A=C.options&&C.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(V){d.length=d.length-2*V,p.length=p.length-V,g.length=g.length-V}l(I,"popStack"),_(I,"popStack");function L(){var V;return V=f.pop()||C.lex()||x,typeof V!="number"&&(V instanceof Array&&(f=V,V=f.pop()),V=h.symbols_[V]||V),V}l(L,"lex"),_(L,"lex");for(var R,O,M,P,z={},D,B,W,U;;){if(O=d[d.length-1],this.defaultActions[O]?M=this.defaultActions[O]:((R===null||typeof R=="undefined")&&(R=L()),M=m[O]&&m[O][R]),typeof M=="undefined"||!M.length||!M[0]){var j="";U=[];for(D in m[O])this.terminals_[D]&&D>w&&U.push("'"+this.terminals_[D]+"'");C.showPosition?j="Parse error on line "+(v+1)+`:
|
||
`+C.showPosition()+`
|
||
Expecting `+U.join(", ")+", got '"+(this.terminals_[R]||R)+"'":j="Parse error on line "+(v+1)+": Unexpected "+(R==x?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(j,{text:C.match,token:this.terminals_[R]||R,line:C.yylineno,loc:k,expected:U})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+R);switch(M[0]){case 1:d.push(R),p.push(C.yytext),g.push(C.yylloc),d.push(M[1]),R=null,b=C.yyleng,y=C.yytext,v=C.yylineno,k=C.yylloc;break;case 2:if(B=this.productions_[M[1]][1],z.$=p[p.length-B],z._$={first_line:g[g.length-(B||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(B||1)].first_column,last_column:g[g.length-1].last_column},A&&(z._$.range=[g[g.length-(B||1)].range[0],g[g.length-1].range[1]]),P=this.performAction.apply(z,[y,b,v,S.yy,M[1],p,g].concat(T)),typeof P!="undefined")return P;B&&(d=d.slice(0,-1*B*2),p=p.slice(0,-1*B),g=g.slice(0,-1*B)),d.push(this.productions_[M[1]][0]),p.push(z.$),g.push(z._$),W=m[d[d.length-2]][d[d.length-1]],d.push(W);break;case 3:return!0}}return!0},"parse"),"parse")},i=function(){var o={EOF:1,parseError:_(l(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),"parseError"),setInput:_(function(u,h){return this.yy=h||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:_(function(u){var h=u.length,d=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===f.length?this.yylloc.first_column:0)+f[f.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(u){this.unput(this.match.slice(u))},"less"),pastInput:_(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+`
|
||
`+h+"^"},"showPosition"),test_match:_(function(u,h){var d,f,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),f=u[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var g in p)this[g]=p[g];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,d,f;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),g=0;g<p.length;g++)if(d=this._input.match(this.rules[p[g]]),d&&(!h||d[0].length>h[0].length)){if(h=d,f=g,this.options.backtrack_lexer){if(u=this.test_match(d,p[g]),u!==!1)return u;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(u=this.test_match(h,p[f]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var h=this.next();return h||this.lex()},"lex"),"lex"),begin:_(l(function(h){this.conditionStack.push(h)},"begin"),"begin"),popState:_(l(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(h){this.begin(h)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(h,d,f,p){switch(f){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return o}();a.lexer=i;function s(){this.yy={}}return l(s,"Parser"),_(s,"Parser"),s.prototype=a,a.Parser=s,new s}();xte.parser=xte;var uR=xte,hR=[],dR=[],fR=new Map,zgr=_(()=>{hR=[],dR=[],fR=new Map,Ca()},"clear"),Hgr=(tx=class{constructor(e,r,n=0){this.source=e,this.target=r,this.value=n}},l(tx,"SankeyLink"),_(tx,"SankeyLink"),tx),Wgr=_((t,e,r)=>{hR.push(new Hgr(t,e,r))},"addLink"),Vgr=(rx=class{constructor(e){this.ID=e}},l(rx,"SankeyNode"),_(rx,"SankeyNode"),rx),Ggr=_(t=>{t=or.sanitizeText(t,ft());let e=fR.get(t);return e===void 0&&(e=new Vgr(t),fR.set(t,e),dR.push(e)),e},"findOrCreateNode"),qgr=_(()=>dR,"getNodes"),Ygr=_(()=>hR,"getLinks"),Ugr=_(()=>({nodes:dR.map(t=>({id:t.ID})),links:hR.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),jgr={nodesMap:fR,getConfig:_(()=>ft().sankey,"getConfig"),getNodes:qgr,getLinks:Ygr,getGraph:Ugr,addLink:Wgr,findOrCreateNode:Ggr,getAccTitle:za,setAccTitle:Na,getAccDescription:Wa,setAccDescription:Ha,getDiagramTitle:Ia,setDiagramTitle:Va,clear:zgr},IWe=($d=class{static next(e){return new $d(e+ ++$d.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},l($d,"_Uid"),_($d,"Uid"),$d.count=0,$d),Kgr={left:wgr,right:Tgr,center:Egr,justify:EWe},Xgr=_(t=>{var n,a;let e=0,r=0;for(const i of t){const s=(n=i.value)!=null?n:0;s>e&&(e=s,r=(a=i.layer)!=null?a:0)}return r},"findCentralNodeLayer"),Zgr=_(function(t,e,r,n){var B,W,U,j,V,Y,H,q,Z,K,re,Q,te,ee,J;const{securityLevel:a,sankey:i}=ft(),s=ume.sankey;let o;a==="sandbox"&&(o=Yt("#i"+e));const u=Yt(a==="sandbox"?o.nodes()[0].contentDocument.body:"body"),h=a==="sandbox"?u.select(`[id="${e}"]`):Yt(`[id="${e}"]`),d=(B=i==null?void 0:i.width)!=null?B:s.width,f=(W=i==null?void 0:i.height)!=null?W:s.width,p=(U=i==null?void 0:i.useMaxWidth)!=null?U:s.useMaxWidth,g=(j=i==null?void 0:i.nodeAlignment)!=null?j:s.nodeAlignment,m=(V=i==null?void 0:i.prefix)!=null?V:s.prefix,y=(Y=i==null?void 0:i.suffix)!=null?Y:s.suffix,v=(H=i==null?void 0:i.showValues)!=null?H:s.showValues,b=(Z=(q=i==null?void 0:i.nodeWidth)!=null?q:s.nodeWidth)!=null?Z:10,w=(re=(K=i==null?void 0:i.nodePadding)!=null?K:s.nodePadding)!=null?re:12,x=(te=(Q=i==null?void 0:i.labelStyle)!=null?Q:s.labelStyle)!=null?te:"legacy",T=(ee=i==null?void 0:i.nodeColors)!=null?ee:{},C=n.db.getGraph(),S=Kgr[g];kgr().nodeId(ae=>ae.id).nodeWidth(b).nodePadding(w+(v?15:0)).nodeAlign(S).extent([[0,0],[d,f]])(C);const k=Xgr(C.nodes),A=fm(Lkt),I=_(ae=>{var se;return(se=T[ae])!=null?se:A(ae)},"getNodeColor");h.append("g").attr("class","nodes").selectAll(".node").data(C.nodes).join("g").attr("class","node").attr("id",ae=>(ae.uid=IWe.next("node-")).id).attr("transform",function(ae){return"translate("+ae.x0+","+ae.y0+")"}).attr("x",ae=>ae.x0).attr("y",ae=>ae.y0).append("rect").attr("height",ae=>ae.y1-ae.y0).attr("width",ae=>ae.x1-ae.x0).attr("fill",ae=>I(ae.id));const L=_(({id:ae,value:se})=>v?`${ae}
|
||
${m}${Math.round(se*100)/100}${y}`:ae,"getText"),R=_(ae=>{var se;return x==="outlined"?((se=ae.layer)!=null?se:0)<k?{x:ae.x0-6,anchor:"end"}:{x:ae.x1+6,anchor:"start"}:ae.x0<d/2?{x:ae.x1+6,anchor:"start"}:{x:ae.x0-6,anchor:"end"}},"getLabelPosition"),O=h.append("g").attr("class","node-labels").attr("font-size",14),M=_(ae=>O.selectAll(ae?`.${ae}`:"text").data(C.nodes).join("text").attr("class",ae!=null?ae:null).attr("x",se=>R(se).x).attr("y",se=>(se.y1+se.y0)/2).attr("dy",`${v?"0":"0.35"}em`).attr("text-anchor",se=>R(se).anchor).text(L),"appendLabel");x==="outlined"?(M("sankey-label-bg"),M("sankey-label-fg")):M();const P=h.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(C.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),z=(J=i==null?void 0:i.linkColor)!=null?J:"gradient";if(z==="gradient"){const ae=P.append("linearGradient").attr("id",se=>(se.uid=IWe.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",se=>se.source.x1).attr("x2",se=>se.target.x0);ae.append("stop").attr("offset","0%").attr("stop-color",se=>I(se.source.id)),ae.append("stop").attr("offset","100%").attr("stop-color",se=>I(se.target.id))}let D;switch(z){case"gradient":D=_(ae=>ae.uid,"coloring");break;case"source":D=_(ae=>I(ae.source.id),"coloring");break;case"target":D=_(ae=>I(ae.target.id),"coloring");break;default:D=z}P.append("path").attr("d",Bgr()).attr("stroke",D).attr("stroke-width",ae=>Math.max(1,ae.width)),xw(void 0,h,0,p)},"draw"),Qgr={draw:Zgr},Jgr=_(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
||
`).trim(),"prepareTextForParsing"),emr=_(t=>`.label {
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
.node-labels {
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
/* Outlined label style - background stroke for better readability */
|
||
.sankey-label-bg {
|
||
stroke: ${t.mainBkg||t.background||"#fff"};
|
||
stroke-width: 4px;
|
||
stroke-linejoin: round;
|
||
paint-order: stroke;
|
||
}
|
||
|
||
/* Foreground label text */
|
||
.sankey-label-fg {
|
||
fill: ${t.textColor};
|
||
}
|
||
|
||
/* Node styling */
|
||
.node rect {
|
||
shape-rendering: crispEdges;
|
||
}
|
||
|
||
/* Link styling */
|
||
.link {
|
||
fill: none;
|
||
stroke-opacity: 0.5;
|
||
mix-blend-mode: multiply;
|
||
}
|
||
`,"getStyles"),tmr=emr,rmr=uR.parse.bind(uR);uR.parse=t=>rmr(Jgr(t));var nmr={styles:tmr,parser:uR,db:jgr,renderer:Qgr},amr=Object.freeze({__proto__:null,diagram:nmr}),imr=hn.packet,LWe=(nx=class{constructor(){this.packet=[],this.setAccTitle=Na,this.getAccTitle=za,this.setDiagramTitle=Va,this.getDiagramTitle=Ia,this.getAccDescription=Wa,this.setAccDescription=Ha}getConfig(){const e=Ga(X(X({},imr),Ar().packet));return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){Ca(),this.packet=[]}},l(nx,"PacketDB"),_(nx,"PacketDB"),nx),smr=1e4,omr=_((t,e)=>{hl(t,e);let r=-1,n=[],a=1;const{bitsPerRow:i}=e.getConfig();for(let{start:s,end:o,bits:u,label:h}of t.blocks){if(s!==void 0&&o!==void 0&&o<s)throw new Error(`Packet block ${s} - ${o} is invalid. End must be greater than start.`);if(s!=null||(s=r+1),s!==r+1)throw new Error(`Packet block ${s} - ${o!=null?o:s} is not contiguous. It should start from ${r+1}.`);if(u===0)throw new Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(o!=null||(o=s+(u!=null?u:1)-1),u!=null||(u=o-s+1),r=o,Le.debug(`Packet block ${s} - ${r} with label ${h}`);n.length<=i+1&&e.getPacket().length<smr;){const[d,f]=lmr({start:s,end:o,bits:u,label:h},a,i);if(n.push(d),d.end+1===a*i&&(e.pushWord(n),n=[],a++),!f)break;({start:s,end:o,bits:u,label:h}=f)}}e.pushWord(n)},"populate"),lmr=_((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const n=e*r-1,a=e*r;return[{start:t.start,end:n,label:t.label,bits:n-t.start},{start:a,end:t.end,label:t.label,bits:t.end-a}]},"getNextFittingBlock"),$We={parser:{yy:void 0},parse:_(t=>nt(this,null,function*(){var n;const e=yield pu("packet",t),r=(n=$We.parser)==null?void 0:n.yy;if(!(r instanceof LWe))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Le.debug(e),omr(e,r)}),"parse")},cmr=_((t,e,r,n)=>{const a=n.db,i=a.getConfig(),{rowHeight:s,paddingY:o,bitWidth:u,bitsPerRow:h}=i,d=a.getPacket(),f=a.getDiagramTitle(),p=s+o,g=p*(d.length+1)-(f?0:s),m=u*h+2,y=$o(e);y.attr("viewBox",`0 0 ${m} ${g}`),yi(y,g,m,i.useMaxWidth);for(const[v,b]of d.entries())umr(y,b,v,i);y.append("text").text(f).attr("x",m/2).attr("y",g-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),umr=_((t,e,r,{rowHeight:n,paddingX:a,paddingY:i,bitWidth:s,bitsPerRow:o,showBits:u})=>{const h=t.append("g"),d=r*(n+i)+i;for(const f of e){const p=f.start%o*s+1,g=(f.end-f.start+1)*s-a;if(h.append("rect").attr("x",p).attr("y",d).attr("width",g).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",p+g/2).attr("y",d+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!u)continue;const m=f.end===f.start,y=d-2;h.append("text").attr("x",p+(m?g/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",m?"middle":"start").text(f.start),m||h.append("text").attr("x",p+g).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),hmr={draw:cmr},dmr={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},fmr=_(({packet:t}={})=>{const e=Ga(dmr,t);return`
|
||
.packetByte {
|
||
font-size: ${e.byteFontSize};
|
||
}
|
||
.packetByte.start {
|
||
fill: ${e.startByteColor};
|
||
}
|
||
.packetByte.end {
|
||
fill: ${e.endByteColor};
|
||
}
|
||
.packetLabel {
|
||
fill: ${e.labelColor};
|
||
font-size: ${e.labelFontSize};
|
||
}
|
||
.packetTitle {
|
||
fill: ${e.titleColor};
|
||
font-size: ${e.titleFontSize};
|
||
}
|
||
.packetBlock {
|
||
stroke: ${e.blockStrokeColor};
|
||
stroke-width: ${e.blockStrokeWidth};
|
||
fill: ${e.blockFillColor};
|
||
}
|
||
`},"styles"),pmr={parser:$We,get db(){return new LWe},renderer:hmr,styles:fmr},gmr=Object.freeze({__proto__:null,diagram:pmr}),cC={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},MWe={axes:[],curves:[],options:cC},Ey=structuredClone(MWe),mmr=hn.radar,ymr=_(()=>Ga(X(X({},mmr),Ar().radar)),"getConfig"),PWe=_(()=>Ey.axes,"getAxes"),vmr=_(()=>Ey.curves,"getCurves"),bmr=_(()=>Ey.options,"getOptions"),xmr=_(t=>{Ey.axes=t.map(e=>{var r;return{name:e.name,label:(r=e.label)!=null?r:e.name}})},"setAxes"),wmr=_(t=>{Ey.curves=t.map(e=>{var r;return{name:e.name,label:(r=e.label)!=null?r:e.name,entries:Tmr(e.entries)}})},"setCurves"),Tmr=_(t=>{if(t[0].axis==null)return t.map(r=>r.value);const e=PWe();if(e.length===0)throw new Error("Axes must be populated before curves for reference entries");return e.map(r=>{const n=t.find(a=>{var i;return((i=a.axis)==null?void 0:i.$refText)===r.name});if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),Emr=_(t=>{var r,n,a,i,s,o,u,h,d,f;const e=t.reduce((p,g)=>(p[g.name]=g,p),{});Ey.options={showLegend:(n=(r=e.showLegend)==null?void 0:r.value)!=null?n:cC.showLegend,ticks:(i=(a=e.ticks)==null?void 0:a.value)!=null?i:cC.ticks,max:(o=(s=e.max)==null?void 0:s.value)!=null?o:cC.max,min:(h=(u=e.min)==null?void 0:u.value)!=null?h:cC.min,graticule:(f=(d=e.graticule)==null?void 0:d.value)!=null?f:cC.graticule}},"setOptions"),Cmr=_(()=>{Ca(),Ey=structuredClone(MWe)},"clear"),_k={getAxes:PWe,getCurves:vmr,getOptions:bmr,setAxes:xmr,setCurves:wmr,setOptions:Emr,getConfig:ymr,clear:Cmr,setAccTitle:Na,getAccTitle:za,setDiagramTitle:Va,getDiagramTitle:Ia,getAccDescription:Wa,setAccDescription:Ha},Smr=_(t=>{hl(t,_k);const{axes:e,curves:r,options:n}=t;_k.setAxes(e),_k.setCurves(r),_k.setOptions(n)},"populate"),_mr={parse:_(t=>nt(this,null,function*(){const e=yield pu("radar",t);Le.debug(e),Smr(e)}),"parse")},kmr=_((t,e,r,n)=>{var y;const a=n.db,i=a.getAxes(),s=a.getCurves(),o=a.getOptions(),u=a.getConfig(),h=a.getDiagramTitle(),d=$o(e),f=Amr(d,u),p=(y=o.max)!=null?y:Math.max(...s.map(v=>Math.max(...v.entries))),g=o.min,m=Math.min(u.width,u.height)/2;Nmr(f,i,m,o.ticks,o.graticule),Imr(f,i,m,u),RWe(f,i,s,g,p,o.graticule,u),FWe(f,s,o.showLegend,u),f.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-u.height/2-u.marginTop)},"draw"),Amr=_((t,e)=>{var i;const r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,a={x:e.marginLeft+e.width/2,y:e.marginTop+e.height/2};return yi(t,n,r,(i=e.useMaxWidth)!=null?i:!0),t.attr("viewBox",`0 0 ${r} ${n}`).attr("overflow","visible"),t.append("g").attr("transform",`translate(${a.x}, ${a.y})`)},"drawFrame"),Nmr=_((t,e,r,n,a)=>{if(a==="circle")for(let i=0;i<n;i++){const s=r*(i+1)/n;t.append("circle").attr("r",s).attr("class","radarGraticule")}else if(a==="polygon"){const i=e.length;for(let s=0;s<n;s++){const o=r*(s+1)/n,u=e.map((h,d)=>{const f=2*d*Math.PI/i-Math.PI/2,p=o*Math.cos(f),g=o*Math.sin(f);return`${p},${g}`}).join(" ");t.append("polygon").attr("points",u).attr("class","radarGraticule")}}},"drawGraticule"),Imr=_((t,e,r,n)=>{const a=e.length;for(let i=0;i<a;i++){const s=e[i].label,o=2*i*Math.PI/a-Math.PI/2,u=Math.cos(o),h=Math.sin(o);t.append("line").attr("x1",0).attr("y1",0).attr("x2",r*n.axisScaleFactor*u).attr("y2",r*n.axisScaleFactor*h).attr("class","radarAxisLine");const d=u>.01?"start":u<-.01?"end":"middle",f=h>.01?"hanging":h<-.01?"auto":"central",p=4;t.append("text").text(s).attr("x",r*n.axisLabelFactor*u+p*u).attr("y",r*n.axisLabelFactor*h+p*h).attr("text-anchor",d).attr("dominant-baseline",f).attr("class","radarAxisLabel")}},"drawAxes");function RWe(t,e,r,n,a,i,s){const o=e.length,u=Math.min(s.width,s.height)/2;r.forEach((h,d)=>{if(h.entries.length!==o)return;const f=h.entries.map((p,g)=>{const m=2*Math.PI*g/o-Math.PI/2,y=OWe(p,n,a,u),v=y*Math.cos(m),b=y*Math.sin(m);return{x:v,y:b}});i==="circle"?t.append("path").attr("d",DWe(f,s.curveTension)).attr("class",`radarCurve-${d}`):i==="polygon"&&t.append("polygon").attr("points",f.map(p=>`${p.x},${p.y}`).join(" ")).attr("class",`radarCurve-${d}`)})}l(RWe,"drawCurves"),_(RWe,"drawCurves");function OWe(t,e,r,n){const a=Math.min(Math.max(t,e),r);return n*(a-e)/(r-e)}l(OWe,"relativeRadius"),_(OWe,"relativeRadius");function DWe(t,e){const r=t.length;let n=`M${t[0].x},${t[0].y}`;for(let a=0;a<r;a++){const i=t[(a-1+r)%r],s=t[a],o=t[(a+1)%r],u=t[(a+2)%r],h={x:s.x+(o.x-i.x)*e,y:s.y+(o.y-i.y)*e},d={x:o.x-(u.x-s.x)*e,y:o.y-(u.y-s.y)*e};n+=` C${h.x},${h.y} ${d.x},${d.y} ${o.x},${o.y}`}return`${n} Z`}l(DWe,"closedRoundCurve"),_(DWe,"closedRoundCurve");function FWe(t,e,r,n){if(!r)return;const a=(n.width/2+n.marginRight)*3/4,i=-(n.height/2+n.marginTop)*3/4,s=20;e.forEach((o,u)=>{const h=t.append("g").attr("transform",`translate(${a}, ${i+u*s})`);h.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${u}`),h.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}l(FWe,"drawLegend"),_(FWe,"drawLegend");var Lmr={draw:kmr},$mr=_((t,e)=>{let r="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const a=t[`cScale${n}`];r+=`
|
||
.radarCurve-${n} {
|
||
color: ${a};
|
||
fill: ${a};
|
||
fill-opacity: ${e.curveOpacity};
|
||
stroke: ${a};
|
||
stroke-width: ${e.curveStrokeWidth};
|
||
}
|
||
.radarLegendBox-${n} {
|
||
fill: ${a};
|
||
fill-opacity: ${e.curveOpacity};
|
||
stroke: ${a};
|
||
}
|
||
`}return r},"genIndexStyles"),Mmr=_(t=>{const e=Qd(),r=Ar(),n=Ga(e,r.themeVariables),a=Ga(n.radar,t);return{themeVariables:n,radarOptions:a}},"buildRadarStyleOptions"),Pmr=_(({radar:t}={})=>{const{themeVariables:e,radarOptions:r}=Mmr(t);return`
|
||
.radarTitle {
|
||
font-size: ${e.fontSize};
|
||
color: ${e.titleColor};
|
||
dominant-baseline: hanging;
|
||
text-anchor: middle;
|
||
}
|
||
.radarAxisLine {
|
||
stroke: ${r.axisColor};
|
||
stroke-width: ${r.axisStrokeWidth};
|
||
}
|
||
.radarAxisLabel {
|
||
font-size: ${r.axisLabelFontSize}px;
|
||
color: ${r.axisColor};
|
||
}
|
||
.radarGraticule {
|
||
fill: ${r.graticuleColor};
|
||
fill-opacity: ${r.graticuleOpacity};
|
||
stroke: ${r.graticuleColor};
|
||
stroke-width: ${r.graticuleStrokeWidth};
|
||
}
|
||
.radarLegendText {
|
||
text-anchor: start;
|
||
font-size: ${r.legendFontSize}px;
|
||
dominant-baseline: hanging;
|
||
}
|
||
${$mr(e,r)}
|
||
`},"styles"),Rmr={parser:_mr,db:_k,renderer:Lmr,styles:Pmr},Omr=Object.freeze({__proto__:null,diagram:Rmr}),wte=function(){var t=_(function(x,T,C,S){for(C=C||{},S=x.length;S--;C[x[S]]=T);return C},"o"),e=[1,15],r=[1,7],n=[1,13],a=[1,14],i=[1,19],s=[1,16],o=[1,17],u=[1,18],h=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],g=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],y=[1,49],v={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:_(l(function(T,C,S,E,k,A,I){var L=A.length-1;switch(k){case 4:E.getLogger().debug("Rule: separator (NL) ");break;case 5:E.getLogger().debug("Rule: separator (Space) ");break;case 6:E.getLogger().debug("Rule: separator (EOF) ");break;case 7:E.getLogger().debug("Rule: hierarchy: ",A[L-1]),E.setHierarchy(A[L-1]);break;case 8:E.getLogger().debug("Stop NL ");break;case 9:E.getLogger().debug("Stop EOF ");break;case 10:E.getLogger().debug("Stop NL2 ");break;case 11:E.getLogger().debug("Stop EOF2 ");break;case 12:E.getLogger().debug("Rule: statement: ",A[L]),typeof A[L].length=="number"?this.$=A[L]:this.$=[A[L]];break;case 13:E.getLogger().debug("Rule: statement #2: ",A[L-1]),this.$=[A[L-1]].concat(A[L]);break;case 14:E.getLogger().debug("Rule: link: ",A[L],T),this.$={edgeTypeStr:A[L],label:""};break;case 15:E.getLogger().debug("Rule: LABEL link: ",A[L-3],A[L-1],A[L]),this.$={edgeTypeStr:A[L],label:A[L-1]};break;case 18:const R=parseInt(A[L]),O=E.generateId();this.$={id:O,type:"space",label:"",width:R,children:[]};break;case 23:E.getLogger().debug("Rule: (nodeStatement link node) ",A[L-2],A[L-1],A[L]," typestr: ",A[L-1].edgeTypeStr);const M=E.edgeStrToEdgeData(A[L-1].edgeTypeStr),P=E.edgeStrToEdgeStartData(A[L-1].edgeTypeStr),z=E.edgeStrToThickness(A[L-1].edgeTypeStr),D=E.edgeStrToPattern(A[L-1].edgeTypeStr);this.$=[{id:A[L-2].id,label:A[L-2].label,type:A[L-2].type,directions:A[L-2].directions},{id:A[L-2].id+"-"+A[L].id,start:A[L-2].id,end:A[L].id,label:A[L-1].label,type:"edge",thickness:z,pattern:D,directions:A[L].directions,arrowTypeEnd:M,arrowTypeStart:P},{id:A[L].id,label:A[L].label,type:E.typeStr2Type(A[L].typeStr),directions:A[L].directions}];break;case 24:E.getLogger().debug("Rule: nodeStatement (abc88 node size) ",A[L-1],A[L]),this.$={id:A[L-1].id,label:A[L-1].label,type:E.typeStr2Type(A[L-1].typeStr),directions:A[L-1].directions,widthInColumns:parseInt(A[L],10)};break;case 25:E.getLogger().debug("Rule: nodeStatement (node) ",A[L]),this.$={id:A[L].id,label:A[L].label,type:E.typeStr2Type(A[L].typeStr),directions:A[L].directions,widthInColumns:1};break;case 26:E.getLogger().debug("APA123",this?this:"na"),E.getLogger().debug("COLUMNS: ",A[L]),this.$={type:"column-setting",columns:A[L]==="auto"?-1:parseInt(A[L])};break;case 27:E.getLogger().debug("Rule: id-block statement : ",A[L-2],A[L-1]),E.generateId(),this.$=Ne(X({},A[L-2]),{type:"composite",children:A[L-1]});break;case 28:E.getLogger().debug("Rule: blockStatement : ",A[L-2],A[L-1],A[L]);const B=E.generateId();this.$={id:B,type:"composite",label:"",children:A[L-1]};break;case 29:E.getLogger().debug("Rule: node (NODE_ID separator): ",A[L]),this.$={id:A[L]};break;case 30:E.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",A[L-1],A[L]),this.$={id:A[L-1],label:A[L].label,typeStr:A[L].typeStr,directions:A[L].directions};break;case 31:E.getLogger().debug("Rule: dirList: ",A[L]),this.$=[A[L]];break;case 32:E.getLogger().debug("Rule: dirList: ",A[L-1],A[L]),this.$=[A[L-1]].concat(A[L]);break;case 33:E.getLogger().debug("Rule: nodeShapeNLabel: ",A[L-2],A[L-1],A[L]),this.$={typeStr:A[L-2]+A[L],label:A[L-1]};break;case 34:E.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",A[L-3],A[L-2]," #3:",A[L-1],A[L]),this.$={typeStr:A[L-3]+A[L],label:A[L-2],directions:A[L-1]};break;case 35:case 36:this.$={type:"classDef",id:A[L-1].trim(),css:A[L].trim()};break;case 37:this.$={type:"applyClass",id:A[L-1].trim(),styleClass:A[L].trim()};break;case 38:this.$={type:"applyStyles",id:A[L-1].trim(),stylesStr:A[L].trim()};break}},"anonymous"),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:i,39:s,43:o,46:u},{8:[1,20]},t(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:n,29:a,31:i,39:s,43:o,46:u}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(g,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:i},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:i,39:s,43:o,46:u},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,31:i},{31:[2,14]},{17:[1,36]},t(g,[2,24]),{10:e,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:a,31:i,39:s,43:o,46:u},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(m,[2,30]),{18:[1,43]},{18:[1,44]},t(g,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:y},{15:[1,50]},t(d,[2,27]),t(m,[2,33]),{38:[1,51]},{33:52,34:y,38:[2,31]},{31:[2,15]},t(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:_(l(function(T,C){if(C.recoverable)this.trace(T);else{var S=new Error(T);throw S.hash=C,S}},"parseError"),"parseError"),parse:_(l(function(T){var C=this,S=[0],E=[],k=[null],A=[],I=this.table,L="",R=0,O=0,M=2,P=1,z=A.slice.call(arguments,1),D=Object.create(this.lexer),B={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(B.yy[W]=this.yy[W]);D.setInput(T,B.yy),B.yy.lexer=D,B.yy.parser=this,typeof D.yylloc=="undefined"&&(D.yylloc={});var U=D.yylloc;A.push(U);var j=D.options&&D.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function V(se){S.length=S.length-2*se,k.length=k.length-se,A.length=A.length-se}l(V,"popStack"),_(V,"popStack");function Y(){var se;return se=E.pop()||D.lex()||P,typeof se!="number"&&(se instanceof Array&&(E=se,se=E.pop()),se=C.symbols_[se]||se),se}l(Y,"lex"),_(Y,"lex");for(var H,q,Z,K,re={},Q,te,ee,J;;){if(q=S[S.length-1],this.defaultActions[q]?Z=this.defaultActions[q]:((H===null||typeof H=="undefined")&&(H=Y()),Z=I[q]&&I[q][H]),typeof Z=="undefined"||!Z.length||!Z[0]){var ae="";J=[];for(Q in I[q])this.terminals_[Q]&&Q>M&&J.push("'"+this.terminals_[Q]+"'");D.showPosition?ae="Parse error on line "+(R+1)+`:
|
||
`+D.showPosition()+`
|
||
Expecting `+J.join(", ")+", got '"+(this.terminals_[H]||H)+"'":ae="Parse error on line "+(R+1)+": Unexpected "+(H==P?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(ae,{text:D.match,token:this.terminals_[H]||H,line:D.yylineno,loc:U,expected:J})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+H);switch(Z[0]){case 1:S.push(H),k.push(D.yytext),A.push(D.yylloc),S.push(Z[1]),H=null,O=D.yyleng,L=D.yytext,R=D.yylineno,U=D.yylloc;break;case 2:if(te=this.productions_[Z[1]][1],re.$=k[k.length-te],re._$={first_line:A[A.length-(te||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(te||1)].first_column,last_column:A[A.length-1].last_column},j&&(re._$.range=[A[A.length-(te||1)].range[0],A[A.length-1].range[1]]),K=this.performAction.apply(re,[L,O,R,B.yy,Z[1],k,A].concat(z)),typeof K!="undefined")return K;te&&(S=S.slice(0,-1*te*2),k=k.slice(0,-1*te),A=A.slice(0,-1*te)),S.push(this.productions_[Z[1]][0]),k.push(re.$),A.push(re._$),ee=I[S[S.length-2]][S[S.length-1]],S.push(ee);break;case 3:return!0}}return!0},"parse"),"parse")},b=function(){var x={EOF:1,parseError:_(l(function(C,S){if(this.yy.parser)this.yy.parser.parseError(C,S);else throw new Error(C)},"parseError"),"parseError"),setInput:_(function(T,C){return this.yy=C||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var C=T.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:_(function(T){var C=T.length,S=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var E=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),S.length-1&&(this.yylineno-=S.length-1);var k=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:S?(S.length===E.length?this.yylloc.first_column:0)+E[E.length-S.length].length-S[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(T){this.unput(this.match.slice(T))},"less"),pastInput:_(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var T=this.pastInput(),C=new Array(T.length+1).join("-");return T+this.upcomingInput()+`
|
||
`+C+"^"},"showPosition"),test_match:_(function(T,C){var S,E,k;if(this.options.backtrack_lexer&&(k={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(k.yylloc.range=this.yylloc.range.slice(0))),E=T[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],S=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var A in k)this[A]=k[A];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,C,S,E;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),A=0;A<k.length;A++)if(S=this._input.match(this.rules[k[A]]),S&&(!C||S[0].length>C[0].length)){if(C=S,E=A,this.options.backtrack_lexer){if(T=this.test_match(S,k[A]),T!==!1)return T;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(T=this.test_match(C,k[E]),T!==!1?T:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var C=this.next();return C||this.lex()},"lex"),"lex"),begin:_(l(function(C){this.conditionStack.push(C)},"begin"),"begin"),popState:_(l(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(C){this.begin(C)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{},performAction:_(l(function(C,S,E,k){switch(E){case 0:return C.getLogger().debug("Found block-beta"),10;case 1:return C.getLogger().debug("Found id-block"),29;case 2:return C.getLogger().debug("Found block"),10;case 3:C.getLogger().debug(".",S.yytext);break;case 4:C.getLogger().debug("_",S.yytext);break;case 5:return 5;case 6:return S.yytext=-1,28;case 7:return S.yytext=S.yytext.replace(/columns\s+/,""),C.getLogger().debug("COLUMNS (LEX)",S.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:C.getLogger().debug("LEX: POPPING STR:",S.yytext),this.popState();break;case 13:return C.getLogger().debug("LEX: STR end:",S.yytext),"STR";case 14:return S.yytext=S.yytext.replace(/space\:/,""),C.getLogger().debug("SPACE NUM (LEX)",S.yytext),21;case 15:return S.yytext="1",C.getLogger().debug("COLUMNS (LEX)",S.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),C.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),C.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),C.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),C.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),C.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),C.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),C.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),C.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),C.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),C.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),C.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),C.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return C.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return C.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return C.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return C.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return C.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return C.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return C.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),C.getLogger().debug("LEX ARR START"),37;case 74:return C.getLogger().debug("Lex: NODE_ID",S.yytext),31;case 75:return C.getLogger().debug("Lex: EOF",S.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:C.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:C.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return C.getLogger().debug("LEX: NODE_DESCR:",S.yytext),"NODE_DESCR";case 83:C.getLogger().debug("LEX POPPING"),this.popState();break;case 84:C.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return S.yytext=S.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (right): dir:",S.yytext),"DIR";case 86:return S.yytext=S.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (left):",S.yytext),"DIR";case 87:return S.yytext=S.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (x):",S.yytext),"DIR";case 88:return S.yytext=S.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (y):",S.yytext),"DIR";case 89:return S.yytext=S.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (up):",S.yytext),"DIR";case 90:return S.yytext=S.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (down):",S.yytext),"DIR";case 91:return S.yytext="]>",C.getLogger().debug("Lex (ARROW_DIR end):",S.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return C.getLogger().debug("Lex: LINK","#"+S.yytext+"#"),15;case 93:return C.getLogger().debug("Lex: LINK",S.yytext),15;case 94:return C.getLogger().debug("Lex: LINK",S.yytext),15;case 95:return C.getLogger().debug("Lex: LINK",S.yytext),15;case 96:return C.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;case 97:return C.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;case 98:return C.getLogger().debug("Lex: START_LINK",S.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return C.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),C.getLogger().debug("Lex: LINK","#"+S.yytext+"#"),15;case 102:return this.popState(),C.getLogger().debug("Lex: LINK",S.yytext),15;case 103:return this.popState(),C.getLogger().debug("Lex: LINK",S.yytext),15;case 104:return C.getLogger().debug("Lex: COLON",S.yytext),S.yytext=S.yytext.slice(1),27}},"anonymous"),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return x}();v.lexer=b;function w(){this.yy={}}return l(w,"Parser"),_(w,"Parser"),w.prototype=v,v.Parser=w,new w}();wte.parser=wte;var Dmr=wte,hh=new Map,Tte=[],Ete=new Map,BWe="color",zWe="fill",Fmr="bgFill",HWe=",",pR=new Map,Cte="",Bmr=_(t=>or.sanitizeText(t,ft()),"sanitizeText"),zmr=_(function(t,e=""){let r=pR.get(t);r||(r={id:t,styles:[],textStyles:[]},pR.set(t,r)),e!=null&&e.split(HWe).forEach(n=>{const a=n.replace(/([^;]*);/,"$1").trim();if(RegExp(BWe).exec(n)){const s=a.replace(zWe,Fmr).replace(BWe,zWe);r.textStyles.push(s)}r.styles.push(a)})},"addStyleClass"),Hmr=_(function(t,e=""){const r=hh.get(t);e!=null&&(r.styles=e.split(HWe))},"addStyle2Node"),Wmr=_(function(t,e){t.split(",").forEach(function(r){let n=hh.get(r);if(n===void 0){const a=r.trim();n={id:a,type:"na",children:[]},hh.set(a,n)}n.classes||(n.classes=[]),n.classes.push(e)})},"setCssClass"),WWe=_((t,e)=>{var s,o,u,h,d;const r=t.flat(),n=[],a=r.find(f=>(f==null?void 0:f.type)==="column-setting"),i=(s=a==null?void 0:a.columns)!=null?s:-1;for(const f of r){if(typeof i=="number"&&i>0&&f.type!=="column-setting"&&typeof f.widthInColumns=="number"&&f.widthInColumns>i&&Le.warn(`Block ${f.id} width ${f.widthInColumns} exceeds configured column width ${i}`),f.label&&(f.label=Bmr(f.label)),f.type==="classDef"){zmr(f.id,f.css);continue}if(f.type==="applyClass"){Wmr(f.id,(o=f==null?void 0:f.styleClass)!=null?o:"");continue}if(f.type==="applyStyles"){f!=null&&f.stylesStr&&Hmr(f.id,f==null?void 0:f.stylesStr);continue}if(f.type==="column-setting")e.columns=(u=f.columns)!=null?u:-1;else if(f.type==="edge"){const p=((h=Ete.get(f.id))!=null?h:0)+1;Ete.set(f.id,p),f.id=p+"-"+f.id,Tte.push(f)}else{f.label||(f.type==="composite"?f.label="":f.label=f.id);const p=hh.get(f.id);if(p===void 0?hh.set(f.id,f):(f.type!=="na"&&(p.type=f.type),f.label!==f.id&&(p.label=f.label)),f.children&&WWe(f.children,f),f.type==="space"){const g=(d=f.width)!=null?d:1;for(let m=0;m<g;m++){const y=xAt(f);y.id=y.id+"-"+m,hh.set(y.id,y),n.push(y)}}else p===void 0&&n.push(f)}}e.children=n},"populateBlockDatabase"),Ste=[],kk={id:"root",type:"composite",children:[],columns:-1},Vmr=_(()=>{Le.debug("Clear called"),Ca(),kk={id:"root",type:"composite",children:[],columns:-1},hh=new Map([["root",kk]]),Ste=[],pR=new Map,Tte=[],Ete=new Map,Cte=""},"clear");function VWe(t){switch(Le.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return Le.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}l(VWe,"typeStr2Type"),_(VWe,"typeStr2Type");function GWe(t){switch(Le.debug("typeStr2Type",t),t){case"==":return"thick";default:return"normal"}}l(GWe,"edgeTypeStr2Type"),_(GWe,"edgeTypeStr2Type");function qWe(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}l(qWe,"edgeStrToEdgeData"),_(qWe,"edgeStrToEdgeData");function YWe(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}l(YWe,"edgeStrToEdgeStartData"),_(YWe,"edgeStrToEdgeStartData");function UWe(t){return t.includes("==")?"thick":"normal"}l(UWe,"edgeStrToThickness"),_(UWe,"edgeStrToThickness");function jWe(t){return t.includes(".-")?"dotted":"solid"}l(jWe,"edgeStrToPattern"),_(jWe,"edgeStrToPattern");var KWe=0,Gmr=_(()=>(KWe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+KWe),"generateId"),qmr=_(t=>{kk.children=t,WWe(t,kk),Ste=kk.children},"setHierarchy"),Ymr=_(t=>{const e=hh.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),Umr=_(()=>[...hh.values()],"getBlocksFlat"),jmr=_(()=>Ste||[],"getBlocks"),Kmr=_(()=>Tte,"getEdges"),Xmr=_(t=>hh.get(t),"getBlock"),Zmr=_(t=>{hh.set(t.id,t)},"setBlock"),Qmr=_(t=>{Cte=t},"setDiagramId"),Jmr=_(()=>Cte,"getDiagramId"),e1r=_(()=>Le,"getLogger"),t1r=_(function(){return pR},"getClasses"),r1r={getConfig:_(()=>Ar().block,"getConfig"),typeStr2Type:VWe,edgeTypeStr2Type:GWe,edgeStrToEdgeData:qWe,edgeStrToEdgeStartData:YWe,edgeStrToThickness:UWe,edgeStrToPattern:jWe,getLogger:e1r,getBlocksFlat:Umr,getBlocks:jmr,getEdges:Kmr,setHierarchy:qmr,getBlock:Xmr,setBlock:Zmr,getColumns:Ymr,getClasses:t1r,clear:Vmr,generateId:Gmr,setDiagramId:Qmr,getDiagramId:Jmr},n1r=r1r,_te=_((t,e)=>{const r=yz,n=r(t,"r"),a=r(t,"g"),i=r(t,"b");return Ru(n,a,i,e)},"fade"),a1r=_(t=>`.label {
|
||
font-family: ${t.fontFamily};
|
||
color: ${t.nodeTextColor||t.textColor};
|
||
}
|
||
.cluster-label text {
|
||
fill: ${t.titleColor};
|
||
}
|
||
.cluster-label span,p {
|
||
color: ${t.titleColor};
|
||
}
|
||
|
||
|
||
|
||
.label text,span,p {
|
||
fill: ${t.nodeTextColor||t.textColor};
|
||
color: ${t.nodeTextColor||t.textColor};
|
||
}
|
||
|
||
.node rect,
|
||
.node circle,
|
||
.node ellipse,
|
||
.node polygon,
|
||
.node path {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.nodeBorder};
|
||
stroke-width: 1px;
|
||
}
|
||
.flowchart-label text {
|
||
text-anchor: middle;
|
||
}
|
||
// .flowchart-label .text-outer-tspan {
|
||
// text-anchor: middle;
|
||
// }
|
||
// .flowchart-label .text-inner-tspan {
|
||
// text-anchor: start;
|
||
// }
|
||
|
||
.node .label {
|
||
text-align: center;
|
||
}
|
||
.node.clickable {
|
||
cursor: pointer;
|
||
}
|
||
|
||
.arrowheadPath {
|
||
fill: ${t.arrowheadColor};
|
||
}
|
||
|
||
.edgePath .path {
|
||
stroke: ${t.lineColor};
|
||
stroke-width: 2.0px;
|
||
}
|
||
|
||
.flowchart-link {
|
||
stroke: ${t.lineColor};
|
||
fill: none;
|
||
}
|
||
|
||
.edgeLabel {
|
||
background-color: ${t.edgeLabelBackground};
|
||
/*
|
||
* This is for backward compatibility with existing code that didn't
|
||
* add a \`<p>\` around edge labels.
|
||
*
|
||
* TODO: We should probably remove this in a future release.
|
||
*/
|
||
p {
|
||
margin: 0;
|
||
padding: 0;
|
||
display: inline;
|
||
}
|
||
rect {
|
||
opacity: 0.5;
|
||
background-color: ${t.edgeLabelBackground};
|
||
fill: ${t.edgeLabelBackground};
|
||
}
|
||
text-align: center;
|
||
}
|
||
|
||
/* For html labels only */
|
||
.labelBkg {
|
||
background-color: ${t.edgeLabelBackground};
|
||
}
|
||
|
||
.node .cluster {
|
||
// fill: ${_te(t.mainBkg,.5)};
|
||
fill: ${_te(t.clusterBkg,.5)};
|
||
stroke: ${_te(t.clusterBorder,.2)};
|
||
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
||
stroke-width: 1px;
|
||
}
|
||
|
||
.cluster text {
|
||
fill: ${t.titleColor};
|
||
}
|
||
|
||
.cluster span,p {
|
||
color: ${t.titleColor};
|
||
}
|
||
/* .cluster div {
|
||
color: ${t.titleColor};
|
||
} */
|
||
|
||
div.mermaidTooltip {
|
||
position: absolute;
|
||
text-align: center;
|
||
max-width: 200px;
|
||
padding: 2px;
|
||
font-family: ${t.fontFamily};
|
||
font-size: 12px;
|
||
background: ${t.tertiaryColor};
|
||
border: 1px solid ${t.border2};
|
||
border-radius: 2px;
|
||
pointer-events: none;
|
||
z-index: 100;
|
||
}
|
||
|
||
.flowchartTitleText {
|
||
text-anchor: middle;
|
||
font-size: 18px;
|
||
fill: ${t.textColor};
|
||
}
|
||
${F5()}
|
||
`,"getStyles"),i1r=a1r,s1r=_((t,e,r,n)=>{e.forEach(a=>{m1r[a](t,r,n)})},"insertMarkers"),o1r=_((t,e,r)=>{Le.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),l1r=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),c1r=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),u1r=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),h1r=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),d1r=_((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),f1r=_((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),p1r=_((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),g1r=_((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),m1r={extension:o1r,composition:l1r,aggregation:c1r,dependency:u1r,lollipop:h1r,point:d1r,circle:f1r,cross:p1r,barb:g1r},y1r=s1r;function kte(t,e){if(t===0||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(t===1)return{px:0,py:e};const r=e%t,n=Math.floor(e/t);return{px:r,py:n}}l(kte,"calculateBlockPosition"),_(kte,"calculateBlockPosition");var v1r=_(t=>{var n,a;let e=0,r=0;for(const i of t.children){const{width:s,height:o,x:u,y:h}=(n=i.size)!=null?n:{width:0,height:0,x:0,y:0};if(Le.debug("getMaxChildSize abc95 child:",i.id,"width:",s,"height:",o,"x:",u,"y:",h,i.type),i.type==="space")continue;const d=s/((a=i.widthInColumns)!=null?a:1);d>e&&(e=d),o>r&&(r=o)}return{width:e,height:r}},"getMaxChildSize");function gR(t,e,r=0,n=0,a=8){var o,u,h,d,f,p,g,m,y,v,b,w,x,T,C;Le.debug("setBlockSizes abc95 (start)",t.id,(o=t==null?void 0:t.size)==null?void 0:o.x,"block width =",t==null?void 0:t.size,"siblingWidth",r),(u=t==null?void 0:t.size)!=null&&u.width||(t.size={width:r,height:n,x:0,y:0});let i=0,s=0;if(((h=t.children)==null?void 0:h.length)>0){for(const O of t.children)gR(O,e,0,0,a);const S=v1r(t);i=S.width,s=S.height,Le.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,s);for(const O of t.children)O.size&&(Le.debug(`abc95 Setting size of children of ${t.id} id=${O.id} ${i} ${s} ${JSON.stringify(O.size)}`),O.size.width=i*((d=O.widthInColumns)!=null?d:1)+a*(((f=O.widthInColumns)!=null?f:1)-1),O.size.height=s,O.size.x=0,O.size.y=0,Le.debug(`abc95 updating size of ${t.id} children child:${O.id} maxWidth:${i} maxHeight:${s}`));for(const O of t.children)gR(O,e,i,s,a);const E=(p=t.columns)!=null?p:-1;let k=0;for(const O of t.children)k+=(g=O.widthInColumns)!=null?g:1;let A=t.children.length;E>0&&E<k&&(A=E);const I=Math.ceil(k/A);let L=A*(i+a)+a,R=I*(s+a)+a;if(L<r){Le.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${n} width ${L}`),L=r,R=n;const O=(r-A*a-a)/A,M=(n-I*a-a)/I;Le.debug("Size indata abc88",t.id,"childWidth",O,"maxWidth",i),Le.debug("Size indata abc88",t.id,"childHeight",M,"maxHeight",s),Le.debug("Size indata abc88 xSize",A,"padding",a);for(const P of t.children)P.size&&(P.size.width=O,P.size.height=M,P.size.x=0,P.size.y=0)}if(Le.debug(`abc95 (finale calc) ${t.id} xSize ${A} ySize ${I} columns ${E}${t.children.length} width=${Math.max(L,((m=t.size)==null?void 0:m.width)||0)}`),L<(((y=t==null?void 0:t.size)==null?void 0:y.width)||0)){L=((v=t==null?void 0:t.size)==null?void 0:v.width)||0;const O=E>0?Math.min(t.children.length,E):t.children.length;if(O>0){const M=(L-O*a-a)/O;Le.debug("abc95 (growing to fit) width",t.id,L,(b=t.size)==null?void 0:b.width,M);for(const P of t.children)P.size&&(P.size.width=M)}}t.size={width:L,height:R,x:0,y:0}}Le.debug("setBlockSizes abc94 (done)",t.id,(w=t==null?void 0:t.size)==null?void 0:w.x,(x=t==null?void 0:t.size)==null?void 0:x.width,(T=t==null?void 0:t.size)==null?void 0:T.y,(C=t==null?void 0:t.size)==null?void 0:C.height)}l(gR,"setBlockSizes"),_(gR,"setBlockSizes");function Ate(t,e,r=8){var a,i,s,o,u,h,d,f,p,g,m,y,v,b,w,x,T,C,S,E,k,A,I,L,R,O,M;Le.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${(a=t==null?void 0:t.size)==null?void 0:a.x} y: ${(i=t==null?void 0:t.size)==null?void 0:i.y} width: ${(s=t==null?void 0:t.size)==null?void 0:s.width}`);const n=(o=t.columns)!=null?o:-1;if(Le.debug("layoutBlocks columns abc95",t.id,"=>",n,t),t.children&&t.children.length>0){const P=(d=(h=(u=t==null?void 0:t.children[0])==null?void 0:u.size)==null?void 0:h.width)!=null?d:0,z=t.children.length*P+(t.children.length-1)*r;Le.debug("widthOfChildren 88",z,"posX");const D=new Map;{let V=0;for(const Y of t.children){if(!Y.size)continue;const{py:H}=kte(n,V),q=(f=D.get(H))!=null?f:0;Y.size.height>q&&D.set(H,Y.size.height);let Z=(p=Y==null?void 0:Y.widthInColumns)!=null?p:1;n>0&&(Z=Math.min(Z,n-V%n)),V+=Z}}const B=new Map;{let V=0;const Y=[...D.keys()].sort((H,q)=>H-q);for(const H of Y)B.set(H,V),V+=((g=D.get(H))!=null?g:0)+r}let W=0;Le.debug("abc91 block?.size?.x",t.id,(m=t==null?void 0:t.size)==null?void 0:m.x);let U=(y=t==null?void 0:t.size)!=null&&y.x?((v=t==null?void 0:t.size)==null?void 0:v.x)+(-((b=t==null?void 0:t.size)==null?void 0:b.width)/2||0):-r,j=0;for(const V of t.children){const Y=t;if(!V.size)continue;const{width:H,height:q}=V.size,{px:Z,py:K}=kte(n,W);if(K!=j&&(j=K,U=(w=t==null?void 0:t.size)!=null&&w.x?((x=t==null?void 0:t.size)==null?void 0:x.x)+(-((T=t==null?void 0:t.size)==null?void 0:T.width)/2||0):-r,Le.debug("New row in layout for block",t.id," and child ",V.id,j)),Le.debug(`abc89 layout blocks (child) id: ${V.id} Pos: ${W} (px, py) ${Z},${K} (${(C=Y==null?void 0:Y.size)==null?void 0:C.x},${(S=Y==null?void 0:Y.size)==null?void 0:S.y}) parent: ${Y.id} width: ${H}${r}`),Y.size){const Q=H/2;V.size.x=U+r+Q,Le.debug(`abc91 layout blocks (calc) px, pyid:${V.id} startingPos=X${U} new startingPosX${V.size.x} ${Q} padding=${r} width=${H} halfWidth=${Q} => x:${V.size.x} y:${V.size.y} ${V.widthInColumns} (width * (child?.w || 1)) / 2 ${H*((E=V==null?void 0:V.widthInColumns)!=null?E:1)/2}`),U=V.size.x+Q;const te=(k=B.get(K))!=null?k:0,ee=(A=D.get(K))!=null?A:q;V.size.y=Y.size.y-Y.size.height/2+te+ee/2+r,Le.debug(`abc88 layout blocks (calc) px, pyid:${V.id}startingPosX${U}${r}${Q}=>x:${V.size.x}y:${V.size.y}${V.widthInColumns}(width * (child?.w || 1)) / 2${H*((I=V==null?void 0:V.widthInColumns)!=null?I:1)/2}`)}V.children&&Ate(V,e,r);let re=(L=V==null?void 0:V.widthInColumns)!=null?L:1;n>0&&(re=Math.min(re,n-W%n)),W+=re,Le.debug("abc88 columnsPos",V,W)}}Le.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${(R=t==null?void 0:t.size)==null?void 0:R.x} y: ${(O=t==null?void 0:t.size)==null?void 0:O.y} width: ${(M=t==null?void 0:t.size)==null?void 0:M.width}`)}l(Ate,"layoutBlocks"),_(Ate,"layoutBlocks");function Nte(t,{minX:e,minY:r,maxX:n,maxY:a}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&t.id!=="root"){const{x:i,y:s,width:o,height:u}=t.size;i-o/2<e&&(e=i-o/2),s-u/2<r&&(r=s-u/2),i+o/2>n&&(n=i+o/2),s+u/2>a&&(a=s+u/2)}if(t.children)for(const i of t.children)({minX:e,minY:r,maxX:n,maxY:a}=Nte(i,{minX:e,minY:r,maxX:n,maxY:a}));return{minX:e,minY:r,maxX:n,maxY:a}}l(Nte,"findBounds"),_(Nte,"findBounds");function XWe(t){var h,d,f;const e=t.getBlock("root");if(!e)return;const r=(f=(d=(h=ft())==null?void 0:h.block)==null?void 0:d.padding)!=null?f:8;gR(e,t,0,0,r),Ate(e,t,r),Le.debug("getBlocks",JSON.stringify(e,null,2));const{minX:n,minY:a,maxX:i,maxY:s}=Nte(e),o=s-a,u=i-n;return{x:n,y:a,width:u,height:o}}l(XWe,"layout$1"),_(XWe,"layout");var b1r=_((t,e,r,n=!1,a=!1)=>nt(this,null,function*(){let i=e||"";typeof i=="object"&&(i=i[0]);const s=ft(),o=ta(s);return yield Oo(t,i,{style:r,isTitle:n,useHtmlLabels:o,markdown:!1,isNode:a,width:Number.POSITIVE_INFINITY},s)}),"createLabel"),dh=b1r,x1r=_((t,e,r,n,a)=>{e.arrowTypeStart&&ZWe(t,"start",e.arrowTypeStart,r,n,a),e.arrowTypeEnd&&ZWe(t,"end",e.arrowTypeEnd,r,n,a)},"addEdgeMarkers"),w1r={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ZWe=_((t,e,r,n,a,i)=>{const s=w1r[r];if(!s){Le.warn(`Unknown arrow type: ${r}`);return}const o=e==="start"?"Start":"End";t.attr(`marker-${e}`,`url(${n}#${a}_${i}-${s}${o})`)},"addEdgeMarker"),Ite={},Ho={},T1r=_((t,e)=>nt(this,null,function*(){const r=ft(),n=ta(r),a=t.insert("g").attr("class","edgeLabel"),i=a.insert("g").attr("class","label"),s=e.labelType==="markdown",o=yield Oo(t,e.label,{style:e.labelStyle,useHtmlLabels:n,addSvgBackground:s,isNode:!1,markdown:s,width:s?void 0:Number.POSITIVE_INFINITY},r);i.node().appendChild(o);let u=o.getBBox(),h=u;if(n){const f=o.children[0],p=Yt(o);u=f.getBoundingClientRect(),h=u,p.attr("width",u.width),p.attr("height",u.height)}else{const f=Yt(o).select("text").node();f&&typeof f.getBBox=="function"&&(h=f.getBBox())}i.attr("transform",Wh(h,n)),Ite[e.id]=a,e.width=u.width,e.height=u.height;let d;if(e.startLabelLeft){const f=t.insert("g").attr("class","edgeTerminals"),p=f.insert("g").attr("class","inner"),g=yield dh(p,e.startLabelLeft,e.labelStyle);d=g;let m=g.getBBox();if(n){const y=g.children[0],v=Yt(g);m=y.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}p.attr("transform",Wh(m,n)),Ho[e.id]||(Ho[e.id]={}),Ho[e.id].startLeft=f,Ak(d,e.startLabelLeft)}if(e.startLabelRight){const f=t.insert("g").attr("class","edgeTerminals"),p=f.insert("g").attr("class","inner"),g=yield dh(p,e.startLabelRight,e.labelStyle);d=g;let m=g.getBBox();if(n){const y=g.children[0],v=Yt(g);m=y.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}p.attr("transform",Wh(m,n)),Ho[e.id]||(Ho[e.id]={}),Ho[e.id].startRight=f,Ak(d,e.startLabelRight)}if(e.endLabelLeft){const f=t.insert("g").attr("class","edgeTerminals"),p=f.insert("g").attr("class","inner"),g=yield dh(f,e.endLabelLeft,e.labelStyle);d=g;let m=g.getBBox();if(n){const y=g.children[0],v=Yt(g);m=y.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}p.attr("transform",Wh(m,n)),Ho[e.id]||(Ho[e.id]={}),Ho[e.id].endLeft=f,Ak(d,e.endLabelLeft)}if(e.endLabelRight){const f=t.insert("g").attr("class","edgeTerminals"),p=f.insert("g").attr("class","inner"),g=yield dh(f,e.endLabelRight,e.labelStyle);d=g;let m=g.getBBox();if(n){const y=g.children[0],v=Yt(g);m=y.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height)}p.attr("transform",Wh(m,n)),Ho[e.id]||(Ho[e.id]={}),Ho[e.id].endRight=f,Ak(d,e.endLabelRight)}return o}),"insertEdgeLabel");function Ak(t,e){ta(ft())&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}l(Ak,"setTerminalWidth"),_(Ak,"setTerminalWidth");var E1r=_((t,e)=>{Le.debug("Moving label abc88 ",t.id,t.label,Ite[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=ft(),{subGraphTitleTotalMargin:a}=zw(n);if(t.label){const i=Ite[t.id];let s=t.x,o=t.y;if(r){const u=Wr.calcLabelPosition(r);Le.debug("Moving label "+t.label+" from (",s,",",o,") to (",u.x,",",u.y,") abc88"),e.updatedPath&&(s=u.x,o=u.y)}i.attr("transform",`translate(${s}, ${o+a/2})`)}if(t.startLabelLeft){const i=Ho[t.id].startLeft;let s=t.x,o=t.y;if(r){const u=Wr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=u.x,o=u.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){const i=Ho[t.id].startRight;let s=t.x,o=t.y;if(r){const u=Wr.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=u.x,o=u.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){const i=Ho[t.id].endLeft;let s=t.x,o=t.y;if(r){const u=Wr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=u.x,o=u.y}i.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){const i=Ho[t.id].endRight;let s=t.x,o=t.y;if(r){const u=Wr.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=u.x,o=u.y}i.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),C1r=_((t,e)=>{const r=t.x,n=t.y,a=Math.abs(e.x-r),i=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return a>=s||i>=o},"outsideNode"),S1r=_((t,e,r)=>{Le.debug(`intersection calc abc89:
|
||
outsidePoint: ${JSON.stringify(e)}
|
||
insidePoint : ${JSON.stringify(r)}
|
||
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,a=t.y,i=Math.abs(n-r.x),s=t.width/2;let o=r.x<e.x?s-i:s+i;const u=t.height/2,h=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(a-e.y)*s>Math.abs(n-e.x)*u){let f=r.y<e.y?e.y-u-a:a-u-e.y;o=d*f/h;const p={x:r.x<e.x?r.x+o:r.x-d+o,y:r.y<e.y?r.y+h-f:r.y-h+f};return o===0&&(p.x=e.x,p.y=e.y),d===0&&(p.x=e.x),h===0&&(p.y=e.y),Le.debug(`abc89 topp/bott calc, Q ${h}, q ${f}, R ${d}, r ${o}`,p),p}else{r.x<e.x?o=e.x-s-n:o=n-s-e.x;let f=h*o/d,p=r.x<e.x?r.x+d-o:r.x-d+o,g=r.y<e.y?r.y+f:r.y-f;return Le.debug(`sides calc abc89, Q ${h}, q ${f}, R ${d}, r ${o}`,{_x:p,_y:g}),o===0&&(p=e.x,g=e.y),d===0&&(p=e.x),h===0&&(g=e.y),{x:p,y:g}}},"intersection"),QWe=_((t,e)=>{Le.debug("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],a=!1;return t.forEach(i=>{if(!C1r(e,i)&&!a){const s=S1r(e,n,i);let o=!1;r.forEach(u=>{o=o||u.x===s.x&&u.y===s.y}),r.some(u=>u.x===s.x&&u.y===s.y)||r.push(s),a=!0}else n=i,a||r.push(i)}),r},"cutPathAtIntersect"),_1r=_(function(t,e,r,n,a,i,s){let o=r.points;Le.debug("abc88 InsertEdge: edge=",r,"e=",e);let u=!1;const h=i.node(e.v);var d=i.node(e.w);d!=null&&d.intersect&&(h!=null&&h.intersect)&&(o=o.slice(1,r.points.length-1),o.unshift(h.intersect(o[0])),o.push(d.intersect(o[o.length-1]))),r.toCluster&&(Le.debug("to cluster abc88",n[r.toCluster]),o=QWe(r.points,n[r.toCluster].node),u=!0),r.fromCluster&&(Le.debug("from cluster abc88",n[r.fromCluster]),o=QWe(o.reverse(),n[r.fromCluster].node).reverse(),u=!0);const f=o.filter(T=>!Number.isNaN(T.y));let p=J4;r.curve&&(a==="graph"||a==="flowchart")&&(p=r.curve);const{x:g,y:m}=ywe(r),y=Q4().x(g).y(m).curve(p);let v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}const b=t.append("path").attr("d",y(f)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style);let w="";(ft().flowchart.arrowMarkerAbsolute||ft().state.arrowMarkerAbsolute)&&(w=E8(!0)),x1r(b,r,w,s,a);let x={};return u&&(x.updatedPath=o),x.originalPath=r.points,x},"insertEdge"),k1r=_(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r);break}return e},"expandAndDeduplicateDirections"),A1r=_((t,e,r,n)=>{const a=k1r(t),i=2,s=e.height+2*r.padding,o=s/i,u=n!=null?n:e.width+2*o+r.padding,h=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:o,y:0},{x:u/2,y:2*h},{x:u-o,y:0},{x:u,y:0},{x:u,y:-s/3},{x:u+2*h,y:-s/2},{x:u,y:-2*s/3},{x:u,y:-s},{x:u-o,y:-s},{x:u/2,y:-s-2*h},{x:o,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*h,y:-s/2},{x:0,y:-s/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:o,y:0},{x:u-o,y:0},{x:u,y:-s/2},{x:u-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:o,y:-s},{x:u-o,y:-s},{x:u,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:u,y:-o},{x:u,y:-s+o},{x:0,y:-s}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:u,y:0},{x:0,y:-o},{x:0,y:-s+o},{x:u,y:-s}]:a.has("right")&&a.has("left")?[{x:o,y:0},{x:o,y:-h},{x:u-o,y:-h},{x:u-o,y:0},{x:u,y:-s/2},{x:u-o,y:-s},{x:u-o,y:-s+h},{x:o,y:-s+h},{x:o,y:-s},{x:0,y:-s/2}]:a.has("up")&&a.has("down")?[{x:u/2,y:0},{x:0,y:-h},{x:o,y:-h},{x:o,y:-s+h},{x:0,y:-s+h},{x:u/2,y:-s},{x:u,y:-s+h},{x:u-o,y:-s+h},{x:u-o,y:-h},{x:u,y:-h}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:u,y:-o},{x:0,y:-s}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:u,y:0},{x:0,y:-s}]:a.has("left")&&a.has("up")?[{x:u,y:0},{x:0,y:-o},{x:u,y:-s}]:a.has("left")&&a.has("down")?[{x:u,y:0},{x:0,y:0},{x:u,y:-s}]:a.has("right")?[{x:o,y:-h},{x:o,y:-h},{x:u-o,y:-h},{x:u-o,y:0},{x:u,y:-s/2},{x:u-o,y:-s},{x:u-o,y:-s+h},{x:o,y:-s+h},{x:o,y:-s+h}]:a.has("left")?[{x:o,y:0},{x:o,y:-h},{x:u-o,y:-h},{x:u-o,y:-s+h},{x:o,y:-s+h},{x:o,y:-s},{x:0,y:-s/2}]:a.has("up")?[{x:o,y:-h},{x:o,y:-s+h},{x:0,y:-s+h},{x:u/2,y:-s},{x:u,y:-s+h},{x:u-o,y:-s+h},{x:u-o,y:-h}]:a.has("down")?[{x:u/2,y:0},{x:0,y:-h},{x:o,y:-h},{x:o,y:-s+h},{x:u-o,y:-s+h},{x:u-o,y:-h},{x:u,y:-h}]:[{x:0,y:0}]},"getArrowPoints");function JWe(t,e){return t.intersect(e)}l(JWe,"intersectNode"),_(JWe,"intersectNode");var N1r=JWe;function eVe(t,e,r,n){var a=t.x,i=t.y,s=a-n.x,o=i-n.y,u=Math.sqrt(e*e*o*o+r*r*s*s),h=Math.abs(e*r*s/u);n.x<a&&(h=-h);var d=Math.abs(e*r*o/u);return n.y<i&&(d=-d),{x:a+h,y:i+d}}l(eVe,"intersectEllipse"),_(eVe,"intersectEllipse");var tVe=eVe;function rVe(t,e,r){return tVe(t,e,e,r)}l(rVe,"intersectCircle"),_(rVe,"intersectCircle");var I1r=rVe;function nVe(t,e,r,n){var a,i,s,o,u,h,d,f,p,g,m,y,v,b,w;if(a=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,p=a*r.x+s*r.y+u,g=a*n.x+s*n.y+u,!(p!==0&&g!==0&&Lte(p,g))&&(i=n.y-r.y,o=r.x-n.x,h=n.x*r.y-r.x*n.y,d=i*t.x+o*t.y+h,f=i*e.x+o*e.y+h,!(d!==0&&f!==0&&Lte(d,f))&&(m=a*o-i*s,m!==0)))return y=Math.abs(m/2),v=s*h-o*u,b=v<0?(v-y)/m:(v+y)/m,v=i*u-a*h,w=v<0?(v-y)/m:(v+y)/m,{x:b,y:w}}l(nVe,"intersectLine"),_(nVe,"intersectLine");function Lte(t,e){return t*e>0}l(Lte,"sameSign"),_(Lte,"sameSign");var L1r=nVe,$1r=aVe;function aVe(t,e,r){var n=t.x,a=t.y,i=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(m){s=Math.min(s,m.x),o=Math.min(o,m.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var u=n-t.width/2-s,h=a-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=L1r(t,r,{x:u+f.x,y:h+f.y},{x:u+p.x,y:h+p.y});g&&i.push(g)}return i.length?(i.length>1&&i.sort(function(m,y){var v=m.x-r.x,b=m.y-r.y,w=Math.sqrt(v*v+b*b),x=y.x-r.x,T=y.y-r.y,C=Math.sqrt(x*x+T*T);return w<C?-1:w===C?0:1}),i[0]):t}l(aVe,"intersectPolygon"),_(aVe,"intersectPolygon");var M1r=_((t,e)=>{var r=t.x,n=t.y,a=e.x-r,i=e.y-n,s=t.width/2,o=t.height/2,u,h;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),u=i===0?0:o*a/i,h=o):(a<0&&(s=-s),u=s,h=a===0?0:s*i/a),{x:r+u,y:n+h}},"intersectRect"),P1r=M1r,ai={node:N1r,circle:I1r,ellipse:tVe,polygon:$1r,rect:P1r},Ys=_((t,e,r,n)=>nt(this,null,function*(){const a=ft();let i;const s=e.useHtmlLabels||ta(a);r?i=r:i="node default";const o=t.insert("g").attr("class",i).attr("id",e.domId||e.id),u=o.insert("g").attr("class","label").attr("style",e.labelStyle);let h;e.labelText===void 0?h="":h=typeof e.labelText=="string"?e.labelText:e.labelText[0];let d;e.labelType==="markdown"?d=Oo(u,mn(uf(h),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):d=yield dh(u,mn(uf(h),a),e.labelStyle,!1,n);let f=d.getBBox();const p=e.padding/2;if(ta(a)){const g=d.children[0],m=Yt(d);yield yW(g,h),f=g.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height)}return s?u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):u.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:o,bbox:f,halfPadding:p,label:u}}),"labelHelper"),_i=_((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function fh(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}l(fh,"insertPolygonShape"),_(fh,"insertPolygonShape");var R1r=_((t,e)=>nt(this,null,function*(){e.useHtmlLabels||ta(ft())||(e.centerLabel=!0);const{shapeSvg:n,bbox:a,halfPadding:i}=yield Ys(t,e,"node "+e.classes,!0);Le.info("Classes = ",e.classes);const s=n.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),_i(e,s),e.intersect=function(o){return ai.rect(e,o)},n}),"note"),O1r=R1r,iVe=_(t=>t?" "+t:"","formatClass"),Rc=_((t,e)=>`${e||"node default"}${iVe(t.classes)} ${iVe(t.class)}`,"getClassesFromNode"),sVe=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=a+i,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];Le.info("Question main (Circle)");const u=fh(r,s,s,o);return u.attr("style",e.style),_i(e,u),e.intersect=function(h){return Le.warn("Intersect called"),ai.polygon(e,o,h)},r}),"question"),D1r=_((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,a=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",a.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return ai.circle(e,14,s)},r},"choice"),F1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=4,i=e.positioned?e.height:n.height+e.padding,s=i/a,o=e.positioned?e.width:n.width+2*s+e.padding,u=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-i/2},{x:o-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],h=fh(r,o,i,u);return h.attr("style",e.style),_i(e,h),e.intersect=function(d){return ai.polygon(e,u,d)},r}),"hexagon"),B1r=_((t,e)=>nt(this,null,function*(){var p;const{shapeSvg:r,bbox:n}=yield Ys(t,e,void 0,!0),a=2,i=n.height+2*e.padding,s=i/a,o=n.width+2*s+e.padding,h=e.positioned&&((p=e.widthInColumns)!=null?p:1)>1&&e.width>o?e.width:o,d=A1r(e.directions,n,e,h),f=fh(r,h,i,d);return f.attr("style",e.style),_i(e,f),e.intersect=function(g){return ai.polygon(e,d,g)},r}),"block_arrow"),z1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:-i/2,y:0},{x:a,y:0},{x:a,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return fh(r,a,i,s).attr("style",e.style),e.width=a+i,e.height=i,e.intersect=function(u){return ai.polygon(e,s,u)},r}),"rect_left_inv_arrow"),H1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:-2*i/6,y:0},{x:a-i/6,y:0},{x:a+2*i/6,y:-i},{x:i/6,y:-i}],o=fh(r,a,i,s);return o.attr("style",e.style),_i(e,o),e.intersect=function(u){return ai.polygon(e,s,u)},r}),"lean_right"),W1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:2*i/6,y:0},{x:a+i/6,y:0},{x:a-2*i/6,y:-i},{x:-i/6,y:-i}],o=fh(r,a,i,s);return o.attr("style",e.style),_i(e,o),e.intersect=function(u){return ai.polygon(e,s,u)},r}),"lean_left"),V1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:-2*i/6,y:0},{x:a+2*i/6,y:0},{x:a-i/6,y:-i},{x:i/6,y:-i}],o=fh(r,a,i,s);return o.attr("style",e.style),_i(e,o),e.intersect=function(u){return ai.polygon(e,s,u)},r}),"trapezoid"),G1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:i/6,y:0},{x:a-i/6,y:0},{x:a+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=fh(r,a,i,s);return o.attr("style",e.style),_i(e,o),e.intersect=function(u){return ai.polygon(e,s,u)},r}),"inv_trapezoid"),q1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:0,y:0},{x:a+i/2,y:0},{x:a,y:-i/2},{x:a+i/2,y:-i},{x:0,y:-i}],o=fh(r,a,i,s);return o.attr("style",e.style),_i(e,o),e.intersect=function(u){return ai.polygon(e,s,u)},r}),"rect_right_inv_arrow"),Y1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.width+e.padding,i=a/2,s=i/(2.5+a/50),o=n.height+s+e.padding,u="M 0,"+s+" a "+i+","+s+" 0,0,0 "+a+" 0 a "+i+","+s+" 0,0,0 "+-a+" 0 l 0,"+o+" a "+i+","+s+" 0,0,0 "+a+" 0 l 0,"+-o,h=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-a/2+","+-(o/2+s)+")");return _i(e,h),e.intersect=function(d){const f=ai.rect(e,d),p=f.x-e.x;if(i!=0&&(Math.abs(p)<e.width/2||Math.abs(p)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-s)){let g=s*s*(1-p*p/(i*i));g!=0&&(g=Math.sqrt(g)),g=s-g,d.y-e.y>0&&(g=-g),f.y+=g}return f},r}),"cylinder"),U1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n,halfPadding:a}=yield Ys(t,e,"node "+e.classes+" "+e.class,!0),i=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,u=e.positioned?-s/2:-n.width/2-a,h=e.positioned?-o/2:-n.height/2-a;if(i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",u).attr("y",h).attr("width",s).attr("height",o),e.props){const d=new Set(Object.keys(e.props));e.props.borders&&(mR(i,e.props.borders,s,o),d.delete("borders")),d.forEach(f=>{Le.warn(`Unknown node property ${f}`)})}return _i(e,i),e.intersect=function(d){return ai.rect(e,d)},r}),"rect"),j1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n,halfPadding:a}=yield Ys(t,e,"node "+e.classes,!0),i=r.insert("rect",":first-child"),s=e.positioned?e.width:n.width+e.padding,o=e.positioned?e.height:n.height+e.padding,u=e.positioned?-s/2:-n.width/2-a,h=e.positioned?-o/2:-n.height/2-a;if(i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",u).attr("y",h).attr("width",s).attr("height",o),e.props){const d=new Set(Object.keys(e.props));e.props.borders&&(mR(i,e.props.borders,s,o),d.delete("borders")),d.forEach(f=>{Le.warn(`Unknown node property ${f}`)})}return _i(e,i),e.intersect=function(d){return ai.rect(e,d)},r}),"composite"),K1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r}=yield Ys(t,e,"label",!0);Le.trace("Classes = ",e.class);const n=r.insert("rect",":first-child"),a=0,i=0;if(n.attr("width",a).attr("height",i),r.attr("class","label edgeLabel"),e.props){const s=new Set(Object.keys(e.props));e.props.borders&&(mR(n,e.props.borders,a,i),s.delete("borders")),s.forEach(o=>{Le.warn(`Unknown node property ${o}`)})}return _i(e,n),e.intersect=function(s){return ai.rect(e,s)},r}),"labelRect");function mR(t,e,r,n){const a=[],i=_(o=>{a.push(o,0)},"addBorder"),s=_(o=>{a.push(0,o)},"skipBorder");e.includes("t")?(Le.debug("add top border"),i(r)):s(r),e.includes("r")?(Le.debug("add right border"),i(n)):s(n),e.includes("b")?(Le.debug("add bottom border"),i(r)):s(r),e.includes("l")?(Le.debug("add left border"),i(n)):s(n),t.attr("stroke-dasharray",a.join(" "))}l(mR,"applyNodePropertyBorders"),_(mR,"applyNodePropertyBorders");var X1r=_((t,e)=>nt(this,null,function*(){let r;e.classes?r="node "+e.classes:r="node default";const n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),a=n.insert("rect",":first-child"),i=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let u="";typeof o=="object"?u=o[0]:u=o,Le.info("Label text abc79",u,o,typeof o=="object");const h=yield dh(s,u,e.labelStyle,!0,!0);let d={width:0,height:0};if(ta(ft())){const y=h.children[0],v=Yt(h);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height)}Le.info("Text 2",o);const f=o.slice(1,o.length);let p=h.getBBox();const g=yield dh(s,f.join?f.join("<br/>"):f,e.labelStyle,!0,!0);if(ta(ft())){const y=g.children[0],v=Yt(g);d=y.getBoundingClientRect(),v.attr("width",d.width),v.attr("height",d.height)}const m=e.padding/2;return Yt(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+m+5)+")"),Yt(h).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", 0)"),d=s.node().getBBox(),s.attr("transform","translate("+-d.width/2+", "+(-d.height/2-m+3)+")"),a.attr("class","outer title-state").attr("x",-d.width/2-m).attr("y",-d.height/2-m).attr("width",d.width+e.padding).attr("height",d.height+e.padding),i.attr("class","divider").attr("x1",-d.width/2-m).attr("x2",d.width/2+m).attr("y1",-d.height/2-m+p.height+m).attr("y2",-d.height/2-m+p.height+m),_i(e,a),e.intersect=function(y){return ai.rect(e,y)},n}),"rectWithTitle"),Z1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.height+e.padding,i=n.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-i/2).attr("y",-a/2).attr("width",i).attr("height",a);return _i(e,s),e.intersect=function(o){return ai.rect(e,o)},r}),"stadium"),Q1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n,halfPadding:a}=yield Ys(t,e,Rc(e,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+a).attr("width",n.width+e.padding).attr("height",n.height+e.padding),Le.info("Circle main"),_i(e,i),e.intersect=function(s){return Le.info("Circle intersect",e,n.width/2+a,s),ai.circle(e,n.width/2+a,s)},r}),"circle"),J1r=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n,halfPadding:a}=yield Ys(t,e,Rc(e,void 0),!0),i=5,s=r.insert("g",":first-child"),o=s.insert("circle"),u=s.insert("circle");return s.attr("class",e.class),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+a+i).attr("width",n.width+e.padding+i*2).attr("height",n.height+e.padding+i*2),u.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+a).attr("width",n.width+e.padding).attr("height",n.height+e.padding),Le.info("DoubleCircle main"),_i(e,o),e.intersect=function(h){return Le.info("DoubleCircle intersect",e,n.width/2+a+i,h),ai.circle(e,n.width/2+a+i,h)},r}),"doublecircle"),eyr=_((t,e)=>nt(this,null,function*(){const{shapeSvg:r,bbox:n}=yield Ys(t,e,Rc(e,void 0),!0),a=n.width+e.padding,i=n.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=fh(r,a,i,s);return o.attr("style",e.style),_i(e,o),e.intersect=function(u){return ai.polygon(e,s,u)},r}),"subroutine"),tyr=_((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),_i(e,n),e.intersect=function(a){return ai.circle(e,7,a)},r},"start"),oVe=_((t,e,r)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a=70,i=10;r==="LR"&&(a=10,i=70);const s=n.append("rect").attr("x",-1*a/2).attr("y",-1*i/2).attr("width",a).attr("height",i).attr("class","fork-join");return _i(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return ai.rect(e,o)},n},"forkJoin"),ryr=_((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),_i(e,a),e.intersect=function(i){return ai.circle(e,7,i)},r},"end"),nyr=_((t,e)=>nt(this,null,function*(){var k;const r=e.padding/2,n=4,a=8;let i;e.classes?i="node "+e.classes:i="node default";const s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),u=s.insert("line"),h=s.insert("line");let d=0,f=n;const p=s.insert("g").attr("class","label");let g=0;const m=(k=e.classData.annotations)==null?void 0:k[0],y=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",v=yield dh(p,y,e.labelStyle,!0,!0);let b=v.getBBox();if(ta(ft())){const A=v.children[0],I=Yt(v);b=A.getBoundingClientRect(),I.attr("width",b.width),I.attr("height",b.height)}e.classData.annotations[0]&&(f+=b.height+n,d+=b.width);let w=e.classData.label;e.classData.type!==void 0&&e.classData.type!==""&&(ta(ft())?w+="<"+e.classData.type+">":w+="<"+e.classData.type+">");const x=yield dh(p,w,e.labelStyle,!0,!0);Yt(x).attr("class","classTitle");let T=x.getBBox();if(ta(ft())){const A=x.children[0],I=Yt(x);T=A.getBoundingClientRect(),I.attr("width",T.width),I.attr("height",T.height)}f+=T.height+n,T.width>d&&(d=T.width);const C=[];e.classData.members.forEach(A=>nt(this,null,function*(){const I=A.getDisplayDetails();let L=I.displayText;ta(ft())&&(L=L.replace(/</g,"<").replace(/>/g,">"));const R=yield dh(p,L,I.cssStyle?I.cssStyle:e.labelStyle,!0,!0);let O=R.getBBox();if(ta(ft())){const M=R.children[0],P=Yt(R);O=M.getBoundingClientRect(),P.attr("width",O.width),P.attr("height",O.height)}O.width>d&&(d=O.width),f+=O.height+n,C.push(R)})),f+=a;const S=[];if(e.classData.methods.forEach(A=>nt(this,null,function*(){const I=A.getDisplayDetails();let L=I.displayText;ta(ft())&&(L=L.replace(/</g,"<").replace(/>/g,">"));const R=yield dh(p,L,I.cssStyle?I.cssStyle:e.labelStyle,!0,!0);let O=R.getBBox();if(ta(ft())){const M=R.children[0],P=Yt(R);O=M.getBoundingClientRect(),P.attr("width",O.width),P.attr("height",O.height)}O.width>d&&(d=O.width),f+=O.height+n,S.push(R)})),f+=a,m){let A=(d-b.width)/2;Yt(v).attr("transform","translate( "+(-1*d/2+A)+", "+-1*f/2+")"),g=b.height+n}let E=(d-T.width)/2;return Yt(x).attr("transform","translate( "+(-1*d/2+E)+", "+(-1*f/2+g)+")"),g+=T.height+n,u.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+a+g).attr("y2",-f/2-r+a+g),g+=a,C.forEach(A=>{var L;Yt(A).attr("transform","translate( "+-d/2+", "+(-1*f/2+g+a/2)+")");const I=A==null?void 0:A.getBBox();g+=((L=I==null?void 0:I.height)!=null?L:0)+n}),g+=a,h.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+a+g).attr("y2",-f/2-r+a+g),g+=a,S.forEach(A=>{var L;Yt(A).attr("transform","translate( "+-d/2+", "+(-1*f/2+g)+")");const I=A==null?void 0:A.getBBox();g+=((L=I==null?void 0:I.height)!=null?L:0)+n}),o.attr("style",e.style).attr("class","outer title-state").attr("x",-d/2-r).attr("y",-(f/2)-r).attr("width",d+e.padding).attr("height",f+e.padding),_i(e,o),e.intersect=function(A){return ai.rect(e,A)},s}),"class_box"),lVe={rhombus:sVe,composite:j1r,question:sVe,rect:U1r,labelRect:K1r,rectWithTitle:X1r,choice:D1r,circle:Q1r,doublecircle:J1r,stadium:Z1r,hexagon:F1r,block_arrow:B1r,rect_left_inv_arrow:z1r,lean_right:H1r,lean_left:W1r,trapezoid:V1r,inv_trapezoid:G1r,rect_right_inv_arrow:q1r,cylinder:Y1r,start:tyr,end:ryr,note:O1r,subroutine:eyr,fork:oVe,join:oVe,class_box:nyr},yR={},cVe=_((t,e,r)=>nt(this,null,function*(){let n,a;if(e.link){let i;ft().securityLevel==="sandbox"?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i),a=yield lVe[e.shape](n,e,r)}else a=yield lVe[e.shape](t,e,r),n=a;return e.tooltip&&a.attr("title",e.tooltip),e.class&&a.attr("class","node default "+e.class),yR[e.id]=n,e.haveCallback&&yR[e.id].attr("class",yR[e.id].attr("class")+" clickable"),n}),"insertNode"),ayr=_(t=>{const e=yR[t.id];Le.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode");function $te(t,e,r=!1){var g,m,y,v,b,w,x,T;const n=t;let a="default";(((g=n==null?void 0:n.classes)==null?void 0:g.length)||0)>0&&(a=((m=n==null?void 0:n.classes)!=null?m:[]).join(" ")),a=a+" flowchart-label";let i=0,s="",o;switch(n.type){case"round":i=5,s="rect";break;case"composite":i=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const u=gW((y=n==null?void 0:n.styles)!=null?y:[]),h=n.label,d=(v=n.size)!=null?v:{width:0,height:0,x:0,y:0},f=e.getDiagramId();return{labelStyle:u.labelStyle,shape:s,labelText:h,rx:i,ry:i,class:a,style:u.style,id:n.id,domId:f?`${f}-${n.id}`:n.id,directions:n.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:r,intersect:void 0,type:n.type,padding:(x=o!=null?o:(w=(b=Ar())==null?void 0:b.block)==null?void 0:w.padding)!=null?x:0,widthInColumns:(T=n.widthInColumns)!=null?T:1}}l($te,"getNodeFromBlock"),_($te,"getNodeFromBlock");function uVe(t,e,r){return nt(this,null,function*(){const n=$te(e,r,!1);if(n.type==="group")return;const a=Ar(),i=yield cVe(t,n,{config:a}),s=i.node().getBBox(),o=r.getBlock(n.id);o.size={width:s.width,height:s.height,x:0,y:0,node:i},r.setBlock(o),i.remove()})}l(uVe,"calculateBlockSize"),_(uVe,"calculateBlockSize");function hVe(t,e,r){return nt(this,null,function*(){const n=$te(e,r,!0);if(r.getBlock(n.id).type!=="space"){const i=Ar();yield cVe(t,n,{config:i}),e.intersect=n==null?void 0:n.intersect,ayr(n)}})}l(hVe,"insertBlockPositioned"),_(hVe,"insertBlockPositioned");function vR(t,e,r,n){return nt(this,null,function*(){for(const a of e)yield n(t,a,r),a.children&&(yield vR(t,a.children,r,n))})}l(vR,"performOperations"),_(vR,"performOperations");function dVe(t,e,r){return nt(this,null,function*(){yield vR(t,e,r,uVe)})}l(dVe,"calculateBlockSizes"),_(dVe,"calculateBlockSizes");function fVe(t,e,r){return nt(this,null,function*(){yield vR(t,e,r,hVe)})}l(fVe,"insertBlocks"),_(fVe,"insertBlocks");function pVe(t,e,r,n,a){return nt(this,null,function*(){const i=new Rs({multigraph:!0,compound:!0});i.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&i.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of e)if(s.start&&s.end){const o=n.getBlock(s.start),u=n.getBlock(s.end);if(o!=null&&o.size&&(u!=null&&u.size)){const h=o.size,d=u.size,f=[{x:h.x,y:h.y},{x:h.x+(d.x-h.x)/2,y:h.y+(d.y-h.y)/2},{x:d.x,y:d.y}],p=a?`${a}-${s.id}`:s.id,g=s.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",m=s.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",y=`${g} ${m} flowchart-link LS-a1 LE-b1`;_1r(t,{v:s.start,w:s.end,name:p},Ne(X({},s),{id:p,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:y}),void 0,"block",i,a),s.label&&(yield T1r(t,Ne(X({},s),{label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:f,classes:y})),E1r(Ne(X({},s),{x:f[1].x,y:f[1].y}),{originalPath:f}))}}})}l(pVe,"insertEdges"),_(pVe,"insertEdges");var iyr=_(function(t,e){return e.db.getClasses()},"getClasses"),syr=_(function(t,e,r,n){return nt(this,null,function*(){const{securityLevel:a,block:i}=Ar(),s=n.db;s.setDiagramId(e);let o;a==="sandbox"&&(o=Yt("#i"+e));const u=Yt(a==="sandbox"?o.nodes()[0].contentDocument.body:"body"),h=a==="sandbox"?u.select(`[id="${e}"]`):Yt(`[id="${e}"]`);y1r(h,["point","circle","cross"],n.type,e);const f=s.getBlocks(),p=s.getBlocksFlat(),g=s.getEdges(),m=h.insert("g").attr("class","block");yield dVe(m,f,s);const y=XWe(s);if(yield fVe(m,f,s),yield pVe(m,g,p,s,e),y){const v=y,b=Math.max(1,Math.round(.125*(v.width/v.height))),w=v.height+b+10,x=v.width+10,{useMaxWidth:T}=i;yi(h,w,x,!!T),Le.debug("Here Bounds",y,v),h.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}})},"draw"),oyr={draw:syr,getClasses:iyr},lyr={parser:Dmr,db:n1r,renderer:oyr,styles:i1r},cyr=Object.freeze({__proto__:null,diagram:lyr}),gVe=/[─━│┃└┗├┣]/,mVe=/[└┗├┣]/,uyr=/[─━]/,yVe=/^[\s│┃]+$/,vVe=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,bVe=/^\s*%%/,hyr=" ";function xVe(t){return t.some(e=>gVe.test(e))}l(xVe,"isBoxDrawingFormat"),_(xVe,"isBoxDrawingFormat");function wVe(t){for(const e of t){const r=mVe.exec(e);if(r!=null&&r.index&&r.index>0)return r.index}return 4}l(wVe,"inferSegmentWidth"),_(wVe,"inferSegmentWidth");function TVe(t,e){return t.replace(/\bline\s+(\d+)\b/gi,(r,n)=>{const a=parseInt(n,10),i=e.get(a);return i?`line ${i}`:r})}l(TVe,"remapErrorLines"),_(TVe,"remapErrorLines");function EVe(t){const e=t.split(`
|
||
`),r=new Map;let n=-1;for(const[u,h]of e.entries())if(h.trim()==="treeView-beta"){n=u;break}if(n===-1)return{text:t,lineMap:r};const a=[];for(let u=n+1;u<e.length;u++){const h=e[u];h.trim()===""||bVe.test(h)||vVe.test(h)||yVe.test(h)||a.push(h.replace(/\t/g," "))}if(!xVe(a))return{text:t,lineMap:r};const i=wVe(a),s=[];let o=0;for(let u=0;u<=n;u++)s.push(e[u]),o++,r.set(o,u+1);for(let u=n+1;u<e.length;u++){const h=e[u],d=h.trim(),f=u+1;if(d===""){s.push(h),o++,r.set(o,f);continue}if(bVe.test(h)){s.push(h),o++,r.set(o,f);continue}if(vVe.test(h)){s.push(h),o++,r.set(o,f);continue}if(yVe.test(h))continue;const p=h.replace(/\t/g," "),g=mVe.exec(p);if((g==null?void 0:g.index)!==void 0){const m=g.index,y=Math.round(m/i)+1;let v=m+1;for(;v<p.length&&uyr.test(p[v]);)v++;for(;v<p.length&&p[v]===" ";)v++;const b=p.slice(v).trimEnd();if(!b)throw new Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);const w=hyr.repeat(y);s.push(w+b),o++,r.set(o,f)}else{if(/^[\s─━│┃└┗├┣]+$/.test(p))continue;if(gVe.test(p))s.push(h),o++,r.set(o,f);else{if(/^\s+/.test(p))throw new Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);s.push(h),o++,r.set(o,f)}}}return{text:s.join(`
|
||
`),lineMap:r}}l(EVe,"preprocessBoxDrawing"),_(EVe,"preprocessBoxDrawing");var Ld=new Bj(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),dyr=_(()=>{Ld.reset(),Ca()},"clear"),fyr=_(()=>Ld.records.stack[0],"getRoot"),pyr=_(()=>Ld.records.cnt,"getCount"),gyr=hn.treeView,myr=_(()=>Ga(gyr,Ar().treeView),"getConfig"),yyr=_((t,e,r,n,a,i)=>{for(;t<=Ld.records.stack[Ld.records.stack.length-1].level;)Ld.records.stack.pop();const s={id:Ld.records.cnt++,level:t,name:e,nodeType:r,icon:a,cssClass:n,description:i,children:[]};Ld.records.stack[Ld.records.stack.length-1].children.push(s),Ld.records.stack.push(s)},"addNode"),vyr={clear:dyr,addNode:yyr,getRoot:fyr,getCount:pyr,getConfig:myr,getAccTitle:za,getAccDescription:Wa,getDiagramTitle:Ia,setAccDescription:Ha,setAccTitle:Na,setDiagramTitle:Va},Mte=vyr,byr=_(t=>{hl(t,Mte);for(const e of t.nodes){const r=typeof e.indent=="number"?e.indent:0;let n=e.name;const a=n.endsWith("/");a&&(n=n.slice(0,-1));const i=a?"directory":"file",s=e.classAnnotation||void 0,o=e.iconAnnotation,u=o!==void 0?o||"none":void 0,h=e.descAnnotation||void 0,d=h?mn(h,Ar()):void 0;Mte.addNode(r,n,i,s,u,d)}},"populate"),xyr={parse:_(t=>nt(this,null,function*(){const{text:e,lineMap:r}=EVe(t);try{const n=yield pu("treeView",e);Le.debug(n),byr(n)}catch(n){throw r.size>0&&n instanceof Error&&(n.message=TVe(n.message,r)),n}}),"parse")},Nk={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function CVe(t,e){var a,i;const r=(a=e==null?void 0:e.filenameIcons)==null?void 0:a[t];if(r)return r;const n=t.lastIndexOf(".");if(n>0){const s=t.substring(n).toLowerCase(),o=e==null?void 0:e.extensionIcons;return(i=o==null?void 0:o[s])!=null?i:o==null?void 0:o[s.slice(1)]}}l(CVe,"detectIcon"),_(CVe,"detectIcon");function Pte(t,e){return t.includes(":")?t:t in Nk.icons||!e?`${Nk.prefix}:${t}`:`${e}:${t}`}l(Pte,"qualifyIcon"),_(Pte,"qualifyIcon");function Rte(t,e){if(t.icon!=="none"){if(t.icon)return Pte(t.icon,e.defaultIconPack);if(e.showIcons){if(t.nodeType==="file"){const r=CVe(t.name,e);if(r==="none")return;if(r)return Pte(r,e.defaultIconPack)}return`${Nk.prefix}:${t.nodeType==="directory"?"folder":"file"}`}}}l(Rte,"getNodeIcon"),_(Rte,"getNodeIcon"),xW([{name:Nk.prefix,icons:Nk}]);var Ote=14,wyr=4,Tyr=16,SVe=_((t,e)=>`tv-icon-${t}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),Eyr=_((t,e,r,n)=>nt(this,null,function*(){const a=new Set,i=_(u=>{const h=Rte(u,r);h&&a.add(h),u.children.forEach(i)},"collect");if(i(e),a.size===0)return;const s=yield Promise.all([...a].map(u=>nt(this,null,function*(){return{icon:u,svg:yield hf(u,{height:Ote,width:Ote})}}))),o=t.append("defs");for(const{icon:u,svg:h}of s)o.append("g").attr("id",SVe(n,u)).html(h)}),"injectIconDefs"),Cyr=_((t,e,r,n,a,i)=>{var w;const s=n.append("g");let o="treeView-node-label";r.nodeType==="directory"&&(o+=" treeView-node-dir"),r.cssClass&&(o+=` ${r.cssClass}`);const u=Ote+wyr,h=Rte(r,a),d=h!==void 0;h&&s.append("use").attr("xlink:href",`#${SVe(i,h)}`).attr("x",t+a.paddingX).attr("y",e+a.paddingY).attr("class","treeView-node-icon");const f=s.append("text").text(r.name).attr("dominant-baseline","middle").attr("class",o),{height:p,width:g}=f.node().getBBox(),m=p+a.paddingY*2,y=t+a.paddingX+(d?u:0);f.attr("x",y),f.attr("y",e+m/2);const v=y+g,b=g+a.paddingX*2+(d?u:0);return r.BBox={x:t,y:e,width:b,height:m},(w=r.cssClass)!=null&&w.split(/\s+/).includes("highlight")&&s.insert("rect",":first-child").attr("x",t).attr("y",e+1).attr("width",0).attr("height",m-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:r,nodeGroup:s,labelRightEdge:v,centerY:e+m/2}},"positionLabel"),_Ve=_((t,e,r,n,a,i)=>t.append("line").attr("x1",e).attr("y1",r).attr("x2",n).attr("y2",a).attr("stroke-width",i).attr("class","treeView-node-line"),"positionLine"),Syr=_((t,e,r,n)=>{var d;let a=0,i=0;const s=[],o=_((f,p,g,m)=>{const y=m*(g.rowIndent+g.paddingX),v=Cyr(y,a,p,f,g,n);s.push(v);const{height:b,width:w}=p.BBox;_Ve(f,y-g.rowIndent,a+b/2,y,a+b/2,g.lineThickness),i=Math.max(i,y+w),a+=b},"drawNode"),u=_((f,p=0)=>{o(t,f,r,p),f.children.forEach(v=>{u(v,p+1)});const{x:g,y:m,height:y}=f.BBox;if(f.children.length){const{y:v,height:b}=f.children[f.children.length-1].BBox;_Ve(t,g+r.paddingX,m+y,g+r.paddingX,v+b/2+r.lineThickness/2,r.lineThickness)}},"processNode");u(e);const h=s.filter(f=>f.node.description);if(h.length>0){const p=Math.max(...s.map(g=>g.labelRightEdge))+Tyr;for(const g of h){const y=g.nodeGroup.append("text").text(g.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",p).attr("y",g.centerY).node().getBBox();i=Math.max(i,p+y.width+r.paddingX)}}for(const f of s)if((d=f.node.cssClass)!=null&&d.split(/\s+/).includes("highlight")){const p=f.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){const g=i-f.node.BBox.x+8;p.attr("width",g),i=Math.max(i,f.node.BBox.x+g+2)}}return{totalHeight:a,totalWidth:i}},"drawTree"),_yr=_((t,e,r,n)=>nt(this,null,function*(){Le.debug(`Rendering treeView diagram
|
||
`+t);const a=n.db,i=a.getRoot(),s=a.getConfig(),o=$o(e);yield Eyr(o,i,s,e);const u=o.append("g");u.attr("class","tree-view");const{totalHeight:h,totalWidth:d}=Syr(u,i,s,e);o.attr("viewBox",`-${s.lineThickness/2} 0 ${d} ${h}`),yi(o,h,d,s.useMaxWidth)}),"draw"),kyr={draw:_yr},Ayr=kyr,Nyr={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Iyr=_(({treeView:t})=>{const{labelFontSize:e,labelColor:r,lineColor:n,iconColor:a,descriptionColor:i,highlightBg:s,highlightStroke:o}=Ga(Nyr,t);return`
|
||
.treeView-node-label {
|
||
font-size: ${e};
|
||
fill: ${r};
|
||
white-space: pre;
|
||
}
|
||
.treeView-node-dir {
|
||
font-weight: bold;
|
||
}
|
||
.treeView-node-line {
|
||
stroke: ${n};
|
||
}
|
||
.treeView-node-icon {
|
||
color: ${a};
|
||
}
|
||
.treeView-node-description {
|
||
font-size: ${e};
|
||
fill: ${i};
|
||
font-style: italic;
|
||
white-space: pre;
|
||
}
|
||
.treeView-highlight-bg {
|
||
fill: ${s};
|
||
stroke: ${o};
|
||
stroke-width: 1;
|
||
}
|
||
`},"styles"),Lyr=Iyr,$yr={db:Mte,renderer:Ayr,parser:xyr,styles:Lyr},Myr=Object.freeze({__proto__:null,diagram:$yr}),kVe={exports:{}},Dte={exports:{}},Fte={exports:{}},AVe;function Pyr(){return AVe||(AVe=1,function(t,e){l(function(n,a){t.exports=a()},"webpackUniversalModuleDefinition")(Nl,function(){return function(r){var n={};function a(i){if(n[i])return n[i].exports;var s=n[i]={i,l:!1,exports:{}};return r[i].call(s.exports,s,s.exports,a),s.l=!0,s.exports}return l(a,"__webpack_require__"),a.m=r,a.c=n,a.i=function(i){return i},a.d=function(i,s,o){a.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:o})},a.n=function(i){var s=i&&i.__esModule?l(function(){return i.default},"getDefault"):l(function(){return i},"getModuleExports");return a.d(s,"a",s),s},a.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},a.p="",a(a.s=28)}([function(r,n,a){function i(){}l(i,"LayoutConstants"),i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,r.exports=i},function(r,n,a){var i=a(2),s=a(8),o=a(9);function u(d,f,p){i.call(this,p),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=p,this.bendpoints=[],this.source=d,this.target=f}l(u,"LEdge"),u.prototype=Object.create(i.prototype);for(var h in i)u[h]=i[h];u.prototype.getSource=function(){return this.source},u.prototype.getTarget=function(){return this.target},u.prototype.isInterGraph=function(){return this.isInterGraph},u.prototype.getLength=function(){return this.length},u.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},u.prototype.getBendpoints=function(){return this.bendpoints},u.prototype.getLca=function(){return this.lca},u.prototype.getSourceInLca=function(){return this.sourceInLca},u.prototype.getTargetInLca=function(){return this.targetInLca},u.prototype.getOtherEnd=function(d){if(this.source===d)return this.target;if(this.target===d)return this.source;throw"Node is not incident with this edge"},u.prototype.getOtherEndInGraph=function(d,f){for(var p=this.getOtherEnd(d),g=f.getGraphManager().getRoot();;){if(p.getOwner()==f)return p;if(p.getOwner()==g)break;p=p.getOwner().getParent()}return null},u.prototype.updateLength=function(){var d=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),d),this.isOverlapingSourceAndTarget||(this.lengthX=d[0]-d[2],this.lengthY=d[1]-d[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},u.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},r.exports=u},function(r,n,a){function i(s){this.vGraphObject=s}l(i,"LGraphObject"),r.exports=i},function(r,n,a){var i=a(2),s=a(10),o=a(13),u=a(0),h=a(16),d=a(5);function f(g,m,y,v){y==null&&v==null&&(v=m),i.call(this,v),g.graphManager!=null&&(g=g.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=v,this.edges=[],this.graphManager=g,y!=null&&m!=null?this.rect=new o(m.x,m.y,y.width,y.height):this.rect=new o}l(f,"LNode"),f.prototype=Object.create(i.prototype);for(var p in i)f[p]=i[p];f.prototype.getEdges=function(){return this.edges},f.prototype.getChild=function(){return this.child},f.prototype.getOwner=function(){return this.owner},f.prototype.getWidth=function(){return this.rect.width},f.prototype.setWidth=function(g){this.rect.width=g},f.prototype.getHeight=function(){return this.rect.height},f.prototype.setHeight=function(g){this.rect.height=g},f.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},f.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},f.prototype.getCenter=function(){return new d(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},f.prototype.getLocation=function(){return new d(this.rect.x,this.rect.y)},f.prototype.getRect=function(){return this.rect},f.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},f.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},f.prototype.setRect=function(g,m){this.rect.x=g.x,this.rect.y=g.y,this.rect.width=m.width,this.rect.height=m.height},f.prototype.setCenter=function(g,m){this.rect.x=g-this.rect.width/2,this.rect.y=m-this.rect.height/2},f.prototype.setLocation=function(g,m){this.rect.x=g,this.rect.y=m},f.prototype.moveBy=function(g,m){this.rect.x+=g,this.rect.y+=m},f.prototype.getEdgeListToNode=function(g){var m=[],y=this;return y.edges.forEach(function(v){if(v.target==g){if(v.source!=y)throw"Incorrect edge source!";m.push(v)}}),m},f.prototype.getEdgesBetween=function(g){var m=[],y=this;return y.edges.forEach(function(v){if(!(v.source==y||v.target==y))throw"Incorrect edge source and/or target";(v.target==g||v.source==g)&&m.push(v)}),m},f.prototype.getNeighborsList=function(){var g=new Set,m=this;return m.edges.forEach(function(y){if(y.source==m)g.add(y.target);else{if(y.target!=m)throw"Incorrect incidency!";g.add(y.source)}}),g},f.prototype.withChildren=function(){var g=new Set,m,y;if(g.add(this),this.child!=null)for(var v=this.child.getNodes(),b=0;b<v.length;b++)m=v[b],y=m.withChildren(),y.forEach(function(w){g.add(w)});return g},f.prototype.getNoOfChildren=function(){var g=0,m;if(this.child==null)g=1;else for(var y=this.child.getNodes(),v=0;v<y.length;v++)m=y[v],g+=m.getNoOfChildren();return g==0&&(g=1),g},f.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},f.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},f.prototype.scatter=function(){var g,m,y=-u.INITIAL_WORLD_BOUNDARY,v=u.INITIAL_WORLD_BOUNDARY;g=u.WORLD_CENTER_X+h.nextDouble()*(v-y)+y;var b=-u.INITIAL_WORLD_BOUNDARY,w=u.INITIAL_WORLD_BOUNDARY;m=u.WORLD_CENTER_Y+h.nextDouble()*(w-b)+b,this.rect.x=g,this.rect.y=m},f.prototype.updateBounds=function(){if(this.getChild()==null)throw"assert failed";if(this.getChild().getNodes().length!=0){var g=this.getChild();if(g.updateBounds(!0),this.rect.x=g.getLeft(),this.rect.y=g.getTop(),this.setWidth(g.getRight()-g.getLeft()),this.setHeight(g.getBottom()-g.getTop()),u.NODE_DIMENSIONS_INCLUDE_LABELS){var m=g.getRight()-g.getLeft(),y=g.getBottom()-g.getTop();this.labelWidth&&(this.labelPosHorizontal=="left"?(this.rect.x-=this.labelWidth,this.setWidth(m+this.labelWidth)):this.labelPosHorizontal=="center"&&this.labelWidth>m?(this.rect.x-=(this.labelWidth-m)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(m+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(y+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>y?(this.rect.y-=(this.labelHeight-y)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(y+this.labelHeight))}}},f.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},f.prototype.transform=function(g){var m=this.rect.x;m>u.WORLD_BOUNDARY?m=u.WORLD_BOUNDARY:m<-u.WORLD_BOUNDARY&&(m=-u.WORLD_BOUNDARY);var y=this.rect.y;y>u.WORLD_BOUNDARY?y=u.WORLD_BOUNDARY:y<-u.WORLD_BOUNDARY&&(y=-u.WORLD_BOUNDARY);var v=new d(m,y),b=g.inverseTransformPoint(v);this.setLocation(b.x,b.y)},f.prototype.getLeft=function(){return this.rect.x},f.prototype.getRight=function(){return this.rect.x+this.rect.width},f.prototype.getTop=function(){return this.rect.y},f.prototype.getBottom=function(){return this.rect.y+this.rect.height},f.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},r.exports=f},function(r,n,a){var i=a(0);function s(){}l(s,"FDLayoutConstants");for(var o in i)s[o]=i[o];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,r.exports=s},function(r,n,a){function i(s,o){s==null&&o==null?(this.x=0,this.y=0):(this.x=s,this.y=o)}l(i,"PointD"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(s){this.x=s},i.prototype.setY=function(s){this.y=s},i.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},r.exports=i},function(r,n,a){var i=a(2),s=a(10),o=a(0),u=a(7),h=a(3),d=a(1),f=a(13),p=a(12),g=a(11);function m(v,b,w){i.call(this,w),this.estimatedSize=s.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=v,b!=null&&b instanceof u?this.graphManager=b:b!=null&&b instanceof Layout&&(this.graphManager=b.graphManager)}l(m,"LGraph"),m.prototype=Object.create(i.prototype);for(var y in i)m[y]=i[y];m.prototype.getNodes=function(){return this.nodes},m.prototype.getEdges=function(){return this.edges},m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getParent=function(){return this.parent},m.prototype.getLeft=function(){return this.left},m.prototype.getRight=function(){return this.right},m.prototype.getTop=function(){return this.top},m.prototype.getBottom=function(){return this.bottom},m.prototype.isConnected=function(){return this.isConnected},m.prototype.add=function(v,b,w){if(b==null&&w==null){var x=v;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var T=v;if(!(this.getNodes().indexOf(b)>-1&&this.getNodes().indexOf(w)>-1))throw"Source or target not in graph!";if(!(b.owner==w.owner&&b.owner==this))throw"Both owners must be this graph!";return b.owner!=w.owner?null:(T.source=b,T.target=w,T.isInterGraph=!1,this.getEdges().push(T),b.edges.push(T),w!=b&&w.edges.push(T),T)}},m.prototype.remove=function(v){var b=v;if(v instanceof h){if(b==null)throw"Node is null!";if(!(b.owner!=null&&b.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var w=b.edges.slice(),x,T=w.length,C=0;C<T;C++)x=w[C],x.isInterGraph?this.graphManager.remove(x):x.source.owner.remove(x);var S=this.nodes.indexOf(b);if(S==-1)throw"Node not in owner node list!";this.nodes.splice(S,1)}else if(v instanceof d){var x=v;if(x==null)throw"Edge is null!";if(!(x.source!=null&&x.target!=null))throw"Source and/or target is null!";if(!(x.source.owner!=null&&x.target.owner!=null&&x.source.owner==this&&x.target.owner==this))throw"Source and/or target owner is invalid!";var E=x.source.edges.indexOf(x),k=x.target.edges.indexOf(x);if(!(E>-1&&k>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(E,1),x.target!=x.source&&x.target.edges.splice(k,1);var S=x.source.owner.getEdges().indexOf(x);if(S==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(S,1)}},m.prototype.updateLeftTop=function(){for(var v=s.MAX_VALUE,b=s.MAX_VALUE,w,x,T,C=this.getNodes(),S=C.length,E=0;E<S;E++){var k=C[E];w=k.getTop(),x=k.getLeft(),v>w&&(v=w),b>x&&(b=x)}return v==s.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?T=C[0].getParent().paddingLeft:T=this.margin,this.left=b-T,this.top=v-T,new p(this.left,this.top))},m.prototype.updateBounds=function(v){for(var b=s.MAX_VALUE,w=-s.MAX_VALUE,x=s.MAX_VALUE,T=-s.MAX_VALUE,C,S,E,k,A,I=this.nodes,L=I.length,R=0;R<L;R++){var O=I[R];v&&O.child!=null&&O.updateBounds(),C=O.getLeft(),S=O.getRight(),E=O.getTop(),k=O.getBottom(),b>C&&(b=C),w<S&&(w=S),x>E&&(x=E),T<k&&(T=k)}var M=new f(b,x,w-b,T-x);b==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),I[0].getParent().paddingLeft!=null?A=I[0].getParent().paddingLeft:A=this.margin,this.left=M.x-A,this.right=M.x+M.width+A,this.top=M.y-A,this.bottom=M.y+M.height+A},m.calculateBounds=function(v){for(var b=s.MAX_VALUE,w=-s.MAX_VALUE,x=s.MAX_VALUE,T=-s.MAX_VALUE,C,S,E,k,A=v.length,I=0;I<A;I++){var L=v[I];C=L.getLeft(),S=L.getRight(),E=L.getTop(),k=L.getBottom(),b>C&&(b=C),w<S&&(w=S),x>E&&(x=E),T<k&&(T=k)}var R=new f(b,x,w-b,T-x);return R},m.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},m.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},m.prototype.calcEstimatedSize=function(){for(var v=0,b=this.nodes,w=b.length,x=0;x<w;x++){var T=b[x];v+=T.calcEstimatedSize()}return v==0?this.estimatedSize=o.EMPTY_COMPOUND_NODE_SIZE:this.estimatedSize=v/Math.sqrt(this.nodes.length),this.estimatedSize},m.prototype.updateConnected=function(){var v=this;if(this.nodes.length==0){this.isConnected=!0;return}var b=new g,w=new Set,x=this.nodes[0],T,C,S=x.withChildren();for(S.forEach(function(R){b.push(R),w.add(R)});b.length!==0;){x=b.shift(),T=x.getEdges();for(var E=T.length,k=0;k<E;k++){var A=T[k];if(C=A.getOtherEndInGraph(x,this),C!=null&&!w.has(C)){var I=C.withChildren();I.forEach(function(R){b.push(R),w.add(R)})}}}if(this.isConnected=!1,w.size>=this.nodes.length){var L=0;w.forEach(function(R){R.owner==v&&L++}),L==this.nodes.length&&(this.isConnected=!0)}},r.exports=m},function(r,n,a){var i,s=a(1);function o(u){i=a(6),this.layout=u,this.graphs=[],this.edges=[]}l(o,"LGraphManager"),o.prototype.addRoot=function(){var u=this.layout.newGraph(),h=this.layout.newNode(null),d=this.add(u,h);return this.setRootGraph(d),this.rootGraph},o.prototype.add=function(u,h,d,f,p){if(d==null&&f==null&&p==null){if(u==null)throw"Graph is null!";if(h==null)throw"Parent node is null!";if(this.graphs.indexOf(u)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(u),u.parent!=null)throw"Already has a parent!";if(h.child!=null)throw"Already has a child!";return u.parent=h,h.child=u,u}else{p=d,f=h,d=u;var g=f.getOwner(),m=p.getOwner();if(!(g!=null&&g.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(m!=null&&m.getGraphManager()==this))throw"Target not in this graph mgr!";if(g==m)return d.isInterGraph=!1,g.add(d,f,p);if(d.isInterGraph=!0,d.source=f,d.target=p,this.edges.indexOf(d)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(d),!(d.source!=null&&d.target!=null))throw"Edge source and/or target is null!";if(!(d.source.edges.indexOf(d)==-1&&d.target.edges.indexOf(d)==-1))throw"Edge already in source and/or target incidency list!";return d.source.edges.push(d),d.target.edges.push(d),d}},o.prototype.remove=function(u){if(u instanceof i){var h=u;if(h.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(h==this.rootGraph||h.parent!=null&&h.parent.graphManager==this))throw"Invalid parent node!";var d=[];d=d.concat(h.getEdges());for(var f,p=d.length,g=0;g<p;g++)f=d[g],h.remove(f);var m=[];m=m.concat(h.getNodes());var y;p=m.length;for(var g=0;g<p;g++)y=m[g],h.remove(y);h==this.rootGraph&&this.setRootGraph(null);var v=this.graphs.indexOf(h);this.graphs.splice(v,1),h.parent=null}else if(u instanceof s){if(f=u,f==null)throw"Edge is null!";if(!f.isInterGraph)throw"Not an inter-graph edge!";if(!(f.source!=null&&f.target!=null))throw"Source and/or target is null!";if(!(f.source.edges.indexOf(f)!=-1&&f.target.edges.indexOf(f)!=-1))throw"Source and/or target doesn't know this edge!";var v=f.source.edges.indexOf(f);if(f.source.edges.splice(v,1),v=f.target.edges.indexOf(f),f.target.edges.splice(v,1),!(f.source.owner!=null&&f.source.owner.getGraphManager()!=null))throw"Edge owner graph or owner graph manager is null!";if(f.source.owner.getGraphManager().edges.indexOf(f)==-1)throw"Not in owner graph manager's edge list!";var v=f.source.owner.getGraphManager().edges.indexOf(f);f.source.owner.getGraphManager().edges.splice(v,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(this.allNodes==null){for(var u=[],h=this.getGraphs(),d=h.length,f=0;f<d;f++)u=u.concat(h[f].getNodes());this.allNodes=u}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(this.allEdges==null){var u=[],h=this.getGraphs();h.length;for(var d=0;d<h.length;d++)u=u.concat(h[d].getEdges());u=u.concat(this.edges),this.allEdges=u}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(u){if(this.allNodesToApplyGravitation!=null)throw"assert failed";this.allNodesToApplyGravitation=u},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(u){if(u.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=u,u.parent==null&&(u.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(u,h){if(!(u!=null&&h!=null))throw"assert failed";if(u==h)return!0;var d=u.getOwner(),f;do{if(f=d.getParent(),f==null)break;if(f==h)return!0;if(d=f.getOwner(),d==null)break}while(!0);d=h.getOwner();do{if(f=d.getParent(),f==null)break;if(f==u)return!0;if(d=f.getOwner(),d==null)break}while(!0);return!1},o.prototype.calcLowestCommonAncestors=function(){for(var u,h,d,f,p,g=this.getAllEdges(),m=g.length,y=0;y<m;y++){if(u=g[y],h=u.source,d=u.target,u.lca=null,u.sourceInLca=h,u.targetInLca=d,h==d){u.lca=h.getOwner();continue}for(f=h.getOwner();u.lca==null;){for(u.targetInLca=d,p=d.getOwner();u.lca==null;){if(p==f){u.lca=p;break}if(p==this.rootGraph)break;if(u.lca!=null)throw"assert failed";u.targetInLca=p.getParent(),p=u.targetInLca.getOwner()}if(f==this.rootGraph)break;u.lca==null&&(u.sourceInLca=f.getParent(),f=u.sourceInLca.getOwner())}if(u.lca==null)throw"assert failed"}},o.prototype.calcLowestCommonAncestor=function(u,h){if(u==h)return u.getOwner();var d=u.getOwner();do{if(d==null)break;var f=h.getOwner();do{if(f==null)break;if(f==d)return f;f=f.getParent().getOwner()}while(!0);d=d.getParent().getOwner()}while(!0);return d},o.prototype.calcInclusionTreeDepths=function(u,h){u==null&&h==null&&(u=this.rootGraph,h=1);for(var d,f=u.getNodes(),p=f.length,g=0;g<p;g++)d=f[g],d.inclusionTreeDepth=h,d.child!=null&&this.calcInclusionTreeDepths(d.child,h+1)},o.prototype.includesInvalidEdge=function(){for(var u,h=[],d=this.edges.length,f=0;f<d;f++)u=this.edges[f],this.isOneAncestorOfOther(u.source,u.target)&&h.push(u);for(var f=0;f<h.length;f++)this.remove(h[f]);return!1},r.exports=o},function(r,n,a){var i=a(12);function s(){}l(s,"IGeometry"),s.calcSeparationAmount=function(o,u,h,d){if(!o.intersects(u))throw"assert failed";var f=new Array(2);this.decideDirectionsForOverlappingNodes(o,u,f),h[0]=Math.min(o.getRight(),u.getRight())-Math.max(o.x,u.x),h[1]=Math.min(o.getBottom(),u.getBottom())-Math.max(o.y,u.y),o.getX()<=u.getX()&&o.getRight()>=u.getRight()?h[0]+=Math.min(u.getX()-o.getX(),o.getRight()-u.getRight()):u.getX()<=o.getX()&&u.getRight()>=o.getRight()&&(h[0]+=Math.min(o.getX()-u.getX(),u.getRight()-o.getRight())),o.getY()<=u.getY()&&o.getBottom()>=u.getBottom()?h[1]+=Math.min(u.getY()-o.getY(),o.getBottom()-u.getBottom()):u.getY()<=o.getY()&&u.getBottom()>=o.getBottom()&&(h[1]+=Math.min(o.getY()-u.getY(),u.getBottom()-o.getBottom()));var p=Math.abs((u.getCenterY()-o.getCenterY())/(u.getCenterX()-o.getCenterX()));u.getCenterY()===o.getCenterY()&&u.getCenterX()===o.getCenterX()&&(p=1);var g=p*h[0],m=h[1]/p;h[0]<m?m=h[0]:g=h[1],h[0]=-1*f[0]*(m/2+d),h[1]=-1*f[1]*(g/2+d)},s.decideDirectionsForOverlappingNodes=function(o,u,h){o.getCenterX()<u.getCenterX()?h[0]=-1:h[0]=1,o.getCenterY()<u.getCenterY()?h[1]=-1:h[1]=1},s.getIntersection2=function(o,u,h){var d=o.getCenterX(),f=o.getCenterY(),p=u.getCenterX(),g=u.getCenterY();if(o.intersects(u))return h[0]=d,h[1]=f,h[2]=p,h[3]=g,!0;var m=o.getX(),y=o.getY(),v=o.getRight(),b=o.getX(),w=o.getBottom(),x=o.getRight(),T=o.getWidthHalf(),C=o.getHeightHalf(),S=u.getX(),E=u.getY(),k=u.getRight(),A=u.getX(),I=u.getBottom(),L=u.getRight(),R=u.getWidthHalf(),O=u.getHeightHalf(),M=!1,P=!1;if(d===p){if(f>g)return h[0]=d,h[1]=y,h[2]=p,h[3]=I,!1;if(f<g)return h[0]=d,h[1]=w,h[2]=p,h[3]=E,!1}else if(f===g){if(d>p)return h[0]=m,h[1]=f,h[2]=k,h[3]=g,!1;if(d<p)return h[0]=v,h[1]=f,h[2]=S,h[3]=g,!1}else{var z=o.height/o.width,D=u.height/u.width,B=(g-f)/(p-d),W=void 0,U=void 0,j=void 0,V=void 0,Y=void 0,H=void 0;if(-z===B?d>p?(h[0]=b,h[1]=w,M=!0):(h[0]=v,h[1]=y,M=!0):z===B&&(d>p?(h[0]=m,h[1]=y,M=!0):(h[0]=x,h[1]=w,M=!0)),-D===B?p>d?(h[2]=A,h[3]=I,P=!0):(h[2]=k,h[3]=E,P=!0):D===B&&(p>d?(h[2]=S,h[3]=E,P=!0):(h[2]=L,h[3]=I,P=!0)),M&&P)return!1;if(d>p?f>g?(W=this.getCardinalDirection(z,B,4),U=this.getCardinalDirection(D,B,2)):(W=this.getCardinalDirection(-z,B,3),U=this.getCardinalDirection(-D,B,1)):f>g?(W=this.getCardinalDirection(-z,B,1),U=this.getCardinalDirection(-D,B,3)):(W=this.getCardinalDirection(z,B,2),U=this.getCardinalDirection(D,B,4)),!M)switch(W){case 1:V=y,j=d+-C/B,h[0]=j,h[1]=V;break;case 2:j=x,V=f+T*B,h[0]=j,h[1]=V;break;case 3:V=w,j=d+C/B,h[0]=j,h[1]=V;break;case 4:j=b,V=f+-T*B,h[0]=j,h[1]=V;break}if(!P)switch(U){case 1:H=E,Y=p+-O/B,h[2]=Y,h[3]=H;break;case 2:Y=L,H=g+R*B,h[2]=Y,h[3]=H;break;case 3:H=I,Y=p+O/B,h[2]=Y,h[3]=H;break;case 4:Y=A,H=g+-R*B,h[2]=Y,h[3]=H;break}}return!1},s.getCardinalDirection=function(o,u,h){return o>u?h:1+h%4},s.getIntersection=function(o,u,h,d){if(d==null)return this.getIntersection2(o,u,h);var f=o.x,p=o.y,g=u.x,m=u.y,y=h.x,v=h.y,b=d.x,w=d.y,x=void 0,T=void 0,C=void 0,S=void 0,E=void 0,k=void 0,A=void 0,I=void 0,L=void 0;return C=m-p,E=f-g,A=g*p-f*m,S=w-v,k=y-b,I=b*v-y*w,L=C*k-S*E,L===0?null:(x=(E*I-k*A)/L,T=(S*A-C*I)/L,new i(x,T))},s.angleOfVector=function(o,u,h,d){var f=void 0;return o!==h?(f=Math.atan((d-u)/(h-o)),h<o?f+=Math.PI:d<u&&(f+=this.TWO_PI)):d<u?f=this.ONE_AND_HALF_PI:f=this.HALF_PI,f},s.doIntersect=function(o,u,h,d){var f=o.x,p=o.y,g=u.x,m=u.y,y=h.x,v=h.y,b=d.x,w=d.y,x=(g-f)*(w-v)-(b-y)*(m-p);if(x===0)return!1;var T=((w-v)*(b-f)+(y-b)*(w-p))/x,C=((p-m)*(b-f)+(g-f)*(w-p))/x;return 0<T&&T<1&&0<C&&C<1},s.findCircleLineIntersections=function(o,u,h,d,f,p,g){var m=(h-o)*(h-o)+(d-u)*(d-u),y=2*((o-f)*(h-o)+(u-p)*(d-u)),v=(o-f)*(o-f)+(u-p)*(u-p)-g*g,b=y*y-4*m*v;if(b>=0){var w=(-y+Math.sqrt(y*y-4*m*v))/(2*m),x=(-y-Math.sqrt(y*y-4*m*v))/(2*m),T=null;return w>=0&&w<=1?[w]:x>=0&&x<=1?[x]:T}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,r.exports=s},function(r,n,a){function i(){}l(i,"IMath"),i.sign=function(s){return s>0?1:s<0?-1:0},i.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},i.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},r.exports=i},function(r,n,a){function i(){}l(i,"Integer"),i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,r.exports=i},function(r,n,a){var i=function(){function f(p,g){for(var m=0;m<g.length;m++){var y=g[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,y.key,y)}}return l(f,"defineProperties"),function(p,g,m){return g&&f(p.prototype,g),m&&f(p,m),p}}();function s(f,p){if(!(f instanceof p))throw new TypeError("Cannot call a class as a function")}l(s,"_classCallCheck");var o=l(function(p){return{value:p,next:null,prev:null}},"nodeFrom"),u=l(function(p,g,m,y){return p!==null?p.next=g:y.head=g,m!==null?m.prev=g:y.tail=g,g.prev=p,g.next=m,y.length++,g},"add"),h=l(function(p,g){var m=p.prev,y=p.next;return m!==null?m.next=y:g.head=y,y!==null?y.prev=m:g.tail=m,p.prev=p.next=null,g.length--,p},"_remove"),d=function(){function f(p){var g=this;s(this,f),this.length=0,this.head=null,this.tail=null,p!=null&&p.forEach(function(m){return g.push(m)})}return l(f,"LinkedList"),i(f,[{key:"size",value:l(function(){return this.length},"size")},{key:"insertBefore",value:l(function(g,m){return u(m.prev,o(g),m,this)},"insertBefore")},{key:"insertAfter",value:l(function(g,m){return u(m,o(g),m.next,this)},"insertAfter")},{key:"insertNodeBefore",value:l(function(g,m){return u(m.prev,g,m,this)},"insertNodeBefore")},{key:"insertNodeAfter",value:l(function(g,m){return u(m,g,m.next,this)},"insertNodeAfter")},{key:"push",value:l(function(g){return u(this.tail,o(g),null,this)},"push")},{key:"unshift",value:l(function(g){return u(null,o(g),this.head,this)},"unshift")},{key:"remove",value:l(function(g){return h(g,this)},"remove")},{key:"pop",value:l(function(){return h(this.tail,this).value},"pop")},{key:"popNode",value:l(function(){return h(this.tail,this)},"popNode")},{key:"shift",value:l(function(){return h(this.head,this).value},"shift")},{key:"shiftNode",value:l(function(){return h(this.head,this)},"shiftNode")},{key:"get_object_at",value:l(function(g){if(g<=this.length()){for(var m=1,y=this.head;m<g;)y=y.next,m++;return y.value}},"get_object_at")},{key:"set_object_at",value:l(function(g,m){if(g<=this.length()){for(var y=1,v=this.head;y<g;)v=v.next,y++;v.value=m}},"set_object_at")}]),f}();r.exports=d},function(r,n,a){function i(s,o,u){this.x=null,this.y=null,s==null&&o==null&&u==null?(this.x=0,this.y=0):typeof s=="number"&&typeof o=="number"&&u==null?(this.x=s,this.y=o):s.constructor.name=="Point"&&o==null&&u==null&&(u=s,this.x=u.x,this.y=u.y)}l(i,"Point"),i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(s,o,u){s.constructor.name=="Point"&&o==null&&u==null?(u=s,this.setLocation(u.x,u.y)):typeof s=="number"&&typeof o=="number"&&u==null&&(parseInt(s)==s&&parseInt(o)==o?this.move(s,o):(this.x=Math.floor(s+.5),this.y=Math.floor(o+.5)))},i.prototype.move=function(s,o){this.x=s,this.y=o},i.prototype.translate=function(s,o){this.x+=s,this.y+=o},i.prototype.equals=function(s){if(s.constructor.name=="Point"){var o=s;return this.x==o.x&&this.y==o.y}return this==s},i.prototype.toString=function(){return new i().constructor.name+"[x="+this.x+",y="+this.y+"]"},r.exports=i},function(r,n,a){function i(s,o,u,h){this.x=0,this.y=0,this.width=0,this.height=0,s!=null&&o!=null&&u!=null&&h!=null&&(this.x=s,this.y=o,this.width=u,this.height=h)}l(i,"RectangleD"),i.prototype.getX=function(){return this.x},i.prototype.setX=function(s){this.x=s},i.prototype.getY=function(){return this.y},i.prototype.setY=function(s){this.y=s},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(s){this.width=s},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(s){this.height=s},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(s){return!(this.getRight()<s.x||this.getBottom()<s.y||s.getRight()<this.x||s.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},r.exports=i},function(r,n,a){var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};function s(){}l(s,"UniqueIDGeneretor"),s.lastID=0,s.createID=function(o){return s.isPrimitive(o)?o:(o.uniqueID!=null||(o.uniqueID=s.getString(),s.lastID++),o.uniqueID)},s.getString=function(o){return o==null&&(o=s.lastID),"Object#"+o},s.isPrimitive=function(o){var u=typeof o=="undefined"?"undefined":i(o);return o==null||u!="object"&&u!="function"},r.exports=s},function(r,n,a){function i(y){if(Array.isArray(y)){for(var v=0,b=Array(y.length);v<y.length;v++)b[v]=y[v];return b}else return Array.from(y)}l(i,"_toConsumableArray");var s=a(0),o=a(7),u=a(3),h=a(1),d=a(6),f=a(5),p=a(17),g=a(29);function m(y){g.call(this),this.layoutQuality=s.QUALITY,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=s.DEFAULT_INCREMENTAL,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,y!=null&&(this.isRemoteUse=y)}l(m,"Layout"),m.RANDOM_SEED=1,m.prototype=Object.create(g.prototype),m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},m.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},m.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},m.prototype.newGraphManager=function(){var y=new o(this);return this.graphManager=y,y},m.prototype.newGraph=function(y){return new d(null,this.graphManager,y)},m.prototype.newNode=function(y){return new u(this.graphManager,y)},m.prototype.newEdge=function(y){return new h(null,null,y)},m.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},m.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var y;return this.checkLayoutSuccess()?y=!1:y=this.layout(),s.ANIMATE==="during"?!1:(y&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,y)},m.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},m.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var y=this.graphManager.getAllEdges(),v=0;v<y.length;v++)y[v];for(var b=this.graphManager.getRoot().getNodes(),v=0;v<b.length;v++)b[v];this.update(this.graphManager.getRoot())}},m.prototype.update=function(y){if(y==null)this.update2();else if(y instanceof u){var v=y;if(v.getChild()!=null)for(var b=v.getChild().getNodes(),w=0;w<b.length;w++)update(b[w]);if(v.vGraphObject!=null){var x=v.vGraphObject;x.update(v)}}else if(y instanceof h){var T=y;if(T.vGraphObject!=null){var C=T.vGraphObject;C.update(T)}}else if(y instanceof d){var S=y;if(S.vGraphObject!=null){var E=S.vGraphObject;E.update(S)}}},m.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=s.QUALITY,this.animationDuringLayout=s.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=s.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=s.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=s.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=s.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=s.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},m.prototype.transform=function(y){if(y==null)this.transform(new f(0,0));else{var v=new p,b=this.graphManager.getRoot().updateLeftTop();if(b!=null){v.setWorldOrgX(y.x),v.setWorldOrgY(y.y),v.setDeviceOrgX(b.x),v.setDeviceOrgY(b.y);for(var w=this.getAllNodes(),x,T=0;T<w.length;T++)x=w[T],x.transform(v)}}},m.prototype.positionNodesRandomly=function(y){if(y==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var v,b,w=y.getNodes(),x=0;x<w.length;x++)v=w[x],b=v.getChild(),b==null||b.getNodes().length==0?v.scatter():(this.positionNodesRandomly(b),v.updateBounds())},m.prototype.getFlatForest=function(){for(var y=[],v=!0,b=this.graphManager.getRoot().getNodes(),w=!0,x=0;x<b.length;x++)b[x].getChild()!=null&&(w=!1);if(!w)return y;var T=new Set,C=[],S=new Map,E=[];for(E=E.concat(b);E.length>0&&v;){for(C.push(E[0]);C.length>0&&v;){var k=C[0];C.splice(0,1),T.add(k);for(var A=k.getEdges(),x=0;x<A.length;x++){var I=A[x].getOtherEnd(k);if(S.get(k)!=I)if(!T.has(I))C.push(I),S.set(I,k);else{v=!1;break}}}if(!v)y=[];else{var L=[].concat(i(T));y.push(L);for(var x=0;x<L.length;x++){var R=L[x],O=E.indexOf(R);O>-1&&E.splice(O,1)}T=new Set,S=new Map}}return y},m.prototype.createDummyNodesForBendpoints=function(y){for(var v=[],b=y.source,w=this.graphManager.calcLowestCommonAncestor(y.source,y.target),x=0;x<y.bendpoints.length;x++){var T=this.newNode(null);T.setRect(new Point(0,0),new Dimension(1,1)),w.add(T);var C=this.newEdge(null);this.graphManager.add(C,b,T),v.add(T),b=T}var C=this.newEdge(null);return this.graphManager.add(C,b,y.target),this.edgeToDummyNodes.set(y,v),y.isInterGraph()?this.graphManager.remove(y):w.remove(y),v},m.prototype.createBendpointsFromDummyNodes=function(){var y=[];y=y.concat(this.graphManager.getAllEdges()),y=[].concat(i(this.edgeToDummyNodes.keys())).concat(y);for(var v=0;v<y.length;v++){var b=y[v];if(b.bendpoints.length>0){for(var w=this.edgeToDummyNodes.get(b),x=0;x<w.length;x++){var T=w[x],C=new f(T.getCenterX(),T.getCenterY()),S=b.bendpoints.get(x);S.x=C.x,S.y=C.y,T.getOwner().remove(T)}this.graphManager.add(b,b.source,b.target)}}},m.transform=function(y,v,b,w){if(b!=null&&w!=null){var x=v;if(y<=50){var T=v/b;x-=(v-T)/50*(50-y)}else{var C=v*w;x+=(C-v)/50*(y-50)}return x}else{var S,E;return y<=50?(S=9*v/500,E=v/10):(S=9*v/50,E=-8*v),S*y+E}},m.findCenterOfTree=function(y){var v=[];v=v.concat(y);var b=[],w=new Map,x=!1,T=null;(v.length==1||v.length==2)&&(x=!0,T=v[0]);for(var C=0;C<v.length;C++){var S=v[C],E=S.getNeighborsList().size;w.set(S,S.getNeighborsList().size),E==1&&b.push(S)}var k=[];for(k=k.concat(b);!x;){var A=[];A=A.concat(k),k=[];for(var C=0;C<v.length;C++){var S=v[C],I=v.indexOf(S);I>=0&&v.splice(I,1);var L=S.getNeighborsList();L.forEach(function(M){if(b.indexOf(M)<0){var P=w.get(M),z=P-1;z==1&&k.push(M),w.set(M,z)}})}b=b.concat(k),(v.length==1||v.length==2)&&(x=!0,T=v[0])}return T},m.prototype.setGraphManager=function(y){this.graphManager=y},r.exports=m},function(r,n,a){function i(){}l(i,"RandomSeed"),i.seed=1,i.x=0,i.nextDouble=function(){return i.x=Math.sin(i.seed++)*1e4,i.x-Math.floor(i.x)},r.exports=i},function(r,n,a){var i=a(5);function s(o,u){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l(s,"Transform"),s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(o){this.lworldOrgX=o},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(o){this.lworldOrgY=o},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(o){this.lworldExtX=o},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(o){this.lworldExtY=o},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(o){this.ldeviceOrgX=o},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(o){this.ldeviceOrgY=o},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(o){this.ldeviceExtX=o},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(o){this.ldeviceExtY=o},s.prototype.transformX=function(o){var u=0,h=this.lworldExtX;return h!=0&&(u=this.ldeviceOrgX+(o-this.lworldOrgX)*this.ldeviceExtX/h),u},s.prototype.transformY=function(o){var u=0,h=this.lworldExtY;return h!=0&&(u=this.ldeviceOrgY+(o-this.lworldOrgY)*this.ldeviceExtY/h),u},s.prototype.inverseTransformX=function(o){var u=0,h=this.ldeviceExtX;return h!=0&&(u=this.lworldOrgX+(o-this.ldeviceOrgX)*this.lworldExtX/h),u},s.prototype.inverseTransformY=function(o){var u=0,h=this.ldeviceExtY;return h!=0&&(u=this.lworldOrgY+(o-this.ldeviceOrgY)*this.lworldExtY/h),u},s.prototype.inverseTransformPoint=function(o){var u=new i(this.inverseTransformX(o.x),this.inverseTransformY(o.y));return u},r.exports=s},function(r,n,a){function i(g){if(Array.isArray(g)){for(var m=0,y=Array(g.length);m<g.length;m++)y[m]=g[m];return y}else return Array.from(g)}l(i,"_toConsumableArray");var s=a(15),o=a(4),u=a(0),h=a(8),d=a(9);function f(){s.call(this),this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=o.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=o.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=o.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=o.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=o.MAX_ITERATIONS}l(f,"FDLayout"),f.prototype=Object.create(s.prototype);for(var p in s)f[p]=s[p];f.prototype.initParameters=function(){s.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=o.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},f.prototype.calcIdealEdgeLengths=function(){for(var g,m,y,v,b,w,x,T=this.getGraphManager().getAllEdges(),C=0;C<T.length;C++)g=T[C],m=g.idealLength,g.isInterGraph&&(v=g.getSource(),b=g.getTarget(),w=g.getSourceInLca().getEstimatedSize(),x=g.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(g.idealLength+=w+x-2*u.SIMPLE_NODE_SIZE),y=g.getLca().getInclusionTreeDepth(),g.idealLength+=m*o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(v.getInclusionTreeDepth()+b.getInclusionTreeDepth()-2*y))},f.prototype.initSpringEmbedder=function(){var g=this.getAllNodes().length;this.incremental?(g>o.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*o.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(g-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-o.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT_INCREMENTAL):(g>o.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(o.COOLING_ADAPTATION_FACTOR,1-(g-o.ADAPTATION_LOWER_NODE_LIMIT)/(o.ADAPTATION_UPPER_NODE_LIMIT-o.ADAPTATION_LOWER_NODE_LIMIT)*(1-o.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=o.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*o.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},f.prototype.calcSpringForces=function(){for(var g=this.getAllEdges(),m,y=0;y<g.length;y++)m=g[y],this.calcSpringForce(m,m.idealLength)},f.prototype.calcRepulsionForces=function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y,v,b,w,x=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&g&&this.updateGrid(),T=new Set,y=0;y<x.length;y++)b=x[y],this.calculateRepulsionForceOfANode(b,T,g,m),T.add(b);else for(y=0;y<x.length;y++)for(b=x[y],v=y+1;v<x.length;v++)w=x[v],b.getOwner()==w.getOwner()&&this.calcRepulsionForce(b,w)},f.prototype.calcGravitationalForces=function(){for(var g,m=this.getAllNodesToApplyGravitation(),y=0;y<m.length;y++)g=m[y],this.calcGravitationalForce(g)},f.prototype.moveNodes=function(){for(var g=this.getAllNodes(),m,y=0;y<g.length;y++)m=g[y],m.move()},f.prototype.calcSpringForce=function(g,m){var y=g.getSource(),v=g.getTarget(),b,w,x,T;if(this.uniformLeafNodeSizes&&y.getChild()==null&&v.getChild()==null)g.updateLengthSimple();else if(g.updateLength(),g.isOverlapingSourceAndTarget)return;b=g.getLength(),b!=0&&(w=g.edgeElasticity*(b-m),x=w*(g.lengthX/b),T=w*(g.lengthY/b),y.springForceX+=x,y.springForceY+=T,v.springForceX-=x,v.springForceY-=T)},f.prototype.calcRepulsionForce=function(g,m){var y=g.getRect(),v=m.getRect(),b=new Array(2),w=new Array(4),x,T,C,S,E,k,A;if(y.intersects(v)){h.calcSeparationAmount(y,v,b,o.DEFAULT_EDGE_LENGTH/2),k=2*b[0],A=2*b[1];var I=g.noOfChildren*m.noOfChildren/(g.noOfChildren+m.noOfChildren);g.repulsionForceX-=I*k,g.repulsionForceY-=I*A,m.repulsionForceX+=I*k,m.repulsionForceY+=I*A}else this.uniformLeafNodeSizes&&g.getChild()==null&&m.getChild()==null?(x=v.getCenterX()-y.getCenterX(),T=v.getCenterY()-y.getCenterY()):(h.getIntersection(y,v,w),x=w[2]-w[0],T=w[3]-w[1]),Math.abs(x)<o.MIN_REPULSION_DIST&&(x=d.sign(x)*o.MIN_REPULSION_DIST),Math.abs(T)<o.MIN_REPULSION_DIST&&(T=d.sign(T)*o.MIN_REPULSION_DIST),C=x*x+T*T,S=Math.sqrt(C),E=(g.nodeRepulsion/2+m.nodeRepulsion/2)*g.noOfChildren*m.noOfChildren/C,k=E*x/S,A=E*T/S,g.repulsionForceX-=k,g.repulsionForceY-=A,m.repulsionForceX+=k,m.repulsionForceY+=A},f.prototype.calcGravitationalForce=function(g){var m,y,v,b,w,x,T,C;m=g.getOwner(),y=(m.getRight()+m.getLeft())/2,v=(m.getTop()+m.getBottom())/2,b=g.getCenterX()-y,w=g.getCenterY()-v,x=Math.abs(b)+g.getWidth()/2,T=Math.abs(w)+g.getHeight()/2,g.getOwner()==this.graphManager.getRoot()?(C=m.getEstimatedSize()*this.gravityRangeFactor,(x>C||T>C)&&(g.gravitationForceX=-this.gravityConstant*b,g.gravitationForceY=-this.gravityConstant*w)):(C=m.getEstimatedSize()*this.compoundGravityRangeFactor,(x>C||T>C)&&(g.gravitationForceX=-this.gravityConstant*b*this.compoundGravityConstant,g.gravitationForceY=-this.gravityConstant*w*this.compoundGravityConstant))},f.prototype.isConverged=function(){var g,m=!1;return this.totalIterations>this.maxIterations/3&&(m=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),g=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,g||m},f.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},f.prototype.calcNoOfChildrenForAllNodes=function(){for(var g,m=this.graphManager.getAllNodes(),y=0;y<m.length;y++)g=m[y],g.noOfChildren=g.getNoOfChildren()},f.prototype.calcGrid=function(g){var m=0,y=0;m=parseInt(Math.ceil((g.getRight()-g.getLeft())/this.repulsionRange)),y=parseInt(Math.ceil((g.getBottom()-g.getTop())/this.repulsionRange));for(var v=new Array(m),b=0;b<m;b++)v[b]=new Array(y);for(var b=0;b<m;b++)for(var w=0;w<y;w++)v[b][w]=new Array;return v},f.prototype.addNodeToGrid=function(g,m,y){var v=0,b=0,w=0,x=0;v=parseInt(Math.floor((g.getRect().x-m)/this.repulsionRange)),b=parseInt(Math.floor((g.getRect().width+g.getRect().x-m)/this.repulsionRange)),w=parseInt(Math.floor((g.getRect().y-y)/this.repulsionRange)),x=parseInt(Math.floor((g.getRect().height+g.getRect().y-y)/this.repulsionRange));for(var T=v;T<=b;T++)for(var C=w;C<=x;C++)this.grid[T][C].push(g),g.setGridCoordinates(v,b,w,x)},f.prototype.updateGrid=function(){var g,m,y=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),g=0;g<y.length;g++)m=y[g],this.addNodeToGrid(m,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},f.prototype.calculateRepulsionForceOfANode=function(g,m,y,v){if(this.totalIterations%o.GRID_CALCULATION_CHECK_PERIOD==1&&y||v){var b=new Set;g.surrounding=new Array;for(var w,x=this.grid,T=g.startX-1;T<g.finishX+2;T++)for(var C=g.startY-1;C<g.finishY+2;C++)if(!(T<0||C<0||T>=x.length||C>=x[0].length)){for(var S=0;S<x[T][C].length;S++)if(w=x[T][C][S],!(g.getOwner()!=w.getOwner()||g==w)&&!m.has(w)&&!b.has(w)){var E=Math.abs(g.getCenterX()-w.getCenterX())-(g.getWidth()/2+w.getWidth()/2),k=Math.abs(g.getCenterY()-w.getCenterY())-(g.getHeight()/2+w.getHeight()/2);E<=this.repulsionRange&&k<=this.repulsionRange&&b.add(w)}}g.surrounding=[].concat(i(b))}for(T=0;T<g.surrounding.length;T++)this.calcRepulsionForce(g,g.surrounding[T])},f.prototype.calcRepulsionRange=function(){return 0},r.exports=f},function(r,n,a){var i=a(1),s=a(4);function o(h,d,f){i.call(this,h,d,f),this.idealLength=s.DEFAULT_EDGE_LENGTH,this.edgeElasticity=s.DEFAULT_SPRING_STRENGTH}l(o,"FDLayoutEdge"),o.prototype=Object.create(i.prototype);for(var u in i)o[u]=i[u];r.exports=o},function(r,n,a){var i=a(3),s=a(4);function o(h,d,f,p){i.call(this,h,d,f,p),this.nodeRepulsion=s.DEFAULT_REPULSION_STRENGTH,this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}l(o,"FDLayoutNode"),o.prototype=Object.create(i.prototype);for(var u in i)o[u]=i[u];o.prototype.setGridCoordinates=function(h,d,f,p){this.startX=h,this.finishX=d,this.startY=f,this.finishY=p},r.exports=o},function(r,n,a){function i(s,o){this.width=0,this.height=0,s!==null&&o!==null&&(this.height=o,this.width=s)}l(i,"DimensionD"),i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(s){this.width=s},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(s){this.height=s},r.exports=i},function(r,n,a){var i=a(14);function s(){this.map={},this.keys=[]}l(s,"HashMap"),s.prototype.put=function(o,u){var h=i.createID(o);this.contains(h)||(this.map[h]=u,this.keys.push(o))},s.prototype.contains=function(o){return i.createID(o),this.map[o]!=null},s.prototype.get=function(o){var u=i.createID(o);return this.map[u]},s.prototype.keySet=function(){return this.keys},r.exports=s},function(r,n,a){var i=a(14);function s(){this.set={}}l(s,"HashSet"),s.prototype.add=function(o){var u=i.createID(o);this.contains(u)||(this.set[u]=o)},s.prototype.remove=function(o){delete this.set[i.createID(o)]},s.prototype.clear=function(){this.set={}},s.prototype.contains=function(o){return this.set[i.createID(o)]==o},s.prototype.isEmpty=function(){return this.size()===0},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAllTo=function(o){for(var u=Object.keys(this.set),h=u.length,d=0;d<h;d++)o.push(this.set[u[d]])},s.prototype.size=function(){return Object.keys(this.set).length},s.prototype.addAll=function(o){for(var u=o.length,h=0;h<u;h++){var d=o[h];this.add(d)}},r.exports=s},function(r,n,a){function i(){}l(i,"Matrix"),i.multMat=function(s,o){for(var u=[],h=0;h<s.length;h++){u[h]=[];for(var d=0;d<o[0].length;d++){u[h][d]=0;for(var f=0;f<s[0].length;f++)u[h][d]+=s[h][f]*o[f][d]}}return u},i.transpose=function(s){for(var o=[],u=0;u<s[0].length;u++){o[u]=[];for(var h=0;h<s.length;h++)o[u][h]=s[h][u]}return o},i.multCons=function(s,o){for(var u=[],h=0;h<s.length;h++)u[h]=s[h]*o;return u},i.minusOp=function(s,o){for(var u=[],h=0;h<s.length;h++)u[h]=s[h]-o[h];return u},i.dotProduct=function(s,o){for(var u=0,h=0;h<s.length;h++)u+=s[h]*o[h];return u},i.mag=function(s){return Math.sqrt(this.dotProduct(s,s))},i.normalize=function(s){for(var o=[],u=this.mag(s),h=0;h<s.length;h++)o[h]=s[h]/u;return o},i.multGamma=function(s){for(var o=[],u=0,h=0;h<s.length;h++)u+=s[h];u*=-1/s.length;for(var d=0;d<s.length;d++)o[d]=u+s[d];return o},i.multL=function(s,o,u){for(var h=[],d=[],f=[],p=0;p<o[0].length;p++){for(var g=0,m=0;m<o.length;m++)g+=-.5*o[m][p]*s[m];d[p]=g}for(var y=0;y<u.length;y++){for(var v=0,b=0;b<u.length;b++)v+=u[y][b]*d[b];f[y]=v}for(var w=0;w<o.length;w++){for(var x=0,T=0;T<o[0].length;T++)x+=o[w][T]*f[T];h[w]=x}return h},r.exports=i},function(r,n,a){var i=function(){function h(d,f){for(var p=0;p<f.length;p++){var g=f[p];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}return l(h,"defineProperties"),function(d,f,p){return f&&h(d.prototype,f),p&&h(d,p),d}}();function s(h,d){if(!(h instanceof d))throw new TypeError("Cannot call a class as a function")}l(s,"_classCallCheck");var o=a(11),u=function(){function h(d,f){s(this,h),(f!==null||f!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var p=void 0;d instanceof o?p=d.size():p=d.length,this._quicksort(d,0,p-1)}return l(h,"Quicksort"),i(h,[{key:"_quicksort",value:l(function(f,p,g){if(p<g){var m=this._partition(f,p,g);this._quicksort(f,p,m),this._quicksort(f,m+1,g)}},"_quicksort")},{key:"_partition",value:l(function(f,p,g){for(var m=this._get(f,p),y=p,v=g;;){for(;this.compareFunction(m,this._get(f,v));)v--;for(;this.compareFunction(this._get(f,y),m);)y++;if(y<v)this._swap(f,y,v),y++,v--;else return v}},"_partition")},{key:"_get",value:l(function(f,p){return f instanceof o?f.get_object_at(p):f[p]},"_get")},{key:"_set",value:l(function(f,p,g){f instanceof o?f.set_object_at(p,g):f[p]=g},"_set")},{key:"_swap",value:l(function(f,p,g){var m=this._get(f,p);this._set(f,p,this._get(f,g)),this._set(f,g,m)},"_swap")},{key:"_defaultCompareFunction",value:l(function(f,p){return p>f},"_defaultCompareFunction")}]),h}();r.exports=u},function(r,n,a){function i(){}l(i,"SVD"),i.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var o=Math.min(this.m,this.n);this.s=function(it){for(var Ue=[];it-- >0;)Ue.push(0);return Ue}(Math.min(this.m+1,this.n)),this.U=function(it){var Ue=l(function we(gt){if(gt.length==0)return 0;for(var ge=[],ie=0;ie<gt[0];ie++)ge.push(we(gt.slice(1)));return ge},"allocate");return Ue(it)}([this.m,o]),this.V=function(it){var Ue=l(function we(gt){if(gt.length==0)return 0;for(var ge=[],ie=0;ie<gt[0];ie++)ge.push(we(gt.slice(1)));return ge},"allocate");return Ue(it)}([this.n,this.n]);for(var u=function(it){for(var Ue=[];it-- >0;)Ue.push(0);return Ue}(this.n),h=function(it){for(var Ue=[];it-- >0;)Ue.push(0);return Ue}(this.m),d=!0,f=Math.min(this.m-1,this.n),p=Math.max(0,Math.min(this.n-2,this.m)),g=0;g<Math.max(f,p);g++){if(g<f){this.s[g]=0;for(var m=g;m<this.m;m++)this.s[g]=i.hypot(this.s[g],s[m][g]);if(this.s[g]!==0){s[g][g]<0&&(this.s[g]=-this.s[g]);for(var y=g;y<this.m;y++)s[y][g]/=this.s[g];s[g][g]+=1}this.s[g]=-this.s[g]}for(var v=g+1;v<this.n;v++){if(function(it,Ue){return it&&Ue}(g<f,this.s[g]!==0)){for(var b=0,w=g;w<this.m;w++)b+=s[w][g]*s[w][v];b=-b/s[g][g];for(var x=g;x<this.m;x++)s[x][v]+=b*s[x][g]}u[v]=s[g][v]}if(function(it,Ue){return Ue}(d,g<f))for(var T=g;T<this.m;T++)this.U[T][g]=s[T][g];if(g<p){u[g]=0;for(var C=g+1;C<this.n;C++)u[g]=i.hypot(u[g],u[C]);if(u[g]!==0){u[g+1]<0&&(u[g]=-u[g]);for(var S=g+1;S<this.n;S++)u[S]/=u[g];u[g+1]+=1}if(u[g]=-u[g],function(it,Ue){return it&&Ue}(g+1<this.m,u[g]!==0)){for(var E=g+1;E<this.m;E++)h[E]=0;for(var k=g+1;k<this.n;k++)for(var A=g+1;A<this.m;A++)h[A]+=u[k]*s[A][k];for(var I=g+1;I<this.n;I++)for(var L=-u[I]/u[g+1],R=g+1;R<this.m;R++)s[R][I]+=L*h[R]}for(var O=g+1;O<this.n;O++)this.V[O][g]=u[O]}}var M=Math.min(this.n,this.m+1);f<this.n&&(this.s[f]=s[f][f]),this.m<M&&(this.s[M-1]=0),p+1<M&&(u[p]=s[p][M-1]),u[M-1]=0;{for(var P=f;P<o;P++){for(var z=0;z<this.m;z++)this.U[z][P]=0;this.U[P][P]=1}for(var D=f-1;D>=0;D--)if(this.s[D]!==0){for(var B=D+1;B<o;B++){for(var W=0,U=D;U<this.m;U++)W+=this.U[U][D]*this.U[U][B];W=-W/this.U[D][D];for(var j=D;j<this.m;j++)this.U[j][B]+=W*this.U[j][D]}for(var V=D;V<this.m;V++)this.U[V][D]=-this.U[V][D];this.U[D][D]=1+this.U[D][D];for(var Y=0;Y<D-1;Y++)this.U[Y][D]=0}else{for(var H=0;H<this.m;H++)this.U[H][D]=0;this.U[D][D]=1}}for(var q=this.n-1;q>=0;q--){if(function(it,Ue){return it&&Ue}(q<p,u[q]!==0))for(var Z=q+1;Z<o;Z++){for(var K=0,re=q+1;re<this.n;re++)K+=this.V[re][q]*this.V[re][Z];K=-K/this.V[q+1][q];for(var Q=q+1;Q<this.n;Q++)this.V[Q][Z]+=K*this.V[Q][q]}for(var te=0;te<this.n;te++)this.V[te][q]=0;this.V[q][q]=1}for(var ee=M-1,J=Math.pow(2,-52),ae=Math.pow(2,-966);M>0;){var se=void 0,fe=void 0;for(se=M-2;se>=-1&&se!==-1;se--)if(Math.abs(u[se])<=ae+J*(Math.abs(this.s[se])+Math.abs(this.s[se+1]))){u[se]=0;break}if(se===M-2)fe=4;else{var ve=void 0;for(ve=M-1;ve>=se&&ve!==se;ve--){var de=(ve!==M?Math.abs(u[ve]):0)+(ve!==se+1?Math.abs(u[ve-1]):0);if(Math.abs(this.s[ve])<=ae+J*de){this.s[ve]=0;break}}ve===se?fe=3:ve===M-1?fe=1:(fe=2,se=ve)}switch(se++,fe){case 1:{var Ee=u[M-2];u[M-2]=0;for(var Ce=M-2;Ce>=se;Ce--){var De=i.hypot(this.s[Ce],Ee),ce=this.s[Ce]/De,Ie=Ee/De;this.s[Ce]=De,Ce!==se&&(Ee=-Ie*u[Ce-1],u[Ce-1]=ce*u[Ce-1]);for(var ye=0;ye<this.n;ye++)De=ce*this.V[ye][Ce]+Ie*this.V[ye][M-1],this.V[ye][M-1]=-Ie*this.V[ye][Ce]+ce*this.V[ye][M-1],this.V[ye][Ce]=De}}break;case 2:{var pe=u[se-1];u[se-1]=0;for(var Ae=se;Ae<M;Ae++){var Ve=i.hypot(this.s[Ae],pe),ze=this.s[Ae]/Ve,We=pe/Ve;this.s[Ae]=Ve,pe=-We*u[Ae],u[Ae]=ze*u[Ae];for(var me=0;me<this.m;me++)Ve=ze*this.U[me][Ae]+We*this.U[me][se-1],this.U[me][se-1]=-We*this.U[me][Ae]+ze*this.U[me][se-1],this.U[me][Ae]=Ve}}break;case 3:{var Se=Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[M-1]),Math.abs(this.s[M-2])),Math.abs(u[M-2])),Math.abs(this.s[se])),Math.abs(u[se])),ne=this.s[M-1]/Se,xe=this.s[M-2]/Se,oe=u[M-2]/Se,_e=this.s[se]/Se,ue=u[se]/Se,tt=((xe+ne)*(xe-ne)+oe*oe)/2,Re=ne*oe*(ne*oe),et=0;(function(it,Ue){return it||Ue})(tt!==0,Re!==0)&&(et=Math.sqrt(tt*tt+Re),tt<0&&(et=-et),et=Re/(tt+et));for(var Xe=(_e+ne)*(_e-ne)+et,ot=_e*ue,Ge=se;Ge<M-1;Ge++){var ht=i.hypot(Xe,ot),Je=Xe/ht,St=ot/ht;Ge!==se&&(u[Ge-1]=ht),Xe=Je*this.s[Ge]+St*u[Ge],u[Ge]=Je*u[Ge]-St*this.s[Ge],ot=St*this.s[Ge+1],this.s[Ge+1]=Je*this.s[Ge+1];for(var He=0;He<this.n;He++)ht=Je*this.V[He][Ge]+St*this.V[He][Ge+1],this.V[He][Ge+1]=-St*this.V[He][Ge]+Je*this.V[He][Ge+1],this.V[He][Ge]=ht;if(ht=i.hypot(Xe,ot),Je=Xe/ht,St=ot/ht,this.s[Ge]=ht,Xe=Je*u[Ge]+St*this.s[Ge+1],this.s[Ge+1]=-St*u[Ge]+Je*this.s[Ge+1],ot=St*u[Ge+1],u[Ge+1]=Je*u[Ge+1],Ge<this.m-1)for(var dt=0;dt<this.m;dt++)ht=Je*this.U[dt][Ge]+St*this.U[dt][Ge+1],this.U[dt][Ge+1]=-St*this.U[dt][Ge]+Je*this.U[dt][Ge+1],this.U[dt][Ge]=ht}u[M-2]=Xe}break;case 4:{if(this.s[se]<=0){this.s[se]=this.s[se]<0?-this.s[se]:0;for(var Oe=0;Oe<=ee;Oe++)this.V[Oe][se]=-this.V[Oe][se]}for(;se<ee&&!(this.s[se]>=this.s[se+1]);){var vt=this.s[se];if(this.s[se]=this.s[se+1],this.s[se+1]=vt,se<this.n-1)for(var qe=0;qe<this.n;qe++)vt=this.V[qe][se+1],this.V[qe][se+1]=this.V[qe][se],this.V[qe][se]=vt;if(se<this.m-1)for(var Me=0;Me<this.m;Me++)vt=this.U[Me][se+1],this.U[Me][se+1]=this.U[Me][se],this.U[Me][se]=vt;se++}M--}break}}var lt={U:this.U,V:this.V,S:this.s};return lt},i.hypot=function(s,o){var u=void 0;return Math.abs(s)>Math.abs(o)?(u=o/s,u=Math.abs(s)*Math.sqrt(1+u*u)):o!=0?(u=s/o,u=Math.abs(o)*Math.sqrt(1+u*u)):u=0,u},r.exports=i},function(r,n,a){var i=function(){function u(h,d){for(var f=0;f<d.length;f++){var p=d[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(h,p.key,p)}}return l(u,"defineProperties"),function(h,d,f){return d&&u(h.prototype,d),f&&u(h,f),h}}();function s(u,h){if(!(u instanceof h))throw new TypeError("Cannot call a class as a function")}l(s,"_classCallCheck");var o=function(){function u(h,d){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,u),this.sequence1=h,this.sequence2=d,this.match_score=f,this.mismatch_penalty=p,this.gap_penalty=g,this.iMax=h.length+1,this.jMax=d.length+1,this.grid=new Array(this.iMax);for(var m=0;m<this.iMax;m++){this.grid[m]=new Array(this.jMax);for(var y=0;y<this.jMax;y++)this.grid[m][y]=0}this.tracebackGrid=new Array(this.iMax);for(var v=0;v<this.iMax;v++){this.tracebackGrid[v]=new Array(this.jMax);for(var b=0;b<this.jMax;b++)this.tracebackGrid[v][b]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return l(u,"NeedlemanWunsch"),i(u,[{key:"getScore",value:l(function(){return this.score},"getScore")},{key:"getAlignments",value:l(function(){return this.alignments},"getAlignments")},{key:"computeGrids",value:l(function(){for(var d=1;d<this.jMax;d++)this.grid[0][d]=this.grid[0][d-1]+this.gap_penalty,this.tracebackGrid[0][d]=[!1,!1,!0];for(var f=1;f<this.iMax;f++)this.grid[f][0]=this.grid[f-1][0]+this.gap_penalty,this.tracebackGrid[f][0]=[!1,!0,!1];for(var p=1;p<this.iMax;p++)for(var g=1;g<this.jMax;g++){var m=void 0;this.sequence1[p-1]===this.sequence2[g-1]?m=this.grid[p-1][g-1]+this.match_score:m=this.grid[p-1][g-1]+this.mismatch_penalty;var y=this.grid[p-1][g]+this.gap_penalty,v=this.grid[p][g-1]+this.gap_penalty,b=[m,y,v],w=this.arrayAllMaxIndexes(b);this.grid[p][g]=b[w[0]],this.tracebackGrid[p][g]=[w.includes(0),w.includes(1),w.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]},"computeGrids")},{key:"alignmentTraceback",value:l(function(){var d=[];for(d.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});d[0];){var f=d[0],p=this.tracebackGrid[f.pos[0]][f.pos[1]];p[0]&&d.push({pos:[f.pos[0]-1,f.pos[1]-1],seq1:this.sequence1[f.pos[0]-1]+f.seq1,seq2:this.sequence2[f.pos[1]-1]+f.seq2}),p[1]&&d.push({pos:[f.pos[0]-1,f.pos[1]],seq1:this.sequence1[f.pos[0]-1]+f.seq1,seq2:"-"+f.seq2}),p[2]&&d.push({pos:[f.pos[0],f.pos[1]-1],seq1:"-"+f.seq1,seq2:this.sequence2[f.pos[1]-1]+f.seq2}),f.pos[0]===0&&f.pos[1]===0&&this.alignments.push({sequence1:f.seq1,sequence2:f.seq2}),d.shift()}return this.alignments},"alignmentTraceback")},{key:"getAllIndexes",value:l(function(d,f){for(var p=[],g=-1;(g=d.indexOf(f,g+1))!==-1;)p.push(g);return p},"getAllIndexes")},{key:"arrayAllMaxIndexes",value:l(function(d){return this.getAllIndexes(d,Math.max.apply(null,d))},"arrayAllMaxIndexes")}]),u}();r.exports=o},function(r,n,a){var i=l(function(){},"layoutBase");i.FDLayout=a(18),i.FDLayoutConstants=a(4),i.FDLayoutEdge=a(19),i.FDLayoutNode=a(20),i.DimensionD=a(21),i.HashMap=a(22),i.HashSet=a(23),i.IGeometry=a(8),i.IMath=a(9),i.Integer=a(10),i.Point=a(12),i.PointD=a(5),i.RandomSeed=a(16),i.RectangleD=a(13),i.Transform=a(17),i.UniqueIDGeneretor=a(14),i.Quicksort=a(25),i.LinkedList=a(11),i.LGraphObject=a(2),i.LGraph=a(6),i.LEdge=a(1),i.LGraphManager=a(7),i.LNode=a(3),i.Layout=a(15),i.LayoutConstants=a(0),i.NeedlemanWunsch=a(27),i.Matrix=a(24),i.SVD=a(26),r.exports=i},function(r,n,a){function i(){this.listeners=[]}l(i,"Emitter");var s=i.prototype;s.addListener=function(o,u){this.listeners.push({event:o,callback:u})},s.removeListener=function(o,u){for(var h=this.listeners.length;h>=0;h--){var d=this.listeners[h];d.event===o&&d.callback===u&&this.listeners.splice(h,1)}},s.emit=function(o,u){for(var h=0;h<this.listeners.length;h++){var d=this.listeners[h];o===d.event&&d.callback(u)}},r.exports=i}])})}(Fte)),Fte.exports}l(Pyr,"requireLayoutBase");var NVe;function Ryr(){return NVe||(NVe=1,function(t,e){l(function(n,a){t.exports=a(Pyr())},"webpackUniversalModuleDefinition")(Nl,function(r){return(()=>{var n={45:(o,u,h)=>{var d={};d.layoutBase=h(551),d.CoSEConstants=h(806),d.CoSEEdge=h(767),d.CoSEGraph=h(880),d.CoSEGraphManager=h(578),d.CoSELayout=h(765),d.CoSENode=h(991),d.ConstraintHandler=h(902),o.exports=d},806:(o,u,h)=>{var d=h(551).FDLayoutConstants;function f(){}l(f,"CoSEConstants");for(var p in d)f[p]=d[p];f.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,f.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH,f.DEFAULT_COMPONENT_SEPERATION=60,f.TILE=!0,f.TILING_PADDING_VERTICAL=10,f.TILING_PADDING_HORIZONTAL=10,f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0,f.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,f.TREE_REDUCTION_ON_INCREMENTAL=!0,f.PURE_INCREMENTAL=f.DEFAULT_INCREMENTAL,o.exports=f},767:(o,u,h)=>{var d=h(551).FDLayoutEdge;function f(g,m,y){d.call(this,g,m,y)}l(f,"CoSEEdge"),f.prototype=Object.create(d.prototype);for(var p in d)f[p]=d[p];o.exports=f},880:(o,u,h)=>{var d=h(551).LGraph;function f(g,m,y){d.call(this,g,m,y)}l(f,"CoSEGraph"),f.prototype=Object.create(d.prototype);for(var p in d)f[p]=d[p];o.exports=f},578:(o,u,h)=>{var d=h(551).LGraphManager;function f(g){d.call(this,g)}l(f,"CoSEGraphManager"),f.prototype=Object.create(d.prototype);for(var p in d)f[p]=d[p];o.exports=f},765:(o,u,h)=>{var d=h(551).FDLayout,f=h(578),p=h(880),g=h(991),m=h(767),y=h(806),v=h(902),b=h(551).FDLayoutConstants,w=h(551).LayoutConstants,x=h(551).Point,T=h(551).PointD,C=h(551).DimensionD,S=h(551).Layout,E=h(551).Integer,k=h(551).IGeometry,A=h(551).LGraph,I=h(551).Transform,L=h(551).LinkedList;function R(){d.call(this),this.toBeTiled={},this.constraints={}}l(R,"CoSELayout"),R.prototype=Object.create(d.prototype);for(var O in d)R[O]=d[O];R.prototype.newGraphManager=function(){var M=new f(this);return this.graphManager=M,M},R.prototype.newGraph=function(M){return new p(null,this.graphManager,M)},R.prototype.newNode=function(M){return new g(this.graphManager,M)},R.prototype.newEdge=function(M){return new m(null,null,M)},R.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.isSubLayout||(y.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=y.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=y.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=b.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=b.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=b.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=b.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},R.prototype.initSpringEmbedder=function(){d.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/b.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},R.prototype.layout=function(){var M=w.DEFAULT_CREATE_BENDS_AS_NEEDED;return M&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},R.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(y.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var P=new Set(this.getAllNodes()),z=this.nodesWithGravity.filter(function(W){return P.has(W)});this.graphManager.setAllNodesToApplyGravitation(z)}}else{var M=this.getFlatForest();if(M.length>0)this.positionNodesRadially(M);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var P=new Set(this.getAllNodes()),z=this.nodesWithGravity.filter(function(D){return P.has(D)});this.graphManager.setAllNodesToApplyGravitation(z),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(v.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),y.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},R.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%b.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var M=new Set(this.getAllNodes()),P=this.nodesWithGravity.filter(function(B){return M.has(B)});this.graphManager.setAllNodesToApplyGravitation(P),this.graphManager.updateBounds(),this.updateGrid(),y.PURE_INCREMENTAL?this.coolingFactor=b.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=b.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),y.PURE_INCREMENTAL?this.coolingFactor=b.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=b.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var z=!this.isTreeGrowing&&!this.isGrowthFinished,D=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(z,D),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},R.prototype.getPositionsData=function(){for(var M=this.graphManager.getAllNodes(),P={},z=0;z<M.length;z++){var D=M[z].rect,B=M[z].id;P[B]={id:B,x:D.getCenterX(),y:D.getCenterY(),w:D.width,h:D.height}}return P},R.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var M=!1;if(b.ANIMATE==="during")this.emit("layoutstarted");else{for(;!M;)M=this.tick();this.graphManager.updateBounds()}},R.prototype.moveNodes=function(){for(var M=this.getAllNodes(),P,z=0;z<M.length;z++)P=M[z],P.calculateDisplacement();Object.keys(this.constraints).length>0&&this.updateDisplacements();for(var z=0;z<M.length;z++)P=M[z],P.move()},R.prototype.initConstraintVariables=function(){var M=this;this.idToNodeMap=new Map,this.fixedNodeSet=new Set;for(var P=this.graphManager.getAllNodes(),z=0;z<P.length;z++){var D=P[z];this.idToNodeMap.set(D.id,D)}var B=l(function Q(te){for(var ee=te.getChild().getNodes(),J,ae=0,se=0;se<ee.length;se++)J=ee[se],J.getChild()==null?M.fixedNodeSet.has(J.id)&&(ae+=100):ae+=Q(J);return ae},"calculateCompoundWeight");if(this.constraints.fixedNodeConstraint){this.constraints.fixedNodeConstraint.forEach(function(ee){M.fixedNodeSet.add(ee.nodeId)});for(var P=this.graphManager.getAllNodes(),D,z=0;z<P.length;z++)if(D=P[z],D.getChild()!=null){var W=B(D);W>0&&(D.fixedNodeWeight=W)}}if(this.constraints.relativePlacementConstraint){var U=new Map,j=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(Q){M.fixedNodesOnHorizontal.add(Q),M.fixedNodesOnVertical.add(Q)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var V=this.constraints.alignmentConstraint.vertical,z=0;z<V.length;z++)this.dummyToNodeForVerticalAlignment.set("dummy"+z,[]),V[z].forEach(function(te){U.set(te,"dummy"+z),M.dummyToNodeForVerticalAlignment.get("dummy"+z).push(te),M.fixedNodeSet.has(te)&&M.fixedNodesOnHorizontal.add("dummy"+z)});if(this.constraints.alignmentConstraint.horizontal)for(var Y=this.constraints.alignmentConstraint.horizontal,z=0;z<Y.length;z++)this.dummyToNodeForHorizontalAlignment.set("dummy"+z,[]),Y[z].forEach(function(te){j.set(te,"dummy"+z),M.dummyToNodeForHorizontalAlignment.get("dummy"+z).push(te),M.fixedNodeSet.has(te)&&M.fixedNodesOnVertical.add("dummy"+z)})}if(y.RELAX_MOVEMENT_ON_CONSTRAINTS)this.shuffle=function(Q){var te,ee,J;for(J=Q.length-1;J>=2*Q.length/3;J--)te=Math.floor(Math.random()*(J+1)),ee=Q[J],Q[J]=Q[te],Q[te]=ee;return Q},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(Q){if(Q.left){var te=U.has(Q.left)?U.get(Q.left):Q.left,ee=U.has(Q.right)?U.get(Q.right):Q.right;M.nodesInRelativeHorizontal.includes(te)||(M.nodesInRelativeHorizontal.push(te),M.nodeToRelativeConstraintMapHorizontal.set(te,[]),M.dummyToNodeForVerticalAlignment.has(te)?M.nodeToTempPositionMapHorizontal.set(te,M.idToNodeMap.get(M.dummyToNodeForVerticalAlignment.get(te)[0]).getCenterX()):M.nodeToTempPositionMapHorizontal.set(te,M.idToNodeMap.get(te).getCenterX())),M.nodesInRelativeHorizontal.includes(ee)||(M.nodesInRelativeHorizontal.push(ee),M.nodeToRelativeConstraintMapHorizontal.set(ee,[]),M.dummyToNodeForVerticalAlignment.has(ee)?M.nodeToTempPositionMapHorizontal.set(ee,M.idToNodeMap.get(M.dummyToNodeForVerticalAlignment.get(ee)[0]).getCenterX()):M.nodeToTempPositionMapHorizontal.set(ee,M.idToNodeMap.get(ee).getCenterX())),M.nodeToRelativeConstraintMapHorizontal.get(te).push({right:ee,gap:Q.gap}),M.nodeToRelativeConstraintMapHorizontal.get(ee).push({left:te,gap:Q.gap})}else{var J=j.has(Q.top)?j.get(Q.top):Q.top,ae=j.has(Q.bottom)?j.get(Q.bottom):Q.bottom;M.nodesInRelativeVertical.includes(J)||(M.nodesInRelativeVertical.push(J),M.nodeToRelativeConstraintMapVertical.set(J,[]),M.dummyToNodeForHorizontalAlignment.has(J)?M.nodeToTempPositionMapVertical.set(J,M.idToNodeMap.get(M.dummyToNodeForHorizontalAlignment.get(J)[0]).getCenterY()):M.nodeToTempPositionMapVertical.set(J,M.idToNodeMap.get(J).getCenterY())),M.nodesInRelativeVertical.includes(ae)||(M.nodesInRelativeVertical.push(ae),M.nodeToRelativeConstraintMapVertical.set(ae,[]),M.dummyToNodeForHorizontalAlignment.has(ae)?M.nodeToTempPositionMapVertical.set(ae,M.idToNodeMap.get(M.dummyToNodeForHorizontalAlignment.get(ae)[0]).getCenterY()):M.nodeToTempPositionMapVertical.set(ae,M.idToNodeMap.get(ae).getCenterY())),M.nodeToRelativeConstraintMapVertical.get(J).push({bottom:ae,gap:Q.gap}),M.nodeToRelativeConstraintMapVertical.get(ae).push({top:J,gap:Q.gap})}});else{var H=new Map,q=new Map;this.constraints.relativePlacementConstraint.forEach(function(Q){if(Q.left){var te=U.has(Q.left)?U.get(Q.left):Q.left,ee=U.has(Q.right)?U.get(Q.right):Q.right;H.has(te)?H.get(te).push(ee):H.set(te,[ee]),H.has(ee)?H.get(ee).push(te):H.set(ee,[te])}else{var J=j.has(Q.top)?j.get(Q.top):Q.top,ae=j.has(Q.bottom)?j.get(Q.bottom):Q.bottom;q.has(J)?q.get(J).push(ae):q.set(J,[ae]),q.has(ae)?q.get(ae).push(J):q.set(ae,[J])}});var Z=l(function(te,ee){var J=[],ae=[],se=new L,fe=new Set,ve=0;return te.forEach(function(de,Ee){if(!fe.has(Ee)){J[ve]=[],ae[ve]=!1;var Ce=Ee;for(se.push(Ce),fe.add(Ce),J[ve].push(Ce);se.length!=0;){Ce=se.shift(),ee.has(Ce)&&(ae[ve]=!0);var De=te.get(Ce);De.forEach(function(ce){fe.has(ce)||(se.push(ce),fe.add(ce),J[ve].push(ce))})}ve++}}),{components:J,isFixed:ae}},"constructComponents"),K=Z(H,M.fixedNodesOnHorizontal);this.componentsOnHorizontal=K.components,this.fixedComponentsOnHorizontal=K.isFixed;var re=Z(q,M.fixedNodesOnVertical);this.componentsOnVertical=re.components,this.fixedComponentsOnVertical=re.isFixed}}},R.prototype.updateDisplacements=function(){var M=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(re){var Q=M.idToNodeMap.get(re.nodeId);Q.displacementX=0,Q.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var P=this.constraints.alignmentConstraint.vertical,z=0;z<P.length;z++){for(var D=0,B=0;B<P[z].length;B++){if(this.fixedNodeSet.has(P[z][B])){D=0;break}D+=this.idToNodeMap.get(P[z][B]).displacementX}for(var W=D/P[z].length,B=0;B<P[z].length;B++)this.idToNodeMap.get(P[z][B]).displacementX=W}if(this.constraints.alignmentConstraint.horizontal)for(var U=this.constraints.alignmentConstraint.horizontal,z=0;z<U.length;z++){for(var j=0,B=0;B<U[z].length;B++){if(this.fixedNodeSet.has(U[z][B])){j=0;break}j+=this.idToNodeMap.get(U[z][B]).displacementY}for(var V=j/U[z].length,B=0;B<U[z].length;B++)this.idToNodeMap.get(U[z][B]).displacementY=V}}if(this.constraints.relativePlacementConstraint)if(y.RELAX_MOVEMENT_ON_CONSTRAINTS)this.totalIterations%10==0&&(this.shuffle(this.nodesInRelativeHorizontal),this.shuffle(this.nodesInRelativeVertical)),this.nodesInRelativeHorizontal.forEach(function(re){if(!M.fixedNodesOnHorizontal.has(re)){var Q=0;M.dummyToNodeForVerticalAlignment.has(re)?Q=M.idToNodeMap.get(M.dummyToNodeForVerticalAlignment.get(re)[0]).displacementX:Q=M.idToNodeMap.get(re).displacementX,M.nodeToRelativeConstraintMapHorizontal.get(re).forEach(function(te){if(te.right){var ee=M.nodeToTempPositionMapHorizontal.get(te.right)-M.nodeToTempPositionMapHorizontal.get(re)-Q;ee<te.gap&&(Q-=te.gap-ee)}else{var ee=M.nodeToTempPositionMapHorizontal.get(re)-M.nodeToTempPositionMapHorizontal.get(te.left)+Q;ee<te.gap&&(Q+=te.gap-ee)}}),M.nodeToTempPositionMapHorizontal.set(re,M.nodeToTempPositionMapHorizontal.get(re)+Q),M.dummyToNodeForVerticalAlignment.has(re)?M.dummyToNodeForVerticalAlignment.get(re).forEach(function(te){M.idToNodeMap.get(te).displacementX=Q}):M.idToNodeMap.get(re).displacementX=Q}}),this.nodesInRelativeVertical.forEach(function(re){if(!M.fixedNodesOnHorizontal.has(re)){var Q=0;M.dummyToNodeForHorizontalAlignment.has(re)?Q=M.idToNodeMap.get(M.dummyToNodeForHorizontalAlignment.get(re)[0]).displacementY:Q=M.idToNodeMap.get(re).displacementY,M.nodeToRelativeConstraintMapVertical.get(re).forEach(function(te){if(te.bottom){var ee=M.nodeToTempPositionMapVertical.get(te.bottom)-M.nodeToTempPositionMapVertical.get(re)-Q;ee<te.gap&&(Q-=te.gap-ee)}else{var ee=M.nodeToTempPositionMapVertical.get(re)-M.nodeToTempPositionMapVertical.get(te.top)+Q;ee<te.gap&&(Q+=te.gap-ee)}}),M.nodeToTempPositionMapVertical.set(re,M.nodeToTempPositionMapVertical.get(re)+Q),M.dummyToNodeForHorizontalAlignment.has(re)?M.dummyToNodeForHorizontalAlignment.get(re).forEach(function(te){M.idToNodeMap.get(te).displacementY=Q}):M.idToNodeMap.get(re).displacementY=Q}});else{for(var z=0;z<this.componentsOnHorizontal.length;z++){var Y=this.componentsOnHorizontal[z];if(this.fixedComponentsOnHorizontal[z])for(var B=0;B<Y.length;B++)this.dummyToNodeForVerticalAlignment.has(Y[B])?this.dummyToNodeForVerticalAlignment.get(Y[B]).forEach(function(te){M.idToNodeMap.get(te).displacementX=0}):this.idToNodeMap.get(Y[B]).displacementX=0;else{for(var H=0,q=0,B=0;B<Y.length;B++)if(this.dummyToNodeForVerticalAlignment.has(Y[B])){var Z=this.dummyToNodeForVerticalAlignment.get(Y[B]);H+=Z.length*this.idToNodeMap.get(Z[0]).displacementX,q+=Z.length}else H+=this.idToNodeMap.get(Y[B]).displacementX,q++;for(var K=H/q,B=0;B<Y.length;B++)this.dummyToNodeForVerticalAlignment.has(Y[B])?this.dummyToNodeForVerticalAlignment.get(Y[B]).forEach(function(te){M.idToNodeMap.get(te).displacementX=K}):this.idToNodeMap.get(Y[B]).displacementX=K}}for(var z=0;z<this.componentsOnVertical.length;z++){var Y=this.componentsOnVertical[z];if(this.fixedComponentsOnVertical[z])for(var B=0;B<Y.length;B++)this.dummyToNodeForHorizontalAlignment.has(Y[B])?this.dummyToNodeForHorizontalAlignment.get(Y[B]).forEach(function(ee){M.idToNodeMap.get(ee).displacementY=0}):this.idToNodeMap.get(Y[B]).displacementY=0;else{for(var H=0,q=0,B=0;B<Y.length;B++)if(this.dummyToNodeForHorizontalAlignment.has(Y[B])){var Z=this.dummyToNodeForHorizontalAlignment.get(Y[B]);H+=Z.length*this.idToNodeMap.get(Z[0]).displacementY,q+=Z.length}else H+=this.idToNodeMap.get(Y[B]).displacementY,q++;for(var K=H/q,B=0;B<Y.length;B++)this.dummyToNodeForHorizontalAlignment.has(Y[B])?this.dummyToNodeForHorizontalAlignment.get(Y[B]).forEach(function(se){M.idToNodeMap.get(se).displacementY=K}):this.idToNodeMap.get(Y[B]).displacementY=K}}}},R.prototype.calculateNodesToApplyGravitationTo=function(){var M=[],P,z=this.graphManager.getGraphs(),D=z.length,B;for(B=0;B<D;B++)P=z[B],P.updateConnected(),P.isConnected||(M=M.concat(P.getNodes()));return M},R.prototype.createBendpoints=function(){var M=[];M=M.concat(this.graphManager.getAllEdges());var P=new Set,z;for(z=0;z<M.length;z++){var D=M[z];if(!P.has(D)){var B=D.getSource(),W=D.getTarget();if(B==W)D.getBendpoints().push(new T),D.getBendpoints().push(new T),this.createDummyNodesForBendpoints(D),P.add(D);else{var U=[];if(U=U.concat(B.getEdgeListToNode(W)),U=U.concat(W.getEdgeListToNode(B)),!P.has(U[0])){if(U.length>1){var j;for(j=0;j<U.length;j++){var V=U[j];V.getBendpoints().push(new T),this.createDummyNodesForBendpoints(V)}}U.forEach(function(Y){P.add(Y)})}}}if(P.size==M.length)break}},R.prototype.positionNodesRadially=function(M){for(var P=new x(0,0),z=Math.ceil(Math.sqrt(M.length)),D=0,B=0,W=0,U=new T(0,0),j=0;j<M.length;j++){j%z==0&&(W=0,B=D,j!=0&&(B+=y.DEFAULT_COMPONENT_SEPERATION),D=0);var V=M[j],Y=S.findCenterOfTree(V);P.x=W,P.y=B,U=R.radialLayout(V,Y,P),U.y>D&&(D=Math.floor(U.y)),W=Math.floor(U.x+y.DEFAULT_COMPONENT_SEPERATION)}this.transform(new T(w.WORLD_CENTER_X-U.x/2,w.WORLD_CENTER_Y-U.y/2))},R.radialLayout=function(M,P,z){var D=Math.max(this.maxDiagonalInTree(M),y.DEFAULT_RADIAL_SEPARATION);R.branchRadialLayout(P,null,0,359,0,D);var B=A.calculateBounds(M),W=new I;W.setDeviceOrgX(B.getMinX()),W.setDeviceOrgY(B.getMinY()),W.setWorldOrgX(z.x),W.setWorldOrgY(z.y);for(var U=0;U<M.length;U++){var j=M[U];j.transform(W)}var V=new T(B.getMaxX(),B.getMaxY());return W.inverseTransformPoint(V)},R.branchRadialLayout=function(M,P,z,D,B,W){var U=(D-z+1)/2;U<0&&(U+=180);var j=(U+z)%360,V=j*k.TWO_PI/360,Y=B*Math.cos(V),H=B*Math.sin(V);M.setCenter(Y,H);var q=[];q=q.concat(M.getEdges());var Z=q.length;P!=null&&Z--;for(var K=0,re=q.length,Q,te=M.getEdgesBetween(P);te.length>1;){var ee=te[0];te.splice(0,1);var J=q.indexOf(ee);J>=0&&q.splice(J,1),re--,Z--}P!=null?Q=(q.indexOf(te[0])+1)%re:Q=0;for(var ae=Math.abs(D-z)/Z,se=Q;K!=Z;se=++se%re){var fe=q[se].getOtherEnd(M);if(fe!=P){var ve=(z+K*ae)%360,de=(ve+ae)%360;R.branchRadialLayout(fe,M,ve,de,B+W,W),K++}}},R.maxDiagonalInTree=function(M){for(var P=E.MIN_VALUE,z=0;z<M.length;z++){var D=M[z],B=D.getDiagonal();B>P&&(P=B)}return P},R.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},R.prototype.groupZeroDegreeMembers=function(){var M=this,P={};this.memberGroups={},this.idToDummyNode={};for(var z=[],D=this.graphManager.getAllNodes(),B=0;B<D.length;B++){var W=D[B],U=W.getParent();this.getNodeDegreeWithChildren(W)===0&&(U.id==null||!this.getToBeTiled(U))&&z.push(W)}for(var B=0;B<z.length;B++){var W=z[B],j=W.getParent().id;typeof P[j]=="undefined"&&(P[j]=[]),P[j]=P[j].concat(W)}Object.keys(P).forEach(function(V){if(P[V].length>1){var Y="DummyCompound_"+V;M.memberGroups[Y]=P[V];var H=P[V][0].getParent(),q=new g(M.graphManager);q.id=Y,q.paddingLeft=H.paddingLeft||0,q.paddingRight=H.paddingRight||0,q.paddingBottom=H.paddingBottom||0,q.paddingTop=H.paddingTop||0,M.idToDummyNode[Y]=q;var Z=M.getGraphManager().add(M.newGraph(),q),K=H.getChild();K.add(q);for(var re=0;re<P[V].length;re++){var Q=P[V][re];K.remove(Q),Z.add(Q)}}})},R.prototype.clearCompounds=function(){var M={},P={};this.performDFSOnCompounds();for(var z=0;z<this.compoundOrder.length;z++)P[this.compoundOrder[z].id]=this.compoundOrder[z],M[this.compoundOrder[z].id]=[].concat(this.compoundOrder[z].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[z].getChild()),this.compoundOrder[z].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(M,P)},R.prototype.clearZeroDegreeMembers=function(){var M=this,P=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(z){var D=M.idToDummyNode[z];if(P[z]=M.tileNodes(M.memberGroups[z],D.paddingLeft+D.paddingRight),D.rect.width=P[z].width,D.rect.height=P[z].height,D.setCenter(P[z].centerX,P[z].centerY),D.labelMarginLeft=0,D.labelMarginTop=0,y.NODE_DIMENSIONS_INCLUDE_LABELS){var B=D.rect.width,W=D.rect.height;D.labelWidth&&(D.labelPosHorizontal=="left"?(D.rect.x-=D.labelWidth,D.setWidth(B+D.labelWidth),D.labelMarginLeft=D.labelWidth):D.labelPosHorizontal=="center"&&D.labelWidth>B?(D.rect.x-=(D.labelWidth-B)/2,D.setWidth(D.labelWidth),D.labelMarginLeft=(D.labelWidth-B)/2):D.labelPosHorizontal=="right"&&D.setWidth(B+D.labelWidth)),D.labelHeight&&(D.labelPosVertical=="top"?(D.rect.y-=D.labelHeight,D.setHeight(W+D.labelHeight),D.labelMarginTop=D.labelHeight):D.labelPosVertical=="center"&&D.labelHeight>W?(D.rect.y-=(D.labelHeight-W)/2,D.setHeight(D.labelHeight),D.labelMarginTop=(D.labelHeight-W)/2):D.labelPosVertical=="bottom"&&D.setHeight(W+D.labelHeight))}})},R.prototype.repopulateCompounds=function(){for(var M=this.compoundOrder.length-1;M>=0;M--){var P=this.compoundOrder[M],z=P.id,D=P.paddingLeft,B=P.paddingTop,W=P.labelMarginLeft,U=P.labelMarginTop;this.adjustLocations(this.tiledMemberPack[z],P.rect.x,P.rect.y,D,B,W,U)}},R.prototype.repopulateZeroDegreeMembers=function(){var M=this,P=this.tiledZeroDegreePack;Object.keys(P).forEach(function(z){var D=M.idToDummyNode[z],B=D.paddingLeft,W=D.paddingTop,U=D.labelMarginLeft,j=D.labelMarginTop;M.adjustLocations(P[z],D.rect.x,D.rect.y,B,W,U,j)})},R.prototype.getToBeTiled=function(M){var P=M.id;if(this.toBeTiled[P]!=null)return this.toBeTiled[P];var z=M.getChild();if(z==null)return this.toBeTiled[P]=!1,!1;for(var D=z.getNodes(),B=0;B<D.length;B++){var W=D[B];if(this.getNodeDegree(W)>0)return this.toBeTiled[P]=!1,!1;if(W.getChild()==null){this.toBeTiled[W.id]=!1;continue}if(!this.getToBeTiled(W))return this.toBeTiled[P]=!1,!1}return this.toBeTiled[P]=!0,!0},R.prototype.getNodeDegree=function(M){M.id;for(var P=M.getEdges(),z=0,D=0;D<P.length;D++){var B=P[D];B.getSource().id!==B.getTarget().id&&(z=z+1)}return z},R.prototype.getNodeDegreeWithChildren=function(M){var P=this.getNodeDegree(M);if(M.getChild()==null)return P;for(var z=M.getChild().getNodes(),D=0;D<z.length;D++){var B=z[D];P+=this.getNodeDegreeWithChildren(B)}return P},R.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},R.prototype.fillCompexOrderByDFS=function(M){for(var P=0;P<M.length;P++){var z=M[P];z.getChild()!=null&&this.fillCompexOrderByDFS(z.getChild().getNodes()),this.getToBeTiled(z)&&this.compoundOrder.push(z)}},R.prototype.adjustLocations=function(M,P,z,D,B,W,U){P+=D+W,z+=B+U;for(var j=P,V=0;V<M.rows.length;V++){var Y=M.rows[V];P=j;for(var H=0,q=0;q<Y.length;q++){var Z=Y[q];Z.rect.x=P,Z.rect.y=z,P+=Z.rect.width+M.horizontalPadding,Z.rect.height>H&&(H=Z.rect.height)}z+=H+M.verticalPadding}},R.prototype.tileCompoundMembers=function(M,P){var z=this;this.tiledMemberPack=[],Object.keys(M).forEach(function(D){var B=P[D];if(z.tiledMemberPack[D]=z.tileNodes(M[D],B.paddingLeft+B.paddingRight),B.rect.width=z.tiledMemberPack[D].width,B.rect.height=z.tiledMemberPack[D].height,B.setCenter(z.tiledMemberPack[D].centerX,z.tiledMemberPack[D].centerY),B.labelMarginLeft=0,B.labelMarginTop=0,y.NODE_DIMENSIONS_INCLUDE_LABELS){var W=B.rect.width,U=B.rect.height;B.labelWidth&&(B.labelPosHorizontal=="left"?(B.rect.x-=B.labelWidth,B.setWidth(W+B.labelWidth),B.labelMarginLeft=B.labelWidth):B.labelPosHorizontal=="center"&&B.labelWidth>W?(B.rect.x-=(B.labelWidth-W)/2,B.setWidth(B.labelWidth),B.labelMarginLeft=(B.labelWidth-W)/2):B.labelPosHorizontal=="right"&&B.setWidth(W+B.labelWidth)),B.labelHeight&&(B.labelPosVertical=="top"?(B.rect.y-=B.labelHeight,B.setHeight(U+B.labelHeight),B.labelMarginTop=B.labelHeight):B.labelPosVertical=="center"&&B.labelHeight>U?(B.rect.y-=(B.labelHeight-U)/2,B.setHeight(B.labelHeight),B.labelMarginTop=(B.labelHeight-U)/2):B.labelPosVertical=="bottom"&&B.setHeight(U+B.labelHeight))}})},R.prototype.tileNodes=function(M,P){var z=this.tileNodesByFavoringDim(M,P,!0),D=this.tileNodesByFavoringDim(M,P,!1),B=this.getOrgRatio(z),W=this.getOrgRatio(D),U;return W<B?U=D:U=z,U},R.prototype.getOrgRatio=function(M){var P=M.width,z=M.height,D=P/z;return D<1&&(D=1/D),D},R.prototype.calcIdealRowWidth=function(M,P){var z=y.TILING_PADDING_VERTICAL,D=y.TILING_PADDING_HORIZONTAL,B=M.length,W=0,U=0,j=0;M.forEach(function(re){W+=re.getWidth(),U+=re.getHeight(),re.getWidth()>j&&(j=re.getWidth())});var V=W/B,Y=U/B,H=Math.pow(z-D,2)+4*(V+D)*(Y+z)*B,q=(D-z+Math.sqrt(H))/(2*(V+D)),Z;P?(Z=Math.ceil(q),Z==q&&Z++):Z=Math.floor(q);var K=Z*(V+D)-D;return j>K&&(K=j),K+=D*2,K},R.prototype.tileNodesByFavoringDim=function(M,P,z){var D=y.TILING_PADDING_VERTICAL,B=y.TILING_PADDING_HORIZONTAL,W=y.TILING_COMPARE_BY,U={rows:[],rowWidth:[],rowHeight:[],width:0,height:P,verticalPadding:D,horizontalPadding:B,centerX:0,centerY:0};W&&(U.idealRowWidth=this.calcIdealRowWidth(M,z));var j=l(function(Q){return Q.rect.width*Q.rect.height},"getNodeArea"),V=l(function(Q,te){return j(te)-j(Q)},"areaCompareFcn");M.sort(function(re,Q){var te=V;return U.idealRowWidth?(te=W,te(re.id,Q.id)):te(re,Q)});for(var Y=0,H=0,q=0;q<M.length;q++){var Z=M[q];Y+=Z.getCenterX(),H+=Z.getCenterY()}U.centerX=Y/M.length,U.centerY=H/M.length;for(var q=0;q<M.length;q++){var Z=M[q];if(U.rows.length==0)this.insertNodeToRow(U,Z,0,P);else if(this.canAddHorizontal(U,Z.rect.width,Z.rect.height)){var K=U.rows.length-1;U.idealRowWidth||(K=this.getShortestRowIndex(U)),this.insertNodeToRow(U,Z,K,P)}else this.insertNodeToRow(U,Z,U.rows.length,P);this.shiftToLastRow(U)}return U},R.prototype.insertNodeToRow=function(M,P,z,D){var B=D;if(z==M.rows.length){var W=[];M.rows.push(W),M.rowWidth.push(B),M.rowHeight.push(0)}var U=M.rowWidth[z]+P.rect.width;M.rows[z].length>0&&(U+=M.horizontalPadding),M.rowWidth[z]=U,M.width<U&&(M.width=U);var j=P.rect.height;z>0&&(j+=M.verticalPadding);var V=0;j>M.rowHeight[z]&&(V=M.rowHeight[z],M.rowHeight[z]=j,V=M.rowHeight[z]-V),M.height+=V,M.rows[z].push(P)},R.prototype.getShortestRowIndex=function(M){for(var P=-1,z=Number.MAX_VALUE,D=0;D<M.rows.length;D++)M.rowWidth[D]<z&&(P=D,z=M.rowWidth[D]);return P},R.prototype.getLongestRowIndex=function(M){for(var P=-1,z=Number.MIN_VALUE,D=0;D<M.rows.length;D++)M.rowWidth[D]>z&&(P=D,z=M.rowWidth[D]);return P},R.prototype.canAddHorizontal=function(M,P,z){if(M.idealRowWidth){var D=M.rows.length-1,B=M.rowWidth[D];return B+P+M.horizontalPadding<=M.idealRowWidth}var W=this.getShortestRowIndex(M);if(W<0)return!0;var U=M.rowWidth[W];if(U+M.horizontalPadding+P<=M.width)return!0;var j=0;M.rowHeight[W]<z&&W>0&&(j=z+M.verticalPadding-M.rowHeight[W]);var V;M.width-U>=P+M.horizontalPadding?V=(M.height+j)/(U+P+M.horizontalPadding):V=(M.height+j)/M.width,j=z+M.verticalPadding;var Y;return M.width<P?Y=(M.height+j)/P:Y=(M.height+j)/M.width,Y<1&&(Y=1/Y),V<1&&(V=1/V),V<Y},R.prototype.shiftToLastRow=function(M){var P=this.getLongestRowIndex(M),z=M.rowWidth.length-1,D=M.rows[P],B=D[D.length-1],W=B.width+M.horizontalPadding;if(M.width-M.rowWidth[z]>W&&P!=z){D.splice(-1,1),M.rows[z].push(B),M.rowWidth[P]=M.rowWidth[P]-W,M.rowWidth[z]=M.rowWidth[z]+W,M.width=M.rowWidth[instance.getLongestRowIndex(M)];for(var U=Number.MIN_VALUE,j=0;j<D.length;j++)D[j].height>U&&(U=D[j].height);P>0&&(U+=M.verticalPadding);var V=M.rowHeight[P]+M.rowHeight[z];M.rowHeight[P]=U,M.rowHeight[z]<B.height+M.verticalPadding&&(M.rowHeight[z]=B.height+M.verticalPadding);var Y=M.rowHeight[P]+M.rowHeight[z];M.height+=Y-V,this.shiftToLastRow(M)}},R.prototype.tilingPreLayout=function(){y.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},R.prototype.tilingPostLayout=function(){y.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},R.prototype.reduceTrees=function(){for(var M=[],P=!0,z;P;){var D=this.graphManager.getAllNodes(),B=[];P=!1;for(var W=0;W<D.length;W++)if(z=D[W],z.getEdges().length==1&&!z.getEdges()[0].isInterGraph&&z.getChild()==null){if(y.PURE_INCREMENTAL){var U=z.getEdges()[0].getOtherEnd(z),j=new C(z.getCenterX()-U.getCenterX(),z.getCenterY()-U.getCenterY());B.push([z,z.getEdges()[0],z.getOwner(),j])}else B.push([z,z.getEdges()[0],z.getOwner()]);P=!0}if(P==!0){for(var V=[],Y=0;Y<B.length;Y++)B[Y][0].getEdges().length==1&&(V.push(B[Y]),B[Y][0].getOwner().remove(B[Y][0]));M.push(V),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=M},R.prototype.growTree=function(M){for(var P=M.length,z=M[P-1],D,B=0;B<z.length;B++)D=z[B],this.findPlaceforPrunedNode(D),D[2].add(D[0]),D[2].add(D[1],D[1].source,D[1].target);M.splice(M.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},R.prototype.findPlaceforPrunedNode=function(M){var P,z,D=M[0];if(D==M[1].source?z=M[1].target:z=M[1].source,y.PURE_INCREMENTAL)D.setCenter(z.getCenterX()+M[3].getWidth(),z.getCenterY()+M[3].getHeight());else{var B=z.startX,W=z.finishX,U=z.startY,j=z.finishY,V=0,Y=0,H=0,q=0,Z=[V,H,Y,q];if(U>0)for(var K=B;K<=W;K++)Z[0]+=this.grid[K][U-1].length+this.grid[K][U].length-1;if(W<this.grid.length-1)for(var K=U;K<=j;K++)Z[1]+=this.grid[W+1][K].length+this.grid[W][K].length-1;if(j<this.grid[0].length-1)for(var K=B;K<=W;K++)Z[2]+=this.grid[K][j+1].length+this.grid[K][j].length-1;if(B>0)for(var K=U;K<=j;K++)Z[3]+=this.grid[B-1][K].length+this.grid[B][K].length-1;for(var re=E.MAX_VALUE,Q,te,ee=0;ee<Z.length;ee++)Z[ee]<re?(re=Z[ee],Q=1,te=ee):Z[ee]==re&&Q++;if(Q==3&&re==0)Z[0]==0&&Z[1]==0&&Z[2]==0?P=1:Z[0]==0&&Z[1]==0&&Z[3]==0?P=0:Z[0]==0&&Z[2]==0&&Z[3]==0?P=3:Z[1]==0&&Z[2]==0&&Z[3]==0&&(P=2);else if(Q==2&&re==0){var J=Math.floor(Math.random()*2);Z[0]==0&&Z[1]==0?J==0?P=0:P=1:Z[0]==0&&Z[2]==0?J==0?P=0:P=2:Z[0]==0&&Z[3]==0?J==0?P=0:P=3:Z[1]==0&&Z[2]==0?J==0?P=1:P=2:Z[1]==0&&Z[3]==0?J==0?P=1:P=3:J==0?P=2:P=3}else if(Q==4&&re==0){var J=Math.floor(Math.random()*4);P=J}else P=te;P==0?D.setCenter(z.getCenterX(),z.getCenterY()-z.getHeight()/2-b.DEFAULT_EDGE_LENGTH-D.getHeight()/2):P==1?D.setCenter(z.getCenterX()+z.getWidth()/2+b.DEFAULT_EDGE_LENGTH+D.getWidth()/2,z.getCenterY()):P==2?D.setCenter(z.getCenterX(),z.getCenterY()+z.getHeight()/2+b.DEFAULT_EDGE_LENGTH+D.getHeight()/2):D.setCenter(z.getCenterX()-z.getWidth()/2-b.DEFAULT_EDGE_LENGTH-D.getWidth()/2,z.getCenterY())}},o.exports=R},991:(o,u,h)=>{var d=h(551).FDLayoutNode,f=h(551).IMath;function p(m,y,v,b){d.call(this,m,y,v,b)}l(p,"CoSENode"),p.prototype=Object.create(d.prototype);for(var g in d)p[g]=d[g];p.prototype.calculateDisplacement=function(){var m=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=m.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=m.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=m.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=m.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>m.coolingFactor*m.maxNodeDisplacement&&(this.displacementX=m.coolingFactor*m.maxNodeDisplacement*f.sign(this.displacementX)),Math.abs(this.displacementY)>m.coolingFactor*m.maxNodeDisplacement&&(this.displacementY=m.coolingFactor*m.maxNodeDisplacement*f.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},p.prototype.propogateDisplacementToChildren=function(m,y){for(var v=this.getChild().getNodes(),b,w=0;w<v.length;w++)b=v[w],b.getChild()==null?(b.displacementX+=m,b.displacementY+=y):b.propogateDisplacementToChildren(m,y)},p.prototype.move=function(){var m=this.graphManager.getLayout();(this.child==null||this.child.getNodes().length==0)&&(this.moveBy(this.displacementX,this.displacementY),m.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY)),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},p.prototype.setPred1=function(m){this.pred1=m},p.prototype.getPred1=function(){return pred1},p.prototype.getPred2=function(){return pred2},p.prototype.setNext=function(m){this.next=m},p.prototype.getNext=function(){return next},p.prototype.setProcessed=function(m){this.processed=m},p.prototype.isProcessed=function(){return processed},o.exports=p},902:(o,u,h)=>{function d(v){if(Array.isArray(v)){for(var b=0,w=Array(v.length);b<v.length;b++)w[b]=v[b];return w}else return Array.from(v)}l(d,"_toConsumableArray");var f=h(806),p=h(551).LinkedList,g=h(551).Matrix,m=h(551).SVD;function y(){}l(y,"ConstraintHandler"),y.handleConstraints=function(v){var b={};b.fixedNodeConstraint=v.constraints.fixedNodeConstraint,b.alignmentConstraint=v.constraints.alignmentConstraint,b.relativePlacementConstraint=v.constraints.relativePlacementConstraint;for(var w=new Map,x=new Map,T=[],C=[],S=v.getAllNodes(),E=0,k=0;k<S.length;k++){var A=S[k];A.getChild()==null&&(x.set(A.id,E++),T.push(A.getCenterX()),C.push(A.getCenterY()),w.set(A.id,A))}b.relativePlacementConstraint&&b.relativePlacementConstraint.forEach(function(xe){!xe.gap&&xe.gap!=0&&(xe.left?xe.gap=f.DEFAULT_EDGE_LENGTH+w.get(xe.left).getWidth()/2+w.get(xe.right).getWidth()/2:xe.gap=f.DEFAULT_EDGE_LENGTH+w.get(xe.top).getHeight()/2+w.get(xe.bottom).getHeight()/2)});var I=l(function(oe,_e){return{x:oe.x-_e.x,y:oe.y-_e.y}},"calculatePositionDiff"),L=l(function(oe){var _e=0,ue=0;return oe.forEach(function(tt){_e+=T[x.get(tt)],ue+=C[x.get(tt)]}),{x:_e/oe.size,y:ue/oe.size}},"calculateAvgPosition"),R=l(function(oe,_e,ue,tt,Re){function et(dt,Oe){var vt=new Set(dt),qe=!0,Me=!1,lt=void 0;try{for(var it=Oe[Symbol.iterator](),Ue;!(qe=(Ue=it.next()).done);qe=!0){var we=Ue.value;vt.add(we)}}catch(gt){Me=!0,lt=gt}finally{try{!qe&&it.return&&it.return()}finally{if(Me)throw lt}}return vt}l(et,"setUnion");var Xe=new Map;oe.forEach(function(dt,Oe){Xe.set(Oe,0)}),oe.forEach(function(dt,Oe){dt.forEach(function(vt){Xe.set(vt.id,Xe.get(vt.id)+1)})});var ot=new Map,Ge=new Map,ht=new p;Xe.forEach(function(dt,Oe){dt==0?(ht.push(Oe),ue||(_e=="horizontal"?ot.set(Oe,x.has(Oe)?T[x.get(Oe)]:tt.get(Oe)):ot.set(Oe,x.has(Oe)?C[x.get(Oe)]:tt.get(Oe)))):ot.set(Oe,Number.NEGATIVE_INFINITY),ue&&Ge.set(Oe,new Set([Oe]))}),ue&&Re.forEach(function(dt){var Oe=[];if(dt.forEach(function(Me){ue.has(Me)&&Oe.push(Me)}),Oe.length>0){var vt=0;Oe.forEach(function(Me){_e=="horizontal"?(ot.set(Me,x.has(Me)?T[x.get(Me)]:tt.get(Me)),vt+=ot.get(Me)):(ot.set(Me,x.has(Me)?C[x.get(Me)]:tt.get(Me)),vt+=ot.get(Me))}),vt=vt/Oe.length,dt.forEach(function(Me){ue.has(Me)||ot.set(Me,vt)})}else{var qe=0;dt.forEach(function(Me){_e=="horizontal"?qe+=x.has(Me)?T[x.get(Me)]:tt.get(Me):qe+=x.has(Me)?C[x.get(Me)]:tt.get(Me)}),qe=qe/dt.length,dt.forEach(function(Me){ot.set(Me,qe)})}});for(var Je=l(function(){var Oe=ht.shift(),vt=oe.get(Oe);vt.forEach(function(qe){if(ot.get(qe.id)<ot.get(Oe)+qe.gap)if(ue&&ue.has(qe.id)){var Me=void 0;if(_e=="horizontal"?Me=x.has(qe.id)?T[x.get(qe.id)]:tt.get(qe.id):Me=x.has(qe.id)?C[x.get(qe.id)]:tt.get(qe.id),ot.set(qe.id,Me),Me<ot.get(Oe)+qe.gap){var lt=ot.get(Oe)+qe.gap-Me;Ge.get(Oe).forEach(function(it){ot.set(it,ot.get(it)-lt)})}}else ot.set(qe.id,ot.get(Oe)+qe.gap);Xe.set(qe.id,Xe.get(qe.id)-1),Xe.get(qe.id)==0&&ht.push(qe.id),ue&&Ge.set(qe.id,et(Ge.get(Oe),Ge.get(qe.id)))})},"_loop");ht.length!=0;)Je();if(ue){var St=new Set;oe.forEach(function(dt,Oe){dt.length==0&&St.add(Oe)});var He=[];Ge.forEach(function(dt,Oe){if(St.has(Oe)){var vt=!1,qe=!0,Me=!1,lt=void 0;try{for(var it=dt[Symbol.iterator](),Ue;!(qe=(Ue=it.next()).done);qe=!0){var we=Ue.value;ue.has(we)&&(vt=!0)}}catch(ie){Me=!0,lt=ie}finally{try{!qe&&it.return&&it.return()}finally{if(Me)throw lt}}if(!vt){var gt=!1,ge=void 0;He.forEach(function(ie,be){ie.has([].concat(d(dt))[0])&&(gt=!0,ge=be)}),gt?dt.forEach(function(ie){He[ge].add(ie)}):He.push(new Set(dt))}}}),He.forEach(function(dt,Oe){var vt=Number.POSITIVE_INFINITY,qe=Number.POSITIVE_INFINITY,Me=Number.NEGATIVE_INFINITY,lt=Number.NEGATIVE_INFINITY,it=!0,Ue=!1,we=void 0;try{for(var gt=dt[Symbol.iterator](),ge;!(it=(ge=gt.next()).done);it=!0){var ie=ge.value,be=void 0;_e=="horizontal"?be=x.has(ie)?T[x.get(ie)]:tt.get(ie):be=x.has(ie)?C[x.get(ie)]:tt.get(ie);var $e=ot.get(ie);be<vt&&(vt=be),be>Me&&(Me=be),$e<qe&&(qe=$e),$e>lt&&(lt=$e)}}catch(Ct){Ue=!0,we=Ct}finally{try{!it&>.return&>.return()}finally{if(Ue)throw we}}var le=(vt+Me)/2-(qe+lt)/2,ke=!0,je=!1,ut=void 0;try{for(var Qe=dt[Symbol.iterator](),Ze;!(ke=(Ze=Qe.next()).done);ke=!0){var st=Ze.value;ot.set(st,ot.get(st)+le)}}catch(Ct){je=!0,ut=Ct}finally{try{!ke&&Qe.return&&Qe.return()}finally{if(je)throw ut}}})}return ot},"findAppropriatePositionForRelativePlacement"),O=l(function(oe){var _e=0,ue=0,tt=0,Re=0;if(oe.forEach(function(Ge){Ge.left?T[x.get(Ge.left)]-T[x.get(Ge.right)]>=0?_e++:ue++:C[x.get(Ge.top)]-C[x.get(Ge.bottom)]>=0?tt++:Re++}),_e>ue&&tt>Re)for(var et=0;et<x.size;et++)T[et]=-1*T[et],C[et]=-1*C[et];else if(_e>ue)for(var Xe=0;Xe<x.size;Xe++)T[Xe]=-1*T[Xe];else if(tt>Re)for(var ot=0;ot<x.size;ot++)C[ot]=-1*C[ot]},"applyReflectionForRelativePlacement"),M=l(function(oe){var _e=[],ue=new p,tt=new Set,Re=0;return oe.forEach(function(et,Xe){if(!tt.has(Xe)){_e[Re]=[];var ot=Xe;for(ue.push(ot),tt.add(ot),_e[Re].push(ot);ue.length!=0;){ot=ue.shift();var Ge=oe.get(ot);Ge.forEach(function(ht){tt.has(ht.id)||(ue.push(ht.id),tt.add(ht.id),_e[Re].push(ht.id))})}Re++}}),_e},"findComponents"),P=l(function(oe){var _e=new Map;return oe.forEach(function(ue,tt){_e.set(tt,[])}),oe.forEach(function(ue,tt){ue.forEach(function(Re){_e.get(tt).push(Re),_e.get(Re.id).push({id:tt,gap:Re.gap,direction:Re.direction})})}),_e},"dagToUndirected"),z=l(function(oe){var _e=new Map;return oe.forEach(function(ue,tt){_e.set(tt,[])}),oe.forEach(function(ue,tt){ue.forEach(function(Re){_e.get(Re.id).push({id:tt,gap:Re.gap,direction:Re.direction})})}),_e},"dagToReversed"),D=[],B=[],W=!1,U=!1,j=new Set,V=new Map,Y=new Map,H=[];if(b.fixedNodeConstraint&&b.fixedNodeConstraint.forEach(function(xe){j.add(xe.nodeId)}),b.relativePlacementConstraint&&(b.relativePlacementConstraint.forEach(function(xe){xe.left?(V.has(xe.left)?V.get(xe.left).push({id:xe.right,gap:xe.gap,direction:"horizontal"}):V.set(xe.left,[{id:xe.right,gap:xe.gap,direction:"horizontal"}]),V.has(xe.right)||V.set(xe.right,[])):(V.has(xe.top)?V.get(xe.top).push({id:xe.bottom,gap:xe.gap,direction:"vertical"}):V.set(xe.top,[{id:xe.bottom,gap:xe.gap,direction:"vertical"}]),V.has(xe.bottom)||V.set(xe.bottom,[]))}),Y=P(V),H=M(Y)),f.TRANSFORM_ON_CONSTRAINT_HANDLING){if(b.fixedNodeConstraint&&b.fixedNodeConstraint.length>1)b.fixedNodeConstraint.forEach(function(xe,oe){D[oe]=[xe.position.x,xe.position.y],B[oe]=[T[x.get(xe.nodeId)],C[x.get(xe.nodeId)]]}),W=!0;else if(b.alignmentConstraint)(function(){var xe=0;if(b.alignmentConstraint.vertical){for(var oe=b.alignmentConstraint.vertical,_e=l(function(ot){var Ge=new Set;oe[ot].forEach(function(St){Ge.add(St)});var ht=new Set([].concat(d(Ge)).filter(function(St){return j.has(St)})),Je=void 0;ht.size>0?Je=T[x.get(ht.values().next().value)]:Je=L(Ge).x,oe[ot].forEach(function(St){D[xe]=[Je,C[x.get(St)]],B[xe]=[T[x.get(St)],C[x.get(St)]],xe++})},"_loop2"),ue=0;ue<oe.length;ue++)_e(ue);W=!0}if(b.alignmentConstraint.horizontal){for(var tt=b.alignmentConstraint.horizontal,Re=l(function(ot){var Ge=new Set;tt[ot].forEach(function(St){Ge.add(St)});var ht=new Set([].concat(d(Ge)).filter(function(St){return j.has(St)})),Je=void 0;ht.size>0?Je=T[x.get(ht.values().next().value)]:Je=L(Ge).y,tt[ot].forEach(function(St){D[xe]=[T[x.get(St)],Je],B[xe]=[T[x.get(St)],C[x.get(St)]],xe++})},"_loop3"),et=0;et<tt.length;et++)Re(et);W=!0}b.relativePlacementConstraint&&(U=!0)})();else if(b.relativePlacementConstraint){for(var q=0,Z=0,K=0;K<H.length;K++)H[K].length>q&&(q=H[K].length,Z=K);if(q<Y.size/2)O(b.relativePlacementConstraint),W=!1,U=!1;else{var re=new Map,Q=new Map,te=[];H[Z].forEach(function(xe){V.get(xe).forEach(function(oe){oe.direction=="horizontal"?(re.has(xe)?re.get(xe).push(oe):re.set(xe,[oe]),re.has(oe.id)||re.set(oe.id,[]),te.push({left:xe,right:oe.id})):(Q.has(xe)?Q.get(xe).push(oe):Q.set(xe,[oe]),Q.has(oe.id)||Q.set(oe.id,[]),te.push({top:xe,bottom:oe.id}))})}),O(te),U=!1;var ee=R(re,"horizontal"),J=R(Q,"vertical");H[Z].forEach(function(xe,oe){B[oe]=[T[x.get(xe)],C[x.get(xe)]],D[oe]=[],ee.has(xe)?D[oe][0]=ee.get(xe):D[oe][0]=T[x.get(xe)],J.has(xe)?D[oe][1]=J.get(xe):D[oe][1]=C[x.get(xe)]}),W=!0}}if(W){for(var ae=void 0,se=g.transpose(D),fe=g.transpose(B),ve=0;ve<se.length;ve++)se[ve]=g.multGamma(se[ve]),fe[ve]=g.multGamma(fe[ve]);var de=g.multMat(se,g.transpose(fe)),Ee=m.svd(de);ae=g.multMat(Ee.V,g.transpose(Ee.U));for(var Ce=0;Ce<x.size;Ce++){var De=[T[Ce],C[Ce]],ce=[ae[0][0],ae[1][0]],Ie=[ae[0][1],ae[1][1]];T[Ce]=g.dotProduct(De,ce),C[Ce]=g.dotProduct(De,Ie)}U&&O(b.relativePlacementConstraint)}}if(f.ENFORCE_CONSTRAINTS){if(b.fixedNodeConstraint&&b.fixedNodeConstraint.length>0){var ye={x:0,y:0};b.fixedNodeConstraint.forEach(function(xe,oe){var _e={x:T[x.get(xe.nodeId)],y:C[x.get(xe.nodeId)]},ue=xe.position,tt=I(ue,_e);ye.x+=tt.x,ye.y+=tt.y}),ye.x/=b.fixedNodeConstraint.length,ye.y/=b.fixedNodeConstraint.length,T.forEach(function(xe,oe){T[oe]+=ye.x}),C.forEach(function(xe,oe){C[oe]+=ye.y}),b.fixedNodeConstraint.forEach(function(xe){T[x.get(xe.nodeId)]=xe.position.x,C[x.get(xe.nodeId)]=xe.position.y})}if(b.alignmentConstraint){if(b.alignmentConstraint.vertical)for(var pe=b.alignmentConstraint.vertical,Ae=l(function(oe){var _e=new Set;pe[oe].forEach(function(Re){_e.add(Re)});var ue=new Set([].concat(d(_e)).filter(function(Re){return j.has(Re)})),tt=void 0;ue.size>0?tt=T[x.get(ue.values().next().value)]:tt=L(_e).x,_e.forEach(function(Re){j.has(Re)||(T[x.get(Re)]=tt)})},"_loop4"),Ve=0;Ve<pe.length;Ve++)Ae(Ve);if(b.alignmentConstraint.horizontal)for(var ze=b.alignmentConstraint.horizontal,We=l(function(oe){var _e=new Set;ze[oe].forEach(function(Re){_e.add(Re)});var ue=new Set([].concat(d(_e)).filter(function(Re){return j.has(Re)})),tt=void 0;ue.size>0?tt=C[x.get(ue.values().next().value)]:tt=L(_e).y,_e.forEach(function(Re){j.has(Re)||(C[x.get(Re)]=tt)})},"_loop5"),me=0;me<ze.length;me++)We(me)}b.relativePlacementConstraint&&function(){var xe=new Map,oe=new Map,_e=new Map,ue=new Map,tt=new Map,Re=new Map,et=new Set,Xe=new Set;if(j.forEach(function(Ht){et.add(Ht),Xe.add(Ht)}),b.alignmentConstraint){if(b.alignmentConstraint.vertical)for(var ot=b.alignmentConstraint.vertical,Ge=l(function(wt){_e.set("dummy"+wt,[]),ot[wt].forEach(function(_t){xe.set(_t,"dummy"+wt),_e.get("dummy"+wt).push(_t),j.has(_t)&&et.add("dummy"+wt)}),tt.set("dummy"+wt,T[x.get(ot[wt][0])])},"_loop6"),ht=0;ht<ot.length;ht++)Ge(ht);if(b.alignmentConstraint.horizontal)for(var Je=b.alignmentConstraint.horizontal,St=l(function(wt){ue.set("dummy"+wt,[]),Je[wt].forEach(function(_t){oe.set(_t,"dummy"+wt),ue.get("dummy"+wt).push(_t),j.has(_t)&&Xe.add("dummy"+wt)}),Re.set("dummy"+wt,C[x.get(Je[wt][0])])},"_loop7"),He=0;He<Je.length;He++)St(He)}var dt=new Map,Oe=new Map,vt=l(function(wt){V.get(wt).forEach(function(_t){var Ot=void 0,er=void 0;_t.direction=="horizontal"?(Ot=xe.get(wt)?xe.get(wt):wt,xe.get(_t.id)?er={id:xe.get(_t.id),gap:_t.gap,direction:_t.direction}:er=_t,dt.has(Ot)?dt.get(Ot).push(er):dt.set(Ot,[er]),dt.has(er.id)||dt.set(er.id,[])):(Ot=oe.get(wt)?oe.get(wt):wt,oe.get(_t.id)?er={id:oe.get(_t.id),gap:_t.gap,direction:_t.direction}:er=_t,Oe.has(Ot)?Oe.get(Ot).push(er):Oe.set(Ot,[er]),Oe.has(er.id)||Oe.set(er.id,[]))})},"_loop8"),qe=!0,Me=!1,lt=void 0;try{for(var it=V.keys()[Symbol.iterator](),Ue;!(qe=(Ue=it.next()).done);qe=!0){var we=Ue.value;vt(we)}}catch(Ht){Me=!0,lt=Ht}finally{try{!qe&&it.return&&it.return()}finally{if(Me)throw lt}}var gt=P(dt),ge=P(Oe),ie=M(gt),be=M(ge),$e=z(dt),le=z(Oe),ke=[],je=[];ie.forEach(function(Ht,wt){ke[wt]=[],Ht.forEach(function(_t){$e.get(_t).length==0&&ke[wt].push(_t)})}),be.forEach(function(Ht,wt){je[wt]=[],Ht.forEach(function(_t){le.get(_t).length==0&&je[wt].push(_t)})});var ut=R(dt,"horizontal",et,tt,ke),Qe=R(Oe,"vertical",Xe,Re,je),Ze=l(function(wt){_e.get(wt)?_e.get(wt).forEach(function(_t){T[x.get(_t)]=ut.get(wt)}):T[x.get(wt)]=ut.get(wt)},"_loop9"),st=!0,Ct=!1,Mt=void 0;try{for(var Bt=ut.keys()[Symbol.iterator](),Pt;!(st=(Pt=Bt.next()).done);st=!0){var Pe=Pt.value;Ze(Pe)}}catch(Ht){Ct=!0,Mt=Ht}finally{try{!st&&Bt.return&&Bt.return()}finally{if(Ct)throw Mt}}var at=l(function(wt){ue.get(wt)?ue.get(wt).forEach(function(_t){C[x.get(_t)]=Qe.get(wt)}):C[x.get(wt)]=Qe.get(wt)},"_loop10"),yt=!0,Tt=!1,Nt=void 0;try{for(var zt=Qe.keys()[Symbol.iterator](),Jt;!(yt=(Jt=zt.next()).done);yt=!0){var Pe=Jt.value;at(Pe)}}catch(Ht){Tt=!0,Nt=Ht}finally{try{!yt&&zt.return&&zt.return()}finally{if(Tt)throw Nt}}}()}for(var Se=0;Se<S.length;Se++){var ne=S[Se];ne.getChild()==null&&ne.setCenter(T[x.get(ne.id)],C[x.get(ne.id)])}},o.exports=y},551:o=>{o.exports=r}},a={};function i(o){var u=a[o];if(u!==void 0)return u.exports;var h=a[o]={exports:{}};return n[o](h,h.exports,i),h.exports}l(i,"__webpack_require__");var s=i(45);return s})()})}(Dte)),Dte.exports}l(Ryr,"requireCoseBase"),function(t,e){l(function(n,a){t.exports=a(Ryr())},"webpackUniversalModuleDefinition")(Nl,function(r){return(()=>{var n={658:o=>{o.exports=Object.assign!=null?Object.assign.bind(Object):function(u){for(var h=arguments.length,d=Array(h>1?h-1:0),f=1;f<h;f++)d[f-1]=arguments[f];return d.forEach(function(p){Object.keys(p).forEach(function(g){return u[g]=p[g]})}),u}},548:(o,u,h)=>{var d=function(){function g(m,y){var v=[],b=!0,w=!1,x=void 0;try{for(var T=m[Symbol.iterator](),C;!(b=(C=T.next()).done)&&(v.push(C.value),!(y&&v.length===y));b=!0);}catch(S){w=!0,x=S}finally{try{!b&&T.return&&T.return()}finally{if(w)throw x}}return v}return l(g,"sliceIterator"),function(m,y){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return g(m,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),f=h(140).layoutBase.LinkedList,p={};p.getTopMostNodes=function(g){for(var m={},y=0;y<g.length;y++)m[g[y].id()]=!0;var v=g.filter(function(b,w){typeof b=="number"&&(b=w);for(var x=b.parent()[0];x!=null;){if(m[x.id()])return!1;x=x.parent()[0]}return!0});return v},p.connectComponents=function(g,m,y,v){var b=new f,w=new Set,x=[],T=void 0,C=void 0,S=void 0,E=!1,k=1,A=[],I=[],L=l(function(){var O=g.collection();I.push(O);var M=y[0],P=g.collection();P.merge(M).merge(M.descendants().intersection(m)),x.push(M),P.forEach(function(B){b.push(B),w.add(B),O.merge(B)});for(var z=l(function(){M=b.shift();var W=g.collection();M.neighborhood().nodes().forEach(function(Y){m.intersection(M.edgesWith(Y)).length>0&&W.merge(Y)});for(var U=0;U<W.length;U++){var j=W[U];if(T=y.intersection(j.union(j.ancestors())),T!=null&&!w.has(T[0])){var V=T.union(T.descendants());V.forEach(function(Y){b.push(Y),w.add(Y),O.merge(Y),y.has(Y)&&x.push(Y)})}}},"_loop2");b.length!=0;)z();if(O.forEach(function(B){m.intersection(B.connectedEdges()).forEach(function(W){O.has(W.source())&&O.has(W.target())&&O.merge(W)})}),x.length==y.length&&(E=!0),!E||E&&k>1){C=x[0],S=C.connectedEdges().length,x.forEach(function(B){B.connectedEdges().length<S&&(S=B.connectedEdges().length,C=B)}),A.push(C.id());var D=g.collection();D.merge(x[0]),x.forEach(function(B){D.merge(B)}),x=[],y=y.difference(D),k++}},"_loop");do L();while(!E);return v&&A.length>0&&v.set("dummy"+(v.size+1),A),I},p.relocateComponent=function(g,m,y){if(!y.fixedNodeConstraint){var v=Number.POSITIVE_INFINITY,b=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(y.quality=="draft"){var T=!0,C=!1,S=void 0;try{for(var E=m.nodeIndexes[Symbol.iterator](),k;!(T=(k=E.next()).done);T=!0){var A=k.value,I=d(A,2),L=I[0],R=I[1],O=y.cy.getElementById(L);if(O){var M=O.boundingBox(),P=m.xCoords[R]-M.w/2,z=m.xCoords[R]+M.w/2,D=m.yCoords[R]-M.h/2,B=m.yCoords[R]+M.h/2;P<v&&(v=P),z>b&&(b=z),D<w&&(w=D),B>x&&(x=B)}}}catch(Y){C=!0,S=Y}finally{try{!T&&E.return&&E.return()}finally{if(C)throw S}}var W=g.x-(b+v)/2,U=g.y-(x+w)/2;m.xCoords=m.xCoords.map(function(Y){return Y+W}),m.yCoords=m.yCoords.map(function(Y){return Y+U})}else{Object.keys(m).forEach(function(Y){var H=m[Y],q=H.getRect().x,Z=H.getRect().x+H.getRect().width,K=H.getRect().y,re=H.getRect().y+H.getRect().height;q<v&&(v=q),Z>b&&(b=Z),K<w&&(w=K),re>x&&(x=re)});var j=g.x-(b+v)/2,V=g.y-(x+w)/2;Object.keys(m).forEach(function(Y){var H=m[Y];H.setCenter(H.getCenterX()+j,H.getCenterY()+V)})}}},p.calcBoundingBox=function(g,m,y,v){for(var b=Number.MAX_SAFE_INTEGER,w=Number.MIN_SAFE_INTEGER,x=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,C=void 0,S=void 0,E=void 0,k=void 0,A=g.descendants().not(":parent"),I=A.length,L=0;L<I;L++){var R=A[L];C=m[v.get(R.id())]-R.width()/2,S=m[v.get(R.id())]+R.width()/2,E=y[v.get(R.id())]-R.height()/2,k=y[v.get(R.id())]+R.height()/2,b>C&&(b=C),w<S&&(w=S),x>E&&(x=E),T<k&&(T=k)}var O={};return O.topLeftX=b,O.topLeftY=x,O.width=w-b,O.height=T-x,O},p.calcParentsWithoutChildren=function(g,m){var y=g.collection();return m.nodes(":parent").forEach(function(v){var b=!1;v.children().forEach(function(w){w.css("display")!="none"&&(b=!0)}),b||y.merge(v)}),y},o.exports=p},816:(o,u,h)=>{var d=h(548),f=h(140).CoSELayout,p=h(140).CoSENode,g=h(140).layoutBase.PointD,m=h(140).layoutBase.DimensionD,y=h(140).layoutBase.LayoutConstants,v=h(140).layoutBase.FDLayoutConstants,b=h(140).CoSEConstants,w=l(function(T,C){var S=T.cy,E=T.eles,k=E.nodes(),A=E.edges(),I=void 0,L=void 0,R=void 0,O={};T.randomize&&(I=C.nodeIndexes,L=C.xCoords,R=C.yCoords);var M=l(function(Y){return typeof Y=="function"},"isFn"),P=l(function(Y,H){return M(Y)?Y(H):Y},"optFn"),z=d.calcParentsWithoutChildren(S,E),D=l(function V(Y,H,q,Z){for(var K=H.length,re=0;re<K;re++){var Q=H[re],te=null;Q.intersection(z).length==0&&(te=Q.children());var ee=void 0,J=Q.layoutDimensions({nodeDimensionsIncludeLabels:Z.nodeDimensionsIncludeLabels});if(Q.outerWidth()!=null&&Q.outerHeight()!=null)if(Z.randomize)if(!Q.isParent())ee=Y.add(new p(q.graphManager,new g(L[I.get(Q.id())]-J.w/2,R[I.get(Q.id())]-J.h/2),new m(parseFloat(J.w),parseFloat(J.h))));else{var ae=d.calcBoundingBox(Q,L,R,I);Q.intersection(z).length==0?ee=Y.add(new p(q.graphManager,new g(ae.topLeftX,ae.topLeftY),new m(ae.width,ae.height))):ee=Y.add(new p(q.graphManager,new g(ae.topLeftX,ae.topLeftY),new m(parseFloat(J.w),parseFloat(J.h))))}else ee=Y.add(new p(q.graphManager,new g(Q.position("x")-J.w/2,Q.position("y")-J.h/2),new m(parseFloat(J.w),parseFloat(J.h))));else ee=Y.add(new p(this.graphManager));if(ee.id=Q.data("id"),ee.nodeRepulsion=P(Z.nodeRepulsion,Q),ee.paddingLeft=parseInt(Q.css("padding")),ee.paddingTop=parseInt(Q.css("padding")),ee.paddingRight=parseInt(Q.css("padding")),ee.paddingBottom=parseInt(Q.css("padding")),Z.nodeDimensionsIncludeLabels&&(ee.labelWidth=Q.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ee.labelHeight=Q.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ee.labelPosVertical=Q.css("text-valign"),ee.labelPosHorizontal=Q.css("text-halign")),O[Q.data("id")]=ee,isNaN(ee.rect.x)&&(ee.rect.x=0),isNaN(ee.rect.y)&&(ee.rect.y=0),te!=null&&te.length>0){var se=void 0;se=q.getGraphManager().add(q.newGraph(),ee),V(se,te,q,Z)}}},"processChildrenList"),B=l(function(Y,H,q){for(var Z=0,K=0,re=0;re<q.length;re++){var Q=q[re],te=O[Q.data("source")],ee=O[Q.data("target")];if(te&&ee&&te!==ee&&te.getEdgesBetween(ee).length==0){var J=H.add(Y.newEdge(),te,ee);J.id=Q.id(),J.idealLength=P(T.idealEdgeLength,Q),J.edgeElasticity=P(T.edgeElasticity,Q),Z+=J.idealLength,K++}}T.idealEdgeLength!=null&&(K>0?b.DEFAULT_EDGE_LENGTH=v.DEFAULT_EDGE_LENGTH=Z/K:M(T.idealEdgeLength)?b.DEFAULT_EDGE_LENGTH=v.DEFAULT_EDGE_LENGTH=50:b.DEFAULT_EDGE_LENGTH=v.DEFAULT_EDGE_LENGTH=T.idealEdgeLength,b.MIN_REPULSION_DIST=v.MIN_REPULSION_DIST=v.DEFAULT_EDGE_LENGTH/10,b.DEFAULT_RADIAL_SEPARATION=v.DEFAULT_EDGE_LENGTH)},"processEdges"),W=l(function(Y,H){H.fixedNodeConstraint&&(Y.constraints.fixedNodeConstraint=H.fixedNodeConstraint),H.alignmentConstraint&&(Y.constraints.alignmentConstraint=H.alignmentConstraint),H.relativePlacementConstraint&&(Y.constraints.relativePlacementConstraint=H.relativePlacementConstraint)},"processConstraints");T.nestingFactor!=null&&(b.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=T.nestingFactor),T.gravity!=null&&(b.DEFAULT_GRAVITY_STRENGTH=v.DEFAULT_GRAVITY_STRENGTH=T.gravity),T.numIter!=null&&(b.MAX_ITERATIONS=v.MAX_ITERATIONS=T.numIter),T.gravityRange!=null&&(b.DEFAULT_GRAVITY_RANGE_FACTOR=v.DEFAULT_GRAVITY_RANGE_FACTOR=T.gravityRange),T.gravityCompound!=null&&(b.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.DEFAULT_COMPOUND_GRAVITY_STRENGTH=T.gravityCompound),T.gravityRangeCompound!=null&&(b.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=T.gravityRangeCompound),T.initialEnergyOnIncremental!=null&&(b.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.DEFAULT_COOLING_FACTOR_INCREMENTAL=T.initialEnergyOnIncremental),T.tilingCompareBy!=null&&(b.TILING_COMPARE_BY=T.tilingCompareBy),T.quality=="proof"?y.QUALITY=2:y.QUALITY=0,b.NODE_DIMENSIONS_INCLUDE_LABELS=v.NODE_DIMENSIONS_INCLUDE_LABELS=y.NODE_DIMENSIONS_INCLUDE_LABELS=T.nodeDimensionsIncludeLabels,b.DEFAULT_INCREMENTAL=v.DEFAULT_INCREMENTAL=y.DEFAULT_INCREMENTAL=!T.randomize,b.ANIMATE=v.ANIMATE=y.ANIMATE=T.animate,b.TILE=T.tile,b.TILING_PADDING_VERTICAL=typeof T.tilingPaddingVertical=="function"?T.tilingPaddingVertical.call():T.tilingPaddingVertical,b.TILING_PADDING_HORIZONTAL=typeof T.tilingPaddingHorizontal=="function"?T.tilingPaddingHorizontal.call():T.tilingPaddingHorizontal,b.DEFAULT_INCREMENTAL=v.DEFAULT_INCREMENTAL=y.DEFAULT_INCREMENTAL=!0,b.PURE_INCREMENTAL=!T.randomize,y.DEFAULT_UNIFORM_LEAF_NODE_SIZES=T.uniformNodeDimensions,T.step=="transformed"&&(b.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,b.ENFORCE_CONSTRAINTS=!1,b.APPLY_LAYOUT=!1),T.step=="enforced"&&(b.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,b.ENFORCE_CONSTRAINTS=!0,b.APPLY_LAYOUT=!1),T.step=="cose"&&(b.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,b.ENFORCE_CONSTRAINTS=!1,b.APPLY_LAYOUT=!0),T.step=="all"&&(T.randomize?b.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:b.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,b.ENFORCE_CONSTRAINTS=!0,b.APPLY_LAYOUT=!0),T.fixedNodeConstraint||T.alignmentConstraint||T.relativePlacementConstraint?b.TREE_REDUCTION_ON_INCREMENTAL=!1:b.TREE_REDUCTION_ON_INCREMENTAL=!0;var U=new f,j=U.newGraphManager();return D(j.addRoot(),d.getTopMostNodes(k),U,T),B(U,j,A),W(U,T),U.runLayout(),O},"coseLayout");o.exports={coseLayout:w}},212:(o,u,h)=>{var d=function(){function T(C,S){for(var E=0;E<S.length;E++){var k=S[E];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(C,k.key,k)}}return l(T,"defineProperties"),function(C,S,E){return S&&T(C.prototype,S),E&&T(C,E),C}}();function f(T,C){if(!(T instanceof C))throw new TypeError("Cannot call a class as a function")}l(f,"_classCallCheck");var p=h(658),g=h(548),m=h(657),y=m.spectralLayout,v=h(816),b=v.coseLayout,w=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1e3,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:1e-7,nodeRepulsion:l(function(C){return 4500},"nodeRepulsion"),idealEdgeLength:l(function(C){return 50},"idealEdgeLength"),edgeElasticity:l(function(C){return .45},"edgeElasticity"),nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:l(function(){},"ready"),stop:l(function(){},"stop")}),x=function(){function T(C){f(this,T),this.options=p({},w,C)}return l(T,"Layout"),d(T,[{key:"run",value:l(function(){var S=this,E=this.options,k=E.cy,A=E.eles,I=[],L=[],R=void 0,O=[];E.fixedNodeConstraint&&(!Array.isArray(E.fixedNodeConstraint)||E.fixedNodeConstraint.length==0)&&(E.fixedNodeConstraint=void 0),E.alignmentConstraint&&(E.alignmentConstraint.vertical&&(!Array.isArray(E.alignmentConstraint.vertical)||E.alignmentConstraint.vertical.length==0)&&(E.alignmentConstraint.vertical=void 0),E.alignmentConstraint.horizontal&&(!Array.isArray(E.alignmentConstraint.horizontal)||E.alignmentConstraint.horizontal.length==0)&&(E.alignmentConstraint.horizontal=void 0)),E.relativePlacementConstraint&&(!Array.isArray(E.relativePlacementConstraint)||E.relativePlacementConstraint.length==0)&&(E.relativePlacementConstraint=void 0);var M=E.fixedNodeConstraint||E.alignmentConstraint||E.relativePlacementConstraint;M&&(E.tile=!1,E.packComponents=!1);var P=void 0,z=!1;if(k.layoutUtilities&&E.packComponents&&(P=k.layoutUtilities("get"),P||(P=k.layoutUtilities()),z=!0),A.nodes().length>0)if(z){var W=g.getTopMostNodes(E.eles.nodes());if(R=g.connectComponents(k,E.eles,W),R.forEach(function(de){var Ee=de.boundingBox();O.push({x:Ee.x1+Ee.w/2,y:Ee.y1+Ee.h/2})}),E.randomize&&R.forEach(function(de){E.eles=de,I.push(y(E))}),E.quality=="default"||E.quality=="proof"){var U=k.collection();if(E.tile){var j=new Map,V=[],Y=[],H=0,q={nodeIndexes:j,xCoords:V,yCoords:Y},Z=[];if(R.forEach(function(de,Ee){de.edges().length==0&&(de.nodes().forEach(function(Ce,De){U.merge(de.nodes()[De]),Ce.isParent()||(q.nodeIndexes.set(de.nodes()[De].id(),H++),q.xCoords.push(de.nodes()[0].position().x),q.yCoords.push(de.nodes()[0].position().y))}),Z.push(Ee))}),U.length>1){var K=U.boundingBox();O.push({x:K.x1+K.w/2,y:K.y1+K.h/2}),R.push(U),I.push(q);for(var re=Z.length-1;re>=0;re--)R.splice(Z[re],1),I.splice(Z[re],1),O.splice(Z[re],1)}}R.forEach(function(de,Ee){E.eles=de,L.push(b(E,I[Ee])),g.relocateComponent(O[Ee],L[Ee],E)})}else R.forEach(function(de,Ee){g.relocateComponent(O[Ee],I[Ee],E)});var Q=new Set;if(R.length>1){var te=[],ee=A.filter(function(de){return de.css("display")=="none"});R.forEach(function(de,Ee){var Ce=void 0;if(E.quality=="draft"&&(Ce=I[Ee].nodeIndexes),de.nodes().not(ee).length>0){var De={};De.edges=[],De.nodes=[];var ce=void 0;de.nodes().not(ee).forEach(function(Ie){if(E.quality=="draft")if(!Ie.isParent())ce=Ce.get(Ie.id()),De.nodes.push({x:I[Ee].xCoords[ce]-Ie.boundingbox().w/2,y:I[Ee].yCoords[ce]-Ie.boundingbox().h/2,width:Ie.boundingbox().w,height:Ie.boundingbox().h});else{var ye=g.calcBoundingBox(Ie,I[Ee].xCoords,I[Ee].yCoords,Ce);De.nodes.push({x:ye.topLeftX,y:ye.topLeftY,width:ye.width,height:ye.height})}else L[Ee][Ie.id()]&&De.nodes.push({x:L[Ee][Ie.id()].getLeft(),y:L[Ee][Ie.id()].getTop(),width:L[Ee][Ie.id()].getWidth(),height:L[Ee][Ie.id()].getHeight()})}),de.edges().forEach(function(Ie){var ye=Ie.source(),pe=Ie.target();if(ye.css("display")!="none"&&pe.css("display")!="none")if(E.quality=="draft"){var Ae=Ce.get(ye.id()),Ve=Ce.get(pe.id()),ze=[],We=[];if(ye.isParent()){var me=g.calcBoundingBox(ye,I[Ee].xCoords,I[Ee].yCoords,Ce);ze.push(me.topLeftX+me.width/2),ze.push(me.topLeftY+me.height/2)}else ze.push(I[Ee].xCoords[Ae]),ze.push(I[Ee].yCoords[Ae]);if(pe.isParent()){var Se=g.calcBoundingBox(pe,I[Ee].xCoords,I[Ee].yCoords,Ce);We.push(Se.topLeftX+Se.width/2),We.push(Se.topLeftY+Se.height/2)}else We.push(I[Ee].xCoords[Ve]),We.push(I[Ee].yCoords[Ve]);De.edges.push({startX:ze[0],startY:ze[1],endX:We[0],endY:We[1]})}else L[Ee][ye.id()]&&L[Ee][pe.id()]&&De.edges.push({startX:L[Ee][ye.id()].getCenterX(),startY:L[Ee][ye.id()].getCenterY(),endX:L[Ee][pe.id()].getCenterX(),endY:L[Ee][pe.id()].getCenterY()})}),De.nodes.length>0&&(te.push(De),Q.add(Ee))}});var J=P.packComponents(te,E.randomize).shifts;if(E.quality=="draft")I.forEach(function(de,Ee){var Ce=de.xCoords.map(function(ce){return ce+J[Ee].dx}),De=de.yCoords.map(function(ce){return ce+J[Ee].dy});de.xCoords=Ce,de.yCoords=De});else{var ae=0;Q.forEach(function(de){Object.keys(L[de]).forEach(function(Ee){var Ce=L[de][Ee];Ce.setCenter(Ce.getCenterX()+J[ae].dx,Ce.getCenterY()+J[ae].dy)}),ae++})}}}else{var D=E.eles.boundingBox();if(O.push({x:D.x1+D.w/2,y:D.y1+D.h/2}),E.randomize){var B=y(E);I.push(B)}E.quality=="default"||E.quality=="proof"?(L.push(b(E,I[0])),g.relocateComponent(O[0],L[0],E)):g.relocateComponent(O[0],I[0],E)}var se=l(function(Ee,Ce){if(E.quality=="default"||E.quality=="proof"){typeof Ee=="number"&&(Ee=Ce);var De=void 0,ce=void 0,Ie=Ee.data("id");return L.forEach(function(pe){Ie in pe&&(De={x:pe[Ie].getRect().getCenterX(),y:pe[Ie].getRect().getCenterY()},ce=pe[Ie])}),E.nodeDimensionsIncludeLabels&&(ce.labelWidth&&(ce.labelPosHorizontal=="left"?De.x+=ce.labelWidth/2:ce.labelPosHorizontal=="right"&&(De.x-=ce.labelWidth/2)),ce.labelHeight&&(ce.labelPosVertical=="top"?De.y+=ce.labelHeight/2:ce.labelPosVertical=="bottom"&&(De.y-=ce.labelHeight/2))),De==null&&(De={x:Ee.position("x"),y:Ee.position("y")}),{x:De.x,y:De.y}}else{var ye=void 0;return I.forEach(function(pe){var Ae=pe.nodeIndexes.get(Ee.id());Ae!=null&&(ye={x:pe.xCoords[Ae],y:pe.yCoords[Ae]})}),ye==null&&(ye={x:Ee.position("x"),y:Ee.position("y")}),{x:ye.x,y:ye.y}}},"getPositions");if(E.quality=="default"||E.quality=="proof"||E.randomize){var fe=g.calcParentsWithoutChildren(k,A),ve=A.filter(function(de){return de.css("display")=="none"});E.eles=A.not(ve),A.nodes().not(":parent").not(ve).layoutPositions(S,E,se),fe.length>0&&fe.forEach(function(de){de.position(se(de))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}]),T}();o.exports=x},657:(o,u,h)=>{var d=h(548),f=h(140).layoutBase.Matrix,p=h(140).layoutBase.SVD,g=l(function(y){var v=y.cy,b=y.eles,w=b.nodes(),x=b.nodes(":parent"),T=new Map,C=new Map,S=new Map,E=[],k=[],A=[],I=[],L=[],R=[],O=[],M=[],P=void 0,z=1e8,D=1e-9,B=y.piTol,W=y.samplingType,U=y.nodeSeparation,j=void 0,V=l(function(){for(var oe=0,_e=0,ue=!1;_e<j;){oe=Math.floor(Math.random()*P),ue=!1;for(var tt=0;tt<_e;tt++)if(I[tt]==oe){ue=!0;break}if(!ue)I[_e]=oe,_e++;else continue}},"randomSampleCR"),Y=l(function(oe,_e,ue){for(var tt=[],Re=0,et=0,Xe=0,ot=void 0,Ge=[],ht=0,Je=1,St=0;St<P;St++)Ge[St]=z;for(tt[et]=oe,Ge[oe]=0;et>=Re;){Xe=tt[Re++];for(var He=E[Xe],dt=0;dt<He.length;dt++)ot=C.get(He[dt]),Ge[ot]==z&&(Ge[ot]=Ge[Xe]+1,tt[++et]=ot);R[Xe][_e]=Ge[Xe]*U}if(ue){for(var Oe=0;Oe<P;Oe++)R[Oe][_e]<L[Oe]&&(L[Oe]=R[Oe][_e]);for(var vt=0;vt<P;vt++)L[vt]>ht&&(ht=L[vt],Je=vt)}return Je},"BFS"),H=l(function(oe){var _e=void 0;if(oe){_e=Math.floor(Math.random()*P);for(var tt=0;tt<P;tt++)L[tt]=z;for(var Re=0;Re<j;Re++)I[Re]=_e,_e=Y(_e,Re,oe)}else{V();for(var ue=0;ue<j;ue++)Y(I[ue],ue,oe)}for(var et=0;et<P;et++)for(var Xe=0;Xe<j;Xe++)R[et][Xe]*=R[et][Xe];for(var ot=0;ot<j;ot++)O[ot]=[];for(var Ge=0;Ge<j;Ge++)for(var ht=0;ht<j;ht++)O[Ge][ht]=R[I[ht]][Ge]},"allBFS"),q=l(function(){for(var oe=p.svd(O),_e=oe.S,ue=oe.U,tt=oe.V,Re=_e[0]*_e[0]*_e[0],et=[],Xe=0;Xe<j;Xe++){et[Xe]=[];for(var ot=0;ot<j;ot++)et[Xe][ot]=0,Xe==ot&&(et[Xe][ot]=_e[Xe]/(_e[Xe]*_e[Xe]+Re/(_e[Xe]*_e[Xe])))}M=f.multMat(f.multMat(tt,et),f.transpose(ue))},"sample"),Z=l(function(){for(var oe=void 0,_e=void 0,ue=[],tt=[],Re=[],et=[],Xe=0;Xe<P;Xe++)ue[Xe]=Math.random(),tt[Xe]=Math.random();ue=f.normalize(ue),tt=f.normalize(tt);for(var ot=D,Ge=D,ht=void 0;;){for(var Je=0;Je<P;Je++)Re[Je]=ue[Je];if(ue=f.multGamma(f.multL(f.multGamma(Re),R,M)),oe=f.dotProduct(Re,ue),ue=f.normalize(ue),ot=f.dotProduct(Re,ue),ht=Math.abs(ot/Ge),ht<=1+B&&ht>=1)break;Ge=ot}for(var St=0;St<P;St++)Re[St]=ue[St];for(Ge=D;;){for(var He=0;He<P;He++)et[He]=tt[He];if(et=f.minusOp(et,f.multCons(Re,f.dotProduct(Re,et))),tt=f.multGamma(f.multL(f.multGamma(et),R,M)),_e=f.dotProduct(et,tt),tt=f.normalize(tt),ot=f.dotProduct(et,tt),ht=Math.abs(ot/Ge),ht<=1+B&&ht>=1)break;Ge=ot}for(var dt=0;dt<P;dt++)et[dt]=tt[dt];k=f.multCons(Re,Math.sqrt(Math.abs(oe))),A=f.multCons(et,Math.sqrt(Math.abs(_e)))},"powerIteration");d.connectComponents(v,b,d.getTopMostNodes(w),T),x.forEach(function(xe){d.connectComponents(v,b,d.getTopMostNodes(xe.descendants().intersection(b)),T)});for(var K=0,re=0;re<w.length;re++)w[re].isParent()||C.set(w[re].id(),K++);var Q=!0,te=!1,ee=void 0;try{for(var J=T.keys()[Symbol.iterator](),ae;!(Q=(ae=J.next()).done);Q=!0){var se=ae.value;C.set(se,K++)}}catch(xe){te=!0,ee=xe}finally{try{!Q&&J.return&&J.return()}finally{if(te)throw ee}}for(var fe=0;fe<C.size;fe++)E[fe]=[];x.forEach(function(xe){for(var oe=xe.children().intersection(b);oe.nodes(":childless").length==0;)oe=oe.nodes()[0].children().intersection(b);var _e=0,ue=oe.nodes(":childless")[0].connectedEdges().length;oe.nodes(":childless").forEach(function(tt,Re){tt.connectedEdges().length<ue&&(ue=tt.connectedEdges().length,_e=Re)}),S.set(xe.id(),oe.nodes(":childless")[_e].id())}),w.forEach(function(xe){var oe=void 0;xe.isParent()?oe=C.get(S.get(xe.id())):oe=C.get(xe.id()),xe.neighborhood().nodes().forEach(function(_e){b.intersection(xe.edgesWith(_e)).length>0&&(_e.isParent()?E[oe].push(S.get(_e.id())):E[oe].push(_e.id()))})});var ve=l(function(oe){var _e=C.get(oe),ue=void 0;T.get(oe).forEach(function(tt){v.getElementById(tt).isParent()?ue=S.get(tt):ue=tt,E[_e].push(ue),E[C.get(ue)].push(oe)})},"_loop"),de=!0,Ee=!1,Ce=void 0;try{for(var De=T.keys()[Symbol.iterator](),ce;!(de=(ce=De.next()).done);de=!0){var Ie=ce.value;ve(Ie)}}catch(xe){Ee=!0,Ce=xe}finally{try{!de&&De.return&&De.return()}finally{if(Ee)throw Ce}}P=C.size;var ye=void 0;if(P>2){j=P<y.sampleSize?P:y.sampleSize;for(var pe=0;pe<P;pe++)R[pe]=[];for(var Ae=0;Ae<j;Ae++)M[Ae]=[];return y.quality=="draft"||y.step=="all"?(H(W),q(),Z(),ye={nodeIndexes:C,xCoords:k,yCoords:A}):(C.forEach(function(xe,oe){k.push(v.getElementById(oe).position("x")),A.push(v.getElementById(oe).position("y"))}),ye={nodeIndexes:C,xCoords:k,yCoords:A}),ye}else{var Ve=C.keys(),ze=v.getElementById(Ve.next().value),We=ze.position(),me=ze.outerWidth();if(k.push(We.x),A.push(We.y),P==2){var Se=v.getElementById(Ve.next().value),ne=Se.outerWidth();k.push(We.x+me/2+ne/2+y.idealEdgeLength),A.push(We.y)}return ye={nodeIndexes:C,xCoords:k,yCoords:A},ye}},"spectralLayout");o.exports={spectralLayout:g}},579:(o,u,h)=>{var d=h(212),f=l(function(g){g&&g("layout","fcose",d)},"register");typeof cytoscape!="undefined"&&f(cytoscape),o.exports=f},140:o=>{o.exports=r}},a={};function i(o){var u=a[o];if(u!==void 0)return u.exports;var h=a[o]={exports:{}};return n[o](h,h.exports,i),h.exports}l(i,"__webpack_require__");var s=i(579);return s})()})}(kVe);var Oyr=kVe.exports,Dyr=Pd(Oyr),IVe={L:"left",R:"right",T:"top",B:"bottom"},LVe={L:_(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:_(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:_(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:_(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},bR={L:_((t,e)=>t-e+2,"L"),R:_((t,e)=>t-2,"R"),T:_((t,e)=>t-e+2,"T"),B:_((t,e)=>t-2,"B")},Fyr=_(function(t){return Sl(t)?t==="L"?"R":"L":t==="T"?"B":"T"},"getOppositeArchitectureDirection"),$Ve=_(function(t){const e=t;return e==="L"||e==="R"||e==="T"||e==="B"},"isArchitectureDirection"),Sl=_(function(t){const e=t;return e==="L"||e==="R"},"isArchitectureDirectionX"),sg=_(function(t){const e=t;return e==="T"||e==="B"},"isArchitectureDirectionY"),Bte=_(function(t,e){const r=Sl(t)&&sg(e),n=sg(t)&&Sl(e);return r||n},"isArchitectureDirectionXY"),Byr=_(function(t){const e=t[0],r=t[1],n=Sl(e)&&sg(r),a=sg(e)&&Sl(r);return n||a},"isArchitecturePairXY"),zyr=_(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),zte=_(function(t,e){const r=`${t}${e}`;return zyr(r)?r:void 0},"getArchitectureDirectionPair"),Hyr=_(function([t,e],r){const n=r[0],a=r[1];return Sl(n)?sg(a)?[t+(n==="L"?-1:1),e+(a==="T"?1:-1)]:[t+(n==="L"?-1:1),e]:Sl(a)?[t+(a==="L"?1:-1),e+(n==="T"?1:-1)]:[t,e+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Wyr=_(function(t){return t==="LT"||t==="TL"?[1,1]:t==="BL"||t==="LB"?[1,-1]:t==="BR"||t==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Vyr=_(function(t,e){return Bte(t,e)?"bend":Sl(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Gyr=_(function(t){return t.type==="service"},"isArchitectureService"),qyr=_(function(t){return t.type==="junction"},"isArchitectureJunction"),MVe=_(t=>t.data(),"edgeData"),uC=_(t=>t.data(),"nodeData"),Yyr=hn.architecture,PVe=(ax=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=Na,this.getAccTitle=za,this.setDiagramTitle=Va,this.getDiagramTitle=Ia,this.getAccDescription=Wa,this.setAccDescription=Ha,this.clear()}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",Ca()}addService({id:e,icon:r,in:n,title:a,iconText:i}){if(this.registeredIds[e]!==void 0)throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);if(n!==void 0){if(e===n)throw new Error(`The service [${e}] cannot be placed within itself`);if(this.registeredIds[n]===void 0)throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[n]==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:r,iconText:i,title:a,edges:[],in:n}}getServices(){return Object.values(this.nodes).filter(Gyr)}addJunction({id:e,in:r}){if(this.registeredIds[e]!==void 0)throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);if(r!==void 0){if(e===r)throw new Error(`The junction [${e}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[r]==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:r}}getJunctions(){return Object.values(this.nodes).filter(qyr)}getNodes(){return Object.values(this.nodes)}getNode(e){var r;return(r=this.nodes[e])!=null?r:null}addGroup({id:e,icon:r,in:n,title:a}){var i,s,o;if(((i=this.registeredIds)==null?void 0:i[e])!==void 0)throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);if(n!==void 0){if(e===n)throw new Error(`The group [${e}] cannot be placed within itself`);if(((s=this.registeredIds)==null?void 0:s[n])===void 0)throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(((o=this.registeredIds)==null?void 0:o[n])==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]="group",this.groups[e]={id:e,icon:r,title:a,in:n}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:r,lhsDir:n,rhsDir:a,lhsInto:i,rhsInto:s,lhsGroup:o,rhsGroup:u,title:h}){if(!$Ve(n))throw new Error(`Invalid direction given for left hand side of edge ${e}--${r}. Expected (L,R,T,B) got ${String(n)}`);if(!$Ve(a))throw new Error(`Invalid direction given for right hand side of edge ${e}--${r}. Expected (L,R,T,B) got ${String(a)}`);if(this.nodes[e]===void 0&&this.groups[e]===void 0)throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[r]===void 0&&this.groups[r]===void 0)throw new Error(`The right-hand id [${r}] does not yet exist. Please create the service/group before declaring an edge to it.`);const d=this.nodes[e].in,f=this.nodes[r].in;if(o&&d&&f&&d==f)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(u&&d&&f&&d==f)throw new Error(`The right-hand id [${r}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const p={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:r,rhsDir:a,rhsInto:s,rhsGroup:u,title:h};this.edges.push(p),this.nodes[e]&&this.nodes[r]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[r].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const r=new Set;e.members.forEach(n=>{if(this.registeredIds[n]!=="node")throw new Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(r.has(n))throw new Error(`align ${e.direction} lists [${n}] more than once`);r.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const e={},r=Object.entries(this.nodes).reduce((u,[h,d])=>(u[h]=d.edges.reduce((f,p)=>{var y,v,b,w;const g=(y=this.getNode(p.lhsId))==null?void 0:y.in,m=(v=this.getNode(p.rhsId))==null?void 0:v.in;if(g&&m&&g!==m){const x=Vyr(p.lhsDir,p.rhsDir);x!=="bend"&&((b=e[g])!=null||(e[g]={}),e[g][m]=x,(w=e[m])!=null||(e[m]={}),e[m][g]=x)}if(p.lhsId===h){const x=zte(p.lhsDir,p.rhsDir);x&&(f[x]=p.rhsId)}else{const x=zte(p.rhsDir,p.lhsDir);x&&(f[x]=p.lhsId)}return f},{}),u),{}),n=Object.keys(r)[0],a={[n]:1},i=Object.keys(r).reduce((u,h)=>h===n?u:Ne(X({},u),{[h]:1}),{}),s=_(u=>{const h={[u]:[0,0]},d=[u];for(;d.length>0;){const f=d.shift();if(f){a[f]=1,delete i[f];const p=r[f],[g,m]=h[f];Object.entries(p).forEach(([y,v])=>{a[v]||(h[v]=Hyr([g,m],y),d.push(v))})}}return h},"BFS"),o=[s(n)];for(;Object.keys(i).length>0;)o.push(s(Object.keys(i)[0]));this.dataStructures={adjList:r,spatialMaps:o,groupAlignments:e}}return this.dataStructures}setElementForId(e,r){this.elements[e]=r}getElementById(e){return this.elements[e]}getConfig(){return Ga(X(X({},Yyr),Ar().architecture))}getConfigField(e){return this.getConfig()[e]}},l(ax,"ArchitectureDB"),_(ax,"ArchitectureDB"),ax),Uyr=_((t,e)=>{var r;hl(t,e),t.groups.map(n=>e.addGroup(n)),t.services.map(n=>e.addService(Ne(X({},n),{type:"service"}))),t.junctions.map(n=>e.addJunction(Ne(X({},n),{type:"junction"}))),t.edges.map(n=>e.addEdge(n)),(r=t.alignments)==null||r.map(n=>e.addLayoutHint({direction:n.direction,members:[...n.members]}))},"populateDb"),RVe={parser:{yy:void 0},parse:_(t=>nt(this,null,function*(){var n;const e=yield pu("architecture",t);Le.debug(e);const r=(n=RVe.parser)==null?void 0:n.yy;if(!(r instanceof PVe))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Uyr(e,r)}),"parse")},jyr=_(t=>`
|
||
.edge {
|
||
stroke-width: ${t.archEdgeWidth};
|
||
stroke: ${t.archEdgeColor};
|
||
fill: none;
|
||
}
|
||
|
||
.arrow {
|
||
fill: ${t.archEdgeArrowColor};
|
||
}
|
||
|
||
.node-bkg {
|
||
fill: none;
|
||
stroke: ${t.archGroupBorderColor};
|
||
stroke-width: ${t.archGroupBorderWidth};
|
||
stroke-dasharray: 8;
|
||
}
|
||
.node-icon-text {
|
||
display: flex;
|
||
align-items: center;
|
||
}
|
||
|
||
.node-icon-text > div {
|
||
color: #fff;
|
||
margin: 1px;
|
||
height: fit-content;
|
||
text-align: center;
|
||
overflow: hidden;
|
||
display: -webkit-box;
|
||
-webkit-box-orient: vertical;
|
||
}
|
||
`,"getStyles"),Kyr=jyr;function Hte(t,e){if(t===0)return e();const r=Math.random;let n=t>>>0;Math.random=function(){n=n+1831565813>>>0;let a=n;return a=Math.imul(a^a>>>15,a|1),a^=a+Math.imul(a^a>>>7,a|61),((a^a>>>14)>>>0)/4294967296};try{return e()}finally{Math.random=r}}l(Hte,"withSeededRandom"),_(Hte,"withSeededRandom");var hC=_(t=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),Ik={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:hC('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:hC('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:hC('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:hC('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:hC('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:z2e,blank:{body:hC("")}}},Xyr=_(function(t,e,r,n){return nt(this,null,function*(){const a=r.getConfigField("padding"),i=r.getConfigField("iconSize"),s=i/2,o=i/6,u=o/2;yield Promise.all(e.edges().map(h=>nt(this,null,function*(){var I,L;const{source:d,sourceDir:f,sourceArrow:p,sourceGroup:g,target:m,targetDir:y,targetArrow:v,targetGroup:b,label:w}=MVe(h);let{x,y:T}=h[0].sourceEndpoint();const{x:C,y:S}=h[0].midpoint();let{x:E,y:k}=h[0].targetEndpoint();const A=a+4;if(g&&(Sl(f)?x+=f==="L"?-A:A:T+=f==="T"?-A:A+18),b&&(Sl(y)?E+=y==="L"?-A:A:k+=y==="T"?-A:A+18),!g&&((I=r.getNode(d))==null?void 0:I.type)==="junction"&&(Sl(f)?x+=f==="L"?s:-s:T+=f==="T"?s:-s),!b&&((L=r.getNode(m))==null?void 0:L.type)==="junction"&&(Sl(y)?E+=y==="L"?s:-s:k+=y==="T"?s:-s),h[0]._private.rscratch){const R=t.insert("g");if(R.insert("path").attr("d",`M ${x},${T} L ${C},${S} L${E},${k} `).attr("class","edge").attr("id",`${n}-${Bw(d,m,{prefix:"L"})}`),p){const O=Sl(f)?bR[f](x,o):x-u,M=sg(f)?bR[f](T,o):T-u;R.insert("polygon").attr("points",LVe[f](o)).attr("transform",`translate(${O},${M})`).attr("class","arrow")}if(v){const O=Sl(y)?bR[y](E,o):E-u,M=sg(y)?bR[y](k,o):k-u;R.insert("polygon").attr("points",LVe[y](o)).attr("transform",`translate(${O},${M})`).attr("class","arrow")}if(w){const O=Bte(f,y)?"XY":Sl(f)?"X":"Y";let M=0;O==="X"?M=Math.abs(x-E):O==="Y"?M=Math.abs(T-k)/1.5:M=Math.abs(x-E)/2;const P=R.append("g");if(yield Oo(P,w,{useHtmlLabels:!1,width:M,classes:"architecture-service-label"},ft()),P.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),O==="X")P.attr("transform","translate("+C+", "+S+")");else if(O==="Y")P.attr("transform","translate("+C+", "+S+") rotate(-90)");else if(O==="XY"){const z=zte(f,y);if(z&&Byr(z)){const D=P.node().getBoundingClientRect(),[B,W]=Wyr(z);P.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*B*W*45})`);const U=P.node().getBoundingClientRect();P.attr("transform",`
|
||
translate(${C}, ${S-D.height/2})
|
||
translate(${B*U.width/2}, ${W*U.height/2})
|
||
rotate(${-1*B*W*45}, 0, ${D.height/2})
|
||
`)}}}}})))})},"drawEdges"),Zyr=_(function(t,e,r,n){return nt(this,null,function*(){const i=r.getConfigField("padding")*.75,s=r.getConfigField("fontSize"),u=r.getConfigField("iconSize")/2;yield Promise.all(e.nodes().map(h=>nt(this,null,function*(){const d=uC(h);if(d.type==="group"){const{h:f,w:p,x1:g,y1:m}=h.boundingBox(),y=t.append("rect");y.attr("id",`${n}-group-${d.id}`).attr("x",g+u).attr("y",m+u).attr("width",p).attr("height",f).attr("class","node-bkg");const v=t.append("g");let b=g,w=m;if(d.icon){const x=v.append("g");x.html(`<g>${yield hf(d.icon,{height:i,width:i,fallbackPrefix:Ik.prefix})}</g>`),x.attr("transform","translate("+(b+u+1)+", "+(w+u+1)+")"),b+=i,w+=s/2-1-2}if(d.label){const x=v.append("g");yield Oo(x,d.label,{useHtmlLabels:!1,width:p,classes:"architecture-service-label"},ft()),x.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),x.attr("transform","translate("+(b+u+4)+", "+(w+u+2)+")")}r.setElementForId(d.id,y)}})))})},"drawGroups"),Qyr=_(function(t,e,r,n){return nt(this,null,function*(){var i;const a=ft();for(const s of r){const o=e.append("g"),u=t.getConfigField("iconSize");if(s.title){const p=o.append("g");yield Oo(p,s.title,{useHtmlLabels:!1,width:u*1.5,classes:"architecture-service-label"},a),p.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),p.attr("transform","translate("+u/2+", "+u+")")}const h=o.append("g");if(s.icon)h.html(`<g>${yield hf(s.icon,{height:u,width:u,fallbackPrefix:Ik.prefix})}</g>`);else if(s.iconText){h.html(`<g>${yield hf("blank",{height:u,width:u,fallbackPrefix:Ik.prefix})}</g>`);const m=h.append("g").append("foreignObject").attr("width",u).attr("height",u).append("div").attr("class","node-icon-text").attr("style",`height: ${u}px;`).append("div").html(mn(s.iconText,a)),y=(i=parseInt(window.getComputedStyle(m.node(),null).getPropertyValue("font-size").replace(/\D/g,"")))!=null?i:16;m.attr("style",`-webkit-line-clamp: ${Math.floor((u-2)/y)};`)}else h.append("path").attr("class","node-bkg").attr("id",`${n}-node-${s.id}`).attr("d",`M0,${u} V5 Q0,0 5,0 H${u-5} Q${u},0 ${u},5 V${u} Z`);o.attr("id",`${n}-service-${s.id}`).attr("class","architecture-service");const{width:d,height:f}=o.node().getBBox();s.width=d,s.height=f,t.setElementForId(s.id,o)}return 0})},"drawServices"),Jyr=_(function(t,e,r,n){r.forEach(a=>{const i=e.append("g"),s=t.getConfigField("iconSize");i.append("g").append("rect").attr("id",`${n}-node-${a.id}`).attr("fill-opacity","0").attr("width",s).attr("height",s),i.attr("class","architecture-junction");const{width:u,height:h}=i._groups[0][0].getBBox();i.width=u,i.height=h,t.setElementForId(a.id,i)})},"drawJunctions");xW([{name:Ik.prefix,icons:Ik}]),cd.use(Dyr);function OVe(t,e,r){t.forEach(n=>{e.add({group:"nodes",data:{type:"service",id:n.id,icon:n.icon,label:n.title,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}l(OVe,"addServices"),_(OVe,"addServices");function DVe(t,e,r){t.forEach(n=>{e.add({group:"nodes",data:{type:"junction",id:n.id,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}l(DVe,"addJunctions"),_(DVe,"addJunctions");function FVe(t,e){e.nodes().map(r=>{const n=uC(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,t.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}l(FVe,"positionNodes"),_(FVe,"positionNodes");function BVe(t,e){t.forEach(r=>{e.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}l(BVe,"addGroups"),_(BVe,"addGroups");function zVe(t,e){t.forEach(r=>{const{lhsId:n,rhsId:a,lhsInto:i,lhsGroup:s,rhsInto:o,lhsDir:u,rhsDir:h,rhsGroup:d,title:f}=r,p=Bte(r.lhsDir,r.rhsDir)?"segments":"straight",g={id:`${n}-${a}`,label:f,source:n,sourceDir:u,sourceArrow:i,sourceGroup:s,sourceEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%",target:a,targetDir:h,targetArrow:o,targetGroup:d,targetEndpoint:h==="L"?"0 50%":h==="R"?"100% 50%":h==="T"?"50% 0":"50% 100%"};e.add({group:"edges",data:g,classes:p})})}l(zVe,"addEdges"),_(zVe,"addEdges");function HVe(t,e,r,n=[]){const a=_((p,g)=>Object.entries(p).reduce((m,[y,v])=>{var x,T,C;let b=0;const w=Object.entries(v);if(w.length===1)return m[y]=w[0][1],m;for(let S=0;S<w.length-1;S++)for(let E=S+1;E<w.length;E++){const[k,A]=w[S],[I,L]=w[E];if(((x=r[k])==null?void 0:x[I])===g)(T=m[y])!=null||(m[y]=[]),m[y]=[...m[y],...A,...L];else if(k==="default"||I==="default")(C=m[y])!=null||(m[y]=[]),m[y]=[...m[y],...A,...L];else{const O=`${y}-${b++}`;m[O]=A;const M=`${y}-${b++}`;m[M]=L}}return m},{}),"flattenAlignments"),i=e.map(p=>{const g={},m={};return Object.entries(p).forEach(([y,[v,b]])=>{var x,T,C,S,E,k,A,I;const w=(T=(x=t.getNode(y))==null?void 0:x.in)!=null?T:"default";(C=g[b])!=null||(g[b]={}),(E=(S=g[b])[w])!=null||(S[w]=[]),g[b][w].push(y),(k=m[v])!=null||(m[v]={}),(I=(A=m[v])[w])!=null||(A[w]=[]),m[v][w].push(y)}),{horiz:Object.values(a(g,"horizontal")).filter(y=>y.length>1),vert:Object.values(a(m,"vertical")).filter(y=>y.length>1)}}),[s,o]=i.reduce(([p,g],{horiz:m,vert:y})=>[[...p,...m],[...g,...y]],[[],[]]),u=new Set;n.forEach(p=>p.members.forEach(g=>u.add(g)));const h=_(p=>p.filter(g=>!g.some(m=>u.has(m))),"dropOverlapping"),d=h(s),f=h(o);return n.forEach(p=>{p.members.length<2||(p.direction==="row"?d.push([...p.members]):f.push([...p.members]))}),{horizontal:d,vertical:f}}l(HVe,"getAlignments"),_(HVe,"getAlignments");function WVe(t,e,r=[]){const n=[],a=e.getConfigField("iconSize"),i=e.getConfigField("idealEdgeLengthMultiplier"),s=i*a,o=new Set;r.forEach(d=>{for(let f=0;f<d.members.length-1;f++){const p=d.members[f],g=d.members[f+1];o.add(`${p}|${g}`),o.add(`${g}|${p}`),d.direction==="row"?n.push({left:p,right:g,gap:s}):n.push({top:p,bottom:g,gap:s})}});const u=_(d=>`${d[0]},${d[1]}`,"posToStr"),h=_(d=>d.split(",").map(f=>parseInt(f)),"strToPos");return t.forEach(d=>{const f=Object.fromEntries(Object.entries(d).map(([y,v])=>[u(v),y])),p=[u([0,0])],g={},m={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;p.length>0;){const y=p.shift();if(y){g[y]=1;const v=f[y];if(v){const b=h(y);Object.entries(m).forEach(([w,x])=>{const T=u([b[0]+x[0],b[1]+x[1]]),C=f[T];if(C&&!g[T]){if(p.push(T),o.has(`${v}|${C}`))return;n.push({[IVe[w]]:C,[IVe[Fyr(w)]]:v,gap:i*a})}})}}}}),n}l(WVe,"getRelativeConstraints"),_(WVe,"getRelativeConstraints");function VVe(t,e,r,n,a,{spatialMaps:i,groupAlignments:s}){return new Promise(o=>{const u=Yt("body").append("div").attr("id","cy").attr("style","display:none"),h=cd({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${a.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${a.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});u.remove(),BVe(r,h),OVe(t,h,a),DVe(e,h,a),zVe(n,h);const d=a.getLayoutHints(),f=HVe(a,i,s,d),p=WVe(i,a,d),g=a.getConfigField("iconSize"),m=a.getConfigField("idealEdgeLengthMultiplier")*g,y=.5*g,v=a.getConfigField("edgeElasticity"),b=a.getConfigField("seed"),w=h.layout({name:"fcose",quality:"proof",randomize:a.getConfigField("randomize"),nodeSeparation:a.getConfigField("nodeSeparation"),numIter:a.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(x){const[T,C]=x.connectedNodes(),{parent:S}=uC(T),{parent:E}=uC(C);return S===E?m:y},edgeElasticity(x){const[T,C]=x.connectedNodes(),{parent:S}=uC(T),{parent:E}=uC(C);return S===E?v:.001},alignmentConstraint:f,relativePlacementConstraint:p});w.one("layoutstop",()=>{var T;function x(C,S,E,k){let A,I;const{x:L,y:R}=C,{x:O,y:M}=S;I=(k-R+(L-E)*(R-M)/(L-O))/Math.sqrt(1+Math.pow((R-M)/(L-O),2)),A=Math.sqrt(Math.pow(k-R,2)+Math.pow(E-L,2)-Math.pow(I,2));const P=Math.sqrt(Math.pow(O-L,2)+Math.pow(M-R,2));A=A/P;let z=(O-L)*(k-R)-(M-R)*(E-L);switch(!0){case z>=0:z=1;break;case z<0:z=-1;break}let D=(O-L)*(E-L)+(M-R)*(k-R);switch(!0){case D>=0:D=1;break;case D<0:D=-1;break}return I=Math.abs(I)*z,A=A*D,{distances:I,weights:A}}l(x,"getSegmentWeights"),_(x,"getSegmentWeights"),h.startBatch();for(const C of Object.values(h.edges()))if((T=C.data)!=null&&T.call(C)){const{x:S,y:E}=C.source().position(),{x:k,y:A}=C.target().position();if(S!==k&&E!==A){const I=C.sourceEndpoint(),L=C.targetEndpoint(),{sourceDir:R}=MVe(C),[O,M]=sg(R)?[I.x,L.y]:[L.x,I.y],{weights:P,distances:z}=x(I,L,O,M);C.style("segment-distances",z),C.style("segment-weights",P)}}h.endBatch(),Hte(b,()=>w.run())});try{Hte(b,()=>w.run())}catch(x){throw x instanceof RangeError&&x.message.includes("Invalid array length")?new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):x}h.ready(x=>{Le.info("Ready",x),o(h)})})}l(VVe,"layoutArchitecture"),_(VVe,"layoutArchitecture");var evr=_((t,e,r,n)=>nt(this,null,function*(){const a=n.db;a.setDiagramId(e);const i=a.getServices(),s=a.getJunctions(),o=a.getGroups(),u=a.getEdges(),h=a.getDataStructures(),d=$o(e),f=d.append("g");f.attr("class","architecture-edges");const p=d.append("g");p.attr("class","architecture-services");const g=d.append("g");g.attr("class","architecture-groups"),yield Qyr(a,p,i,e),Jyr(a,p,s,e);const m=yield VVe(i,s,o,u,a,h);yield Xyr(f,m,a,e),yield Zyr(g,m,a,e),FVe(a,m),xw(void 0,d,a.getConfigField("padding"),a.getConfigField("useMaxWidth"))}),"draw"),tvr={draw:evr},rvr={parser:RVe,get db(){return new PVe},renderer:tvr,styles:Kyr},nvr=Object.freeze({__proto__:null,diagram:rvr}),GVe="position frame",qVe="frame positioned",Wte="position relation",YVe="relation positioned",avr=_(function(t){Le.debug("options str",t)},"setOptions"),ivr=_(function(){return{}},"getOptions"),svr=_(function(){UVe(),Ca()},"clear");function UVe(){Vte={}}l(UVe,"reset"),_(UVe,"reset");var ovr=hn.eventmodeling,lvr=_(()=>Ga(X(X({},ovr),Ar().eventmodeling)),"getConfig"),Vte={};function jVe(){let t=cvr;const{ast:e}=Vte,r=Gte();if(!e)throw new Error("No data for EventModel");return e.frames.forEach((n,a)=>{const i=tGe(n,e.dataEntities,r);t=wR(t,{$kind:GVe,index:a,frame:n,textProps:i});let s;oGe(n)?(Le.debug("source frame",n.sourceFrames),s=e.frames.filter(o=>n.sourceFrames.some(u=>u.$refText===o.name)),s.forEach(o=>{t=wR(t,{$kind:Wte,index:a,frame:n,sourceFrame:o})})):t=wR(t,{$kind:Wte,index:a,frame:n})}),t=Ne(X({},t),{sortedSwimlanesArray:qte(t.swimlanes)}),t}l(jVe,"getState"),_(jVe,"getState");function KVe(t){Vte.ast=t}l(KVe,"setAst"),_(KVe,"setAst");var jn={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:450-2*10,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function Gte(){return jn}l(Gte,"getDiagramProps"),_(Gte,"getDiagramProps");var cvr={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function XVe(t){const e=t.split(".");if(e.length===2)return e[0]}l(XVe,"extractNamespace"),_(XVe,"extractNamespace");function ZVe(t){const e=t.split(".");return e.length===2?e[1]:t}l(ZVe,"extractName"),_(ZVe,"extractName");function QVe(t,e){if(!(!e||e.length===0))return Object.values(t).find(r=>r.namespace===e)}l(QVe,"findSwimlaneByNamespace"),_(QVe,"findSwimlaneByNamespace");function xR(t,e,r){return Math.max(e,...Object.keys(t).filter(n=>{const a=Number.parseInt(n);return a>e&&a<r}).map(n=>Number.parseInt(n)))+1}l(xR,"findNextAvailableIndex"),_(xR,"findNextAvailableIndex");function JVe(t,e){const r=XVe(t.entityIdentifier),n=QVe(e,r);switch(t.modelEntityType){case"ui":case"pcr":case"processor":return n?{index:n.index,label:n.namespace||jn.labelUiAutomation}:r?{index:xR(e,0,100),label:jn.labelUiAutomationPrefix+r}:{index:0,label:jn.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return n?{index:n.index,label:n.namespace||jn.labelCommandReadModel}:r?{index:xR(e,100,200),label:jn.labelCommandReadModelPrefix+r}:{index:100,label:jn.labelCommandReadModel};case"evt":case"event":default:return n?{index:n.index,label:n.namespace||jn.labelEvents}:r?{index:xR(e,200,300),label:jn.labelEventsPrefix+r}:{index:200,label:jn.labelEvents}}}l(JVe,"calculateSwimlaneProps"),_(JVe,"calculateSwimlaneProps");function eGe(t){var r,n,a,i,s,o,u,h,d,f;const{themeVariables:e}=Ar();switch(t.modelEntityType){case"ui":return{fill:(r=e.emUiFill)!=null?r:"white",stroke:(n=e.emUiStroke)!=null?n:"#dbdada"};case"pcr":case"processor":return{fill:(a=e.emProcessorFill)!=null?a:"#edb3f6",stroke:(i=e.emProcessorStroke)!=null?i:"#b88cbf"};case"rmo":case"readmodel":return{fill:(s=e.emReadModelFill)!=null?s:"#d3f1a2",stroke:(o=e.emReadModelStroke)!=null?o:"#a3b732"};case"cmd":case"command":return{fill:(u=e.emCommandFill)!=null?u:"#bcd6fe",stroke:(h=e.emCommandStroke)!=null?h:"#679ac3"};case"evt":case"event":return{fill:(d=e.emEventFill)!=null?d:"#ffb778",stroke:(f=e.emEventStroke)!=null?f:"#c19a0f"};default:return{fill:"red",stroke:"black"}}}l(eGe,"calculateEntityVisualProps"),_(eGe,"calculateEntityVisualProps");function tGe(t,e,r){var m;const n=Ar(),a=mn((m=ZVe(t.entityIdentifier))!=null?m:"",n);let i;const s={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let u=`<b>${c3(a,r.textMaxWidth,s)}</b>`;if(t.dataInlineValue&&(i=t.dataInlineValue,i=i.substring(i.indexOf("{")+1),i=i.substring(0,i.lastIndexOf("}")-1),i=mn(i,n),i=c3(i,r.textMaxWidth,s),i=i.replaceAll(" "," ")),t.dataReference){const y=e.find(v=>{var b;return v.name===((b=t.dataReference)==null?void 0:b.$refText)});y&&(i=y.dataBlockValue,i=i.substring(i.indexOf(`{
|
||
`)+2),i=i.substring(0,i.lastIndexOf("}")-1),i=mn(i,n),i=c3(i,r.textMaxWidth,s),i=i.replaceAll(" "," "),i+="<br/>")}const h=i!==void 0;h&&(u+=`<br/><br/><code style="text-align: left; display: block;max-width:${r.textMaxWidth}px">${i}</code>`);const d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=I7(u,d),p=h?f.width/3:f.width,g={content:u,width:p,height:f.height};return Le.debug(`[${t.name}] ${t.entityIdentifier} text`,g),g}l(tGe,"calculateTextProps"),_(tGe,"calculateTextProps");function rGe(t,e){const r=e,n=eGe(r.frame),a={width:r.textProps.width+2*jn.boxTextPadding,height:r.textProps.height+2*jn.boxTextPadding};return[{$kind:qVe,frame:r.frame,index:r.index,visual:n,dimension:a,textProps:r.textProps}]}l(rGe,"decidePositionFrame"),_(rGe,"decidePositionFrame");function nGe(t,e,r){return e===void 0?jn.contentStartX:e.index===t.index&&t.r?t.r+jn.boxPadding:r===void 0?jn.contentStartX:r.r-jn.boxOverlap+jn.boxPadding}l(nGe,"calculateX"),_(nGe,"calculateX");function aGe(t,e){const r=[...t.map(n=>n.r),e];return Math.max(...r)}l(aGe,"calculateMaxRight"),_(aGe,"calculateMaxRight");function qte(t){return Object.values(t).sort((e,r)=>e.index-r.index)}l(qte,"sortedSwimlanesArray"),_(qte,"sortedSwimlanesArray");function iGe(t,e){const r=e,n=JVe(r.frame,t.swimlanes);let a;n.index in t.swimlanes?a=t.swimlanes[n.index]:a={index:n.index,label:n.label,r:0,y:n.index*jn.swimlaneMinHeight+jn.swimlaneGap,height:jn.swimlaneMinHeight,maxHeight:jn.swimlaneMinHeight};const i=t.boxes.length>0?t.boxes[t.boxes.length-1]:void 0,s=t.previousSwimlaneNumber!==void 0?t.swimlanes[t.previousSwimlaneNumber]:void 0,o={width:Math.max(jn.boxMinWidth,Math.min(jn.boxMaxWidth,r.dimension.width))+2*jn.boxPadding,height:Math.max(jn.boxMinHeight,Math.min(jn.boxMaxHeight,r.dimension.height))+2*jn.boxPadding},u=nGe(a,s,i),h=u+o.width+jn.boxPadding,d=aGe(Object.values(t.swimlanes),h);a.r=u+o.width,a.maxHeight=Math.max(a.maxHeight,o.height),a.height=Math.max(jn.swimlaneMinHeight,a.maxHeight)+2*jn.swimlanePadding;const f={x:u,y:jn.swimlanePadding+a.y,r:h,dimension:o,leftSibling:!1,swimlane:a,visual:r.visual,text:r.textProps.content,frame:r.frame,index:r.index},p=Ne(X({},t),{boxes:[...t.boxes,f],swimlanes:Ne(X({},t.swimlanes),{[`${a.index}`]:a}),previousSwimlaneNumber:n.index,previousFrame:r.frame,maxR:d}),g=qte(p.swimlanes);g.length>0&&(g[0].y=0);for(let m=1;m<g.length;m++){const y=g[m],v=g[m-1];y.y=v.y+v.height+jn.swimlaneGap}return p}l(iGe,"evolveFramePositioned"),_(iGe,"evolveFramePositioned");function sGe(t,e){return t===0&&e.sourceFrames.length===0}l(sGe,"isFirstFrame"),_(sGe,"isFirstFrame");function oGe(t){return t.sourceFrames!==void 0&&t.sourceFrames!==null&&t.sourceFrames.length>0}l(oGe,"hasSourceFrame"),_(oGe,"hasSourceFrame");function Yte(t,e){if(e!=null)return t.find(r=>r.frame.name===e.name)}l(Yte,"findBoxByFrame"),_(Yte,"findBoxByFrame");function lGe(t,e,r){if(!(r<0))for(let n=r;n>=0;n--){const a=t[n];if(a.swimlane.index!==e)return a}}l(lGe,"findBoxByLineIndex"),_(lGe,"findBoxByLineIndex");function cGe(t,e){const r=e;if(YFe(r.frame)||sGe(r.index,r.frame))return[];const n=Yte(t.boxes,r.frame);if(n===void 0)throw new Error(`Target box not found for frame ${r.frame.name}`);let a;return r.sourceFrame?a=Yte(t.boxes,r.sourceFrame):a=lGe(t.boxes,n.swimlane.index,r.index-1),a===void 0?[]:[{$kind:YVe,frame:r.frame,index:r.index,sourceBox:a,targetBox:n}]}l(cGe,"decidePositionRelation"),_(cGe,"decidePositionRelation");function uGe(t,e){const r=e,n={visual:{fill:"none",stroke:"#000"},source:{x:r.sourceBox.x,y:r.sourceBox.y},target:{x:r.targetBox.x,y:r.targetBox.y},sourceBox:r.sourceBox,targetBox:r.targetBox};return Ne(X({},t),{relations:[...t.relations,n]})}l(uGe,"evolveRelationPositioned"),_(uGe,"evolveRelationPositioned");var uvr={[GVe]:rGe,[Wte]:cGe},hvr={[qVe]:iGe,[YVe]:uGe};function hGe(t,e){const r=uvr[e.$kind];if(r==null)return[];const n=r(t,e);return Le.debug("decided events",n),n}l(hGe,"decide"),_(hGe,"decide");function dGe(t,e){const r=e.reduce((n,a)=>{const i=hvr[a.$kind];return i==null?n:i(n,a)},t);return Le.debug("evolve events",{state:t,newState:r,events:e}),r}l(dGe,"evolve"),_(dGe,"evolve");function wR(t,e){const r=hGe(t,e);return dGe(t,r)}l(wR,"dispatch"),_(wR,"dispatch");var Ute={getConfig:lvr,setOptions:avr,getOptions:ivr,clear:svr,setAccTitle:Na,getAccTitle:za,getAccDescription:Wa,setAccDescription:Ha,setDiagramTitle:Va,getDiagramTitle:Ia,setAst:KVe,getDiagramProps:Gte,getState:jVe},dvr={parse:_(t=>nt(this,null,function*(){const e=yield pu("eventmodeling",t);Le.debug(e),Ute.setAst(e),hl(e,Ute)}),"parse")},jte=ft(),fvr=jte==null?void 0:jte.eventmodeling;function fGe(t,e){return r=>{const n=r.swimlane.y+e.swimlanePadding,a=t.append("g").attr("class","em-box");a.append("rect").attr("x",r.x).attr("y",n).attr("rx","3").attr("width",r.dimension.width).attr("height",r.dimension.height).attr("stroke",r.visual.stroke).attr("fill",r.visual.fill),a.append("foreignObject").attr("x",r.x+e.boxPadding).attr("y",n+10).attr("width",r.dimension.width-2*e.boxPadding).attr("height",r.dimension.height-2*e.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(r.text)}}l(fGe,"renderD3Box"),_(fGe,"renderD3Box");function pGe(t,e){return t>e}l(pGe,"dirUpwards"),_(pGe,"dirUpwards");function gGe(t,e,r,n){return a=>{var g;const i=a.sourceBox.swimlane.y+e.swimlanePadding,s=a.targetBox.swimlane.y+e.swimlanePadding,o=pGe(i,s),u=a.sourceBox.x+a.sourceBox.dimension.width*2/3,h=a.targetBox.x+a.targetBox.dimension.width/3;let d,f;Le.debug(`rendering relation up=${o} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),o?(d=i,f=s+a.targetBox.dimension.height):(d=i+a.sourceBox.dimension.height,f=s);const p=(g=n.emRelationStroke)!=null?g:a.visual.stroke;t.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${r})`).attr("d",`M${u} ${d} L${h} ${f}`)}}l(gGe,"renderD3Relation"),_(gGe,"renderD3Relation");function mGe(t,e,r,n){return a=>{var u,h;const i=t.append("g").attr("class","em-swimlane"),s=(u=n.emSwimlaneBackgroundOdd)!=null?u:"rgb(250,250,250)",o=(h=n.emSwimlaneBackgroundStroke)!=null?h:"rgb(240,240,240)";i.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",e+r.swimlanePadding).attr("height",a.height).attr("fill",s).attr("stroke",o),i.append("text").attr("font-weight",r.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}l(mGe,"renderD3Swimlane"),_(mGe,"renderD3Swimlane");var pvr=_(function(t,e,r,n){var g,m;if(Le.debug("in eventmodeling renderer",t+`
|
||
`,"id:",e,r),!fvr)throw new Error("EventModeling config not found");const a=n.db,{themeVariables:i,eventmodeling:s}=ft(),o=Yt(`[id="${e}"]`),u=a.getDiagramProps(),h=a.getState(),d=`em-arrowhead-${e}`,f=(g=i.emArrowhead)!=null?g:"#000000";h.sortedSwimlanesArray.forEach(mGe(o,h.maxR,u,i)),h.boxes.forEach(fGe(o,u)),h.relations.forEach(gGe(o,u,d,i)),o.append("defs").append("marker").attr("id",d).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),Bz(void 0,o,(m=s==null?void 0:s.padding)!=null?m:30,s==null?void 0:s.useMaxWidth)},"draw"),gvr={draw:pvr},mvr=_(t=>"","getStyles"),yvr=mvr,vvr={parser:dvr,db:Ute,renderer:gvr,styles:yvr},bvr=Object.freeze({__proto__:null,diagram:vvr}),Kte=function(){var t=_(function(b,w,x,T){for(x=x||{},T=b.length;T--;x[b[T]]=w);return x},"o"),e=[1,4],r=[1,14],n=[1,12],a=[1,13],i=[6,7,8],s=[1,20],o=[1,18],u=[1,19],h=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],g=[1,6,7,11,13,14],m={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:_(l(function(w,x,T,C,S,E,k){var A=E.length-1;switch(S){case 6:case 7:return C;case 15:C.addNode(E[A-1].length,E[A].trim());break;case 16:C.addNode(0,E[A].trim());break}},"anonymous"),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:r,7:[1,10],9:9,12:11,13:n,14:a},t(i,[2,3]),{1:[2,2]},t(i,[2,4]),t(i,[2,5]),{1:[2,6],6:r,12:15,13:n,14:a},{6:r,9:16,12:11,13:n,14:a},{6:s,7:o,10:17,11:u},t(h,[2,18],{14:[1,21]}),t(h,[2,16]),t(h,[2,17]),{6:s,7:o,10:22,11:u},{1:[2,7],6:r,12:15,13:n,14:a},t(d,[2,14],{7:f,11:p}),t(g,[2,8]),t(g,[2,9]),t(g,[2,10]),t(h,[2,15]),t(d,[2,13],{7:f,11:p}),t(g,[2,11]),t(g,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:_(l(function(w,x){if(x.recoverable)this.trace(w);else{var T=new Error(w);throw T.hash=x,T}},"parseError"),"parseError"),parse:_(l(function(w){var x=this,T=[0],C=[],S=[null],E=[],k=this.table,A="",I=0,L=0,R=2,O=1,M=E.slice.call(arguments,1),P=Object.create(this.lexer),z={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(z.yy[D]=this.yy[D]);P.setInput(w,z.yy),z.yy.lexer=P,z.yy.parser=this,typeof P.yylloc=="undefined"&&(P.yylloc={});var B=P.yylloc;E.push(B);var W=P.options&&P.options.ranges;typeof z.yy.parseError=="function"?this.parseError=z.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(J){T.length=T.length-2*J,S.length=S.length-J,E.length=E.length-J}l(U,"popStack"),_(U,"popStack");function j(){var J;return J=C.pop()||P.lex()||O,typeof J!="number"&&(J instanceof Array&&(C=J,J=C.pop()),J=x.symbols_[J]||J),J}l(j,"lex"),_(j,"lex");for(var V,Y,H,q,Z={},K,re,Q,te;;){if(Y=T[T.length-1],this.defaultActions[Y]?H=this.defaultActions[Y]:((V===null||typeof V=="undefined")&&(V=j()),H=k[Y]&&k[Y][V]),typeof H=="undefined"||!H.length||!H[0]){var ee="";te=[];for(K in k[Y])this.terminals_[K]&&K>R&&te.push("'"+this.terminals_[K]+"'");P.showPosition?ee="Parse error on line "+(I+1)+`:
|
||
`+P.showPosition()+`
|
||
Expecting `+te.join(", ")+", got '"+(this.terminals_[V]||V)+"'":ee="Parse error on line "+(I+1)+": Unexpected "+(V==O?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(ee,{text:P.match,token:this.terminals_[V]||V,line:P.yylineno,loc:B,expected:te})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Y+", token: "+V);switch(H[0]){case 1:T.push(V),S.push(P.yytext),E.push(P.yylloc),T.push(H[1]),V=null,L=P.yyleng,A=P.yytext,I=P.yylineno,B=P.yylloc;break;case 2:if(re=this.productions_[H[1]][1],Z.$=S[S.length-re],Z._$={first_line:E[E.length-(re||1)].first_line,last_line:E[E.length-1].last_line,first_column:E[E.length-(re||1)].first_column,last_column:E[E.length-1].last_column},W&&(Z._$.range=[E[E.length-(re||1)].range[0],E[E.length-1].range[1]]),q=this.performAction.apply(Z,[A,L,I,z.yy,H[1],S,E].concat(M)),typeof q!="undefined")return q;re&&(T=T.slice(0,-1*re*2),S=S.slice(0,-1*re),E=E.slice(0,-1*re)),T.push(this.productions_[H[1]][0]),S.push(Z.$),E.push(Z._$),Q=k[T[T.length-2]][T[T.length-1]],T.push(Q);break;case 3:return!0}}return!0},"parse"),"parse")},y=function(){var b={EOF:1,parseError:_(l(function(x,T){if(this.yy.parser)this.yy.parser.parseError(x,T);else throw new Error(x)},"parseError"),"parseError"),setInput:_(function(w,x){return this.yy=x||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var x=w.match(/(?:\r\n?|\n).*/g);return x?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},"input"),unput:_(function(w){var x=w.length,T=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var C=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),T.length-1&&(this.yylineno-=T.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:T?(T.length===C.length?this.yylloc.first_column:0)+C[C.length-T.length].length-T[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(w){this.unput(this.match.slice(w))},"less"),pastInput:_(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var w=this.pastInput(),x=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
|
||
`+x+"^"},"showPosition"),test_match:_(function(w,x){var T,C,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),C=w[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],T=this.performAction.call(this,this.yy,this,x,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),T)return T;if(this._backtrack){for(var E in S)this[E]=S[E];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,x,T,C;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),E=0;E<S.length;E++)if(T=this._input.match(this.rules[S[E]]),T&&(!x||T[0].length>x[0].length)){if(x=T,C=E,this.options.backtrack_lexer){if(w=this.test_match(T,S[E]),w!==!1)return w;if(this._backtrack){x=!1;continue}else return!1}else if(!this.options.flex)break}return x?(w=this.test_match(x,S[C]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var x=this.next();return x||this.lex()},"lex"),"lex"),begin:_(l(function(x){this.conditionStack.push(x)},"begin"),"begin"),popState:_(l(function(){var x=this.conditionStack.length-1;return x>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(x){return x=this.conditionStack.length-1-Math.abs(x||0),x>=0?this.conditionStack[x]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(x){this.begin(x)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(x,T,C,S){switch(C){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return b}();m.lexer=y;function v(){this.yy={}}return l(v,"Parser"),_(v,"Parser"),v.prototype=m,m.Parser=v,new v}();Kte.parser=Kte;var xvr=Kte,wvr=(ix=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,Ca()}getRoot(){return this.root}addNode(e,r){var o;const n=or.sanitizeText(r,ft());if(!this.root){this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],Va(n);return}(o=this.baseLevel)!=null||(this.baseLevel=e);let a=e-this.baseLevel+1;for(a<=0&&(a=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=a;)this.stack.pop();const i=this.stack[this.stack.length-1].node,s={text:n,children:[]};i.children.push(s),this.stack.push({level:a,node:s})}getAccTitle(){return za()}setAccTitle(e){Na(e)}getAccDescription(){return Wa()}setAccDescription(e){Ha(e)}getDiagramTitle(){return Ia()}setDiagramTitle(e){Va(e)}},l(ix,"IshikawaDB"),_(ix,"IshikawaDB"),ix),Tvr=14,dC=250,Evr=30,Cvr=60,Svr=5,yGe=82*Math.PI/180,vGe=Math.cos(yGe),bGe=Math.sin(yGe),xGe=_((t,e,r)=>{const n=t.node().getBBox(),a=n.width+e*2,i=n.height+e*2;yi(t,i,a,r),t.attr("viewBox",`${n.x-e} ${n.y-e} ${a} ${i}`)},"applyPaddedViewBox"),_vr=_((t,e,r,n)=>{var z,D,B,W,U,j,V,Y;const i=n.db.getRoot();if(!i)return;const s=ft(),{look:o,handDrawnSeed:u,themeVariables:h}=s,d=(z=cf(s.fontSize)[0])!=null?z:Tvr,f=o==="handDrawn",p=(D=i.children)!=null?D:[],g=(W=(B=s.ishikawa)==null?void 0:B.diagramPadding)!=null?W:20,m=(j=(U=s.ishikawa)==null?void 0:U.useMaxWidth)!=null?j:!1,y=$o(e),v=y.append("g").attr("class","ishikawa"),b=f?Sr.svg(y.node()):void 0,w=b?{roughSvg:b,seed:u!=null?u:0,lineColor:(V=h==null?void 0:h.lineColor)!=null?V:"#333",fillColor:(Y=h==null?void 0:h.mainBkg)!=null?Y:"#fff"}:void 0,x=`ishikawa-arrow-${e}`;f||v.append("defs").append("marker").attr("id",x).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let T=0,C=dC;const S=f?void 0:fC(v,T,C,T,C,"ishikawa-spine");if(kvr(v,T,C,i.text,d,w),!p.length){f&&fC(v,T,C,T,C,"ishikawa-spine",w),xGe(y,g,m);return}T-=20;const E=p.filter((H,q)=>q%2===0),k=p.filter((H,q)=>q%2===1),A=wGe(E),I=wGe(k),L=A.total+I.total;let R=dC,O=dC;if(L>0){const H=dC*2,q=dC*.3;R=Math.max(q,H*(A.total/L)),O=Math.max(q,H*(I.total/L))}const M=d*2;R=Math.max(R,A.max*M),O=Math.max(O,I.max*M),C=Math.max(R,dC),S&&S.attr("y1",C).attr("y2",C),v.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);const P=Math.ceil(p.length/2);for(let H=0;H<P;H++){const q=v.append("g").attr("class","ishikawa-pair");for(const[Z,K,re]of[[p[H*2],-1,R],[p[H*2+1],1,O]])Z&&Ivr(q,Z,T,C,K,re,d,w);T=q.selectAll("text").nodes().reduce((Z,K)=>Math.min(Z,K.getBBox().x),1/0)}if(f)fC(v,T,C,0,C,"ishikawa-spine",w);else{S.attr("x1",T);const H=`url(#${x})`;v.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",H)}xGe(y,g,m)},"draw"),wGe=_(t=>{const e=_(r=>r.children.reduce((n,a)=>n+1+e(a),0),"countDescendants");return t.reduce((r,n)=>{const a=e(n);return r.total+=a,r.max=Math.max(r.max,a),r},{total:0,max:0})},"sideStats"),kvr=_((t,e,r,n,a,i)=>{const s=Math.max(6,Math.floor(110/(a*.6))),o=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${r})`),u=TR(o,TGe(n,s),0,0,"ishikawa-head-label","start",a),h=u.node().getBBox(),d=Math.max(60,h.width+6),f=Math.max(40,h.height*2+40),p=`M 0 ${-f/2} L 0 ${f/2} Q ${d*2.4} 0 0 ${-f/2} Z`;if(i){const g=i.roughSvg.path(p,{roughness:1.5,seed:i.seed,fill:i.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:i.lineColor,strokeWidth:2});o.insert(()=>g,":first-child").attr("class","ishikawa-head")}else o.insert("path",":first-child").attr("class","ishikawa-head").attr("d",p);u.attr("transform",`translate(${(d-h.width)/2-h.x+3},${-h.y-h.height/2})`)},"drawHead"),Avr=_((t,e)=>{const r=[],n=[],a=_((i,s,o)=>{var h;const u=e===-1?[...i].reverse():i;for(const d of u){const f=r.length,p=(h=d.children)!=null?h:[];r.push({depth:o,text:TGe(d.text,15),parentIndex:s,childCount:p.length}),o%2===0?(n.push(f),p.length&&a(p,f,o+1)):(p.length&&a(p,f,o+1),n.push(f))}},"walk");return a(t,-1,2),{entries:r,yOrder:n}},"flattenTree"),Nvr=_((t,e,r,n,a,i,s)=>{const o=t.append("g").attr("class","ishikawa-label-group"),h=TR(o,e,r,n+11*a,"ishikawa-label cause","middle",i).node().getBBox();if(s){const d=s.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});o.insert(()=>d,":first-child").attr("class","ishikawa-label-box")}else o.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",h.x-20).attr("y",h.y-2).attr("width",h.width+40).attr("height",h.height+4)},"drawCauseLabel"),Xte=_((t,e,r,n,a,i)=>{const s=Math.sqrt(n*n+a*a);if(s===0)return;const o=n/s,u=a/s,h=6,d=-u*h,f=o*h,p=e,g=r,m=`M ${p} ${g} L ${p-o*h*2+d} ${g-u*h*2+f} L ${p-o*h*2-d} ${g-u*h*2-f} Z`,y=i.roughSvg.path(m,{roughness:1,seed:i.seed,fill:i.lineColor,fillStyle:"solid",stroke:i.lineColor,strokeWidth:1});t.append(()=>y)},"drawArrowMarker"),Ivr=_((t,e,r,n,a,i,s,o)=>{var S;const u=(S=e.children)!=null?S:[],h=i*(u.length?1:.2),d=-vGe*h,f=bGe*h*a,p=r+d,g=n+f;if(fC(t,r,n,p,g,"ishikawa-branch",o),o&&Xte(t,r,n,r-p,n-g,o),Nvr(t,e.text,p,g,a,s,o),!u.length)return;const{entries:m,yOrder:y}=Avr(u,a),v=m.length,b=new Array(v);for(const[E,k]of y.entries())b[k]=n+f*((E+1)/(v+1));const w=new Map;w.set(-1,{x0:r,y0:n,x1:p,y1:g,childCount:u.length,childrenDrawn:0});const x=-vGe,T=bGe*a,C=a<0?"ishikawa-label up":"ishikawa-label down";for(const[E,k]of m.entries()){const A=b[E],I=w.get(k.parentIndex),L=t.append("g").attr("class","ishikawa-sub-group");let R=0,O=0,M=0;if(k.depth%2===0){const P=I.y1-I.y0;R=EGe(I.x0,I.x1,P?(A-I.y0)/P:.5),O=A,M=R-(k.childCount>0?Cvr+k.childCount*Svr:Evr),fC(L,R,A,M,A,"ishikawa-sub-branch",o),o&&Xte(L,R,A,1,0,o),TR(L,k.text,M,A,"ishikawa-label align","end",s)}else{const P=I.childrenDrawn++;R=EGe(I.x0,I.x1,(I.childCount-P)/(I.childCount+1)),O=I.y0,M=R+x*((A-O)/T),fC(L,R,O,M,A,"ishikawa-sub-branch",o),o&&Xte(L,R,O,R-M,O-A,o),TR(L,k.text,M,A,C,"end",s)}k.childCount>0&&w.set(E,{x0:R,y0:O,x1:M,y1:A,childCount:k.childCount,childrenDrawn:0})}},"drawBranch"),Lvr=_(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),TGe=_((t,e)=>{if(t.length<=e)return t;const r=[];for(const n of t.split(/\s+/)){const a=r.length-1;a>=0&&r[a].length+1+n.length<=e?r[a]+=" "+n:r.push(n)}return r.join(`
|
||
`)},"wrapText"),TR=_((t,e,r,n,a,i,s)=>{const o=Lvr(e),u=s*1.05,h=t.append("text").attr("class",a).attr("text-anchor",i).attr("x",r).attr("y",n-(o.length-1)*u/2);for(const[d,f]of o.entries())h.append("tspan").attr("x",r).attr("dy",d===0?0:u).text(f);return h},"drawMultilineText"),EGe=_((t,e,r)=>t+(e-t)*r,"lerp"),fC=_((t,e,r,n,a,i,s)=>{if(s){const o=s.roughSvg.line(e,r,n,a,{roughness:1.5,seed:s.seed,stroke:s.lineColor,strokeWidth:2});t.append(()=>o).attr("class",i);return}return t.append("line").attr("class",i).attr("x1",e).attr("y1",r).attr("x2",n).attr("y2",a)},"drawLine"),$vr={draw:_vr},Mvr=_(t=>`
|
||
.ishikawa .ishikawa-spine,
|
||
.ishikawa .ishikawa-branch,
|
||
.ishikawa .ishikawa-sub-branch {
|
||
stroke: ${t.lineColor};
|
||
stroke-width: 2;
|
||
fill: none;
|
||
}
|
||
|
||
.ishikawa .ishikawa-sub-branch {
|
||
stroke-width: 1;
|
||
}
|
||
|
||
.ishikawa .ishikawa-arrow {
|
||
fill: ${t.lineColor};
|
||
}
|
||
|
||
.ishikawa .ishikawa-head {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.lineColor};
|
||
stroke-width: 2;
|
||
}
|
||
|
||
.ishikawa .ishikawa-label-box {
|
||
fill: ${t.mainBkg};
|
||
stroke: ${t.lineColor};
|
||
stroke-width: 2;
|
||
}
|
||
|
||
.ishikawa text {
|
||
font-family: ${t.fontFamily};
|
||
font-size: ${t.fontSize};
|
||
fill: ${t.textColor};
|
||
}
|
||
|
||
.ishikawa .ishikawa-head-label {
|
||
font-weight: 600;
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
font-size: 14px;
|
||
}
|
||
|
||
.ishikawa .ishikawa-label {
|
||
text-anchor: end;
|
||
}
|
||
|
||
.ishikawa .ishikawa-label.cause {
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
}
|
||
|
||
.ishikawa .ishikawa-label.align {
|
||
text-anchor: end;
|
||
dominant-baseline: middle;
|
||
}
|
||
|
||
.ishikawa .ishikawa-label.up {
|
||
dominant-baseline: baseline;
|
||
}
|
||
|
||
.ishikawa .ishikawa-label.down {
|
||
dominant-baseline: hanging;
|
||
}
|
||
`,"getStyles"),Pvr=Mvr,Rvr={parser:xvr,get db(){return new wvr},renderer:$vr,styles:Pvr},Ovr=Object.freeze({__proto__:null,diagram:Rvr});const CGe=1e-10;function ER(t,e){const r=Fvr(t),n=r.filter(o=>Dvr(o,t));let a=0,i=0;const s=[];if(n.length>1){const o=_Ge(n);for(let h=0;h<n.length;++h){const d=n[h];d.angle=Math.atan2(d.x-o.x,d.y-o.y)}n.sort((h,d)=>d.angle-h.angle);let u=n[n.length-1];for(let h=0;h<n.length;++h){const d=n[h];i+=(u.x+d.x)*(d.y-u.y);const f={x:(d.x+u.x)/2,y:(d.y+u.y)/2};let p=null;for(let g=0;g<d.parentIndex.length;++g)if(u.parentIndex.includes(d.parentIndex[g])){const m=t[d.parentIndex[g]],y=Math.atan2(d.x-m.x,d.y-m.y),v=Math.atan2(u.x-m.x,u.y-m.y);let b=v-y;b<0&&(b+=2*Math.PI);const w=v-b/2;let x=rc(f,{x:m.x+m.radius*Math.sin(w),y:m.y+m.radius*Math.cos(w)});x>m.radius*2&&(x=m.radius*2),(p==null||p.width>x)&&(p={circle:m,width:x,p1:d,p2:u,large:x>m.radius,sweep:!0})}p!=null&&(s.push(p),a+=Zte(p.circle.radius,p.width),u=d)}}else{let o=t[0];for(let h=1;h<t.length;++h)t[h].radius<o.radius&&(o=t[h]);let u=!1;for(let h=0;h<t.length;++h)if(rc(t[h],o)>Math.abs(o.radius-t[h].radius)){u=!0;break}u?a=i=0:(a=o.radius*o.radius*Math.PI,s.push({circle:o,p1:{x:o.x,y:o.y+o.radius},p2:{x:o.x-CGe,y:o.y+o.radius},width:o.radius*2,large:!0,sweep:!0}))}return i/=2,e&&(e.area=a+i,e.arcArea=a,e.polygonArea=i,e.arcs=s,e.innerPoints=n,e.intersectionPoints=r),a+i}l(ER,"intersectionArea");function Dvr(t,e){return e.every(r=>rc(t,r)<r.radius+CGe)}l(Dvr,"containedInCircles");function Fvr(t){const e=[];for(let r=0;r<t.length;++r)for(let n=r+1;n<t.length;++n){const a=SGe(t[r],t[n]);for(const i of a)i.parentIndex=[r,n],e.push(i)}return e}l(Fvr,"getIntersectionPoints");function Zte(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}l(Zte,"circleArea");function rc(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}l(rc,"distance");function Qte(t,e,r){if(r>=t+e)return 0;if(r<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const n=t-(r*r-e*e+t*t)/(2*r),a=e-(r*r-t*t+e*e)/(2*r);return Zte(t,n)+Zte(e,a)}l(Qte,"circleOverlap");function SGe(t,e){const r=rc(t,e),n=t.radius,a=e.radius;if(r>=n+a||r<=Math.abs(n-a))return[];const i=(n*n-a*a+r*r)/(2*r),s=Math.sqrt(n*n-i*i),o=t.x+i*(e.x-t.x)/r,u=t.y+i*(e.y-t.y)/r,h=-(e.y-t.y)*(s/r),d=-(e.x-t.x)*(s/r);return[{x:o+h,y:u-d},{x:o-h,y:u+d}]}l(SGe,"circleCircleIntersection");function _Ge(t){const e={x:0,y:0};for(const r of t)e.x+=r.x,e.y+=r.y;return e.x/=t.length,e.y/=t.length,e}l(_Ge,"getCenter");function Bvr(t,e,r,n){n=n||{};const a=n.maxIterations||100,i=n.tolerance||1e-10,s=t(e),o=t(r);let u=r-e;if(s*o>0)throw"Initial bisect points must have opposite signs";if(s===0)return e;if(o===0)return r;for(let h=0;h<a;++h){u/=2;const d=e+u,f=t(d);if(f*s>=0&&(e=d),Math.abs(u)<i||f===0)return d}return e+u}l(Bvr,"bisect");function Jte(t){const e=new Array(t);for(let r=0;r<t;++r)e[r]=0;return e}l(Jte,"zeros");function kGe(t,e){return Jte(t).map(()=>Jte(e))}l(kGe,"zerosM");function pC(t,e){let r=0;for(let n=0;n<t.length;++n)r+=t[n]*e[n];return r}l(pC,"dot");function ere(t){return Math.sqrt(pC(t,t))}l(ere,"norm2");function tre(t,e,r){for(let n=0;n<e.length;++n)t[n]=e[n]*r}l(tre,"scale");function c0(t,e,r,n,a){for(let i=0;i<t.length;++i)t[i]=e*r[i]+n*a[i]}l(c0,"weightedSum");function AGe(t,e,r){r=r||{};const n=r.maxIterations||e.length*200,a=r.nonZeroDelta||1.05,i=r.zeroDelta||.001,s=r.minErrorDelta||1e-6,o=r.minErrorDelta||1e-5,u=r.rho!==void 0?r.rho:1,h=r.chi!==void 0?r.chi:2,d=r.psi!==void 0?r.psi:-.5,f=r.sigma!==void 0?r.sigma:.5;let p;const g=e.length,m=new Array(g+1);m[0]=e,m[0].fx=t(e),m[0].id=0;for(let C=0;C<g;++C){const S=e.slice();S[C]=S[C]?S[C]*a:i,m[C+1]=S,m[C+1].fx=t(S),m[C+1].id=C+1}function y(C){for(let S=0;S<C.length;S++)m[g][S]=C[S];m[g].fx=C.fx}l(y,"updateSimplex");const v=l((C,S)=>C.fx-S.fx,"sortOrder"),b=e.slice(),w=e.slice(),x=e.slice(),T=e.slice();for(let C=0;C<n;++C){if(m.sort(v),r.history){const E=m.map(k=>{const A=k.slice();return A.fx=k.fx,A.id=k.id,A});E.sort((k,A)=>k.id-A.id),r.history.push({x:m[0].slice(),fx:m[0].fx,simplex:E})}p=0;for(let E=0;E<g;++E)p=Math.max(p,Math.abs(m[0][E]-m[1][E]));if(Math.abs(m[0].fx-m[g].fx)<s&&p<o)break;for(let E=0;E<g;++E){b[E]=0;for(let k=0;k<g;++k)b[E]+=m[k][E];b[E]/=g}const S=m[g];if(c0(w,1+u,b,-u,S),w.fx=t(w),w.fx<m[0].fx)c0(T,1+h,b,-h,S),T.fx=t(T),T.fx<w.fx?y(T):y(w);else if(w.fx>=m[g-1].fx){let E=!1;if(w.fx>S.fx?(c0(x,1+d,b,-d,S),x.fx=t(x),x.fx<S.fx?y(x):E=!0):(c0(x,1-d*u,b,d*u,S),x.fx=t(x),x.fx<w.fx?y(x):E=!0),E){if(f>=1)break;for(let k=1;k<m.length;++k)c0(m[k],1-f,m[0],f,m[k]),m[k].fx=t(m[k])}}else y(w)}return m.sort(v),{fx:m[0].fx,x:m[0]}}l(AGe,"nelderMead");function zvr(t,e,r,n,a,i,s){const o=r.fx,u=pC(r.fxprime,e);let h=o,d=o,f=u,p=0;a=a||1,i=i||1e-6,s=s||.1;function g(m,y,v){for(let b=0;b<16;++b)if(a=(m+y)/2,c0(n.x,1,r.x,a,e),h=n.fx=t(n.x,n.fxprime),f=pC(n.fxprime,e),h>o+i*a*u||h>=v)y=a;else{if(Math.abs(f)<=-s*u)return a;f*(y-m)>=0&&(y=m),m=a,v=h}return 0}l(g,"zoom");for(let m=0;m<10;++m){if(c0(n.x,1,r.x,a,e),h=n.fx=t(n.x,n.fxprime),f=pC(n.fxprime,e),h>o+i*a*u||m&&h>=d)return g(p,a,d);if(Math.abs(f)<=-s*u)return a;if(f>=0)return g(a,p,h);d=h,p=a,a*=2}return a}l(zvr,"wolfeLineSearch");function Hvr(t,e,r){let n={x:e.slice(),fx:0,fxprime:e.slice()},a={x:e.slice(),fx:0,fxprime:e.slice()};const i=e.slice();let s,o,u=1,h;r=r||{},h=r.maxIterations||e.length*20,n.fx=t(n.x,n.fxprime),s=n.fxprime.slice(),tre(s,n.fxprime,-1);for(let d=0;d<h;++d){if(u=zvr(t,s,n,a,u),r.history&&r.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:u}),!u)tre(s,n.fxprime,-1);else{c0(i,1,a.fxprime,-1,n.fxprime);const f=pC(n.fxprime,n.fxprime),p=Math.max(0,pC(i,a.fxprime)/f);c0(s,p,s,-1,a.fxprime),o=n,n=a,a=o}if(ere(n.fxprime)<=1e-5)break}return r.history&&r.history.push({x:n.x.slice(),fx:n.fx,fxprime:n.fxprime.slice(),alpha:u}),n}l(Hvr,"conjugateGradient");function NGe(t,e={}){e.maxIterations=e.maxIterations||500;const r=e.initialLayout||qvr,n=e.lossFunction||gC,a=Wvr(t,e),i=r(a,e),s=Object.keys(i),o=[];for(const d of s)o.push(i[d].x),o.push(i[d].y);const h=AGe(d=>{const f={};for(let p=0;p<s.length;++p){const g=s[p];f[g]={x:d[2*p],y:d[2*p+1],radius:i[g].radius}}return n(f,a)},o,e).x;for(let d=0;d<s.length;++d){const f=s[d];i[f].x=h[2*d],i[f].y=h[2*d+1]}return i}l(NGe,"venn");const IGe=1e-10;function rre(t,e,r){return Math.min(t,e)*Math.min(t,e)*Math.PI<=r+IGe?Math.abs(t-e):Bvr(n=>Qte(t,e,n)-r,0,t+e)}l(rre,"distanceFromIntersectArea");function Wvr(t,e={}){const r=e.distinct,n=t.map(o=>Object.assign({},o));function a(o){return o.join(";")}if(l(a,"toKey"),r){const o=new Map;for(const u of n)for(let h=0;h<u.sets.length;h++){const d=String(u.sets[h]);o.set(d,u.size+(o.get(d)||0));for(let f=h+1;f<u.sets.length;f++){const p=String(u.sets[f]),g=`${d};${p}`,m=`${p};${d}`;o.set(g,u.size+(o.get(g)||0)),o.set(m,u.size+(o.get(m)||0))}}for(const u of n)u.sets.length<3&&(u.size=o.get(a(u.sets)))}const i=[],s=new Set;for(const o of n)if(o.sets.length===1)i.push(o.sets[0]);else if(o.sets.length===2){const u=o.sets[0],h=o.sets[1];s.add(a(o.sets)),s.add(a([h,u]))}i.sort((o,u)=>o===u?0:o<u?-1:1);for(let o=0;o<i.length;++o){const u=i[o];for(let h=o+1;h<i.length;++h){const d=i[h];s.has(a([u,d]))||n.push({sets:[u,d],size:0})}}return n}l(Wvr,"addMissingAreas");function Vvr(t,e,r){const n=kGe(e.length,e.length),a=kGe(e.length,e.length);return t.filter(i=>i.sets.length===2).forEach(i=>{const s=r[i.sets[0]],o=r[i.sets[1]],u=Math.sqrt(e[s].size/Math.PI),h=Math.sqrt(e[o].size/Math.PI),d=rre(u,h,i.size);n[s][o]=n[o][s]=d;let f=0;i.size+1e-10>=Math.min(e[s].size,e[o].size)?f=1:i.size<=1e-10&&(f=-1),a[s][o]=a[o][s]=f}),{distances:n,constraints:a}}l(Vvr,"getDistanceMatrices");function Gvr(t,e,r,n){for(let i=0;i<e.length;++i)e[i]=0;let a=0;for(let i=0;i<r.length;++i){const s=t[2*i],o=t[2*i+1];for(let u=i+1;u<r.length;++u){const h=t[2*u],d=t[2*u+1],f=r[i][u],p=n[i][u],g=(h-s)*(h-s)+(d-o)*(d-o),m=Math.sqrt(g),y=g-f*f;p>0&&m<=f||p<0&&m>=f||(a+=2*y*y,e[2*i]+=4*y*(s-h),e[2*i+1]+=4*y*(o-d),e[2*u]+=4*y*(h-s),e[2*u+1]+=4*y*(d-o))}}return a}l(Gvr,"constrainedMDSGradient");function qvr(t,e={}){let r=Uvr(t,e);const n=e.lossFunction||gC;if(t.length>=8){const a=Yvr(t,e),i=n(a,t),s=n(r,t);i+1e-8<s&&(r=a)}return r}l(qvr,"bestInitialLayout");function Yvr(t,e={}){const r=e.restarts||10,n=[],a={};for(const p of t)p.sets.length===1&&(a[p.sets[0]]=n.length,n.push(p));let{distances:i,constraints:s}=Vvr(t,n,a);const o=ere(i.map(ere))/i.length;i=i.map(p=>p.map(g=>g/o));const u=l((p,g)=>Gvr(p,g,i,s),"obj");let h=null;for(let p=0;p<r;++p){const g=Jte(i.length*2).map(Math.random),m=Hvr(u,g,e);(!h||m.fx<h.fx)&&(h=m)}const d=h.x,f={};for(let p=0;p<n.length;++p){const g=n[p];f[g.sets[0]]={x:d[2*p]*o,y:d[2*p+1]*o,radius:Math.sqrt(g.size/Math.PI)}}if(e.history)for(const p of e.history)tre(p.x,o);return f}l(Yvr,"constrainedMDSLayout");function Uvr(t,e){const r=e&&e.lossFunction?e.lossFunction:gC,n={},a={};for(const f of t)if(f.sets.length===1){const p=f.sets[0];n[p]={x:1e10,y:1e10,rowid:n.length,size:f.size,radius:Math.sqrt(f.size/Math.PI)},a[p]=[]}t=t.filter(f=>f.sets.length===2);for(const f of t){let p=f.weight!=null?f.weight:1;const g=f.sets[0],m=f.sets[1];f.size+IGe>=Math.min(n[g].size,n[m].size)&&(p=0),a[g].push({set:m,size:f.size,weight:p}),a[m].push({set:g,size:f.size,weight:p})}const i=[];Object.keys(a).forEach(f=>{let p=0;for(let g=0;g<a[f].length;++g)p+=a[f][g].size*a[f][g].weight;i.push({set:f,size:p})});function s(f,p){return p.size-f.size}l(s,"sortOrder"),i.sort(s);const o={};function u(f){return f.set in o}l(u,"isPositioned");function h(f,p){n[p].x=f.x,n[p].y=f.y,o[p]=!0}l(h,"positionSet"),h({x:0,y:0},i[0].set);for(let f=1;f<i.length;++f){const p=i[f].set,g=a[p].filter(u),m=n[p];if(g.sort(s),g.length===0)throw"ERROR: missing pairwise overlap information";const y=[];for(var d=0;d<g.length;++d){const w=n[g[d].set],x=rre(m.radius,w.radius,g[d].size);y.push({x:w.x+x,y:w.y}),y.push({x:w.x-x,y:w.y}),y.push({y:w.y+x,x:w.x}),y.push({y:w.y-x,x:w.x});for(let T=d+1;T<g.length;++T){const C=n[g[T].set],S=rre(m.radius,C.radius,g[T].size),E=SGe({x:w.x,y:w.y,radius:x},{x:C.x,y:C.y,radius:S});y.push(...E)}}let v=1e50,b=y[0];for(const w of y){n[p].x=w.x,n[p].y=w.y;const x=r(n,t);x<v&&(v=x,b=w)}h(b,p)}return n}l(Uvr,"greedyLayout");function gC(t,e){let r=0;for(const n of e){if(n.sets.length===1)continue;let a;if(n.sets.length===2){const s=t[n.sets[0]],o=t[n.sets[1]];a=Qte(s.radius,o.radius,rc(s,o))}else a=ER(n.sets.map(s=>t[s]));const i=n.weight!=null?n.weight:1;r+=i*(a-n.size)*(a-n.size)}return r}l(gC,"lossFunction");function LGe(t,e){let r=0;for(const n of e){if(n.sets.length===1)continue;let a;if(n.sets.length===2){const o=t[n.sets[0]],u=t[n.sets[1]];a=Qte(o.radius,u.radius,rc(o,u))}else a=ER(n.sets.map(o=>t[o]));const i=n.weight!=null?n.weight:1,s=Math.log((a+1)/(n.size+1));r+=i*s*s}return r}l(LGe,"logRatioLossFunction");function jvr(t,e,r){if(r==null?t.sort((a,i)=>i.radius-a.radius):t.sort(r),t.length>0){const a=t[0].x,i=t[0].y;for(const s of t)s.x-=a,s.y-=i}if(t.length===2&&rc(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const a=Math.atan2(t[1].x,t[1].y)-e,i=Math.cos(a),s=Math.sin(a);for(const o of t){const u=o.x,h=o.y;o.x=i*u-s*h,o.y=s*u+i*h}}if(t.length>2){let a=Math.atan2(t[2].x,t[2].y)-e;for(;a<0;)a+=2*Math.PI;for(;a>2*Math.PI;)a-=2*Math.PI;if(a>Math.PI){const i=t[1].y/(1e-10+t[1].x);for(const s of t){var n=(s.x+i*s.y)/(1+i*i);s.x=2*n-s.x,s.y=2*n*i-s.y}}}}l(jvr,"orientateCircles");function Kvr(t){t.forEach(a=>{a.parent=a});function e(a){return a.parent!==a&&(a.parent=e(a.parent)),a.parent}l(e,"find");function r(a,i){const s=e(a),o=e(i);s.parent=o}l(r,"union");for(let a=0;a<t.length;++a)for(let i=a+1;i<t.length;++i){const s=t[a].radius+t[i].radius;rc(t[a],t[i])+1e-10<s&&r(t[i],t[a])}const n=new Map;for(let a=0;a<t.length;++a){const i=e(t[a]).parent.setid;n.has(i)||n.set(i,[]),n.get(i).push(t[a])}return t.forEach(a=>{delete a.parent}),Array.from(n.values())}l(Kvr,"disjointCluster");function nre(t){const e=l(r=>{const n=t.reduce((i,s)=>Math.max(i,s[r]+s.radius),Number.NEGATIVE_INFINITY),a=t.reduce((i,s)=>Math.min(i,s[r]-s.radius),Number.POSITIVE_INFINITY);return{max:n,min:a}},"minMax");return{xRange:e("x"),yRange:e("y")}}l(nre,"getBoundingBox");function $Ge(t,e,r){e==null&&(e=Math.PI/2);let n=RGe(t).map(h=>Object.assign({},h));const a=Kvr(n);for(const h of a){jvr(h,e,r);const d=nre(h);h.size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),h.bounds=d}a.sort((h,d)=>d.size-h.size),n=a[0];let i=n.bounds;const s=(i.xRange.max-i.xRange.min)/50;function o(h,d,f){if(!h)return;const p=h.bounds;let g,m;if(d)g=i.xRange.max-p.xRange.min+s;else{g=i.xRange.max-p.xRange.max;const y=(p.xRange.max-p.xRange.min)/2-(i.xRange.max-i.xRange.min)/2;y<0&&(g+=y)}if(f)m=i.yRange.max-p.yRange.min+s;else{m=i.yRange.max-p.yRange.max;const y=(p.yRange.max-p.yRange.min)/2-(i.yRange.max-i.yRange.min)/2;y<0&&(m+=y)}for(const y of h)y.x+=g,y.y+=m,n.push(y)}l(o,"addCluster");let u=1;for(;u<a.length;)o(a[u],!0,!1),o(a[u+1],!1,!0),o(a[u+2],!0,!0),u+=3,i=nre(n);return PGe(n)}l($Ge,"normalizeSolution");function MGe(t,e,r,n,a){const i=RGe(t);e-=2*n,r-=2*n;const{xRange:s,yRange:o}=nre(i);if(s.max===s.min||o.max===o.min)return console.log("not scaling solution: zero size detected"),t;let u,h;if(a){const g=Math.sqrt(a/Math.PI)*2;u=e/g,h=r/g}else u=e/(s.max-s.min),h=r/(o.max-o.min);const d=Math.min(h,u),f=(e-(s.max-s.min)*d)/2,p=(r-(o.max-o.min)*d)/2;return PGe(i.map(g=>({radius:d*g.radius,x:n+f+(g.x-s.min)*d,y:n+p+(g.y-o.min)*d,setid:g.setid})))}l(MGe,"scaleSolution");function PGe(t){const e={};for(const r of t)e[r.setid]=r;return e}l(PGe,"toObjectNotation");function RGe(t){return Object.keys(t).map(r=>Object.assign(t[r],{setid:r}))}l(RGe,"fromObjectNotation");function Xvr(t={}){let e=!1,r=600,n=350,a=15,i=1e3,s=Math.PI/2,o=!0,u=null,h=!0,d=!0,f=null,p=null,g=!1,m=null,y=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,v={},b=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,x=l(function(E){if(E in v)return v[E];var k=v[E]=b[w];return w+=1,w>=b.length&&(w=0),k},"colours"),T=NGe,C=gC;function S(E){let k=E.datum();const A=new Set;k.forEach(K=>{K.size==0&&K.sets.length==1&&A.add(K.sets[0])}),k=k.filter(K=>!K.sets.some(re=>A.has(re)));let I={},L={};if(k.length>0){let K=T(k,{lossFunction:C,distinct:g});o&&(K=$Ge(K,s,p)),I=MGe(K,r,n,a,u),L=DGe(I,k,y)}const R={};k.forEach(K=>{K.label&&(R[K.sets]=K.label)});function O(K){if(K.sets in R)return R[K.sets];if(K.sets.length==1)return""+K.sets[0]}l(O,"label"),E.selectAll("svg").data([I]).enter().append("svg");const M=E.select("svg");e?M.attr("viewBox",`0 0 ${r} ${n}`):M.attr("width",r).attr("height",n);const P={};let z=!1;M.selectAll(".venn-area path").each(function(K){const re=this.getAttribute("d");K.sets.length==1&&re&&!g&&(z=!0,P[K.sets[0]]=Jvr(re))});function D(K){return re=>{const Q=K.sets.map(te=>{let ee=P[te],J=I[te];return ee||(ee={x:r/2,y:n/2,radius:1}),J||(J={x:r/2,y:n/2,radius:1}),{x:ee.x*(1-re)+J.x*re,y:ee.y*(1-re)+J.y*re,radius:ee.radius*(1-re)+J.radius*re}});return zGe(Q,m)}}l(D,"pathTween");const B=M.selectAll(".venn-area").data(k,K=>K.sets),W=B.enter().append("g").attr("class",K=>`venn-area venn-${K.sets.length==1?"circle":"intersection"}${K.colour||K.color?" venn-coloured":""}`).attr("data-venn-sets",K=>K.sets.join("_")),U=W.append("path"),j=W.append("text").attr("class","label").text(K=>O(K)).attr("text-anchor","middle").attr("dy",".35em").attr("x",r/2).attr("y",n/2);d&&(U.style("fill-opacity","0").filter(K=>K.sets.length==1).style("fill",K=>K.colour?K.colour:K.color?K.color:x(K.sets)).style("fill-opacity",".25"),j.style("fill",K=>K.colour||K.color?"#FFF":t.textFill?t.textFill:K.sets.length==1?x(K.sets):"#444"));function V(K){return typeof K.transition=="function"?K.transition("venn").duration(i):K}l(V,"asTransition");let Y=E;z&&typeof Y.transition=="function"?(Y=V(E),Y.selectAll("path").attrTween("d",D)):Y.selectAll("path").attr("d",K=>zGe(K.sets.map(re=>I[re])),m);const H=Y.selectAll("text").filter(K=>K.sets in L).text(K=>O(K)).attr("x",K=>Math.floor(L[K.sets].x)).attr("y",K=>Math.floor(L[K.sets].y));h&&(z?"on"in H?H.on("end",are(I,O)):H.each("end",are(I,O)):H.each(are(I,O)));const q=V(B.exit()).remove();typeof B.transition=="function"&&q.selectAll("path").attrTween("d",D);const Z=q.selectAll("text").attr("x",r/2).attr("y",n/2);return f!==null&&(j.style("font-size","0px"),H.style("font-size",f),Z.style("font-size","0px")),{circles:I,textCentres:L,nodes:B,enter:W,update:Y,exit:q}}return l(S,"chart"),S.wrap=function(E){return arguments.length?(h=E,S):h},S.useViewBox=function(){return e=!0,S},S.width=function(E){return arguments.length?(r=E,S):r},S.height=function(E){return arguments.length?(n=E,S):n},S.padding=function(E){return arguments.length?(a=E,S):a},S.distinct=function(E){return arguments.length?(g=E,S):g},S.colours=function(E){return arguments.length?(x=E,S):x},S.colors=function(E){return arguments.length?(x=E,S):x},S.fontSize=function(E){return arguments.length?(f=E,S):f},S.round=function(E){return arguments.length?(m=E,S):m},S.duration=function(E){return arguments.length?(i=E,S):i},S.layoutFunction=function(E){return arguments.length?(T=E,S):T},S.normalize=function(E){return arguments.length?(o=E,S):o},S.scaleToFit=function(E){return arguments.length?(u=E,S):u},S.styled=function(E){return arguments.length?(d=E,S):d},S.orientation=function(E){return arguments.length?(s=E,S):s},S.orientationOrder=function(E){return arguments.length?(p=E,S):p},S.lossFunction=function(E){return arguments.length?(C=E==="default"?gC:E==="logRatio"?LGe:E,S):C},S}l(Xvr,"VennDiagram");function are(t,e){return function(r){const n=this,a=t[r.sets[0]].radius||50,i=e(r)||"",s=i.split(/\s+/).reverse(),u=(i.length+s.length)/3;let h=s.pop(),d=[h],f=0;const p=1.1;n.textContent=null;const g=[];function m(x){const T=n.ownerDocument.createElementNS(n.namespaceURI,"tspan");return T.textContent=x,g.push(T),n.append(T),T}l(m,"append");let y=m(h);for(;h=s.pop(),!!h;){d.push(h);const x=d.join(" ");y.textContent=x,x.length>u&&y.getComputedTextLength()>a&&(d.pop(),y.textContent=d.join(" "),d=[h],y=m(h),f++)}const v=.35-f*p/2,b=n.getAttribute("x"),w=n.getAttribute("y");g.forEach((x,T)=>{x.setAttribute("x",b),x.setAttribute("y",w),x.setAttribute("dy",`${v+T*p}em`)})}}l(are,"wrapText");function ire(t,e,r){let n=e[0].radius-rc(e[0],t);for(let a=1;a<e.length;++a){const i=e[a].radius-rc(e[a],t);i<=n&&(n=i)}for(let a=0;a<r.length;++a){const i=rc(r[a],t)-r[a].radius;i<=n&&(n=i)}return n}l(ire,"circleMargin");function OGe(t,e,r){const n=[];for(const d of t)n.push({x:d.x,y:d.y}),n.push({x:d.x+d.radius/2,y:d.y}),n.push({x:d.x-d.radius/2,y:d.y}),n.push({x:d.x,y:d.y+d.radius/2}),n.push({x:d.x,y:d.y-d.radius/2});let a=n[0],i=ire(n[0],t,e);for(let d=1;d<n.length;++d){const f=ire(n[d],t,e);f>=i&&(a=n[d],i=f)}const s=AGe(d=>-1*ire({x:d[0],y:d[1]},t,e),[a.x,a.y],{maxIterations:500,minErrorDelta:1e-10}).x,o={x:r?0:s[0],y:s[1]};let u=!0;for(const d of t)if(rc(o,d)>d.radius){u=!1;break}for(const d of e)if(rc(o,d)<d.radius){u=!1;break}if(u)return o;if(t.length==1)return{x:t[0].x,y:t[0].y};const h={};return ER(t,h),h.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:h.arcs.length==1?{x:h.arcs[0].circle.x,y:h.arcs[0].circle.y}:e.length?OGe(t,[]):_Ge(h.arcs.map(d=>d.p1))}l(OGe,"computeTextCentre");function Zvr(t){const e={},r=Object.keys(t);for(const n of r)e[n]=[];for(let n=0;n<r.length;n++){const a=r[n],i=t[a];for(let s=n+1;s<r.length;++s){const o=r[s],u=t[o],h=rc(i,u);h+u.radius<=i.radius+1e-10?e[o].push(a):h+i.radius<=u.radius+1e-10&&e[a].push(o)}}return e}l(Zvr,"getOverlappingCircles");function DGe(t,e,r){const n={},a=Zvr(t);for(let i=0;i<e.length;++i){const s=e[i].sets,o={},u={};for(let p=0;p<s.length;++p){o[s[p]]=!0;const g=a[s[p]];for(let m=0;m<g.length;++m)u[g[m]]=!0}const h=[],d=[];for(let p in t)p in o?h.push(t[p]):p in u||d.push(t[p]);const f=OGe(h,d,r);n[s]=f,f.disjoint&&e[i].size>0&&console.log("WARNING: area "+s+" not represented on screen")}return n}l(DGe,"computeTextCentres");function Qvr(t,e,r){const n=[];return n.push(`
|
||
M`,t,e),n.push(`
|
||
m`,-r,0),n.push(`
|
||
a`,r,r,0,1,0,r*2,0),n.push(`
|
||
a`,r,r,0,1,0,-r*2,0),n.join(" ")}l(Qvr,"circlePath");function Jvr(t){const e=t.split(" ");return{x:Number.parseFloat(e[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])}}l(Jvr,"circleFromPath");function FGe(t){if(t.length===0)return[];const e={};return ER(t,e),e.arcs}l(FGe,"intersectionAreaArcs");function BGe(t,e){if(t.length===0)return"M 0 0";const r=Math.pow(10,e||0),n=e!=null?i=>Math.round(i*r)/r:i=>i;if(t.length==1){const i=t[0].circle;return Qvr(n(i.x),n(i.y),n(i.radius))}const a=[`
|
||
M`,n(t[0].p2.x),n(t[0].p2.y)];for(const i of t){const s=n(i.circle.radius);a.push(`
|
||
A`,s,s,0,i.large?1:0,i.sweep?1:0,n(i.p1.x),n(i.p1.y))}return a.join(" ")}l(BGe,"arcsToPath");function zGe(t,e){return BGe(FGe(t),e)}l(zGe,"intersectionAreaPath");function e2r(t,e={}){const{lossFunction:r,layoutFunction:n=NGe,normalize:a=!0,orientation:i=Math.PI/2,orientationOrder:s,width:o=600,height:u=350,padding:h=15,scaleToFit:d=!1,symmetricalTextCentre:f=!1,distinct:p,round:g=2}=e;let m=n(t,{lossFunction:r==="default"||!r?gC:r==="logRatio"?LGe:r,distinct:p});a&&(m=$Ge(m,i,s));const y=MGe(m,o,u,h,d),v=DGe(y,t,f),b=new Map(Object.keys(y).map(T=>[T,{set:T,x:y[T].x,y:y[T].y,radius:y[T].radius}])),w=t.map(T=>{const C=T.sets.map(k=>b.get(k)),S=FGe(C),E=BGe(S,g);return{circles:C,arcs:S,path:E,area:T,has:new Set(T.sets)}});function x(T){let C="";for(const S of w)S.has.size>T.length&&T.every(E=>S.has.has(E))&&(C+=" "+S.path);return C}return l(x,"genDistinctPath"),w.map(({circles:T,arcs:C,path:S,area:E})=>({data:E,text:v[E.sets],circles:T,arcs:C,path:S,distinctPath:S+x(E.sets)}))}l(e2r,"layout");var sre=function(){var t=_(function(w,x,T,C){for(T=T||{},C=w.length;C--;T[w[C]]=x);return T},"o"),e=[5,8],r=[7,8,11,12,17,19,22,24],n=[1,17],a=[1,18],i=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],o=[1,39],u=[7,8,11,12,17,19,22,24,27],h=[1,57],d=[1,56],f=[1,58],p=[1,59],g=[1,60],m=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],y={trace:_(l(function(){},"trace"),"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:_(l(function(x,T,C,S,E,k,A){var I=k.length-1;switch(E){case 1:return k[I-1];case 2:case 3:case 4:this.$=[];break;case 5:k[I-1].push(k[I]),this.$=k[I-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=k[I];break;case 8:S.setDiagramTitle(k[I].substr(6)),this.$=k[I].substr(6);break;case 9:S.addSubsetData([k[I]],void 0,void 0),S.setIndentMode&&S.setIndentMode(!0);break;case 10:S.addSubsetData([k[I-1]],k[I],void 0),S.setIndentMode&&S.setIndentMode(!0);break;case 11:S.addSubsetData([k[I-2]],void 0,parseFloat(k[I])),S.setIndentMode&&S.setIndentMode(!0);break;case 12:S.addSubsetData([k[I-3]],k[I-2],parseFloat(k[I])),S.setIndentMode&&S.setIndentMode(!0);break;case 13:if(k[I].length<2)throw new Error("union requires multiple identifiers");S.validateUnionIdentifiers&&S.validateUnionIdentifiers(k[I]),S.addSubsetData(k[I],void 0,void 0),S.setIndentMode&&S.setIndentMode(!0);break;case 14:if(k[I-1].length<2)throw new Error("union requires multiple identifiers");S.validateUnionIdentifiers&&S.validateUnionIdentifiers(k[I-1]),S.addSubsetData(k[I-1],k[I],void 0),S.setIndentMode&&S.setIndentMode(!0);break;case 15:if(k[I-2].length<2)throw new Error("union requires multiple identifiers");S.validateUnionIdentifiers&&S.validateUnionIdentifiers(k[I-2]),S.addSubsetData(k[I-2],void 0,parseFloat(k[I])),S.setIndentMode&&S.setIndentMode(!0);break;case 16:if(k[I-3].length<2)throw new Error("union requires multiple identifiers");S.validateUnionIdentifiers&&S.validateUnionIdentifiers(k[I-3]),S.addSubsetData(k[I-3],k[I-2],parseFloat(k[I])),S.setIndentMode&&S.setIndentMode(!0);break;case 17:case 18:case 19:S.addTextData(k[I-1],k[I],void 0);break;case 20:case 21:S.addTextData(k[I-2],k[I-1],k[I]);break;case 23:S.addStyleData(k[I-1],k[I]);break;case 24:case 25:case 26:var L=S.getCurrentSets();if(!L)throw new Error("text requires set");S.addTextData(L,k[I],void 0);break;case 27:case 28:var L=S.getCurrentSets();if(!L)throw new Error("text requires set");S.addTextData(L,k[I-1],k[I]);break;case 29:case 41:this.$=[k[I]];break;case 30:case 42:this.$=[...k[I-2],k[I]];break;case 31:this.$=[k[I-2],k[I]];break;case 33:this.$=k[I].join(" ");break;case 34:this.$=[k[I]];break;case 35:k[I-1].push(k[I]),this.$=k[I-1];break;case 43:case 44:this.$=k[I];break}},"anonymous"),"anonymous"),table:[t(e,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(r,[2,4],{6:5}),t(e,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(r,[2,5]),t(r,[2,6]),t(r,[2,7]),t(r,[2,8]),{13:16,20:n,21:a},{13:20,18:19,20:n,21:a},{13:20,18:21,20:n,21:a},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:a},t(r,[2,9],{14:[1,27],15:[1,28]}),t(i,[2,43]),t(i,[2,44]),t(r,[2,13],{14:[1,29],15:[1,30],27:s}),t(i,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},t(r,[2,22]),t(r,[2,24],{14:[1,35]}),t(r,[2,25],{14:[1,36]}),t(r,[2,26]),{20:o,25:37,26:38,27:s},t(r,[2,10],{15:[1,40]}),{16:[1,41]},t(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:a},t(r,[2,17],{14:[1,45]}),t(r,[2,18],{14:[1,46]}),t(r,[2,19]),t(r,[2,27]),t(r,[2,28]),t(r,[2,23],{27:[1,47]}),t(u,[2,29]),{15:[1,48]},{16:[1,49]},t(r,[2,11]),{16:[1,50]},t(r,[2,15]),t(i,[2,42]),t(r,[2,20]),t(r,[2,21]),{20:o,26:51},{16:h,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:g},t(r,[2,12]),t(r,[2,16]),t(u,[2,30]),t(u,[2,31]),t(u,[2,32]),t(u,[2,33],{30:61,16:h,20:d,31:f,32:p,33:g}),t(m,[2,34]),t(m,[2,36]),t(m,[2,37]),t(m,[2,38]),t(m,[2,39]),t(m,[2,40]),t(m,[2,35])],defaultActions:{6:[2,1]},parseError:_(l(function(x,T){if(T.recoverable)this.trace(x);else{var C=new Error(x);throw C.hash=T,C}},"parseError"),"parseError"),parse:_(l(function(x){var T=this,C=[0],S=[],E=[null],k=[],A=this.table,I="",L=0,R=0,O=2,M=1,P=k.slice.call(arguments,1),z=Object.create(this.lexer),D={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(D.yy[B]=this.yy[B]);z.setInput(x,D.yy),D.yy.lexer=z,D.yy.parser=this,typeof z.yylloc=="undefined"&&(z.yylloc={});var W=z.yylloc;k.push(W);var U=z.options&&z.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(ae){C.length=C.length-2*ae,E.length=E.length-ae,k.length=k.length-ae}l(j,"popStack"),_(j,"popStack");function V(){var ae;return ae=S.pop()||z.lex()||M,typeof ae!="number"&&(ae instanceof Array&&(S=ae,ae=S.pop()),ae=T.symbols_[ae]||ae),ae}l(V,"lex"),_(V,"lex");for(var Y,H,q,Z,K={},re,Q,te,ee;;){if(H=C[C.length-1],this.defaultActions[H]?q=this.defaultActions[H]:((Y===null||typeof Y=="undefined")&&(Y=V()),q=A[H]&&A[H][Y]),typeof q=="undefined"||!q.length||!q[0]){var J="";ee=[];for(re in A[H])this.terminals_[re]&&re>O&&ee.push("'"+this.terminals_[re]+"'");z.showPosition?J="Parse error on line "+(L+1)+`:
|
||
`+z.showPosition()+`
|
||
Expecting `+ee.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":J="Parse error on line "+(L+1)+": Unexpected "+(Y==M?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(J,{text:z.match,token:this.terminals_[Y]||Y,line:z.yylineno,loc:W,expected:ee})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+Y);switch(q[0]){case 1:C.push(Y),E.push(z.yytext),k.push(z.yylloc),C.push(q[1]),Y=null,R=z.yyleng,I=z.yytext,L=z.yylineno,W=z.yylloc;break;case 2:if(Q=this.productions_[q[1]][1],K.$=E[E.length-Q],K._$={first_line:k[k.length-(Q||1)].first_line,last_line:k[k.length-1].last_line,first_column:k[k.length-(Q||1)].first_column,last_column:k[k.length-1].last_column},U&&(K._$.range=[k[k.length-(Q||1)].range[0],k[k.length-1].range[1]]),Z=this.performAction.apply(K,[I,R,L,D.yy,q[1],E,k].concat(P)),typeof Z!="undefined")return Z;Q&&(C=C.slice(0,-1*Q*2),E=E.slice(0,-1*Q),k=k.slice(0,-1*Q)),C.push(this.productions_[q[1]][0]),E.push(K.$),k.push(K._$),te=A[C[C.length-2]][C[C.length-1]],C.push(te);break;case 3:return!0}}return!0},"parse"),"parse")},v=function(){var w={EOF:1,parseError:_(l(function(T,C){if(this.yy.parser)this.yy.parser.parseError(T,C);else throw new Error(T)},"parseError"),"parseError"),setInput:_(function(x,T){return this.yy=T||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:_(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var T=x.match(/(?:\r\n?|\n).*/g);return T?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:_(function(x){var T=x.length,C=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),C.length-1&&(this.yylineno-=C.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:C?(C.length===S.length?this.yylloc.first_column:0)+S[S.length-C.length].length-C[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-T]),this.yyleng=this.yytext.length,this},"unput"),more:_(function(){return this._more=!0,this},"more"),reject:_(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:_(function(x){this.unput(this.match.slice(x))},"less"),pastInput:_(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:_(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:_(function(){var x=this.pastInput(),T=new Array(x.length+1).join("-");return x+this.upcomingInput()+`
|
||
`+T+"^"},"showPosition"),test_match:_(function(x,T){var C,S,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),S=x[0].match(/(?:\r\n?|\n).*/g),S&&(this.yylineno+=S.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:S?S[S.length-1].length-S[S.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],C=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var k in E)this[k]=E[k];return!1}return!1},"test_match"),next:_(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,T,C,S;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),k=0;k<E.length;k++)if(C=this._input.match(this.rules[E[k]]),C&&(!T||C[0].length>T[0].length)){if(T=C,S=k,this.options.backtrack_lexer){if(x=this.test_match(C,E[k]),x!==!1)return x;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(x=this.test_match(T,E[S]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:_(l(function(){var T=this.next();return T||this.lex()},"lex"),"lex"),begin:_(l(function(T){this.conditionStack.push(T)},"begin"),"begin"),popState:_(l(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),"popState"),_currentRules:_(l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),"_currentRules"),topState:_(l(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),"topState"),pushState:_(l(function(T){this.begin(T)},"pushState"),"pushState"),stateStackSize:_(l(function(){return this.conditionStack.length},"stateStackSize"),"stateStackSize"),options:{"case-insensitive":!0},performAction:_(l(function(T,C,S,E){switch(S){case 0:break;case 1:break;case 2:break;case 3:if(T.getIndentMode&&T.getIndentMode())return T.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:T.setIndentMode&&T.setIndentMode(!1),this.begin("INITIAL"),this.unput(C.yytext);break;case 6:return this.begin("bol"),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(T.consumeIndentText)T.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return C.yytext=C.yytext.slice(2,-2),14;case 17:return C.yytext=C.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return w}();y.lexer=v;function b(){this.yy={}}return l(b,"Parser"),_(b,"Parser"),b.prototype=y,y.Parser=b,new b}();sre.parser=sre;var t2r=sre,ore=[],lre=[],cre=[],ure=new Set,hre,dre=!1,r2r=_((t,e,r)=>{const n=CR(t).sort(),a=r!=null?r:10/Math.pow(t.length,2);hre=n,n.length===1&&ure.add(n[0]),ore.push({sets:n,size:a,label:e?Lk(e):void 0})},"addSubsetData"),n2r=_(()=>ore,"getSubsetData"),Lk=_(t=>{const e=t.trim();return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e},"normalizeText"),a2r=_(t=>t&&Lk(t),"normalizeStyleValue"),i2r=_((t,e,r)=>{const n=Lk(e);lre.push({sets:CR(t).sort(),id:n,label:r?Lk(r):void 0})},"addTextData"),s2r=_((t,e)=>{var a;const r=CR(t).sort(),n={};for(const[i,s]of e)n[i]=(a=a2r(s))!=null?a:s;cre.push({targets:r,styles:n})},"addStyleData"),o2r=_(()=>cre,"getStyleData"),CR=_(t=>t.map(e=>Lk(e)),"normalizeIdentifierList"),l2r=_(t=>{const r=CR(t).filter(n=>!ure.has(n));if(r.length>0)throw new Error(`unknown set identifier: ${r.join(", ")}`)},"validateUnionIdentifiers"),c2r=_(()=>lre,"getTextData"),u2r=_(()=>hre,"getCurrentSets"),h2r=_(()=>dre,"getIndentMode"),d2r=_(t=>{dre=t},"setIndentMode"),f2r=hn.venn;function HGe(){return Ga(f2r,Ar().venn)}l(HGe,"getConfig2$1"),_(HGe,"getConfig");var p2r=_(()=>{Ca(),ore.length=0,lre.length=0,cre.length=0,ure.clear(),hre=void 0,dre=!1},"customClear"),g2r={getConfig:HGe,clear:p2r,setAccTitle:Na,getAccTitle:za,setDiagramTitle:Va,getDiagramTitle:Ia,getAccDescription:Wa,setAccDescription:Ha,addSubsetData:r2r,getSubsetData:n2r,addTextData:i2r,addStyleData:s2r,validateUnionIdentifiers:l2r,getTextData:c2r,getStyleData:o2r,getCurrentSets:u2r,getIndentMode:h2r,setIndentMode:d2r},m2r=_(t=>`
|
||
.venn-title {
|
||
font-size: 32px;
|
||
fill: ${t.vennTitleTextColor};
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
.venn-circle text {
|
||
font-size: 48px;
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
.venn-intersection text {
|
||
font-size: 48px;
|
||
fill: ${t.vennSetTextColor};
|
||
font-family: ${t.fontFamily};
|
||
}
|
||
|
||
.venn-text-node {
|
||
font-family: ${t.fontFamily};
|
||
color: ${t.vennSetTextColor};
|
||
}
|
||
`,"getStyles"),y2r=m2r;function WGe(t){const e=new Map;for(const r of t){const n=r.targets.join("|"),a=e.get(n);a?Object.assign(a,r.styles):e.set(n,X({},r.styles))}return e}l(WGe,"buildStyleByKey"),_(WGe,"buildStyleByKey");var v2r=_((t,e,r,n)=>{var P,z,D,B,W,U,j,V;const a=n.db,i=(P=a.getConfig)==null?void 0:P.call(a),{themeVariables:s,look:o,handDrawnSeed:u}=Ar(),h=o==="handDrawn",d=[s.venn1,s.venn2,s.venn3,s.venn4,s.venn5,s.venn6,s.venn7,s.venn8].filter(Boolean),f=(z=a.getDiagramTitle)==null?void 0:z.call(a),p=a.getSubsetData(),g=a.getTextData(),m=WGe(a.getStyleData()),y=GGe(p),v=(D=i==null?void 0:i.width)!=null?D:800,b=(B=i==null?void 0:i.height)!=null?B:450,x=v/1600,T=f?48*x:0,C=(W=s.primaryTextColor)!=null?W:s.textColor,S=$o(e);S.attr("viewBox",`0 0 ${v} ${b}`),f&&S.append("text").text(f).attr("class","venn-title").attr("font-size",`${32*x}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*x).style("fill",s.vennTitleTextColor||s.titleColor);const E=Yt(document.createElement("div")),k=Xvr().width(v).height(b-T);E.datum(y).call(k);const A=h?Sr.svg(E.select("svg").node()):void 0,I=e2r(y,{width:v,height:b-T,padding:(U=i==null?void 0:i.padding)!=null?U:15}),L=new Map;for(const Y of I){const H=og([...Y.data.sets].sort());L.set(H,Y)}g.length>0&&VGe(i,L,E,g,x,m);const R=Ko(s.background||"#f4f4f4");E.selectAll(".venn-circle").each(function(Y,H){var se,fe;const q=Yt(this),K=og([...Y.sets].sort()),re=m.get(K),Q=(re==null?void 0:re.fill)||d[H%d.length]||s.primaryColor;q.classed(`venn-set-${H%8}`,!0);const te=(se=re==null?void 0:re["fill-opacity"])!=null?se:.1,ee=(re==null?void 0:re.stroke)||Q,J=(re==null?void 0:re["stroke-width"])||`${5*x}`;if(h&&A){const ve=L.get(K);if(ve&&ve.circles.length>0){const de=ve.circles[0],Ee=A.circle(de.x,de.y,de.radius*2,{roughness:.7,seed:u,fill:_ge(Q,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+H*60,stroke:ee,strokeWidth:parseFloat(String(J))});q.select("path").remove(),(fe=q.node())==null||fe.insertBefore(Ee,q.select("text").node())}}else q.select("path").style("fill",Q).style("fill-opacity",te).style("stroke",ee).style("stroke-width",J).style("stroke-opacity",.95);const ae=(re==null?void 0:re.color)||(R?Wt(Q,30):Vt(Q,30));q.select("text").style("font-size",`${48*x}px`).style("fill",ae)}),h&&A?E.selectAll(".venn-intersection").each(function(Y){var Q,te,ee;const H=Yt(this),Z=og([...Y.sets].sort()),K=m.get(Z),re=K==null?void 0:K.fill;if(re){const J=H.select("path"),ae=J.attr("d");if(ae){const se=A.path(ae,{roughness:.7,seed:u,fill:_ge(re,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),fe=J.node();(Q=fe==null?void 0:fe.parentNode)==null||Q.insertBefore(se,fe),J.remove()}}else H.select("path").style("fill-opacity",0);H.select("text").style("font-size",`${48*x}px`).style("fill",(ee=(te=K==null?void 0:K.color)!=null?te:s.vennSetTextColor)!=null?ee:C)}):(E.selectAll(".venn-intersection text").style("font-size",`${48*x}px`).style("fill",Y=>{var Z,K,re;const q=og([...Y.sets].sort());return(re=(K=(Z=m.get(q))==null?void 0:Z.color)!=null?K:s.vennSetTextColor)!=null?re:C}),E.selectAll(".venn-intersection path").style("fill-opacity",Y=>{var Z;const q=og([...Y.sets].sort());return(Z=m.get(q))!=null&&Z.fill?1:0}).style("fill",Y=>{var Z,K;const q=og([...Y.sets].sort());return(K=(Z=m.get(q))==null?void 0:Z.fill)!=null?K:"transparent"}));const O=S.append("g").attr("transform",`translate(0, ${T})`),M=E.select("svg").node();if(M&&"childNodes"in M)for(const Y of[...M.childNodes])(j=O.node())==null||j.appendChild(Y);yi(S,b,v,(V=i==null?void 0:i.useMaxWidth)!=null?V:!0)},"draw");function og(t){return t.join("|")}l(og,"stableSetsKey"),_(og,"stableSetsKey");function VGe(t,e,r,n,a,i){var d,f,p;const s=(d=t==null?void 0:t.useDebugLayout)!=null?d:!1,u=r.select("svg").append("g").attr("class","venn-text-nodes"),h=new Map;for(const g of n){const m=og(g.sets),y=h.get(m);y?y.push(g):h.set(m,[g])}for(const[g,m]of h.entries()){const y=e.get(g);if(!(y!=null&&y.text))continue;const v=y.text.x,b=y.text.y,w=Math.min(...y.circles.map(D=>D.radius)),x=Math.min(...y.circles.map(D=>D.radius-Math.hypot(v-D.x,b-D.y)));let T=Number.isFinite(x)?Math.max(0,x):0;T===0&&Number.isFinite(w)&&(T=w*.6);const C=u.append("g").attr("class","venn-text-area").attr("font-size",`${40*a}px`);s&&C.append("circle").attr("class","venn-text-debug-circle").attr("cx",v).attr("cy",b).attr("r",T).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*a).attr("stroke-dasharray",`${6*a} ${4*a}`);const S=Math.max(80*a,T*2*.95),E=Math.max(60*a,T*2*.95),I=(y.data.label&&y.data.label.length>0?Math.min(32*a,T*.25):0)+(m.length<=2?30*a:0),L=v-S/2,R=b-E/2+I,O=Math.max(1,Math.ceil(Math.sqrt(m.length))),M=Math.max(1,Math.ceil(m.length/O)),P=S/O,z=E/M;for(const[D,B]of m.entries()){const W=D%O,U=Math.floor(D/O),j=L+P*(W+.5),V=R+z*(U+.5);s&&C.append("rect").attr("class","venn-text-debug-cell").attr("x",L+P*W).attr("y",R+z*U).attr("width",P).attr("height",z).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*a).attr("stroke-dasharray",`${4*a} ${3*a}`);const Y=P*.9,H=z*.9,q=C.append("foreignObject").attr("class","venn-text-node-fo").attr("width",Y).attr("height",H).attr("x",j-Y/2).attr("y",V-H/2).attr("overflow","visible"),Z=(f=i.get(B.id))==null?void 0:f.color,K=q.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text((p=B.label)!=null?p:B.id);Z&&K.style("color",Z)}}}l(VGe,"renderTextNodes"),_(VGe,"renderTextNodes");function GGe(t){const e=new Set(t.map(a=>[...a.sets].sort().join("|"))),r=new Map(t.filter(a=>a.sets.length===1&&a.size!==void 0).map(a=>[a.sets[0],a.size])),n=[];for(const a of t){if(a.sets.length<3)continue;const i=[...a.sets].sort();for(let s=0;s<i.length-1;s++)for(let o=s+1;o<i.length;o++){const u=[i[s],i[o]],h=u.join("|");if(!e.has(h)){e.add(h);const d=r.get(u[0]),f=r.get(u[1]),p=d!==void 0&&f!==void 0?Math.min(d,f)/4:2.5;n.push({sets:u,size:p,label:""})}}}return n.length>0?[...t,...n]:t}l(GGe,"ensurePairwiseSubsets"),_(GGe,"ensurePairwiseSubsets");var b2r={draw:v2r},x2r={parser:t2r,db:g2r,renderer:b2r,styles:y2r},w2r=Object.freeze({__proto__:null,diagram:x2r}),qGe=(sx=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=Na,this.getAccTitle=za,this.setDiagramTitle=Va,this.getDiagramTitle=Ia,this.getAccDescription=Wa,this.setAccDescription=Ha}getNodes(){return this.nodes}getConfig(){var n;const e=hn,r=Ar();return Ga(X(X({},e.treemap),(n=r.treemap)!=null?n:{}))}addNode(e,r){var n;this.nodes.push(e),this.levels.set(e,r),r===0&&(this.outerNodes.push(e),(n=this.root)!=null||(this.root=e))}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,r){var i;const n=(i=this.classes.get(e))!=null?i:{id:e,styles:[],textStyles:[]},a=r.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");a&&a.forEach(s=>{tW(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){var r,n;return(n=(r=this.classes.get(e))==null?void 0:r.styles)!=null?n:[]}clear(){Ca(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},l(sx,"TreeMapDB"),_(sx,"TreeMapDB"),sx);function YGe(t){if(!t.length)return[];const e=[],r=[];return t.forEach(n=>{const a={name:n.name,children:n.type==="Leaf"?void 0:[]};for(a.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(a.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(a.value=n.value);r.length>0&&r[r.length-1].level>=n.level;)r.pop();if(r.length===0)e.push(a);else{const i=r[r.length-1].node;i.children?i.children.push(a):i.children=[a]}n.type!=="Leaf"&&r.push({node:a,level:n.level})}),e}l(YGe,"buildHierarchy"),_(YGe,"buildHierarchy");var T2r=_((t,e)=>{var i,s,o,u;hl(t,e);const r=[];for(const h of(i=t.TreemapRows)!=null?i:[])h.$type==="ClassDefStatement"&&e.addClass((s=h.className)!=null?s:"",(o=h.styleText)!=null?o:"");for(const h of(u=t.TreemapRows)!=null?u:[]){const d=h.item;if(!d)continue;const f=h.indent?parseInt(h.indent):0,p=E2r(d),g=d.classSelector?e.getStylesForClass(d.classSelector):[],m=g.length>0?g:void 0,y={level:f,name:p,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:m};r.push(y)}const n=YGe(r),a=_((h,d)=>{for(const f of h)e.addNode(f,d),f.children&&f.children.length>0&&a(f.children,d+1)},"addNodesRecursively");a(n,0)},"populate"),E2r=_(t=>t.name?String(t.name):"","getItemName"),UGe={parser:{yy:void 0},parse:_(t=>nt(this,null,function*(){var e;try{const n=yield pu("treemap",t);Le.debug("Treemap AST:",n);const a=(e=UGe.parser)==null?void 0:e.yy;if(!(a instanceof qGe))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");T2r(n,a)}catch(r){throw Le.error("Error parsing treemap:",r),r}}),"parse")},C2r=10,mC=10,$k=25,S2r=_((t,e,r,n)=>{var V,Y;const a=n.db,i=a.getConfig(),s=(V=i.padding)!=null?V:C2r,o=a.getDiagramTitle(),u=a.getRoot(),{themeVariables:h}=Ar();if(!u)return;const d=o?30:0,f=$o(e),p=i.nodeWidth?i.nodeWidth*mC:960,g=i.nodeHeight?i.nodeHeight*mC:500,m=p,y=g+d;f.attr("viewBox",`0 0 ${m} ${y}`),yi(f,y,m,i.useMaxWidth);let v;try{const H=i.valueFormat||",";if(H==="$0,0")v=_(q=>"$"+dm(",")(q),"valueFormat");else if(H.startsWith("$")&&H.includes(",")){const q=/\.\d+/.exec(H),Z=q?q[0]:"";v=_(K=>"$"+dm(","+Z)(K),"valueFormat")}else if(H.startsWith("$")){const q=H.substring(1);v=_(Z=>"$"+dm(q||"")(Z),"valueFormat")}else v=dm(H)}catch(H){Le.error("Error creating format function:",H),v=dm(",")}const b=fm().range(["transparent",h.cScale0,h.cScale1,h.cScale2,h.cScale3,h.cScale4,h.cScale5,h.cScale6,h.cScale7,h.cScale8,h.cScale9,h.cScale10,h.cScale11]),w=fm().range(["transparent",h.cScalePeer0,h.cScalePeer1,h.cScalePeer2,h.cScalePeer3,h.cScalePeer4,h.cScalePeer5,h.cScalePeer6,h.cScalePeer7,h.cScalePeer8,h.cScalePeer9,h.cScalePeer10,h.cScalePeer11]),x=fm().range([h.cScaleLabel0,h.cScaleLabel1,h.cScaleLabel2,h.cScaleLabel3,h.cScaleLabel4,h.cScaleLabel5,h.cScaleLabel6,h.cScaleLabel7,h.cScaleLabel8,h.cScaleLabel9,h.cScaleLabel10,h.cScaleLabel11]);o&&f.append("text").attr("x",m/2).attr("y",d/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(o);const T=f.append("g").attr("transform",`translate(0, ${d})`).attr("class","treemapContainer"),C=gH(u).sum(H=>{var q;return(q=H.value)!=null?q:0}).sort((H,q)=>{var Z,K;return((Z=q.value)!=null?Z:0)-((K=H.value)!=null?K:0)}),E=c_t().size([p,g]).paddingTop(H=>H.children&&H.children.length>0?$k+mC:0).paddingInner(s).paddingLeft(H=>H.children&&H.children.length>0?mC:0).paddingRight(H=>H.children&&H.children.length>0?mC:0).paddingBottom(H=>H.children&&H.children.length>0?mC:0).round(!0)(C),k=E.descendants().filter(H=>H.children&&H.children.length>0),A=T.selectAll(".treemapSection").data(k).enter().append("g").attr("class","treemapSection").attr("transform",H=>`translate(${H.x0},${H.y0})`);A.append("rect").attr("width",H=>H.x1-H.x0).attr("height",$k).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",H=>H.depth===0?"display: none;":""),A.append("clipPath").attr("id",(H,q)=>`clip-section-${e}-${q}`).append("rect").attr("width",H=>Math.max(0,H.x1-H.x0-12)).attr("height",$k),A.append("rect").attr("width",H=>H.x1-H.x0).attr("height",H=>H.y1-H.y0).attr("class",(H,q)=>`treemapSection section${q}`).attr("fill",H=>b(H.data.name)).attr("fill-opacity",.6).attr("stroke",H=>w(H.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",H=>{if(H.depth===0)return"display: none;";const q=Er({cssCompiledStyles:H.data.cssCompiledStyles});return q.nodeStyles+";"+q.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",$k/2).attr("dominant-baseline","middle").text(H=>H.depth===0?"":H.data.name).attr("font-weight","bold").attr("clip-path",(H,q)=>`url(#clip-section-${e}-${q})`).attr("style",H=>{if(H.depth===0)return"display: none;";const q="dominant-baseline: middle; font-size: 12px; fill:"+x(H.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",Z=Er({cssCompiledStyles:H.data.cssCompiledStyles});return q+Z.labelStyles.replace("color:","fill:")}).each(function(H){if(H.depth===0)return;const q=Yt(this),Z=H.data.name;q.text(Z);const K=H.x1-H.x0,re=6;let Q;i.showValues!==!1&&H.value?Q=K-10-30-10-re:Q=K-re-6;const ee=Math.max(15,Q),J=q.node();if(J.getComputedTextLength()>ee){const se="...";let fe=Z;for(;fe.length>0;){if(fe=Z.substring(0,fe.length-1),fe.length===0){q.text(se),J.getComputedTextLength()>ee&&q.text("");break}if(q.text(fe+se),J.getComputedTextLength()<=ee)break}}}),i.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",H=>H.x1-H.x0-10).attr("y",$k/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(H=>H.value?v(H.value):"").attr("font-style","italic").attr("style",H=>{if(H.depth===0)return"display: none;";const q="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+x(H.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",Z=Er({cssCompiledStyles:H.data.cssCompiledStyles});return q+Z.labelStyles.replace("color:","fill:")});const I=E.leaves(),L=I.length>20,R=L?16:38,O=L?14:28,M=L?4:8,P=L?4:6,z=L?2:4,D=L?8:10,B=L?1:2,W=T.selectAll(".treemapLeafGroup").data(I).enter().append("g").attr("class",(H,q)=>`treemapNode treemapLeafGroup leaf${q}${H.data.classSelector?` ${H.data.classSelector}`:""}x`).attr("transform",H=>`translate(${H.x0},${H.y0})`);W.append("rect").attr("width",H=>H.x1-H.x0).attr("height",H=>H.y1-H.y0).attr("class","treemapLeaf").attr("fill",H=>H.parent?b(H.parent.data.name):b(H.data.name)).attr("style",H=>Er({cssCompiledStyles:H.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",H=>H.parent?b(H.parent.data.name):b(H.data.name)).attr("stroke-width",3),W.append("clipPath").attr("id",(H,q)=>`clip-${e}-${q}`).append("rect").attr("width",H=>Math.max(0,H.x1-H.x0-4)).attr("height",H=>Math.max(0,H.y1-H.y0-4)),W.append("text").attr("class","treemapLabel").attr("x",H=>(H.x1-H.x0)/2).attr("y",H=>(H.y1-H.y0)/2).attr("style",H=>{const q=`text-anchor: middle; dominant-baseline: middle; font-size: ${R}px;fill:`+x(H.data.name)+";",Z=Er({cssCompiledStyles:H.data.cssCompiledStyles});return q+Z.labelStyles.replace("color:","fill:")}).attr("clip-path",(H,q)=>`url(#clip-${e}-${q})`).text(H=>H.data.name).each(function(H){const q=Yt(this),Z=H.x1-H.x0,K=H.y1-H.y0,re=q.node(),Q=Z-2*z,te=K-2*z;if(Q<D||te<D){q.style("display","none");return}let ee=parseInt(q.style("font-size"),10);const J=.6;for(;re.getComputedTextLength()>Q&&ee>M;)ee--,q.style("font-size",`${ee}px`);let ae=Math.max(P,Math.min(O,Math.round(ee*J))),se=ee+B+ae;for(;se>te&&ee>M&&(ee--,ae=Math.max(P,Math.min(O,Math.round(ee*J))),!(ae<P&&ee===M));)q.style("font-size",`${ee}px`),se=ee+B+ae;q.style("font-size",`${ee}px`),L?(ee<M||te<M)&&q.style("display","none"):(re.getComputedTextLength()>Q||ee<M||te<ee)&&q.style("display","none")}),i.showValues!==!1&&W.append("text").attr("class","treemapValue").attr("x",q=>(q.x1-q.x0)/2).attr("y",function(q){return(q.y1-q.y0)/2}).attr("style",q=>{const Z=`text-anchor: middle; dominant-baseline: hanging; font-size: ${O}px;fill:`+x(q.data.name)+";",K=Er({cssCompiledStyles:q.data.cssCompiledStyles});return Z+K.labelStyles.replace("color:","fill:")}).attr("clip-path",(q,Z)=>`url(#clip-${e}-${Z})`).text(q=>q.value?v(q.value):"").each(function(q){const Z=Yt(this),K=this.parentNode;if(!K){Z.style("display","none");return}const re=Yt(K).select(".treemapLabel");if(re.empty()||re.style("display")==="none"){Z.style("display","none");return}const Q=parseFloat(re.style("font-size")),ee=Math.max(P,Math.min(O,Math.round(Q*.6)));Z.style("font-size",`${ee}px`);const ae=(q.y1-q.y0)/2+Q/2+B;Z.attr("y",ae);const se=q.x1-q.x0,de=q.y1-q.y0-4,Ee=se-2*z;Z.node().getComputedTextLength()>Ee||ae+ee>de||ee<P?Z.style("display","none"):Z.style("display",null)});const j=(Y=i.diagramPadding)!=null?Y:8;c1(f,j,"flowchart",(i==null?void 0:i.useMaxWidth)||!1)},"draw"),_2r=_(function(t,e){return e.db.getClasses()},"getClasses"),k2r={draw:S2r,getClasses:_2r},A2r={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},N2r=_(({treemap:t}={})=>{var u,h,d;const e=Qd(),r=Ar(),n=Ga(e,r.themeVariables),a=Ga(A2r,t),i=(u=a.titleColor)!=null?u:n.titleColor,s=(h=a.labelColor)!=null?h:n.textColor,o=(d=a.valueColor)!=null?d:n.textColor;return`
|
||
.treemapNode.section {
|
||
stroke: ${a.sectionStrokeColor};
|
||
stroke-width: ${a.sectionStrokeWidth};
|
||
fill: ${a.sectionFillColor};
|
||
}
|
||
.treemapNode.leaf {
|
||
stroke: ${a.leafStrokeColor};
|
||
stroke-width: ${a.leafStrokeWidth};
|
||
fill: ${a.leafFillColor};
|
||
}
|
||
.treemapLabel {
|
||
fill: ${s};
|
||
font-size: ${a.labelFontSize};
|
||
}
|
||
.treemapValue {
|
||
fill: ${o};
|
||
font-size: ${a.valueFontSize};
|
||
}
|
||
.treemapTitle {
|
||
fill: ${i};
|
||
font-size: ${a.titleFontSize};
|
||
}
|
||
`},"getStyles"),I2r=N2r,L2r={parser:UGe,get db(){return new qGe},renderer:k2r,styles:I2r},$2r=Object.freeze({__proto__:null,diagram:L2r}),SR=_((t,e)=>{const r=t<=1?t*100:t;if(r<0||r>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return r},"toPercent"),Cy=_((t,e,r)=>({x:SR(e,`${r} evolution`),y:SR(t,`${r} visibility`)}),"toCoordinates"),jGe=_(t=>{if(t){if(t==="+<>")return"bidirectional";if(t==="+<")return"backward";if(t==="+>")return"forward"}},"getFlowFromPort"),M2r=_(t=>{if(!(t!=null&&t.startsWith("+")))return{};const e=/^\+'([^']*)'/.exec(t),r=e==null?void 0:e[1];return t.includes("<>")?{flow:"bidirectional",label:r}:t.includes("<")?{flow:"backward",label:r}:t.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),P2r=_((t,e)=>{if(hl(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution){const r=t.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),n=t.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);e.updateAxes({stages:r,stageBoundaries:n})}if(t.anchors.forEach(r=>{const n=Cy(r.visibility,r.evolution,`Anchor "${r.name}"`);e.addNode(r.name,r.name,n.x,n.y,"anchor")}),t.components.forEach(r=>{var o;const n=Cy(r.visibility,r.evolution,`Component "${r.name}"`),a=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,i=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,s=(o=r.decorator)==null?void 0:o.strategy;e.addNode(r.name,r.name,n.x,n.y,"component",a,i,r.inertia,s)}),t.notes.forEach(r=>{const n=Cy(r.visibility,r.evolution,`Note "${r.text}"`);e.addNote(r.text,n.x,n.y)}),t.pipelines.forEach(r=>{const n=e.getNode(r.parent);if(!n||typeof n.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);const a=n.y;e.startPipeline(r.parent),r.components.forEach(i=>{const s=`${r.parent}_${i.name}`,o=i.label?(i.label.negX?-1:1)*i.label.offsetX:void 0,u=i.label?(i.label.negY?-1:1)*i.label.offsetY:void 0,h=SR(i.evolution,`Pipeline component "${i.name}" evolution`);e.addNode(s,i.name,h,a,"pipeline-component",o,u),e.addPipelineComponent(r.parent,s)})}),t.links.forEach(r=>{var h;const n=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-."));let a=(h=jGe(r.fromPort))!=null?h:jGe(r.toPort);const{flow:i,label:s}=M2r(r.arrow);!a&&i&&(a=i);const o=r.linkLabel,u=s!=null?s:o;e.addLink(e.resolveNodeId(r.from),e.resolveNodeId(r.to),n,u,a)}),t.evolves.forEach(r=>{const n=e.getNode(r.component);if((n==null?void 0:n.y)!==void 0){const a=SR(r.target,`Evolve target for "${r.component}"`);e.addTrend(r.component,a,n.y)}}),t.annotations.length>0){const r=t.annotations[0],n=Cy(r.x,r.y,"Annotations box");e.setAnnotationsBox(n.x,n.y)}t.annotation.forEach(r=>{const n=Cy(r.x,r.y,`Annotation ${r.number}`);e.addAnnotation(r.number,[{x:n.x,y:n.y}],r.text)}),t.accelerators.forEach(r=>{const n=Cy(r.x,r.y,`Accelerator "${r.name}"`);e.addAccelerator(r.name,n.x,n.y)}),t.deaccelerators.forEach(r=>{const n=Cy(r.x,r.y,`Deaccelerator "${r.name}"`);e.addDeaccelerator(r.name,n.x,n.y)})},"populateDb"),KGe={parser:{yy:void 0},parse:_(t=>nt(this,null,function*(){var n;const e=yield pu("wardley",t);Le.debug(e);const r=(n=KGe.parser)==null?void 0:n.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");P2r(e,r)}),"parse")},R2r=(ox=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(e){var a,i,s,o;const r=(a=this.nodes.get(e.id))!=null?a:{id:e.id,label:e.label},n=Ne(X(X({},r),e),{className:(i=e.className)!=null?i:r.className,labelOffsetX:(s=e.labelOffsetX)!=null?s:r.labelOffsetX,labelOffsetY:(o=e.labelOffsetY)!=null?o:r.labelOffsetY});this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});const r=this.nodes.get(e);r&&(r.isPipelineParent=!0)}addPipelineComponent(e,r){const n=this.pipelines.get(e);n&&n.componentIds.push(r);const a=this.nodes.get(r);a&&(a.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,r){this.annotationsBox={x:e,y:r}}setAxes(e){this.axes=X(X({},this.axes),e)}setSize(e,r){this.size={width:e,height:r}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(const[r,n]of this.nodes)if(n.label===e)return r;return e}build(){const e=[];for(const r of this.nodes.values()){if(typeof r.x!="number"||typeof r.y!="number")throw new Error(`Node "${r.label}" is missing coordinates`);e.push(r)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:X({},this.axes),size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},l(ox,"WardleyBuilder"),_(ox,"WardleyBuilder"),ox),Wo=new R2r;function XGe(){return ft()["wardley-beta"]}l(XGe,"getConfig3"),_(XGe,"getConfig");function ZGe(t,e,r,n,a,i,s,o,u){Wo.addNode({id:t,label:e,x:r,y:n,className:a,labelOffsetX:i,labelOffsetY:s,inertia:o,sourceStrategy:u})}l(ZGe,"addNode"),_(ZGe,"addNode");function QGe(t,e,r=!1,n,a){Wo.addLink({source:t,target:e,dashed:r,label:n,flow:a})}l(QGe,"addLink"),_(QGe,"addLink");function JGe(t,e,r){Wo.addTrend({nodeId:t,targetX:e,targetY:r})}l(JGe,"addTrend"),_(JGe,"addTrend");function eqe(t,e,r){Wo.addAnnotation({number:t,coordinates:e,text:r})}l(eqe,"addAnnotation"),_(eqe,"addAnnotation");function tqe(t,e,r){Wo.addNote({text:t,x:e,y:r})}l(tqe,"addNote"),_(tqe,"addNote");function rqe(t,e,r){Wo.addAccelerator({name:t,x:e,y:r})}l(rqe,"addAccelerator"),_(rqe,"addAccelerator");function nqe(t,e,r){Wo.addDeaccelerator({name:t,x:e,y:r})}l(nqe,"addDeaccelerator"),_(nqe,"addDeaccelerator");function aqe(t,e){Wo.setAnnotationsBox(t,e)}l(aqe,"setAnnotationsBox"),_(aqe,"setAnnotationsBox");function iqe(t,e){Wo.setSize(t,e)}l(iqe,"setSize"),_(iqe,"setSize");function sqe(t){Wo.startPipeline(t)}l(sqe,"startPipeline"),_(sqe,"startPipeline");function oqe(t,e){Wo.addPipelineComponent(t,e)}l(oqe,"addPipelineComponent"),_(oqe,"addPipelineComponent");function lqe(t){Wo.setAxes(t)}l(lqe,"updateAxes"),_(lqe,"updateAxes");function cqe(t){return Wo.getNode(t)}l(cqe,"getNode"),_(cqe,"getNode");function uqe(t){return Wo.resolveNodeId(t)}l(uqe,"resolveNodeId"),_(uqe,"resolveNodeId");function hqe(){return Wo.build()}l(hqe,"getWardleyData"),_(hqe,"getWardleyData");function dqe(){Wo.clear(),Ca()}l(dqe,"clear2$2"),_(dqe,"clear");var O2r={getConfig:XGe,addNode:ZGe,addLink:QGe,addTrend:JGe,addAnnotation:eqe,addNote:tqe,addAccelerator:rqe,addDeaccelerator:nqe,setAnnotationsBox:aqe,setSize:iqe,startPipeline:sqe,addPipelineComponent:oqe,updateAxes:lqe,getNode:cqe,resolveNodeId:uqe,getWardleyData:hqe,clear:dqe,setAccTitle:Na,getAccTitle:za,setDiagramTitle:Va,getDiagramTitle:Ia,getAccDescription:Wa,setAccDescription:Ha},D2r=["Genesis","Custom Built","Product","Commodity"],F2r=_(()=>{var e,r,n,a,i,s,o,u,h,d,f,p,g,m,y,v,b,w,x,T,C,S,E,k,A,I,L,R,O;const{themeVariables:t}=ft();return{backgroundColor:(n=(r=(e=t.wardley)==null?void 0:e.backgroundColor)!=null?r:t.background)!=null?n:"#fff",axisColor:(i=(a=t.wardley)==null?void 0:a.axisColor)!=null?i:"#000",axisTextColor:(u=(o=(s=t.wardley)==null?void 0:s.axisTextColor)!=null?o:t.primaryTextColor)!=null?u:"#222",gridColor:(d=(h=t.wardley)==null?void 0:h.gridColor)!=null?d:"rgba(100, 100, 100, 0.2)",componentFill:(p=(f=t.wardley)==null?void 0:f.componentFill)!=null?p:"#fff",componentStroke:(m=(g=t.wardley)==null?void 0:g.componentStroke)!=null?m:"#000",componentLabelColor:(b=(v=(y=t.wardley)==null?void 0:y.componentLabelColor)!=null?v:t.primaryTextColor)!=null?b:"#222",linkStroke:(x=(w=t.wardley)==null?void 0:w.linkStroke)!=null?x:"#000",evolutionStroke:(C=(T=t.wardley)==null?void 0:T.evolutionStroke)!=null?C:"#dc3545",annotationStroke:(E=(S=t.wardley)==null?void 0:S.annotationStroke)!=null?E:"#000",annotationTextColor:(I=(A=(k=t.wardley)==null?void 0:k.annotationTextColor)!=null?A:t.primaryTextColor)!=null?I:"#222",annotationFill:(O=(R=(L=t.wardley)==null?void 0:L.annotationFill)!=null?R:t.background)!=null?O:"#fff"}},"getTheme"),B2r=_(()=>{var e,r,n,a,i,s,o,u,h;const t=ft()["wardley-beta"];return{width:(e=t==null?void 0:t.width)!=null?e:900,height:(r=t==null?void 0:t.height)!=null?r:600,padding:(n=t==null?void 0:t.padding)!=null?n:48,nodeRadius:(a=t==null?void 0:t.nodeRadius)!=null?a:6,nodeLabelOffset:(i=t==null?void 0:t.nodeLabelOffset)!=null?i:8,axisFontSize:(s=t==null?void 0:t.axisFontSize)!=null?s:12,labelFontSize:(o=t==null?void 0:t.labelFontSize)!=null?o:10,showGrid:(u=t==null?void 0:t.showGrid)!=null?u:!1,useMaxWidth:(h=t==null?void 0:t.useMaxWidth)!=null?h:!0}},"getConfigValues"),z2r=_((t,e,r,n)=>{var B,W,U,j,V,Y;Le.debug(`Rendering Wardley map
|
||
`+t);const a=B2r(),i=F2r(),s=a.nodeRadius*1.6,o=n.db,u=o.getWardleyData(),h=o.getDiagramTitle(),d=(W=(B=u.size)==null?void 0:B.width)!=null?W:a.width,f=(j=(U=u.size)==null?void 0:U.height)!=null?j:a.height,p=$o(e);p.selectAll("*").remove(),yi(p,f,d,a.useMaxWidth),p.attr("viewBox",`0 0 ${d} ${f}`);const g=p.append("g").attr("class","wardley-map"),m=p.append("defs");m.append("marker").attr("id",`arrow-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",i.evolutionStroke).attr("stroke","none"),m.append("marker").attr("id",`link-arrow-end-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",i.linkStroke).attr("stroke","none"),m.append("marker").attr("id",`link-arrow-start-${e}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",i.linkStroke).attr("stroke","none"),g.append("rect").attr("class","wardley-background").attr("width",d).attr("height",f).attr("fill",i.backgroundColor);const y=d-a.padding*2,v=f-a.padding*2;h&&g.append("text").attr("class","wardley-title").attr("x",d/2).attr("y",a.padding/2).attr("fill",i.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const b=_(H=>a.padding+H/100*y,"projectX"),w=_(H=>f-a.padding-H/100*v,"projectY"),x=g.append("g").attr("class","wardley-axes");x.append("line").attr("x1",a.padding).attr("x2",d-a.padding).attr("y1",f-a.padding).attr("y2",f-a.padding).attr("stroke",i.axisColor).attr("stroke-width",1),x.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",f-a.padding).attr("stroke",i.axisColor).attr("stroke-width",1);const T=(V=u.axes.xLabel)!=null?V:"Evolution",C=(Y=u.axes.yLabel)!=null?Y:"Visibility";x.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+y/2).attr("y",f-a.padding/4).attr("fill",i.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(T),x.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+v/2).attr("fill",i.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+v/2})`).text(C);const S=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:D2r;if(S.length>0){const H=g.append("g").attr("class","wardley-stages"),q=u.axes.stageBoundaries,Z=[];if(q&&q.length===S.length){let K=0;q.forEach(re=>{Z.push({start:K,end:re}),K=re})}else{const K=1/S.length;S.forEach((re,Q)=>{Z.push({start:Q*K,end:(Q+1)*K})})}S.forEach((K,re)=>{const Q=Z[re],te=a.padding+Q.start*y,ee=a.padding+Q.end*y,J=(te+ee)/2;re>0&&H.append("line").attr("x1",te).attr("x2",te).attr("y1",a.padding).attr("y2",f-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),H.append("text").attr("class","wardley-stage-label").attr("x",J).attr("y",f-a.padding/1.5).attr("fill",i.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(K)})}if(a.showGrid){const H=g.append("g").attr("class","wardley-grid");for(let q=1;q<4;q++){const Z=q/4,K=a.padding+y*Z;H.append("line").attr("x1",K).attr("x2",K).attr("y1",a.padding).attr("y2",f-a.padding).attr("stroke",i.gridColor).attr("stroke-dasharray","2 6"),H.append("line").attr("x1",a.padding).attr("x2",d-a.padding).attr("y1",f-a.padding-v*Z).attr("y2",f-a.padding-v*Z).attr("stroke",i.gridColor).attr("stroke-dasharray","2 6")}}const E=new Map;if(u.nodes.forEach(H=>{E.set(H.id,{x:b(H.x),y:w(H.y),node:H})}),u.pipelines.length>0){const H=g.append("g").attr("class","wardley-pipelines"),q=g.append("g").attr("class","wardley-pipeline-links");u.pipelines.forEach(Z=>{if(Z.componentIds.length===0)return;const K=Z.componentIds.map(ee=>({id:ee,pos:E.get(ee),node:u.nodes.find(J=>J.id===ee)})).filter(ee=>ee.pos&&ee.node).sort((ee,J)=>ee.node.x-J.node.x);for(let ee=0;ee<K.length-1;ee++){const J=K[ee],ae=K[ee+1];q.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",J.pos.x).attr("y1",J.pos.y).attr("x2",ae.pos.x).attr("y2",ae.pos.y).attr("stroke",i.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let re=1/0,Q=-1/0,te=0;if(Z.componentIds.forEach(ee=>{const J=E.get(ee);J&&(re=Math.min(re,J.x),Q=Math.max(Q,J.x),te=J.y)}),re!==1/0&&Q!==-1/0){const J=a.nodeRadius*4,ae=te-J/2,se=E.get(Z.nodeId);if(se){const fe=(re+Q)/2;se.x=fe,se.y=ae-s/6}H.append("rect").attr("class","wardley-pipeline-box").attr("x",re-15).attr("y",ae).attr("width",Q-re+15*2).attr("height",J).attr("fill","none").attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const k=g.append("g").attr("class","wardley-links"),A=new Map;u.pipelines.forEach(H=>{A.set(H.nodeId,new Set(H.componentIds))});const I=u.links.filter(H=>{if(!E.has(H.source)||!E.has(H.target))return!1;const q=A.get(H.target);return!(q!=null&&q.has(H.source))});k.selectAll("line").data(I).enter().append("line").attr("class",H=>`wardley-link${H.dashed?" wardley-link--dashed":""}`).attr("x1",H=>{const q=E.get(H.source),Z=E.get(H.target),re=u.nodes.find(J=>J.id===H.source).isPipelineParent?s/Math.sqrt(2):a.nodeRadius,Q=Z.x-q.x,te=Z.y-q.y,ee=Math.sqrt(Q*Q+te*te);return q.x+Q/ee*re}).attr("y1",H=>{const q=E.get(H.source),Z=E.get(H.target),re=u.nodes.find(J=>J.id===H.source).isPipelineParent?s/Math.sqrt(2):a.nodeRadius,Q=Z.x-q.x,te=Z.y-q.y,ee=Math.sqrt(Q*Q+te*te);return q.y+te/ee*re}).attr("x2",H=>{const q=E.get(H.source),Z=E.get(H.target),re=u.nodes.find(J=>J.id===H.target).isPipelineParent?s/Math.sqrt(2):a.nodeRadius,Q=q.x-Z.x,te=q.y-Z.y,ee=Math.sqrt(Q*Q+te*te);return Z.x+Q/ee*re}).attr("y2",H=>{const q=E.get(H.source),Z=E.get(H.target),re=u.nodes.find(J=>J.id===H.target).isPipelineParent?s/Math.sqrt(2):a.nodeRadius,Q=q.x-Z.x,te=q.y-Z.y,ee=Math.sqrt(Q*Q+te*te);return Z.y+te/ee*re}).attr("stroke",i.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",H=>H.dashed?"6 6":null).attr("marker-end",H=>H.flow==="forward"||H.flow==="bidirectional"?`url(#link-arrow-end-${e})`:null).attr("marker-start",H=>H.flow==="backward"||H.flow==="bidirectional"?`url(#link-arrow-start-${e})`:null),k.selectAll("text").data(I.filter(H=>H.label)).enter().append("text").attr("class","wardley-link-label").attr("x",H=>{const q=E.get(H.source),Z=E.get(H.target),K=(q.x+Z.x)/2,re=Z.y-q.y,Q=Z.x-q.x,te=Math.sqrt(Q*Q+re*re),ee=8,J=re/te;return K+J*ee}).attr("y",H=>{const q=E.get(H.source),Z=E.get(H.target),K=(q.y+Z.y)/2,re=Z.x-q.x,Q=Z.y-q.y,te=Math.sqrt(re*re+Q*Q),ee=8,J=-re/te;return K+J*ee}).attr("fill",i.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",H=>{const q=E.get(H.source),Z=E.get(H.target),K=(q.x+Z.x)/2,re=(q.y+Z.y)/2,Q=Z.x-q.x,te=Z.y-q.y,ee=Math.sqrt(Q*Q+te*te),J=8,ae=te/ee,se=-Q/ee,fe=K+ae*J,ve=re+se*J;let de=Math.atan2(te,Q)*180/Math.PI;return(de>90||de<-90)&&(de+=180),`rotate(${de} ${fe} ${ve})`}).text(H=>H.label);const L=g.append("g").attr("class","wardley-trends"),R=u.trends.map(H=>{const q=E.get(H.nodeId);if(!q)return null;const Z=b(H.targetX),K=w(H.targetY),re=Z-q.x,Q=K-q.y,te=Math.sqrt(re*re+Q*Q),ee=a.nodeRadius+2,J=te>ee?Z-re/te*ee:Z,ae=te>ee?K-Q/te*ee:K;return{origin:q,targetX:Z,targetY:K,adjustedX2:J,adjustedY2:ae}}).filter(H=>H!==null);L.selectAll("line").data(R).enter().append("line").attr("class","wardley-trend").attr("x1",H=>H.origin.x).attr("y1",H=>H.origin.y).attr("x2",H=>H.adjustedX2).attr("y2",H=>H.adjustedY2).attr("stroke",i.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const M=g.append("g").attr("class","wardley-nodes").selectAll("g").data(u.nodes).enter().append("g").attr("class",H=>["wardley-node",H.className?`wardley-node--${H.className}`:""].filter(Boolean).join(" "));M.filter(H=>H.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",H=>E.get(H.id).x).attr("cy",H=>E.get(H.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",i.componentStroke).attr("stroke-width",1),M.filter(H=>H.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",H=>E.get(H.id).x).attr("cy",H=>E.get(H.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",i.componentStroke).attr("stroke-width",1),M.filter(H=>H.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",H=>E.get(H.id).x).attr("cy",H=>E.get(H.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const P=M.filter(H=>H.sourceStrategy==="market");P.append("circle").attr("class","wardley-market-overlay").attr("cx",H=>E.get(H.id).x).attr("cy",H=>E.get(H.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",1),M.filter(H=>!H.isPipelineParent&&H.sourceStrategy!=="market"&&H.className!=="anchor").append("circle").attr("cx",H=>E.get(H.id).x).attr("cy",H=>E.get(H.id).y).attr("r",a.nodeRadius).attr("fill",i.componentFill).attr("stroke",i.componentStroke).attr("stroke-width",1);const z=a.nodeRadius*.7,D=a.nodeRadius*1.2;if(P.append("line").attr("class","wardley-market-line").attr("x1",H=>E.get(H.id).x).attr("y1",H=>E.get(H.id).y-D).attr("x2",H=>E.get(H.id).x-D*Math.cos(Math.PI/6)).attr("y2",H=>E.get(H.id).y+D*Math.sin(Math.PI/6)).attr("stroke",i.componentStroke).attr("stroke-width",1),P.append("line").attr("class","wardley-market-line").attr("x1",H=>E.get(H.id).x-D*Math.cos(Math.PI/6)).attr("y1",H=>E.get(H.id).y+D*Math.sin(Math.PI/6)).attr("x2",H=>E.get(H.id).x+D*Math.cos(Math.PI/6)).attr("y2",H=>E.get(H.id).y+D*Math.sin(Math.PI/6)).attr("stroke",i.componentStroke).attr("stroke-width",1),P.append("line").attr("class","wardley-market-line").attr("x1",H=>E.get(H.id).x+D*Math.cos(Math.PI/6)).attr("y1",H=>E.get(H.id).y+D*Math.sin(Math.PI/6)).attr("x2",H=>E.get(H.id).x).attr("y2",H=>E.get(H.id).y-D).attr("stroke",i.componentStroke).attr("stroke-width",1),P.append("circle").attr("class","wardley-market-dot").attr("cx",H=>E.get(H.id).x).attr("cy",H=>E.get(H.id).y-D).attr("r",z).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),P.append("circle").attr("class","wardley-market-dot").attr("cx",H=>E.get(H.id).x-D*Math.cos(Math.PI/6)).attr("cy",H=>E.get(H.id).y+D*Math.sin(Math.PI/6)).attr("r",z).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),P.append("circle").attr("class","wardley-market-dot").attr("cx",H=>E.get(H.id).x+D*Math.cos(Math.PI/6)).attr("cy",H=>E.get(H.id).y+D*Math.sin(Math.PI/6)).attr("r",z).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",2),M.filter(H=>H.isPipelineParent===!0).append("rect").attr("x",H=>E.get(H.id).x-s/2).attr("y",H=>E.get(H.id).y-s/2).attr("width",s).attr("height",s).attr("fill",i.componentFill).attr("stroke",i.componentStroke).attr("stroke-width",1),M.filter(H=>H.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",H=>{const q=E.get(H.id);let Z=H.isPipelineParent?s/2+15:a.nodeRadius+15;return H.sourceStrategy&&(Z+=a.nodeRadius+10),q.x+Z}).attr("y1",H=>{const q=E.get(H.id),Z=H.isPipelineParent?s:a.nodeRadius*2;return q.y-Z/2}).attr("x2",H=>{const q=E.get(H.id);let Z=H.isPipelineParent?s/2+15:a.nodeRadius+15;return H.sourceStrategy&&(Z+=a.nodeRadius+10),q.x+Z}).attr("y2",H=>{const q=E.get(H.id),Z=H.isPipelineParent?s:a.nodeRadius*2;return q.y+Z/2}).attr("stroke",i.componentStroke).attr("stroke-width",6),M.append("text").attr("x",H=>{var re;const q=E.get(H.id);if(H.className==="anchor")return H.labelOffsetX!==void 0?q.x+H.labelOffsetX:q.x;let Z=a.nodeLabelOffset;H.sourceStrategy&&H.labelOffsetX===void 0&&(Z+=10);const K=(re=H.labelOffsetX)!=null?re:Z;return q.x+K}).attr("y",H=>{var re;const q=E.get(H.id);if(H.className==="anchor")return H.labelOffsetY!==void 0?q.y+H.labelOffsetY:q.y-3;let Z=-a.nodeLabelOffset;H.sourceStrategy&&H.labelOffsetY===void 0&&(Z-=10);const K=(re=H.labelOffsetY)!=null?re:Z;return q.y+K}).attr("class","wardley-node-label").attr("fill",H=>H.className==="evolved"?i.evolutionStroke:H.className==="anchor"?"#000":i.componentLabelColor).attr("font-size",a.labelFontSize).attr("font-weight",H=>H.className==="anchor"?"bold":"normal").attr("text-anchor",H=>H.className==="anchor"?"middle":"start").attr("dominant-baseline",H=>H.className==="anchor"?"middle":"auto").text(H=>H.label),u.annotations.length>0){const H=g.append("g").attr("class","wardley-annotations");if(u.annotations.forEach(q=>{const Z=q.coordinates.map(K=>({x:b(K.x),y:w(K.y)}));if(Z.length>1)for(let K=0;K<Z.length-1;K++)H.append("line").attr("class","wardley-annotation-line").attr("x1",Z[K].x).attr("y1",Z[K].y).attr("x2",Z[K+1].x).attr("y2",Z[K+1].y).attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");Z.forEach(K=>{const re=H.append("g").attr("class","wardley-annotation");re.append("circle").attr("cx",K.x).attr("cy",K.y).attr("r",10).attr("fill","white").attr("stroke",i.axisColor).attr("stroke-width",1.5),re.append("text").attr("x",K.x).attr("y",K.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",i.axisTextColor).attr("font-weight","bold").text(q.number)})}),u.annotationsBox){let q=b(u.annotationsBox.x),Z=w(u.annotationsBox.y);const K=10,re=16,Q=11,te=H.append("g").attr("class","wardley-annotations-box"),ee=[...u.annotations].filter(ae=>ae.text).sort((ae,se)=>ae.number-se.number),J=[];if(ee.forEach((ae,se)=>{const fe=te.append("text").attr("x",q+K).attr("y",Z+K+(se+1)*re).attr("font-size",Q).attr("fill",i.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${ae.number}. ${ae.text}`);J.push(fe)}),J.length>0){let ae=0,se=0;J.forEach(ce=>{const Ie=ce.node(),ye=Ie.getComputedTextLength();ae=Math.max(ae,ye);const pe=Ie.getBBox();se=Math.max(se,pe.height)});const fe=ae+K*2+105,ve=ee.length*re+K*2+se/2,de=a.padding,Ee=d-a.padding-fe,Ce=a.padding,De=f-a.padding-ve;q=Math.max(de,Math.min(q,Ee)),Z=Math.max(Ce,Math.min(Z,De)),J.forEach((ce,Ie)=>{ce.attr("x",q+K).attr("y",Z+K+(Ie+1)*re)}),te.insert("rect","text").attr("x",q).attr("y",Z).attr("width",fe).attr("height",ve).attr("fill","white").attr("stroke",i.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(u.notes.length>0){const H=g.append("g").attr("class","wardley-notes");u.notes.forEach(q=>{const Z=b(q.x),K=w(q.y);H.append("text").attr("x",Z).attr("y",K).attr("text-anchor","start").attr("font-size",11).attr("fill",i.axisTextColor).attr("font-weight","bold").text(q.text)})}if(u.accelerators.length>0){const H=g.append("g").attr("class","wardley-accelerators");u.accelerators.forEach(q=>{const Z=b(q.x),K=w(q.y),re=60,Q=30,te=20,ee=`
|
||
M ${Z} ${K-Q/2}
|
||
L ${Z+re-te} ${K-Q/2}
|
||
L ${Z+re-te} ${K-Q/2-8}
|
||
L ${Z+re} ${K}
|
||
L ${Z+re-te} ${K+Q/2+8}
|
||
L ${Z+re-te} ${K+Q/2}
|
||
L ${Z} ${K+Q/2}
|
||
Z
|
||
`;H.append("path").attr("d",ee).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",1),H.append("text").attr("x",Z+re/2).attr("y",K+Q/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",i.axisTextColor).attr("font-weight","bold").text(q.name)})}if(u.deaccelerators.length>0){const H=g.append("g").attr("class","wardley-deaccelerators");u.deaccelerators.forEach(q=>{const Z=b(q.x),K=w(q.y),re=60,Q=30,te=20,ee=`
|
||
M ${Z+re} ${K-Q/2}
|
||
L ${Z+te} ${K-Q/2}
|
||
L ${Z+te} ${K-Q/2-8}
|
||
L ${Z} ${K}
|
||
L ${Z+te} ${K+Q/2+8}
|
||
L ${Z+te} ${K+Q/2}
|
||
L ${Z+re} ${K+Q/2}
|
||
Z
|
||
`;H.append("path").attr("d",ee).attr("fill","white").attr("stroke",i.componentStroke).attr("stroke-width",1),H.append("text").attr("x",Z+re/2).attr("y",K+Q/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",i.axisTextColor).attr("font-weight","bold").text(q.name)})}},"draw"),H2r={draw:z2r},W2r=_(({wardley:t}={})=>{const e=Qd(),r=Ar(),n=Ga(e,r.themeVariables),a=Ga(n.wardley,t);return`
|
||
.wardley-background {
|
||
fill: ${a.backgroundColor};
|
||
}
|
||
.wardley-axes line, .wardley-axes path {
|
||
stroke: ${a.axisColor};
|
||
}
|
||
.wardley-axis-label {
|
||
fill: ${a.axisTextColor};
|
||
}
|
||
.wardley-stage-label {
|
||
fill: ${a.axisTextColor};
|
||
}
|
||
.wardley-grid line {
|
||
stroke: ${a.gridColor};
|
||
}
|
||
.wardley-node circle {
|
||
fill: ${a.componentFill};
|
||
stroke: ${a.componentStroke};
|
||
}
|
||
.wardley-node-label {
|
||
fill: ${a.componentLabelColor};
|
||
}
|
||
.wardley-link {
|
||
stroke: ${a.linkStroke};
|
||
}
|
||
.wardley-link--dashed {
|
||
stroke-dasharray: 4 4;
|
||
}
|
||
.wardley-link-label {
|
||
fill: ${a.axisTextColor};
|
||
}
|
||
.wardley-trend line {
|
||
stroke: ${a.evolutionStroke};
|
||
}
|
||
.wardley-annotation-line {
|
||
stroke: ${a.annotationStroke};
|
||
}
|
||
.wardley-annotation circle {
|
||
fill: ${a.annotationFill};
|
||
stroke: ${a.annotationStroke};
|
||
}
|
||
.wardley-annotation text {
|
||
fill: ${a.annotationTextColor};
|
||
}
|
||
.wardley-annotations-box rect {
|
||
fill: ${a.annotationFill};
|
||
stroke: ${a.annotationStroke};
|
||
}
|
||
.wardley-annotations-box text {
|
||
fill: ${a.annotationTextColor};
|
||
}
|
||
.wardley-pipeline-box {
|
||
stroke: ${a.componentStroke};
|
||
}
|
||
.wardley-notes text {
|
||
fill: ${a.axisTextColor};
|
||
}
|
||
`},"styles"),V2r={parser:KGe,db:O2r,renderer:H2r,styles:W2r},G2r=Object.freeze({__proto__:null,diagram:V2r}),fqe=_(()=>({domains:new Map,transitions:[]}),"createDefaultData"),Mk=fqe(),q2r=_(()=>Mk.domains,"getDomains"),Y2r=_(()=>Mk.transitions,"getTransitions"),U2r=_(t=>{var e;if(t)for(const r of t){const n=r.domain,a=((e=r.items)!=null?e:[]).map(i=>({label:i.label}));Mk.domains.set(n,{name:n,items:a})}},"setDomains"),j2r=_(t=>{t&&(Mk.transitions=t.filter(e=>e.from===e.to?(Le.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),K2r=_(()=>Ga(X(X({},hn.cynefin),Ar().cynefin)),"getConfig"),X2r=_(()=>{Ca(),Mk=fqe()},"clear"),_R={getDomains:q2r,getTransitions:Y2r,setDomains:U2r,setTransitions:j2r,getConfig:K2r,clear:X2r,setAccTitle:Na,getAccTitle:za,setDiagramTitle:Va,getDiagramTitle:Ia,getAccDescription:Wa,setAccDescription:Ha},Z2r=_(t=>{hl(t,_R),_R.setDomains(t.domains),_R.setTransitions(t.transitions)},"populate"),Q2r={parse:_(t=>nt(this,null,function*(){const e=yield pu("cynefin",t);Le.debug(e),Z2r(e)}),"parse")};function Pk(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}l(Pk,"seededRandom"),_(Pk,"seededRandom");function pqe(t){let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);e=(e<<5)-e+n,e|=0}return e}l(pqe,"hashString"),_(pqe,"hashString");function gqe(t,e){return typeof t=="number"&&Number.isFinite(t)&&t!==0?t:pqe(e)}l(gqe,"resolveSeed"),_(gqe,"resolveSeed");function mqe(t,e,r,n){const a=t/2,i=n!=null?n:t*.015,s=7,o=e/s,u=[];for(let d=0;d<=s;d++){const f=Pk(r+d*17)*i*2-i;u.push({x:a+f,y:d*o})}let h=`M${u[0].x},${u[0].y}`;for(let d=0;d<u.length-1;d++){const f=u[d],p=u[d+1],g=(f.y+p.y)/2,m=d%2===0?1:-1,y=i*1.5*m*Pk(r+d*31+7),v=f.x+y,b=g,w=p.x-y;h+=` C${v},${b} ${w},${g} ${p.x},${p.y}`}return h}l(mqe,"generateFoldPath"),_(mqe,"generateFoldPath");function yqe(t,e,r,n){const a=e/2,i=n!=null?n:e*.015,s=7,o=t/s,u=[];for(let d=0;d<=s;d++){const f=Pk(r+d*23)*i*2-i;u.push({x:d*o,y:a+f})}let h=`M${u[0].x},${u[0].y}`;for(let d=0;d<u.length-1;d++){const f=u[d],p=u[d+1],g=(f.x+p.x)/2,m=d%2===0?1:-1,y=i*1.5*m*Pk(r+d*37+11),v=g,b=f.y+y,w=g,x=p.y-y;h+=` C${v},${b} ${w},${x} ${p.x},${p.y}`}return h}l(yqe,"generateHorizontalBoundary"),_(yqe,"generateHorizontalBoundary");function vqe(t,e){const r=t/2,n=e*.5,a=e,i=t*.03;return[`M${r},${n}`,`C${r+i},${n+(a-n)*.2}`,`${r-i*1.5},${n+(a-n)*.55}`,`${r+i*.5},${n+(a-n)*.75}`,`C${r-i},${n+(a-n)*.85}`,`${r+i*.3},${n+(a-n)*.95}`,`${r},${a}`].join(" ")}l(vqe,"generateCliffPath"),_(vqe,"generateCliffPath");function bqe(t,e,r,n){return[`M${t-r},${e}`,`A${r},${n} 0 1,1 ${t+r},${e}`,`A${r},${n} 0 1,1 ${t-r},${e}`,"Z"].join(" ")}l(bqe,"generateConfusionPath"),_(bqe,"generateConfusionPath");var xqe={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},J2r=_((t,e)=>{const r=t/2,n=e/2;return{complex:{cx:r/2,cy:n/2,x:0,y:0,w:r,h:n},complicated:{cx:r+r/2,cy:n/2,x:r,y:0,w:r,h:n},chaotic:{cx:r/2,cy:n+n/2,x:0,y:n,w:r,h:n},clear:{cx:r+r/2,cy:n+n/2,x:r,y:n,w:r,h:n},confusion:{cx:r,cy:n,x:r*.7,y:n*.7,w:r*.6,h:n*.6}}},"getDomainLayouts"),ebr=_(()=>{const t=Qd(),e=Ar();return Ga(t,e.themeVariables).cynefin},"getCynefinDomainColors"),fre=3,tbr=_((t,e,r,n)=>{var B;const a=n.db,i=a.getDomains(),s=a.getTransitions(),o=a.getDiagramTitle(),u=a.getAccTitle(),h=a.getAccDescription(),d=a.getConfig(),f=ebr();Le.debug("Rendering Cynefin diagram");const p=d.width,g=d.height,m=d.padding,y=d.showDomainDescriptions,v=d.boundaryAmplitude,b=p+m*2,w=g+m*2,x={complex:f.complexBg,complicated:f.complicatedBg,clear:f.clearBg,chaotic:f.chaoticBg,confusion:f.confusionBg},T=$o(e);yi(T,w,b,(B=d.useMaxWidth)!=null?B:!0),T.attr("viewBox",`0 0 ${b} ${w}`),u&&T.append("title").text(u),h&&T.append("desc").text(h);const C=T.append("g").attr("transform",`translate(${m}, ${m})`),S=J2r(p,g),E=gqe(d.seed,e),k=C.append("g").attr("class","cynefin-backgrounds"),A=["complex","complicated","chaotic","clear"];for(const W of A){const U=S[W];k.append("rect").attr("class","cynefinDomain").attr("x",U.x).attr("y",U.y).attr("width",U.w).attr("height",U.h).attr("fill",x[W]).attr("fill-opacity",.4).attr("stroke","none")}const I=C.append("g").attr("class","cynefin-boundaries");I.append("path").attr("class","cynefinBoundary").attr("d",mqe(p,g,E,v)).attr("fill","none"),I.append("path").attr("class","cynefinBoundary").attr("d",yqe(p,g,E+100,v)).attr("fill","none"),I.append("path").attr("class","cynefinCliff").attr("d",vqe(p,g)).attr("fill","none");const L=p*.15,R=g*.15;C.append("path").attr("class","cynefinConfusion").attr("d",bqe(p/2,g/2,L,R)).attr("fill",x.confusion).attr("fill-opacity",.5);const O=C.append("g").attr("class","cynefin-labels");for(const W of A){const U=S[W];O.append("text").attr("class","cynefinDomainLabel").attr("x",U.cx).attr("y",y?U.cy-30:U.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(W.charAt(0).toUpperCase()+W.slice(1))}if(O.append("text").attr("class","cynefinDomainLabel").attr("x",p/2).attr("y",y?g/2-10:g/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),y){const W=C.append("g").attr("class","cynefin-subtitles");for(const U of A){const j=S[U],V=xqe[U];W.append("text").attr("class","cynefinSubtitle").attr("x",j.cx).attr("y",j.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(V.model),W.append("text").attr("class","cynefinSubtitle").attr("x",j.cx).attr("y",j.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(V.practice)}W.append("text").attr("class","cynefinSubtitle").attr("x",p/2).attr("y",g/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(xqe.confusion.practice)}const M=C.append("g").attr("class","cynefin-items"),P=26,z=10,D=["complex","complicated","chaotic","clear","confusion"];for(const W of D){const U=i.get(W);if(!U||U.items.length===0)continue;const j=S[W],V=W==="confusion";let Y=U.items,H=0;V&&U.items.length>fre&&(H=U.items.length-fre,Y=U.items.slice(0,fre));let q;if(V){const Z=y?22:14;q=j.cy+Z}else q=j.cy+(y?25:15);if([...Y].forEach((Z,K)=>{const re=q+K*(P+4),Q=M.append("g"),te=Q.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",P/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(Z.label);let ee=Z.label.length*7;const J=te.node();if(J&&typeof J.getBBox=="function"){const fe=J.getBBox();fe.width>0&&(ee=fe.width)}const ae=ee+z*2,se=j.cx-ae/2;Q.attr("transform",`translate(${se}, ${re})`),Q.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",ae).attr("height",P).attr("rx",4).attr("ry",4).attr("fill",x[W]).attr("fill-opacity",.95),te.attr("x",ae/2).attr("y",P/2)}),H>0){const Z=q+Y.length*(P+4),K=`+${H} more`,re=M.append("g"),Q=re.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",P/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(K);let te=K.length*7;const ee=Q.node();if(ee&&typeof ee.getBBox=="function"){const se=ee.getBBox();se.width>0&&(te=se.width)}const J=te+z*2,ae=j.cx-J/2;re.attr("transform",`translate(${ae}, ${Z})`),re.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",J).attr("height",P).attr("rx",4).attr("ry",4).attr("fill",x[W]).attr("fill-opacity",.6),Q.attr("x",J/2).attr("y",P/2)}}if(s.length>0){const W=T.select("defs").empty()?T.append("defs"):T.select("defs"),U=`cynefin-arrow-${e}`;W.append("marker").attr("id",U).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");const j=C.append("g").attr("class","cynefin-arrows");s.forEach(V=>{const Y=S[V.from],H=S[V.to];if(!Y||!H)return;if(V.from===V.to){Le.warn(`Cynefin renderer: skipping self-loop on domain "${V.from}"`);return}const q=Y.cx,Z=Y.cy,K=H.cx,re=H.cy,Q=(q+K)/2,te=(Z+re)/2,ee=K-q,J=re-Z,ae=Math.sqrt(ee*ee+J*J),se=ae*.15,fe=-J/ae,ve=ee/ae,de=Q+fe*se,Ee=te+ve*se;j.append("path").attr("class","cynefinArrowLine").attr("d",`M${q},${Z} Q${de},${Ee} ${K},${re}`).attr("fill","none").attr("marker-end",`url(#${U})`),V.label&&j.append("text").attr("class","cynefinArrowLabel").attr("x",de).attr("y",Ee-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(V.label)})}o&&C.append("text").attr("class","cynefinTitle").attr("x",p/2).attr("y",-m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(o)},"draw"),rbr={draw:tbr},nbr=_(()=>{const t=Qd(),e=Ar();return Ga(t,e.themeVariables).cynefin},"getCynefinTheme"),abr=_(()=>{const t=nbr();return`
|
||
.cynefinDomain {
|
||
stroke: none;
|
||
}
|
||
.cynefinDomainLabel {
|
||
font-size: ${t.domainFontSize}px;
|
||
font-weight: bold;
|
||
fill: ${t.labelColor};
|
||
}
|
||
.cynefinSubtitle {
|
||
font-size: ${t.itemFontSize-1}px;
|
||
fill: ${t.textColor};
|
||
font-style: italic;
|
||
}
|
||
.cynefinItem {
|
||
fill-opacity: 0.95;
|
||
stroke: ${t.boundaryColor};
|
||
stroke-width: 1;
|
||
}
|
||
.cynefinItemText {
|
||
font-size: ${t.itemFontSize}px;
|
||
fill: ${t.textColor};
|
||
}
|
||
.cynefinItemOverflow {
|
||
fill-opacity: 0.6;
|
||
stroke: ${t.boundaryColor};
|
||
stroke-width: 1;
|
||
stroke-dasharray: 3 2;
|
||
}
|
||
.cynefinBoundary {
|
||
stroke: ${t.boundaryColor};
|
||
stroke-width: ${t.boundaryWidth};
|
||
stroke-dasharray: 6 3;
|
||
}
|
||
.cynefinCliff {
|
||
stroke: ${t.cliffColor};
|
||
stroke-width: ${t.cliffWidth};
|
||
}
|
||
.cynefinConfusion {
|
||
stroke: ${t.boundaryColor};
|
||
stroke-width: 1.5;
|
||
stroke-dasharray: 4 2;
|
||
}
|
||
.cynefinArrowLine {
|
||
stroke: ${t.arrowColor};
|
||
stroke-width: ${t.arrowWidth};
|
||
fill: none;
|
||
}
|
||
.cynefinArrowHead {
|
||
fill: ${t.arrowColor};
|
||
stroke: none;
|
||
}
|
||
.cynefinArrowLabel {
|
||
font-size: ${t.itemFontSize-1}px;
|
||
fill: ${t.textColor};
|
||
}
|
||
.cynefinTitle {
|
||
font-size: ${t.domainFontSize+2}px;
|
||
font-weight: bold;
|
||
fill: ${t.labelColor};
|
||
}
|
||
`},"styles"),ibr=abr,sbr={parser:Q2r,db:_R,renderer:rbr,styles:ibr},obr=Object.freeze({__proto__:null,diagram:sbr}),pre="",gre="",mre="",yre=[],kR=new Map,lg=_(t=>mn(t,ft()),"sanitizeText"),yC=_(t=>{switch(t.type){case"terminal":return Ne(X({},t),{value:lg(t.value)});case"nonterminal":return Ne(X({},t),{name:lg(t.name)});case"sequence":return Ne(X({},t),{elements:t.elements.map(yC)});case"choice":return Ne(X({},t),{alternatives:t.alternatives.map(yC)});case"optional":return Ne(X({},t),{element:yC(t.element)});case"repetition":return Ne(X({},t),{element:yC(t.element),separator:t.separator?yC(t.separator):void 0});case"special":return Ne(X({},t),{text:lg(t.text)})}},"sanitizeAstNode"),lbr=_(()=>{pre="",gre="",mre="",yre.length=0,kR.clear(),Ca(),Le.debug("[Railroad] Database cleared")},"clear"),wqe=_(t=>{pre=lg(t),Le.debug("[Railroad] Title set:",t)},"setTitle"),Tqe=_(()=>pre,"getTitle"),cbr=_(t=>{const e=Ne(X({},t),{name:lg(t.name),definition:yC(t.definition),comment:t.comment?lg(t.comment):void 0});Le.debug("[Railroad] Adding rule:",e.name),kR.has(e.name)&&Le.warn(`[Railroad] Rule '${e.name}' is already defined. Overwriting.`),yre.push(e),kR.set(e.name,e)},"addRule"),ubr=_(()=>yre,"getRules"),hbr=_(t=>kR.get(t),"getRule"),dbr=_(t=>{gre=lg(t).replace(/^\s+/g,""),Le.debug("[Railroad] Accessibility title set:",t)},"setAccTitle"),fbr=_(()=>gre,"getAccTitle"),pbr=_(t=>{mre=lg(t).replace(/\n\s+/g,`
|
||
`),Le.debug("[Railroad] Accessibility description set:",t)},"setAccDescription"),gbr=_(()=>mre,"getAccDescription"),mbr=wqe,ybr=Tqe,Xa={clear:lbr,setTitle:wqe,getTitle:Tqe,addRule:cbr,getRules:ubr,getRule:hbr,setAccTitle:dbr,getAccTitle:fbr,setAccDescription:pbr,getAccDescription:gbr,setDiagramTitle:mbr,getDiagramTitle:ybr},bo={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},vbr=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,bbr=/^[\w "',.-]+$/,xbr=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),Eqe=_(t=>t?Object.keys(t).every(e=>e==="railroad"||xbr.has(e)):!1,"isRailroadStyleOptions"),wbr=_(t=>t?"railroad"in t&&t.railroad?t.railroad:Eqe(t)?t:{}:{},"extractRailroadOverrides"),Tbr=_(t=>{if(!t||Eqe(t))return{};const s=t,{railroad:e,svgId:r,theme:n,look:a}=s;return Xt(s,["railroad","svgId","theme","look"])},"extractThemeOverrides"),ba=_((t,e)=>{if(typeof t!="string")return e;const r=t.trim();return vbr.test(r)?r:e},"sanitizeColorValue"),Cqe=_((t,e)=>{if(typeof t!="string")return e;const r=t.trim();return bbr.test(r)?r:e},"sanitizeFontFamilyValue"),Sy=_((t,e)=>{const r=typeof t=="number"?t:typeof t=="string"?Number.parseFloat(t):Number.NaN;return Number.isFinite(r)&&r>=0?r:e},"sanitizeNumberValue"),Ebr=_(t=>{const e=typeof t=="number"?t:typeof t=="string"?Number.parseFloat(t):Number.NaN;return Number.isFinite(e)&&e>0?e:void 0},"parseThemeFontSize"),Cbr=_(t=>{var n,a,i,s,o,u,h,d,f,p,g,m,y;const e=Cqe(t.fontFamily,bo.fontFamily),r=(n=Ebr(t.fontSize))!=null?n:bo.fontSize;return Ne(X({},bo),{fontFamily:e,fontSize:r,terminalFill:ba((a=t.secondBkg)!=null?a:t.secondaryColor,bo.terminalFill),terminalStroke:ba((i=t.secondaryBorderColor)!=null?i:t.lineColor,bo.terminalStroke),terminalTextColor:ba((s=t.secondaryTextColor)!=null?s:t.textColor,bo.terminalTextColor),nonTerminalFill:ba((o=t.mainBkg)!=null?o:t.background,bo.nonTerminalFill),nonTerminalStroke:ba((u=t.primaryBorderColor)!=null?u:t.lineColor,bo.nonTerminalStroke),nonTerminalTextColor:ba((h=t.primaryTextColor)!=null?h:t.textColor,bo.nonTerminalTextColor),lineColor:ba(t.lineColor,bo.lineColor),markerFill:ba(t.lineColor,bo.markerFill),commentFill:ba((d=t.labelBackground)!=null?d:t.tertiaryColor,bo.commentFill),commentStroke:ba((f=t.tertiaryBorderColor)!=null?f:t.lineColor,bo.commentStroke),commentTextColor:ba((p=t.tertiaryTextColor)!=null?p:t.textColor,bo.commentTextColor),specialFill:ba((g=t.tertiaryColor)!=null?g:t.secondaryColor,bo.specialFill),specialStroke:ba((m=t.tertiaryBorderColor)!=null?m:t.secondaryBorderColor,bo.specialStroke),ruleNameColor:ba((y=t.titleColor)!=null?y:t.textColor,bo.ruleNameColor)})},"buildThemeDefaults"),vre=_(t=>{var i,s,o,u;const e=Ar(),r=X(X(X({},Qd()),(i=e.themeVariables)!=null?i:{}),Tbr(t)),n=Cbr(r),a=X(X({},(s=e.railroad)!=null?s:{}),wbr(t));return{compactMode:(o=a.compactMode)!=null?o:n.compactMode,padding:Sy(a.padding,n.padding),verticalSeparation:Sy(a.verticalSeparation,n.verticalSeparation),horizontalSeparation:Sy(a.horizontalSeparation,n.horizontalSeparation),arcRadius:Sy(a.arcRadius,n.arcRadius),fontSize:Sy(a.fontSize,n.fontSize),fontFamily:Cqe(a.fontFamily,n.fontFamily),terminalFill:ba(a.terminalFill,n.terminalFill),terminalStroke:ba(a.terminalStroke,n.terminalStroke),terminalTextColor:ba(a.terminalTextColor,n.terminalTextColor),nonTerminalFill:ba(a.nonTerminalFill,n.nonTerminalFill),nonTerminalStroke:ba(a.nonTerminalStroke,n.nonTerminalStroke),nonTerminalTextColor:ba(a.nonTerminalTextColor,n.nonTerminalTextColor),lineColor:ba(a.lineColor,n.lineColor),strokeWidth:Sy(a.strokeWidth,n.strokeWidth),markerFill:ba(a.markerFill,n.markerFill),commentFill:ba(a.commentFill,n.commentFill),commentStroke:ba(a.commentStroke,n.commentStroke),commentTextColor:ba(a.commentTextColor,n.commentTextColor),specialFill:ba(a.specialFill,n.specialFill),specialStroke:ba(a.specialStroke,n.specialStroke),ruleNameColor:ba(a.ruleNameColor,n.ruleNameColor),showMarkers:(u=a.showMarkers)!=null?u:n.showMarkers,markerRadius:Sy(a.markerRadius,n.markerRadius)}},"buildRailroadStyleOptions"),AR=_(t=>{const{fontFamily:e,fontSize:r,terminalFill:n,terminalStroke:a,terminalTextColor:i,nonTerminalFill:s,nonTerminalStroke:o,nonTerminalTextColor:u,lineColor:h,strokeWidth:d,markerFill:f,commentFill:p,commentStroke:g,commentTextColor:m,specialFill:y,specialStroke:v,ruleNameColor:b}=vre(t);return`
|
||
.railroad-diagram {
|
||
font-family: ${e};
|
||
font-size: ${r}px;
|
||
}
|
||
|
||
.railroad-terminal rect {
|
||
fill: ${n};
|
||
stroke: ${a};
|
||
stroke-width: ${d}px;
|
||
}
|
||
|
||
.railroad-terminal text {
|
||
fill: ${i};
|
||
font-family: ${e};
|
||
font-size: ${r}px;
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
}
|
||
|
||
.railroad-nonterminal rect {
|
||
fill: ${s};
|
||
stroke: ${o};
|
||
stroke-width: ${d}px;
|
||
}
|
||
|
||
.railroad-nonterminal text {
|
||
fill: ${u};
|
||
font-family: ${e};
|
||
font-size: ${r}px;
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
}
|
||
|
||
.railroad-line {
|
||
stroke: ${h};
|
||
stroke-width: ${d}px;
|
||
fill: none;
|
||
}
|
||
|
||
.railroad-start circle,
|
||
.railroad-end circle {
|
||
fill: ${f};
|
||
}
|
||
|
||
.railroad-comment ellipse {
|
||
fill: ${p};
|
||
stroke: ${g};
|
||
stroke-width: ${d}px;
|
||
}
|
||
|
||
.railroad-comment text {
|
||
fill: ${m};
|
||
font-style: italic;
|
||
font-family: ${e};
|
||
font-size: ${r}px;
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
}
|
||
|
||
.railroad-special rect {
|
||
fill: ${y};
|
||
stroke: ${v};
|
||
stroke-width: ${d}px;
|
||
stroke-dasharray: 5,3;
|
||
}
|
||
|
||
.railroad-special text {
|
||
fill: ${u};
|
||
font-family: ${e};
|
||
font-size: ${r}px;
|
||
text-anchor: middle;
|
||
dominant-baseline: middle;
|
||
}
|
||
|
||
.railroad-rule-name {
|
||
font-weight: bold;
|
||
fill: ${b};
|
||
font-family: ${e};
|
||
font-size: ${r}px;
|
||
}
|
||
|
||
.railroad-group {
|
||
/* Grouping container, no specific styles */
|
||
}
|
||
`},"getStyles"),yu=(lx=class{constructor(){this.d=""}moveTo(e,r){return this.d+=`M ${e} ${r} `,this}lineTo(e,r){return this.d+=`L ${e} ${r} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,r,n,a,i,s,o){return this.d+=`A ${e} ${r} ${n} ${a?1:0} ${i?1:0} ${s} ${o} `,this}build(){return this.d.trim()}},l(lx,"PathBuilder"),_(lx,"PathBuilder"),lx),Sbr=(cx=class{constructor(e,r=vre()){this.textCache=new Map,this.svg=e,this.config=r}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);const r=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),n=r.node().getBBox(),a={width:n.width,height:n.height};return r.remove(),this.textCache.set(e,a),a}renderTerminal(e,r){const n=this.measureText(r),a=n.width+this.config.padding*2,i=n.height+this.config.padding*2,s=e.append("g").attr("class","railroad-terminal");return s.append("rect").attr("x",0).attr("y",0).attr("width",a).attr("height",i).attr("rx",10).attr("ry",10),s.append("text").attr("x",a/2).attr("y",i/2).text(r),{element:s.node(),dimensions:{width:a,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,r){const n=this.measureText(r),a=n.width+this.config.padding*2,i=n.height+this.config.padding*2,s=e.append("g").attr("class","railroad-nonterminal");return s.append("rect").attr("x",0).attr("y",0).attr("width",a).attr("height",i),s.append("text").attr("x",a/2).attr("y",i/2).text(r),{element:s.node(),dimensions:{width:a,height:i,up:i/2,down:i/2}}}renderSequence(e,r){const n=r.map(h=>this.renderExpression(e,h));let a=0,i=0,s=0;for(const h of n)a+=h.dimensions.width,i=Math.max(i,h.dimensions.up),s=Math.max(s,h.dimensions.down);a+=(n.length-1)*this.config.horizontalSeparation;const o=e.append("g").attr("class","railroad-sequence");let u=0;for(let h=0;h<n.length;h++){const d=n[h],f=i-d.dimensions.up;if(o.node().appendChild(d.element).setAttribute("transform",`translate(${u}, ${f})`),h<n.length-1){const g=u+d.dimensions.width,m=g+this.config.horizontalSeparation,y=i;o.append("path").attr("class","railroad-line").attr("d",new yu().moveTo(g,y).lineTo(m,y).build())}u+=d.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:a,height:i+s,up:i,down:s}}}renderChoice(e,r){const n=r.map(p=>this.renderExpression(e,p));let a=0,i=0;for(const p of n)a=Math.max(a,p.dimensions.width),i+=p.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;const s=this.config.arcRadius,o=s*4,u=a+o,h=e.append("g").attr("class","railroad-choice");let d=0;const f=i/2;for(const p of n){const g=d,m=g+p.dimensions.up,y=s*2+(a-p.dimensions.width)/2;h.node().appendChild(p.element).setAttribute("transform",`translate(${y}, ${g})`);const b=new yu,w=m>f;m===f?b.moveTo(0,f).lineTo(y,m):b.moveTo(0,f).arcTo(s,s,0,!1,w,s,f+(w?s:-s)).lineTo(s,m-(w?s:-s)).arcTo(s,s,0,!1,!w,s*2,m).lineTo(y,m),h.append("path").attr("class","railroad-line").attr("d",b.build());const x=new yu,T=y+p.dimensions.width,C=u-s*2;m===f?x.moveTo(T,m).lineTo(u,f):x.moveTo(T,m).lineTo(C,m).arcTo(s,s,0,!1,!w,u-s,m+(w?-s:s)).lineTo(u-s,f+(w?s:-s)).arcTo(s,s,0,!1,w,u,f),h.append("path").attr("class","railroad-line").attr("d",x.build()),d+=p.dimensions.height+this.config.verticalSeparation}return{element:h.node(),dimensions:{width:u,height:i,up:f,down:i-f}}}renderOptional(e,r){const n=this.renderExpression(e,r),a=this.config.arcRadius,i=a*2,s=n.dimensions.width+a*4,o=n.dimensions.height+i,u=e.append("g").attr("class","railroad-optional"),h=a*2,d=i;u.node().appendChild(n.element).setAttribute("transform",`translate(${h}, ${d})`);const p=d+n.dimensions.up,g=new yu().moveTo(0,p).lineTo(a*2,p);u.append("path").attr("class","railroad-line").attr("d",g.build());const m=new yu().moveTo(h+n.dimensions.width,p).lineTo(s,p);u.append("path").attr("class","railroad-line").attr("d",m.build());const y=new yu().moveTo(0,p).arcTo(a,a,0,!1,!1,a,p-a).lineTo(a,a).arcTo(a,a,0,!1,!0,a*2,0).lineTo(s-a*2,0).arcTo(a,a,0,!1,!0,s-a,a).lineTo(s-a,p-a).arcTo(a,a,0,!1,!1,s,p);return u.append("path").attr("class","railroad-line").attr("d",y.build()),{element:u.node(),dimensions:{width:s,height:o,up:p,down:o-p}}}renderRepetition(e,r,n){const a=this.renderExpression(e,r),i=this.config.arcRadius,s=i*2,o=a.dimensions.width+i*4,u=n===0,h=a.dimensions.height+s+(u?s:0),d=e.append("g").attr("class","railroad-repetition"),f=i*2,p=u?s:0;d.node().appendChild(a.element).setAttribute("transform",`translate(${f}, ${p})`);const m=p+a.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",new yu().moveTo(0,m).lineTo(i*2,m).build()),d.append("path").attr("class","railroad-line").attr("d",new yu().moveTo(f+a.dimensions.width,m).lineTo(o,m).build());const y=p+a.dimensions.height+i,v=new yu().moveTo(f+a.dimensions.width,m).arcTo(i,i,0,!1,!0,f+a.dimensions.width+i,m+i).lineTo(f+a.dimensions.width+i,y).arcTo(i,i,0,!1,!0,f+a.dimensions.width,y+i).lineTo(i*2,y+i).arcTo(i,i,0,!1,!0,i,y).lineTo(i,m+i).arcTo(i,i,0,!1,!0,i*2,m);if(d.append("path").attr("class","railroad-line").attr("d",v.build()),u){const b=new yu().moveTo(0,m).arcTo(i,i,0,!1,!1,i,m-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,m-i).arcTo(i,i,0,!1,!1,o,m);d.append("path").attr("class","railroad-line").attr("d",b.build())}return{element:d.node(),dimensions:{width:o,height:h,up:m,down:h-m}}}renderSpecial(e,r){const n=this.measureText("? "+r+" ?"),a=n.width+this.config.padding*2,i=n.height+this.config.padding*2,s=e.append("g").attr("class","railroad-special");return s.append("rect").attr("x",0).attr("y",0).attr("width",a).attr("height",i),s.append("text").attr("x",a/2).attr("y",i/2).text("? "+r+" ?"),{element:s.node(),dimensions:{width:a,height:i,up:i/2,down:i/2}}}renderExpression(e,r){switch(r.type){case"terminal":return this.renderTerminal(e,r.value);case"nonterminal":return this.renderNonTerminal(e,r.name);case"sequence":return this.renderSequence(e,r.elements);case"choice":return this.renderChoice(e,r.alternatives);case"optional":return this.renderOptional(e,r.element);case"repetition":return this.renderRepetition(e,r.element,r.min);case"special":return this.renderSpecial(e,r.text);default:throw new Error(`Unknown node type: ${r.type}`)}}renderRule(e,r){const n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${r})`),a=e.name+" =",i=this.measureText(a).width+20,s=i+20,o=n.append("g"),u=this.renderExpression(o,e.definition),h=Math.max(20,u.dimensions.up),d=h-u.dimensions.up;return o.attr("transform",`translate(${s}, ${d})`),n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",h).text(a),n.append("g").attr("class","railroad-start").append("circle").attr("cx",i).attr("cy",h).attr("r",this.config.markerRadius),n.append("g").attr("class","railroad-end").append("circle").attr("cx",s+u.dimensions.width+10).attr("cy",h).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",new yu().moveTo(i+this.config.markerRadius,h).lineTo(s,h).build()),n.append("path").attr("class","railroad-line").attr("d",new yu().moveTo(s+u.dimensions.width,h).lineTo(s+u.dimensions.width+10-this.config.markerRadius,h).build()),{height:Math.max(40,d+u.dimensions.height+this.config.padding*2),width:s+u.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let r=this.config.padding,n=0;for(const a of e){const i=this.renderRule(a,r);r+=i.height+this.config.verticalSeparation,n=Math.max(n,i.width)}return{width:n+this.config.padding*2,height:r+this.config.padding}}},l(cx,"RailroadRenderer"),_(cx,"RailroadRenderer"),cx),Sqe=_((t,e,r)=>{yi(t,e.height,e.width,r),t.attr("viewBox",`0 0 ${e.width} ${e.height}`)},"configureRailroadSvgSize"),_br=_((t,e,r)=>{var n;Le.debug(`[Railroad] Rendering diagram
|
||
`+t);try{const a=$o(e);a.attr("class","railroad-diagram");const i=Ar().railroad,s=(n=i==null?void 0:i.useMaxWidth)!=null?n:!0,o=Xa.getRules();if(Le.debug(`[Railroad] Rendering ${o.length} rules`),o.length===0){Le.warn("[Railroad] No rules to render"),Sqe(a,{height:100,width:200},s);return}const h=new Sbr(a,vre()).renderDiagram(o);Sqe(a,h,s),Le.debug("[Railroad] Render complete")}catch(a){throw Le.error("[Railroad] Render error:",a),a}},"draw"),NR={draw:_br},kbr=tee().Railroad.parser.LangiumParser,vC=_(t=>{switch(t.$type){case"RailroadTerminalExpr":return{type:"terminal",value:t.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:t.name};case"RailroadSpecialExpr":return{type:"special",text:t.text};case"RailroadSequenceExpr":{const e=t.elements.map(vC);return e.length===1?e[0]:{type:"sequence",elements:e}}case"RailroadChoiceExpr":{const e=t.alternatives.map(vC);return e.length===1?e[0]:{type:"choice",alternatives:e}}case"RailroadOptionalExpr":return{type:"optional",element:vC(t.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:vC(t.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:vC(t.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${t.$type}`)}},"transformExpression"),Abr=_(t=>({name:t.name,definition:vC(t.definition)}),"transformRule"),Nbr=_(t=>{hl(t,Xa),t.title&&Xa.setTitle(t.title),t.rules.map(e=>Xa.addRule(Abr(e)))},"populateDb"),Ibr={parse:_(t=>{Xa.clear(),Le.debug("[Railroad Parser] Starting Langium parse");const e=kbr.parse(t);if(e.lexerErrors.length>0||e.parserErrors.length>0)throw new uk(e);const r=e.value;Le.debug("[Railroad Parser] Parsed rules:",r.rules.length),Nbr(r),Le.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:Xa}},Lbr={parser:Ibr,db:Xa,renderer:NR,styles:AR},$br=Object.freeze({__proto__:null,diagram:Lbr}),Mbr=ree().RailroadEbnf.parser.LangiumParser,IR=_(t=>{const e=t.alternatives.map(Pbr);return e.length===1?e[0]:{type:"choice",alternatives:e}},"transformChoice"),Pbr=_(t=>{const e=t.elements.map(Obr);return e.length===1?e[0]:{type:"sequence",elements:e}},"transformSequence"),_qe=_(t=>{switch(t.$type){case"EbnfTerminal":return{type:"terminal",value:t.value};case"EbnfNonTerminal":return{type:"nonterminal",name:t.name};case"EbnfSpecial":return{type:"special",text:t.text};case"EbnfGroup":return IR(t.element);case"EbnfOptional":return{type:"optional",element:IR(t.element)};case"EbnfRepetition":return{type:"repetition",element:IR(t.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${t.$type}`)}},"transformPrimary"),Rbr=_((t,e)=>{switch(e.$type){case"EbnfOptionalPostfix":return{type:"optional",element:t};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:t,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:t,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[t,{type:"terminal",value:"-"},_qe(e.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${e.$type}`)}},"transformPostfix"),Obr=_(t=>t.postfixes.reduce((e,r)=>Rbr(e,r),_qe(t.base)),"transformTerm"),Dbr=_(t=>({name:t.name,definition:IR(t.definition)}),"transformRule"),Fbr=_(t=>{hl(t,Xa),t.title&&Xa.setTitle(t.title),t.rules.map(e=>Xa.addRule(Dbr(e)))},"populateDb"),Bbr={parse:_(t=>{Xa.clear(),Le.debug("[EBNF Parser] Starting Langium parse");const e=Mbr.parse(t);if(e.lexerErrors.length>0||e.parserErrors.length>0)throw new uk(e);const r=e.value;Le.debug("[EBNF Parser] Parsed rules:",r.rules.length),Fbr(r),Le.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:Xa}},zbr={parser:Bbr,db:Xa,renderer:NR,styles:AR},Hbr=Object.freeze({__proto__:null,diagram:zbr}),Wbr=nee().RailroadAbnf.parser.LangiumParser,bre=_(t=>{const e=t.alternatives.map(Vbr);return e.length===1?e[0]:{type:"choice",alternatives:e}},"transformAlternation"),Vbr=_(t=>{const e=t.elements.map(qbr);return e.length===1?e[0]:{type:"sequence",elements:e}},"transformConcatenation"),Gbr=_(t=>{if(t.includes("*")){const[r,n]=t.split("*"),a=r?parseInt(r,10):0,i=n?parseInt(n,10):1/0;return{min:a,max:i}}const e=parseInt(t,10);return{min:e,max:e}},"parseRepeat"),qbr=_(t=>{const e=Ybr(t.primary);if(!t.repeat)return e;const{min:r,max:n}=Gbr(t.repeat);return r===0&&n===1?{type:"optional",element:e}:{type:"repetition",element:e,min:r,max:n}},"transformElement"),Ybr=_(t=>{switch(t.$type){case"AbnfStringLiteral":return{type:"terminal",value:t.value};case"AbnfNumVal":return{type:"terminal",value:t.value};case"AbnfRuleName":return{type:"nonterminal",name:t.name};case"AbnfGroup":return bre(t.element);case"AbnfOptionalGroup":return{type:"optional",element:bre(t.element)};default:throw new Error(`Unsupported ABNF primary node: ${t.$type}`)}},"transformPrimary"),Ubr=_(t=>({name:t.name,definition:bre(t.definition)}),"transformRule"),jbr=_(t=>{hl(t,Xa),t.title&&Xa.setTitle(t.title),t.rules.map(e=>Xa.addRule(Ubr(e)))},"populateDb"),Kbr={parse:_(t=>{Xa.clear(),Le.debug("[ABNF Parser] Starting Langium parse");const e=Wbr.parse(t);if(e.lexerErrors.length>0||e.parserErrors.length>0)throw new uk(e);const r=e.value;Le.debug("[ABNF Parser] Parsed rules:",r.rules.length),jbr(r),Le.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:Xa}},Xbr={parser:Kbr,db:Xa,renderer:NR,styles:AR},Zbr=Object.freeze({__proto__:null,diagram:Xbr}),Qbr=aee().RailroadPeg.parser.LangiumParser,kqe=_(t=>{const e=t.alternatives.map(Jbr);return e.length===1?e[0]:{type:"choice",alternatives:e}},"transformOrderedChoice"),Jbr=_(t=>{const e=t.elements.map(exr);return e.length===1?e[0]:{type:"sequence",elements:e}},"transformSequence"),exr=_(t=>{const e=txr(t.suffix);return t.operator?{type:"special",text:t.operator==="&"?`&${Aqe(e)}`:`!${Aqe(e)}`}:e},"transformPrefix"),Aqe=_(t=>{switch(t.type){case"terminal":return`"${t.value}"`;case"nonterminal":return t.name;case"special":return t.text;default:return"(...)"}},"nodeToLabel"),txr=_(t=>{const e=rxr(t.primary);if(!t.operator)return e;switch(t.operator){case"?":return{type:"optional",element:e};case"*":return{type:"repetition",element:e,min:0,max:1/0};case"+":return{type:"repetition",element:e,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${t.operator}`)}},"transformSuffix"),rxr=_(t=>{switch(t.$type){case"PegLiteral":return{type:"terminal",value:t.value};case"PegIdentifier":return{type:"nonterminal",name:t.name};case"PegGroup":return kqe(t.element);case"PegAny":return{type:"special",text:t.dot};default:throw new Error(`Unsupported PEG primary node: ${t.$type}`)}},"transformPrimary"),nxr=_(t=>({name:t.name,definition:kqe(t.definition)}),"transformRule"),axr=_(t=>{hl(t,Xa),t.title&&Xa.setTitle(t.title),t.rules.map(e=>Xa.addRule(nxr(e)))},"populateDb"),ixr={parse:_(t=>{Xa.clear(),Le.debug("[PEG Parser] Starting Langium parse");const e=Qbr.parse(t);if(e.lexerErrors.length>0||e.parserErrors.length>0)throw new uk(e);const r=e.value;Le.debug("[PEG Parser] Parsed rules:",r.rules.length),axr(r),Le.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:Xa}},sxr={parser:ixr,db:Xa,renderer:NR,styles:AR},oxr=Object.freeze({__proto__:null,diagram:sxr}),lxr=1;function xre(){if(typeof globalThis!="undefined")return globalThis}l(xre,"getCaptureGlobal"),_(xre,"getCaptureGlobal");function Nqe(){var t;return!!((t=xre())!=null&&t.mermaidCaptureSizes)}l(Nqe,"shouldCaptureSizes"),_(Nqe,"shouldCaptureSizes");function Iqe(){return typeof location=="undefined"?"browser-dev":`${location.pathname}${location.search}`}l(Iqe,"capturedFromLocation"),_(Iqe,"capturedFromLocation");function Lqe(t,e){var o,u,h;const r=xre();if(!r)return;const n=e.node(),a=(o=n&&"ownerSVGElement"in n?n.ownerSVGElement:null)!=null?o:n,i=(u=a==null?void 0:a.id)!=null?u:"(unknown)";(h=r.mermaidCapturedSizes)!=null||(r.mermaidCapturedSizes=[]);const s={svgId:i,sizes:t};r.mermaidCapturedSizes.push(s),r.mermaidLastCapturedSizes=s}l(Lqe,"emitCapturedSizes"),_(Lqe,"emitCapturedSizes");function $qe(t,e){var n,a;const r=[];for(const i of e.nodes)i.isGroup||r.push({id:i.id,width:(n=i.width)!=null?n:0,height:(a=i.height)!=null?a:0});r.length!==0&&Lqe({metadata:{captureVersion:lxr,capturedAt:new Date().toISOString(),capturedFrom:Iqe()},nodes:r},t)}l($qe,"captureNodeSizes"),_($qe,"captureNodeSizes");var cxr=Object.freeze({__proto__:null,captureNodeSizes:$qe,shouldCaptureSizes:Nqe}),uxr=Object.freeze({__proto__:null,InfoModule:kBe,createInfoServices:ABe}),hxr=Object.freeze({__proto__:null,PacketModule:NBe,createPacketServices:IBe}),dxr=Object.freeze({__proto__:null,PieModule:LBe,createPieServices:$Be}),fxr=Object.freeze({__proto__:null,TreeViewModule:MBe,createTreeViewServices:PBe}),pxr=Object.freeze({__proto__:null,ArchitectureModule:RBe,createArchitectureServices:OBe}),gxr=Object.freeze({__proto__:null,GitGraphModule:SBe,createGitGraphServices:_Be}),mxr=Object.freeze({__proto__:null,EventModelingModule:WBe,createEventModelingServices:VBe}),yxr=Object.freeze({__proto__:null,RadarModule:cBe,createRadarServices:uBe}),vxr=Object.freeze({__proto__:null,RailroadModule:dBe,createRailroadServices:tee}),bxr=Object.freeze({__proto__:null,RailroadEbnfModule:pBe,createRailroadEbnfServices:ree}),xxr=Object.freeze({__proto__:null,RailroadAbnfModule:gBe,createRailroadAbnfServices:nee}),wxr=Object.freeze({__proto__:null,RailroadPegModule:yBe,createRailroadPegServices:aee}),Txr=Object.freeze({__proto__:null,TreemapModule:bBe,createTreemapServices:xBe}),Exr=Object.freeze({__proto__:null,WardleyModule:wBe,createWardleyServices:TBe}),Cxr=Object.freeze({__proto__:null,CynefinModule:EBe,createCynefinServices:CBe});return Tge}(React,ReactDOM);
|