@zh-xx/antu 0.16.2 → 0.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/antu.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // Antu 0.16.2
2
+ // Antu 0.16.4
3
3
  // Copyright (C) 2026 Ji Cheng
4
4
  //
5
5
  // Antu is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public
@@ -13,9 +13,9 @@
13
13
  // publish them, or sell them on any terms you like. This licence covers Antu's code in the page, and the notices in
14
14
  // the page must stay with it.
15
15
  //
16
- // Corresponding Source of this version: https://github.com/zh-xx/Antu/tree/v0.16.2
17
- // The licence: https://github.com/zh-xx/Antu/blob/v0.16.2/LICENSE
18
- // Third-party notices: https://github.com/zh-xx/Antu/blob/v0.16.2/skills/antu/THIRD-PARTY-NOTICES.md
16
+ // Corresponding Source of this version: https://github.com/zh-xx/Antu/tree/v0.16.4
17
+ // The licence: https://github.com/zh-xx/Antu/blob/v0.16.4/LICENSE
18
+ // Third-party notices: https://github.com/zh-xx/Antu/blob/v0.16.4/skills/antu/THIRD-PARTY-NOTICES.md
19
19
  //
20
20
  // === The licence of Antu ===
21
21
  //
@@ -1423,7 +1423,7 @@
1423
1423
  // SOFTWARE.
1424
1424
  // ````
1425
1425
  //
1426
- import{execFileSync as e,spawn as t,spawnSync as n}from"node:child_process";import{existsSync as r,mkdtempSync as i,readFileSync as a,rmSync as o,statSync as s,writeFileSync as c}from"node:fs";import{tmpdir as l}from"node:os";import{basename as u,dirname as d,join as f,resolve as p}from"node:path";import{fileURLToPath as m,pathToFileURL as h}from"node:url";import{createHash as g}from"node:crypto";var _=Object.create,v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,x=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,C=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),ee=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=b(t),a=0,o=i.length,s;a<o;a++)s=i[a],!S.call(e,s)&&s!==n&&v(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=y(t,s))||r.enumerable});return e},w=(e,t,n)=>(n=e==null?{}:_(x(e)),ee(t||!e||!e.__esModule||!S.call(e,`default`)?v(n,`default`,{value:e,enumerable:!0}):n,e)),te=(e,t=8)=>Math.ceil(e/t-1e-9)*t,ne={minH:40,minW:120,stepW:40,gap:24,levelGap:48,padX:12,padY:6},re={hair:.75,normal:1.1,strong:1.75,heavy:2.5},ie={solid:void 0,dashed:`6 4`,dotted:`2 3`,longDash:`10 4`,dashDot:`10 3 2 3`},ae=e=>Math.max(ne.minW,Math.ceil(e/ne.stepW-1e-9)*ne.stepW),oe=e=>Math.max(ne.minH,te(e)),se=[`document`,`modern`,`legal`,`dark`],ce={equity:{width:re.normal},control:{width:re.heavy},contract:{width:re.normal,dash:ie.longDash},debt:{width:re.strong,dash:ie.dashDot},guarantee:{width:re.normal,dash:ie.dashed},kinship:{width:3.6,double:!0},employment:{width:re.normal,dash:ie.dotted},agency:{width:re.strong,dash:`1 4`,round:!0},other:{width:re.hair,dash:`3 3`}},le={equity:{width:.85},control:{width:1.9},contract:{width:.85,dash:`5 3`},debt:{width:1.3,dash:`5 2 1.5 2`},guarantee:{width:.85,dash:`4 3`},kinship:{width:3.2,double:!0},employment:{width:.85,dash:ie.dotted},agency:{width:1.3,dash:`1 4`,round:!0},other:{width:.6,dash:`3 3`}},ue=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...n,stroke:t}])),de={neutral:{width:re.normal},positive:{width:re.strong},negative:{width:re.normal,dash:ie.dashed}},fe={main:{width:re.strong},plain:{width:re.normal},back:{width:re.normal,dash:ie.dashed}},pe={conclusion:{width:re.heavy},norm:{width:re.normal},element:{width:re.normal},fact:{width:re.hair},inference:{width:re.normal,dash:ie.dotted},judgement:{width:re.strong}},me={for:{width:re.normal},against:{width:re.strong,dash:ie.dashed},basis:{width:re.normal,dash:ie.dotted}},he=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...n,...t[e]}])),ge={document:{id:`document`,scheme:`light`,shadowRgb:`17, 17, 17`,chrome:{radius:2,capsule:2,chip:2,bg:`#ffffff`,bgPop:`#ffffff`,border:`1px solid #111111`,shadow:`none`,blur:`none`},labelKey:`theme.document`,font:{body:`"FangSong", "STFangsong", "FangSong_GB2312", "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif`,head:`"SimHei", "Heiti SC", "STHeiti", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#111111`,ink2:`#2b2b2b`,ink3:`#4d4d4d`,ink4:`#767676`,bg:`#ffffff`,canvas:`#ffffff`,frame:`#111111`,line:`#c9c9c9`,chip:`#f0f0f0`,side1:`#111111`,side2:`#555555`,axis:`#767676`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:18,company:3,organization:3,government:3,other:3,pill:2,group:12},entity:{person:{stroke:`#111111`,fill:`#ffffff`,width:1.3},company:{stroke:`#111111`,fill:`#ffffff`,width:1.6},organization:{stroke:`#111111`,fill:`#ffffff`,width:1.3,dash:ie.dashed},government:{stroke:`#111111`,fill:`#ffffff`,width:1.3},other:{stroke:`#555555`,fill:`#ffffff`,width:1.1,dash:ie.dotted}},relation:ue(le,`#767676`),camp:[{fill:`#ffffff`,stroke:`#111111`,text:`#111111`},{fill:`#ececec`,stroke:`#111111`,text:`#111111`},{fill:`#f7f7f7`,stroke:`#8a8a8a`,text:`#4d4d4d`}],group:{fill:`#f5f5f5`,stroke:`#8a8a8a`,title:`#111111`},campBox:{fill:`none`,stroke:`#111111`,width:.75,dash:`2 3`},flow:{outcome:he(de,{neutral:{stroke:`#111111`,fill:`#ffffff`},positive:{stroke:`#111111`,fill:`#ffffff`},negative:{stroke:`#111111`,fill:`#ececec`}}),start:{stroke:`#111111`,fill:`#e2e2e2`},state:{warn:{stroke:`#a16207`,fill:`#fef3c7`},stop:{stroke:`#b91c1c`,fill:`#fee2e2`},done:{stroke:`#15803d`,fill:`#dcfce7`}},note:{stroke:`none`,fill:`#f5f5f5`,fold:`#767676`},stage:{fill:`#f5f5f5`,stroke:`#8a8a8a`,title:`#111111`},stageLit:{fill:`#e2e2e2`,stroke:`#111111`,title:`#111111`},link:he(fe,{main:{stroke:`#111111`},plain:{stroke:`#2b2b2b`},back:{stroke:`#4d4d4d`}})},justify:{node:he(pe,{conclusion:{stroke:`#111111`,fill:`#ffffff`},norm:{stroke:`#111111`,fill:`#ececec`},element:{stroke:`#111111`,fill:`#ffffff`},fact:{stroke:`#111111`,fill:`#ffffff`},inference:{stroke:`#111111`,fill:`#ffffff`},judgement:{stroke:`#111111`,fill:`#ececec`}}),stance:he(me,{for:{stroke:`#2b2b2b`},against:{stroke:`#111111`},basis:{stroke:`#4d4d4d`}})},pill:{colored:!1,border:`#111111`}},modern:{id:`modern`,scheme:`light`,shadowRgb:`15, 23, 42`,chrome:{radius:14,capsule:999,chip:999,bg:`rgba(255, 255, 255, 0.78)`,bgPop:`rgba(255, 255, 255, 0.94)`,border:`1px solid rgba(15, 23, 42, 0.07)`,shadow:`0 4px 18px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06)`,blur:`blur(16px) saturate(1.8)`},labelKey:`theme.modern`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#0f172a`,ink2:`#475569`,ink3:`#64748b`,ink4:`#94a3b8`,bg:`#fbfcfd`,canvas:`#fbfcfd`,frame:`#e2e8f0`,line:`#e8ebef`,chip:`#f1f4f8`,side1:`#475569`,side2:`#64748b`,axis:`#94a3b8`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:14,company:8,organization:8,government:6,other:8,pill:12,group:12},entity:{person:{stroke:`#94a3b8`,fill:`#f1f5f9`,width:1},company:{stroke:`#334155`,fill:`#ffffff`,width:1.25},organization:{stroke:`#94a3b8`,fill:`#ffffff`,width:1,dash:ie.dashed},government:{stroke:`#64748b`,fill:`#f8fafc`,width:1},other:{stroke:`#94a3b8`,fill:`#f8fafc`,width:.9,dash:ie.dotted}},relation:ue(ce,`#475569`),camp:[{fill:`#f1f5f9`,stroke:`#94a3b8`,text:`#334155`},{fill:`#ffffff`,stroke:`#94a3b8`,text:`#334155`},{fill:`#f8fafc`,stroke:`#e2e8f0`,text:`#64748b`}],group:{fill:`#f8fafc`,stroke:`#e2e8f0`,title:`#475569`},campBox:{fill:`#f8fafc`,stroke:`#e2e8f0`,width:1},flow:{outcome:he(de,{neutral:{stroke:`#64748b`,fill:`#f8fafc`},positive:{stroke:`#334155`,fill:`#f1f5f9`},negative:{stroke:`#64748b`,fill:`#f1f5f9`}}),start:{stroke:`#334155`,fill:`#e2e8f0`},state:{warn:{stroke:`#b45309`,fill:`#fffbeb`},stop:{stroke:`#be123c`,fill:`#fff1f2`},done:{stroke:`#047857`,fill:`#ecfdf5`}},note:{stroke:`none`,fill:`#f1f5f9`,fold:`#94a3b8`},stage:{fill:`#f8fafc`,stroke:`#e2e8f0`,title:`#475569`},stageLit:{fill:`#f1f5f9`,stroke:`#64748b`,title:`#334155`},link:he(fe,{main:{stroke:`#0f172a`},plain:{stroke:`#475569`},back:{stroke:`#64748b`}})},justify:{node:he(pe,{conclusion:{stroke:`#0f172a`,fill:`#f1f5f9`},norm:{stroke:`#475569`,fill:`#e2e8f0`},element:{stroke:`#64748b`,fill:`#f8fafc`},fact:{stroke:`#94a3b8`,fill:`#ffffff`},inference:{stroke:`#64748b`,fill:`#f8fafc`},judgement:{stroke:`#334155`,fill:`#e2e8f0`}}),stance:he(me,{for:{stroke:`#475569`},against:{stroke:`#334155`},basis:{stroke:`#94a3b8`}})},pill:{colored:!1,border:`#cbd5e1`}},legal:{id:`legal`,scheme:`light`,shadowRgb:`19, 35, 63`,chrome:{radius:6,capsule:6,chip:4,bg:`#ffffff`,bgPop:`#ffffff`,border:`1px solid #c7d2e4`,shadow:`0 2px 10px rgba(19, 35, 63, 0.10)`,blur:`none`},labelKey:`theme.legal`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#13233f`,ink2:`#2d4366`,ink3:`#5b6f8f`,ink4:`#8aa0c4`,bg:`#ffffff`,canvas:`#ffffff`,frame:`#c7d2e4`,line:`#dbe3f0`,chip:`#eef3fb`,side1:`#1f3f7f`,side2:`#9a1b1b`,axis:`#8aa0c4`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:14,company:3,organization:4,government:3,other:4,pill:4,group:6},entity:{person:{stroke:`#2f5aa8`,fill:`#eef3fb`,width:1},company:{stroke:`#1f3f7f`,fill:`#e3ecfa`,width:1.5},organization:{stroke:`#2f5aa8`,fill:`#f4f7fc`,width:1,dash:ie.dashed},government:{stroke:`#13233f`,fill:`#eef3fb`,width:1.1},other:{stroke:`#8aa0c4`,fill:`#f8fafd`,width:.9,dash:ie.dotted}},relation:{equity:{...ce.equity,stroke:`#1f3f7f`},control:{...ce.control,stroke:`#13233f`},contract:{...ce.contract,stroke:`#5b6f8f`},debt:{...ce.debt,stroke:`#9a1b1b`},guarantee:{...ce.guarantee,stroke:`#2f5aa8`},kinship:{...ce.kinship,stroke:`#4b3a8c`},employment:{...ce.employment,stroke:`#1d6b6b`},agency:{...ce.agency,stroke:`#1d6b6b`},other:{...ce.other,stroke:`#8aa0c4`}},camp:[{fill:`#eaf0fb`,stroke:`#9fb6e0`,text:`#1f3f7f`},{fill:`#fbecec`,stroke:`#e3b4b4`,text:`#9a1b1b`},{fill:`#f4f7fc`,stroke:`#c7d2e4`,text:`#5b6f8f`}],group:{fill:`#f4f7fc`,stroke:`#c7d2e4`,title:`#2d4366`},campBox:{fill:`#f4f7fc`,stroke:`#c7d2e4`,width:1},flow:{outcome:he(de,{neutral:{stroke:`#2f5aa8`,fill:`#eef3fb`},positive:{stroke:`#1f3f7f`,fill:`#e3ecfa`},negative:{stroke:`#9a1b1b`,fill:`#fbecec`}}),start:{stroke:`#13233f`,fill:`#dbe5f5`},state:{warn:{stroke:`#a16207`,fill:`#fdf6e3`},stop:{stroke:`#9a1b1b`,fill:`#fbecec`},done:{stroke:`#1f6f43`,fill:`#e8f4ec`}},note:{stroke:`none`,fill:`#f4f7fc`,fold:`#8aa0c4`},stage:{fill:`#f4f7fc`,stroke:`#c7d2e4`,title:`#2d4366`},stageLit:{fill:`#eaf0fb`,stroke:`#1f3f7f`,title:`#1f3f7f`},link:he(fe,{main:{stroke:`#13233f`},plain:{stroke:`#2d4366`},back:{stroke:`#5b6f8f`}})},justify:{node:he(pe,{conclusion:{stroke:`#1f3f7f`,fill:`#e3ecfa`},norm:{stroke:`#4b3a8c`,fill:`#efecf8`},element:{stroke:`#2f5aa8`,fill:`#eef3fb`},fact:{stroke:`#8aa0c4`,fill:`#f8fafd`},inference:{stroke:`#1d6b6b`,fill:`#e8f4f4`},judgement:{stroke:`#13233f`,fill:`#dbe5f5`}}),stance:he(me,{for:{stroke:`#2d4366`},against:{stroke:`#9a1b1b`},basis:{stroke:`#4b3a8c`}})},pill:{colored:!0,border:`#c7d2e4`}},dark:{id:`dark`,scheme:`dark`,shadowRgb:`226, 232, 240`,chrome:{radius:14,capsule:999,chip:999,bg:`rgba(24, 29, 37, 0.82)`,bgPop:`rgba(28, 34, 43, 0.96)`,border:`1px solid rgba(255, 255, 255, 0.09)`,shadow:`0 4px 18px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3)`,blur:`blur(16px) saturate(1.4)`},labelKey:`theme.dark`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#e6ebf2`,ink2:`#b6c0cf`,ink3:`#8b97a9`,ink4:`#6b778a`,bg:`#14181f`,canvas:`#14181f`,frame:`#2a3240`,line:`#262d38`,chip:`#1e2530`,side1:`#9fb3d1`,side2:`#7f8aa0`,axis:`#6b778a`,dots:`#232a35`,mini:`#4a5568`,miniGhost:`#232a35`,exportBg:`#14181f`,labelBg:`rgba(20, 24, 31, 0.85)`},radius:{person:14,company:8,organization:8,government:6,other:8,pill:12,group:12},entity:{person:{stroke:`#8b97a9`,fill:`#1f2733`,width:1},company:{stroke:`#cbd5e1`,fill:`#1a2029`,width:1.25},organization:{stroke:`#8b97a9`,fill:`#161b22`,width:1,dash:ie.dashed},government:{stroke:`#a3b0c4`,fill:`#1c2430`,width:1},other:{stroke:`#6b778a`,fill:`#171c24`,width:.9,dash:ie.dotted}},relation:ue(ce,`#a3b0c4`),camp:[{fill:`#1f2733`,stroke:`#6b778a`,text:`#d3dbe7`},{fill:`#161b22`,stroke:`#6b778a`,text:`#d3dbe7`},{fill:`#1a2029`,stroke:`#2f3846`,text:`#8b97a9`}],group:{fill:`#1a2029`,stroke:`#2f3846`,title:`#b6c0cf`},campBox:{fill:`#1a2029`,stroke:`#2f3846`,width:1},flow:{outcome:he(de,{neutral:{stroke:`#8b97a9`,fill:`#1a2029`},positive:{stroke:`#d3dbe7`,fill:`#1f2733`},negative:{stroke:`#8b97a9`,fill:`#1f2733`}}),start:{stroke:`#d3dbe7`,fill:`#2a3240`},state:{warn:{stroke:`#e0a63a`,fill:`#2e2410`},stop:{stroke:`#f0707a`,fill:`#33161a`},done:{stroke:`#4cc38a`,fill:`#10281d`}},note:{stroke:`none`,fill:`#1f2733`,fold:`#6b778a`},stage:{fill:`#1a2029`,stroke:`#2f3846`,title:`#b6c0cf`},stageLit:{fill:`#232c3a`,stroke:`#8b97a9`,title:`#e6ebf2`},link:he(fe,{main:{stroke:`#e6ebf2`},plain:{stroke:`#b6c0cf`},back:{stroke:`#8b97a9`}})},justify:{node:he(pe,{conclusion:{stroke:`#e6ebf2`,fill:`#1f2733`},norm:{stroke:`#b6c0cf`,fill:`#2a3240`},element:{stroke:`#8b97a9`,fill:`#1a2029`},fact:{stroke:`#6b778a`,fill:`#161b22`},inference:{stroke:`#8b97a9`,fill:`#1a2029`},judgement:{stroke:`#cbd5e1`,fill:`#2a3240`}}),stance:he(me,{for:{stroke:`#b6c0cf`},against:{stroke:`#e6ebf2`},basis:{stroke:`#6b778a`}})},pill:{colored:!1,border:`#3a4455`}}},_e=e=>Object.prototype.hasOwnProperty.call(ge,e),ve=new Map,ye=[`experimental`,`stable`,`deprecated`];function be(e,t){if(!e)throw Error(`registerKnowledge: type must not be empty`);if(!t?.validate)throw Error(`registerKnowledge: validate is required`);if(!t?.describe)throw Error(`registerKnowledge: describe is required (the agent-facing field table)`);if(!Number.isInteger(t.specVersion)||t.specVersion<1)throw Error(`registerKnowledge: specVersion is required, a whole number (the generation of this type's JSON format, core/specVersion.js)`);xe(e,t),ve.set(e,t)}function xe(e,t){let n=Object.keys(t.layouts??{}),r=Object.keys(t.diagrams??{});for(let t of n)if(!r.includes(t))throw Error(`registerKnowledge: ${e}/${t} has a layout but no entry in diagrams (version, status, since)`);for(let t of r)if(!n.includes(t))throw Error(`registerKnowledge: ${e}/${t} is in diagrams but has no layout`);for(let[n,r]of Object.entries(t.diagrams??{})){if(!Number.isInteger(r.version)||r.version<1)throw Error(`registerKnowledge: ${e}/${n}: version must be a whole number >= 1`);if(!ye.includes(r.status))throw Error(`registerKnowledge: ${e}/${n}: status must be one of ${ye.join(`, `)}`);if(!/^\d+\.\d+\.\d+$/.test(r.since??``))throw Error(`registerKnowledge: ${e}/${n}: since must be a release number such as 0.7.0`)}}function Se(e){let t=ve.get(e);return Object.entries(t?.diagrams??{}).map(([t,n])=>({type:e,kind:t,...n}))}function Ce(e){return ve.get(e)}function we(){return[...ve.entries()].map(([e,t])=>({type:e,labelKey:t.label??`graphType.${e}`}))}function Te(e){return ve.get(e)?.validate}function Ee(e,t){let n=ve.get(e)?.layouts;if(n)return t&&n[t]?n[t]:Object.values(n)[0]}function De(e){return Object.keys(ve.get(e)?.layouts??{})}var Oe=e=>({name:`specVersion`,req:`no`,ty:`integer`,note:`which generation of this format the file follows (now ${e}); omit = the current one. Write it: it is how an older file is recognised after a breaking change`});function ke(e,t){return e.specVersion===void 0?null:!Number.isInteger(e.specVersion)||e.specVersion<1?{key:`err.specVersionForm`,params:{value:JSON.stringify(e.specVersion)}}:Number.isInteger(t)&&e.specVersion>t?{key:`err.specVersionNewer`,params:{value:e.specVersion,known:t,type:e.type}}:null}var Ae={"common.none":`(none)`,"common.close":`Close`,"common.untitled":`Antu`,"fallback.invalidTitle":({n:e})=>`This data cannot be rendered (${e} problem${e===1?``:`s`})`,"fallback.noRendererTitle":({type:e})=>`No renderer registered for type = "${e}"`,"fallback.registered":({list:e})=>`Registered: ${e}`,"fallback.noInlineData":`No inline data found in this file. Something went wrong when it was generated; please regenerate the HTML.`,"fallback.devNoData":`The dev server received no data. Specify one with ?example=0 or ?spec=examples/some-file.json.`,"error.renderTitle":`Rendering failed`,"error.renderHint":`The data itself may be fine (validation passed); this rendering kind threw an error. Send the text below to the developer, or try another rendering kind.`,"info.span":({from:e,to:t})=>`${e} to ${t}`,"info.slots":({n:e})=>`${e} time slot${e===1?``:`s`}`,"info.actors":({n:e})=>`${e} part${e===1?`y`:`ies`}`,"info.sources":({n:e})=>`${e} source${e===1?``:`s`}`,"info.nodes":({n:e})=>`${e} node${e===1?``:`s`}`,"info.stages":({n:e})=>`${e} stage${e===1?``:`s`}`,"dock.actors":`Parties`,"dock.summary":`Summary`,"dock.sources":`Sources`,"dock.orientation":`Which way the levels run: vertical, top to bottom; horizontal, left to right.`,"dock.orientationCamps":`Which way the levels run: vertical, top to bottom; horizontal, left to right. With the camps boxed they stand across that way: side by side when vertical, one under the other when horizontal, so the picture can look the other way round.`,"dock.vertical":`Vertical`,"dock.horizontal":`Horizontal`,"dock.grid":`Grid`,"dock.stagger":`Stagger`,"dock.byParty":`Lane per party`,"dock.staggerHint":`Let cards in different columns overlap by half a row, so the diagram is shorter and its text larger`,"dock.exportImage":`Export image`,"dock.exporting":`Exporting…`,"dock.exportTitle":`Export the whole diagram as a PNG (2× resolution)`,"dock.lang":`Language`,"dock.fold":`Fold`,"dock.display":`Display`,"export.failed":({message:e})=>`Export failed: ${e}`,"dock.langEn":`EN`,"dock.langZh":`中文`,"card.sources":({n:e})=>`${e} source${e===1?``:`s`}`,"card.sourcesUnlisted":`No sources listed`,"card.sourcesList":({n:e,names:t})=>`${e} source${e===1?``:`s`}: ${t}`,"card.duration":({duration:e})=>`Duration ${e}`,"card.approxPrefix":`approx. `,"card.dateUnknown":`date unknown`,"card.unitDay":({n:e})=>`${e} day${e===1?``:`s`}`,"card.unitHour":({n:e})=>`${e} hour${e===1?``:`s`}`,"card.unitMinute":({n:e})=>`${e} min`,"card.unitSecond":({n:e})=>`${e} sec`,"card.ariaLabel":({label:e,date:t})=>t?`${e}, ${t}`:e,"card.dateNote":({note:e})=>`Time note: ${e}`,"card.previewHint":`Click a card to read the full text`,"flow.conditions":`Conditions`,"flow.detail":`Detail`,"flow.mainLine":`Main line`,"flow.states":`States`,"flow.stages":`Stages`,"flow.rules":`Rules`,"flow.linkStraight":`Straight`,"flow.linkCurved":`Curved`,"flow.linkStyle":`Link style`,"rule.tableTitle":`Rules`,"rule.tableNote":`What may happen along the way; not steps of the flow`,"rule.tableNoteContract":`What may happen while the contract runs; not steps of the flow`,"rule.colWhen":`If`,"rule.colThen":`Then`,"rule.colScope":`Stages`,"rule.groupEnd":({end:e})=>`May lead to “${e}”`,"rule.groupRest":`Other rules`,"rule.count":({n:e})=>`${e}`,"rule.anyOf":`Any of:`,"rule.tScopeAll":`Throughout`,"rule.tScopeRange":({from:e,to:t})=>`${e} → ${t}`,"flow.ruleBadge":({n:e})=>e===1?`1 rule`:`${e} rules`,"flow.noteTag":`Note`,"rule.if":`If`,"rule.or":`, or `,"flow.previewHint":`Click a node to read the full text`,"aria.nodeDefault":`Press enter or space to select this node.`,"aria.nodeKeyboardDisabled":`Press enter or space to select this node. Once selected, use the arrow keys to move it.`,"aria.nodeMoved":({x:e,y:t})=>`Node moved. New position: x ${e}, y ${t}`,"aria.edgeDefault":`Press enter or space to select this connection.`,"aria.controls":`Canvas controls`,"aria.zoomIn":`Zoom in`,"aria.zoomOut":`Zoom out`,"aria.fitView":`Fit view`,"aria.interactive":`Toggle interactivity`,"aria.minimap":`Minimap`,"aria.handle":`Connection point`,"sourceType.statute":`Statute`,"sourceType.case":`Case`,"sourceType.contract":`Contract`,"sourceType.evidence":`Evidence`,"sourceType.document":`Document`,"sourceType.web":`Web`,"sourceType.other":`Other`,"graphKind.timeline":`Timeline`,"graphKind.flow":`Flowchart`,"header.theme":`Theme`,"theme.document":`Document`,"theme.modern":`Modern`,"theme.legal":`Legal`,"theme.dark":`Dark`,"header.kindOpen":({n:e})=>`All ${e} ways of drawing`,"header.kindPrev":`Previous way of drawing`,"header.kindNext":`Next way of drawing`,"header.kindGroup":`Way of drawing`,"header.fold":`Fold the card`,"header.unfold":`Show the card`,"graphKind.chronicle":`Chronicle`,"graphKind.scale":`Time scale`,"scale.segment":({n:e,unit:t,count:n})=>`Segment ${e} · ${t} · ${n} event${n===1?``:`s`}`,"scale.unit.year":`by year`,"scale.unit.month":`by month`,"scale.unit.day":`by day`,"scale.unit.hour":`by hour`,"scale.unit.minute":`by minute`,"scale.other":`Other`,"scale.events":`Events`,"scale.undated":`date unknown · placed by order`,"scale.coarse.day":`that day (time unknown)`,"scale.coarse.month":`that month (day unknown)`,"scale.coarse.year":`that year (month unknown)`,"scale.run":({n:e})=>`${e} events`,"scale.runListed":({n:e})=>`${e} events too close to show one by one:`,"chronicle.gapSeconds":({n:e})=>`+${e} s`,"chronicle.gapMinutes":({n:e})=>`+${e} min`,"chronicle.gapHours":({n:e})=>`+${e} h`,"chronicle.gapHoursMinutes":({h:e,m:t})=>`+${e} h ${t} min`,"chronicle.gapDays":({n:e})=>`${e} day${e===1?``:`s`} later`,"chronicle.gapMonths":({n:e})=>`${e} month${e===1?``:`s`} later`,"chronicle.gapYears":({n:e})=>`${e} year${e===1?``:`s`} later`,"chronicle.gapYearsMonths":({y:e,m:t})=>`${e} yr ${t} mo later`,"chronicle.dateUnknown":`Date unknown`,"graphType.fact":`Fact`,"graphType.relationship":`Relationship`,"graphType.procedure":`Procedure`,"graphType.justification":`Justification`,"err.notObject":({at:e})=>`${e}: must be an object`,"err.notArray":({at:e})=>`${e} must be an array`,"err.required":({at:e,field:t})=>`${e}: missing required field \`${t}\``,"err.mustBeString":({at:e,field:t})=>`${e}: \`${t}\` must be a string`,"err.duplicateId":({at:e,id:t})=>`${e}: duplicate id "${t}"`,"err.missingRef":({at:e,field:t,kind:n,id:r})=>`${e}: ${t} refers to a non-existent ${n} "${r}"`,"err.tooManyGroups":({at:e,max:t,actual:n})=>`${e}: at most ${t} groups (the axis has two sides plus the centre), got ${n}`,"err.slotsEmpty":"`slots` must not be empty","err.slotEventsEmpty":({at:e})=>`${e}.events must not be empty (an empty time slot carries no meaning)`,"err.slotEventEmptyShape":({at:e})=>`${e}: must be an object of the form { events: [ … ] }`,"err.oneEventPerCell":({at:e,a:t,b:n})=>`${e}: two events share the same lane in one time slot ("${t}" and "${n}"); one cell holds one event`,"err.badDate":({at:e,field:t,value:n})=>`${e}: \`${t}\` is not ISO 8601 (e.g. 2017-05-02T09:24:03), got "${n}"`,"err.dateEndNeedsDate":({at:e})=>`${e}: \`dateEnd\` is written but \`date\` is not; a span needs its start`,"err.dateEndBeforeDate":({at:e,end:t,start:n})=>`${e}: \`dateEnd\` (${t}) is earlier than \`date\` (${n}); a span cannot run backwards`,"err.summaryTooLong":({at:e,max:t,actual:n})=>`${e}: \`summary\` is too wide for one line (about ${n} full-width characters, limit ${t}); shorten it or move the text to detail`,"err.groupNeedsOneActor":({at:e,groupId:t,n})=>`${e}: a side group ("${t}") must name exactly one party (currently ${n}); events that involve no particular party belong in the centre group or should omit groupId`,"err.multiActorNeedsAxis":({at:e,n:t,groupId:n})=>`${e}: an event with ${t} parties belongs on the centre axis, but groupId points at a side group ("${n}"); the two contradict each other`,"err.viewsRemoved":"`views` is no longer part of the format (placement rules v1): delete it. A diagram has one placement: with 2 or more parties, write `groupId` on each party (its side); with 1 party, on the events","err.actorNeedsGroup":({at:e,n:t})=>`${e}: the diagram has ${t} parties, so each party says which side it is on: write \`groupId\` with the 1st or the 2nd of \`groups\` (add \`groups\` if there are none)`,"err.actorGroupNotSide":({at:e,groupId:t})=>`${e}: \`groupId\` "${t}" is the 3rd group, the axis; a party belongs to the 1st or the 2nd group (a side)`,"err.actorGroupOneParty":({at:e})=>`${e}: a party carries \`groupId\` only when the diagram has 2 or more parties; with one party the groups split the events, so write \`groupId\` on the events`,"err.eventGroupWithParties":({at:e})=>`${e}: the diagram has 2 or more parties, so the groups belong to the parties and an event is placed by its \`actorIds\`: delete the event's \`groupId\` (one party → that party's side; several or none → the axis)`,"err.specNotObject":`a spec must be a JSON object`,"err.envelopeTypeRequired":"missing required field `type` (the engine uses it to pick a renderer)","err.envelopeTypeString":"`type` must be a string","err.envelopeTypeUnknown":'`type` is "{type}", which is not a diagram type; expected one of {list}',"err.envelopeTypeIsKind":'`type` is "{type}", which is a way of drawing a {owner} diagram, not a type: write `"type": "{owner}"` (the way it is drawn is chosen on the page, not in the JSON)',"err.envelopeTitleString":"`title` must be a string","err.specVersionForm":"`specVersion` must be a whole number from 1 up, got {value}","err.specVersionNewer":'`specVersion` is {value}, newer than this engine knows for "{type}" ({known}): update the engine, or write the file for the older format',"err.slotNotArray":"`slots` must be an array (one slot = one time point)","err.slotShape":({at:e})=>`${e}: must be an object of the form { events: [ … ] }`,"err.eventsNotArray":({at:e})=>`${e}.events must be an array`,"rerr.entitiesEmpty":"`entities` must not be empty (a diagram needs at least two parties)","rerr.relationsEmpty":"`relations` must not be empty (the parties have to be related)","rerr.notArray":({field:e})=>`\`${e}\` must be an array`,"rerr.notObject":({at:e})=>`${e}: must be an object`,"rerr.required":({at:e,field:t})=>`${e}: missing required field \`${t}\``,"rerr.duplicateId":({at:e,id:t,what:n})=>`${e}: id "${t}" duplicates an earlier ${n}`,"rerr.badEntityKind":({at:e,value:t,allowed:n})=>`${e}: kind is "${t}", which is not one of: ${n}`,"rerr.badRelationKind":({at:e,value:t,allowed:n})=>`${e}: kind is "${t}", which is not one of: ${n}`,"rerr.badSourceType":({at:e,value:t,allowed:n})=>`${e}: \`type\` "${t}" is not one of ${n}`,"rerr.mustBeString":({at:e,field:t})=>`${e}: \`${t}\` must be a non-empty string`,"rerr.mustBeBoolean":({at:e,field:t})=>`${e}: \`${t}\` must be true or false`,"rerr.badRef":({at:e,field:t,kind:n,id:r})=>`${e}: \`${t}\` refers to a non-existent ${n} "${r}"`,"rerr.badEnd":({at:e,end:t,id:n})=>`${e}: \`${t}\` refers to a non-existent entity "${n}"`,"rerr.selfRelation":({at:e,id:t})=>`${e}: an entity cannot be related to itself ("${t}" on both ends)`,"rerr.duplicateRelation":({at:e,from:t,to:n,kind:r})=>`${e}: duplicate relation ${t} -> ${n} (${r}, same label); give the second one its own label, or drop it`,"rerr.fieldNotHere":({at:e,field:t,kinds:n})=>`${e}: \`${t}\` only belongs on a relation of kind ${n}`,"rerr.badShare":({at:e,value:t})=>`${e}: \`share\` must be a number from 0 to 100, got ${t}`,"rerr.badSecures":({at:e,id:t})=>`${e}: \`secures\` refers to a non-existent relation "${t}"`,"rerr.securesNotClaim":({at:e,id:t,kind:n,claims:r})=>`${e}: \`secures\` points at relation "${t}", which is a ${n}; a guarantee secures a claim (${r})`,"rerr.badAsOf":({value:e})=>`asOf: "${e}" is not an ISO date (YYYY, YYYY-MM or YYYY-MM-DD)`,"rhint.shareOver100":({id:e,label:t,total:n})=>`entities (${e}): the shares held in "${t}" add up to ${n}%, more than the whole; check the figures or the source`,"rhint.isolated":({id:e,label:t})=>`entities (${e}): "${t}" has no relation to anyone, so it will float beside the diagram; relate it or drop it`,"rhint.noSecures":({id:e})=>`relations (${e}): a guarantee that does not say which claim it secures; add \`secures\` with that relation's id`,"rhint.tooLarge":({n:e,limit:t})=>`${e} entities: past about ${t} the diagram gets hard to read on one screen; consider splitting it by group`,"rhint.tooManyRelations":({n:e,limit:t})=>`${e} relations: past about ${t} the graph can take several seconds to draw (each change of orientation or groups draws it again); consider splitting it by group, or use another way of drawing`,"rhint.equityCycle":({path:e})=>`shareholdings loop back (${e}); allowed, but check it is what the registry says`,"rel.kind.equity":`Equity`,"rel.kind.control":`Control`,"rel.kind.contract":`Contracts`,"rel.kind.debt":`Debts`,"rel.kind.guarantee":`Guarantees`,"rel.kind.kinship":`Family`,"rel.kind.employment":`Employment`,"rel.kind.agency":`Agency`,"rel.kind.other":`Other`,"rel.kindChipTitle":({n:e})=>e===1?`Show or hide this kind (1 relation)`:`Show or hide this kind (${e} relations)`,"rel.labels":`Labels`,"rel.groups":`Groups`,"rel.previewHint":`Click a party to read the full text`,"rel.auto.equity":({share:e})=>e===void 0?`Holds shares`:`Holds ${e}%`,"rel.auto.control":`Controls`,"rel.auto.contract":({amount:e})=>e?`Contract, ${e}`:`Contract`,"rel.auto.debt":({amount:e})=>e?`Claim, ${e}`:`Claim`,"rel.auto.guarantee":`Guarantee`,"rel.auto.kinship":`Family`,"rel.auto.employment":`Employment`,"rel.auto.agency":`Agency`,"rel.auto.other":`Related`,"info.entities":({n:e})=>`${e} part${e===1?`y`:`ies`}`,"info.relations":({n:e})=>`${e} relation${e===1?``:`s`}`,"info.links":({n:e})=>`${e} link${e===1?``:`s`}`,"jerr.nodesEmpty":"`nodes` must not be empty (a justification needs at least a conclusion and what supports it)","jerr.linksEmpty":"`links` must not be empty (the nodes have to support one another)","jerr.notArray":({field:e})=>`\`${e}\` must be an array`,"jerr.notObject":({at:e})=>`${e}: must be an object`,"jerr.required":({at:e,field:t})=>`${e}: missing required field \`${t}\``,"jerr.duplicateId":({at:e,id:t,what:n})=>`${e}: id "${t}" duplicates an earlier ${n}`,"jerr.mustBeString":({at:e,field:t})=>`${e}: \`${t}\` must be a non-empty string`,"jerr.badNodeKind":({at:e,value:t,allowed:n})=>`${e}: kind is "${t}", which is not one of: ${n}`,"jerr.badRef":({at:e,field:t,kind:n,id:r})=>`${e}: \`${t}\` refers to a non-existent ${n} "${r}"`,"jerr.badHolds":({at:e,value:t})=>`${e}: \`holds\` must be "yes" or "no", got "${t}"`,"jerr.holdsNotHere":({at:e,kind:t,kinds:n})=>`${e}: a ${t} does not hold or fail; \`holds\` only belongs on ${n}`,"jerr.badCombine":({at:e,value:t,allowed:n})=>`${e}: \`combine\` is "${t}", which is not one of: ${n}`,"jerr.combineNotHere":({at:e,kind:t,kinds:n})=>`${e}: a ${t} is not supported by other nodes; \`combine\` only belongs on ${n}`,"jerr.dateNotHere":({at:e,kind:t})=>`${e}: \`date\` only belongs on a fact, not on a ${t}`,"jerr.badDate":({at:e,value:t})=>`${e}: \`date\` "${t}" is not an ISO date (YYYY-MM-DD or YYYY-MM-DDTHH:MM)`,"jerr.badEnd":({at:e,end:t,id:n})=>`${e}: \`${t}\` refers to a non-existent node "${n}"`,"jerr.selfLink":({at:e,id:t})=>`${e}: a node cannot support itself ("${t}" on both ends)`,"jerr.badStance":({at:e,value:t,allowed:n})=>`${e}: stance is "${t}", which is not one of: ${n}`,"jerr.basisNotNorm":({at:e,kind:t})=>`${e}: stance "basis" can only start from a norm, not from a ${t}`,"jerr.duplicateLink":({at:e,stance:t})=>`${e}: duplicate link (same from, to and stance "${t}"); drop the second one`,"jerr.cycle":({path:e})=>`links form a cycle (${e}); a reasoning must not lead back to itself`,"jerr.leafHasInput":({at:e,kind:t})=>`${e}: a ${t} is a leaf; nothing may support it (an evidence layer is not part of v0)`,"jerr.noEnd":"no end conclusion: at least one `conclusion` must have no outgoing link (the conclusion the whole reasoning leads to)","jhint.severalEnds":({n:e,ids:t})=>`${e} conclusions end the diagram (${t}); is this one reasoning, or should it be split?`,"jhint.supportsNothing":({id:e,label:t})=>`nodes (${e}): "${t}" supports nothing; link it to what it supports, or drop it`,"jhint.factNoSource":({id:e,label:t})=>`nodes (${e}): the fact "${t}" has no source; where was it found?`,"jhint.normNoSource":({id:e,label:t})=>`nodes (${e}): the norm "${t}" has no source; which provision is it?`,"jhint.unsupported":({id:e,label:t})=>`nodes (${e}): nothing supports "${t}"; add a fact, an element or a norm that does (if it stands only because what argued against it was rejected, this note can be left as it is)`,"jhint.holdsOnRejected":({id:e,label:t})=>`nodes (${e}): "${t}" holds although everything that supports it is rejected; check the \`holds\` values`,"jhint.combineAlone":({id:e,label:t,combine:n})=>`nodes (${e}): "${t}" says \`combine: "${n}"\` but fewer than two links support it; there is nothing to combine`,"jhint.allNeedsAll":({id:e,label:t,other:n})=>`nodes (${e}): "${t}" needs all it rests on, but "${n}" is rejected; check the \`holds\` values`,"jhint.anyOneHolds":({id:e,label:t,other:n})=>`nodes (${e}): "${t}" is rejected although any one it rests on would do, and "${n}" holds; check the \`holds\` values`,"jhint.tooLarge":({n:e,limit:t})=>`${e} nodes: past about ${t} the tree gets hard to read on one screen; consider one diagram per issue`,"graphKind.graph":`Relationship graph`,"graphKind.focus":`Focus view`,"graphKind.matrix":`Relation matrix`,"graphKind.equity":`Equity tree`,"rel.matrix.ungrouped":`No camp`,"rel.equity.noShare":`not stated`,"rel.equity.cross":`cross-holding`,"rel.equity.noEquity":`No equity relations in this data`,"rel.equity.noEquityHint":`This view is built around shareholdings. For this case, switch to the relationship graph.`,"rel.equity.indirect":({n:e})=>`Held through others (${e})`,"rel.equity.notComputable":`cannot be worked out: a share on the way is not stated`,"rel.equity.moreRows":({n:e})=>`${e} more not listed`,"rel.equity.above":({n:e})=>`Above it (${e})`,"rel.company.label":`Company`,"rel.company.all":`All`,"rel.equity.sep":`, `,"rel.equity.colon":`: `,"graphKind.authority":`Control and employment`,"rel.authority.cycle":`cycle`,"rel.authority.none":`No control, employment or agency relations in this data`,"rel.authority.noneHint":`This view is built around who commands whom. For this case, switch to the relationship graph.`,"rel.authority.above":({n:e})=>`Above it (${e})`,"graphKind.related":`Related parties`,"rel.related.title":({name:e})=>`Related parties of ${e} (the centre)`,"rel.related.count":({n:e,m:t})=>`${e} related part${e===1?`y`:`ies`}, ${t} relation${t===1?``:`s`}`,"rel.related.colParty":`Related party`,"rel.related.colKind":`Category`,"rel.related.colText":`Relation`,"rel.related.colSource":`Source`,"rel.related.dirNone":({a:e,b:t})=>`${e} — ${t} (no direction)`,"rel.related.none":({name:e})=>`${e} has no relation in this data`,"rel.related.noneHint":`Pick another party in the box at the bottom, or switch to the relationship graph.`,"rel.related.centre":`Centre`,"graphKind.path":`Relation path`,"rel.path.from":`From`,"rel.path.to":`To`,"rel.path.swap":`Swap the two ends`,"rel.path.noChain":({a:e,b:t})=>`No chain of relations ties ${e} and ${t}`,"rel.path.noChainHint":`Pick two parties that are connected, or switch to the relationship graph.`,"rel.path.steps":({n:e})=>`${e} step${e===1?``:`s`}`,"rel.path.chains":({n:e})=>`Chains drawn (${e})`,"rel.path.more":({n:e,atLeast:t})=>`${t?`At least `:``}${e} more chain${e===1?``:`s`} not drawn; only the shortest are.`,"graphKind.route":`Route map`,"proc.route.labels":`Conditions`,"proc.route.more":({n:e})=>`… and ${e} more`,"rel.focus.open":`Centre the focus view on this party`,"rel.focus.centre":`Centre`,"rel.focus.hint":`Click to put this party in the middle`,"rel.focus.apart":`Not connected to the centre`,"rel.focus.reset":`Default centre`,"rel.focus.resetTitle":`Put the party with the most relations back in the middle`,"graphKind.tree":`Reasoning tree`,"jus.kind.conclusion":`Conclusion`,"jus.kind.norm":`Norm`,"jus.kind.element":`Element`,"jus.kind.fact":`Fact`,"jus.kind.inference":`Inference`,"jus.kind.judgement":`Judgement`,"jus.holds.yes":`✓ upheld`,"jus.holds.no":`✗ rejected`,"jus.copy":`shown again`,"jus.copies":({n:e})=>`The same node is drawn in ${e} issues`,"jus.grounds":`Rests on`,"jus.fold":`Fold this issue up`,"jus.unfold":`Open this issue`,"jus.folded":({n:e})=>`${e} folded`,"jus.foldAll":`Fold issues`,"jus.merge":`Merge repeats`,"jus.mergeTitle":`A fact (or a norm with many elements) used several times in one issue is drawn beside each use; merge draws each once, with longer lines`,"jus.foldAllTitle":`Fold every issue up to its conclusion, or open them all again`,"jus.combine.all":`all of`,"jus.combine.any":`any of`,"jus.combine.allLong":`All of what it rests on is needed`,"jus.combine.anyLong":`Any one of what it rests on is enough`,"jus.supports":`Leads to`,"jus.stance.for":`supports`,"jus.stance.against":`opposes`,"jus.stance.basis":`basis`,"jus.previewHint":`Click a node to read the full text and see what it rests on`,"perr.domainNotInEnum":({value:e,allowed:t})=>`\`domain\` is "${e}", not in the enum (${t})`,"perr.nodesEmpty":"`nodes` must not be empty (a flow needs at least a start and an end)","perr.edgesEmpty":"`edges` must not be empty (the nodes have to be connected)","perr.notObject":({at:e})=>`${e}: must be an object`,"perr.required":({at:e,field:t})=>`${e}: missing required field \`${t}\``,"perr.duplicateNodeId":({at:e,id:t})=>`${e}: id "${t}" duplicates an earlier node`,"perr.badKind":({at:e,value:t,allowed:n})=>`${e}: \`kind\` is "${t}", not in the vocabulary (${n})`,"perr.badOutcome":({at:e,value:t,allowed:n})=>`${e}: \`outcome\` is "${t}", not in the enum (${n})`,"perr.mustBeString":({at:e,field:t})=>`${e}: \`${t}\` must be a string`,"perr.badRef":({at:e,field:t,kind:n,id:r})=>`${e}: ${t} refers to a non-existent ${n} "${r}"`,"perr.badFrom":({at:e,id:t})=>`${e}: \`from\` refers to a non-existent node "${t}"`,"perr.badTo":({at:e,id:t})=>`${e}: \`to\` refers to a non-existent node "${t}"`,"perr.selfLoop":({at:e,id:t})=>`${e}: self-loop (from and to are both "${t}")`,"perr.duplicateEdge":({at:e,from:t,to:n})=>`${e}: duplicate edge ${t} -> ${n} (same condition); branches into one target each need their own condition`,"perr.noEntry":`no node has zero incoming edges (a flow needs a start)`,"perr.unreachable":({id:e})=>`nodes (${e}): unreachable from the start (it would be dropped silently and never appear)`,"perr.orphan":({id:e,label:t})=>`nodes (${e}): "${t}" has no incoming edge and is not a start, so nothing leads to it: it would float beside the flow. If it is a consequence (a breach, a resignation, a right to terminate), write it as a rule in \`rules\`; if it belongs to the flow, add the edge that leads to it`,"note.partyNoEvent":({at:e,id:t,name:n})=>`${e} (${t}): no event names "${n}" in its actorIds, so it is on no card and has no column. Name it in the actorIds of the events it took part in, or leave it out of actors if it did nothing in this diagram`,"note.dateOrder":({at:e,id:t,date:n,beforeAt:r,beforeId:i,beforeDate:a})=>`${e} ("${t}", ${n}) comes after ${r} ("${i}", ${a}) in the slots but its date is wholly earlier. The order of the slots is kept and nothing is reordered; check which of the two dates is wrong, or whether the slots are in the wrong order`,"perr.noEnd":'no node has `kind: "end"` (a flow needs an end)',"perr.deadEnd":({id:e,label:t})=>`nodes (${e}): "${t}" is a dead end: it is neither end nor note but has no outgoing edge. If it is the consequence of a breach, delay or right to terminate, write it as a rule in \`rules\` (it may fire at any time in its stages) instead of a node that has to lead somewhere`,"perr.decisionTooFewOut":({id:e,n:t})=>`nodes (${e}): kind is "decision" but only ${t} outgoing edge(s); a decision needs at least 2`,"perr.decisionNoCondition":({id:e,index:t,to:n})=>`nodes (${e}): kind is "decision" but edge edges[${t}] -> "${n}" has no condition. If it really is a decision, give every outgoing edge a condition (e.g. "yes / no"); if it is a step, change kind to "step" (a step may have several outgoing edges, one of them the main line)`,"perr.tooManyMain":({id:e,n:t})=>`nodes (${e}): ${t} outgoing edges are marked main; a path has exactly one`,"perr.mainBroken":({id:e})=>`the main line breaks at node "${e}": the edges marked main do not reach any end. Either add the missing main edge, or repair the chain`,"norm.mainRemarked":({problem:e,from:t,to:n})=>`the main line was marked again, starting at "${t}" and ending at "${n}", keeping to the edges already marked where it could. It was: ${e}`,"norm.mainSet":({at:e})=>`${e}: marked main`,"norm.mainCleared":({at:e})=>`${e}: no longer marked main`,"perr.rulesNotArray":"`rules` must be an array","perr.duplicateRuleId":({at:e,id:t})=>`${e}: id "${t}" is already used by another rule or node`,"perr.ruleWhen":({at:e})=>`${e}: \`when\` is required: a non-empty string, or an array of them (any one of them triggers the rule)`,"perr.ruleEndNotEnd":({at:e,id:t})=>`${e}: \`endId\` points at "${t}", which is not a node of kind "end"; a rule can only lead to an end`,"phint.stageBackwards":({from:e,fromStage:t,to:n,toStage:r})=>`stage runs backwards: ${e} (${t}) -> ${n} (${r}); back edges are normal, others need a second look`,"phint.decisionOnSpine":({id:e,label:t})=>`decision "${e}" (${t}) is on the main line but no outgoing edge is marked main; the breach path may end up drawn as the main line`,"phint.longLabel":({id:e,n:t})=>`node "${e}" has a label of ${t} characters; a node shows about two lines (20 Chinese characters) and cuts the rest, the popover has it all. Shorten the label and move the detail into \`detail\``,"phint.noteNoDetail":({id:e,label:t})=>`note "${e}" (${t}) has no detail; a note is an explanation, so write it as one full sentence (in detail) that says what it explains`,"phint.multipleEntries":({n:e,ids:t})=>`${e} entries (${t}), they will all sit in the first layer; a contract flow usually has a single entry, so check whether an upstream link is missing`},je={en:Ae,zh:{"common.none":`(无)`,"common.close":`关闭`,"common.untitled":`案图`,"fallback.invalidTitle":({n:e})=>`该数据未通过校验(${e} 处问题)`,"fallback.noRendererTitle":({type:e})=>`没有为 type = "${e}" 注册渲染器`,"fallback.registered":({list:e})=>`已注册:${e}`,"fallback.noInlineData":`这份文件里没有内联数据,生成时发生错误,请重新生成这份 HTML。`,"fallback.devNoData":`开发服务器未获取到数据:请用 ?example=0 或 ?spec=examples/某份.json 指定一份。`,"error.renderTitle":`渲染出错`,"error.renderHint":`数据本身可能没问题(校验已经通过),是这个画法在渲染时抛错了。请将下列信息提供给开发者,或改用其他画法。`,"info.span":({from:e,to:t})=>`${e} 至 ${t}`,"info.slots":({n:e})=>`${e} 个时间点`,"info.actors":({n:e})=>`${e} 个主体`,"info.sources":({n:e})=>`${e} 个来源`,"info.nodes":({n:e})=>`${e} 个节点`,"info.stages":({n:e})=>`${e} 个阶段`,"info.entities":({n:e})=>`${e} 个当事方`,"info.relations":({n:e})=>`${e} 条关系`,"info.links":({n:e})=>`${e} 条连线`,"dock.actors":`主体`,"dock.summary":`摘要`,"dock.sources":`来源`,"dock.orientation":`层的走向:竖向是从上往下,横向是从左往右。`,"dock.orientationCamps":`层的走向:竖向是从上往下,横向是从左往右。画了阵营框时,阵营沿垂直于层的方向排开:竖向时左右并排,横向时上下叠放,所以整张图看起来可能和按钮相反。`,"dock.vertical":`竖向`,"dock.horizontal":`横向`,"dock.grid":`格线`,"dock.stagger":`交错`,"dock.byParty":`按主体分泳道`,"dock.staggerHint":`让不同列的卡片上下错开半行,图更短、字更大`,"dock.exportImage":`导出图片`,"dock.exporting":`正在导出…`,"dock.exportTitle":`将整张图导出为 PNG(2 倍分辨率)`,"dock.lang":`语言`,"dock.fold":`收起`,"dock.display":`显示选项`,"export.failed":({message:e})=>`导出失败:${e}`,"dock.langEn":`EN`,"dock.langZh":`中文`,"flow.conditions":`条件`,"flow.detail":`详情`,"flow.mainLine":`主干`,"flow.states":`状态`,"flow.stages":`阶段`,"flow.rules":`条款`,"flow.linkStraight":`折线`,"flow.linkCurved":`曲线`,"flow.linkStyle":`连线样式`,"rule.tableTitle":`条款`,"rule.tableNote":`流程中可能出现的情形,不属于流程步骤`,"rule.tableNoteContract":`合同履行过程中可能出现的情形,不属于流程步骤`,"rule.colWhen":`情形`,"rule.colThen":`后果`,"rule.colScope":`适用阶段`,"rule.groupEnd":({end:e})=>`可导致「${e}」`,"rule.groupRest":`其他条款`,"rule.count":({n:e})=>`${e} 条`,"rule.anyOf":`下列任一:`,"rule.tScopeAll":`全程`,"rule.tScopeRange":({from:e,to:t})=>`${e} 至 ${t}`,"flow.ruleBadge":({n:e})=>`条款 ${e} 条`,"flow.noteTag":`注`,"rule.if":`若`,"rule.or":`,或`,"flow.previewHint":`点击节点查看全文`,"card.sources":({n:e})=>`来源 ${e} 个`,"card.sourcesUnlisted":`未列来源`,"card.sourcesList":({n:e,names:t})=>`来源 ${e} 个:${t}`,"card.duration":({duration:e})=>`持续 ${e}`,"card.approxPrefix":`约 `,"card.dateUnknown":`日期不详`,"card.unitDay":({n:e})=>`${e} 天`,"card.unitHour":({n:e})=>`${e} 小时`,"card.unitMinute":({n:e})=>`${e} 分`,"card.unitSecond":({n:e})=>`${e} 秒`,"card.ariaLabel":({label:e,date:t})=>t?`${e},${t}`:e,"card.dateNote":({note:e})=>`时间说明:${e}`,"card.previewHint":`点击卡片查看全文`,"aria.nodeDefault":`按回车或空格可选中此节点。`,"aria.nodeKeyboardDisabled":`按回车或空格可选中此节点。选中后可用方向键移动。`,"aria.nodeMoved":({x:e,y:t})=>`已移动节点。新位置:x ${e},y ${t}`,"aria.edgeDefault":`按回车或空格可选中此连线。`,"aria.controls":`画布控件`,"aria.zoomIn":`放大`,"aria.zoomOut":`缩小`,"aria.fitView":`适应视图`,"aria.interactive":`切换交互`,"aria.minimap":`缩略图`,"aria.handle":`连接点`,"sourceType.statute":`法条`,"sourceType.case":`判例`,"sourceType.contract":`合同`,"sourceType.evidence":`证据`,"sourceType.document":`文书`,"sourceType.web":`网页`,"sourceType.other":`其他`,"graphKind.timeline":`时间图`,"graphKind.flow":`流程图`,"header.theme":`主题`,"theme.document":`文书`,"theme.modern":`现代`,"theme.legal":`法律`,"theme.dark":`深色`,"header.kindOpen":({n:e})=>`查看全部 ${e} 种画法`,"header.kindPrev":`上一种画法`,"header.kindNext":`下一种画法`,"header.kindGroup":`画法`,"header.fold":`收起标题卡`,"header.unfold":`展开标题卡`,"graphKind.chronicle":`大事记`,"graphKind.scale":`比例时间轴`,"scale.segment":({n:e,unit:t,count:n})=>`第 ${e} 段 · ${t} · ${n} 个事件`,"scale.unit.year":`按年`,"scale.unit.month":`按月`,"scale.unit.day":`按日`,"scale.unit.hour":`按小时`,"scale.unit.minute":`按分钟`,"scale.other":`其他`,"scale.events":`事件`,"scale.undated":`日期不详 · 按顺序放置`,"scale.coarse.day":`当日(时刻不详)`,"scale.coarse.month":`当月(日期不详)`,"scale.coarse.year":`当年(月份不详)`,"scale.run":({n:e})=>`${e} 个事件`,"scale.runListed":({n:e})=>`时间相近的 ${e} 个事件,列示如下:`,"chronicle.gapSeconds":({n:e})=>`+${e} 秒`,"chronicle.gapMinutes":({n:e})=>`+${e} 分钟`,"chronicle.gapHours":({n:e})=>`+${e} 小时`,"chronicle.gapHoursMinutes":({h:e,m:t})=>`+${e} 小时 ${t} 分`,"chronicle.gapDays":({n:e})=>`间隔 ${e} 天`,"chronicle.gapMonths":({n:e})=>`间隔 ${e} 个月`,"chronicle.gapYears":({n:e})=>`间隔 ${e} 年`,"chronicle.gapYearsMonths":({y:e,m:t})=>`间隔 ${e} 年 ${t} 个月`,"chronicle.dateUnknown":`日期不详`,"graphKind.graph":`关系图`,"graphKind.focus":`聚焦图`,"graphKind.matrix":`关系矩阵`,"graphKind.equity":`股权图`,"rel.matrix.ungrouped":`未归阵营`,"rel.equity.noShare":`比例未写明`,"rel.equity.cross":`交叉持股`,"rel.equity.noEquity":`这份数据里没有股权关系`,"rel.equity.noEquityHint":`这个视图围绕持股关系画。这类案件请切换到关系图。`,"rel.equity.indirect":({n:e})=>`间接持有(${e})`,"rel.equity.notComputable":`算不出:途中有一处持股比例没写明`,"rel.equity.moreRows":({n:e})=>`另有 ${e} 项未列出`,"rel.equity.above":({n:e})=>`在它上面的(${e})`,"rel.company.label":`公司`,"rel.company.all":`全部`,"rel.equity.sep":`、`,"rel.equity.colon":`:`,"graphKind.authority":`控制与任职图`,"rel.authority.cycle":`循环`,"rel.authority.none":`这份数据里没有控制、任职或代理关系`,"rel.authority.noneHint":`这个视图围绕谁管着谁画。这类案件请切换到关系图。`,"rel.authority.above":({n:e})=>`在它上面的(${e})`,"graphKind.related":`关联方清单`,"rel.related.title":({name:e})=>`关联方清单:${e}(中心方)`,"rel.related.count":({n:e,m:t})=>`共 ${e} 个关联方,${t} 条关系`,"rel.related.colParty":`关联方`,"rel.related.colKind":`关系类别`,"rel.related.colText":`关系内容`,"rel.related.colSource":`来源`,"rel.related.dirNone":({a:e,b:t})=>`${e} — ${t}(无方向)`,"rel.related.none":({name:e})=>`「${e}」在这份数据里没有任何关系`,"rel.related.noneHint":`在底部的框里换一方,或切换到关系图。`,"rel.related.centre":`中心方`,"graphKind.path":`关系路径图`,"rel.path.from":`起点`,"rel.path.to":`终点`,"rel.path.swap":`起点和终点对调`,"rel.path.noChain":({a:e,b:t})=>`没有任何关系链把「${e}」和「${t}」连起来`,"rel.path.noChainHint":`请选两个有关系相连的当事人,或切换到关系图。`,"rel.path.steps":({n:e})=>`${e} 步`,"rel.path.chains":({n:e})=>`画出的关系链(${e})`,"rel.path.more":({n:e,atLeast:t})=>`另有${t?`至少 `:` `}${e} 条关系链没有画;只画最短的几条。`,"graphKind.route":`路线图`,"proc.route.labels":`条件`,"proc.route.more":({n:e})=>`……还有 ${e} 步`,"rel.focus.open":`以这一方为中心看聚焦图`,"rel.focus.centre":`中心`,"rel.focus.hint":`点击,把这一方放到中间`,"rel.focus.apart":`与中心没有关系相连`,"rel.focus.reset":`默认中心`,"rel.focus.resetTitle":`把关系最多的那一方放回中间`,"graphKind.tree":`说理树`,"jus.kind.conclusion":`结论`,"jus.kind.norm":`规范`,"jus.kind.element":`要件`,"jus.kind.fact":`事实`,"jus.kind.inference":`推断`,"jus.kind.judgement":`评价`,"jus.holds.yes":`✓ 成立`,"jus.holds.no":`✗ 否定`,"jus.copy":`重复`,"jus.copies":({n:e})=>`同一节点出现在 ${e} 个争点中`,"jus.grounds":`依据`,"jus.fold":`收起这个争点`,"jus.unfold":`展开这个争点`,"jus.folded":({n:e})=>`已收起 ${e} 个`,"jus.foldAll":`收起争点`,"jus.merge":`合并重复`,"jus.mergeTitle":`同一争点里被多处用到的事实(或支持多个要件的规范)默认在每处使用点各列一份;合并后只列一份,连线会变长、更易交叉`,"jus.foldAllTitle":`把每个争点收起到只剩它的结论,或者全部展开`,"jus.combine.all":`且`,"jus.combine.any":`或`,"jus.combine.allLong":`它依据的须全部具备`,"jus.combine.anyLong":`它依据的具备任何一个即可`,"jus.supports":`指向`,"jus.stance.for":`支持`,"jus.stance.against":`反对`,"jus.stance.basis":`规范依据`,"jus.previewHint":`点击节点查看全文及其依据`,"graphType.fact":`事实图`,"graphType.relationship":`关系图`,"graphType.procedure":`程序图`,"graphType.justification":`证成图`,"rel.kind.equity":`股权`,"rel.kind.control":`控制`,"rel.kind.contract":`合同`,"rel.kind.debt":`债权债务`,"rel.kind.guarantee":`担保`,"rel.kind.kinship":`亲属`,"rel.kind.employment":`雇佣`,"rel.kind.agency":`代理`,"rel.kind.other":`其他`,"rel.kindChipTitle":({n:e})=>`显示或隐藏这一类(${e} 条关系)`,"rel.labels":`标签`,"rel.groups":`分组`,"rel.previewHint":`点击当事方查看全文`,"rel.auto.equity":({share:e})=>e===void 0?`持有股权`:`持股 ${e}%`,"rel.auto.control":`控制`,"rel.auto.contract":({amount:e})=>e?`合同,${e}`:`合同`,"rel.auto.debt":({amount:e})=>e?`债权,${e}`:`债权`,"rel.auto.guarantee":`担保`,"rel.auto.kinship":`亲属`,"rel.auto.employment":`雇佣`,"rel.auto.agency":`代理`,"rel.auto.other":`关联`,...Object.fromEntries(Object.keys(Ae).filter(e=>e.startsWith(`err.`)||e.startsWith(`perr.`)||e.startsWith(`phint.`)||e.startsWith(`note.`)||e.startsWith(`rerr.`)||e.startsWith(`rhint.`)||e.startsWith(`jerr.`)||e.startsWith(`jhint.`)||e.startsWith(`norm.`)).map(e=>[e,Ae[e]]))}};function Me(e){return!e||typeof e!=`string`?`en`:e.toLowerCase().split(`-`)[0]===`zh`?`zh`:`en`}function Ne(e,t,n){let r=(je[Me(e)]??je.en)[t]??je.en[t];return r===void 0?t:typeof r==`function`?r(n??{}):n?String(r).replace(/\{(\w+)\}/g,(e,t)=>n[t]??`{${t}}`):r}var Pe=(e,t)=>Ne(`en`,e,t),Fe=/^(\d{4})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?)?)?$/;function Ie(e){let t=Fe.exec(typeof e==`string`?e.trim():``);if(!t)return null;let[n,r,i,a,o,s]=t.slice(1).map(e=>e===void 0?void 0:Number(e)),c=(e,t,n,r,i,a)=>Date.UTC(e,t,n,r,i,a),l,u;return r===void 0?(l=c(n,0,1,0,0,0),u=c(n+1,0,1,0,0,0)):i===void 0?(l=c(n,r-1,1,0,0,0),u=c(n,r,1,0,0,0)):a===void 0?(l=c(n,r-1,i,0,0,0),u=c(n,r-1,i+1,0,0,0)):s===void 0?(l=c(n,r-1,i,a,o,0),u=l+6e4):(l=c(n,r-1,i,a,o,s),u=l+1e3),Number.isNaN(l)?null:{from:l,to:u}}function Le(e){let t=Ie(e?.date);if(!t)return null;let{from:n,to:r}=t,i=e.dateEnd===void 0?null:Ie(e.dateEnd);if(i&&i.to>n&&(r=Math.max(r,i.to)),e.approx===!0){let e=t.to-t.from;n-=e,r+=e}return{from:n,to:r}}function Re(e){let t=[],n=null;return(Array.isArray(e?.slots)?e.slots:[]).forEach((e,r)=>{let i=(Array.isArray(e?.events)?e.events:[]).map((e,t)=>({event:e,ei:t,span:Le(e)})).filter(e=>e.span);if(i.length===0)return;let a={from:Math.min(...i.map(e=>e.span.from)),to:Math.max(...i.map(e=>e.span.to))};if(n&&a.to<=n.span.from){let e=i.find(e=>e.span.to<=n.span.from)??i[0];t.push(Pe(`note.dateOrder`,{at:`slots[${r}].events[${e.ei}]`,id:e.event.id,date:e.event.date,beforeAt:`slots[${n.si}].events[${n.ei}]`,beforeId:n.event.id,beforeDate:n.event.date}))}let o=i.reduce((e,t)=>t.span.to>e.span.to?t:e);n={span:a,si:r,ei:o.ei,event:o.event}}),t}function ze(e){let t=Array.isArray(e?.actors)?e.actors:[],n=new Set;for(let t of Array.isArray(e?.slots)?e.slots:[])for(let e of Array.isArray(t?.events)?t.events:[])for(let t of Array.isArray(e?.actorIds)?e.actorIds:[])n.add(t);return t.map((e,t)=>({a:e,i:t})).filter(({a:e})=>e&&typeof e.id==`string`&&!n.has(e.id)).map(({a:e,i:t})=>Pe(`note.partyNoEvent`,{at:`actors[${t}]`,id:e.id,name:e.name??e.id}))}var Be=19,Ve=2,He=18,Ue=6,We=16,Ge=11.5,Ke=1,eee=.55;function qe(e){let t=e.codePointAt(0);return t>=4352&&t<=4447||t>=11904&&t<=42191||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510?Ke:eee}function Je(e){let t=0;for(let n of String(e??``))t+=qe(n);return t}var Ye=(e,t)=>Je(e)*t,tee=262/13;262/Ge;function nee(e={},t=Ve,n=0){let r=22+Be*t+Ue+We;return e.summary&&(r+=24),e.actors&&n>0&&(r+=He*n+Ue),r}function Xe(e,t,n={}){let r=n.latin??1,i=n.cjk??1;return Ze(e,t,e=>{let t=0;for(let n of e)t+=qe(n)*(qe(n)===Ke?i:r);return t})}function Ze(e,t,n){let r=t,i=n,a=String(e??``);if(!a)return 0;let o=a.match(/[^\sᄀ-ᅟ⺀-꓏가-힣豈-﫿︰-﹯＀-⦆¢-₩]+|\s|./gu)||[],s=1,c=0;for(let e of o){let t=i(e);if(/^\s$/.test(e))c>0&&(c+=t);else if(c+t<=r)c+=t;else if(t<=r)s+=+(c>0),c=t;else{c>0&&(s+=1);let e=Math.ceil(t/r);s+=e-1,c=t-(e-1)*r}}return s}var Qe={SIDE1:`side1`,AXIS:`axis`,SIDE2:`side2`},$e=3;function et(e){let t=(Array.isArray(e?.actors)?e.actors:[]).filter(e=>rt(e)&&e.id);if(new Set(t.map(e=>e.id)).size<2)return e=>e?.groupId??null;let n=new Map(t.map(e=>[e.id,e.groupId])),r=(Array.isArray(e?.groups)?e.groups[2]?.id:null)??null;return e=>{let t=Array.isArray(e?.actorIds)?e.actorIds:[];return t.length===1&&n.get(t[0])||r}}var tt=/^\d{4}(-\d{2}(-\d{2}(T\d{2}(:\d{2}(:\d{2})?)?)?)?)?$/;function nt(e,t){if(typeof e!=`string`||typeof t!=`string`)return!1;let n=Math.min(e.length,t.length);return e.slice(0,n)<t.slice(0,n)}var ree=[Qe.SIDE1,Qe.SIDE2,Qe.AXIS];function rt(e){return e&&typeof e==`object`&&!Array.isArray(e)}function it(e){let t=[],n=Array.isArray(e?.actors)?e.actors:[],r=Array.isArray(e?.groups)?e.groups:[],i=Array.isArray(e?.sources)?e.sources:[],a=e?.slots,o={errors:t,byActor:!1,sideLabels:{[Qe.SIDE1]:``,[Qe.SIDE2]:``,[Qe.AXIS]:``},columns:[],rows:[],placements:new Map,axisColumnIndex:0,actorById:new Map,groupById:new Map,groupIndexById:new Map,sourceById:new Map,eventCount:0},s=new Map;n.forEach((e,n)=>{rt(e)?e.id?(s.has(e.id)&&t.push(Pe(`err.duplicateId`,{at:`actors[${n}]`,id:e.id})),s.set(e.id,e),e.name||t.push(Pe(`err.required`,{at:`actors[${n}] (${e.id})`,field:`name`}))):t.push(Pe(`err.required`,{at:`actors[${n}]`,field:`id`})):t.push(Pe(`err.notObject`,{at:`actors[${n}]`}))}),e?.views!==void 0&&t.push(Pe(`err.viewsRemoved`));let c=new Map,l=new Map;r.length>$e&&t.push(Pe(`err.tooManyGroups`,{at:`groups`,max:$e,actual:r.length})),r.forEach((e,n)=>{rt(e)?e.id?(l.has(e.id)&&t.push(Pe(`err.duplicateId`,{at:`groups[${n}]`,id:e.id})),c.set(e.id,e),l.set(e.id,n),e.label||t.push(Pe(`err.required`,{at:`groups[${n}] (${e.id})`,field:`label`}))):t.push(Pe(`err.required`,{at:`groups[${n}]`,field:`id`})):t.push(Pe(`err.notObject`,{at:`groups[${n}]`}))});let u=s.size>=2,d=new Map;n.forEach((e,n)=>{if(!rt(e)||!e.id)return;let r=`actors[${n}] (${e.id})`,i=e.groupId!==void 0&&e.groupId!==null&&e.groupId!==``;if(!u){i&&t.push(Pe(`err.actorGroupOneParty`,{at:r}));return}if(!i){t.push(Pe(`err.actorNeedsGroup`,{at:r,n:s.size}));return}if(!l.has(e.groupId)){t.push(Pe(`err.missingRef`,{at:r,field:`groupId`,kind:`group`,id:e.groupId}));return}let a=l.get(e.groupId);a>1?t.push(Pe(`err.actorGroupNotSide`,{at:r,groupId:e.groupId})):d.set(e.id,a===0?Qe.SIDE1:Qe.SIDE2)});let f=new Map;if(i.forEach((e,n)=>{rt(e)?e.id?(f.has(e.id)&&t.push(Pe(`err.duplicateId`,{at:`sources[${n}]`,id:e.id})),f.set(e.id,e),e.type||t.push(Pe(`err.required`,{at:`sources[${n}] (${e.id})`,field:`type`})),e.name||t.push(Pe(`err.required`,{at:`sources[${n}] (${e.id})`,field:`name`}))):t.push(Pe(`err.required`,{at:`sources[${n}]`,field:`id`})):t.push(Pe(`err.notObject`,{at:`sources[${n}]`}))}),!Array.isArray(a))return t.push(Pe(`err.slotNotArray`)),{...o,actorById:s,groupById:c,groupIndexById:l,sourceById:f};a.length===0&&t.push(Pe(`err.slotsEmpty`));let p=new Set,m={[Qe.SIDE1]:new Set,[Qe.SIDE2]:new Set},h=[];a.forEach((e,n)=>{let r=`slots[${n}]`;rt(e)?Array.isArray(e.events)?(e.events.length===0&&t.push(Pe(`err.slotEventsEmpty`,{at:r})),e.events.forEach((e,i)=>{let a=`${r}.events[${i}]${e?.id?` (${e.id})`:``}`;if(!rt(e)){t.push(Pe(`err.notObject`,{at:a}));return}e.id?p.has(e.id)?t.push(Pe(`err.duplicateId`,{at:a,id:e.id})):p.add(e.id):t.push(Pe(`err.required`,{at:a,field:`id`})),e.date&&!tt.test(e.date)&&t.push(Pe(`err.badDate`,{at:a,field:`date`,value:e.date})),e.label||t.push(Pe(`err.required`,{at:a,field:`label`})),e.dateEnd!==void 0&&e.dateEnd!==null&&(typeof e.dateEnd!=`string`||!tt.test(e.dateEnd)?t.push(Pe(`err.badDate`,{at:a,field:`dateEnd`,value:e.dateEnd})):e.date?nt(e.dateEnd,e.date)&&t.push(Pe(`err.dateEndBeforeDate`,{at:a,end:e.dateEnd,start:e.date})):t.push(Pe(`err.dateEndNeedsDate`,{at:a}))),e.summary!==void 0&&e.summary!==null&&(typeof e.summary==`string`?Je(e.summary)>22.782608695652176&&t.push(Pe(`err.summaryTooLong`,{at:a,max:22,actual:Math.ceil(Je(e.summary))})):t.push(Pe(`err.mustBeString`,{at:a,field:`summary`})));let o=Array.isArray(e.actorIds)?e.actorIds:[];o.forEach(e=>{s.has(e)||t.push(Pe(`err.missingRef`,{at:a,field:`actorIds`,kind:`actor`,id:e}))});let c=e.groupId!==void 0&&e.groupId!==null&&e.groupId!==``;u&&c?t.push(Pe(`err.eventGroupWithParties`,{at:a})):c&&!l.has(e.groupId)&&t.push(Pe(`err.missingRef`,{at:a,field:`groupId`,kind:`group`,id:e.groupId})),(Array.isArray(e.sourceIds)?e.sourceIds:[]).forEach(e=>{f.has(e)||t.push(Pe(`err.missingRef`,{at:a,field:`sourceIds`,kind:`source`,id:e}))});let g=c?l.get(e.groupId):void 0,_,v=null;if(u)o.length===1&&d.has(o[0])?(_=d.get(o[0]),v=o[0]):_=Qe.AXIS;else if(o.length>=2)_=Qe.AXIS,(g===0||g===1)&&t.push(Pe(`err.multiActorNeedsAxis`,{at:a,n:o.length,groupId:e.groupId}));else if(!c)_=Qe.AXIS;else if(g===void 0)return;else _=ree[g]??Qe.AXIS;!u&&_!==Qe.AXIS&&o.length!==1?t.push(Pe(`err.groupNeedsOneActor`,{at:a,groupId:e.groupId,n:o.length})):(!u&&_!==Qe.AXIS&&o.length===1&&(v=o[0]),v&&s.has(v)&&m[_].add(v),h.push({slotIndex:n,event:e,side:_,actorId:v}))})):t.push(Pe(`err.eventsNotArray`,{at:r})):t.push(Pe(`err.slotShape`,{at:r}))});let g=n.map(e=>rt(e)?e.id:null).filter(Boolean),_=e=>g.filter(t=>m[e].has(t)),v=e=>{let t=_(e),n=u&&g.filter(t=>d.get(t)===e).length>1;return t.length||!u?t.map(t=>({key:`${e}:${t}`,side:e,actorId:t,actorName:s.get(t)?.name,named:n})):[{key:e,side:e,actorId:null}]},y=[];y.push(...v(Qe.SIDE1).reverse());let b=y.length;y.push({key:Qe.AXIS,side:Qe.AXIS}),y.push(...v(Qe.SIDE2));let x=new Map(y.map((e,t)=>[e.key,t])),S=a.map((e,t)=>({index:t,cells:new Map})),C=new Map,ee=0;return h.forEach(({slotIndex:e,event:n,side:r,actorId:i})=>{let a=r===Qe.AXIS?Qe.AXIS:`${r}:${i}`,o=x.get(a);if(o===void 0)return;ee+=1;let s=S[e];if(s.cells.has(a)){let r=s.cells.get(a);t.push(Pe(`err.oneEventPerCell`,{at:`slots[${e}]`,a:r.id,b:n.id}))}else s.cells.set(a,n);C.set(n.id,{row:e,col:o,key:a})}),{errors:t,byActor:u,sideLabels:{[Qe.SIDE1]:r[0]?.label??``,[Qe.SIDE2]:r[1]?.label??``,[Qe.AXIS]:r[2]?.label??``},columns:y,rows:S,placements:C,axisColumnIndex:b,actorById:s,groupById:c,groupIndexById:l,sourceById:f,eventCount:ee}}function at(e){return e===Qe.SIDE1?0:e===Qe.SIDE2?1:2}function ot(e){let t=1;for(let n of e.rows)n.cells.forEach(e=>{let n=Je(e.label||``);t=Math.max(t,Math.min(2,Math.ceil(n/tee)))});return t}function st(e,t){if(!t.actors)return 0;let n=0;for(let t of e.rows)t.cells.forEach(t=>{let r=(Array.isArray(t.actorIds)?t.actorIds:[]).map(t=>e.actorById.get(t)?.name||t);if(r.length===0)return;let i=r.reduce((e,t)=>e+Ye(t,10)+14,0)+4*(r.length-1);n=Math.max(n,Math.ceil(i/262))});return n}function ct(e,t){let n=new Set;return e.cells.forEach((e,r)=>{let i=t.columns.findIndex(e=>e.key===r);i>=0&&n.add(i)}),n}var iee=.5;function aee(e,t){if(!t)return e.rows.map((e,t)=>t);let n=e.rows.map(t=>ct(t,e)),r=[];return n.forEach((e,t)=>{let i=t===0?0:r[t-1]+iee;for(let a=0;a<t;a++)[...e].some(e=>n[a].has(e))&&(i=Math.max(i,r[a]+1));r.push(i)}),r}function oee(e,t,n,r=!1){let i=e.columns.length,a=e.rows.length,o=ot(e),s=st(e,t),c=nee(t,o,s),l=c+28,u=n?316:l,d=n?l:316,f=new Set;e.rows.forEach(e=>e.cells.forEach((e,t)=>f.add(t)));let p=[],m=0;e.columns.forEach(e=>{let t=f.has(e.key)?d:n?52:104;p.push({start:m,size:t}),m+=t});let h=n?150:0,g=n?0:96,_=n?u:d,v=n?d:u,y=r&&!n,b=aee(e,y),x=a===0?0:(b[a-1]+1)*u,S=(e,t)=>n?{x:h+b[e]*u,y:p[t].start}:{x:p[t].start,y:g+b[e]*u},C=p[e.axisColumnIndex]??{start:0,size:d};return{isH:n,colCount:i,rowCount:a,labelLines:o,actorLines:s,cardH:c,cellH:l,slotExtent:u,laneExtent:d,lanes:p,originX:h,originY:g,cellBoxW:_,cellBoxH:v,cellAt:S,rowTops:b,timeSpan:x,staggered:y,axisCenter:C.start+C.size/2,contentW:n?h+x+6:m,contentH:n?m:g+x+6}}var lt={draggable:!1,selectable:!1,connectable:!1,focusable:!1};function see(e,t,n){let r=(Array.isArray(e.actorIds)?e.actorIds:[]).map(e=>t.actorById.get(e)?.name||e),i=(Array.isArray(e.sourceIds)?e.sourceIds:[]).map(e=>t.sourceById.get(e)).filter(Boolean);return{event:e,actorNames:r,sources:i,sourceCount:i.length,row:n}}function cee(e){return{id:`__cells__`,type:`cells`,position:{x:0,y:0},width:1,height:1,style:{pointerEvents:`none`},data:{cols:e.colCount,rows:e.rowCount,cellW:e.cellBoxW,cellH:e.cellBoxH,lanes:e.lanes,originX:e.originX,originY:e.originY,isH:e.isH},...lt}}function lee(e,t){let n=t=>e.columns.filter(e=>e.side===t).length,r=t=>e.columns.findIndex(e=>e.side===t),i=[];return e.columns.forEach((a,o)=>{let s=n(a.side),c=a.side!==Qe.AXIS&&(s>1||a.named),l=o===r(a.side),u={type:`colHeader`,...lt},d={isH:t.isH,side:a.side,groupIndex:at(a.side)};if(!c){i.push({...u,id:`__head__${a.key}`,position:t.isH?{x:0,y:t.lanes[o].start}:{x:t.lanes[o].start,y:0},data:{...d,width:t.isH?150:t.lanes[o].size,height:t.isH?t.lanes[o].size:null,sideTitle:e.sideLabels[a.side],colTitle:null}});return}if(t.isH){i.push({...u,id:`__head__${a.key}`,position:{x:0,y:t.lanes[o].start},data:{...d,width:150,height:t.lanes[o].size,sideTitle:l?e.sideLabels[a.side]:null,colTitle:a.actorName}});return}if(!l)return;let f=e.columns.slice(o,o+s);i.push({...u,id:`__head__${a.key}`,position:{x:t.lanes[o].start,y:0},data:{...d,width:t.lanes.slice(o,o+s).reduce((e,t)=>e+t.size,0),height:null,sideTitle:e.sideLabels[a.side],colTitle:null,actors:f.map(e=>e.actorName),laneWs:t.lanes.slice(o,o+s).map(e=>e.size)}})}),i}function uee(e,t){let n=e.rows.map(e=>t.rowTops[e.index]*t.slotExtent+t.slotExtent/2-5);return{id:`__axis__`,type:`axis`,position:t.isH?{x:t.originX,y:t.axisCenter-1}:{x:t.axisCenter-1,y:t.originY},data:{isH:t.isH,length:t.timeSpan,dotSize:10,dotOffsets:n},...lt}}function dee(e,t){return{id:`__links__`,type:`links`,position:{x:0,y:0},width:1,height:1,style:{pointerEvents:`none`},data:{segments:e,isH:t},...lt}}function fee(e,t,n,r,i,a){let o=i.cellAt(n,t),s=o.x+(i.cellBoxW-288)/2,c=o.y+(i.cellBoxH-i.cardH)/2,l=null;if(i.isH){let e=s+144;if(t<r.axisColumnIndex){let t=c+i.cardH;l={left:e,top:t,height:i.axisCenter-t}}else t>r.axisColumnIndex&&(l={left:e,top:i.axisCenter,height:c-i.axisCenter})}else{let e=c+i.cardH/2;if(t<r.axisColumnIndex){let t=s+288;l={left:t,top:e,width:i.axisCenter-t}}else t>r.axisColumnIndex&&(l={left:i.axisCenter,top:e,width:s-i.axisCenter})}return{node:{id:e.id,type:`card`,position:{x:s,y:c},data:{...see(e,r,n),groupIndex:at(r.columns[t].side),cardW:288,cardH:i.cardH,labelLines:i.labelLines,fields:a,isH:i.isH}},link:l}}function pee(e,t={},n,r=`vertical`,{stagger:i=!1}={}){let a=r===`horizontal`,o=it(e),s=oee(o,t,a,i),c=[cee(s),...lee(o,s)],l=[],u=[];return o.rows.forEach(e=>{e.cells.forEach((n,r)=>{let i=o.columns.findIndex(e=>e.key===r);if(i<0)return;let{node:a,link:c}=fee(n,i,e.index,o,s,t);l.push(a),c&&u.push(c)})}),u.length&&c.push(dee(u,a)),c.push(uee(o,s)),c.push(...l),{errors:o.errors,sideLabels:o.sideLabels,nodes:c,edges:[],grid:o,layout:`grid`,staggered:s.staggered,size:{width:s.contentW,height:s.contentH}}}function ut(e,t,n){let[r,i]=String(e).split(`T`),a=t?Ne(n,`card.approxPrefix`):``;if(!i)return a+r;let o=i.split(`:`);return`${a}${r} ${o.slice(0,2).join(`:`)}${o[2]?`:`+o[2]:``}`}function dt(e,t,n){let r=ut(t,!1,n);return String(e).split(`T`)[0]===String(t).split(`T`)[0]&&String(t).includes(`T`)?r.split(` `).pop():r}function mee(e,t){if(!e.date)return Ne(t,`card.dateUnknown`);let n=ut(e.date,e.approx,t);return e.dateEnd?`${n} - ${dt(e.date,e.dateEnd,t)}`:n}function ft(e,t,n=!1){if(!e.date)return[{text:Ne(t,`chronicle.dateUnknown`),strong:!1}];let[r,i]=String(e.date).split(`T`),a=[{text:(e.approx?Ne(t,`card.approxPrefix`):``)+r,strong:!0}],o=i?ut(e.date,!1,t).split(` `).pop():``;n&&o&&a.shift();let s=!a.length;if(!e.dateEnd)return o&&a.push({text:o,strong:s}),a;let c=dt(e.date,e.dateEnd,t);return o&&!c.includes(`-`)?a.push({text:`${o} – ${c}`,strong:s}):(o&&a.push({text:o,strong:s}),a.push({text:`– ${c}`,strong:!1})),a}var hee=12.5,gee=4,_ee=6,vee=10,yee=90,bee={latin:1.2,cjk:1.06},pt={latin:1.12,cjk:1.06},mt={sameSlot:10,none:22,short:38,long:70},ht=864e5,gt=/^(\d{4})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2})(?::(\d{2})(?::(\d{2}))?)?)?)?)?$/;function _t(e){let t=typeof e==`string`?gt.exec(e):null;if(!t)return null;let[,n,r,i,a,o,s]=t,c=a==null?i==null?r==null?`year`:`month`:`day`:`time`;return{y:+n,mo:r?+r:1,d:i?+i:1,h:a?+a:0,mi:o?+o:0,s:s?+s:0,prec:c}}var vt={year:0,month:1,day:2,time:3},yt=e=>Date.UTC(e.y,e.mo-1,e.d,e.h,e.mi,e.s);function xee(e,t,n=!1){let r=_t(e),i=_t(t);if(!r||!i)return null;let a=vt[r.prec]<=vt[i.prec]?r.prec:i.prec,o=(e,t,r)=>({key:e,vars:t,long:r,approx:!!n});if(a===`year`||a===`month`){let e=a===`year`?(i.y-r.y)*12:(i.y-r.y)*12+(i.mo-r.mo);return e<=0?null:xt(e,o)}if(a===`time`){let e=yt(i)-yt(r);if(e<=0)return null;if(e<ht){let t=Math.round(e/1e3);if(t<60)return o(`chronicle.gapSeconds`,{n:t},!1);if(t<3600)return o(`chronicle.gapMinutes`,{n:Math.round(t/60)},!1);let n=Math.floor(t/3600),r=Math.round((t-n*3600)/60);return r===60&&(n+=1,r=0),r?o(`chronicle.gapHoursMinutes`,{h:n,m:r},!1):o(`chronicle.gapHours`,{n},!1)}return bt(Math.floor(e/ht),o)}let s=Math.round((Date.UTC(i.y,i.mo-1,i.d)-Date.UTC(r.y,r.mo-1,r.d))/ht);return s<=0?null:bt(s,o)}function See(e){let t=(e,t,n)=>({key:e,vars:t,long:n,approx:!1});if(!(e>0))return null;if(e<ht){let n=Math.round(e/1e3);return n<60?t(`chronicle.gapSeconds`,{n},!1):n<3600?t(`chronicle.gapMinutes`,{n:Math.round(n/60)},!1):t(`chronicle.gapHours`,{n:Math.round(n/3600)},!1)}return bt(Math.round(e/ht),t)}function bt(e,t){return e<30?t(`chronicle.gapDays`,{n:e},!1):xt(Math.max(1,Math.round(e/30.44)),t)}function xt(e,t){let n=Math.floor(e/12),r=e%12;return n?r?t(`chronicle.gapYearsMonths`,{y:n,m:r},!0):t(`chronicle.gapYears`,{n},!0):t(`chronicle.gapMonths`,{n:r},!0)}var St=(e,t)=>e==null?t:t==null||e>t?e:t;function Cee(e){let t=Array.isArray(e?.slots)?e.slots:[],n=[],r=null,i=!1,a=!1;return t.forEach((e,t)=>{let o=(Array.isArray(e?.events)?e.events:[]).filter(e=>e&&typeof e==`object`);if(!o.length)return;let s=o.every(e=>typeof e.date==`string`&&e.date),c=s?[...o].sort((e,t)=>e.date<t.date?-1:+(e.date>t.date)):o,l=c.find(e=>e.date)?.date??null,u=c.some(e=>e.date&&e.approx);c.forEach((e,o)=>{let c=o===0,d=null,f=`sameSlot`;c&&(n.length?(d=a&&s?xee(r,l,i||u):null,f=d?d.long?`long`:`short`:`none`):f=`top`);let p=typeof e.date==`string`&&e.date.length>=10?e.date.slice(0,10):null,m=n.at(-1)?.event,h=!!(p&&m&&typeof m.date==`string`&&m.date.slice(0,10)===p&&!e.approx);n.push({event:e,slotIndex:t,first:c,gap:d,spacing:f,sameDay:h})}),a=s,r=null;for(let e of c)r=St(r,St(e.date,e.dateEnd));i=c.some(e=>e.approx)}),n}var Ct=[`circle`,`square`,`diamond`];function wt(e,t){let n=(Array.isArray(e?.groups)?e.groups:[]).findIndex(n=>n?.id===et(e)(t));return n<0?`none`:Ct[Math.min(n,2)]}function Tt(e,t){let n=(Array.isArray(e?.groups)?e.groups:[]).findIndex(n=>n?.id===et(e)(t));return n>=0&&n<3?n:2}function Et(e,t,n,r){let i=[];if(n.actors)for(let t of Array.isArray(e.actorIds)?e.actorIds:[])i.push(Ye(r.get(t)?.name||t,10)+14);if(n.sources&&i.push(yee),!i.length)return 0;let a=1,o=0;for(let e of i){let t=o?vee+e:e;o&&o+t>532?(a+=1,o=e):o+=t}return a}function Dt({titleLines:e,summaryLines:t,tagLines:n,whenLineCount:r=3}){let i=20+20*Math.max(1,e);return t&&(i+=gee+18*t),n&&(i+=_ee+20*n),Math.max(i,10+18*r)}function Ot(e,t,n){let r=(e,t,r,i)=>n?Ze(e,531,e=>n(e,t)):Xe(e,532/r,i);return{title:Math.max(1,r(e.label||``,`title`,14,bee)),summary:t.summary&&e.summary?r(e.summary,`summary`,hee,pt):0}}function kt(e,t={},{measure:n}={}){let r=new Map((e?.actors||[]).filter(Boolean).map(e=>[e.id,e])),i=new Map((e?.sources||[]).filter(Boolean).map(e=>[e.id,e])),a=(Array.isArray(e?.groups)?e.groups.slice(0,3):[]).map((e,t)=>({label:e?.label,groupIndex:t,shape:Ct[t]})).filter(e=>e.label),o=Cee(e),s=[],c=[],l=[],u=[],d=a.length?34:0,f=null;o.forEach((a,o)=>{let{event:p}=a;if(f!=null){let e=mt[a.spacing]??mt.none;a.gap&&(l.push({y:f+e/2,gap:a.gap}),a.gap.long&&u.push({y0:f,y1:f+e})),d=f+e}let{title:m,summary:h}=Ot(p,t,typeof n==`function`?n:null),g=Et(p,e,t,r),_=Dt({titleLines:m,summaryLines:h,tagLines:g,whenLineCount:ft(p,`en`,a.sameDay).length}),v=Tt(e,p),y=(Array.isArray(p.actorIds)?p.actorIds:[]).map(e=>r.get(e)?.name||e),b=(Array.isArray(p.sourceIds)?p.sourceIds:[]).map(e=>i.get(e)).filter(Boolean);s.push({id:p.id,type:`entry`,position:{x:0,y:d},width:758,height:_,draggable:!1,connectable:!1,data:{event:p,index:o,groupIndex:v,shape:wt(e,p),actorNames:y,sources:b,fields:t,lines:{title:m,summary:h,tags:g},sameDay:a.sameDay,cardH:_}}),c.push({y:d+20,groupIndex:v,shape:wt(e,p),hollow:!p.date}),f=d+_});let p=f??0,m=[];return o.length&&m.push({id:`__spine__`,type:`spine`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:{x:174,top:c[0].y,bottom:c[c.length-1].y,dots:c,pills:l,breaks:u,dotSize:13}}),a.length&&m.push({id:`__legend__`,type:`legend`,position:{x:198,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,data:{groups:a}}),m.push(...s),{errors:[],nodes:m,edges:[],items:o,eventCount:o.length,layout:`chronicle`,size:{width:758,height:p}}}var At=12,wee=40,jt=12.5,Tee={latin:1.2,cjk:1.06},Mt=(e,t=1)=>16+17*e+2+15*t,Eee=e=>e?.dateEnd&&Ye(mee(e,`en`),11)*1.05>176?2:1,Nt=Mt(2,2)+10,Dee=10,Pt=22,Ft=12,It=e=>Ft+Math.max(1,e)*Nt+Pt,Lt=14,Rt=864e5,zt=36e5;function Bt(e){let t=_t(e?.date);if(!t)return null;let n=e=>Date.UTC(e.y,e.mo-1,e.d,e.h,e.mi,e.s),r=e=>e.prec===`year`?Date.UTC(e.y+1,0,1):e.prec===`month`?Date.UTC(e.y,e.mo,1):e.prec===`day`?Date.UTC(e.y,e.mo-1,e.d+1):n(e),i=n(t),a=_t(e?.dateEnd);return a&&r(a)>i?{from:i,to:r(a),kind:`bar`,exact:!0}:t.prec===`time`?{from:i,to:i,kind:`dot`,exact:!0}:{from:i,to:r(t),kind:`band`,exact:!1,prec:t.prec}}var Vt=e=>{let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2?t[n]:(t[n-1]+t[n])/2};function Ht(e){let t=e.slice(1).map((t,n)=>t-e[n]),n=[],r=(e,n)=>{let r=[];for(let i=e+n;i>=0&&i<t.length&&r.length<3&&!(t[i]>=t[e]);i+=n)r.push(t[i]);return r};return t.forEach((e,t)=>{if(e<1728e5)return;let i=r(t,1);i.length||(i=r(t,-1)),i.length&&e/Math.max(Vt(i),6e4)>=20&&n.push({i:t,g:e})}),n.sort((e,t)=>t.g-e.g).slice(0,2).map(e=>e.i).sort((e,t)=>e-t)}function Ut(e){return e>730*Rt?`year`:e>60*Rt?`month`:e>2*Rt?`day`:e>3*zt?`hour`:`minute`}function Wt(e,t,n,r){let i=new Date(e),a=[],o={year:[1,2,5,10],month:[1,2,3,6],day:[1,2,7,14],hour:[1,2,3,6,12],minute:[1,2,5,10,15,30]}[n];for(let s of o){a.length=0;let o;o=n===`year`?Date.UTC(i.getUTCFullYear(),0,1):n===`month`?Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),1):n===`day`?Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()):n===`hour`?Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours()):Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes());let c=0;for(;o<=t&&c++<2e3;){o>=e&&a.push(o);let t=new Date(o);n===`year`?o=Date.UTC(t.getUTCFullYear()+s,0,1):n===`month`?o=Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+s,1):o+=n===`day`?s*Rt:n===`hour`?s*zt:s*6e4}if(a.length<=r)break}return[...a]}function Oee(e,t,n){let r=new Date(e),i=e=>String(e).padStart(2,`0`),a=`${i(r.getUTCMonth()+1)}-${i(r.getUTCDate())}`;if(t===`year`)return String(r.getUTCFullYear());if(t===`month`)return`${r.getUTCFullYear()}-${i(r.getUTCMonth()+1)}`;if(t===`day`)return a;let o=`${i(r.getUTCHours())}:${i(r.getUTCMinutes())}`;return n==null||new Date(n).getUTCDate()!==r.getUTCDate()?`${a} ${o}`:o}function Gt(e,t){let n=new Map,r=(Array.isArray(e?.actors)?e.actors:[]).filter(e=>e?.id);if(!t||r.length<2)return n;for(let t of Array.isArray(e?.groups)?e.groups.slice(0,2):[]){let e=r.filter(e=>t?.id&&e.groupId===t.id);e.length>=2&&n.set(t.id,e)}return n}function Kt(e,{byParty:t=!1}={}){let n=et(e),r=Gt(e,t);return e=>{let t=n(e),i=Array.isArray(e?.actorIds)?e.actorIds:[];return i.length===1&&r.get(t)?.some(e=>e.id===i[0])?`actor:${i[0]}`:t}}function qt(e,t,{byParty:n=!1}={}){let r=Kt(e,{byParty:n}),i=Gt(e,n),a=(Array.isArray(e?.groups)?e.groups.slice(0,3):[]).filter(e=>e&&e.id),o=new Set(t.map(r)),s=a.flatMap((e,t)=>{let n=i.get(e.id)?.filter(e=>o.has(`actor:${e.id}`));return n?.length?n.map(n=>({key:`actor:${n.id}`,label:n.name??``,side:e.label??``,groupIndex:t})):[{key:e.id,label:e.label??``,groupIndex:t}]}),c=new Set(s.map(e=>e.key));return t.some(e=>!c.has(r(e)))&&s.push({key:`__other__`,label:null,groupIndex:2,other:!0}),s}function kee(e,{levels:t=3,width:n=196,gap:r=Dee}={}){let i=e.map(e=>({ids:[e.id],x:e.x,from:e.x,to:e.x}));for(;;){let e=Jt(i,t,n,r);if(e)return e;let a=-1,o=1/0;for(let e=0;e+1<i.length;e++){let t=i[e+1].x-i[e].x;t<o&&(o=t,a=e)}if(a<0)return Jt(i,t,n,r)??[];let s=i[a],c=i[a+1],l=[...s.ids,...c.ids],u=Math.min(s.from,c.from),d=Math.max(s.to,c.to);i.splice(a,2,{ids:l,x:(u+d)/2,from:u,to:d}),i=i.sort((e,t)=>e.x-t.x)}}function Jt(e,t,n,r){let i=Array(t).fill(-1/0),a=[];for(let t of e){let e=t.x-n/2,o=i.findIndex(t=>t+r<=e);if(o<0)return null;i[o]=t.x+n/2,a.push({...t,level:o})}return a}function Aee(e,t={},{measure:n,byParty:r=!1}={}){let i=new Map((e?.actors||[]).filter(Boolean).map(e=>[e.id,e])),a=new Map((e?.sources||[]).filter(Boolean).map(e=>[e.id,e])),o=[];(Array.isArray(e?.slots)?e.slots:[]).forEach((e,t)=>{for(let n of Array.isArray(e?.events)?e.events:[])n&&typeof n==`object`&&o.push({event:n,slotIndex:t})}),o.forEach(e=>e.time=Bt(e.event)),o.forEach(e=>{e.time?.exact&&(e.time.t=e.time.from)});let s=e=>({before:o.slice(0,e).reverse().find(e=>e.time?.exact),after:o.slice(e+1).find(e=>e.time?.exact)}),c=o.filter(e=>e.time?.exact).map(e=>e.time.t),l=c.length>1?Math.max(6e4,(Math.max(...c)-Math.min(...c))/20):zt,u=(e,t,n)=>{let{before:r,after:i}=s(e),a;return a=r&&i?(r.time.t+i.time.t)/2:r?r.time.t+l:i?i.time.t-l:t==null?e*zt:(t+n)/2,t==null?a:Math.min(Math.max(a,t),n-1)};o.forEach((e,t)=>{e.time&&!e.time.exact&&(e.time.t=u(t,e.time.from,e.time.to))}),o.forEach((e,t)=>{if(e.time)return;let n=o.slice(0,t).reverse().find(e=>e.time),r=o.slice(t+1).find(e=>e.time),i=n&&r?(n.time.t+r.time.t)/2:n?n.time.t+l:r?r.time.t-l:t*zt;e.time={t:i,from:i,to:i,kind:`dot`,undated:!0}});let d=[...new Set(o.map(e=>e.time.t))].sort((e,t)=>e-t),f=[...new Set(o.filter(e=>!e.time.undated).map(e=>e.time.t))].sort((e,t)=>e-t),p=f.length?f:d,m=Ht(p),h=[],g=0;for(let e of m)h.push([p[g],p[e]]),g=e+1;h.push([p[g],p[p.length-1]]),h[0][0]=Math.min(h[0][0],d[0]),h[h.length-1][1]=Math.max(h[h.length-1][1],d[d.length-1]);let _=e=>{let t=h.findIndex(([,t])=>e<=t);return t<0?h.length-1:t},v=h.map(([e,t],n)=>({index:n,from:e,to:t,count:o.filter(e=>_(e.time.t)===n).length,unit:t>e?Ut(t-e):`day`})),y=e=>Ye(e,At)*1.06,b=qt(e,o.map(e=>e.event),{byParty:r}).flatMap(e=>[e.label||``,e.side||``]),x=Math.round(Math.min(196,Math.max(132,...b.map(e=>y(e)+wee)))),S=x;v.forEach((e,t)=>{if(t>0){let n=e.from-v[t-1].to;e.breakBefore={x:S,w:64,gap:See(n)},S+=64}e.x0=S,e.w=Math.max(170,e.count*116),e.x1=S+e.w,S=e.x1});let C=S,ee=e=>{let t=v[_(e)],n=t.w-196;return t.to===t.from?t.x0+t.w/2:t.x0+98+(Math.min(Math.max(e,t.from),t.to)-t.from)/(t.to-t.from)*n},w=(e,t)=>Math.min(Math.max(e,v[t].from),v[t].to),te=qt(e,o.map(e=>e.event),{byParty:r}),ne=Kt(e,{byParty:r}),re=e=>{let t=te.findIndex(t=>t.key===ne(e));return t>=0?t:te.length-1},ie=[],ae=[],oe=e=>ie[e],se=e=>ie[e]+ae[e],ce=o.map((e,t)=>{let n=_(e.time.t),r=e.time.kind,i=ee(r===`dot`?e.time.t:w(e.time.from,n)),a=r===`dot`?i:ee(w(e.time.to,n)),o=r===`bar`?i:ee(e.time.t),s=v[n],c=r===`band`&&s.to>s.from&&e.time.to-e.time.from>s.to-s.from,l=r===`band`&&(c||a-i<8)?`dot`:r;return l===`dot`?i=a=o:a-i<6&&(a=i+6),{id:e.event.id,order:t,lane:re(e.event),kind:l,x:o,x0:i,x1:a,undated:!!e.time.undated,coarse:c,prec:e.time.prec,event:e.event}}),le=new Map;for(let e of ce){let t=`${e.lane}:${Math.round(e.x)}`;e.stack=le.get(t)??0,le.set(t,e.stack+1)}let ue=e=>Math.min(2,Math.max(1,n?Ze(e,173,e=>n(e,`title`)):Xe(e,176/jt,Tee))),de=[],fe=[],pe=te.map((e,t)=>{let n=ce.filter(e=>e.lane===t).sort((e,t)=>e.x-t.x||e.order-t.order),r=e=>Math.min(Math.max(e,x+4+98),C-98);return kee(n.map(e=>({id:e.id,x:r(e.x)})))}),me=0;pe.forEach((e,t)=>{ie[t]=me,ae[t]=e.length?It(Math.max(0,...e.map(e=>e.level))+1):34,me+=ae[t]}),pe.forEach((e,t)=>{let n=e=>{let t=e.ids.map(e=>ce.find(t=>t.id===e).x);return(Math.min(...t)+Math.max(...t))/2};for(let r of e){let e=r.x-98,i=r.ids.map(e=>ce.find(t=>t.id===e)).sort((e,t)=>e.order-t.order),a=i.length>1,o=a?1:ue(i[0].event.label||``),s=a?1:i[0].undated?Ye(Ne(`en`,`scale.undated`),11)*1.05>176?2:1:Eee(i[0].event),c=Mt(o,s),l=se(t)-Pt-r.level*Nt,u={id:a?`__run__${fe.length+1}`:i[0].id,lane:t,level:r.level,x:e,y:l-c,w:196,h:c,titleLines:o,timeLines:s,anchor:n(r),members:i};a&&(u.run=fe.length+1,u.span=[Math.min(...i.map(e=>e.x0)),Math.max(...i.map(e=>e.x1))],fe.push(u)),de.push(u)}});let he=ie.length?ie[ie.length-1]+ae[ae.length-1]:0,ge=he+14,_e=v.flatMap(e=>{let t=Math.max(2,Math.floor(e.w/84)),n=e.to>e.from?Wt(e.from,e.to,e.unit,t):[],r=e.unit;return n.length||(n=e.to>e.from?[e.from,e.to]:[e.from],r=e.to>e.from?`minute`:`day`),n.map((e,t)=>({x:ee(e),label:Oee(e,r,t?n[t-1]:null)}))}),ve=fe.reduce((e,t)=>e+1+t.members.length,0),ye=fe.length?Lt+ve*18:0,be=he+56+ye,xe=e=>te[re(e)].groupIndex,Se=[{id:`__scale__`,type:`scaleLayer`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:{width:C,labelW:x,lanesH:he,axisY:ge,lanes:te.map((e,t)=>({...e,top:oe(t),lineY:se(t)})),segments:v,ticks:_e,marks:ce.map(e=>({id:e.id,kind:e.kind,x:e.x,x0:e.x0,x1:e.x1,y:se(e.lane)-e.stack*12,undated:e.undated,coarse:e.coarse,prec:e.prec,approx:!!e.event.approx,groupIndex:te[e.lane].groupIndex})),leaders:de.map(e=>({x:Math.min(Math.max(e.anchor,e.x+8),e.x+e.w-8),y0:e.y+e.h,y1:se(e.lane)-6,run:!!e.run})),brackets:fe.map(e=>({x0:e.span[0],x1:e.span[1],y:se(e.lane)+9,run:e.run}))}}];for(let e of de)Se.push({id:e.id,type:e.run?`scaleRun`:`scaleCard`,position:{x:e.x,y:e.y},width:e.w,height:e.h,draggable:!1,connectable:!1,data:e.run?{run:e.run,events:e.members.map(e=>e.event),groupIndex:te[e.lane].groupIndex,cardH:e.h}:{event:e.members[0].event,undated:e.members[0].undated,groupIndex:xe(e.members[0].event),titleLines:e.titleLines,timeLines:e.timeLines,cardH:e.h,actorNames:(Array.isArray(e.members[0].event.actorIds)?e.members[0].event.actorIds:[]).map(e=>i.get(e)?.name||e),sources:(Array.isArray(e.members[0].event.sourceIds)?e.members[0].event.sourceIds:[]).map(e=>a.get(e)).filter(Boolean)}});return fe.length&&Se.push({id:`__runs__`,type:`scaleRunList`,position:{x,y:he+56+Lt},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,data:{runs:fe.map(e=>({run:e.run,events:e.members.map(e=>e.event)})),width:C-x,lh:18}}),{errors:[],nodes:Se,edges:[],layout:`scale`,eventCount:o.length,segments:v,gathered:fe.map(e=>({run:e.run,ids:e.members.map(e=>e.id)})),cards:de.map(e=>({id:e.id,lane:e.lane,level:e.level,x:e.x,y:e.y,w:e.w,h:e.h,ids:e.members.map(e=>e.id)})),undated:ce.filter(e=>e.undated).length,labelW:x,size:{width:C,height:be}}}function Yt(e,t){if(!e||!t||!e.width||!e.height)return 1;let n=t.width/(e.width*1.12),r=t.height/(e.height*1.12);return Math.min(n,r,1)}function jee(e,t){return!e||!t||!e.width?1:Math.min(t.width/(e.width*1.12),1)}var Xt={width:1600,height:900},Zt=(e,t)=>Math.round(e*Math.min(t,1)*10)/10;function Qt(e,t){let n=`Text on one screen (${e.canvas.width}×${e.canvas.height})`,r=Zt(e.font,e.open.fit),i=Zt(e.font,e.other.fit),a=e=>e.toFixed(1),o=[];e.open.fit>=1&&e.other.fit>=1?o.push(`${n}: full size (${e.font} px) either way.`):o.push(`${n}: ${a(r)} px as it opens (${e.open.name}), ${a(i)} px ${e.other.name}. Full size is ${e.font} px.`);let s=Math.max(r,i);if(s<9?o.push(`Note: the text is too small to read without zooming in (under 9 px). Consider ${t}; do not drop facts to make it fit.`):s<11&&o.push(`Note: the text is small (under 11 px); the reader can zoom in. ${t[0].toUpperCase()}${t.slice(1)} would make it easier to read.`),e.folded!==void 0&&s<11){let t=e.folded>=1?`full size (${e.font} px)`:`${a(Zt(e.font,e.folded))} px`;o.push(`With every issue folded the text is ${t}: the reader can fold issues ("Fold issues" in the bar) instead of your splitting it.`)}return o}var $t={envelope:[{name:`type`,req:`yes`,ty:`string`,note:`always "fact"`},Oe(2),{name:`title`,req:`yes`,ty:`string`,note:`diagram title, shown at the top left`}],actors:[{name:`id`,req:`yes`,ty:`string`,note:`unique within the diagram; events reference it via actorIds`},{name:`name`,req:`yes`,ty:`string`,note:`display name, e.g. "Huayuan Trading"`},{name:`role`,req:`no`,ty:`string`,note:`procedural standing, e.g. "plaintiff"`},{name:`groupId`,req:`*`,ty:`string`,note:`the side this party is on: the 1st or the 2nd group. Required with 2 or more parties; not written with one`}],groups:[{name:`id`,req:`yes`,ty:`string`,note:`parties (2 or more) or events (one party) reference it via groupId`},{name:`label`,req:`yes`,ty:`string`,note:`column heading, e.g. "Sun Hao's side" (parties) or "performance as agreed" (one party's acts)`},{name:``,req:``,ty:``,note:`at most 3: the 1st on the left (top) side, the 2nd on the right (bottom) side, the 3rd on the axis`},{name:``,req:``,ty:``,note:`2 or more parties: the groups split the parties. 0 or 1 party: they split the events by kind of act`}],sources:[{name:`id`,req:`yes`,ty:`string`,note:`events reference it via sourceIds`},{name:`type`,req:`yes`,ty:`string`,note:`contract / evidence / judgment / transcript, etc.`},{name:`name`,req:`yes`,ty:`string`,note:`material name, e.g. "corridor surveillance video"`},{name:`loc`,req:`no`,ty:`object`,note:`location, e.g. { file, page } or { file, timestamp }`},{name:`quote`,req:`no`,ty:`string`,note:`verbatim excerpt (several passages joined with ……), shown when the card is opened; a shortened or reworded version goes in detail`}],slots:[{name:`events`,req:`yes`,ty:`array`,note:`events at this time point; must not be empty`},{name:``,req:``,ty:``,note:`array order is chronological order; date is display-only and never reorders`}],events:[{name:`id`,req:`yes`,ty:`string`,note:`unique within the diagram`},{name:`date`,req:`no`,ty:`string`,note:`ISO 8601. Go to seconds when known, otherwise stop at the day. **Leave it out when the material gives no date: never make one up.** The card then says the date is unknown; the order is the order of slots, so nothing moves`},{name:`label`,req:`yes`,ty:`string`,note:`card title; about 20 characters per line, at most two lines`},{name:`dateEnd`,req:`no`,ty:`string`,note:`for a span, the end instant; needs date, and must not be earlier than it`},{name:`approx`,req:`no`,ty:`boolean`,note:`time is not exact (estimated or inferred); the diagram shows "approx."`},{name:`dateNote`,req:`no`,ty:`string`,note:`why the time is not exact, and how it was derived`},{name:`summary`,req:`no`,ty:`string`,note:`the line under the card title; about 22 characters`},{name:`detail`,req:`no`,ty:`string`,note:`full text revealed when the card is opened`},{name:`actorIds`,req:`no`,ty:`string[]`,note:`parties involved. One: that party's side and column. Two or more, or none: the centre axis`},{name:`groupId`,req:`*`,ty:`string`,note:`only when the diagram has 0 or 1 party: which side this event falls on. With 2 or more parties, leave it out`},{name:`sourceIds`,req:`no`,ty:`string[]`,note:`which materials it rests on`}]};function Mee(){let e=[`Fields of a fact spec. "yes" means required.`,``];for(let[t,n]of Object.entries($t)){e.push(`[${t}]`);for(let t of n)t.name?e.push(` ${t.name.padEnd(12)} ${t.req.padEnd(3)} ${t.ty.padEnd(15)} ${t.note}`):e.push(` · ${t.note}`);e.push(``)}return e.push(`"*": required or not depending on the number of parties, as the note says.`),e.push(`Cross-field rules (dangling references, a span running backwards, a party without a`),e.push(`side, two events in the same lane of one time slot) are not listed`),e.push(`above: call antu_validate after writing. It reports each problem with its field path.`),e.join(`
1426
+ import{execFileSync as e,spawn as t,spawnSync as n}from"node:child_process";import{existsSync as r,mkdtempSync as i,readFileSync as a,rmSync as o,statSync as s,writeFileSync as c}from"node:fs";import{tmpdir as l}from"node:os";import{basename as u,dirname as d,join as f,resolve as p}from"node:path";import{fileURLToPath as m,pathToFileURL as h}from"node:url";import{createHash as g}from"node:crypto";var _=Object.create,v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,x=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,C=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),ee=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=b(t),a=0,o=i.length,s;a<o;a++)s=i[a],!S.call(e,s)&&s!==n&&v(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=y(t,s))||r.enumerable});return e},w=(e,t,n)=>(n=e==null?{}:_(x(e)),ee(t||!e||!e.__esModule||!S.call(e,`default`)?v(n,`default`,{value:e,enumerable:!0}):n,e)),te=(e,t=8)=>Math.ceil(e/t-1e-9)*t,ne={minH:40,minW:120,stepW:40,gap:24,levelGap:48,padX:12,padY:6},re={hair:.75,normal:1.1,strong:1.75,heavy:2.5},ie={solid:void 0,dashed:`6 4`,dotted:`2 3`,longDash:`10 4`,dashDot:`10 3 2 3`},ae=e=>Math.max(ne.minW,Math.ceil(e/ne.stepW-1e-9)*ne.stepW),oe=e=>Math.max(ne.minH,te(e)),se=[`document`,`modern`,`legal`,`dark`],ce={equity:{width:re.normal},control:{width:re.heavy},contract:{width:re.normal,dash:ie.longDash},debt:{width:re.strong,dash:ie.dashDot},guarantee:{width:re.normal,dash:ie.dashed},kinship:{width:3.6,double:!0},employment:{width:re.normal,dash:ie.dotted},agency:{width:re.strong,dash:`1 4`,round:!0},other:{width:re.hair,dash:`3 3`}},le={equity:{width:.85},control:{width:1.9},contract:{width:.85,dash:`5 3`},debt:{width:1.3,dash:`5 2 1.5 2`},guarantee:{width:.85,dash:`4 3`},kinship:{width:3.2,double:!0},employment:{width:.85,dash:ie.dotted},agency:{width:1.3,dash:`1 4`,round:!0},other:{width:.6,dash:`3 3`}},ue=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...n,stroke:t}])),de={neutral:{width:re.normal},positive:{width:re.strong},negative:{width:re.normal,dash:ie.dashed}},fe={main:{width:re.strong},plain:{width:re.normal},back:{width:re.normal,dash:ie.dashed}},pe={conclusion:{width:re.heavy},norm:{width:re.normal},element:{width:re.normal},fact:{width:re.hair},inference:{width:re.normal,dash:ie.dotted},judgement:{width:re.strong}},me={for:{width:re.normal},against:{width:re.strong,dash:ie.dashed},basis:{width:re.normal,dash:ie.dotted}},he=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>[e,{...n,...t[e]}])),ge={document:{id:`document`,scheme:`light`,shadowRgb:`17, 17, 17`,chrome:{radius:2,capsule:2,chip:2,bg:`#ffffff`,bgPop:`#ffffff`,border:`1px solid #111111`,shadow:`none`,blur:`none`},labelKey:`theme.document`,font:{body:`"FangSong", "STFangsong", "FangSong_GB2312", "Songti SC", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", serif`,head:`"SimHei", "Heiti SC", "STHeiti", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#111111`,ink2:`#2b2b2b`,ink3:`#4d4d4d`,ink4:`#767676`,bg:`#ffffff`,canvas:`#ffffff`,frame:`#111111`,line:`#c9c9c9`,chip:`#f0f0f0`,side1:`#111111`,side2:`#555555`,axis:`#767676`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:18,company:3,organization:3,government:3,other:3,pill:2,group:12},entity:{person:{stroke:`#111111`,fill:`#ffffff`,width:1.3},company:{stroke:`#111111`,fill:`#ffffff`,width:1.6},organization:{stroke:`#111111`,fill:`#ffffff`,width:1.3,dash:ie.dashed},government:{stroke:`#111111`,fill:`#ffffff`,width:1.3},other:{stroke:`#555555`,fill:`#ffffff`,width:1.1,dash:ie.dotted}},relation:ue(le,`#767676`),camp:[{fill:`#ffffff`,stroke:`#111111`,text:`#111111`},{fill:`#ececec`,stroke:`#111111`,text:`#111111`},{fill:`#f7f7f7`,stroke:`#8a8a8a`,text:`#4d4d4d`}],group:{fill:`#f5f5f5`,stroke:`#8a8a8a`,title:`#111111`},campBox:{fill:`none`,stroke:`#111111`,width:.75,dash:`2 3`},flow:{outcome:he(de,{neutral:{stroke:`#111111`,fill:`#ffffff`},positive:{stroke:`#111111`,fill:`#ffffff`},negative:{stroke:`#111111`,fill:`#ececec`}}),start:{stroke:`#111111`,fill:`#e2e2e2`},state:{warn:{stroke:`#a16207`,fill:`#fef3c7`},stop:{stroke:`#b91c1c`,fill:`#fee2e2`},done:{stroke:`#15803d`,fill:`#dcfce7`}},note:{stroke:`none`,fill:`#f5f5f5`,fold:`#767676`},stage:{fill:`#f5f5f5`,stroke:`#8a8a8a`,title:`#111111`},stageLit:{fill:`#e2e2e2`,stroke:`#111111`,title:`#111111`},link:he(fe,{main:{stroke:`#111111`},plain:{stroke:`#2b2b2b`},back:{stroke:`#4d4d4d`}})},justify:{node:he(pe,{conclusion:{stroke:`#111111`,fill:`#ffffff`},norm:{stroke:`#111111`,fill:`#ececec`},element:{stroke:`#111111`,fill:`#ffffff`},fact:{stroke:`#111111`,fill:`#ffffff`},inference:{stroke:`#111111`,fill:`#ffffff`},judgement:{stroke:`#111111`,fill:`#ececec`}}),stance:he(me,{for:{stroke:`#2b2b2b`},against:{stroke:`#111111`},basis:{stroke:`#4d4d4d`}})},pill:{colored:!1,border:`#111111`}},modern:{id:`modern`,scheme:`light`,shadowRgb:`15, 23, 42`,chrome:{radius:14,capsule:999,chip:999,bg:`rgba(255, 255, 255, 0.78)`,bgPop:`rgba(255, 255, 255, 0.94)`,border:`1px solid rgba(15, 23, 42, 0.07)`,shadow:`0 4px 18px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06)`,blur:`blur(16px) saturate(1.8)`},labelKey:`theme.modern`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#0f172a`,ink2:`#475569`,ink3:`#64748b`,ink4:`#94a3b8`,bg:`#fbfcfd`,canvas:`#fbfcfd`,frame:`#e2e8f0`,line:`#e8ebef`,chip:`#f1f4f8`,side1:`#475569`,side2:`#64748b`,axis:`#94a3b8`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:14,company:8,organization:8,government:6,other:8,pill:12,group:12},entity:{person:{stroke:`#94a3b8`,fill:`#f1f5f9`,width:1},company:{stroke:`#334155`,fill:`#ffffff`,width:1.25},organization:{stroke:`#94a3b8`,fill:`#ffffff`,width:1,dash:ie.dashed},government:{stroke:`#64748b`,fill:`#f8fafc`,width:1},other:{stroke:`#94a3b8`,fill:`#f8fafc`,width:.9,dash:ie.dotted}},relation:ue(ce,`#475569`),camp:[{fill:`#f1f5f9`,stroke:`#94a3b8`,text:`#334155`},{fill:`#ffffff`,stroke:`#94a3b8`,text:`#334155`},{fill:`#f8fafc`,stroke:`#e2e8f0`,text:`#64748b`}],group:{fill:`#f8fafc`,stroke:`#e2e8f0`,title:`#475569`},campBox:{fill:`#f8fafc`,stroke:`#e2e8f0`,width:1},flow:{outcome:he(de,{neutral:{stroke:`#64748b`,fill:`#f8fafc`},positive:{stroke:`#334155`,fill:`#f1f5f9`},negative:{stroke:`#64748b`,fill:`#f1f5f9`}}),start:{stroke:`#334155`,fill:`#e2e8f0`},state:{warn:{stroke:`#b45309`,fill:`#fffbeb`},stop:{stroke:`#be123c`,fill:`#fff1f2`},done:{stroke:`#047857`,fill:`#ecfdf5`}},note:{stroke:`none`,fill:`#f1f5f9`,fold:`#94a3b8`},stage:{fill:`#f8fafc`,stroke:`#e2e8f0`,title:`#475569`},stageLit:{fill:`#f1f5f9`,stroke:`#64748b`,title:`#334155`},link:he(fe,{main:{stroke:`#0f172a`},plain:{stroke:`#475569`},back:{stroke:`#64748b`}})},justify:{node:he(pe,{conclusion:{stroke:`#0f172a`,fill:`#f1f5f9`},norm:{stroke:`#475569`,fill:`#e2e8f0`},element:{stroke:`#64748b`,fill:`#f8fafc`},fact:{stroke:`#94a3b8`,fill:`#ffffff`},inference:{stroke:`#64748b`,fill:`#f8fafc`},judgement:{stroke:`#334155`,fill:`#e2e8f0`}}),stance:he(me,{for:{stroke:`#475569`},against:{stroke:`#334155`},basis:{stroke:`#94a3b8`}})},pill:{colored:!1,border:`#cbd5e1`}},legal:{id:`legal`,scheme:`light`,shadowRgb:`19, 35, 63`,chrome:{radius:6,capsule:6,chip:4,bg:`#ffffff`,bgPop:`#ffffff`,border:`1px solid #c7d2e4`,shadow:`0 2px 10px rgba(19, 35, 63, 0.10)`,blur:`none`},labelKey:`theme.legal`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#13233f`,ink2:`#2d4366`,ink3:`#5b6f8f`,ink4:`#8aa0c4`,bg:`#ffffff`,canvas:`#ffffff`,frame:`#c7d2e4`,line:`#dbe3f0`,chip:`#eef3fb`,side1:`#1f3f7f`,side2:`#9a1b1b`,axis:`#8aa0c4`,dots:`#e8ebef`,mini:`#cbd5e1`,miniGhost:`#eef1f5`,exportBg:`#ffffff`,labelBg:`rgba(255, 255, 255, 0.85)`},radius:{person:14,company:3,organization:4,government:3,other:4,pill:4,group:6},entity:{person:{stroke:`#2f5aa8`,fill:`#eef3fb`,width:1},company:{stroke:`#1f3f7f`,fill:`#e3ecfa`,width:1.5},organization:{stroke:`#2f5aa8`,fill:`#f4f7fc`,width:1,dash:ie.dashed},government:{stroke:`#13233f`,fill:`#eef3fb`,width:1.1},other:{stroke:`#8aa0c4`,fill:`#f8fafd`,width:.9,dash:ie.dotted}},relation:{equity:{...ce.equity,stroke:`#1f3f7f`},control:{...ce.control,stroke:`#13233f`},contract:{...ce.contract,stroke:`#5b6f8f`},debt:{...ce.debt,stroke:`#9a1b1b`},guarantee:{...ce.guarantee,stroke:`#2f5aa8`},kinship:{...ce.kinship,stroke:`#4b3a8c`},employment:{...ce.employment,stroke:`#1d6b6b`},agency:{...ce.agency,stroke:`#1d6b6b`},other:{...ce.other,stroke:`#8aa0c4`}},camp:[{fill:`#eaf0fb`,stroke:`#9fb6e0`,text:`#1f3f7f`},{fill:`#fbecec`,stroke:`#e3b4b4`,text:`#9a1b1b`},{fill:`#f4f7fc`,stroke:`#c7d2e4`,text:`#5b6f8f`}],group:{fill:`#f4f7fc`,stroke:`#c7d2e4`,title:`#2d4366`},campBox:{fill:`#f4f7fc`,stroke:`#c7d2e4`,width:1},flow:{outcome:he(de,{neutral:{stroke:`#2f5aa8`,fill:`#eef3fb`},positive:{stroke:`#1f3f7f`,fill:`#e3ecfa`},negative:{stroke:`#9a1b1b`,fill:`#fbecec`}}),start:{stroke:`#13233f`,fill:`#dbe5f5`},state:{warn:{stroke:`#a16207`,fill:`#fdf6e3`},stop:{stroke:`#9a1b1b`,fill:`#fbecec`},done:{stroke:`#1f6f43`,fill:`#e8f4ec`}},note:{stroke:`none`,fill:`#f4f7fc`,fold:`#8aa0c4`},stage:{fill:`#f4f7fc`,stroke:`#c7d2e4`,title:`#2d4366`},stageLit:{fill:`#eaf0fb`,stroke:`#1f3f7f`,title:`#1f3f7f`},link:he(fe,{main:{stroke:`#13233f`},plain:{stroke:`#2d4366`},back:{stroke:`#5b6f8f`}})},justify:{node:he(pe,{conclusion:{stroke:`#1f3f7f`,fill:`#e3ecfa`},norm:{stroke:`#4b3a8c`,fill:`#efecf8`},element:{stroke:`#2f5aa8`,fill:`#eef3fb`},fact:{stroke:`#8aa0c4`,fill:`#f8fafd`},inference:{stroke:`#1d6b6b`,fill:`#e8f4f4`},judgement:{stroke:`#13233f`,fill:`#dbe5f5`}}),stance:he(me,{for:{stroke:`#2d4366`},against:{stroke:`#9a1b1b`},basis:{stroke:`#4b3a8c`}})},pill:{colored:!0,border:`#c7d2e4`}},dark:{id:`dark`,scheme:`dark`,shadowRgb:`226, 232, 240`,chrome:{radius:14,capsule:999,chip:999,bg:`rgba(24, 29, 37, 0.82)`,bgPop:`rgba(28, 34, 43, 0.96)`,border:`1px solid rgba(255, 255, 255, 0.09)`,shadow:`0 4px 18px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3)`,blur:`blur(16px) saturate(1.4)`},labelKey:`theme.dark`,font:{body:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`,head:`system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif`},color:{ink:`#e6ebf2`,ink2:`#b6c0cf`,ink3:`#8b97a9`,ink4:`#6b778a`,bg:`#14181f`,canvas:`#14181f`,frame:`#2a3240`,line:`#262d38`,chip:`#1e2530`,side1:`#9fb3d1`,side2:`#7f8aa0`,axis:`#6b778a`,dots:`#232a35`,mini:`#4a5568`,miniGhost:`#232a35`,exportBg:`#14181f`,labelBg:`rgba(20, 24, 31, 0.85)`},radius:{person:14,company:8,organization:8,government:6,other:8,pill:12,group:12},entity:{person:{stroke:`#8b97a9`,fill:`#1f2733`,width:1},company:{stroke:`#cbd5e1`,fill:`#1a2029`,width:1.25},organization:{stroke:`#8b97a9`,fill:`#161b22`,width:1,dash:ie.dashed},government:{stroke:`#a3b0c4`,fill:`#1c2430`,width:1},other:{stroke:`#6b778a`,fill:`#171c24`,width:.9,dash:ie.dotted}},relation:ue(ce,`#a3b0c4`),camp:[{fill:`#1f2733`,stroke:`#6b778a`,text:`#d3dbe7`},{fill:`#161b22`,stroke:`#6b778a`,text:`#d3dbe7`},{fill:`#1a2029`,stroke:`#2f3846`,text:`#8b97a9`}],group:{fill:`#1a2029`,stroke:`#2f3846`,title:`#b6c0cf`},campBox:{fill:`#1a2029`,stroke:`#2f3846`,width:1},flow:{outcome:he(de,{neutral:{stroke:`#8b97a9`,fill:`#1a2029`},positive:{stroke:`#d3dbe7`,fill:`#1f2733`},negative:{stroke:`#8b97a9`,fill:`#1f2733`}}),start:{stroke:`#d3dbe7`,fill:`#2a3240`},state:{warn:{stroke:`#e0a63a`,fill:`#2e2410`},stop:{stroke:`#f0707a`,fill:`#33161a`},done:{stroke:`#4cc38a`,fill:`#10281d`}},note:{stroke:`none`,fill:`#1f2733`,fold:`#6b778a`},stage:{fill:`#1a2029`,stroke:`#2f3846`,title:`#b6c0cf`},stageLit:{fill:`#232c3a`,stroke:`#8b97a9`,title:`#e6ebf2`},link:he(fe,{main:{stroke:`#e6ebf2`},plain:{stroke:`#b6c0cf`},back:{stroke:`#8b97a9`}})},justify:{node:he(pe,{conclusion:{stroke:`#e6ebf2`,fill:`#1f2733`},norm:{stroke:`#b6c0cf`,fill:`#2a3240`},element:{stroke:`#8b97a9`,fill:`#1a2029`},fact:{stroke:`#6b778a`,fill:`#161b22`},inference:{stroke:`#8b97a9`,fill:`#1a2029`},judgement:{stroke:`#cbd5e1`,fill:`#2a3240`}}),stance:he(me,{for:{stroke:`#b6c0cf`},against:{stroke:`#e6ebf2`},basis:{stroke:`#6b778a`}})},pill:{colored:!1,border:`#3a4455`}}},_e=e=>Object.prototype.hasOwnProperty.call(ge,e),ve=new Map,ye=[`experimental`,`stable`,`deprecated`];function be(e,t){if(!e)throw Error(`registerKnowledge: type must not be empty`);if(!t?.validate)throw Error(`registerKnowledge: validate is required`);if(!t?.describe)throw Error(`registerKnowledge: describe is required (the agent-facing field table)`);if(!Number.isInteger(t.specVersion)||t.specVersion<1)throw Error(`registerKnowledge: specVersion is required, a whole number (the generation of this type's JSON format, core/specVersion.js)`);xe(e,t),ve.set(e,t)}function xe(e,t){let n=Object.keys(t.layouts??{}),r=Object.keys(t.diagrams??{});for(let t of n)if(!r.includes(t))throw Error(`registerKnowledge: ${e}/${t} has a layout but no entry in diagrams (version, status, since)`);for(let t of r)if(!n.includes(t))throw Error(`registerKnowledge: ${e}/${t} is in diagrams but has no layout`);for(let[n,r]of Object.entries(t.diagrams??{})){if(!Number.isInteger(r.version)||r.version<1)throw Error(`registerKnowledge: ${e}/${n}: version must be a whole number >= 1`);if(!ye.includes(r.status))throw Error(`registerKnowledge: ${e}/${n}: status must be one of ${ye.join(`, `)}`);if(!/^\d+\.\d+\.\d+$/.test(r.since??``))throw Error(`registerKnowledge: ${e}/${n}: since must be a release number such as 0.7.0`)}}function Se(e){let t=ve.get(e);return Object.entries(t?.diagrams??{}).map(([t,n])=>({type:e,kind:t,...n}))}function Ce(e){return ve.get(e)}function we(){return[...ve.entries()].map(([e,t])=>({type:e,labelKey:t.label??`graphType.${e}`}))}function Te(e){return ve.get(e)?.validate}function Ee(e,t){let n=ve.get(e)?.layouts;if(n)return t&&n[t]?n[t]:Object.values(n)[0]}function De(e){return Object.keys(ve.get(e)?.layouts??{})}var Oe=e=>({name:`specVersion`,req:`no`,ty:`integer`,note:`which generation of this format the file follows (now ${e}); omit = the current one. Write it: it is how an older file is recognised after a breaking change`});function ke(e,t){return e.specVersion===void 0?null:!Number.isInteger(e.specVersion)||e.specVersion<1?{key:`err.specVersionForm`,params:{value:JSON.stringify(e.specVersion)}}:Number.isInteger(t)&&e.specVersion>t?{key:`err.specVersionNewer`,params:{value:e.specVersion,known:t,type:e.type}}:null}var Ae={"common.none":`(none)`,"common.close":`Close`,"common.untitled":`Antu`,"fallback.invalidTitle":({n:e})=>`This data cannot be rendered (${e} problem${e===1?``:`s`})`,"fallback.noRendererTitle":({type:e})=>`No renderer registered for type = "${e}"`,"fallback.registered":({list:e})=>`Registered: ${e}`,"fallback.noInlineData":`No inline data found in this file. Something went wrong when it was generated; please regenerate the HTML.`,"fallback.devNoData":`The dev server received no data. Specify one with ?example=0 or ?spec=examples/some-file.json.`,"error.renderTitle":`Rendering failed`,"error.renderHint":`The data itself may be fine (validation passed); this rendering kind threw an error. Send the text below to the developer, or try another rendering kind.`,"info.span":({from:e,to:t})=>`${e} to ${t}`,"info.slots":({n:e})=>`${e} time slot${e===1?``:`s`}`,"info.actors":({n:e})=>`${e} part${e===1?`y`:`ies`}`,"info.sources":({n:e})=>`${e} source${e===1?``:`s`}`,"info.nodes":({n:e})=>`${e} node${e===1?``:`s`}`,"info.stages":({n:e})=>`${e} stage${e===1?``:`s`}`,"dock.actors":`Parties`,"dock.summary":`Summary`,"dock.sources":`Sources`,"dock.orientation":`Which way the levels run: vertical, top to bottom; horizontal, left to right.`,"dock.orientationCamps":`Which way the levels run: vertical, top to bottom; horizontal, left to right. With the camps boxed they stand across that way: side by side when vertical, one under the other when horizontal, so the picture can look the other way round.`,"dock.vertical":`Vertical`,"dock.horizontal":`Horizontal`,"dock.grid":`Grid`,"dock.stagger":`Stagger`,"dock.byParty":`Lane per party`,"dock.staggerHint":`Let cards in different columns overlap by half a row, so the diagram is shorter and its text larger`,"dock.exportImage":`Export image`,"dock.exporting":`Exporting…`,"dock.exportTitle":`Export the whole diagram as a PNG (2× resolution)`,"dock.lang":`Language`,"dock.fold":`Fold`,"dock.display":`Display`,"dock.restore":`Restore this diagram's defaults`,"dock.restoreTitle":`Clear this diagram's remembered choices and open it with the built-in defaults; the theme and the language are not changed.`,"export.failed":({message:e})=>`Export failed: ${e}`,"dock.langEn":`EN`,"dock.langZh":`中文`,"card.sources":({n:e})=>`${e} source${e===1?``:`s`}`,"card.sourcesUnlisted":`No sources listed`,"card.sourcesList":({n:e,names:t})=>`${e} source${e===1?``:`s`}: ${t}`,"card.duration":({duration:e})=>`Duration ${e}`,"card.approxPrefix":`approx. `,"card.dateUnknown":`date unknown`,"card.unitDay":({n:e})=>`${e} day${e===1?``:`s`}`,"card.unitHour":({n:e})=>`${e} hour${e===1?``:`s`}`,"card.unitMinute":({n:e})=>`${e} min`,"card.unitSecond":({n:e})=>`${e} sec`,"card.ariaLabel":({label:e,date:t})=>t?`${e}, ${t}`:e,"card.dateNote":({note:e})=>`Time note: ${e}`,"card.previewHint":`Click a card to read the full text`,"flow.conditions":`Conditions`,"flow.detail":`Detail`,"flow.mainLine":`Main line`,"flow.states":`States`,"flow.stages":`Stages`,"flow.rules":`Rules`,"flow.linkStraight":`Straight`,"flow.linkCurved":`Curved`,"flow.linkStyle":`Link style`,"rule.tableTitle":`Rules`,"rule.tableNote":`What may happen along the way; not steps of the flow`,"rule.tableNoteContract":`What may happen while the contract runs; not steps of the flow`,"rule.colWhen":`If`,"rule.colThen":`Then`,"rule.colScope":`Stages`,"rule.groupEnd":({end:e})=>`May lead to “${e}”`,"rule.groupRest":`Other rules`,"rule.count":({n:e})=>`${e}`,"rule.anyOf":`Any of:`,"rule.tScopeAll":`Throughout`,"rule.tScopeRange":({from:e,to:t})=>`${e} → ${t}`,"flow.ruleBadge":({n:e})=>e===1?`1 rule`:`${e} rules`,"flow.noteTag":`Note`,"rule.if":`If`,"rule.or":`, or `,"flow.previewHint":`Click a node to read the full text`,"aria.nodeDefault":`Press enter or space to select this node.`,"aria.nodeKeyboardDisabled":`Press enter or space to select this node. Once selected, use the arrow keys to move it.`,"aria.nodeMoved":({x:e,y:t})=>`Node moved. New position: x ${e}, y ${t}`,"aria.edgeDefault":`Press enter or space to select this connection.`,"aria.controls":`Canvas controls`,"aria.zoomIn":`Zoom in`,"aria.zoomOut":`Zoom out`,"aria.fitView":`Fit view`,"aria.interactive":`Toggle interactivity`,"aria.minimap":`Minimap`,"aria.handle":`Connection point`,"sourceType.statute":`Statute`,"sourceType.case":`Case`,"sourceType.contract":`Contract`,"sourceType.evidence":`Evidence`,"sourceType.document":`Document`,"sourceType.web":`Web`,"sourceType.other":`Other`,"graphKind.timeline":`Timeline`,"graphKind.flow":`Flowchart`,"header.theme":`Theme`,"theme.document":`Document`,"theme.modern":`Modern`,"theme.legal":`Legal`,"theme.dark":`Dark`,"header.kindOpen":({n:e})=>`All ${e} ways of drawing`,"header.kindPrev":`Previous way of drawing`,"header.kindNext":`Next way of drawing`,"header.kindGroup":`Way of drawing`,"header.fold":`Fold the card`,"header.unfold":`Show the card`,"graphKind.chronicle":`Chronicle`,"graphKind.scale":`Time scale`,"scale.segment":({n:e,unit:t,count:n})=>`Segment ${e} · ${t} · ${n} event${n===1?``:`s`}`,"scale.unit.year":`by year`,"scale.unit.month":`by month`,"scale.unit.day":`by day`,"scale.unit.hour":`by hour`,"scale.unit.minute":`by minute`,"scale.other":`Other`,"scale.events":`Events`,"scale.undated":`date unknown · placed by order`,"scale.coarse.day":`that day (time unknown)`,"scale.coarse.month":`that month (day unknown)`,"scale.coarse.year":`that year (month unknown)`,"scale.run":({n:e})=>`${e} events`,"scale.runListed":({n:e})=>`${e} events too close to show one by one:`,"chronicle.gapSeconds":({n:e})=>`+${e} s`,"chronicle.gapMinutes":({n:e})=>`+${e} min`,"chronicle.gapHours":({n:e})=>`+${e} h`,"chronicle.gapHoursMinutes":({h:e,m:t})=>`+${e} h ${t} min`,"chronicle.gapDays":({n:e})=>`${e} day${e===1?``:`s`} later`,"chronicle.gapMonths":({n:e})=>`${e} month${e===1?``:`s`} later`,"chronicle.gapYears":({n:e})=>`${e} year${e===1?``:`s`} later`,"chronicle.gapYearsMonths":({y:e,m:t})=>`${e} yr ${t} mo later`,"chronicle.dateUnknown":`Date unknown`,"graphType.fact":`Fact`,"graphType.relationship":`Relationship`,"graphType.procedure":`Procedure`,"graphType.justification":`Justification`,"err.notObject":({at:e})=>`${e}: must be an object`,"err.notArray":({at:e})=>`${e} must be an array`,"err.required":({at:e,field:t})=>`${e}: missing required field \`${t}\``,"err.mustBeString":({at:e,field:t})=>`${e}: \`${t}\` must be a string`,"err.duplicateId":({at:e,id:t})=>`${e}: duplicate id "${t}"`,"err.missingRef":({at:e,field:t,kind:n,id:r})=>`${e}: ${t} refers to a non-existent ${n} "${r}"`,"err.tooManyGroups":({at:e,max:t,actual:n})=>`${e}: at most ${t} groups (the axis has two sides plus the centre), got ${n}`,"err.slotsEmpty":"`slots` must not be empty","err.slotEventsEmpty":({at:e})=>`${e}.events must not be empty (an empty time slot carries no meaning)`,"err.slotEventEmptyShape":({at:e})=>`${e}: must be an object of the form { events: [ … ] }`,"err.oneEventPerCell":({at:e,a:t,b:n})=>`${e}: two events share the same lane in one time slot ("${t}" and "${n}"); one cell holds one event`,"err.badDate":({at:e,field:t,value:n})=>`${e}: \`${t}\` is not ISO 8601 (e.g. 2017-05-02T09:24:03), got "${n}"`,"err.dateEndNeedsDate":({at:e})=>`${e}: \`dateEnd\` is written but \`date\` is not; a span needs its start`,"err.dateEndBeforeDate":({at:e,end:t,start:n})=>`${e}: \`dateEnd\` (${t}) is earlier than \`date\` (${n}); a span cannot run backwards`,"err.summaryTooLong":({at:e,max:t,actual:n})=>`${e}: \`summary\` is too wide for one line (about ${n} full-width characters, limit ${t}); shorten it or move the text to detail`,"err.groupNeedsOneActor":({at:e,groupId:t,n})=>`${e}: a side group ("${t}") must name exactly one party (currently ${n}); events that involve no particular party belong in the centre group or should omit groupId`,"err.multiActorNeedsAxis":({at:e,n:t,groupId:n})=>`${e}: an event with ${t} parties belongs on the centre axis, but groupId points at a side group ("${n}"); the two contradict each other`,"err.viewsRemoved":"`views` is no longer part of the format (placement rules v1): delete it. A diagram has one placement: with 2 or more parties, write `groupId` on each party (its side); with 1 party, on the events","err.actorNeedsGroup":({at:e,n:t})=>`${e}: the diagram has ${t} parties, so each party says which side it is on: write \`groupId\` with the 1st or the 2nd of \`groups\` (add \`groups\` if there are none)`,"err.actorGroupNotSide":({at:e,groupId:t})=>`${e}: \`groupId\` "${t}" is the 3rd group, the axis; a party belongs to the 1st or the 2nd group (a side)`,"err.actorGroupOneParty":({at:e})=>`${e}: a party carries \`groupId\` only when the diagram has 2 or more parties; with one party the groups split the events, so write \`groupId\` on the events`,"err.eventGroupWithParties":({at:e})=>`${e}: the diagram has 2 or more parties, so the groups belong to the parties and an event is placed by its \`actorIds\`: delete the event's \`groupId\` (one party → that party's side; several or none → the axis)`,"err.specNotObject":`a spec must be a JSON object`,"err.envelopeTypeRequired":"missing required field `type` (the engine uses it to pick a renderer)","err.envelopeTypeString":"`type` must be a string","err.envelopeTypeUnknown":'`type` is "{type}", which is not a diagram type; expected one of {list}',"err.envelopeTypeIsKind":'`type` is "{type}", which is a way of drawing a {owner} diagram, not a type: write `"type": "{owner}"` (the way it is drawn is chosen on the page, not in the JSON)',"err.envelopeTitleString":"`title` must be a string","err.specVersionForm":"`specVersion` must be a whole number from 1 up, got {value}","err.specVersionNewer":'`specVersion` is {value}, newer than this engine knows for "{type}" ({known}): update the engine, or write the file for the older format',"err.slotNotArray":"`slots` must be an array (one slot = one time point)","err.slotShape":({at:e})=>`${e}: must be an object of the form { events: [ … ] }`,"err.eventsNotArray":({at:e})=>`${e}.events must be an array`,"rerr.entitiesEmpty":"`entities` must not be empty (a diagram needs at least two parties)","rerr.relationsEmpty":"`relations` must not be empty (the parties have to be related)","rerr.notArray":({field:e})=>`\`${e}\` must be an array`,"rerr.notObject":({at:e})=>`${e}: must be an object`,"rerr.required":({at:e,field:t})=>`${e}: missing required field \`${t}\``,"rerr.duplicateId":({at:e,id:t,what:n})=>`${e}: id "${t}" duplicates an earlier ${n}`,"rerr.badEntityKind":({at:e,value:t,allowed:n})=>`${e}: kind is "${t}", which is not one of: ${n}`,"rerr.badRelationKind":({at:e,value:t,allowed:n})=>`${e}: kind is "${t}", which is not one of: ${n}`,"rerr.badSourceType":({at:e,value:t,allowed:n})=>`${e}: \`type\` "${t}" is not one of ${n}`,"rerr.mustBeString":({at:e,field:t})=>`${e}: \`${t}\` must be a non-empty string`,"rerr.mustBeBoolean":({at:e,field:t})=>`${e}: \`${t}\` must be true or false`,"rerr.badRef":({at:e,field:t,kind:n,id:r})=>`${e}: \`${t}\` refers to a non-existent ${n} "${r}"`,"rerr.badEnd":({at:e,end:t,id:n})=>`${e}: \`${t}\` refers to a non-existent entity "${n}"`,"rerr.selfRelation":({at:e,id:t})=>`${e}: an entity cannot be related to itself ("${t}" on both ends)`,"rerr.duplicateRelation":({at:e,from:t,to:n,kind:r})=>`${e}: duplicate relation ${t} -> ${n} (${r}, same label); give the second one its own label, or drop it`,"rerr.fieldNotHere":({at:e,field:t,kinds:n})=>`${e}: \`${t}\` only belongs on a relation of kind ${n}`,"rerr.badShare":({at:e,value:t})=>`${e}: \`share\` must be a number from 0 to 100, got ${t}`,"rerr.badSecures":({at:e,id:t})=>`${e}: \`secures\` refers to a non-existent relation "${t}"`,"rerr.securesNotClaim":({at:e,id:t,kind:n,claims:r})=>`${e}: \`secures\` points at relation "${t}", which is a ${n}; a guarantee secures a claim (${r})`,"rerr.badAsOf":({value:e})=>`asOf: "${e}" is not an ISO date (YYYY, YYYY-MM or YYYY-MM-DD)`,"rhint.shareOver100":({id:e,label:t,total:n})=>`entities (${e}): the shares held in "${t}" add up to ${n}%, more than the whole; check the figures or the source`,"rhint.isolated":({id:e,label:t})=>`entities (${e}): "${t}" has no relation to anyone, so it will float beside the diagram; relate it or drop it`,"rhint.noSecures":({id:e})=>`relations (${e}): a guarantee that does not say which claim it secures; add \`secures\` with that relation's id`,"rhint.tooLarge":({n:e,limit:t})=>`${e} entities: past about ${t} the diagram gets hard to read on one screen; consider splitting it by group`,"rhint.tooManyRelations":({n:e,limit:t})=>`${e} relations: past about ${t} the graph can take several seconds to draw (each change of orientation or groups draws it again); consider splitting it by group, or use another way of drawing`,"rhint.equityCycle":({path:e})=>`shareholdings loop back (${e}); allowed, but check it is what the registry says`,"rel.kind.equity":`Equity`,"rel.kind.control":`Control`,"rel.kind.contract":`Contracts`,"rel.kind.debt":`Debts`,"rel.kind.guarantee":`Guarantees`,"rel.kind.kinship":`Family`,"rel.kind.employment":`Employment`,"rel.kind.agency":`Agency`,"rel.kind.other":`Other`,"rel.kindChipTitle":({n:e})=>e===1?`Show or hide this kind (1 relation)`:`Show or hide this kind (${e} relations)`,"rel.labels":`Labels`,"rel.groups":`Groups`,"rel.previewHint":`Click a party to read the full text`,"rel.auto.equity":({share:e})=>e===void 0?`Holds shares`:`Holds ${e}%`,"rel.auto.control":`Controls`,"rel.auto.contract":({amount:e})=>e?`Contract, ${e}`:`Contract`,"rel.auto.debt":({amount:e})=>e?`Claim, ${e}`:`Claim`,"rel.auto.guarantee":`Guarantee`,"rel.auto.kinship":`Family`,"rel.auto.employment":`Employment`,"rel.auto.agency":`Agency`,"rel.auto.other":`Related`,"info.entities":({n:e})=>`${e} part${e===1?`y`:`ies`}`,"info.relations":({n:e})=>`${e} relation${e===1?``:`s`}`,"info.links":({n:e})=>`${e} link${e===1?``:`s`}`,"jerr.nodesEmpty":"`nodes` must not be empty (a justification needs at least a conclusion and what supports it)","jerr.linksEmpty":"`links` must not be empty (the nodes have to support one another)","jerr.notArray":({field:e})=>`\`${e}\` must be an array`,"jerr.notObject":({at:e})=>`${e}: must be an object`,"jerr.required":({at:e,field:t})=>`${e}: missing required field \`${t}\``,"jerr.duplicateId":({at:e,id:t,what:n})=>`${e}: id "${t}" duplicates an earlier ${n}`,"jerr.mustBeString":({at:e,field:t})=>`${e}: \`${t}\` must be a non-empty string`,"jerr.badNodeKind":({at:e,value:t,allowed:n})=>`${e}: kind is "${t}", which is not one of: ${n}`,"jerr.badRef":({at:e,field:t,kind:n,id:r})=>`${e}: \`${t}\` refers to a non-existent ${n} "${r}"`,"jerr.badHolds":({at:e,value:t})=>`${e}: \`holds\` must be "yes" or "no", got "${t}"`,"jerr.holdsNotHere":({at:e,kind:t,kinds:n})=>`${e}: a ${t} does not hold or fail; \`holds\` only belongs on ${n}`,"jerr.badCombine":({at:e,value:t,allowed:n})=>`${e}: \`combine\` is "${t}", which is not one of: ${n}`,"jerr.combineNotHere":({at:e,kind:t,kinds:n})=>`${e}: a ${t} is not supported by other nodes; \`combine\` only belongs on ${n}`,"jerr.dateNotHere":({at:e,kind:t})=>`${e}: \`date\` only belongs on a fact, not on a ${t}`,"jerr.badDate":({at:e,value:t})=>`${e}: \`date\` "${t}" is not an ISO date (YYYY-MM-DD or YYYY-MM-DDTHH:MM)`,"jerr.badEnd":({at:e,end:t,id:n})=>`${e}: \`${t}\` refers to a non-existent node "${n}"`,"jerr.selfLink":({at:e,id:t})=>`${e}: a node cannot support itself ("${t}" on both ends)`,"jerr.badStance":({at:e,value:t,allowed:n})=>`${e}: stance is "${t}", which is not one of: ${n}`,"jerr.basisNotNorm":({at:e,kind:t})=>`${e}: stance "basis" can only start from a norm, not from a ${t}`,"jerr.duplicateLink":({at:e,stance:t})=>`${e}: duplicate link (same from, to and stance "${t}"); drop the second one`,"jerr.cycle":({path:e})=>`links form a cycle (${e}); a reasoning must not lead back to itself`,"jerr.leafHasInput":({at:e,kind:t})=>`${e}: a ${t} is a leaf; nothing may support it (an evidence layer is not part of v0)`,"jerr.noEnd":"no end conclusion: at least one `conclusion` must have no outgoing link (the conclusion the whole reasoning leads to)","jhint.severalEnds":({n:e,ids:t})=>`${e} conclusions end the diagram (${t}); is this one reasoning, or should it be split?`,"jhint.supportsNothing":({id:e,label:t})=>`nodes (${e}): "${t}" supports nothing; link it to what it supports, or drop it`,"jhint.factNoSource":({id:e,label:t})=>`nodes (${e}): the fact "${t}" has no source; where was it found?`,"jhint.normNoSource":({id:e,label:t})=>`nodes (${e}): the norm "${t}" has no source; which provision is it?`,"jhint.unsupported":({id:e,label:t})=>`nodes (${e}): nothing supports "${t}"; add a fact, an element or a norm that does (if it stands only because what argued against it was rejected, this note can be left as it is)`,"jhint.holdsOnRejected":({id:e,label:t})=>`nodes (${e}): "${t}" holds although everything that supports it is rejected; check the \`holds\` values`,"jhint.combineAlone":({id:e,label:t,combine:n})=>`nodes (${e}): "${t}" says \`combine: "${n}"\` but fewer than two links support it; there is nothing to combine`,"jhint.allNeedsAll":({id:e,label:t,other:n})=>`nodes (${e}): "${t}" needs all it rests on, but "${n}" is rejected; check the \`holds\` values`,"jhint.anyOneHolds":({id:e,label:t,other:n})=>`nodes (${e}): "${t}" is rejected although any one it rests on would do, and "${n}" holds; check the \`holds\` values`,"jhint.tooLarge":({n:e,limit:t})=>`${e} nodes: past about ${t} the tree gets hard to read on one screen; consider one diagram per issue`,"graphKind.graph":`Relationship graph`,"graphKind.focus":`Focus view`,"graphKind.matrix":`Relation matrix`,"graphKind.equity":`Equity tree`,"rel.matrix.ungrouped":`No camp`,"rel.equity.noShare":`not stated`,"rel.equity.cross":`cross-holding`,"rel.equity.noEquity":`No equity relations in this data`,"rel.equity.noEquityHint":`This view is built around shareholdings. For this case, switch to the relationship graph.`,"rel.equity.indirect":({n:e})=>`Held through others (${e})`,"rel.equity.notComputable":`cannot be worked out: a share on the way is not stated`,"rel.equity.moreRows":({n:e})=>`${e} more not listed`,"rel.equity.above":({n:e})=>`Above it (${e})`,"rel.company.label":`Company`,"rel.company.all":`All`,"rel.equity.sep":`, `,"rel.equity.colon":`: `,"graphKind.authority":`Control and employment`,"rel.authority.cycle":`cycle`,"rel.authority.none":`No control, employment or agency relations in this data`,"rel.authority.noneHint":`This view is built around who commands whom. For this case, switch to the relationship graph.`,"rel.authority.above":({n:e})=>`Above it (${e})`,"graphKind.related":`Related parties`,"rel.related.title":({name:e})=>`Related parties of ${e} (the centre)`,"rel.related.count":({n:e,m:t})=>`${e} related part${e===1?`y`:`ies`}, ${t} relation${t===1?``:`s`}`,"rel.related.colParty":`Related party`,"rel.related.colKind":`Category`,"rel.related.colText":`Relation`,"rel.related.colSource":`Source`,"rel.related.dirNone":({a:e,b:t})=>`${e} — ${t} (no direction)`,"rel.related.none":({name:e})=>`${e} has no relation in this data`,"rel.related.noneHint":`Pick another party in the box at the bottom, or switch to the relationship graph.`,"rel.related.centre":`Centre`,"graphKind.path":`Relation path`,"rel.path.from":`From`,"rel.path.to":`To`,"rel.path.swap":`Swap the two ends`,"rel.path.noChain":({a:e,b:t})=>`No chain of relations ties ${e} and ${t}`,"rel.path.noChainHint":`Pick two parties that are connected, or switch to the relationship graph.`,"rel.path.steps":({n:e})=>`${e} step${e===1?``:`s`}`,"rel.path.chains":({n:e})=>`Chains drawn (${e})`,"rel.path.more":({n:e,atLeast:t})=>`${t?`At least `:``}${e} more chain${e===1?``:`s`} not drawn; only the shortest are.`,"graphKind.route":`Route map`,"proc.route.labels":`Conditions`,"proc.route.more":({n:e})=>`… and ${e} more`,"rel.focus.open":`Centre the focus view on this party`,"rel.focus.centre":`Centre`,"rel.focus.hint":`Click to put this party in the middle`,"rel.focus.apart":`Not connected to the centre`,"rel.focus.reset":`Default centre`,"rel.focus.resetTitle":`Put the party with the most relations back in the middle`,"graphKind.tree":`Reasoning tree`,"jus.kind.conclusion":`Conclusion`,"jus.kind.norm":`Norm`,"jus.kind.element":`Element`,"jus.kind.fact":`Fact`,"jus.kind.inference":`Inference`,"jus.kind.judgement":`Judgement`,"jus.holds.yes":`✓ upheld`,"jus.holds.no":`✗ rejected`,"jus.copy":`shown again`,"jus.copies":({n:e})=>`The same node is drawn in ${e} issues`,"jus.grounds":`Rests on`,"jus.fold":`Fold this issue up`,"jus.unfold":`Open this issue`,"jus.folded":({n:e})=>`${e} folded`,"jus.foldAll":`Fold issues`,"jus.merge":`Merge repeats`,"jus.mergeTitle":`A fact (or a norm with many elements) used several times in one issue is drawn beside each use; merge draws each once, with longer lines`,"jus.foldAllTitle":`Fold every issue up to its conclusion, or open them all again`,"jus.combine.all":`all of`,"jus.combine.any":`any of`,"jus.combine.allLong":`All of what it rests on is needed`,"jus.combine.anyLong":`Any one of what it rests on is enough`,"jus.supports":`Leads to`,"jus.stance.for":`supports`,"jus.stance.against":`opposes`,"jus.stance.basis":`basis`,"jus.previewHint":`Click a node to read the full text and see what it rests on`,"perr.domainNotInEnum":({value:e,allowed:t})=>`\`domain\` is "${e}", not in the enum (${t})`,"perr.nodesEmpty":"`nodes` must not be empty (a flow needs at least a start and an end)","perr.edgesEmpty":"`edges` must not be empty (the nodes have to be connected)","perr.notObject":({at:e})=>`${e}: must be an object`,"perr.required":({at:e,field:t})=>`${e}: missing required field \`${t}\``,"perr.duplicateNodeId":({at:e,id:t})=>`${e}: id "${t}" duplicates an earlier node`,"perr.badKind":({at:e,value:t,allowed:n})=>`${e}: \`kind\` is "${t}", not in the vocabulary (${n})`,"perr.badOutcome":({at:e,value:t,allowed:n})=>`${e}: \`outcome\` is "${t}", not in the enum (${n})`,"perr.mustBeString":({at:e,field:t})=>`${e}: \`${t}\` must be a string`,"perr.badRef":({at:e,field:t,kind:n,id:r})=>`${e}: ${t} refers to a non-existent ${n} "${r}"`,"perr.badFrom":({at:e,id:t})=>`${e}: \`from\` refers to a non-existent node "${t}"`,"perr.badTo":({at:e,id:t})=>`${e}: \`to\` refers to a non-existent node "${t}"`,"perr.selfLoop":({at:e,id:t})=>`${e}: self-loop (from and to are both "${t}")`,"perr.duplicateEdge":({at:e,from:t,to:n})=>`${e}: duplicate edge ${t} -> ${n} (same condition); branches into one target each need their own condition`,"perr.noEntry":`no node has zero incoming edges (a flow needs a start)`,"perr.unreachable":({id:e})=>`nodes (${e}): unreachable from the start (it would be dropped silently and never appear)`,"perr.orphan":({id:e,label:t})=>`nodes (${e}): "${t}" has no incoming edge and is not a start, so nothing leads to it: it would float beside the flow. If it is a consequence (a breach, a resignation, a right to terminate), write it as a rule in \`rules\`; if it belongs to the flow, add the edge that leads to it`,"note.partyNoEvent":({at:e,id:t,name:n})=>`${e} (${t}): no event names "${n}" in its actorIds, so it is on no card and has no column. Name it in the actorIds of the events it took part in, or leave it out of actors if it did nothing in this diagram`,"note.dateOrder":({at:e,id:t,date:n,beforeAt:r,beforeId:i,beforeDate:a})=>`${e} ("${t}", ${n}) comes after ${r} ("${i}", ${a}) in the slots but its date is wholly earlier. The order of the slots is kept and nothing is reordered; check which of the two dates is wrong, or whether the slots are in the wrong order`,"perr.noEnd":'no node has `kind: "end"` (a flow needs an end)',"perr.deadEnd":({id:e,label:t})=>`nodes (${e}): "${t}" is a dead end: it is neither end nor note but has no outgoing edge. If it is the consequence of a breach, delay or right to terminate, write it as a rule in \`rules\` (it may fire at any time in its stages) instead of a node that has to lead somewhere`,"perr.decisionTooFewOut":({id:e,n:t})=>`nodes (${e}): kind is "decision" but only ${t} outgoing edge(s); a decision needs at least 2`,"perr.decisionNoCondition":({id:e,index:t,to:n})=>`nodes (${e}): kind is "decision" but edge edges[${t}] -> "${n}" has no condition. If it really is a decision, give every outgoing edge a condition (e.g. "yes / no"); if it is a step, change kind to "step" (a step may have several outgoing edges, one of them the main line)`,"perr.tooManyMain":({id:e,n:t})=>`nodes (${e}): ${t} outgoing edges are marked main; a path has exactly one`,"perr.mainBroken":({id:e})=>`the main line breaks at node "${e}": the edges marked main do not reach any end. Either add the missing main edge, or repair the chain`,"norm.mainRemarked":({problem:e,from:t,to:n})=>`the main line was marked again, starting at "${t}" and ending at "${n}", keeping to the edges already marked where it could. It was: ${e}`,"norm.mainSet":({at:e})=>`${e}: marked main`,"norm.mainCleared":({at:e})=>`${e}: no longer marked main`,"perr.rulesNotArray":"`rules` must be an array","perr.duplicateRuleId":({at:e,id:t})=>`${e}: id "${t}" is already used by another rule or node`,"perr.ruleWhen":({at:e})=>`${e}: \`when\` is required: a non-empty string, or an array of them (any one of them triggers the rule)`,"perr.ruleEndNotEnd":({at:e,id:t})=>`${e}: \`endId\` points at "${t}", which is not a node of kind "end"; a rule can only lead to an end`,"phint.stageBackwards":({from:e,fromStage:t,to:n,toStage:r})=>`stage runs backwards: ${e} (${t}) -> ${n} (${r}); back edges are normal, others need a second look`,"phint.decisionOnSpine":({id:e,label:t})=>`decision "${e}" (${t}) is on the main line but no outgoing edge is marked main; the breach path may end up drawn as the main line`,"phint.longLabel":({id:e,n:t})=>`node "${e}" has a label of ${t} characters; a node shows about two lines (20 Chinese characters) and cuts the rest, the popover has it all. Shorten the label and move the detail into \`detail\``,"phint.noteNoDetail":({id:e,label:t})=>`note "${e}" (${t}) has no detail; a note is an explanation, so write it as one full sentence (in detail) that says what it explains`,"phint.multipleEntries":({n:e,ids:t})=>`${e} entries (${t}), they will all sit in the first layer; a contract flow usually has a single entry, so check whether an upstream link is missing`},je={en:Ae,zh:{"common.none":`(无)`,"common.close":`关闭`,"common.untitled":`案图`,"fallback.invalidTitle":({n:e})=>`该数据未通过校验(${e} 处问题)`,"fallback.noRendererTitle":({type:e})=>`没有为 type = "${e}" 注册渲染器`,"fallback.registered":({list:e})=>`已注册:${e}`,"fallback.noInlineData":`这份文件里没有内联数据,生成时发生错误,请重新生成这份 HTML。`,"fallback.devNoData":`开发服务器未获取到数据:请用 ?example=0 或 ?spec=examples/某份.json 指定一份。`,"error.renderTitle":`渲染出错`,"error.renderHint":`数据本身可能没问题(校验已经通过),是这个画法在渲染时抛错了。请将下列信息提供给开发者,或改用其他画法。`,"info.span":({from:e,to:t})=>`${e} 至 ${t}`,"info.slots":({n:e})=>`${e} 个时间点`,"info.actors":({n:e})=>`${e} 个主体`,"info.sources":({n:e})=>`${e} 个来源`,"info.nodes":({n:e})=>`${e} 个节点`,"info.stages":({n:e})=>`${e} 个阶段`,"info.entities":({n:e})=>`${e} 个当事方`,"info.relations":({n:e})=>`${e} 条关系`,"info.links":({n:e})=>`${e} 条连线`,"dock.actors":`主体`,"dock.summary":`摘要`,"dock.sources":`来源`,"dock.orientation":`层的走向:竖向是从上往下,横向是从左往右。`,"dock.orientationCamps":`层的走向:竖向是从上往下,横向是从左往右。画了阵营框时,阵营沿垂直于层的方向排开:竖向时左右并排,横向时上下叠放,所以整张图看起来可能和按钮相反。`,"dock.vertical":`竖向`,"dock.horizontal":`横向`,"dock.grid":`格线`,"dock.stagger":`交错`,"dock.byParty":`按主体分泳道`,"dock.staggerHint":`让不同列的卡片上下错开半行,图更短、字更大`,"dock.exportImage":`导出图片`,"dock.exporting":`正在导出…`,"dock.exportTitle":`将整张图导出为 PNG(2 倍分辨率)`,"dock.lang":`语言`,"dock.fold":`收起`,"dock.display":`显示选项`,"dock.restore":`恢复本图默认`,"dock.restoreTitle":`清除这张图记住的选择,按内置默认值重新打开;主题和语言不变。`,"export.failed":({message:e})=>`导出失败:${e}`,"dock.langEn":`EN`,"dock.langZh":`中文`,"flow.conditions":`条件`,"flow.detail":`详情`,"flow.mainLine":`主干`,"flow.states":`状态`,"flow.stages":`阶段`,"flow.rules":`条款`,"flow.linkStraight":`折线`,"flow.linkCurved":`曲线`,"flow.linkStyle":`连线样式`,"rule.tableTitle":`条款`,"rule.tableNote":`流程中可能出现的情形,不属于流程步骤`,"rule.tableNoteContract":`合同履行过程中可能出现的情形,不属于流程步骤`,"rule.colWhen":`情形`,"rule.colThen":`后果`,"rule.colScope":`适用阶段`,"rule.groupEnd":({end:e})=>`可导致「${e}」`,"rule.groupRest":`其他条款`,"rule.count":({n:e})=>`${e} 条`,"rule.anyOf":`下列任一:`,"rule.tScopeAll":`全程`,"rule.tScopeRange":({from:e,to:t})=>`${e} 至 ${t}`,"flow.ruleBadge":({n:e})=>`条款 ${e} 条`,"flow.noteTag":`注`,"rule.if":`若`,"rule.or":`,或`,"flow.previewHint":`点击节点查看全文`,"card.sources":({n:e})=>`来源 ${e} 个`,"card.sourcesUnlisted":`未列来源`,"card.sourcesList":({n:e,names:t})=>`来源 ${e} 个:${t}`,"card.duration":({duration:e})=>`持续 ${e}`,"card.approxPrefix":`约 `,"card.dateUnknown":`日期不详`,"card.unitDay":({n:e})=>`${e} 天`,"card.unitHour":({n:e})=>`${e} 小时`,"card.unitMinute":({n:e})=>`${e} 分`,"card.unitSecond":({n:e})=>`${e} 秒`,"card.ariaLabel":({label:e,date:t})=>t?`${e},${t}`:e,"card.dateNote":({note:e})=>`时间说明:${e}`,"card.previewHint":`点击卡片查看全文`,"aria.nodeDefault":`按回车或空格可选中此节点。`,"aria.nodeKeyboardDisabled":`按回车或空格可选中此节点。选中后可用方向键移动。`,"aria.nodeMoved":({x:e,y:t})=>`已移动节点。新位置:x ${e},y ${t}`,"aria.edgeDefault":`按回车或空格可选中此连线。`,"aria.controls":`画布控件`,"aria.zoomIn":`放大`,"aria.zoomOut":`缩小`,"aria.fitView":`适应视图`,"aria.interactive":`切换交互`,"aria.minimap":`缩略图`,"aria.handle":`连接点`,"sourceType.statute":`法条`,"sourceType.case":`判例`,"sourceType.contract":`合同`,"sourceType.evidence":`证据`,"sourceType.document":`文书`,"sourceType.web":`网页`,"sourceType.other":`其他`,"graphKind.timeline":`时间图`,"graphKind.flow":`流程图`,"header.theme":`主题`,"theme.document":`文书`,"theme.modern":`现代`,"theme.legal":`法律`,"theme.dark":`深色`,"header.kindOpen":({n:e})=>`查看全部 ${e} 种画法`,"header.kindPrev":`上一种画法`,"header.kindNext":`下一种画法`,"header.kindGroup":`画法`,"header.fold":`收起标题卡`,"header.unfold":`展开标题卡`,"graphKind.chronicle":`大事记`,"graphKind.scale":`比例时间轴`,"scale.segment":({n:e,unit:t,count:n})=>`第 ${e} 段 · ${t} · ${n} 个事件`,"scale.unit.year":`按年`,"scale.unit.month":`按月`,"scale.unit.day":`按日`,"scale.unit.hour":`按小时`,"scale.unit.minute":`按分钟`,"scale.other":`其他`,"scale.events":`事件`,"scale.undated":`日期不详 · 按顺序放置`,"scale.coarse.day":`当日(时刻不详)`,"scale.coarse.month":`当月(日期不详)`,"scale.coarse.year":`当年(月份不详)`,"scale.run":({n:e})=>`${e} 个事件`,"scale.runListed":({n:e})=>`时间相近的 ${e} 个事件,列示如下:`,"chronicle.gapSeconds":({n:e})=>`+${e} 秒`,"chronicle.gapMinutes":({n:e})=>`+${e} 分钟`,"chronicle.gapHours":({n:e})=>`+${e} 小时`,"chronicle.gapHoursMinutes":({h:e,m:t})=>`+${e} 小时 ${t} 分`,"chronicle.gapDays":({n:e})=>`间隔 ${e} 天`,"chronicle.gapMonths":({n:e})=>`间隔 ${e} 个月`,"chronicle.gapYears":({n:e})=>`间隔 ${e} 年`,"chronicle.gapYearsMonths":({y:e,m:t})=>`间隔 ${e} 年 ${t} 个月`,"chronicle.dateUnknown":`日期不详`,"graphKind.graph":`关系图`,"graphKind.focus":`聚焦图`,"graphKind.matrix":`关系矩阵`,"graphKind.equity":`股权图`,"rel.matrix.ungrouped":`未归阵营`,"rel.equity.noShare":`比例未写明`,"rel.equity.cross":`交叉持股`,"rel.equity.noEquity":`这份数据里没有股权关系`,"rel.equity.noEquityHint":`这个视图围绕持股关系画。这类案件请切换到关系图。`,"rel.equity.indirect":({n:e})=>`间接持有(${e})`,"rel.equity.notComputable":`算不出:途中有一处持股比例没写明`,"rel.equity.moreRows":({n:e})=>`另有 ${e} 项未列出`,"rel.equity.above":({n:e})=>`在它上面的(${e})`,"rel.company.label":`公司`,"rel.company.all":`全部`,"rel.equity.sep":`、`,"rel.equity.colon":`:`,"graphKind.authority":`控制与任职图`,"rel.authority.cycle":`循环`,"rel.authority.none":`这份数据里没有控制、任职或代理关系`,"rel.authority.noneHint":`这个视图围绕谁管着谁画。这类案件请切换到关系图。`,"rel.authority.above":({n:e})=>`在它上面的(${e})`,"graphKind.related":`关联方清单`,"rel.related.title":({name:e})=>`关联方清单:${e}(中心方)`,"rel.related.count":({n:e,m:t})=>`共 ${e} 个关联方,${t} 条关系`,"rel.related.colParty":`关联方`,"rel.related.colKind":`关系类别`,"rel.related.colText":`关系内容`,"rel.related.colSource":`来源`,"rel.related.dirNone":({a:e,b:t})=>`${e} — ${t}(无方向)`,"rel.related.none":({name:e})=>`「${e}」在这份数据里没有任何关系`,"rel.related.noneHint":`在底部的框里换一方,或切换到关系图。`,"rel.related.centre":`中心方`,"graphKind.path":`关系路径图`,"rel.path.from":`起点`,"rel.path.to":`终点`,"rel.path.swap":`起点和终点对调`,"rel.path.noChain":({a:e,b:t})=>`没有任何关系链把「${e}」和「${t}」连起来`,"rel.path.noChainHint":`请选两个有关系相连的当事人,或切换到关系图。`,"rel.path.steps":({n:e})=>`${e} 步`,"rel.path.chains":({n:e})=>`画出的关系链(${e})`,"rel.path.more":({n:e,atLeast:t})=>`另有${t?`至少 `:` `}${e} 条关系链没有画;只画最短的几条。`,"graphKind.route":`路线图`,"proc.route.labels":`条件`,"proc.route.more":({n:e})=>`……还有 ${e} 步`,"rel.focus.open":`以这一方为中心看聚焦图`,"rel.focus.centre":`中心`,"rel.focus.hint":`点击,把这一方放到中间`,"rel.focus.apart":`与中心没有关系相连`,"rel.focus.reset":`默认中心`,"rel.focus.resetTitle":`把关系最多的那一方放回中间`,"graphKind.tree":`说理树`,"jus.kind.conclusion":`结论`,"jus.kind.norm":`规范`,"jus.kind.element":`要件`,"jus.kind.fact":`事实`,"jus.kind.inference":`推断`,"jus.kind.judgement":`评价`,"jus.holds.yes":`✓ 成立`,"jus.holds.no":`✗ 否定`,"jus.copy":`重复`,"jus.copies":({n:e})=>`同一节点出现在 ${e} 个争点中`,"jus.grounds":`依据`,"jus.fold":`收起这个争点`,"jus.unfold":`展开这个争点`,"jus.folded":({n:e})=>`已收起 ${e} 个`,"jus.foldAll":`收起争点`,"jus.merge":`合并重复`,"jus.mergeTitle":`同一争点里被多处用到的事实(或支持多个要件的规范)默认在每处使用点各列一份;合并后只列一份,连线会变长、更易交叉`,"jus.foldAllTitle":`把每个争点收起到只剩它的结论,或者全部展开`,"jus.combine.all":`且`,"jus.combine.any":`或`,"jus.combine.allLong":`它依据的须全部具备`,"jus.combine.anyLong":`它依据的具备任何一个即可`,"jus.supports":`指向`,"jus.stance.for":`支持`,"jus.stance.against":`反对`,"jus.stance.basis":`规范依据`,"jus.previewHint":`点击节点查看全文及其依据`,"graphType.fact":`事实图`,"graphType.relationship":`关系图`,"graphType.procedure":`程序图`,"graphType.justification":`证成图`,"rel.kind.equity":`股权`,"rel.kind.control":`控制`,"rel.kind.contract":`合同`,"rel.kind.debt":`债权债务`,"rel.kind.guarantee":`担保`,"rel.kind.kinship":`亲属`,"rel.kind.employment":`雇佣`,"rel.kind.agency":`代理`,"rel.kind.other":`其他`,"rel.kindChipTitle":({n:e})=>`显示或隐藏这一类(${e} 条关系)`,"rel.labels":`标签`,"rel.groups":`分组`,"rel.previewHint":`点击当事方查看全文`,"rel.auto.equity":({share:e})=>e===void 0?`持有股权`:`持股 ${e}%`,"rel.auto.control":`控制`,"rel.auto.contract":({amount:e})=>e?`合同,${e}`:`合同`,"rel.auto.debt":({amount:e})=>e?`债权,${e}`:`债权`,"rel.auto.guarantee":`担保`,"rel.auto.kinship":`亲属`,"rel.auto.employment":`雇佣`,"rel.auto.agency":`代理`,"rel.auto.other":`关联`,...Object.fromEntries(Object.keys(Ae).filter(e=>e.startsWith(`err.`)||e.startsWith(`perr.`)||e.startsWith(`phint.`)||e.startsWith(`note.`)||e.startsWith(`rerr.`)||e.startsWith(`rhint.`)||e.startsWith(`jerr.`)||e.startsWith(`jhint.`)||e.startsWith(`norm.`)).map(e=>[e,Ae[e]]))}};function Me(e){return!e||typeof e!=`string`?`en`:e.toLowerCase().split(`-`)[0]===`zh`?`zh`:`en`}function Ne(e,t,n){let r=(je[Me(e)]??je.en)[t]??je.en[t];return r===void 0?t:typeof r==`function`?r(n??{}):n?String(r).replace(/\{(\w+)\}/g,(e,t)=>n[t]??`{${t}}`):r}var Pe=(e,t)=>Ne(`en`,e,t),Fe=/^(\d{4})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2}):(\d{2})(?::(\d{2}))?)?)?)?$/;function Ie(e){let t=Fe.exec(typeof e==`string`?e.trim():``);if(!t)return null;let[n,r,i,a,o,s]=t.slice(1).map(e=>e===void 0?void 0:Number(e)),c=(e,t,n,r,i,a)=>Date.UTC(e,t,n,r,i,a),l,u;return r===void 0?(l=c(n,0,1,0,0,0),u=c(n+1,0,1,0,0,0)):i===void 0?(l=c(n,r-1,1,0,0,0),u=c(n,r,1,0,0,0)):a===void 0?(l=c(n,r-1,i,0,0,0),u=c(n,r-1,i+1,0,0,0)):s===void 0?(l=c(n,r-1,i,a,o,0),u=l+6e4):(l=c(n,r-1,i,a,o,s),u=l+1e3),Number.isNaN(l)?null:{from:l,to:u}}function Le(e){let t=Ie(e?.date);if(!t)return null;let{from:n,to:r}=t,i=e.dateEnd===void 0?null:Ie(e.dateEnd);if(i&&i.to>n&&(r=Math.max(r,i.to)),e.approx===!0){let e=t.to-t.from;n-=e,r+=e}return{from:n,to:r}}function Re(e){let t=[],n=null;return(Array.isArray(e?.slots)?e.slots:[]).forEach((e,r)=>{let i=(Array.isArray(e?.events)?e.events:[]).map((e,t)=>({event:e,ei:t,span:Le(e)})).filter(e=>e.span);if(i.length===0)return;let a={from:Math.min(...i.map(e=>e.span.from)),to:Math.max(...i.map(e=>e.span.to))};if(n&&a.to<=n.span.from){let e=i.find(e=>e.span.to<=n.span.from)??i[0];t.push(Pe(`note.dateOrder`,{at:`slots[${r}].events[${e.ei}]`,id:e.event.id,date:e.event.date,beforeAt:`slots[${n.si}].events[${n.ei}]`,beforeId:n.event.id,beforeDate:n.event.date}))}let o=i.reduce((e,t)=>t.span.to>e.span.to?t:e);n={span:a,si:r,ei:o.ei,event:o.event}}),t}function ze(e){let t=Array.isArray(e?.actors)?e.actors:[],n=new Set;for(let t of Array.isArray(e?.slots)?e.slots:[])for(let e of Array.isArray(t?.events)?t.events:[])for(let t of Array.isArray(e?.actorIds)?e.actorIds:[])n.add(t);return t.map((e,t)=>({a:e,i:t})).filter(({a:e})=>e&&typeof e.id==`string`&&!n.has(e.id)).map(({a:e,i:t})=>Pe(`note.partyNoEvent`,{at:`actors[${t}]`,id:e.id,name:e.name??e.id}))}var Be=19,Ve=2,He=18,Ue=6,We=16,Ge=11.5,Ke=1,eee=.55;function qe(e){let t=e.codePointAt(0);return t>=4352&&t<=4447||t>=11904&&t<=42191||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510?Ke:eee}function Je(e){let t=0;for(let n of String(e??``))t+=qe(n);return t}var Ye=(e,t)=>Je(e)*t,tee=262/13;262/Ge;function nee(e={},t=Ve,n=0){let r=22+Be*t+Ue+We;return e.summary&&(r+=24),e.actors&&n>0&&(r+=He*n+Ue),r}function Xe(e,t,n={}){let r=n.latin??1,i=n.cjk??1;return Ze(e,t,e=>{let t=0;for(let n of e)t+=qe(n)*(qe(n)===Ke?i:r);return t})}function Ze(e,t,n){let r=t,i=n,a=String(e??``);if(!a)return 0;let o=a.match(/[^\sᄀ-ᅟ⺀-꓏가-힣豈-﫿︰-﹯＀-⦆¢-₩]+|\s|./gu)||[],s=1,c=0;for(let e of o){let t=i(e);if(/^\s$/.test(e))c>0&&(c+=t);else if(c+t<=r)c+=t;else if(t<=r)s+=+(c>0),c=t;else{c>0&&(s+=1);let e=Math.ceil(t/r);s+=e-1,c=t-(e-1)*r}}return s}var Qe={SIDE1:`side1`,AXIS:`axis`,SIDE2:`side2`},$e=3;function et(e){let t=(Array.isArray(e?.actors)?e.actors:[]).filter(e=>rt(e)&&e.id);if(new Set(t.map(e=>e.id)).size<2)return e=>e?.groupId??null;let n=new Map(t.map(e=>[e.id,e.groupId])),r=(Array.isArray(e?.groups)?e.groups[2]?.id:null)??null;return e=>{let t=Array.isArray(e?.actorIds)?e.actorIds:[];return t.length===1&&n.get(t[0])||r}}var tt=/^\d{4}(-\d{2}(-\d{2}(T\d{2}(:\d{2}(:\d{2})?)?)?)?)?$/;function nt(e,t){if(typeof e!=`string`||typeof t!=`string`)return!1;let n=Math.min(e.length,t.length);return e.slice(0,n)<t.slice(0,n)}var ree=[Qe.SIDE1,Qe.SIDE2,Qe.AXIS];function rt(e){return e&&typeof e==`object`&&!Array.isArray(e)}function it(e){let t=[],n=Array.isArray(e?.actors)?e.actors:[],r=Array.isArray(e?.groups)?e.groups:[],i=Array.isArray(e?.sources)?e.sources:[],a=e?.slots,o={errors:t,byActor:!1,sideLabels:{[Qe.SIDE1]:``,[Qe.SIDE2]:``,[Qe.AXIS]:``},columns:[],rows:[],placements:new Map,axisColumnIndex:0,actorById:new Map,groupById:new Map,groupIndexById:new Map,sourceById:new Map,eventCount:0},s=new Map;n.forEach((e,n)=>{rt(e)?e.id?(s.has(e.id)&&t.push(Pe(`err.duplicateId`,{at:`actors[${n}]`,id:e.id})),s.set(e.id,e),e.name||t.push(Pe(`err.required`,{at:`actors[${n}] (${e.id})`,field:`name`}))):t.push(Pe(`err.required`,{at:`actors[${n}]`,field:`id`})):t.push(Pe(`err.notObject`,{at:`actors[${n}]`}))}),e?.views!==void 0&&t.push(Pe(`err.viewsRemoved`));let c=new Map,l=new Map;r.length>$e&&t.push(Pe(`err.tooManyGroups`,{at:`groups`,max:$e,actual:r.length})),r.forEach((e,n)=>{rt(e)?e.id?(l.has(e.id)&&t.push(Pe(`err.duplicateId`,{at:`groups[${n}]`,id:e.id})),c.set(e.id,e),l.set(e.id,n),e.label||t.push(Pe(`err.required`,{at:`groups[${n}] (${e.id})`,field:`label`}))):t.push(Pe(`err.required`,{at:`groups[${n}]`,field:`id`})):t.push(Pe(`err.notObject`,{at:`groups[${n}]`}))});let u=s.size>=2,d=new Map;n.forEach((e,n)=>{if(!rt(e)||!e.id)return;let r=`actors[${n}] (${e.id})`,i=e.groupId!==void 0&&e.groupId!==null&&e.groupId!==``;if(!u){i&&t.push(Pe(`err.actorGroupOneParty`,{at:r}));return}if(!i){t.push(Pe(`err.actorNeedsGroup`,{at:r,n:s.size}));return}if(!l.has(e.groupId)){t.push(Pe(`err.missingRef`,{at:r,field:`groupId`,kind:`group`,id:e.groupId}));return}let a=l.get(e.groupId);a>1?t.push(Pe(`err.actorGroupNotSide`,{at:r,groupId:e.groupId})):d.set(e.id,a===0?Qe.SIDE1:Qe.SIDE2)});let f=new Map;if(i.forEach((e,n)=>{rt(e)?e.id?(f.has(e.id)&&t.push(Pe(`err.duplicateId`,{at:`sources[${n}]`,id:e.id})),f.set(e.id,e),e.type||t.push(Pe(`err.required`,{at:`sources[${n}] (${e.id})`,field:`type`})),e.name||t.push(Pe(`err.required`,{at:`sources[${n}] (${e.id})`,field:`name`}))):t.push(Pe(`err.required`,{at:`sources[${n}]`,field:`id`})):t.push(Pe(`err.notObject`,{at:`sources[${n}]`}))}),!Array.isArray(a))return t.push(Pe(`err.slotNotArray`)),{...o,actorById:s,groupById:c,groupIndexById:l,sourceById:f};a.length===0&&t.push(Pe(`err.slotsEmpty`));let p=new Set,m={[Qe.SIDE1]:new Set,[Qe.SIDE2]:new Set},h=[];a.forEach((e,n)=>{let r=`slots[${n}]`;rt(e)?Array.isArray(e.events)?(e.events.length===0&&t.push(Pe(`err.slotEventsEmpty`,{at:r})),e.events.forEach((e,i)=>{let a=`${r}.events[${i}]${e?.id?` (${e.id})`:``}`;if(!rt(e)){t.push(Pe(`err.notObject`,{at:a}));return}e.id?p.has(e.id)?t.push(Pe(`err.duplicateId`,{at:a,id:e.id})):p.add(e.id):t.push(Pe(`err.required`,{at:a,field:`id`})),e.date&&!tt.test(e.date)&&t.push(Pe(`err.badDate`,{at:a,field:`date`,value:e.date})),e.label||t.push(Pe(`err.required`,{at:a,field:`label`})),e.dateEnd!==void 0&&e.dateEnd!==null&&(typeof e.dateEnd!=`string`||!tt.test(e.dateEnd)?t.push(Pe(`err.badDate`,{at:a,field:`dateEnd`,value:e.dateEnd})):e.date?nt(e.dateEnd,e.date)&&t.push(Pe(`err.dateEndBeforeDate`,{at:a,end:e.dateEnd,start:e.date})):t.push(Pe(`err.dateEndNeedsDate`,{at:a}))),e.summary!==void 0&&e.summary!==null&&(typeof e.summary==`string`?Je(e.summary)>22.782608695652176&&t.push(Pe(`err.summaryTooLong`,{at:a,max:22,actual:Math.ceil(Je(e.summary))})):t.push(Pe(`err.mustBeString`,{at:a,field:`summary`})));let o=Array.isArray(e.actorIds)?e.actorIds:[];o.forEach(e=>{s.has(e)||t.push(Pe(`err.missingRef`,{at:a,field:`actorIds`,kind:`actor`,id:e}))});let c=e.groupId!==void 0&&e.groupId!==null&&e.groupId!==``;u&&c?t.push(Pe(`err.eventGroupWithParties`,{at:a})):c&&!l.has(e.groupId)&&t.push(Pe(`err.missingRef`,{at:a,field:`groupId`,kind:`group`,id:e.groupId})),(Array.isArray(e.sourceIds)?e.sourceIds:[]).forEach(e=>{f.has(e)||t.push(Pe(`err.missingRef`,{at:a,field:`sourceIds`,kind:`source`,id:e}))});let g=c?l.get(e.groupId):void 0,_,v=null;if(u)o.length===1&&d.has(o[0])?(_=d.get(o[0]),v=o[0]):_=Qe.AXIS;else if(o.length>=2)_=Qe.AXIS,(g===0||g===1)&&t.push(Pe(`err.multiActorNeedsAxis`,{at:a,n:o.length,groupId:e.groupId}));else if(!c)_=Qe.AXIS;else if(g===void 0)return;else _=ree[g]??Qe.AXIS;!u&&_!==Qe.AXIS&&o.length!==1?t.push(Pe(`err.groupNeedsOneActor`,{at:a,groupId:e.groupId,n:o.length})):(!u&&_!==Qe.AXIS&&o.length===1&&(v=o[0]),v&&s.has(v)&&m[_].add(v),h.push({slotIndex:n,event:e,side:_,actorId:v}))})):t.push(Pe(`err.eventsNotArray`,{at:r})):t.push(Pe(`err.slotShape`,{at:r}))});let g=n.map(e=>rt(e)?e.id:null).filter(Boolean),_=e=>g.filter(t=>m[e].has(t)),v=e=>{let t=_(e),n=u&&g.filter(t=>d.get(t)===e).length>1;return t.length||!u?t.map(t=>({key:`${e}:${t}`,side:e,actorId:t,actorName:s.get(t)?.name,named:n})):[{key:e,side:e,actorId:null}]},y=[];y.push(...v(Qe.SIDE1).reverse());let b=y.length;y.push({key:Qe.AXIS,side:Qe.AXIS}),y.push(...v(Qe.SIDE2));let x=new Map(y.map((e,t)=>[e.key,t])),S=a.map((e,t)=>({index:t,cells:new Map})),C=new Map,ee=0;return h.forEach(({slotIndex:e,event:n,side:r,actorId:i})=>{let a=r===Qe.AXIS?Qe.AXIS:`${r}:${i}`,o=x.get(a);if(o===void 0)return;ee+=1;let s=S[e];if(s.cells.has(a)){let r=s.cells.get(a);t.push(Pe(`err.oneEventPerCell`,{at:`slots[${e}]`,a:r.id,b:n.id}))}else s.cells.set(a,n);C.set(n.id,{row:e,col:o,key:a})}),{errors:t,byActor:u,sideLabels:{[Qe.SIDE1]:r[0]?.label??``,[Qe.SIDE2]:r[1]?.label??``,[Qe.AXIS]:r[2]?.label??``},columns:y,rows:S,placements:C,axisColumnIndex:b,actorById:s,groupById:c,groupIndexById:l,sourceById:f,eventCount:ee}}function at(e){return e===Qe.SIDE1?0:e===Qe.SIDE2?1:2}function ot(e){let t=1;for(let n of e.rows)n.cells.forEach(e=>{let n=Je(e.label||``);t=Math.max(t,Math.min(2,Math.ceil(n/tee)))});return t}function st(e,t){if(!t.actors)return 0;let n=0;for(let t of e.rows)t.cells.forEach(t=>{let r=(Array.isArray(t.actorIds)?t.actorIds:[]).map(t=>e.actorById.get(t)?.name||t);if(r.length===0)return;let i=r.reduce((e,t)=>e+Ye(t,10)+14,0)+4*(r.length-1);n=Math.max(n,Math.ceil(i/262))});return n}function ct(e,t){let n=new Set;return e.cells.forEach((e,r)=>{let i=t.columns.findIndex(e=>e.key===r);i>=0&&n.add(i)}),n}var iee=.5;function aee(e,t){if(!t)return e.rows.map((e,t)=>t);let n=e.rows.map(t=>ct(t,e)),r=[];return n.forEach((e,t)=>{let i=t===0?0:r[t-1]+iee;for(let a=0;a<t;a++)[...e].some(e=>n[a].has(e))&&(i=Math.max(i,r[a]+1));r.push(i)}),r}function oee(e,t,n,r=!1){let i=e.columns.length,a=e.rows.length,o=ot(e),s=st(e,t),c=nee(t,o,s),l=c+28,u=n?316:l,d=n?l:316,f=new Set;e.rows.forEach(e=>e.cells.forEach((e,t)=>f.add(t)));let p=[],m=0;e.columns.forEach(e=>{let t=f.has(e.key)?d:n?52:104;p.push({start:m,size:t}),m+=t});let h=n?150:0,g=n?0:96,_=n?u:d,v=n?d:u,y=r&&!n,b=aee(e,y),x=a===0?0:(b[a-1]+1)*u,S=(e,t)=>n?{x:h+b[e]*u,y:p[t].start}:{x:p[t].start,y:g+b[e]*u},C=p[e.axisColumnIndex]??{start:0,size:d};return{isH:n,colCount:i,rowCount:a,labelLines:o,actorLines:s,cardH:c,cellH:l,slotExtent:u,laneExtent:d,lanes:p,originX:h,originY:g,cellBoxW:_,cellBoxH:v,cellAt:S,rowTops:b,timeSpan:x,staggered:y,axisCenter:C.start+C.size/2,contentW:n?h+x+6:m,contentH:n?m:g+x+6}}var lt={draggable:!1,selectable:!1,connectable:!1,focusable:!1};function see(e,t,n){let r=(Array.isArray(e.actorIds)?e.actorIds:[]).map(e=>t.actorById.get(e)?.name||e),i=(Array.isArray(e.sourceIds)?e.sourceIds:[]).map(e=>t.sourceById.get(e)).filter(Boolean);return{event:e,actorNames:r,sources:i,sourceCount:i.length,row:n}}function cee(e){return{id:`__cells__`,type:`cells`,position:{x:0,y:0},width:1,height:1,style:{pointerEvents:`none`},data:{cols:e.colCount,rows:e.rowCount,cellW:e.cellBoxW,cellH:e.cellBoxH,lanes:e.lanes,originX:e.originX,originY:e.originY,isH:e.isH},...lt}}function lee(e,t){let n=t=>e.columns.filter(e=>e.side===t).length,r=t=>e.columns.findIndex(e=>e.side===t),i=[];return e.columns.forEach((a,o)=>{let s=n(a.side),c=a.side!==Qe.AXIS&&(s>1||a.named),l=o===r(a.side),u={type:`colHeader`,...lt},d={isH:t.isH,side:a.side,groupIndex:at(a.side)};if(!c){i.push({...u,id:`__head__${a.key}`,position:t.isH?{x:0,y:t.lanes[o].start}:{x:t.lanes[o].start,y:0},data:{...d,width:t.isH?150:t.lanes[o].size,height:t.isH?t.lanes[o].size:null,sideTitle:e.sideLabels[a.side],colTitle:null}});return}if(t.isH){i.push({...u,id:`__head__${a.key}`,position:{x:0,y:t.lanes[o].start},data:{...d,width:150,height:t.lanes[o].size,sideTitle:l?e.sideLabels[a.side]:null,colTitle:a.actorName}});return}if(!l)return;let f=e.columns.slice(o,o+s);i.push({...u,id:`__head__${a.key}`,position:{x:t.lanes[o].start,y:0},data:{...d,width:t.lanes.slice(o,o+s).reduce((e,t)=>e+t.size,0),height:null,sideTitle:e.sideLabels[a.side],colTitle:null,actors:f.map(e=>e.actorName),laneWs:t.lanes.slice(o,o+s).map(e=>e.size)}})}),i}function uee(e,t){let n=e.rows.map(e=>t.rowTops[e.index]*t.slotExtent+t.slotExtent/2-5);return{id:`__axis__`,type:`axis`,position:t.isH?{x:t.originX,y:t.axisCenter-1}:{x:t.axisCenter-1,y:t.originY},data:{isH:t.isH,length:t.timeSpan,dotSize:10,dotOffsets:n},...lt}}function dee(e,t){return{id:`__links__`,type:`links`,position:{x:0,y:0},width:1,height:1,style:{pointerEvents:`none`},data:{segments:e,isH:t},...lt}}function fee(e,t,n,r,i,a){let o=i.cellAt(n,t),s=o.x+(i.cellBoxW-288)/2,c=o.y+(i.cellBoxH-i.cardH)/2,l=null;if(i.isH){let e=s+144;if(t<r.axisColumnIndex){let t=c+i.cardH;l={left:e,top:t,height:i.axisCenter-t}}else t>r.axisColumnIndex&&(l={left:e,top:i.axisCenter,height:c-i.axisCenter})}else{let e=c+i.cardH/2;if(t<r.axisColumnIndex){let t=s+288;l={left:t,top:e,width:i.axisCenter-t}}else t>r.axisColumnIndex&&(l={left:i.axisCenter,top:e,width:s-i.axisCenter})}return{node:{id:e.id,type:`card`,position:{x:s,y:c},data:{...see(e,r,n),groupIndex:at(r.columns[t].side),cardW:288,cardH:i.cardH,labelLines:i.labelLines,fields:a,isH:i.isH}},link:l}}function pee(e,t={},n,r=`vertical`,{stagger:i=!1}={}){let a=r===`horizontal`,o=it(e),s=oee(o,t,a,i),c=[cee(s),...lee(o,s)],l=[],u=[];return o.rows.forEach(e=>{e.cells.forEach((n,r)=>{let i=o.columns.findIndex(e=>e.key===r);if(i<0)return;let{node:a,link:c}=fee(n,i,e.index,o,s,t);l.push(a),c&&u.push(c)})}),u.length&&c.push(dee(u,a)),c.push(uee(o,s)),c.push(...l),{errors:o.errors,sideLabels:o.sideLabels,nodes:c,edges:[],grid:o,layout:`grid`,staggered:s.staggered,size:{width:s.contentW,height:s.contentH}}}function ut(e,t,n){let[r,i]=String(e).split(`T`),a=t?Ne(n,`card.approxPrefix`):``;if(!i)return a+r;let o=i.split(`:`);return`${a}${r} ${o.slice(0,2).join(`:`)}${o[2]?`:`+o[2]:``}`}function dt(e,t,n){let r=ut(t,!1,n);return String(e).split(`T`)[0]===String(t).split(`T`)[0]&&String(t).includes(`T`)?r.split(` `).pop():r}function mee(e,t){if(!e.date)return Ne(t,`card.dateUnknown`);let n=ut(e.date,e.approx,t);return e.dateEnd?`${n} - ${dt(e.date,e.dateEnd,t)}`:n}function ft(e,t,n=!1){if(!e.date)return[{text:Ne(t,`chronicle.dateUnknown`),strong:!1}];let[r,i]=String(e.date).split(`T`),a=[{text:(e.approx?Ne(t,`card.approxPrefix`):``)+r,strong:!0}],o=i?ut(e.date,!1,t).split(` `).pop():``;n&&o&&a.shift();let s=!a.length;if(!e.dateEnd)return o&&a.push({text:o,strong:s}),a;let c=dt(e.date,e.dateEnd,t);return o&&!c.includes(`-`)?a.push({text:`${o} – ${c}`,strong:s}):(o&&a.push({text:o,strong:s}),a.push({text:`– ${c}`,strong:!1})),a}var hee=12.5,gee=4,_ee=6,vee=10,yee=90,bee={latin:1.2,cjk:1.06},pt={latin:1.12,cjk:1.06},mt={sameSlot:10,none:22,short:38,long:70},ht=864e5,gt=/^(\d{4})(?:-(\d{2})(?:-(\d{2})(?:T(\d{2})(?::(\d{2})(?::(\d{2}))?)?)?)?)?$/;function _t(e){let t=typeof e==`string`?gt.exec(e):null;if(!t)return null;let[,n,r,i,a,o,s]=t,c=a==null?i==null?r==null?`year`:`month`:`day`:`time`;return{y:+n,mo:r?+r:1,d:i?+i:1,h:a?+a:0,mi:o?+o:0,s:s?+s:0,prec:c}}var vt={year:0,month:1,day:2,time:3},yt=e=>Date.UTC(e.y,e.mo-1,e.d,e.h,e.mi,e.s);function xee(e,t,n=!1){let r=_t(e),i=_t(t);if(!r||!i)return null;let a=vt[r.prec]<=vt[i.prec]?r.prec:i.prec,o=(e,t,r)=>({key:e,vars:t,long:r,approx:!!n});if(a===`year`||a===`month`){let e=a===`year`?(i.y-r.y)*12:(i.y-r.y)*12+(i.mo-r.mo);return e<=0?null:xt(e,o)}if(a===`time`){let e=yt(i)-yt(r);if(e<=0)return null;if(e<ht){let t=Math.round(e/1e3);if(t<60)return o(`chronicle.gapSeconds`,{n:t},!1);if(t<3600)return o(`chronicle.gapMinutes`,{n:Math.round(t/60)},!1);let n=Math.floor(t/3600),r=Math.round((t-n*3600)/60);return r===60&&(n+=1,r=0),r?o(`chronicle.gapHoursMinutes`,{h:n,m:r},!1):o(`chronicle.gapHours`,{n},!1)}return bt(Math.floor(e/ht),o)}let s=Math.round((Date.UTC(i.y,i.mo-1,i.d)-Date.UTC(r.y,r.mo-1,r.d))/ht);return s<=0?null:bt(s,o)}function See(e){let t=(e,t,n)=>({key:e,vars:t,long:n,approx:!1});if(!(e>0))return null;if(e<ht){let n=Math.round(e/1e3);return n<60?t(`chronicle.gapSeconds`,{n},!1):n<3600?t(`chronicle.gapMinutes`,{n:Math.round(n/60)},!1):t(`chronicle.gapHours`,{n:Math.round(n/3600)},!1)}return bt(Math.round(e/ht),t)}function bt(e,t){return e<30?t(`chronicle.gapDays`,{n:e},!1):xt(Math.max(1,Math.round(e/30.44)),t)}function xt(e,t){let n=Math.floor(e/12),r=e%12;return n?r?t(`chronicle.gapYearsMonths`,{y:n,m:r},!0):t(`chronicle.gapYears`,{n},!0):t(`chronicle.gapMonths`,{n:r},!0)}var St=(e,t)=>e==null?t:t==null||e>t?e:t;function Cee(e){let t=Array.isArray(e?.slots)?e.slots:[],n=[],r=null,i=!1,a=!1;return t.forEach((e,t)=>{let o=(Array.isArray(e?.events)?e.events:[]).filter(e=>e&&typeof e==`object`);if(!o.length)return;let s=o.every(e=>typeof e.date==`string`&&e.date),c=s?[...o].sort((e,t)=>e.date<t.date?-1:+(e.date>t.date)):o,l=c.find(e=>e.date)?.date??null,u=c.some(e=>e.date&&e.approx);c.forEach((e,o)=>{let c=o===0,d=null,f=`sameSlot`;c&&(n.length?(d=a&&s?xee(r,l,i||u):null,f=d?d.long?`long`:`short`:`none`):f=`top`);let p=typeof e.date==`string`&&e.date.length>=10?e.date.slice(0,10):null,m=n.at(-1)?.event,h=!!(p&&m&&typeof m.date==`string`&&m.date.slice(0,10)===p&&!e.approx);n.push({event:e,slotIndex:t,first:c,gap:d,spacing:f,sameDay:h})}),a=s,r=null;for(let e of c)r=St(r,St(e.date,e.dateEnd));i=c.some(e=>e.approx)}),n}var Ct=[`circle`,`square`,`diamond`];function wt(e,t){let n=(Array.isArray(e?.groups)?e.groups:[]).findIndex(n=>n?.id===et(e)(t));return n<0?`none`:Ct[Math.min(n,2)]}function Tt(e,t){let n=(Array.isArray(e?.groups)?e.groups:[]).findIndex(n=>n?.id===et(e)(t));return n>=0&&n<3?n:2}function Et(e,t,n,r){let i=[];if(n.actors)for(let t of Array.isArray(e.actorIds)?e.actorIds:[])i.push(Ye(r.get(t)?.name||t,10)+14);if(n.sources&&i.push(yee),!i.length)return 0;let a=1,o=0;for(let e of i){let t=o?vee+e:e;o&&o+t>532?(a+=1,o=e):o+=t}return a}function Dt({titleLines:e,summaryLines:t,tagLines:n,whenLineCount:r=3}){let i=20+20*Math.max(1,e);return t&&(i+=gee+18*t),n&&(i+=_ee+20*n),Math.max(i,10+18*r)}function Ot(e,t,n){let r=(e,t,r,i)=>n?Ze(e,531,e=>n(e,t)):Xe(e,532/r,i);return{title:Math.max(1,r(e.label||``,`title`,14,bee)),summary:t.summary&&e.summary?r(e.summary,`summary`,hee,pt):0}}function kt(e,t={},{measure:n}={}){let r=new Map((e?.actors||[]).filter(Boolean).map(e=>[e.id,e])),i=new Map((e?.sources||[]).filter(Boolean).map(e=>[e.id,e])),a=(Array.isArray(e?.groups)?e.groups.slice(0,3):[]).map((e,t)=>({label:e?.label,groupIndex:t,shape:Ct[t]})).filter(e=>e.label),o=Cee(e),s=[],c=[],l=[],u=[],d=a.length?34:0,f=null;o.forEach((a,o)=>{let{event:p}=a;if(f!=null){let e=mt[a.spacing]??mt.none;a.gap&&(l.push({y:f+e/2,gap:a.gap}),a.gap.long&&u.push({y0:f,y1:f+e})),d=f+e}let{title:m,summary:h}=Ot(p,t,typeof n==`function`?n:null),g=Et(p,e,t,r),_=Dt({titleLines:m,summaryLines:h,tagLines:g,whenLineCount:ft(p,`en`,a.sameDay).length}),v=Tt(e,p),y=(Array.isArray(p.actorIds)?p.actorIds:[]).map(e=>r.get(e)?.name||e),b=(Array.isArray(p.sourceIds)?p.sourceIds:[]).map(e=>i.get(e)).filter(Boolean);s.push({id:p.id,type:`entry`,position:{x:0,y:d},width:758,height:_,draggable:!1,connectable:!1,data:{event:p,index:o,groupIndex:v,shape:wt(e,p),actorNames:y,sources:b,fields:t,lines:{title:m,summary:h,tags:g},sameDay:a.sameDay,cardH:_}}),c.push({y:d+20,groupIndex:v,shape:wt(e,p),hollow:!p.date}),f=d+_});let p=f??0,m=[];return o.length&&m.push({id:`__spine__`,type:`spine`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:{x:174,top:c[0].y,bottom:c[c.length-1].y,dots:c,pills:l,breaks:u,dotSize:13}}),a.length&&m.push({id:`__legend__`,type:`legend`,position:{x:198,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,data:{groups:a}}),m.push(...s),{errors:[],nodes:m,edges:[],items:o,eventCount:o.length,layout:`chronicle`,size:{width:758,height:p}}}var At=12,wee=40,jt=12.5,Tee={latin:1.2,cjk:1.06},Mt=(e,t=1)=>16+17*e+2+15*t,Eee=e=>e?.dateEnd&&Ye(mee(e,`en`),11)*1.05>176?2:1,Nt=Mt(2,2)+10,Dee=10,Pt=22,Ft=12,It=e=>Ft+Math.max(1,e)*Nt+Pt,Lt=14,Rt=864e5,zt=36e5;function Bt(e){let t=_t(e?.date);if(!t)return null;let n=e=>Date.UTC(e.y,e.mo-1,e.d,e.h,e.mi,e.s),r=e=>e.prec===`year`?Date.UTC(e.y+1,0,1):e.prec===`month`?Date.UTC(e.y,e.mo,1):e.prec===`day`?Date.UTC(e.y,e.mo-1,e.d+1):n(e),i=n(t),a=_t(e?.dateEnd);return a&&r(a)>i?{from:i,to:r(a),kind:`bar`,exact:!0}:t.prec===`time`?{from:i,to:i,kind:`dot`,exact:!0}:{from:i,to:r(t),kind:`band`,exact:!1,prec:t.prec}}var Vt=e=>{let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2?t[n]:(t[n-1]+t[n])/2};function Ht(e){let t=e.slice(1).map((t,n)=>t-e[n]),n=[],r=(e,n)=>{let r=[];for(let i=e+n;i>=0&&i<t.length&&r.length<3&&!(t[i]>=t[e]);i+=n)r.push(t[i]);return r};return t.forEach((e,t)=>{if(e<1728e5)return;let i=r(t,1);i.length||(i=r(t,-1)),i.length&&e/Math.max(Vt(i),6e4)>=20&&n.push({i:t,g:e})}),n.sort((e,t)=>t.g-e.g).slice(0,2).map(e=>e.i).sort((e,t)=>e-t)}function Ut(e){return e>730*Rt?`year`:e>60*Rt?`month`:e>2*Rt?`day`:e>3*zt?`hour`:`minute`}function Wt(e,t,n,r){let i=new Date(e),a=[],o={year:[1,2,5,10],month:[1,2,3,6],day:[1,2,7,14],hour:[1,2,3,6,12],minute:[1,2,5,10,15,30]}[n];for(let s of o){a.length=0;let o;o=n===`year`?Date.UTC(i.getUTCFullYear(),0,1):n===`month`?Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),1):n===`day`?Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()):n===`hour`?Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours()):Date.UTC(i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes());let c=0;for(;o<=t&&c++<2e3;){o>=e&&a.push(o);let t=new Date(o);n===`year`?o=Date.UTC(t.getUTCFullYear()+s,0,1):n===`month`?o=Date.UTC(t.getUTCFullYear(),t.getUTCMonth()+s,1):o+=n===`day`?s*Rt:n===`hour`?s*zt:s*6e4}if(a.length<=r)break}return[...a]}function Oee(e,t,n){let r=new Date(e),i=e=>String(e).padStart(2,`0`),a=`${i(r.getUTCMonth()+1)}-${i(r.getUTCDate())}`;if(t===`year`)return String(r.getUTCFullYear());if(t===`month`)return`${r.getUTCFullYear()}-${i(r.getUTCMonth()+1)}`;if(t===`day`)return a;let o=`${i(r.getUTCHours())}:${i(r.getUTCMinutes())}`;return n==null||new Date(n).getUTCDate()!==r.getUTCDate()?`${a} ${o}`:o}function Gt(e,t){let n=new Map,r=(Array.isArray(e?.actors)?e.actors:[]).filter(e=>e?.id);if(!t||r.length<2)return n;for(let t of Array.isArray(e?.groups)?e.groups.slice(0,2):[]){let e=r.filter(e=>t?.id&&e.groupId===t.id);e.length>=2&&n.set(t.id,e)}return n}function Kt(e,{byParty:t=!1}={}){let n=et(e),r=Gt(e,t);return e=>{let t=n(e),i=Array.isArray(e?.actorIds)?e.actorIds:[];return i.length===1&&r.get(t)?.some(e=>e.id===i[0])?`actor:${i[0]}`:t}}function qt(e,t,{byParty:n=!1}={}){let r=Kt(e,{byParty:n}),i=Gt(e,n),a=(Array.isArray(e?.groups)?e.groups.slice(0,3):[]).filter(e=>e&&e.id),o=new Set(t.map(r)),s=a.flatMap((e,t)=>{let n=i.get(e.id)?.filter(e=>o.has(`actor:${e.id}`));return n?.length?n.map(n=>({key:`actor:${n.id}`,label:n.name??``,side:e.label??``,groupIndex:t})):[{key:e.id,label:e.label??``,groupIndex:t}]}),c=new Set(s.map(e=>e.key));return t.some(e=>!c.has(r(e)))&&s.push({key:`__other__`,label:null,groupIndex:2,other:!0}),s}function kee(e,{levels:t=3,width:n=196,gap:r=Dee}={}){let i=e.map(e=>({ids:[e.id],x:e.x,from:e.x,to:e.x}));for(;;){let e=Jt(i,t,n,r);if(e)return e;let a=-1,o=1/0;for(let e=0;e+1<i.length;e++){let t=i[e+1].x-i[e].x;t<o&&(o=t,a=e)}if(a<0)return Jt(i,t,n,r)??[];let s=i[a],c=i[a+1],l=[...s.ids,...c.ids],u=Math.min(s.from,c.from),d=Math.max(s.to,c.to);i.splice(a,2,{ids:l,x:(u+d)/2,from:u,to:d}),i=i.sort((e,t)=>e.x-t.x)}}function Jt(e,t,n,r){let i=Array(t).fill(-1/0),a=[];for(let t of e){let e=t.x-n/2,o=i.findIndex(t=>t+r<=e);if(o<0)return null;i[o]=t.x+n/2,a.push({...t,level:o})}return a}function Aee(e,t={},{measure:n,byParty:r=!1}={}){let i=new Map((e?.actors||[]).filter(Boolean).map(e=>[e.id,e])),a=new Map((e?.sources||[]).filter(Boolean).map(e=>[e.id,e])),o=[];(Array.isArray(e?.slots)?e.slots:[]).forEach((e,t)=>{for(let n of Array.isArray(e?.events)?e.events:[])n&&typeof n==`object`&&o.push({event:n,slotIndex:t})}),o.forEach(e=>e.time=Bt(e.event)),o.forEach(e=>{e.time?.exact&&(e.time.t=e.time.from)});let s=e=>({before:o.slice(0,e).reverse().find(e=>e.time?.exact),after:o.slice(e+1).find(e=>e.time?.exact)}),c=o.filter(e=>e.time?.exact).map(e=>e.time.t),l=c.length>1?Math.max(6e4,(Math.max(...c)-Math.min(...c))/20):zt,u=(e,t,n)=>{let{before:r,after:i}=s(e),a;return a=r&&i?(r.time.t+i.time.t)/2:r?r.time.t+l:i?i.time.t-l:t==null?e*zt:(t+n)/2,t==null?a:Math.min(Math.max(a,t),n-1)};o.forEach((e,t)=>{e.time&&!e.time.exact&&(e.time.t=u(t,e.time.from,e.time.to))}),o.forEach((e,t)=>{if(e.time)return;let n=o.slice(0,t).reverse().find(e=>e.time),r=o.slice(t+1).find(e=>e.time),i=n&&r?(n.time.t+r.time.t)/2:n?n.time.t+l:r?r.time.t-l:t*zt;e.time={t:i,from:i,to:i,kind:`dot`,undated:!0}});let d=[...new Set(o.map(e=>e.time.t))].sort((e,t)=>e-t),f=[...new Set(o.filter(e=>!e.time.undated).map(e=>e.time.t))].sort((e,t)=>e-t),p=f.length?f:d,m=Ht(p),h=[],g=0;for(let e of m)h.push([p[g],p[e]]),g=e+1;h.push([p[g],p[p.length-1]]),h[0][0]=Math.min(h[0][0],d[0]),h[h.length-1][1]=Math.max(h[h.length-1][1],d[d.length-1]);let _=e=>{let t=h.findIndex(([,t])=>e<=t);return t<0?h.length-1:t},v=h.map(([e,t],n)=>({index:n,from:e,to:t,count:o.filter(e=>_(e.time.t)===n).length,unit:t>e?Ut(t-e):`day`})),y=e=>Ye(e,At)*1.06,b=qt(e,o.map(e=>e.event),{byParty:r}).flatMap(e=>[e.label||``,e.side||``]),x=Math.round(Math.min(196,Math.max(132,...b.map(e=>y(e)+wee)))),S=x;v.forEach((e,t)=>{if(t>0){let n=e.from-v[t-1].to;e.breakBefore={x:S,w:64,gap:See(n)},S+=64}e.x0=S,e.w=Math.max(170,e.count*116),e.x1=S+e.w,S=e.x1});let C=S,ee=e=>{let t=v[_(e)],n=t.w-196;return t.to===t.from?t.x0+t.w/2:t.x0+98+(Math.min(Math.max(e,t.from),t.to)-t.from)/(t.to-t.from)*n},w=(e,t)=>Math.min(Math.max(e,v[t].from),v[t].to),te=qt(e,o.map(e=>e.event),{byParty:r}),ne=Kt(e,{byParty:r}),re=e=>{let t=te.findIndex(t=>t.key===ne(e));return t>=0?t:te.length-1},ie=[],ae=[],oe=e=>ie[e],se=e=>ie[e]+ae[e],ce=o.map((e,t)=>{let n=_(e.time.t),r=e.time.kind,i=ee(r===`dot`?e.time.t:w(e.time.from,n)),a=r===`dot`?i:ee(w(e.time.to,n)),o=r===`bar`?i:ee(e.time.t),s=v[n],c=r===`band`&&s.to>s.from&&e.time.to-e.time.from>s.to-s.from,l=r===`band`&&(c||a-i<8)?`dot`:r;return l===`dot`?i=a=o:a-i<6&&(a=i+6),{id:e.event.id,order:t,lane:re(e.event),kind:l,x:o,x0:i,x1:a,undated:!!e.time.undated,coarse:c,prec:e.time.prec,event:e.event}}),le=new Map;for(let e of ce){let t=`${e.lane}:${Math.round(e.x)}`;e.stack=le.get(t)??0,le.set(t,e.stack+1)}let ue=e=>Math.min(2,Math.max(1,n?Ze(e,173,e=>n(e,`title`)):Xe(e,176/jt,Tee))),de=[],fe=[],pe=te.map((e,t)=>{let n=ce.filter(e=>e.lane===t).sort((e,t)=>e.x-t.x||e.order-t.order),r=e=>Math.min(Math.max(e,x+4+98),C-98);return kee(n.map(e=>({id:e.id,x:r(e.x)})))}),me=0;pe.forEach((e,t)=>{ie[t]=me,ae[t]=e.length?It(Math.max(0,...e.map(e=>e.level))+1):34,me+=ae[t]}),pe.forEach((e,t)=>{let n=e=>{let t=e.ids.map(e=>ce.find(t=>t.id===e).x);return(Math.min(...t)+Math.max(...t))/2};for(let r of e){let e=r.x-98,i=r.ids.map(e=>ce.find(t=>t.id===e)).sort((e,t)=>e.order-t.order),a=i.length>1,o=a?1:ue(i[0].event.label||``),s=a?1:i[0].undated?Ye(Ne(`en`,`scale.undated`),11)*1.05>176?2:1:Eee(i[0].event),c=Mt(o,s),l=se(t)-Pt-r.level*Nt,u={id:a?`__run__${fe.length+1}`:i[0].id,lane:t,level:r.level,x:e,y:l-c,w:196,h:c,titleLines:o,timeLines:s,anchor:n(r),members:i};a&&(u.run=fe.length+1,u.span=[Math.min(...i.map(e=>e.x0)),Math.max(...i.map(e=>e.x1))],fe.push(u)),de.push(u)}});let he=ie.length?ie[ie.length-1]+ae[ae.length-1]:0,ge=he+14,_e=v.flatMap(e=>{let t=Math.max(2,Math.floor(e.w/84)),n=e.to>e.from?Wt(e.from,e.to,e.unit,t):[],r=e.unit;return n.length||(n=e.to>e.from?[e.from,e.to]:[e.from],r=e.to>e.from?`minute`:`day`),n.map((e,t)=>({x:ee(e),label:Oee(e,r,t?n[t-1]:null)}))}),ve=fe.reduce((e,t)=>e+1+t.members.length,0),ye=fe.length?Lt+ve*18:0,be=he+56+ye,xe=e=>te[re(e)].groupIndex,Se=[{id:`__scale__`,type:`scaleLayer`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:{width:C,labelW:x,lanesH:he,axisY:ge,lanes:te.map((e,t)=>({...e,top:oe(t),lineY:se(t)})),segments:v,ticks:_e,marks:ce.map(e=>({id:e.id,kind:e.kind,x:e.x,x0:e.x0,x1:e.x1,y:se(e.lane)-e.stack*12,undated:e.undated,coarse:e.coarse,prec:e.prec,approx:!!e.event.approx,groupIndex:te[e.lane].groupIndex})),leaders:de.map(e=>({x:Math.min(Math.max(e.anchor,e.x+8),e.x+e.w-8),y0:e.y+e.h,y1:se(e.lane)-6,run:!!e.run})),brackets:fe.map(e=>({x0:e.span[0],x1:e.span[1],y:se(e.lane)+9,run:e.run}))}}];for(let e of de)Se.push({id:e.id,type:e.run?`scaleRun`:`scaleCard`,position:{x:e.x,y:e.y},width:e.w,height:e.h,draggable:!1,connectable:!1,data:e.run?{run:e.run,events:e.members.map(e=>e.event),groupIndex:te[e.lane].groupIndex,cardH:e.h}:{event:e.members[0].event,undated:e.members[0].undated,groupIndex:xe(e.members[0].event),titleLines:e.titleLines,timeLines:e.timeLines,cardH:e.h,actorNames:(Array.isArray(e.members[0].event.actorIds)?e.members[0].event.actorIds:[]).map(e=>i.get(e)?.name||e),sources:(Array.isArray(e.members[0].event.sourceIds)?e.members[0].event.sourceIds:[]).map(e=>a.get(e)).filter(Boolean)}});return fe.length&&Se.push({id:`__runs__`,type:`scaleRunList`,position:{x,y:he+56+Lt},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,data:{runs:fe.map(e=>({run:e.run,events:e.members.map(e=>e.event)})),width:C-x,lh:18}}),{errors:[],nodes:Se,edges:[],layout:`scale`,eventCount:o.length,segments:v,gathered:fe.map(e=>({run:e.run,ids:e.members.map(e=>e.id)})),cards:de.map(e=>({id:e.id,lane:e.lane,level:e.level,x:e.x,y:e.y,w:e.w,h:e.h,ids:e.members.map(e=>e.id)})),undated:ce.filter(e=>e.undated).length,labelW:x,size:{width:C,height:be}}}function Yt(e,t){if(!e||!t||!e.width||!e.height)return 1;let n=t.width/(e.width*1.12),r=t.height/(e.height*1.12);return Math.min(n,r,1)}function jee(e,t){return!e||!t||!e.width?1:Math.min(t.width/(e.width*1.12),1)}var Xt={width:1600,height:900},Zt=(e,t)=>Math.round(e*Math.min(t,1)*10)/10;function Qt(e,t){let n=`Text on one screen (${e.canvas.width}×${e.canvas.height})`,r=Zt(e.font,e.open.fit),i=Zt(e.font,e.other.fit),a=e=>e.toFixed(1),o=[];e.open.fit>=1&&e.other.fit>=1?o.push(`${n}: full size (${e.font} px) either way.`):o.push(`${n}: ${a(r)} px as it opens (${e.open.name}), ${a(i)} px ${e.other.name}. Full size is ${e.font} px.`);let s=Math.max(r,i);if(s<9?o.push(`Note: the text is too small to read without zooming in (under 9 px). Consider ${t}; do not drop facts to make it fit.`):s<11&&o.push(`Note: the text is small (under 11 px); the reader can zoom in. ${t[0].toUpperCase()}${t.slice(1)} would make it easier to read.`),e.folded!==void 0&&s<11){let t=e.folded>=1?`full size (${e.font} px)`:`${a(Zt(e.font,e.folded))} px`;o.push(`With every issue folded the text is ${t}: the reader can fold issues ("Fold issues" in the bar) instead of your splitting it.`)}return o}var $t={envelope:[{name:`type`,req:`yes`,ty:`string`,note:`always "fact"`},Oe(2),{name:`title`,req:`yes`,ty:`string`,note:`diagram title, shown at the top left`}],actors:[{name:`id`,req:`yes`,ty:`string`,note:`unique within the diagram; events reference it via actorIds`},{name:`name`,req:`yes`,ty:`string`,note:`display name, e.g. "Huayuan Trading"`},{name:`role`,req:`no`,ty:`string`,note:`procedural standing, e.g. "plaintiff"`},{name:`groupId`,req:`*`,ty:`string`,note:`the side this party is on: the 1st or the 2nd group. Required with 2 or more parties; not written with one`}],groups:[{name:`id`,req:`yes`,ty:`string`,note:`parties (2 or more) or events (one party) reference it via groupId`},{name:`label`,req:`yes`,ty:`string`,note:`column heading, e.g. "Sun Hao's side" (parties) or "performance as agreed" (one party's acts)`},{name:``,req:``,ty:``,note:`at most 3: the 1st on the left (top) side, the 2nd on the right (bottom) side, the 3rd on the axis`},{name:``,req:``,ty:``,note:`2 or more parties: the groups split the parties. 0 or 1 party: they split the events by kind of act`}],sources:[{name:`id`,req:`yes`,ty:`string`,note:`events reference it via sourceIds`},{name:`type`,req:`yes`,ty:`string`,note:`contract / evidence / judgment / transcript, etc.`},{name:`name`,req:`yes`,ty:`string`,note:`material name, e.g. "corridor surveillance video"`},{name:`loc`,req:`no`,ty:`object`,note:`location, e.g. { file, page } or { file, timestamp }`},{name:`quote`,req:`no`,ty:`string`,note:`verbatim excerpt (several passages joined with ……), shown when the card is opened; a shortened or reworded version goes in detail`}],slots:[{name:`events`,req:`yes`,ty:`array`,note:`events at this time point; must not be empty`},{name:``,req:``,ty:``,note:`array order is chronological order; date is display-only and never reorders`}],events:[{name:`id`,req:`yes`,ty:`string`,note:`unique within the diagram`},{name:`date`,req:`no`,ty:`string`,note:`ISO 8601. Go to seconds when known, otherwise stop at the day. **Leave it out when the material gives no date: never make one up.** The card then says the date is unknown; the order is the order of slots, so nothing moves`},{name:`label`,req:`yes`,ty:`string`,note:`card title; about 20 characters per line, at most two lines`},{name:`dateEnd`,req:`no`,ty:`string`,note:`for a span, the end instant; needs date, and must not be earlier than it`},{name:`approx`,req:`no`,ty:`boolean`,note:`time is not exact (estimated or inferred); the diagram shows "approx."`},{name:`dateNote`,req:`no`,ty:`string`,note:`why the time is not exact, and how it was derived`},{name:`summary`,req:`no`,ty:`string`,note:`the line under the card title; about 22 characters`},{name:`detail`,req:`no`,ty:`string`,note:`full text revealed when the card is opened`},{name:`actorIds`,req:`no`,ty:`string[]`,note:`parties involved. One: that party's side and column. Two or more, or none: the centre axis`},{name:`groupId`,req:`*`,ty:`string`,note:`only when the diagram has 0 or 1 party: which side this event falls on. With 2 or more parties, leave it out`},{name:`sourceIds`,req:`no`,ty:`string[]`,note:`which materials it rests on`}]};function Mee(){let e=[`Fields of a fact spec. "yes" means required.`,``];for(let[t,n]of Object.entries($t)){e.push(`[${t}]`);for(let t of n)t.name?e.push(` ${t.name.padEnd(12)} ${t.req.padEnd(3)} ${t.ty.padEnd(15)} ${t.note}`):e.push(` · ${t.note}`);e.push(``)}return e.push(`"*": required or not depending on the number of parties, as the note says.`),e.push(`Cross-field rules (dangling references, a span running backwards, a party without a`),e.push(`side, two events in the same lane of one time slot) are not listed`),e.push(`above: call antu_validate after writing. It reports each problem with its field path.`),e.join(`
1427
1427
  `)}function Nee(e,t,{fields:n,canvas:r}){let i=t(e,n),a=Number(jee(i.size,r).toFixed(3)),o=Number(Yt(i.size,r).toFixed(3)),s=Math.max(1,Math.round(i.size.height*a/r.height*10)/10),c=i.items.filter(e=>e.gap);return{text:{font:14,canvas:r,open:{name:`fitted to width`,fit:a},other:{name:`whole column`,fit:o}},counts:{slots:Array.isArray(e.slots)?e.slots.length:0,events:i.items.length,actors:e.actors?.length??0,sources:e.sources?.length??0},size:i.size,screens:s,gaps:{short:c.filter(e=>!e.gap.long).length,long:c.filter(e=>e.gap.long).length},undated:i.items.filter(e=>!e.event.date).length}}function Pee(e){let t=[];return t.push(`Kind: chronicle (every event in one column, in slot order; orientation does not apply)`),t.push(`Data: ${e.counts.events} events / ${e.counts.slots} time slots / ${e.counts.actors} parties / ${e.counts.sources} sources`),t.push(`Content ${e.size.width}×${e.size.height}; it opens fitted to its width, about ${e.screens} screen(s) tall`),t.push(`Gaps written between time points: ${e.gaps.short} short, ${e.gaps.long} of 30 days or more (marked)`),e.undated&&t.push(`${e.undated} event(s) without a date: shown in slot order with a hollow dot, and no gap on either side`),t.push(...Qt(e.text,`splitting the case into periods, one diagram each`)),t.join(`
1428
1428
  `)}function Fee(e,t,{canvas:n}){let r=t(e,{}),i=Number(Yt(r.size,n).toFixed(3));return{text:{font:jt,canvas:n,open:{name:`fitted whole`,fit:i},other:{name:`fitted whole`,fit:i}},counts:{events:r.eventCount,actors:e.actors?.length??0,sources:e.sources?.length??0},size:r.size,segments:r.segments.map(e=>({unit:e.unit,count:e.count})),gathered:r.gathered.map(e=>e.ids.length),undated:r.undated}}function Iee(e){let t=[];return t.push(`Kind: scale (distance on the axis is real time; orientation does not apply)`),t.push(`Data: ${e.counts.events} events / ${e.counts.actors} parties / ${e.counts.sources} sources`),t.push(`Content ${e.size.width}×${e.size.height}`),t.push(e.segments.length>1?`The axis breaks into ${e.segments.length} segments: ${e.segments.map((e,t)=>`${t+1}. by ${e.unit}, ${e.count} event(s)`).join(`; `)}`:`One segment, by ${e.segments[0]?.unit??`day`}`),e.gathered.length&&t.push(`${e.gathered.length} run(s) of events too close to show one by one are gathered (${e.gathered.join(`, `)} events); they are listed in full under the diagram`),e.undated&&t.push(`${e.undated} event(s) without a date: placed between their neighbours in data order, with a hollow dot`),t.push(...Qt(e.text,`splitting the case into periods, one diagram each`)),t.join(`
1429
1429
  `)}var Lee={specVersion:2,label:`graphType.fact`,fields:$t,describe:Mee,validate:e=>it(e).errors,notes:e=>[...Re(e),...ze(e)],info:(e,t,n)=>{let r=Array.isArray(e.slots)?e.slots:[],i=r.flatMap(e=>(e?.events||[]).map(e=>e?.date)).filter(e=>typeof e==`string`&&e).sort(),a=t(`info.slots`,{n:n(r.length)});if(i.length>0){let e=i[0].slice(0,10),n=i[i.length-1].slice(0,10);a+=e===n?` · ${e}`:` · ${t(`info.span`,{from:e,to:n})}`}return[a,t(`info.actors`,{n:n(e.actors?.length||0)}),t(`info.sources`,{n:n(e.sources?.length||0)})]},report:(e,t,{orientation:n,fields:r={summary:!0},kind:i,canvas:a})=>{if(i===`chronicle`)return Nee(e,t,{fields:r,canvas:a});if(i===`scale`)return Fee(e,t,{canvas:a});let o=t(e,r,void 0,n??`vertical`),s=it(e),c={side1:0,axis:0,side2:0};s.columns.forEach(e=>{c[e.side]+=1});let l={events:o.eventCount??s.eventCount??0,columns:c,blocked:o.errors.length>0?o.errors[0]:null},u={};for(let n of[`vertical`,`horizontal`]){let i=t(e,r,void 0,n,{stagger:!0});u[n]={size:i.size,fit:Number(Yt(i.size,a).toFixed(3))}}let d=t(e,r,void 0,`vertical`,{stagger:!1}),f={size:d.size,fit:Number(Yt(d.size,a).toFixed(3))},p=Array.isArray(e.slots)?e.slots.length:0,m=n??(p>=5?`vertical`:`horizontal`),h=m===`vertical`?`horizontal`:`vertical`;return{text:{font:13,canvas:a,open:{name:m,fit:u[m].fit},other:{name:h,fit:u[h].fit}},unstaggered:f,counts:{slots:p,events:(e.slots??[]).reduce((e,t)=>e+(t?.events?.length||0),0),actors:e.actors?.length??0,sources:e.sources?.length??0},byOrientation:u,suggestedOrientation:p>=5?`vertical`:`horizontal`,placement:l}},formatReport:e=>{if(e.kind===`chronicle`)return Pee(e);if(e.kind===`scale`)return Iee(e);let t=[];t.push(`Data: ${e.counts.events} events / ${e.counts.slots} time slots / ${e.counts.actors} parties / ${e.counts.sources} sources`);let n=e.byOrientation.vertical,r=e.byOrientation.horizontal,i=e.unstaggered,a=i&&(i.size.height!==n.size.height||i.size.width!==n.size.width)?` (rows staggered, the page's default; with "Stagger" off ${i.size.width}×${i.size.height}, fit zoom ${i.fit})`:``;t.push(`Vertical: content ${n.size.width}×${n.size.height}, fit zoom ${n.fit}${a}`),t.push(`Horizontal: content ${r.size.width}×${r.size.height}, fit zoom ${r.fit}`),t.push(e.suggestedOrientation===`vertical`?`Suggested orientation: vertical (by the slot-count rule, ${e.counts.slots} slots >= 5)`:`Suggested orientation: horizontal (by the slot-count rule, ${e.counts.slots} slots < 5)`),t.push(...Qt(e.text,`splitting the timeline into periods, one diagram each`));let o=e.placement;return t.push(`Columns: side1 ${o.columns.side1} / axis ${o.columns.axis} / side2 ${o.columns.side2}, ${o.events} events`),o.blocked&&(t.push(`Does not fit: ${o.blocked}`),t.push(`Common cause: two or more events of one time slot fall in the same lane (the grid is one event per cell).`),t.push(`How to fix: split that time slot into two finer time points, or check the parties of the events so they land in different lanes.`)),t.join(`
@@ -1453,7 +1453,7 @@ import{execFileSync as e,spawn as t,spawnSync as n}from"node:child_process";impo
1453
1453
  `),i.length!=2)throw E(new Jc(`Exactly two numbers are expected, `+i.length+` were found.`));try{this.a=xN(WN(i[0])),this.b=xN(WN(i[1]))}catch(e){throw e=eO(e),j(e,131)?(n=e,E(new Jc(fht+n))):E(e)}},Q.Ib=function(){return`(`+this.a+`,`+this.b+`)`},Q.a=0,Q.b=0;var V3=L(MV,`KVector`,8);q(79,66,{3:1,4:1,20:1,31:1,56:1,18:1,66:1,16:1,79:1,414:1},Ec,Kl,Kxe),Q.Nc=function(){return mqe(this)},Q.ag=function(e){var t,n,r=DI(e,`,|;|\\(|\\)|\\[|\\]|\\{|\\}| | |
1454
1454
  `),i,a,o;Db(this);try{for(n=0,a=0,i=0,o=0;n<r.length;)r[n]!=null&&WN(r[n]).length>0&&(a%2==0?i=xN(r[n]):o=xN(r[n]),a>0&&a%2!=0&&Zg(this,new k(i,o)),++a),++n}catch(e){throw e=eO(e),j(e,131)?(t=e,E(new Jc(`The given string does not match the expected format for vectors.`+t))):E(e)}},Q.Ib=function(){for(var e=new th(`(`),t=gj(this,0),n;t.b!=t.d.c;)n=P(xS(t),8),Ip(e,n.a+`,`+n.b),t.b!=t.d.c&&(e.a+=`; `);return(e.a+=`)`,e).a};var bLt=L(MV,`KVectorChain`,79);q(256,24,{3:1,35:1,24:1,256:1},Xf);var H3,U3,W3,G3,K3,q3,xLt=fE(xW,`Alignment`,256,zq,qze,aEe),SLt;q(976,1,UB,Uae),Q.tf=function(e){iot(e)};var CLt,J3,wLt,TLt,ELt,DLt,OLt,kLt,ALt,jLt,MLt,NLt;L(xW,`BoxLayouterOptions`,976),q(977,1,{},Pne),Q.uf=function(){return new Lne},Q.vf=function(e){},L(xW,`BoxLayouterOptions/BoxFactory`,977),q(299,24,{3:1,35:1,24:1,299:1},Zf);var Y3,X3,Z3,Q3,$3,e6,t6=fE(xW,`ContentAlignment`,299,zq,Xze,oEe),PLt;q(689,1,UB,Hae),Q.tf=function(e){cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Mvt),``),`Layout Algorithm`),`Select a specific layout algorithm.`),(LN(),z3)),CJ),iA((mj(),A3))))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Nvt),``),`Resolved Layout Algorithm`),`Meta data associated with the selected algorithm.`),R3),mLt),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Ugt),``),`Alignment`),`Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.`),ILt),F3),xLt),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,XB),``),`Aspect Ratio`),`The desired aspect ratio of the drawing, that is the quotient of width by height.`),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,TW),``),`Bend Points`),`A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points.`),R3),bLt),iA(D3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,oU),``),`Content Alignment`),`Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option.`),VLt),I3),t6),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,iU),``),`Debug Mode`),`Whether additional debug information shall be generated.`),(ih(),!1)),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,aU),``),`Direction`),`Overall direction of edges: horizontal (right / left) or vertical (down / up).`),HLt),F3),t8),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,ZH),``),`Edge Routing`),`What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline.`),GLt),F3),d8),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,CW),``),`Expand Nodes`),`If active, nodes are expanded to fill the area of their parent.`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,XH),``),`Hierarchy Handling`),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),YLt),F3),lzt),N_(A3,U(O(M3,1),Z,160,0,[k3]))))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,$B),``),`Padding`),`The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately.`),lRt),R3),fwt),N_(A3,U(O(M3,1),Z,160,0,[k3]))))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,eV),``),`Interactive`),`Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible.`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,uU),``),`interactive Layout`),`Whether the graph should be changeable interactively and by setting constraints`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,rV),``),`Omit Node Micro Layout`),`Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout.`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,tV),``),`Port Constraints`),`Defines constraints of the position of the ports of a node.`),_Rt),F3),vzt),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,lU),``),`Position`),`The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position.`),R3),V3),N_(k3,U(O(M3,1),Z,160,0,[j3,O3]))))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,qB),``),`Priority`),`Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.`),L3),pJ),N_(k3,U(O(M3,1),Z,160,0,[D3]))))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,ZB),``),`Randomization Seed`),`Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time).`),L3),pJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,QB),``),`Separate Connected Components`),`Whether each connected component should be processed separately.`),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,e_t),``),`Junction Points`),`This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order.`),tRt),R3),bLt),iA(D3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,i_t),``),`Comment Box`),`Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related.`),!1),N3),oJ),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,a_t),``),`Hypernode`),`Whether the node should be handled as a hypernode.`),!1),N3),oJ),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Pvt),``),`Label Manager`),`Label managers can shorten labels upon a layout algorithm's request.`),R3),oHt),N_(A3,U(O(M3,1),Z,160,0,[O3]))))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Fvt),``),`Softwrapping Fuzziness`),`Determines the amount of fuzziness to be used when performing softwrapping on labels. The value expresses the percent of overhang that is permitted for each line. If the next line would take up less space than this threshold, it is appended to the current line instead of being placed in a new line.`),0),P3),dJ),iA(O3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,s_t),``),`Margins`),`Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels.`),nRt),R3),uwt),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Vgt),``),`No Layout`),`No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node.`),!1),N3),oJ),N_(k3,U(O(M3,1),Z,160,0,[D3,j3,O3]))))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Ivt),``),`Scale Factor`),`The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set.`),1),P3),dJ),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Lvt),``),`Child Area Width`),`The width of the area occupied by the laid out children of a node.`),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Rvt),``),`Child Area Height`),`The height of the area occupied by the laid out children of a node.`),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,lV),``),Dvt),`Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'`),!1),N3),oJ),iA(A3)))),cS(e,lV,pV,null),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,zvt),``),`Animate`),`Whether the shift from the old layout to the new computed layout shall be animated.`),!0),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Bvt),``),`Animation Time Factor`),`Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'.`),G(100)),L3),pJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Vvt),``),`Layout Ancestors`),`Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process.`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Hvt),``),`Maximal Animation Time`),`The maximal time for animations, in milliseconds.`),G(4e3)),L3),pJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Uvt),``),`Minimal Animation Time`),`The minimal time for animations, in milliseconds.`),G(400)),L3),pJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Wvt),``),`Progress Bar`),`Whether a progress bar shall be displayed during layout computations.`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Gvt),``),`Validate Graph`),`Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Kvt),``),`Validate Options`),`Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.`),!0),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,qvt),``),`Zoom to Fit`),`Whether the zoom level shall be set to view the whole diagram after layout.`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,wW),`box`),`Box Layout Mode`),`Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better.`),zLt),F3),Uzt),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Jvt),`json`),`Shape Coords`),`For layouts transferred into JSON graphs, specify the coordinate system to be used for nodes, ports, and labels of nodes and ports.`),eRt),F3),Ozt),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Yvt),`json`),`Edge Coords`),`For layouts transferred into JSON graphs, specify the coordinate system to be used for edge route points and edge labels.`),QLt),F3),GRt),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,kgt),QH),`Comment Comment Spacing`),`Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing.`),10),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Agt),QH),`Comment Node Spacing`),`Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing.`),10),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,jgt),QH),`Components Spacing`),`Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated.`),20),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Mgt),QH),`Edge Spacing`),`Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines.`),10),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,YB),QH),`Edge Label Spacing`),`The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option.`),2),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,rU),QH),`Edge Node Spacing`),`Spacing to be preserved between nodes and edges.`),10),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Ngt),QH),`Label Spacing`),`Determines the amount of space to be left between two labels of the same graph element.`),0),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Igt),QH),`Label Node Spacing`),`Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option.`),5),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Pgt),QH),`Horizontal spacing between Label and Port`),`Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option.`),1),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Fgt),QH),`Vertical spacing between Label and Port`),`Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option.`),1),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,JB),QH),`Node Spacing`),`The minimal distance to be preserved between each two nodes.`),20),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Lgt),QH),`Node Self Loop Spacing`),`Spacing to be preserved between a node and its self loops.`),10),P3),dJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Rgt),QH),`Port Spacing`),`Spacing between pairs of ports of the same node.`),10),P3),dJ),N_(A3,U(O(M3,1),Z,160,0,[k3]))))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,zgt),QH),`Individual Spacing`),`Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent.`),R3),Gzt),N_(k3,U(O(M3,1),Z,160,0,[D3,j3,O3]))))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,c_t),QH),`Additional Port Space`),`Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border.`),NRt),R3),uwt),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,cU),$vt),`Layout Partition`),`Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction).`),L3),pJ),N_(A3,U(O(M3,1),Z,160,0,[k3]))))),cS(e,cU,sU,pRt),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,sU),$vt),`Layout Partitioning`),`Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle.`),dRt),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Kgt),eyt),`Node Label Padding`),`Define padding for node labels that are placed inside of a node.`),iRt),R3),fwt),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,sV),eyt),`Node Label Placement`),`Hints for where node labels are to be placed; if empty, the node label's position is not modified.`),aRt),I3),A8),N_(k3,U(O(M3,1),Z,160,0,[O3]))))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Ygt),AW),`Port Alignment`),`Defines the default port distribution for a node. May be overridden for each side individually.`),hRt),F3),P8),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Xgt),AW),`Port Alignment (North)`),`Defines how ports on the northern side are placed, overriding the node's general port alignment.`),F3),P8),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Zgt),AW),`Port Alignment (South)`),`Defines how ports on the southern side are placed, overriding the node's general port alignment.`),F3),P8),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Qgt),AW),`Port Alignment (West)`),`Defines how ports on the western side are placed, overriding the node's general port alignment.`),F3),P8),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,$gt),AW),`Port Alignment (East)`),`Defines how ports on the eastern side are placed, overriding the node's general port alignment.`),F3),P8),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,oV),jW),`Node Size Constraints`),`What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed.`),oRt),I3),S5),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,aV),jW),`Node Size Options`),`Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.`),cRt),I3),jzt),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,hV),jW),`Node Size Minimum`),`The minimal size to which a node can be reduced.`),sRt),R3),V3),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,iV),jW),`Fixed Graph Size`),`By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so.`),!1),N3),oJ),iA(A3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,n_t),eU),`Edge Label Placement`),`Gives a hint on where to put edge labels.`),ULt),F3),qRt),iA(O3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,nV),eU),`Inline Edge Labels`),`If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible.`),!1),N3),oJ),iA(O3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Xvt),`font`),`Font Name`),`Font name used for a label.`),z3),CJ),iA(O3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Zvt),`font`),`Font Size`),`Font size used for a label.`),L3),pJ),iA(O3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,o_t),MW),`Port Anchor Offset`),`The offset to the port position where connections shall be attached.`),R3),V3),iA(j3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,r_t),MW),`Port Index`),`The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case.`),L3),pJ),iA(j3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Hgt),MW),`Port Side`),`The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports.`),bRt),F3),h5),iA(j3)))),cA(e,new IN(Ul(Hl(Wl(Ll(Vl(zl(Bl(new co,Bgt),MW),`Port Border Offset`),`The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border.`),P3),dJ),iA(j3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,cV),NW),`Port Label Placement`),`Decides on a placement method for port labels; if empty, the node label's position is not modified.`),vRt),I3),q8),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,qgt),NW),`Port Labels Next to Port`),`Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE.`),!1),N3),oJ),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Jgt),NW),`Treat Port Labels as Group`),`If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port.`),!0),N3),oJ),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,EW),PW),`Number of size categories`),`Defines the number of categories to use for the FIXED_INTEGER_RATIO_BOXES size approximator.`),G(3)),L3),pJ),iA(A3)))),cS(e,EW,OW,BRt),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,DW),PW),`Weight of a node containing children for determining the graph size`),`When determining the graph size for the size categorisation, this value determines how many times a node containing children is weighted more than a simple node. For example setting this value to four would result in a graph containing a simple node and a hierarchical node to be counted as having a size of five.`),G(4)),L3),pJ),iA(A3)))),cS(e,DW,EW,null),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,uV),PW),`Topdown Scale Factor`),`The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes.`),1),P3),dJ),iA(A3)))),cS(e,uV,pV,LRt),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,OW),PW),`Topdown Size Approximator`),`The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size.`),null),R3),dzt),iA(k3)))),cS(e,OW,pV,RRt),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,dV),PW),`Topdown Hierarchical Node Width`),`The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.`),150),P3),dJ),N_(A3,U(O(M3,1),Z,160,0,[k3]))))),cS(e,dV,pV,null),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,fV),PW),`Topdown Hierarchical Node Aspect Ratio`),`The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself.`),1.414),P3),dJ),N_(A3,U(O(M3,1),Z,160,0,[k3]))))),cS(e,fV,pV,null),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,pV),PW),`Topdown Node Type`),`The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes.`),null),F3),Pzt),iA(k3)))),cS(e,pV,iV,null),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,kW),PW),`Topdown Scale Cap`),`Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes.`),1),P3),dJ),iA(A3)))),cS(e,kW,pV,IRt),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Wgt),tyt),`Activate Inside Self Loops`),`Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports.`),!1),N3),oJ),iA(k3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Ggt),tyt),`Inside Self Loop`),`Whether a self loop should be routed inside a node instead of around that node.`),!1),N3),oJ),iA(D3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,t_t),`edge`),`Edge Thickness`),`The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it.`),1),P3),dJ),iA(D3)))),cA(e,new IN(Ul(Hl(Wl(Rl(Ll(Vl(zl(Bl(new co,Qvt),`edge`),`Edge Type`),`The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.`),qLt),F3),tzt),iA(D3)))),Zu(e,new Mx(Pl(Il(Fl(new Ja,Uz),`Layered`),`The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.`))),Zu(e,new Mx(Pl(Il(Fl(new Ja,`org.eclipse.elk.orthogonal`),`Orthogonal`),`Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia '86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.`))),Zu(e,new Mx(Pl(Il(Fl(new Ja,KB),`Force`),`Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984.`))),Zu(e,new Mx(Pl(Il(Fl(new Ja,`org.eclipse.elk.circle`),`Circle`),`Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph.`))),Zu(e,new Mx(Pl(Il(Fl(new Ja,M_t),`Tree`),`Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.`))),Zu(e,new Mx(Pl(Il(Fl(new Ja,`org.eclipse.elk.planar`),`Planar`),`Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable.`))),Zu(e,new Mx(Pl(Il(Fl(new Ja,JU),`Radial`),`Radial layout algorithms usually position the nodes of the graph on concentric circles.`))),Bit((new Wae,e)),iot((new Uae,e)),brt((new Gae,e))};var n6,FLt,ILt,r6,LLt,RLt,zLt,i6,a6,BLt,o6,VLt,s6,c6,HLt,l6,u6,ULt,WLt,GLt,KLt,qLt,JLt,d6,YLt,XLt,f6,p6,m6,h6,ZLt,QLt,$Lt,eRt,g6,tRt,_6,nRt,rRt,iRt,v6,aRt,y6,oRt,b6,x6,sRt,S6,cRt,C6,w6,T6,lRt,uRt,dRt,fRt,pRt,mRt,hRt,E6,D6,O6,k6,gRt,A6,j6,_Rt,M6,N6,P6,vRt,yRt,F6,bRt,I6,L6,R6,z6,xRt,B6,SRt,CRt,wRt,TRt,ERt,DRt,V6,ORt,H6,kRt,ARt,U6,jRt,MRt,NRt,PRt,W6,G6,K6,q6,FRt,IRt,J6,LRt,Y6,RRt,zRt,BRt,VRt;L(xW,`CoreOptions`,689),q(86,24,{3:1,35:1,24:1,86:1},Qf);var X6,Z6,Q6,$6,e8,t8=fE(xW,`Direction`,86,zq,iRe,sEe),HRt;q(278,24,{3:1,35:1,24:1,278:1},$f);var n8,r8,URt,WRt,GRt=fE(xW,`EdgeCoords`,278,zq,YIe,cEe),KRt;q(279,24,{3:1,35:1,24:1,279:1},ep);var i8,a8,o8,qRt=fE(xW,`EdgeLabelPlacement`,279,zq,LPe,lEe),JRt;q(222,24,{3:1,35:1,24:1,222:1},tp);var s8,c8,l8,u8,d8=fE(xW,`EdgeRouting`,222,zq,QIe,uEe),YRt;q(328,24,{3:1,35:1,24:1,328:1},np);var XRt,ZRt,QRt,$Rt,f8,ezt,tzt=fE(xW,`EdgeType`,328,zq,Zze,dEe),nzt;q(974,1,UB,Wae),Q.tf=function(e){Bit(e)};var rzt,izt,azt,ozt,szt,czt,p8;L(xW,`FixedLayouterOptions`,974),q(975,1,{},Fne),Q.uf=function(){return new Bne},Q.vf=function(e){},L(xW,`FixedLayouterOptions/FixedFactory`,975),q(347,24,{3:1,35:1,24:1,347:1},rp);var m8,h8,g8,lzt=fE(xW,`HierarchyHandling`,347,zq,RPe,fEe),uzt,dzt=g_(xW,`ITopdownSizeApproximator`);q(292,24,{3:1,35:1,24:1,292:1},ip);var _8,v8,y8,b8,fzt=fE(xW,`LabelSide`,292,zq,$Ie,pEe),pzt;q(96,24,{3:1,35:1,24:1,96:1},ap);var x8,S8,C8,w8,T8,E8,D8,O8,k8,A8=fE(xW,`NodeLabelPlacement`,96,zq,jHe,mEe),mzt;q(257,24,{3:1,35:1,24:1,257:1},op);var hzt,j8,M8,gzt,N8,P8=fE(xW,`PortAlignment`,257,zq,CRe,hEe),_zt;q(102,24,{3:1,35:1,24:1,102:1},sp);var F8,I8,L8,R8,z8,B8,vzt=fE(xW,`PortConstraints`,102,zq,Jze,gEe),yzt;q(280,24,{3:1,35:1,24:1,280:1},cp);var V8,H8,U8,W8,G8,K8,q8=fE(xW,`PortLabelPlacement`,280,zq,Yze,_Ee),bzt;q(64,24,{3:1,35:1,24:1,64:1},up);var J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5=fE(xW,`PortSide`,64,zq,aRe,vEe),xzt;q(978,1,UB,Gae),Q.tf=function(e){brt(e)};var Szt,Czt,wzt,Tzt,Ezt;L(xW,`RandomLayouterOptions`,978),q(979,1,{},Ine),Q.uf=function(){return new Gne},Q.vf=function(e){},L(xW,`RandomLayouterOptions/RandomFactory`,979),q(300,24,{3:1,35:1,24:1,300:1},lp);var g5,_5,Dzt,Ozt=fE(xW,`ShapeCoords`,300,zq,zPe,yEe),kzt;q(380,24,{3:1,35:1,24:1,380:1},dp);var v5,y5,b5,x5,S5=fE(xW,`SizeConstraint`,380,zq,ZIe,bEe),Azt;q(266,24,{3:1,35:1,24:1,266:1},fp);var C5,w5,T5,E5,D5,O5,k5,A5,j5,jzt=fE(xW,`SizeOptions`,266,zq,cUe,xEe),Mzt;q(281,24,{3:1,35:1,24:1,281:1},pp);var M5,Nzt,N5,Pzt=fE(xW,`TopdownNodeTypes`,281,zq,BPe,SEe),Fzt;q(288,24,RW);var Izt,P5,Lzt,Rzt,F5=fE(xW,`TopdownSizeApproximator`,288,zq,XIe,CEe);q(970,288,RW,JDe),Q.Sg=function(e){return c$e(e)},fE(xW,`TopdownSizeApproximator/1`,970,F5,null,null),q(971,288,RW,JOe),Q.Sg=function(e){var t=P(J(e,(WL(),z6)),144),r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C=(Jl(),m=new Tc,m),ee,w,te;for(iF(C,e),ee=new Gs,o=new Jm((!e.a&&(e.a=new F(e7,e,10,11)),e.a));o.e!=o.i.gc();)i=P(yj(o),26),y=(p=new Tc,p),tF(y,C),iF(y,i),te=c$e(i),sm(y,n.Math.max(i.g,te.a),n.Math.max(i.f,te.b)),qN(ee.f,i,y);for(a=new Jm((!e.a&&(e.a=new F(e7,e,10,11)),e.a));a.e!=a.i.gc();)for(i=P(yj(a),26),d=new Jm((!i.e&&(i.e=new fg(W5,i,7,4)),i.e));d.e!=d.i.gc();)u=P(yj(d),85),x=P(Tp(L_(ee.f,i)),26),S=P(uy(ee,H((!u.c&&(u.c=new fg(U5,u,5,8)),u.c),0)),26),b=(f=new mo,f),fw((!b.b&&(b.b=new fg(U5,b,4,7)),b.b),x),fw((!b.c&&(b.c=new fg(U5,b,5,8)),b.c),S),ZP(b,yx(x)),iF(b,u);g=P(Qb(t.f),214);try{g.kf(C,new fo),By(t.f,g)}catch(e){throw e=eO(e),j(e,101)?(h=e,E(h)):E(e)}return tw(C,a6)||tw(C,i6)||ML(C),l=D(N(J(C,a6))),c=D(N(J(C,i6))),s=l/c,r=D(N(J(C,G6)))*n.Math.sqrt((!C.a&&(C.a=new F(e7,C,10,11)),C.a).i),w=P(J(C,T6),104),v=w.b+w.c+1,_=w.d+w.a+1,new k(n.Math.max(v,r),n.Math.max(_,r/s))},fE(xW,`TopdownSizeApproximator/2`,971,F5,null,null),q(972,288,RW,XMe),Q.Sg=function(e){var t,n=D(N(J(e,(WL(),G6)))),r,i,a,o;return t=n/D(N(J(e,W6))),r=Xot(e),a=P(J(e,T6),104),i=D(N(vj(U6))),yx(e)&&(i=D(N(J(yx(e),U6)))),o=Vm(new k(n,t),r),cg(o,new k(-(a.b+a.c)-i,-(a.d+a.a)-i))},fE(xW,`TopdownSizeApproximator/3`,972,F5,null,null),q(973,288,RW,vke),Q.Sg=function(e){for(var t,r,i,a,o,s=new Jm((!e.a&&(e.a=new F(e7,e,10,11)),e.a)),c,l,u,d;s.e!=s.i.gc();)o=P(yj(s),26),J(o,(WL(),Y6))!=null&&(!o.a&&(o.a=new F(e7,o,10,11)),o.a)&&(!o.a&&(o.a=new F(e7,o,10,11)),o.a).i>0?(r=P(J(o,Y6),522),d=r.Sg(o),u=P(J(o,T6),104),sm(o,n.Math.max(o.g,d.a+u.b+u.c),n.Math.max(o.f,d.b+u.d+u.a))):(!o.a&&(o.a=new F(e7,o,10,11)),o.a).i!=0&&sm(o,D(N(J(o,G6))),D(N(J(o,G6)))/D(N(J(o,W6))));t=P(J(e,(WL(),z6)),144),l=P(Qb(t.f),214);try{l.kf(e,new fo),By(t.f,l)}catch(e){throw e=eO(e),j(e,101)?(c=e,E(c)):E(e)}return Dj(e,n6,IW),kLe(e),ML(e),a=D(N(J(e,a6))),i=D(N(J(e,i6))),new k(a,i)},fE(xW,`TopdownSizeApproximator/4`,973,F5,null,null);var zzt;q(345,1,{853:1},jc),Q.Tg=function(e,t){return K4e(this,e,t)},Q.Ug=function(){A6e(this)},Q.Vg=function(){return this.q},Q.Wg=function(){return this.f?Ib(this.f):null},Q.Xg=function(){return Ib(this.a)},Q.Yg=function(){return this.p},Q.Zg=function(){return!1},Q.$g=function(){return this.n},Q._g=function(){return this.p!=null&&!this.b},Q.ah=function(e){var t;this.n&&(t=e,M(this.f,t))},Q.bh=function(e,t){var n,r;this.n&&e&&uFe(this,(n=new tAe,r=mI(n,e),Xut(n),r),(HO(),L5))},Q.dh=function(e){var t;return this.b?null:(t=GVe(this,this.g),Zg(this.a,t),t.i=this,this.d=e,t)},Q.eh=function(e){e>0&&!this.b&&bUe(this,e)},Q.b=!1,Q.c=0,Q.d=-1,Q.e=null,Q.f=null,Q.g=-1,Q.j=!1,Q.k=!1,Q.n=!1,Q.o=0,Q.q=0,Q.r=0,L(dU,`BasicProgressMonitor`,345),q(706,214,PB,Lne),Q.kf=function(e,t){Kot(e,t)},L(dU,`BoxLayoutProvider`,706),q(966,1,mB,oue),Q.Le=function(e,t){return Dtt(this,P(e,26),P(t,26))},Q.Fb=function(e){return this===e},Q.Me=function(){return new xs(this)},Q.a=!1,L(dU,`BoxLayoutProvider/1`,966),q(167,1,{167:1},BT,Gxe),Q.Ib=function(){return this.c?vit(this.c):_N(this.b)},L(dU,`BoxLayoutProvider/Group`,167),q(327,24,{3:1,35:1,24:1,327:1},hp);var Bzt,Vzt,Hzt,I5,Uzt=fE(dU,`BoxLayoutProvider/PackingMode`,327,zq,eLe,wEe),Wzt;q(967,1,mB,Vne),Q.Le=function(e,t){return qje(P(e,167),P(t,167))},Q.Fb=function(e){return this===e},Q.Me=function(){return new xs(this)},L(dU,`BoxLayoutProvider/lambda$0$Type`,967),q(968,1,mB,po),Q.Le=function(e,t){return Aje(P(e,167),P(t,167))},Q.Fb=function(e){return this===e},Q.Me=function(){return new xs(this)},L(dU,`BoxLayoutProvider/lambda$1$Type`,968),q(969,1,mB,Hne),Q.Le=function(e,t){return jje(P(e,167),P(t,167))},Q.Fb=function(e){return this===e},Q.Me=function(){return new xs(this)},L(dU,`BoxLayoutProvider/lambda$2$Type`,969),q(1339,1,{830:1},Une),Q.Lg=function(e,t){return Wu(),!j(t,174)||Ome((lO(),P(e,174)),t)},L(dU,`ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type`,1339),q(1340,1,OR,sue),Q.Ad=function(e){kqe(this.a,P(e,147))},L(dU,`ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type`,1340),q(1341,1,OR,Wne),Q.Ad=function(e){P(e,105),Wu()},L(dU,`ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type`,1341),q(1345,1,OR,cue),Q.Ad=function(e){qUe(this.a,P(e,105))},L(dU,`ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type`,1345),q(1343,1,KR,m_e),Q.Mb=function(e){return LKe(this.a,this.b,P(e,147))},L(dU,`ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type`,1343),q(1342,1,KR,h_e),Q.Mb=function(e){return Lxe(this.a,this.b,P(e,830))},L(dU,`ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type`,1342),q(1344,1,OR,g_e),Q.Ad=function(e){cke(this.a,this.b,P(e,147))},L(dU,`ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type`,1344),q(931,1,{},zne),Q.Kb=function(e){return Vve(e)},Q.Fb=function(e){return this===e},L(dU,`ElkUtil/lambda$0$Type`,931),q(932,1,OR,__e),Q.Ad=function(e){e7e(this.a,this.b,P(e,85))},Q.a=0,Q.b=0,L(dU,`ElkUtil/lambda$1$Type`,932),q(933,1,OR,v_e),Q.Ad=function(e){Jfe(this.a,this.b,P(e,170))},Q.a=0,Q.b=0,L(dU,`ElkUtil/lambda$2$Type`,933),q(934,1,OR,y_e),Q.Ad=function(e){cye(this.a,this.b,P(e,157))},Q.a=0,Q.b=0,L(dU,`ElkUtil/lambda$3$Type`,934),q(935,1,OR,lue),Q.Ad=function(e){GDe(this.a,P(e,372))},L(dU,`ElkUtil/lambda$4$Type`,935),q(331,1,{35:1,331:1},Us),Q.Dd=function(e){return ube(this,P(e,242))},Q.Fb=function(e){var t;return j(e,331)?(t=P(e,331),this.a==t.a):!1},Q.Hb=function(){return ax(this.a)},Q.Ib=function(){return this.a+` (exclusive)`},Q.a=0,L(dU,`ExclusiveBounds/ExclusiveLowerBound`,331),q(1089,214,PB,Bne),Q.kf=function(e,t){var r,i,a,o,s,c,l,u,f,p,m,h,g,_,v,y,b,x,S,C,ee,w,te;for(t.Tg(`Fixed Layout`,1),o=P(J(e,(WL(),WLt)),222),p=0,m=0,b=new Jm((!e.a&&(e.a=new F(e7,e,10,11)),e.a));b.e!=b.i.gc();){for(v=P(yj(b),26),te=P(J(v,(LO(),p8)),8),te&&(cm(v,te.a,te.b),P(J(v,izt),182).Gc((BA(),v5))&&(h=P(J(v,ozt),8),h.a>0&&h.b>0&&DL(v,h.a,h.b,!0,!0))),p=n.Math.max(p,v.i+v.g),m=n.Math.max(m,v.j+v.f),u=new Jm((!v.n&&(v.n=new F($5,v,1,7)),v.n));u.e!=u.i.gc();)c=P(yj(u),157),te=P(J(c,p8),8),te&&cm(c,te.a,te.b),p=n.Math.max(p,v.i+c.i+c.g),m=n.Math.max(m,v.j+c.j+c.f);for(C=new Jm((!v.c&&(v.c=new F(t7,v,9,9)),v.c));C.e!=C.i.gc();)for(S=P(yj(C),125),te=P(J(S,p8),8),te&&cm(S,te.a,te.b),ee=v.i+S.i,w=v.j+S.j,p=n.Math.max(p,ee+S.g),m=n.Math.max(m,w+S.f),l=new Jm((!S.n&&(S.n=new F($5,S,1,7)),S.n));l.e!=l.i.gc();)c=P(yj(l),157),te=P(J(c,p8),8),te&&cm(c,te.a,te.b),p=n.Math.max(p,ee+c.i+c.g),m=n.Math.max(m,w+c.j+c.f);for(a=new av(Zm(WP(v).a.Jc(),new d));AP(a);)r=P(hC(a),85),f=nft(r),p=n.Math.max(p,f.a),m=n.Math.max(m,f.b);for(i=new av(Zm(UP(v).a.Jc(),new d));AP(i);)r=P(hC(i),85),yx(gN(r))!=e&&(f=nft(r),p=n.Math.max(p,f.a),m=n.Math.max(m,f.b))}if(o==(Nk(),s8))for(y=new Jm((!e.a&&(e.a=new F(e7,e,10,11)),e.a));y.e!=y.i.gc();)for(v=P(yj(y),26),i=new av(Zm(WP(v).a.Jc(),new d));AP(i);)r=P(hC(i),85),s=vot(r),s.b==0?Dj(r,g6,null):Dj(r,g6,s);Zc(Bh(J(e,(LO(),azt))))||(x=P(J(e,szt),104),_=p+x.b+x.c,g=m+x.d+x.a,DL(e,_,g,!0,!0)),t.Ug()},L(dU,`FixedLayoutProvider`,1089),q(379,150,{3:1,414:1,379:1,105:1,150:1},lo,rVe),Q.ag=function(e){var t,n,r,i,a,o,s,c,l;if(e)try{for(c=DI(e,`;,;`),a=c,o=0,s=a.length;o<s;++o){if(i=a[o],n=DI(i,`\\:`),r=Ylt(gE(),n[0]),!r)throw E(new Jc(`Invalid option id: `+n[0]));if(l=Plt(r,n[1]),l==null)throw E(new Jc(`Invalid option value: `+n[1]));l==null?(!this.q&&(this.q=new Gs),EC(this.q,r)):(!this.q&&(this.q=new Gs),Hy(this.q,r,l))}}catch(e){throw e=eO(e),j(e,101)?(t=e,E(new xqe(t))):E(e)}},Q.Ib=function(){return Vh(WS(cb((this.q?this.q:(Cb(),Cb(),zJ)).vc().Mc(),new Rne),KBe(new mDe,new Ce,new _e,new be,U(O(sY,1),Z,130,0,[]))))};var Gzt=L(dU,`IndividualSpacings`,379);q(965,1,{},Rne),Q.Kb=function(e){return Kje(P(e,45))},L(dU,`IndividualSpacings/lambda$0$Type`,965),q(708,1,{},TOe),Q.c=0,L(dU,`InstancePool`,708),q(1819,1,{},uo),L(dU,`LoggedGraph`,1819),q(407,24,{3:1,35:1,24:1,407:1},_p);var Kzt,L5,qzt,Jzt,Yzt=fE(dU,`LoggedGraph/Type`,407,zq,tLe,TEe),Xzt;q(615,1,{853:1},fo),Q.Tg=function(e,t){return!1},Q.Ug=function(){},Q.Vg=function(){return 0},Q.Wg=function(){return null},Q.Xg=function(){return null},Q.Yg=function(){return null},Q.Zg=function(){return!1},Q.$g=function(){return!1},Q._g=function(){return!1},Q.ah=function(e){},Q.bh=function(e,t){},Q.dh=function(e){return this},Q.eh=function(e){},L(dU,`NullElkProgressMonitor`,615),q(49,1,{20:1,49:1},gp),Q.Ic=function(e){QS(this,e)},Q.Fb=function(e){var t,n,r;return j(e,49)?(n=P(e,49),t=this.a==null?n.a==null:yk(this.a,n.a),r=this.b==null?n.b==null:yk(this.b,n.b),t&&r):!1},Q.Hb=function(){var e,t,n=this.a==null?0:qE(this.a),r,i,a;return e=n&az,t=n&-65536,a=this.b==null?0:qE(this.b),r=a&az,i=a&-65536,e^i>>16&az|t^r<<16},Q.Jc=function(){return new uue(this)},Q.Ib=function(){return this.a==null&&this.b==null?`pair(null,null)`:this.a==null?`pair(null,`+uA(this.b)+`)`:this.b==null?`pair(`+uA(this.a)+`,null)`:`pair(`+uA(this.a)+`,`+uA(this.b)+`)`},L(dU,`Pair`,49),q(980,1,gR,uue),Q.Nb=function(e){jv(this,e)},Q.Ob=function(){return!this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)},Q.Pb=function(){if(!this.c&&!this.b&&this.a.a!=null)return this.b=!0,this.a.a;if(!this.c&&this.a.b!=null)return this.c=!0,this.a.b;throw E(new cc)},Q.Qb=function(){throw this.c&&this.a.b!=null?this.a.b=null:this.b&&this.a.a!=null&&(this.a.a=null),E(new ac)},Q.b=!1,Q.c=!1,L(dU,`Pair/1`,980),q(1079,214,PB,Gne),Q.kf=function(e,t){var n,r,i,a,o;t.Tg(`Random Layout`,1),(!e.a&&(e.a=new F(e7,e,10,11)),e.a).i==0||(a=P(J(e,(JXe(),Tzt)),15),i=a&&a.a!=0?new US(a.a):new oA,n=Qc(N(J(e,Szt))),o=Qc(N(J(e,Ezt))),r=P(J(e,Czt),104),wdt(e,i,n,o,r)),t.Ug()},L(dU,`RandomLayoutProvider`,1079),q(240,1,{240:1},Fg),Q.Fb=function(e){return Wy(this.a,P(e,240).a)&&Wy(this.b,P(e,240).b)&&Wy(this.c,P(e,240).c)},Q.Hb=function(){return YO(U(O(Oq,1),lR,1,5,[this.a,this.b,this.c]))},Q.Ib=function(){return`(`+this.a+cR+this.b+cR+this.c+`)`},L(dU,`Triple`,240);var Zzt;q(551,1,{}),Q.Jf=function(){return new k(this.f.i,this.f.j)},Q.mf=function(e){return vMe(e,(WL(),A6))?J(this.f,Qzt):J(this.f,e)},Q.Kf=function(){return new k(this.f.g,this.f.f)},Q.Lf=function(){return this.g},Q.nf=function(e){return tw(this.f,e)},Q.Mf=function(e){nE(this.f,e.a),rE(this.f,e.b)},Q.Nf=function(e){tE(this.f,e.a),XT(this.f,e.b)},Q.Of=function(e){this.g=e},Q.g=0;var Qzt;L(zW,`ElkGraphAdapters/AbstractElkGraphElementAdapter`,551),q(553,1,{838:1},Ps),Q.Pf=function(){var e,t;if(!this.b)for(this.b=uS(Jy(this.a).i),t=new Jm(Jy(this.a));t.e!=t.i.gc();)e=P(yj(t),157),M(this.b,new Gc(e));return this.b},Q.b=null,L(zW,`ElkGraphAdapters/ElkEdgeAdapter`,553),q(260,551,{},Kc),Q.Qf=function(){return d1e(this)},Q.a=null,L(zW,`ElkGraphAdapters/ElkGraphAdapter`,260),q(631,551,{187:1},Gc),L(zW,`ElkGraphAdapters/ElkLabelAdapter`,631),q(552,551,{685:1},mh),Q.Pf=function(){return l1e(this)},Q.Tf=function(){var e=P(J(this.f,(WL(),_6)),140);return!e&&(e=new Sc),e},Q.Vf=function(){return u1e(this)},Q.Xf=function(e){var t=new Og(e);Dj(this.f,(WL(),_6),t)},Q.Yf=function(e){Dj(this.f,(WL(),T6),new Mwe(e))},Q.Rf=function(){return this.d},Q.Sf=function(){var e,t;if(!this.a)for(this.a=new Ws,t=new av(Zm(UP(P(this.f,26)).a.Jc(),new d));AP(t);)e=P(hC(t),85),M(this.a,new Ps(e));return this.a},Q.Uf=function(){var e,t;if(!this.c)for(this.c=new Ws,t=new av(Zm(WP(P(this.f,26)).a.Jc(),new d));AP(t);)e=P(hC(t),85),M(this.c,new Ps(e));return this.c},Q.Wf=function(){return Nb(P(this.f,26)).i!=0||Zc(Bh(P(this.f,26).mf((WL(),f6))))},Q.Zf=function(){QBe(this,($u(),Zzt))},Q.a=null,Q.b=null,Q.c=null,Q.d=null,Q.e=null,L(zW,`ElkGraphAdapters/ElkNodeAdapter`,552),q(1251,551,{837:1},Rue),Q.Pf=function(){return S1e(this)},Q.Sf=function(){var e,t;if(!this.a)for(this.a=xh(P(this.f,125).gh().i),t=new Jm(P(this.f,125).gh());t.e!=t.i.gc();)e=P(yj(t),85),M(this.a,new Ps(e));return this.a},Q.Uf=function(){var e,t;if(!this.c)for(this.c=xh(P(this.f,125).hh().i),t=new Jm(P(this.f,125).hh());t.e!=t.i.gc();)e=P(yj(t),85),M(this.c,new Ps(e));return this.c},Q.$f=function(){return P(P(this.f,125).mf((WL(),F6)),64)},Q._f=function(){var e,t,n,r=mx(P(this.f,125)),i,a,o,s;for(n=new Jm(P(this.f,125).hh());n.e!=n.i.gc();)for(e=P(yj(n),85),s=new Jm((!e.c&&(e.c=new fg(U5,e,5,8)),e.c));s.e!=s.i.gc();)if(o=P(yj(s),84),FT(tN(o),r)||tN(o)==r&&Zc(Bh(J(e,(WL(),p6)))))return!0;for(t=new Jm(P(this.f,125).gh());t.e!=t.i.gc();)for(e=P(yj(t),85),a=new Jm((!e.b&&(e.b=new fg(U5,e,4,7)),e.b));a.e!=a.i.gc();)if(i=P(yj(a),84),FT(tN(i),r))return!0;return!1},Q.a=null,Q.b=null,Q.c=null,L(zW,`ElkGraphAdapters/ElkPortAdapter`,1251),q(1252,1,mB,Kne),Q.Le=function(e,t){return _it(P(e,125),P(t,125))},Q.Fb=function(e){return this===e},Q.Me=function(){return new xs(this)},L(zW,`ElkGraphAdapters/PortComparator`,1252);var R5=g_(BW,`EObject`),z5=g_(VW,iyt),B5=g_(VW,ayt),V5=g_(VW,oyt),H5=g_(VW,`ElkShape`),U5=g_(VW,syt),W5=g_(VW,HW),G5=g_(VW,cyt),K5=g_(BW,lyt),q5=g_(BW,`EFactory`),$zt,J5=g_(BW,uyt),Y5=g_(BW,`EPackage`),X5,eBt,tBt,nBt,Z5,rBt,iBt,aBt,oBt,Q5,sBt,cBt,$5=g_(VW,UW),e7=g_(VW,WW),t7=g_(VW,GW);q(93,1,dyt),Q.qh=function(){return this.rh(),null},Q.rh=function(){return null},Q.sh=function(){return this.rh(),!1},Q.th=function(){return!1},Q.uh=function(e){SD(this,e)},L(KW,`BasicNotifierImpl`,93),q(100,93,hyt),Q.Vh=function(){return nm(this)},Q.vh=function(e,t){return e},Q.wh=function(){throw E(new sc)},Q.xh=function(e){var t=Uj(P(OT(this.Ah(),this.Ch()),19));return this.Mh().Qh(this,t.n,t.f,e)},Q.yh=function(e,t){throw E(new sc)},Q.zh=function(e,t,n){return vI(this,e,t,n)},Q.Ah=function(){var e;return this.wh()&&(e=this.wh().Lk(),e)?e:this.fi()},Q.Bh=function(){return OP(this)},Q.Ch=function(){throw E(new sc)},Q.Dh=function(){var e,t=this.Xh().Mk();return!t&&this.wh().Rk(t=(nd(),e=KMe(AI(this.Ah())),e==null?i9:new hh(this,e))),t},Q.Eh=function(e,t){return e},Q.Fh=function(e){return e.nk()?e.Jj():wA(this.Ah(),e)},Q.Gh=function(){var e=this.wh();return e?e.Ok():null},Q.Hh=function(){return this.wh()?this.wh().Lk():null},Q.Ih=function(e,t,n){return Aj(this,e,t,n)},Q.Jh=function(e){return Cw(this,e)},Q.Kh=function(e,t){return yC(this,e,t)},Q.Lh=function(){var e=this.wh();return!!e&&e.Pk()},Q.Mh=function(){throw E(new sc)},Q.Nh=function(){return rj(this)},Q.Oh=function(e,t,n,r){return Ej(this,e,t,r)},Q.Ph=function(e,t,n){return P(OT(this.Ah(),t),69).uk().xk(this,this.ei(),t-this.gi(),e,n)},Q.Qh=function(e,t,n,r){return Zb(this,e,t,r)},Q.Rh=function(e,t,n){return P(OT(this.Ah(),t),69).uk().yk(this,this.ei(),t-this.gi(),e,n)},Q.Sh=function(){return!!this.wh()&&!!this.wh().Nk()},Q.Th=function(e){return _j(this,e)},Q.Uh=function(e){return yNe(this,e)},Q.Wh=function(e){return Lut(this,e)},Q.Xh=function(){throw E(new sc)},Q.Yh=function(){return this.wh()?this.wh().Nk():null},Q.Zh=function(){return rj(this)},Q.$h=function(e,t){QN(this,e,t)},Q._h=function(e){this.Xh().Qk(e)},Q.ai=function(e){this.Xh().Tk(e)},Q.bi=function(e){this.Xh().Sk(e)},Q.ci=function(e,t){var n,r,i,a=this.Gh();return a&&e&&(t=kj(a.Cl(),this,t),a.Gl(this)),r=this.Mh(),r&&((oI(this,this.Mh(),this.Ch()).Bb&Wz)==0?(t=(n=this.Ch(),n>=0?this.xh(t):this.Mh().Qh(this,-1-n,null,t)),t=this.zh(null,-1,t)):(i=r.Nh(),i&&(e?!a&&i.Gl(this):i.Fl(this)))),this.ai(e),t},Q.di=function(e){var t,n=this.Ah(),r,i,a=wA(n,e),o,s,c;if(t=this.gi(),a>=t)return P(e,69).uk().Bk(this,this.ei(),a-t);if(a<=-1){if(o=fL((zN(),l9),n,e),o){if(ad(),P(o,69).vk()||(o=Kx(Xw(l9,o))),i=(r=this.Fh(o),P(r>=0?this.Ih(r,!0,!0):bP(this,o,!0),163)),c=o.Gk(),c>1||c==-1)return P(P(i,219).Ql(e,!1),78)}else throw E(new Jc(qW+e.ve()+YW))}else if(e.Hk())return r=this.Fh(e),P(r>=0?this.Ih(r,!1,!0):bP(this,e,!1),78);return s=new R_e(this,e),s},Q.ei=function(){return oT(this)},Q.fi=function(){return(Zv(),z7).S},Q.gi=function(){return Qv(this.fi())},Q.hi=function(e){MN(this,e)},Q.Ib=function(){return FP(this)},L(ZW,`BasicEObjectImpl`,100);var lBt;q(117,100,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1}),Q.ii=function(e){return sT(this)[e]},Q.ji=function(e,t){ly(sT(this),e,t)},Q.ki=function(e){ly(sT(this),e,null)},Q.qh=function(){return P(AD(this,4),129)},Q.rh=function(){throw E(new sc)},Q.sh=function(){return!!(this.Db&4)},Q.wh=function(){throw E(new sc)},Q.li=function(e){$A(this,2,e)},Q.yh=function(e,t){this.Db=t<<16|this.Db&255,this.li(e)},Q.Ah=function(){return Yb(this)},Q.Ch=function(){return this.Db>>16},Q.Dh=function(){var e,t;return nd(),t=KMe(AI((e=P(AD(this,16),29),e||this.fi()))),t==null?i9:new hh(this,t)},Q.th=function(){return!(this.Db&1)},Q.Gh=function(){return P(AD(this,128),1999)},Q.Hh=function(){return P(AD(this,16),29)},Q.Lh=function(){return!!(this.Db&32)},Q.Mh=function(){return P(AD(this,2),52)},Q.Sh=function(){return!!(this.Db&64)},Q.Xh=function(){throw E(new sc)},Q.Yh=function(){return P(AD(this,64),290)},Q._h=function(e){$A(this,16,e)},Q.ai=function(e){$A(this,128,e)},Q.bi=function(e){$A(this,64,e)},Q.ei=function(){return QA(this)},Q.Db=0,L(ZW,`MinimalEObjectImpl`,117),q(118,117,{109:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.li=function(e){this.Cb=e},Q.Mh=function(){return this.Cb},L(ZW,`MinimalEObjectImpl/Container`,118),q(QW,118,{109:1,343:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.Ih=function(e,t,n){return w1e(this,e,t,n)},Q.Rh=function(e,t,n){return Q3e(this,e,t,n)},Q.Th=function(e){return gFe(this,e)},Q.$h=function(e,t){zKe(this,e,t)},Q.fi=function(){return NL(),cBt},Q.hi=function(e){YGe(this,e)},Q.lf=function(){return xQe(this)},Q.fh=function(){return!this.o&&(this.o=new _w((NL(),Q5),r7,this,0)),this.o},Q.mf=function(e){return J(this,e)},Q.nf=function(e){return tw(this,e)},Q.of=function(e,t){return Dj(this,e,t)},L($W,`EMapPropertyHolderImpl`,QW),q(559,118,{109:1,372:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},ho),Q.Ih=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return Aj(this,e,t,n)},Q.Th=function(e){switch(e){case 0:return this.a!=0;case 1:return this.b!=0}return _j(this,e)},Q.$h=function(e,t){switch(e){case 0:ZT(this,D(N(t)));return;case 1:QT(this,D(N(t)));return}QN(this,e,t)},Q.fi=function(){return NL(),eBt},Q.hi=function(e){switch(e){case 0:ZT(this,0);return;case 1:QT(this,0);return}MN(this,e)},Q.Ib=function(){var e;return this.Db&64?FP(this):(e=new eh(FP(this)),e.a+=` (x: `,Zl(e,this.a),e.a+=`, y: `,Zl(e,this.b),e.a+=`)`,e.a)},Q.a=0,Q.b=0,L($W,`ElkBendPointImpl`,559),q(727,QW,{109:1,343:1,174:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.Ih=function(e,t,n){return LJe(this,e,t,n)},Q.Ph=function(e,t,n){return iN(this,e,t,n)},Q.Rh=function(e,t,n){return XD(this,e,t,n)},Q.Th=function(e){return sGe(this,e)},Q.$h=function(e,t){x2e(this,e,t)},Q.fi=function(){return NL(),rBt},Q.hi=function(e){gJe(this,e)},Q.ih=function(){return this.k},Q.jh=function(){return Jy(this)},Q.Ib=function(){return Jk(this)},Q.k=null,L($W,`ElkGraphElementImpl`,727),q(728,727,{109:1,343:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.Ih=function(e,t,n){return UYe(this,e,t,n)},Q.Th=function(e){return lXe(this,e)},Q.$h=function(e,t){S2e(this,e,t)},Q.fi=function(){return NL(),sBt},Q.hi=function(e){kXe(this,e)},Q.kh=function(){return this.f},Q.lh=function(){return this.g},Q.mh=function(){return this.i},Q.nh=function(){return this.j},Q.oh=function(e,t){sm(this,e,t)},Q.ph=function(e,t){cm(this,e,t)},Q.Ib=function(){return CN(this)},Q.f=0,Q.g=0,Q.i=0,Q.j=0,L($W,`ElkShapeImpl`,728),q(729,728,{109:1,343:1,84:1,174:1,276:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1}),Q.Ih=function(e,t,n){return v$e(this,e,t,n)},Q.Ph=function(e,t,n){return $0e(this,e,t,n)},Q.Rh=function(e,t,n){return e2e(this,e,t,n)},Q.Th=function(e){return NKe(this,e)},Q.$h=function(e,t){_9e(this,e,t)},Q.fi=function(){return NL(),tBt},Q.hi=function(e){IQe(this,e)},Q.gh=function(){return!this.d&&(this.d=new fg(W5,this,8,5)),this.d},Q.hh=function(){return!this.e&&(this.e=new fg(W5,this,7,4)),this.e},L($W,`ElkConnectableShapeImpl`,729),q(271,727,{109:1,343:1,85:1,174:1,271:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},mo),Q.xh=function(e){return c0e(this,e)},Q.Ih=function(e,t,n){switch(e){case 3:return px(this);case 4:return!this.b&&(this.b=new fg(U5,this,4,7)),this.b;case 5:return!this.c&&(this.c=new fg(U5,this,5,8)),this.c;case 6:return!this.a&&(this.a=new F(G5,this,6,6)),this.a;case 7:return ih(),!this.b&&(this.b=new fg(U5,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new fg(U5,this,5,8)),this.c.i<=1));case 8:return ih(),!!EP(this);case 9:return ih(),!!gP(this);case 10:return ih(),!this.b&&(this.b=new fg(U5,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new fg(U5,this,5,8)),this.c.i!=0)}return LJe(this,e,t,n)},Q.Ph=function(e,t,n){var r;switch(t){case 3:return this.Cb&&(n=(r=this.Db>>16,r>=0?c0e(this,n):this.Cb.Qh(this,-1-r,null,n))),ISe(this,P(e,26),n);case 4:return!this.b&&(this.b=new fg(U5,this,4,7)),jA(this.b,e,n);case 5:return!this.c&&(this.c=new fg(U5,this,5,8)),jA(this.c,e,n);case 6:return!this.a&&(this.a=new F(G5,this,6,6)),jA(this.a,e,n)}return iN(this,e,t,n)},Q.Rh=function(e,t,n){switch(t){case 3:return ISe(this,null,n);case 4:return!this.b&&(this.b=new fg(U5,this,4,7)),kj(this.b,e,n);case 5:return!this.c&&(this.c=new fg(U5,this,5,8)),kj(this.c,e,n);case 6:return!this.a&&(this.a=new F(G5,this,6,6)),kj(this.a,e,n)}return XD(this,e,t,n)},Q.Th=function(e){switch(e){case 3:return!!px(this);case 4:return!!this.b&&this.b.i!=0;case 5:return!!this.c&&this.c.i!=0;case 6:return!!this.a&&this.a.i!=0;case 7:return!this.b&&(this.b=new fg(U5,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new fg(U5,this,5,8)),this.c.i<=1));case 8:return EP(this);case 9:return gP(this);case 10:return!this.b&&(this.b=new fg(U5,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new fg(U5,this,5,8)),this.c.i!=0)}return sGe(this,e)},Q.$h=function(e,t){switch(e){case 3:ZP(this,P(t,26));return;case 4:!this.b&&(this.b=new fg(U5,this,4,7)),cL(this.b),!this.b&&(this.b=new fg(U5,this,4,7)),$v(this.b,P(t,18));return;case 5:!this.c&&(this.c=new fg(U5,this,5,8)),cL(this.c),!this.c&&(this.c=new fg(U5,this,5,8)),$v(this.c,P(t,18));return;case 6:!this.a&&(this.a=new F(G5,this,6,6)),cL(this.a),!this.a&&(this.a=new F(G5,this,6,6)),$v(this.a,P(t,18));return}x2e(this,e,t)},Q.fi=function(){return NL(),nBt},Q.hi=function(e){switch(e){case 3:ZP(this,null);return;case 4:!this.b&&(this.b=new fg(U5,this,4,7)),cL(this.b);return;case 5:!this.c&&(this.c=new fg(U5,this,5,8)),cL(this.c);return;case 6:!this.a&&(this.a=new F(G5,this,6,6)),cL(this.a);return}gJe(this,e)},Q.Ib=function(){return nct(this)},L($W,`ElkEdgeImpl`,271),q(443,QW,{109:1,343:1,170:1,443:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},go),Q.xh=function(e){return n0e(this,e)},Q.Ih=function(e,t,n){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new Wm(B5,this,5)),this.a;case 6:return vNe(this);case 7:return t?Hj(this):this.i;case 8:return t?Vj(this):this.f;case 9:return!this.g&&(this.g=new fg(G5,this,9,10)),this.g;case 10:return!this.e&&(this.e=new fg(G5,this,10,9)),this.e;case 11:return this.d}return w1e(this,e,t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?n0e(this,n):this.Cb.Qh(this,-1-i,null,n))),LSe(this,P(e,85),n);case 9:return!this.g&&(this.g=new fg(G5,this,9,10)),jA(this.g,e,n);case 10:return!this.e&&(this.e=new fg(G5,this,10,9)),jA(this.e,e,n)}return a=P(OT((r=P(AD(this,16),29),r||(NL(),Z5)),t),69),a.uk().xk(this,QA(this),t-Qv((NL(),Z5)),e,n)},Q.Rh=function(e,t,n){switch(t){case 5:return!this.a&&(this.a=new Wm(B5,this,5)),kj(this.a,e,n);case 6:return LSe(this,null,n);case 9:return!this.g&&(this.g=new fg(G5,this,9,10)),kj(this.g,e,n);case 10:return!this.e&&(this.e=new fg(G5,this,10,9)),kj(this.e,e,n)}return Q3e(this,e,t,n)},Q.Th=function(e){switch(e){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return!!this.a&&this.a.i!=0;case 6:return!!vNe(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&this.g.i!=0;case 10:return!!this.e&&this.e.i!=0;case 11:return this.d!=null}return gFe(this,e)},Q.$h=function(e,t){switch(e){case 1:iE(this,D(N(t)));return;case 2:aE(this,D(N(t)));return;case 3:$T(this,D(N(t)));return;case 4:eE(this,D(N(t)));return;case 5:!this.a&&(this.a=new Wm(B5,this,5)),cL(this.a),!this.a&&(this.a=new Wm(B5,this,5)),$v(this.a,P(t,18));return;case 6:utt(this,P(t,85));return;case 7:ME(this,P(t,84));return;case 8:jE(this,P(t,84));return;case 9:!this.g&&(this.g=new fg(G5,this,9,10)),cL(this.g),!this.g&&(this.g=new fg(G5,this,9,10)),$v(this.g,P(t,18));return;case 10:!this.e&&(this.e=new fg(G5,this,10,9)),cL(this.e),!this.e&&(this.e=new fg(G5,this,10,9)),$v(this.e,P(t,18));return;case 11:MUe(this,Vh(t));return}zKe(this,e,t)},Q.fi=function(){return NL(),Z5},Q.hi=function(e){switch(e){case 1:iE(this,0);return;case 2:aE(this,0);return;case 3:$T(this,0);return;case 4:eE(this,0);return;case 5:!this.a&&(this.a=new Wm(B5,this,5)),cL(this.a);return;case 6:utt(this,null);return;case 7:ME(this,null);return;case 8:jE(this,null);return;case 9:!this.g&&(this.g=new fg(G5,this,9,10)),cL(this.g);return;case 10:!this.e&&(this.e=new fg(G5,this,10,9)),cL(this.e);return;case 11:MUe(this,null);return}YGe(this,e)},Q.Ib=function(){return j7e(this)},Q.b=0,Q.c=0,Q.d=null,Q.j=0,Q.k=0,L($W,`ElkEdgeSectionImpl`,443),q(161,118,{109:1,94:1,93:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),Q.Ih=function(e,t,n){var r;return e==0?(!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab):Ow(this,e-Qv(this.fi()),OT((r=P(AD(this,16),29),r||this.fi()),e),t,n)},Q.Ph=function(e,t,n){var r,i;return t==0?(!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n)):(i=P(OT((r=P(AD(this,16),29),r||this.fi()),t),69),i.uk().xk(this,QA(this),t-Qv(this.fi()),e,n))},Q.Rh=function(e,t,n){var r,i;return t==0?(!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n)):(i=P(OT((r=P(AD(this,16),29),r||this.fi()),t),69),i.uk().yk(this,QA(this),t-Qv(this.fi()),e,n))},Q.Th=function(e){var t;return e==0?!!this.Ab&&this.Ab.i!=0:wS(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.Wh=function(e){return Xdt(this,e)},Q.$h=function(e,t){var n;e===0?(!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18))):lA(this,e-Qv(this.fi()),OT((n=P(AD(this,16),29),n||this.fi()),e),t)},Q.ai=function(e){$A(this,128,e)},Q.fi=function(){return YL(),UBt},Q.hi=function(e){var t;e===0?(!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab)):xk(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.mi=function(){this.Bb|=1},Q.ni=function(e){return yI(this,e)},Q.Bb=0,L(ZW,`EModelElementImpl`,161),q(710,161,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},Kae),Q.oi=function(e,t){return yut(this,e,t)},Q.pi=function(e){var t,n,r,i,a;if(this.a!=KT(e)||e.Bb&256)throw E(new Jc(aG+e.zb+nG));for(r=Jb(e);PS(r.a).i!=0;){if(n=P(hL(r,0,(t=P(H(PS(r.a),0),87),a=t.c,j(a,88)?P(a,29):(YL(),J7))),29),lM(n))return i=KT(n).ti().pi(n),P(i,52)._h(e),i;r=Jb(n)}return(e.D==null?e.B:e.D)==`java.util.Map$Entry`?new qDe(e):new gDe(e)},Q.qi=function(e,t){return FL(this,e,t)},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.a}return Ow(this,e-Qv((YL(),G7)),OT((r=P(AD(this,16),29),r||G7),e),t,n)},Q.Ph=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 1:return this.a&&(n=P(this.a,52).Qh(this,4,Y5,n)),rJe(this,P(e,241),n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),G7)),t),69),i.uk().xk(this,QA(this),t-Qv((YL(),G7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 1:return rJe(this,null,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),G7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),G7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return!!this.a}return wS(this,e-Qv((YL(),G7)),OT((t=P(AD(this,16),29),t||G7),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:L3e(this,P(t,241));return}lA(this,e-Qv((YL(),G7)),OT((n=P(AD(this,16),29),n||G7),e),t)},Q.fi=function(){return YL(),G7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:L3e(this,null);return}xk(this,e-Qv((YL(),G7)),OT((t=P(AD(this,16),29),t||G7),e))};var n7,uBt,dBt;L(ZW,`EFactoryImpl`,710),q(1019,710,{109:1,2078:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1},Jne),Q.oi=function(e,t){switch(e.fk()){case 12:return P(t,147).Og();case 13:return uA(t);default:throw E(new Jc(tG+e.ve()+nG))}},Q.pi=function(e){var t,n,r,i,a,o,s,c;switch(e.G==-1&&(e.G=(t=KT(e),t?Ij(t.si(),e):-1)),e.G){case 4:return a=new _o,a;case 6:return o=new Tc,o;case 7:return s=new sfe,s;case 8:return r=new mo,r;case 9:return n=new ho,n;case 10:return i=new go,i;case 11:return c=new vo,c;default:throw E(new Jc(aG+e.zb+nG))}},Q.qi=function(e,t){switch(e.fk()){case 13:case 12:return null;default:throw E(new Jc(tG+e.ve()+nG))}},L($W,`ElkGraphFactoryImpl`,1019),q(439,161,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1}),Q.Dh=function(){var e,t=(e=P(AD(this,16),29),KMe(AI(e||this.fi())));return t==null?(nd(),nd(),i9):new Jxe(this,t)},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.ve()}return Ow(this,e-Qv(this.fi()),OT((r=P(AD(this,16),29),r||this.fi()),e),t,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null}return wS(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:this.ri(Vh(t));return}lA(this,e-Qv(this.fi()),OT((n=P(AD(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return YL(),WBt},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:this.ri(null);return}xk(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.ve=function(){return this.zb},Q.ri=function(e){YE(this,e)},Q.Ib=function(){return hk(this)},Q.zb=null,L(ZW,`ENamedElementImpl`,439),q(184,439,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},Zje),Q.xh=function(e){return o0e(this,e)},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new yv(this,D7,this)),this.rb;case 6:return!this.vb&&(this.vb=new ug(Y5,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?P(this.Cb,241):null:jNe(this)}return Ow(this,e-Qv((YL(),X7)),OT((r=P(AD(this,16),29),r||X7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 4:return this.sb&&(n=P(this.sb,52).Qh(this,1,q5,n)),DJe(this,P(e,469),n);case 5:return!this.rb&&(this.rb=new yv(this,D7,this)),jA(this.rb,e,n);case 6:return!this.vb&&(this.vb=new ug(Y5,this,6,7)),jA(this.vb,e,n);case 7:return this.Cb&&(n=(i=this.Db>>16,i>=0?o0e(this,n):this.Cb.Qh(this,-1-i,null,n))),vI(this,e,7,n)}return a=P(OT((r=P(AD(this,16),29),r||(YL(),X7)),t),69),a.uk().xk(this,QA(this),t-Qv((YL(),X7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 4:return DJe(this,null,n);case 5:return!this.rb&&(this.rb=new yv(this,D7,this)),kj(this.rb,e,n);case 6:return!this.vb&&(this.vb=new ug(Y5,this,6,7)),kj(this.vb,e,n);case 7:return vI(this,null,7,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),X7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),X7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return!!this.sb;case 5:return!!this.rb&&this.rb.i!=0;case 6:return!!this.vb&&this.vb.i!=0;case 7:return!!jNe(this)}return wS(this,e-Qv((YL(),X7)),OT((t=P(AD(this,16),29),t||X7),e))},Q.Wh=function(e){return ztt(this,e)||Xdt(this,e)},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:YE(this,Vh(t));return;case 2:$E(this,Vh(t));return;case 3:QE(this,Vh(t));return;case 4:bN(this,P(t,469));return;case 5:!this.rb&&(this.rb=new yv(this,D7,this)),cL(this.rb),!this.rb&&(this.rb=new yv(this,D7,this)),$v(this.rb,P(t,18));return;case 6:!this.vb&&(this.vb=new ug(Y5,this,6,7)),cL(this.vb),!this.vb&&(this.vb=new ug(Y5,this,6,7)),$v(this.vb,P(t,18));return}lA(this,e-Qv((YL(),X7)),OT((n=P(AD(this,16),29),n||X7),e),t)},Q.bi=function(e){var t,n;if(e&&this.rb)for(n=new Jm(this.rb);n.e!=n.i.gc();)t=yj(n),j(t,360)&&(P(t,360).w=null);$A(this,64,e)},Q.fi=function(){return YL(),X7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:YE(this,null);return;case 2:$E(this,null);return;case 3:QE(this,null);return;case 4:bN(this,null);return;case 5:!this.rb&&(this.rb=new yv(this,D7,this)),cL(this.rb);return;case 6:!this.vb&&(this.vb=new ug(Y5,this,6,7)),cL(this.vb);return}xk(this,e-Qv((YL(),X7)),OT((t=P(AD(this,16),29),t||X7),e))},Q.mi=function(){hM(this)},Q.si=function(){return!this.rb&&(this.rb=new yv(this,D7,this)),this.rb},Q.ti=function(){return this.sb},Q.ui=function(){return this.ub},Q.vi=function(){return this.xb},Q.wi=function(){return this.yb},Q.xi=function(e){this.ub=e},Q.Ib=function(){var e;return this.Db&64?hk(this):(e=new eh(hk(this)),e.a+=` (nsURI: `,Np(e,this.yb),e.a+=`, nsPrefix: `,Np(e,this.xb),e.a+=`)`,e.a)},Q.xb=null,Q.yb=null;var fBt;L(ZW,`EPackageImpl`,184),q(556,184,{109:1,2080:1,556:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1},Q7e),Q.q=!1,Q.r=!1;var pBt=!1;L($W,`ElkGraphPackageImpl`,556),q(362,728,{109:1,343:1,174:1,157:1,276:1,362:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},_o),Q.xh=function(e){return r0e(this,e)},Q.Ih=function(e,t,n){switch(e){case 7:return MNe(this);case 8:return this.a}return UYe(this,e,t,n)},Q.Ph=function(e,t,n){var r;return t===7?(this.Cb&&(n=(r=this.Db>>16,r>=0?r0e(this,n):this.Cb.Qh(this,-1-r,null,n))),W_(this,P(e,174),n)):iN(this,e,t,n)},Q.Rh=function(e,t,n){return t==7?W_(this,null,n):XD(this,e,t,n)},Q.Th=function(e){switch(e){case 7:return!!MNe(this);case 8:return!mg(``,this.a)}return lXe(this,e)},Q.$h=function(e,t){switch(e){case 7:cF(this,P(t,174));return;case 8:wUe(this,Vh(t));return}S2e(this,e,t)},Q.fi=function(){return NL(),iBt},Q.hi=function(e){switch(e){case 7:cF(this,null);return;case 8:wUe(this,``);return}kXe(this,e)},Q.Ib=function(){return q6e(this)},Q.a=``,L($W,`ElkLabelImpl`,362),q(206,729,{109:1,343:1,84:1,174:1,26:1,276:1,206:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},Tc),Q.xh=function(e){return S0e(this,e)},Q.Ih=function(e,t,n){switch(e){case 9:return!this.c&&(this.c=new F(t7,this,9,9)),this.c;case 10:return!this.a&&(this.a=new F(e7,this,10,11)),this.a;case 11:return yx(this);case 12:return!this.b&&(this.b=new F(W5,this,12,3)),this.b;case 13:return ih(),!this.a&&(this.a=new F(e7,this,10,11)),this.a.i>0}return v$e(this,e,t,n)},Q.Ph=function(e,t,n){var r;switch(t){case 9:return!this.c&&(this.c=new F(t7,this,9,9)),jA(this.c,e,n);case 10:return!this.a&&(this.a=new F(e7,this,10,11)),jA(this.a,e,n);case 11:return this.Cb&&(n=(r=this.Db>>16,r>=0?S0e(this,n):this.Cb.Qh(this,-1-r,null,n))),yCe(this,P(e,26),n);case 12:return!this.b&&(this.b=new F(W5,this,12,3)),jA(this.b,e,n)}return $0e(this,e,t,n)},Q.Rh=function(e,t,n){switch(t){case 9:return!this.c&&(this.c=new F(t7,this,9,9)),kj(this.c,e,n);case 10:return!this.a&&(this.a=new F(e7,this,10,11)),kj(this.a,e,n);case 11:return yCe(this,null,n);case 12:return!this.b&&(this.b=new F(W5,this,12,3)),kj(this.b,e,n)}return e2e(this,e,t,n)},Q.Th=function(e){switch(e){case 9:return!!this.c&&this.c.i!=0;case 10:return!!this.a&&this.a.i!=0;case 11:return!!yx(this);case 12:return!!this.b&&this.b.i!=0;case 13:return!this.a&&(this.a=new F(e7,this,10,11)),this.a.i>0}return NKe(this,e)},Q.$h=function(e,t){switch(e){case 9:!this.c&&(this.c=new F(t7,this,9,9)),cL(this.c),!this.c&&(this.c=new F(t7,this,9,9)),$v(this.c,P(t,18));return;case 10:!this.a&&(this.a=new F(e7,this,10,11)),cL(this.a),!this.a&&(this.a=new F(e7,this,10,11)),$v(this.a,P(t,18));return;case 11:tF(this,P(t,26));return;case 12:!this.b&&(this.b=new F(W5,this,12,3)),cL(this.b),!this.b&&(this.b=new F(W5,this,12,3)),$v(this.b,P(t,18));return}_9e(this,e,t)},Q.fi=function(){return NL(),aBt},Q.hi=function(e){switch(e){case 9:!this.c&&(this.c=new F(t7,this,9,9)),cL(this.c);return;case 10:!this.a&&(this.a=new F(e7,this,10,11)),cL(this.a);return;case 11:tF(this,null);return;case 12:!this.b&&(this.b=new F(W5,this,12,3)),cL(this.b);return}IQe(this,e)},Q.Ib=function(){return vit(this)},L($W,`ElkNodeImpl`,206),q(193,729,{109:1,343:1,84:1,174:1,125:1,276:1,193:1,105:1,94:1,93:1,57:1,114:1,52:1,100:1,117:1,118:1},sfe),Q.xh=function(e){return i0e(this,e)},Q.Ih=function(e,t,n){return e==9?mx(this):v$e(this,e,t,n)},Q.Ph=function(e,t,n){var r;return t===9?(this.Cb&&(n=(r=this.Db>>16,r>=0?i0e(this,n):this.Cb.Qh(this,-1-r,null,n))),RSe(this,P(e,26),n)):$0e(this,e,t,n)},Q.Rh=function(e,t,n){return t==9?RSe(this,null,n):e2e(this,e,t,n)},Q.Th=function(e){return e==9?!!mx(this):NKe(this,e)},Q.$h=function(e,t){e===9?QP(this,P(t,26)):_9e(this,e,t)},Q.fi=function(){return NL(),oBt},Q.hi=function(e){e===9?QP(this,null):IQe(this,e)},Q.Ib=function(){return yit(this)},L($W,`ElkPortImpl`,193);var mBt=g_(CG,`BasicEMap/Entry`);q(1092,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,117:1,118:1},vo),Q.Fb=function(e){return this===e},Q.jd=function(){return this.b},Q.Hb=function(){return lh(this)},Q.Ai=function(e){TUe(this,P(e,147))},Q.Ih=function(e,t,n){switch(e){case 0:return this.b;case 1:return this.c}return Aj(this,e,t,n)},Q.Th=function(e){switch(e){case 0:return!!this.b;case 1:return this.c!=null}return _j(this,e)},Q.$h=function(e,t){switch(e){case 0:TUe(this,P(t,147));return;case 1:xUe(this,t);return}QN(this,e,t)},Q.fi=function(){return NL(),Q5},Q.hi=function(e){switch(e){case 0:TUe(this,null);return;case 1:xUe(this,null);return}MN(this,e)},Q.yi=function(){var e;return this.a==-1&&(e=this.b,this.a=e?qE(e):0),this.a},Q.kd=function(){return this.c},Q.zi=function(e){this.a=e},Q.ld=function(e){var t=this.c;return xUe(this,e),t},Q.Ib=function(){var e;return this.Db&64?FP(this):(e=new xl,Ip(Ip(Ip(e,this.b?this.b.Og():dR),kV),$m(this.c)),e.a)},Q.a=-1,Q.c=null;var r7=L($W,`ElkPropertyToValueMapEntryImpl`,1092);q(981,1,{},yo),L(EG,`JsonAdapter`,981),q(215,63,XR,cl),L(EG,`JsonImportException`,215),q(851,1,{},I7e),L(EG,`JsonImporter`,851),q(885,1,{},b_e),Q.Bi=function(e){t2e(this.a,this.b,P(e,139))},L(EG,`JsonImporter/lambda$0$Type`,885),q(886,1,{},x_e),Q.Bi=function(e){V5e(this.a,this.b,P(e,139))},L(EG,`JsonImporter/lambda$1$Type`,886),q(894,1,{},due),Q.Bi=function(e){ije(this.a,P(e,149))},L(EG,`JsonImporter/lambda$10$Type`,894),q(896,1,{},S_e),Q.Bi=function(e){m5e(this.a,this.b,P(e,139))},L(EG,`JsonImporter/lambda$11$Type`,896),q(897,1,{},C_e),Q.Bi=function(e){h5e(this.a,this.b,P(e,139))},L(EG,`JsonImporter/lambda$12$Type`,897),q(903,1,{},Tje),Q.Bi=function(e){M6e(this.a,this.b,this.c,this.d,P(e,139))},L(EG,`JsonImporter/lambda$13$Type`,903),q(902,1,{},Eje),Q.Bi=function(e){Zat(this.a,this.b,this.c,this.d,P(e,149))},L(EG,`JsonImporter/lambda$14$Type`,902),q(898,1,{},w_e),Q.Bi=function(e){bCe(this.a,this.b,Vh(e))},L(EG,`JsonImporter/lambda$15$Type`,898),q(899,1,{},T_e),Q.Bi=function(e){xCe(this.a,this.b,Vh(e))},L(EG,`JsonImporter/lambda$16$Type`,899),q(900,1,{},E_e),Q.Bi=function(e){L1e(this.b,this.a,P(e,139))},L(EG,`JsonImporter/lambda$17$Type`,900),q(901,1,{},D_e),Q.Bi=function(e){R1e(this.b,this.a,P(e,139))},L(EG,`JsonImporter/lambda$18$Type`,901),q(906,1,{},fue),Q.Bi=function(e){e6e(this.a,P(e,149))},L(EG,`JsonImporter/lambda$19$Type`,906),q(887,1,{},pue),Q.Bi=function(e){T0e(this.a,P(e,139))},L(EG,`JsonImporter/lambda$2$Type`,887),q(904,1,{},mue),Q.Bi=function(e){iE(this.a,D(N(e)))},L(EG,`JsonImporter/lambda$20$Type`,904),q(905,1,{},hue),Q.Bi=function(e){aE(this.a,D(N(e)))},L(EG,`JsonImporter/lambda$21$Type`,905),q(909,1,{},gue),Q.Bi=function(e){$3e(this.a,P(e,149))},L(EG,`JsonImporter/lambda$22$Type`,909),q(907,1,{},_ue),Q.Bi=function(e){$T(this.a,D(N(e)))},L(EG,`JsonImporter/lambda$23$Type`,907),q(908,1,{},vue),Q.Bi=function(e){eE(this.a,D(N(e)))},L(EG,`JsonImporter/lambda$24$Type`,908),q(911,1,{},yue),Q.Bi=function(e){$2e(this.a,P(e,139))},L(EG,`JsonImporter/lambda$25$Type`,911),q(910,1,{},bue),Q.Bi=function(e){aje(this.a,P(e,149))},L(EG,`JsonImporter/lambda$26$Type`,910),q(912,1,OR,O_e),Q.Ad=function(e){tBe(this.b,this.a,Vh(e))},L(EG,`JsonImporter/lambda$27$Type`,912),q(913,1,OR,k_e),Q.Ad=function(e){nBe(this.b,this.a,Vh(e))},L(EG,`JsonImporter/lambda$28$Type`,913),q(914,1,{},A_e),Q.Bi=function(e){j9e(this.a,this.b,P(e,139))},L(EG,`JsonImporter/lambda$29$Type`,914),q(890,1,{},xue),Q.Bi=function(e){wXe(this.a,P(e,149))},L(EG,`JsonImporter/lambda$3$Type`,890),q(915,1,{},j_e),Q.Bi=function(e){Qet(this.a,this.b,P(e,139))},L(EG,`JsonImporter/lambda$30$Type`,915),q(916,1,{},Sue),Q.Bi=function(e){$Be(this.a,N(e))},L(EG,`JsonImporter/lambda$31$Type`,916),q(917,1,{},Cue),Q.Bi=function(e){nVe(this.a,N(e))},L(EG,`JsonImporter/lambda$32$Type`,917),q(918,1,{},wue),Q.Bi=function(e){eVe(this.a,N(e))},L(EG,`JsonImporter/lambda$33$Type`,918),q(919,1,{},Tue),Q.Bi=function(e){tVe(this.a,N(e))},L(EG,`JsonImporter/lambda$34$Type`,919),q(920,1,{},Eue),Q.Bi=function(e){j3e(this.a,P(e,57))},L(EG,`JsonImporter/lambda$35$Type`,920),q(921,1,{},Due),Q.Bi=function(e){M3e(this.a,P(e,57))},L(EG,`JsonImporter/lambda$36$Type`,921),q(925,1,{},wje),L(EG,`JsonImporter/lambda$37$Type`,925),q(922,1,OR,OEe),Q.Ad=function(e){dWe(this.a,this.c,this.b,P(e,372))},L(EG,`JsonImporter/lambda$38$Type`,922),q(923,1,OR,M_e),Q.Ad=function(e){X_e(this.a,this.b,P(e,170))},L(EG,`JsonImporter/lambda$39$Type`,923),q(888,1,{},Oue),Q.Bi=function(e){iE(this.a,D(N(e)))},L(EG,`JsonImporter/lambda$4$Type`,888),q(924,1,OR,N_e),Q.Ad=function(e){Z_e(this.a,this.b,P(e,170))},L(EG,`JsonImporter/lambda$40$Type`,924),q(926,1,OR,kEe),Q.Ad=function(e){fWe(this.a,this.b,this.c,P(e,8))},L(EG,`JsonImporter/lambda$41$Type`,926),q(889,1,{},kue),Q.Bi=function(e){aE(this.a,D(N(e)))},L(EG,`JsonImporter/lambda$5$Type`,889),q(893,1,{},Aue),Q.Bi=function(e){TXe(this.a,P(e,149))},L(EG,`JsonImporter/lambda$6$Type`,893),q(891,1,{},jue),Q.Bi=function(e){$T(this.a,D(N(e)))},L(EG,`JsonImporter/lambda$7$Type`,891),q(892,1,{},Mue),Q.Bi=function(e){eE(this.a,D(N(e)))},L(EG,`JsonImporter/lambda$8$Type`,892),q(895,1,{},Nue),Q.Bi=function(e){e4e(this.a,P(e,139))},L(EG,`JsonImporter/lambda$9$Type`,895),q(945,1,OR,Pue),Q.Ad=function(e){gy(this.a,new by(Vh(e)))},L(EG,`JsonMetaDataConverter/lambda$0$Type`,945),q(946,1,OR,Fue),Q.Ad=function(e){Xke(this.a,P(e,244))},L(EG,`JsonMetaDataConverter/lambda$1$Type`,946),q(947,1,OR,Iue),Q.Ad=function(e){cPe(this.a,P(e,144))},L(EG,`JsonMetaDataConverter/lambda$2$Type`,947),q(948,1,OR,Lue),Q.Ad=function(e){Zke(this.a,P(e,160))},L(EG,`JsonMetaDataConverter/lambda$3$Type`,948),q(244,24,{3:1,35:1,24:1,244:1},vp);var i7,a7,o7,s7,c7,l7,u7,d7,f7=fE(IB,`GraphFeature`,244,zq,VVe,HEe),hBt;q(11,1,{35:1,147:1},Is,ig,Vp,_m),Q.Dd=function(e){return dbe(this,P(e,147))},Q.Fb=function(e){return vMe(this,e)},Q.Rg=function(){return vj(this)},Q.Og=function(){return this.b},Q.Hb=function(){return DO(this.b)},Q.Ib=function(){return this.b},L(IB,`Property`,11),q(657,1,mB,Fs),Q.Le=function(e,t){return yYe(this,P(e,105),P(t,105))},Q.Fb=function(e){return this===e},Q.Me=function(){return new xs(this)},L(IB,`PropertyHolderComparator`,657),q(698,1,gR,zue),Q.Nb=function(e){jv(this,e)},Q.Pb=function(){return iBe(this)},Q.Qb=function(){mme()},Q.Ob=function(){return!!this.a},L(MG,`ElkGraphUtil/AncestorIterator`,698);var gBt=g_(CG,`EList`);q(71,56,{20:1,31:1,56:1,18:1,16:1,71:1,61:1}),Q._c=function(e,t){Ek(this,e,t)},Q.Ec=function(e){return fw(this,e)},Q.ad=function(e,t){return rKe(this,e,t)},Q.Fc=function(e){return $v(this,e)},Q.Gi=function(){return new vh(this)},Q.Hi=function(){return new yh(this)},Q.Ii=function(e){return bE(this,e)},Q.Ji=function(){return!0},Q.Ki=function(e,t){},Q.Li=function(){},Q.Mi=function(e,t){QC(this,e,t)},Q.Ni=function(e,t,n){},Q.Oi=function(e,t){},Q.Pi=function(e,t,n){},Q.Fb=function(e){return Ort(this,e)},Q.Hb=function(){return IGe(this)},Q.Qi=function(){return!1},Q.Jc=function(){return new Jm(this)},Q.cd=function(){return new _h(this)},Q.dd=function(e){var t=this.gc();if(e<0||e>t)throw E(new pg(e,t));return new Wv(this,e)},Q.Si=function(e,t){this.Ri(e,this.bd(t))},Q.Kc=function(e){return uT(this,e)},Q.Ui=function(e,t){return t},Q.fd=function(e,t){return Fj(this,e,t)},Q.Ib=function(){return rXe(this)},Q.Wi=function(){return!0},Q.Xi=function(e,t){return OO(this,t)},L(CG,`AbstractEList`,71),q(67,71,LG,bo,PT,jWe),Q.Ci=function(e,t){return aN(this,e,t)},Q.Di=function(e){return F$e(this,e)},Q.Ei=function(e,t){_k(this,e,t)},Q.Fi=function(e){TC(this,e)},Q.Yi=function(e){return Tw(this,e)},Q.$b=function(){wC(this)},Q.Gc=function(e){return FM(this,e)},Q.Xb=function(e){return H(this,e)},Q.Zi=function(e){var t,n,r;++this.j,n=this.g==null?0:this.g.length,e>n&&(r=this.g,t=n+(n/2|0)+4,t<e&&(t=e),this.g=this.$i(t),r!=null&&EI(r,0,this.g,0,this.i))},Q.bd=function(e){return G1e(this,e)},Q.dc=function(){return this.i==0},Q.Ri=function(e,t){return _P(this,e,t)},Q.$i=function(e){return V(Oq,lR,1,e,5,1)},Q.Ti=function(e){return this.g[e]},Q.ed=function(e){return yM(this,e)},Q.Vi=function(e,t){return lT(this,e,t)},Q.gc=function(){return this.i},Q.Nc=function(){return oLe(this)},Q.Oc=function(e){return MXe(this,e)},Q.i=0;var _Bt=L(CG,`BasicEList`,67),vBt=g_(CG,`TreeIterator`);q(697,67,RG),Q.Nb=function(e){jv(this,e)},Q.Ob=function(){return this.g==null&&!this.c?DNe(this):this.g==null||this.i!=0&&P(this.g[this.i-1],50).Ob()},Q.Pb=function(){return zP(this)},Q.Qb=function(){if(!this.e)throw E(new Yc(`There is no valid object to remove.`));this.e.Qb()},Q.c=!1,L(CG,`AbstractTreeIterator`,697),q(605,697,RG,fm),Q._i=function(e){var t=P(e,57).Dh().Jc();return j(t,287)&&P(t,287).ul(new xo),t},L(MG,`ElkGraphUtil/PropertiesSkippingTreeIterator`,605),q(949,1,{},xo),L(MG,`ElkGraphUtil/PropertiesSkippingTreeIterator/1`,949);var p7,m7,h7=L(MG,`ElkReflect`,null);q(883,1,gW,So),Q.Qg=function(e){return Ox(),ZPe(P(e,182))},L(MG,`ElkReflect/lambda$0$Type`,883);var g7;g_(CG,`ResourceLocator`),q(1046,1,{}),L(CG,`DelegatingResourceLocator`,1046),q(1047,1046,{}),L(`org.eclipse.emf.common`,`EMFPlugin`,1047);var _7=g_($yt,`Adapter`),yBt=g_($yt,`Notification`);q(1144,1,eK),Q.aj=function(){return this.d},Q.bj=function(e){},Q.cj=function(e){this.d=e},Q.dj=function(e){this.d==e&&(this.d=null)},Q.d=null,L(KW,`AdapterImpl`,1144),q(2058,71,ebt),Q.Ci=function(e,t){return xXe(this,e,t)},Q.Di=function(e){var t,n,r;if(++this.j,e.dc())return!1;for(t=this.Cj(),r=e.Jc();r.Ob();)n=r.Pb(),this.pj(this.Xi(t,n)),++t;return!0},Q.Ei=function(e,t){zSe(this,e,t)},Q.Fi=function(e){vAe(this,e)},Q.nj=function(){return this.qj()},Q.$b=function(){qh(this,this.Cj(),this.Dj())},Q.Gc=function(e){return this.sj(e)},Q.Hc=function(e){return this.tj(e)},Q.oj=function(e,t){this.zj().Sm()},Q.pj=function(e){this.zj().Sm()},Q.qj=function(){return this.zj()},Q.rj=function(){this.zj().Sm()},Q.sj=function(e){return this.zj().Sm()},Q.tj=function(e){return this.zj().Sm()},Q.uj=function(e){return this.zj().Sm()},Q.vj=function(e){return this.zj().Sm()},Q.wj=function(){return this.zj().Sm()},Q.xj=function(e){return this.zj().Sm()},Q.yj=function(){return this.zj().Sm()},Q.Aj=function(e){return this.zj().Sm()},Q.Bj=function(e,t){return this.zj().Sm()},Q.Cj=function(){return this.zj().Sm()},Q.Dj=function(){return this.zj().Sm()},Q.Ej=function(e){return this.zj().Sm()},Q.Fj=function(){return this.zj().Sm()},Q.Fb=function(e){return this.uj(e)},Q.Xb=function(e){return this.Ui(e,this.vj(e))},Q.Hb=function(){return this.wj()},Q.bd=function(e){return this.xj(e)},Q.dc=function(){return this.yj()},Q.Ri=function(e,t){return P3e(this,e,t)},Q.Ti=function(e){return this.vj(e)},Q.ed=function(e){return s_(this,e)},Q.Kc=function(e){var t=this.bd(e);return t>=0&&(this.ed(t),!0)},Q.Vi=function(e,t){return this.Bj(e,this.Xi(e,t))},Q.gc=function(){return this.Cj()},Q.Nc=function(){return this.Dj()},Q.Oc=function(e){return this.Ej(e)},Q.Ib=function(){return this.Fj()},L(CG,`DelegatingEList`,2058),q(2059,2058,ebt),Q.Ci=function(e,t){return bot(this,e,t)},Q.Di=function(e){return this.Ci(this.Cj(),e)},Q.Ei=function(e,t){$7e(this,e,t)},Q.Fi=function(e){D7e(this,e)},Q.Ji=function(){return!this.Kj()},Q.$b=function(){lL(this)},Q.Gj=function(e,t,n,r,i){return new gMe(this,e,t,n,r,i)},Q.Hj=function(e){SD(this.hj(),e)},Q.Ij=function(){return null},Q.Jj=function(){return-1},Q.hj=function(){return null},Q.Kj=function(){return!1},Q.Lj=function(e,t){return t},Q.Mj=function(e,t){return t},Q.Nj=function(){return!1},Q.Oj=function(){return!this.yj()},Q.Ri=function(e,t){var n,r;return this.Nj()?(r=this.Oj(),n=P3e(this,e,t),this.Hj(this.Gj(7,G(t),n,e,r)),n):P3e(this,e,t)},Q.ed=function(e){var t,n,r,i;return this.Nj()?(n=null,r=this.Oj(),t=this.Gj(4,i=s_(this,e),null,e,r),this.Kj()&&i&&(n=this.Mj(i,n)),n?(n.lj(t),n.mj()):this.Hj(t),i):(i=s_(this,e),this.Kj()&&i&&(n=this.Mj(i,null),n&&n.mj()),i)},Q.Vi=function(e,t){return xot(this,e,t)},L(KW,`DelegatingNotifyingListImpl`,2059),q(151,1,tK),Q.lj=function(e){return o4e(this,e)},Q.mj=function(){Bw(this)},Q.ej=function(){return this.d},Q.Ij=function(){return null},Q.Pj=function(){return null},Q.fj=function(e){return-1},Q.gj=function(){return Mnt(this)},Q.hj=function(){return null},Q.ij=function(){return EF(this)},Q.jj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},Q.Qj=function(){return!1},Q.kj=function(e){var t,n,r,i,a,o,s,c,l,u,d;switch(this.d){case 1:case 2:switch(i=e.ej(),i){case 1:case 2:if(a=e.hj(),A(a)===A(this.hj())&&this.fj(null)==e.fj(null))return this.g=e.gj(),e.ej()==1&&(this.d=1),!0}case 4:if(i=e.ej(),i===4&&(a=e.hj(),A(a)===A(this.hj())&&this.fj(null)==e.fj(null)))return l=Flt(this),c=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,o=e.jj(),this.d=6,d=new PT(2),c<=o?(fw(d,this.n),fw(d,e.ij()),this.g=U(O(q9,1),yz,30,15,[this.o=c,o+1])):(fw(d,e.ij()),fw(d,this.n),this.g=U(O(q9,1),yz,30,15,[this.o=o,c])),this.n=d,l||(this.o=-2-this.o-1),!0;break;case 6:if(i=e.ej(),i===4&&(a=e.hj(),A(a)===A(this.hj())&&this.fj(null)==e.fj(null))){for(l=Flt(this),o=e.jj(),u=P(this.g,54),r=V(q9,yz,30,u.length+1,15,1),t=0;t<u.length&&(s=u[t],s<=o);)r[t++]=s,++o;for(n=P(this.n,16),n._c(t,e.ij()),r[t]=o;++t<r.length;)r[t]=u[t-1];return this.g=r,l||(this.o=-2-r[0]),!0}}return!1},Q.Ib=function(){var e,t,n,r=new eh(tu(this.Pm)+`@`+(t=qE(this)>>>0,t.toString(16)));switch(r.a+=` (eventType: `,this.d){case 1:r.a+=`SET`;break;case 2:r.a+=`UNSET`;break;case 3:r.a+=`ADD`;break;case 5:r.a+=`ADD_MANY`;break;case 4:r.a+=`REMOVE`;break;case 6:r.a+=`REMOVE_MANY`;break;case 7:r.a+=`MOVE`;break;case 8:r.a+=`REMOVING_ADAPTER`;break;case 9:r.a+=`RESOLVE`;break;default:Ql(r,this.d)}if(Iit(this)&&(r.a+=`, touch: true`),r.a+=`, position: `,Ql(r,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),r.a+=`, notifier: `,Mp(r,this.hj()),r.a+=`, feature: `,Mp(r,this.Ij()),r.a+=`, oldValue: `,Mp(r,EF(this)),r.a+=`, newValue: `,this.d==6&&j(this.g,54)){for(n=P(this.g,54),r.a+=`[`,e=0;e<n.length;)r.a+=n[e],++e<n.length&&(r.a+=cR);r.a+=`]`}else Mp(r,Mnt(this));return r.a+=`, isTouch: `,$l(r,Iit(this)),r.a+=`, wasSet: `,$l(r,Flt(this)),r.a+=`)`,r.a},Q.d=0,Q.e=0,Q.f=0,Q.j=0,Q.k=0,Q.o=0,Q.p=0,L(KW,`NotificationImpl`,151),q(1158,151,tK,gMe),Q.Ij=function(){return this.a.Ij()},Q.fj=function(e){return this.a.Jj()},Q.hj=function(){return this.a.hj()},L(KW,`DelegatingNotifyingListImpl/1`,1158),q(252,67,LG,Co,ql),Q.Ec=function(e){return SXe(this,P(e,373))},Q.lj=function(e){return SXe(this,e)},Q.mj=function(){for(var e=0,t,n;e<this.i;++e)t=P(this.g[e],373),n=t.hj(),n!=null&&t.ej()!=-1&&P(n,94).uh(t)},Q.$i=function(e){return V(yBt,lR,373,e,0,1)},L(KW,`NotificationChainImpl`,252),q(1486,93,dyt),Q.rh=function(){return this.e},Q.th=function(){return!!(this.f&1)},Q.f=1,L(KW,`NotifierImpl`,1486),q(2056,67,LG),Q.Ci=function(e,t){return TI(this,e,t)},Q.Di=function(e){return this.Ci(this.i,e)},Q.Ei=function(e,t){O7e(this,e,t)},Q.Fi=function(e){DP(this,e)},Q.Ji=function(){return!this.Kj()},Q.$b=function(){cL(this)},Q.Gj=function(e,t,n,r,i){return new _Me(this,e,t,n,r,i)},Q.Hj=function(e){SD(this.hj(),e)},Q.Ij=function(){return null},Q.Jj=function(){return-1},Q.hj=function(){return null},Q.Kj=function(){return!1},Q.Rj=function(){return!1},Q.Lj=function(e,t){return t},Q.Mj=function(e,t){return t},Q.Nj=function(){return!1},Q.Oj=function(){return this.i!=0},Q.Ri=function(e,t){return Ik(this,e,t)},Q.ed=function(e){return jF(this,e)},Q.Vi=function(e,t){return xst(this,e,t)},Q.Sj=function(e,t){return t},Q.Tj=function(e,t){return t},Q.Uj=function(e,t,n){return n},L(KW,`NotifyingListImpl`,2056),q(1157,151,tK,_Me),Q.Ij=function(){return this.a.Ij()},Q.fj=function(e){return this.a.Jj()},Q.hj=function(){return this.a.hj()},L(KW,`NotifyingListImpl/1`,1157),q(950,67,LG,VSe),Q.Gc=function(e){return this.i>10?((!this.b||this.c.j!=this.a)&&(this.b=new y_(this),this.a=this.j),Su(this.b,e)):FM(this,e)},Q.Wi=function(){return!0},Q.a=0,L(CG,`AbstractEList/1`,950),q(306,99,Rz,pg),L(CG,`AbstractEList/BasicIndexOutOfBoundsException`,306),q(42,1,gR,Jm),Q.Nb=function(e){jv(this,e)},Q.Vj=function(){if(this.i.j!=this.f)throw E(new rc)},Q.Wj=function(){return yj(this)},Q.Ob=function(){return this.e!=this.i.gc()},Q.Pb=function(){return this.Wj()},Q.Qb=function(){VM(this)},Q.e=0,Q.f=0,Q.g=-1,L(CG,`AbstractEList/EIterator`,42),q(286,42,wR,_h,Wv),Q.Qb=function(){VM(this)},Q.Rb=function(e){qXe(this,e)},Q.Xj=function(){var e;try{return e=this.d.Xb(--this.e),this.Vj(),this.g=this.e,e}catch(e){throw e=eO(e),j(e,99)?(this.Vj(),E(new cc)):E(e)}},Q.Yj=function(e){G$e(this,e)},Q.Sb=function(){return this.e!=0},Q.Tb=function(){return this.e},Q.Ub=function(){return this.Xj()},Q.Vb=function(){return this.e-1},Q.Wb=function(e){this.Yj(e)},L(CG,`AbstractEList/EListIterator`,286),q(355,42,gR,vh),Q.Wj=function(){return bj(this)},Q.Qb=function(){throw E(new sc)},L(CG,`AbstractEList/NonResolvingEIterator`,355),q(391,286,wR,yh,$Ce),Q.Rb=function(e){throw E(new sc)},Q.Wj=function(){var e;try{return e=this.c.Ti(this.e),this.Vj(),this.g=this.e++,e}catch(e){throw e=eO(e),j(e,99)?(this.Vj(),E(new cc)):E(e)}},Q.Xj=function(){var e;try{return e=this.c.Ti(--this.e),this.Vj(),this.g=this.e,e}catch(e){throw e=eO(e),j(e,99)?(this.Vj(),E(new cc)):E(e)}},Q.Qb=function(){throw E(new sc)},Q.Wb=function(e){throw E(new sc)},L(CG,`AbstractEList/NonResolvingEListIterator`,391),q(2045,71,tbt),Q.Ci=function(e,t){var n,r,i=t.gc(),a,o,s,c,l,u,d,f;if(i!=0){for(l=P(AD(this.a,4),129),u=l==null?0:l.length,f=u+i,r=PO(this,f),d=u-e,d>0&&EI(l,e,r,e+i,d),c=t.Jc(),o=0;o<i;++o)s=c.Pb(),n=e+o,vm(r,n,OO(this,s));for(Cj(this,r),a=0;a<i;++a)s=r[e],this.Ki(e,s),++e;return!0}return++this.j,!1},Q.Di=function(e){var t,n,r=e.gc(),i,a,o,s,c,l;if(r!=0){for(c=(n=P(AD(this.a,4),129),n==null?0:n.length),l=c+r,t=PO(this,l),s=e.Jc(),a=c;a<l;++a)o=s.Pb(),vm(t,a,OO(this,o));for(Cj(this,t),i=c;i<l;++i)o=t[i],this.Ki(i,o);return!0}return++this.j,!1},Q.Ei=function(e,t){var n,r=P(AD(this.a,4),129),i=r==null?0:r.length,a;n=PO(this,i+1),a=OO(this,t),e!=i&&EI(r,e,n,e+1,i-e),ly(n,e,a),Cj(this,n),this.Ki(e,t)},Q.Fi=function(e){var t,n,r=(n=P(AD(this.a,4),129),n==null?0:n.length);t=PO(this,r+1),vm(t,r,OO(this,e)),Cj(this,t),this.Ki(r,e)},Q.Gi=function(){return new DRe(this)},Q.Hi=function(){return new gke(this)},Q.Ii=function(e){var t,n=(t=P(AD(this.a,4),129),t==null?0:t.length);if(e<0||e>n)throw E(new pg(e,n));return new UAe(this,e)},Q.$b=function(){var e,t;++this.j,e=P(AD(this.a,4),129),t=e==null?0:e.length,Cj(this,null),QC(this,t,e)},Q.Gc=function(e){var t=P(AD(this.a,4),129),n,r,i,a;if(t!=null){if(e!=null){for(r=t,i=0,a=r.length;i<a;++i)if(n=r[i],yk(e,n))return!0}else for(r=t,i=0,a=r.length;i<a;++i)if(n=r[i],A(n)===A(e))return!0}return!1},Q.Xb=function(e){var t=P(AD(this.a,4),129),n=t==null?0:t.length;if(e>=n)throw E(new pg(e,n));return t[e]},Q.bd=function(e){var t=P(AD(this.a,4),129),n,r;if(t!=null){if(e!=null){for(n=0,r=t.length;n<r;++n)if(yk(e,t[n]))return n}else for(n=0,r=t.length;n<r;++n)if(A(t[n])===A(e))return n}return-1},Q.dc=function(){return P(AD(this.a,4),129)==null},Q.Jc=function(){return new ERe(this)},Q.cd=function(){return new hke(this)},Q.dd=function(e){var t,n=(t=P(AD(this.a,4),129),t==null?0:t.length);if(e<0||e>n)throw E(new pg(e,n));return new HAe(this,e)},Q.Ri=function(e,t){var n=sZe(this),r,i=n==null?0:n.length;if(e>=i)throw E(new Hc(PG+e+FG+i));if(t>=i)throw E(new Hc(IG+t+FG+i));return r=n[t],e!=t&&(e<t?EI(n,e,n,e+1,t-e):EI(n,t+1,n,t,e-t),ly(n,e,r),Cj(this,n)),r},Q.Ti=function(e){return P(AD(this.a,4),129)[e]},Q.ed=function(e){return g7e(this,e)},Q.Vi=function(e,t){var n=sZe(this),r=n[e];return vm(n,e,OO(this,t)),Cj(this,n),r},Q.gc=function(){var e=P(AD(this.a,4),129);return e==null?0:e.length},Q.Nc=function(){var e=P(AD(this.a,4),129),t,n=e==null?0:e.length;return t=V(_7,rK,415,n,0,1),n>0&&EI(e,0,t,0,n),t},Q.Oc=function(e){var t=P(AD(this.a,4),129),n,r=t==null?0:t.length;return r>0&&(e.length<r&&(n=uE(FO(e).c,r),e=n),EI(t,0,e,0,r)),e.length>r&&ly(e,r,null),e};var bBt;L(CG,`ArrayDelegatingEList`,2045),q(1033,42,gR,ERe),Q.Vj=function(){if(this.b.j!=this.f||A(P(AD(this.b.a,4),129))!==A(this.a))throw E(new rc)},Q.Qb=function(){VM(this),this.a=P(AD(this.b.a,4),129)},L(CG,`ArrayDelegatingEList/EIterator`,1033),q(712,286,wR,hke,HAe),Q.Vj=function(){if(this.b.j!=this.f||A(P(AD(this.b.a,4),129))!==A(this.a))throw E(new rc)},Q.Yj=function(e){G$e(this,e),this.a=P(AD(this.b.a,4),129)},Q.Qb=function(){VM(this),this.a=P(AD(this.b.a,4),129)},L(CG,`ArrayDelegatingEList/EListIterator`,712),q(1034,355,gR,DRe),Q.Vj=function(){if(this.b.j!=this.f||A(P(AD(this.b.a,4),129))!==A(this.a))throw E(new rc)},L(CG,`ArrayDelegatingEList/NonResolvingEIterator`,1034),q(713,391,wR,gke,UAe),Q.Vj=function(){if(this.b.j!=this.f||A(P(AD(this.b.a,4),129))!==A(this.a))throw E(new rc)},L(CG,`ArrayDelegatingEList/NonResolvingEListIterator`,713),q(606,306,Rz,Hp),L(CG,`BasicEList/BasicIndexOutOfBoundsException`,606),q(699,67,LG,z_e),Q._c=function(e,t){throw E(new sc)},Q.Ec=function(e){throw E(new sc)},Q.ad=function(e,t){throw E(new sc)},Q.Fc=function(e){throw E(new sc)},Q.$b=function(){throw E(new sc)},Q.Zi=function(e){throw E(new sc)},Q.Jc=function(){return this.Gi()},Q.cd=function(){return this.Hi()},Q.dd=function(e){return this.Ii(e)},Q.Ri=function(e,t){throw E(new sc)},Q.Si=function(e,t){throw E(new sc)},Q.ed=function(e){throw E(new sc)},Q.Kc=function(e){throw E(new sc)},Q.fd=function(e,t){throw E(new sc)},L(CG,`BasicEList/UnmodifiableEList`,699),q(711,1,{3:1,20:1,18:1,16:1,61:1,587:1}),Q._c=function(e,t){Kye(this,e,P(t,45))},Q.Ec=function(e){return Qxe(this,P(e,45))},Q.Ic=function(e){QS(this,e)},Q.Xb=function(e){return P(H(this.c,e),136)},Q.Ri=function(e,t){return P(this.c.Ri(e,t),45)},Q.Si=function(e,t){qye(this,e,P(t,45))},Q.ed=function(e){return P(this.c.ed(e),45)},Q.fd=function(e,t){return qke(this,e,P(t,45))},Q.gd=function(e){eD(this,e)},Q.Lc=function(){return new Vx(this,16)},Q.Mc=function(){return new b_(null,new Vx(this,16))},Q.ad=function(e,t){return this.c.ad(e,t)},Q.Fc=function(e){return this.c.Fc(e)},Q.$b=function(){this.c.$b()},Q.Gc=function(e){return this.c.Gc(e)},Q.Hc=function(e){return $D(this.c,e)},Q.Zj=function(){var e,t,n;if(this.d==null){for(this.d=V(_Bt,iK,67,2*this.f+1,0,1),n=this.e,this.f=0,t=this.c.Jc();t.e!=t.i.gc();)e=P(t.Wj(),136),Wj(this,e);this.e=n}},Q.Fb=function(e){return dwe(this,e)},Q.Hb=function(){return IGe(this.c)},Q.bd=function(e){return this.c.bd(e)},Q.$j=function(){this.c=new Bue(this)},Q.dc=function(){return this.f==0},Q.Jc=function(){return this.c.Jc()},Q.cd=function(){return this.c.cd()},Q.dd=function(e){return this.c.dd(e)},Q._j=function(){return XC(this)},Q.ak=function(e,t,n){return new MEe(e,t,n)},Q.bk=function(){return new Xne},Q.Kc=function(e){return JHe(this,e)},Q.gc=function(){return this.f},Q.hd=function(e,t){return new Bx(this.c,e,t)},Q.Nc=function(){return this.c.Nc()},Q.Oc=function(e){return this.c.Oc(e)},Q.Ib=function(){return rXe(this.c)},Q.e=0,Q.f=0,L(CG,`BasicEMap`,711),q(1028,67,LG,Bue),Q.Ki=function(e,t){Ode(this,P(t,136))},Q.Ni=function(e,t,n){var r;++(r=this,P(t,136),r).a.e},Q.Oi=function(e,t){kde(this,P(t,136))},Q.Pi=function(e,t,n){gxe(this,P(t,136),P(n,136))},Q.Mi=function(e,t){QWe(this.a)},L(CG,`BasicEMap/1`,1028),q(1029,67,LG,Xne),Q.$i=function(e){return V(xBt,nbt,612,e,0,1)},L(CG,`BasicEMap/2`,1029),q(1030,bR,xR,Vue),Q.$b=function(){this.a.c.$b()},Q.Gc=function(e){return OA(this.a,e)},Q.Jc=function(){return this.a.f==0?(Yh(),v7.a):new eme(this.a)},Q.Kc=function(e){var t=this.a.f;return XA(this.a,e),this.a.f!=t},Q.gc=function(){return this.a.f},L(CG,`BasicEMap/3`,1030),q(1031,31,yR,Hue),Q.$b=function(){this.a.c.$b()},Q.Gc=function(e){return krt(this.a,e)},Q.Jc=function(){return this.a.f==0?(Yh(),v7.a):new tme(this.a)},Q.gc=function(){return this.a.f},L(CG,`BasicEMap/4`,1031),q(1032,bR,xR,Uue),Q.$b=function(){this.a.c.$b()},Q.Gc=function(e){var t,n,r,i,a,o,s,c,l;if(this.a.f>0&&j(e,45)&&(this.a.Zj(),c=P(e,45),s=c.jd(),i=s==null?0:qE(s),a=YSe(this.a,i),t=this.a.d[a],t)){for(n=P(t.g,374),l=t.i,o=0;o<l;++o)if(r=n[o],r.yi()==i&&r.Fb(c))return!0}return!1},Q.Jc=function(){return this.a.f==0?(Yh(),v7.a):new bb(this.a)},Q.Kc=function(e){return p9e(this,e)},Q.gc=function(){return this.a.f},L(CG,`BasicEMap/5`,1032),q(613,1,gR,bb),Q.Nb=function(e){jv(this,e)},Q.Ob=function(){return this.b!=-1},Q.Pb=function(){var e;if(this.f.e!=this.c)throw E(new rc);if(this.b==-1)throw E(new cc);return this.d=this.a,this.e=this.b,J0e(this),e=P(this.f.d[this.d].g[this.e],136),this.ck(e)},Q.Qb=function(){if(this.f.e!=this.c)throw E(new rc);if(this.e==-1)throw E(new ac);this.f.c.Kc(H(this.f.d[this.d],this.e)),this.c=this.f.e,this.e=-1,this.a==this.d&&this.b!=-1&&--this.b},Q.ck=function(e){return e},Q.a=0,Q.b=-1,Q.c=0,Q.d=0,Q.e=0,L(CG,`BasicEMap/BasicEMapIterator`,613),q(1026,613,gR,eme),Q.ck=function(e){return e.jd()},L(CG,`BasicEMap/BasicEMapKeyIterator`,1026),q(1027,613,gR,tme),Q.ck=function(e){return e.kd()},L(CG,`BasicEMap/BasicEMapValueIterator`,1027),q(1025,1,vR,Wue),Q.wc=function(e){_D(this,e)},Q.$b=function(){this.a.c.$b()},Q._b=function(e){return q_e(this,e)},Q.uc=function(e){return krt(this.a,e)},Q.vc=function(){return Nze(this.a)},Q.Fb=function(e){return dwe(this.a,e)},Q.xc=function(e){return MA(this.a,e)},Q.Hb=function(){return IGe(this.a.c)},Q.dc=function(){return this.a.f==0},Q.ec=function(){return Pze(this.a)},Q.yc=function(e,t){return PM(this.a,e,t)},Q.Ac=function(e){return XA(this.a,e)},Q.gc=function(){return this.a.f},Q.Ib=function(){return rXe(this.a.c)},Q.Bc=function(){return Fze(this.a)},L(CG,`BasicEMap/DelegatingMap`,1025),q(612,1,{45:1,136:1,612:1},MEe),Q.Fb=function(e){var t;return j(e,45)?(t=P(e,45),(this.b==null?A(this.b)===A(t.jd()):yk(this.b,t.jd()))&&(this.c==null?A(this.c)===A(t.kd()):yk(this.c,t.kd()))):!1},Q.yi=function(){return this.a},Q.jd=function(){return this.b},Q.kd=function(){return this.c},Q.Hb=function(){return this.a^(this.c==null?0:qE(this.c))},Q.zi=function(e){this.a=e},Q.Ai=function(e){throw E(new Ys)},Q.ld=function(e){var t=this.c;return this.c=e,t},Q.Ib=function(){return this.b+`->`+this.c},Q.a=0;var xBt=L(CG,`BasicEMap/EntryImpl`,612);q(535,1,{},wo),L(CG,`BasicEMap/View`,535);var v7;q(770,1,{}),Q.Fb=function(e){return v9e((Cb(),RJ),e)},Q.Hb=function(){return AKe((Cb(),RJ))},Q.Ib=function(){return _N((Cb(),RJ))},L(CG,`ECollections/BasicEmptyUnmodifiableEList`,770),q(1303,1,wR,Yne),Q.Nb=function(e){jv(this,e)},Q.Rb=function(e){throw E(new sc)},Q.Ob=function(){return!1},Q.Sb=function(){return!1},Q.Pb=function(){throw E(new cc)},Q.Tb=function(){return 0},Q.Ub=function(){throw E(new cc)},Q.Vb=function(){return-1},Q.Qb=function(){throw E(new sc)},Q.Wb=function(e){throw E(new sc)},L(CG,`ECollections/BasicEmptyUnmodifiableEList/1`,1303),q(1301,770,{20:1,18:1,16:1,61:1},cfe),Q._c=function(e,t){Ime()},Q.Ec=function(e){return Fme()},Q.ad=function(e,t){return Lme()},Q.Fc=function(e){return Rme()},Q.$b=function(){zme()},Q.Gc=function(e){return!1},Q.Hc=function(e){return!1},Q.Ic=function(e){QS(this,e)},Q.Xb=function(e){return rve((Cb(),e)),null},Q.bd=function(e){return-1},Q.dc=function(){return!0},Q.Jc=function(){return this.a},Q.cd=function(){return this.a},Q.dd=function(e){return this.a},Q.Ri=function(e,t){return Bme()},Q.Si=function(e,t){Vme()},Q.ed=function(e){return Hme()},Q.Kc=function(e){return Ume()},Q.fd=function(e,t){return Wme()},Q.gc=function(){return 0},Q.gd=function(e){eD(this,e)},Q.Lc=function(){return new Vx(this,16)},Q.Mc=function(){return new b_(null,new Vx(this,16))},Q.hd=function(e,t){return Cb(),new Bx(RJ,e,t)},Q.Nc=function(){return nv((Cb(),RJ))},Q.Oc=function(e){return Cb(),eM(RJ,e)},L(CG,`ECollections/EmptyUnmodifiableEList`,1301),q(1302,770,{20:1,18:1,16:1,61:1,587:1},lfe),Q._c=function(e,t){Ime()},Q.Ec=function(e){return Fme()},Q.ad=function(e,t){return Lme()},Q.Fc=function(e){return Rme()},Q.$b=function(){zme()},Q.Gc=function(e){return!1},Q.Hc=function(e){return!1},Q.Ic=function(e){QS(this,e)},Q.Xb=function(e){return rve((Cb(),e)),null},Q.bd=function(e){return-1},Q.dc=function(){return!0},Q.Jc=function(){return this.a},Q.cd=function(){return this.a},Q.dd=function(e){return this.a},Q.Ri=function(e,t){return Bme()},Q.Si=function(e,t){Vme()},Q.ed=function(e){return Hme()},Q.Kc=function(e){return Ume()},Q.fd=function(e,t){return Wme()},Q.gc=function(){return 0},Q.gd=function(e){eD(this,e)},Q.Lc=function(){return new Vx(this,16)},Q.Mc=function(){return new b_(null,new Vx(this,16))},Q.hd=function(e,t){return Cb(),new Bx(RJ,e,t)},Q.Nc=function(){return nv((Cb(),RJ))},Q.Oc=function(e){return Cb(),eM(RJ,e)},Q._j=function(){return Cb(),Cb(),zJ},L(CG,`ECollections/EmptyUnmodifiableEMap`,1302);var SBt=g_(CG,`Enumerator`),y7;q(290,1,{290:1},GF),Q.Fb=function(e){var t;return this===e?!0:j(e,290)?(t=P(e,290),this.f==t.f&&wOe(this.i,t.i)&&w_(this.a,this.f&256?t.f&256?t.a:null:t.f&256?null:t.a)&&w_(this.d,t.d)&&w_(this.g,t.g)&&w_(this.e,t.e)&&MQe(this,t)):!1},Q.Hb=function(){return this.f},Q.Ib=function(){return Wat(this)},Q.f=0;var CBt=0,wBt=0,TBt=0,EBt=0,DBt=0,OBt=0,kBt=0,ABt=0,jBt=0,MBt,b7=0,x7=0,NBt=0,PBt=0,S7,FBt;L(CG,`URI`,290),q(1091,44,eB,ufe),Q.yc=function(e,t){return P(Tx(this,Vh(e),P(t,290)),290)},L(CG,`URI/URICache`,1091),q(492,67,LG,To,O_),Q.Qi=function(){return!0},L(CG,`UniqueEList`,492),q(579,63,XR,tT),L(CG,`WrappedException`,579);var C7=g_(BW,abt),w7=g_(BW,obt),T7=g_(BW,sbt),E7=g_(BW,cbt),D7=g_(BW,lbt),O7=g_(BW,`EClass`),k7=g_(BW,`EDataType`),IBt;q(1199,44,eB,dfe),Q.xc=function(e){return Cp(e)?ix(this,e):Tp(L_(this.f,e))},L(BW,`EDataType/Internal/ConversionDelegate/Factory/Registry/Impl`,1199);var A7=g_(BW,`EEnum`),j7=g_(BW,ubt),M7=g_(BW,dbt),N7=g_(BW,fbt),P7,F7=g_(BW,pbt),I7=g_(BW,mbt);q(aK,1,{},Eo),Q.Ib=function(){return`NIL`},L(BW,`EStructuralFeature/Internal/DynamicValueHolder/1`,aK);var LBt;q(1023,44,eB,ffe),Q.xc=function(e){return Cp(e)?ix(this,e):Tp(L_(this.f,e))},L(BW,`EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl`,1023);var L7=g_(BW,hbt),R7=g_(BW,`EValidator/PatternMatcher`),RBt,zBt,z7,B7,V7,H7,BBt,VBt,HBt,U7,W7,G7,K7,q7,UBt,WBt,J7,Y7,GBt,X7,Z7,Q7,$7,KBt,qBt,e9,t9=g_(oK,`FeatureMap/Entry`);q(534,1,{75:1},yp),Q.Jk=function(){return this.a},Q.kd=function(){return this.b},L(ZW,`BasicEObjectImpl/1`,534),q(1022,1,sK,R_e),Q.Dk=function(e){return yC(this.a,this.b,e)},Q.Oj=function(){return yNe(this.a,this.b)},Q.Wb=function(e){sNe(this.a,this.b,e)},Q.Ek=function(){NAe(this.a,this.b)},L(ZW,`BasicEObjectImpl/4`,1022),q(2046,1,{114:1}),Q.Kk=function(e){this.e=e==0?JBt:V(Oq,lR,1,e,5,1)},Q.ii=function(e){return this.e[e]},Q.ji=function(e,t){this.e[e]=t},Q.ki=function(e){this.e[e]=null},Q.Lk=function(){return this.c},Q.Mk=function(){throw E(new sc)},Q.Nk=function(){throw E(new sc)},Q.Ok=function(){return this.d},Q.Pk=function(){return this.e!=null},Q.Qk=function(e){this.c=e},Q.Rk=function(e){throw E(new sc)},Q.Sk=function(e){throw E(new sc)},Q.Tk=function(e){this.d=e};var JBt;L(ZW,`BasicEObjectImpl/EPropertiesHolderBaseImpl`,2046),q(192,2046,{114:1},Jo),Q.Mk=function(){return this.a},Q.Nk=function(){return this.b},Q.Rk=function(e){this.a=e},Q.Sk=function(e){this.b=e},L(ZW,`BasicEObjectImpl/EPropertiesHolderImpl`,192),q(502,100,hyt,Do),Q.rh=function(){return this.f},Q.wh=function(){return this.k},Q.yh=function(e,t){this.g=e,this.i=t},Q.Ah=function(){return this.j&2?this.Xh().Lk():this.fi()},Q.Ch=function(){return this.i},Q.th=function(){return!!(this.j&1)},Q.Mh=function(){return this.g},Q.Sh=function(){return!!(this.j&4)},Q.Xh=function(){return!this.k&&(this.k=new Jo),this.k},Q._h=function(e){this.Xh().Qk(e),e?this.j|=2:this.j&=-3},Q.bi=function(e){this.Xh().Sk(e),e?this.j|=4:this.j&=-5},Q.fi=function(){return(Zv(),z7).S},Q.i=0,Q.j=1,L(ZW,`EObjectImpl`,502),q(786,502,{109:1,94:1,93:1,57:1,114:1,52:1,100:1},gDe),Q.ii=function(e){return this.e[e]},Q.ji=function(e,t){this.e[e]=t},Q.ki=function(e){this.e[e]=null},Q.Ah=function(){return this.d},Q.Fh=function(e){return wA(this.d,e)},Q.Hh=function(){return this.d},Q.Lh=function(){return this.e!=null},Q.Xh=function(){return!this.k&&(this.k=new Oo),this.k},Q._h=function(e){this.d=e},Q.ei=function(){var e;return this.e??=(e=Qv(this.d),e==0?YBt:V(Oq,lR,1,e,5,1)),this},Q.gi=function(){return 0};var YBt;L(ZW,`DynamicEObjectImpl`,786),q(1484,786,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1},qDe),Q.Fb=function(e){return this===e},Q.Hb=function(){return lh(this)},Q._h=function(e){this.d=e,this.b=dF(e,`key`),this.c=dF(e,cG)},Q.yi=function(){var e;return this.a==-1&&(e=cT(this,this.b),this.a=e==null?0:qE(e)),this.a},Q.jd=function(){return cT(this,this.b)},Q.kd=function(){return cT(this,this.c)},Q.zi=function(e){this.a=e},Q.Ai=function(e){sNe(this,this.b,e)},Q.ld=function(e){var t=cT(this,this.c);return sNe(this,this.c,e),t},Q.a=0,L(ZW,`DynamicEObjectImpl/BasicEMapEntry`,1484),q(1485,1,{114:1},Oo),Q.Kk=function(e){throw E(new sc)},Q.ii=function(e){throw E(new sc)},Q.ji=function(e,t){throw E(new sc)},Q.ki=function(e){throw E(new sc)},Q.Lk=function(){throw E(new sc)},Q.Mk=function(){return this.a},Q.Nk=function(){return this.b},Q.Ok=function(){return this.c},Q.Pk=function(){throw E(new sc)},Q.Qk=function(e){throw E(new sc)},Q.Rk=function(e){this.a=e},Q.Sk=function(e){this.b=e},Q.Tk=function(e){this.c=e},L(ZW,`DynamicEObjectImpl/DynamicEPropertiesHolderImpl`,1485),q(505,161,{109:1,94:1,93:1,588:1,158:1,57:1,114:1,52:1,100:1,505:1,161:1,117:1,118:1},ko),Q.xh=function(e){return s0e(this,e)},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.d;case 2:return n?(!this.b&&(this.b=new Ih((YL(),$7),o9,this)),this.b):(!this.b&&(this.b=new Ih((YL(),$7),o9,this)),XC(this.b));case 3:return NNe(this);case 4:return!this.a&&(this.a=new Wm(R5,this,4)),this.a;case 5:return!this.c&&(this.c=new Km(R5,this,5)),this.c}return Ow(this,e-Qv((YL(),B7)),OT((r=P(AD(this,16),29),r||B7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 3:return this.Cb&&(n=(i=this.Db>>16,i>=0?s0e(this,n):this.Cb.Qh(this,-1-i,null,n))),G_(this,P(e,158),n)}return a=P(OT((r=P(AD(this,16),29),r||(YL(),B7)),t),69),a.uk().xk(this,QA(this),t-Qv((YL(),B7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 2:return!this.b&&(this.b=new Ih((YL(),$7),o9,this)),gg(this.b,e,n);case 3:return G_(this,null,n);case 4:return!this.a&&(this.a=new Wm(R5,this,4)),kj(this.a,e,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),B7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),B7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return!!this.b&&this.b.f!=0;case 3:return!!NNe(this);case 4:return!!this.a&&this.a.i!=0;case 5:return!!this.c&&this.c.i!=0}return wS(this,e-Qv((YL(),B7)),OT((t=P(AD(this,16),29),t||B7),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:nOe(this,Vh(t));return;case 2:!this.b&&(this.b=new Ih((YL(),$7),o9,this)),gD(this.b,t);return;case 3:Rtt(this,P(t,158));return;case 4:!this.a&&(this.a=new Wm(R5,this,4)),cL(this.a),!this.a&&(this.a=new Wm(R5,this,4)),$v(this.a,P(t,18));return;case 5:!this.c&&(this.c=new Km(R5,this,5)),cL(this.c),!this.c&&(this.c=new Km(R5,this,5)),$v(this.c,P(t,18));return}lA(this,e-Qv((YL(),B7)),OT((n=P(AD(this,16),29),n||B7),e),t)},Q.fi=function(){return YL(),B7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:CUe(this,null);return;case 2:!this.b&&(this.b=new Ih((YL(),$7),o9,this)),this.b.c.$b();return;case 3:Rtt(this,null);return;case 4:!this.a&&(this.a=new Wm(R5,this,4)),cL(this.a);return;case 5:!this.c&&(this.c=new Km(R5,this,5)),cL(this.c);return}xk(this,e-Qv((YL(),B7)),OT((t=P(AD(this,16),29),t||B7),e))},Q.Ib=function(){return VJe(this)},Q.d=null,L(ZW,`EAnnotationImpl`,505),q(142,711,cK,_w),Q.Ei=function(e,t){uye(this,e,P(t,45))},Q.Uk=function(e,t){return owe(this,P(e,45),t)},Q.Yi=function(e){return P(P(this.c,72).Yi(e),136)},Q.Gi=function(){return P(this.c,72).Gi()},Q.Hi=function(){return P(this.c,72).Hi()},Q.Ii=function(e){return P(this.c,72).Ii(e)},Q.Vk=function(e,t){return gg(this,e,t)},Q.Dk=function(e){return P(this.c,78).Dk(e)},Q.$j=function(){},Q.Oj=function(){return P(this.c,78).Oj()},Q.ak=function(e,t,n){var r=P(KT(this.b).ti().pi(this.b),136);return r.zi(e),r.Ai(t),r.ld(n),r},Q.bk=function(){return new ede(this)},Q.Wb=function(e){gD(this,e)},Q.Ek=function(){P(this.c,78).Ek()},L(oK,`EcoreEMap`,142),q(169,142,cK,Ih),Q.Zj=function(){var e,t,n,r,i,a;if(this.d==null){for(a=V(_Bt,iK,67,2*this.f+1,0,1),n=this.c.Jc();n.e!=n.i.gc();)t=P(n.Wj(),136),r=t.yi(),i=(r&iR)%a.length,e=a[i],!e&&(e=a[i]=new ede(this)),e.Ec(t);this.d=a}},L(ZW,`EAnnotationImpl/1`,169),q(293,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,470:1,52:1,100:1,161:1,293:1,117:1,118:1}),Q.Ih=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return ih(),!!(this.Bb&256);case 3:return ih(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return ih(),!!this.Hk();case 7:return ih(),i=this.s,i>=1;case 8:return t?OM(this):this.r;case 9:return this.q}return Ow(this,e-Qv(this.fi()),OT((r=P(AD(this,16),29),r||this.fi()),e),t,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 9:return ey(this,n)}return i=P(OT((r=P(AD(this,16),29),r||this.fi()),t),69),i.uk().yk(this,QA(this),t-Qv(this.fi()),e,n)},Q.Th=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&xy(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&xy(this.q).i==0)}return wS(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:this.ri(Vh(t));return;case 2:Sk(this,Zc(Bh(t)));return;case 3:Ck(this,Zc(Bh(t)));return;case 4:sE(this,P(t,15).a);return;case 5:this.Xk(P(t,15).a);return;case 8:ek(this,P(t,143));return;case 9:r=oN(this,P(t,87),null),r&&r.mj();return}lA(this,e-Qv(this.fi()),OT((n=P(AD(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return YL(),qBt},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:this.ri(null);return;case 2:Sk(this,!0);return;case 3:Ck(this,!0);return;case 4:sE(this,0);return;case 5:this.Xk(1);return;case 8:ek(this,null);return;case 9:n=oN(this,null,null),n&&n.mj();return}xk(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.mi=function(){OM(this),this.Bb|=1},Q.Fk=function(){return OM(this)},Q.Gk=function(){return this.t},Q.Hk=function(){var e=this.t;return e>1||e==-1},Q.Qi=function(){return!!(this.Bb&512)},Q.Wk=function(e,t){return kJe(this,e,t)},Q.Xk=function(e){cE(this,e)},Q.Ib=function(){return M7e(this)},Q.s=0,Q.t=1,L(ZW,`ETypedElementImpl`,293),q(451,293,{109:1,94:1,93:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,451:1,293:1,117:1,118:1,682:1}),Q.xh=function(e){return A1e(this,e)},Q.Ih=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return ih(),!!(this.Bb&256);case 3:return ih(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return ih(),!!this.Hk();case 7:return ih(),i=this.s,i>=1;case 8:return t?OM(this):this.r;case 9:return this.q;case 10:return ih(),(this.Bb&aK)!=0;case 11:return ih(),(this.Bb&QW)!=0;case 12:return ih(),(this.Bb&Hz)!=0;case 13:return this.j;case 14:return $P(this);case 15:return ih(),(this.Bb&lK)!=0;case 16:return ih(),(this.Bb&ER)!=0;case 17:return bx(this)}return Ow(this,e-Qv(this.fi()),OT((r=P(AD(this,16),29),r||this.fi()),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 17:return this.Cb&&(n=(i=this.Db>>16,i>=0?A1e(this,n):this.Cb.Qh(this,-1-i,null,n))),vI(this,e,17,n)}return a=P(OT((r=P(AD(this,16),29),r||this.fi()),t),69),a.uk().xk(this,QA(this),t-Qv(this.fi()),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 9:return ey(this,n);case 17:return vI(this,null,17,n)}return i=P(OT((r=P(AD(this,16),29),r||this.fi()),t),69),i.uk().yk(this,QA(this),t-Qv(this.fi()),e,n)},Q.Th=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.Hk();case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&xy(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&xy(this.q).i==0);case 10:return(this.Bb&aK)==0;case 11:return(this.Bb&QW)!=0;case 12:return(this.Bb&Hz)!=0;case 13:return this.j!=null;case 14:return $P(this)!=null;case 15:return(this.Bb&lK)!=0;case 16:return(this.Bb&ER)!=0;case 17:return!!bx(this)}return wS(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:Ix(this,Vh(t));return;case 2:Sk(this,Zc(Bh(t)));return;case 3:Ck(this,Zc(Bh(t)));return;case 4:sE(this,P(t,15).a);return;case 5:this.Xk(P(t,15).a);return;case 8:ek(this,P(t,143));return;case 9:r=oN(this,P(t,87),null),r&&r.mj();return;case 10:zk(this,Zc(Bh(t)));return;case 11:Vk(this,Zc(Bh(t)));return;case 12:Bk(this,Zc(Bh(t)));return;case 13:G_e(this,Vh(t));return;case 15:Rk(this,Zc(Bh(t)));return;case 16:nA(this,Zc(Bh(t)));return}lA(this,e-Qv(this.fi()),OT((n=P(AD(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return YL(),KBt},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:j(this.Cb,88)&&eP(sC(P(this.Cb,88)),4),YE(this,null);return;case 2:Sk(this,!0);return;case 3:Ck(this,!0);return;case 4:sE(this,0);return;case 5:this.Xk(1);return;case 8:ek(this,null);return;case 9:n=oN(this,null,null),n&&n.mj();return;case 10:zk(this,!0);return;case 11:Vk(this,!1);return;case 12:Bk(this,!1);return;case 13:this.i=null,NE(this,null);return;case 15:Rk(this,!1);return;case 16:nA(this,!1);return}xk(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.mi=function(){nb(Xw((zN(),l9),this)),OM(this),this.Bb|=1},Q.nk=function(){return this.f},Q.gk=function(){return $P(this)},Q.ok=function(){return bx(this)},Q.sk=function(){return null},Q.Yk=function(){return this.k},Q.Jj=function(){return this.n},Q.tk=function(){return GM(this)},Q.uk=function(){var e,t,n,r,i,a,o,s,c;return this.p||(n=bx(this),(n.i??AI(n),n.i).length,r=this.sk(),r&&Qv(bx(r)),i=OM(this),o=i.ik(),e=o?o.i&1?o==J9?oJ:o==q9?pJ:o==Q9?fJ:o==Z9?dJ:o==Y9?hJ:o==$9?bJ:o==X9?sJ:lJ:o:null,t=$P(this),s=i.gk(),MYe(this),(this.Bb&ER)!=0&&((a=n2e((zN(),l9),n))&&a!=this||(a=Kx(Xw(l9,this))))?this.p=new H_e(this,a):this.Hk()?this.$k()?this.p=r?(this.Bb&lK)==0?e?this._k()?new xb(49,e,this,r):new xb(7,e,this,r):this._k()?new LS(48,this,r):new LS(6,this,r):e?this._k()?new xb(47,e,this,r):new xb(5,e,this,r):this._k()?new LS(46,this,r):new LS(4,this,r):(this.Bb&lK)==0?e?e==Fq?new Ig(41,mBt,this):this._k()?new Ig(45,e,this):new Ig(3,e,this):this._k()?new Ub(44,this):new Ub(2,this):e?e==Fq?new Ig(50,mBt,this):this._k()?new Ig(43,e,this):new Ig(1,e,this):this._k()?new Ub(42,this):new Ub(0,this):j(i,159)?this.p=e==t9?new Ub(40,this):this.Bb&512?(this.Bb&lK)==0?e?new Ig(11,e,this):new Ub(10,this):e?new Ig(9,e,this):new Ub(8,this):(this.Bb&lK)==0?e?new Ig(15,e,this):new Ub(14,this):e?new Ig(13,e,this):new Ub(12,this):r?(c=r.t,this.p=c>1||c==-1?this._k()?(this.Bb&lK)==0?e?new xb(27,e,this,r):new LS(26,this,r):e?new xb(25,e,this,r):new LS(24,this,r):(this.Bb&lK)==0?e?new xb(31,e,this,r):new LS(30,this,r):e?new xb(29,e,this,r):new LS(28,this,r):this._k()?(this.Bb&lK)==0?e?new xb(35,e,this,r):new LS(34,this,r):e?new xb(33,e,this,r):new LS(32,this,r):(this.Bb&lK)==0?e?new xb(39,e,this,r):new LS(38,this,r):e?new xb(37,e,this,r):new LS(36,this,r)):this.p=this._k()?(this.Bb&lK)==0?e?new Ig(19,e,this):new Ub(18,this):e?new Ig(17,e,this):new Ub(16,this):(this.Bb&lK)==0?e?new Ig(23,e,this):new Ub(22,this):e?new Ig(21,e,this):new Ub(20,this):this.p=this.Zk()?this._k()?new PEe(P(i,29),this,r):new YMe(P(i,29),this,r):j(i,159)?e==t9?new Ub(40,this):(this.Bb&lK)==0?e?new zOe(t,s,this,(RA(),o==q9?aVt:o==J9?eVt:o==Y9?oVt:o==Q9?iVt:o==Z9?rVt:o==$9?sVt:o==X9?tVt:o==K9?nVt:c9)):new Dje(P(i,159),t,s,this):e?new BOe(t,s,this,(RA(),o==q9?aVt:o==J9?eVt:o==Y9?oVt:o==Q9?iVt:o==Z9?rVt:o==$9?sVt:o==X9?tVt:o==K9?nVt:c9)):new Oje(P(i,159),t,s,this):this.$k()?r?(this.Bb&lK)==0?this._k()?new LEe(P(i,29),this,r):new Lg(P(i,29),this,r):this._k()?new zEe(P(i,29),this,r):new REe(P(i,29),this,r):(this.Bb&lK)==0?this._k()?new aSe(P(i,29),this):new Lh(P(i,29),this):this._k()?new sSe(P(i,29),this):new oSe(P(i,29),this):this._k()?r?(this.Bb&lK)==0?new FEe(P(i,29),this,r):new BEe(P(i,29),this,r):(this.Bb&lK)==0?new rSe(P(i,29),this):new cSe(P(i,29),this):r?(this.Bb&lK)==0?new IEe(P(i,29),this,r):new VEe(P(i,29),this,r):(this.Bb&lK)==0?new D_(P(i,29),this):new iSe(P(i,29),this)),this.p},Q.pk=function(){return(this.Bb&aK)!=0},Q.Zk=function(){return!1},Q.$k=function(){return!1},Q.qk=function(){return(this.Bb&ER)!=0},Q.vk=function(){return dT(this)},Q._k=function(){return!1},Q.rk=function(){return(this.Bb&lK)!=0},Q.al=function(e){this.k=e},Q.ri=function(e){Ix(this,e)},Q.Ib=function(){return YF(this)},Q.e=!1,Q.n=0,L(ZW,`EStructuralFeatureImpl`,451),q(335,451,{109:1,94:1,93:1,38:1,158:1,197:1,57:1,179:1,69:1,114:1,470:1,52:1,100:1,335:1,161:1,451:1,293:1,117:1,118:1,682:1},Dc),Q.Ih=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return ih(),!!(this.Bb&256);case 3:return ih(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return ih(),!!H5e(this);case 7:return ih(),i=this.s,i>=1;case 8:return t?OM(this):this.r;case 9:return this.q;case 10:return ih(),(this.Bb&aK)!=0;case 11:return ih(),(this.Bb&QW)!=0;case 12:return ih(),(this.Bb&Hz)!=0;case 13:return this.j;case 14:return $P(this);case 15:return ih(),(this.Bb&lK)!=0;case 16:return ih(),(this.Bb&ER)!=0;case 17:return bx(this);case 18:return ih(),(this.Bb&XW)!=0;case 19:return t?JD(this):$Re(this)}return Ow(this,e-Qv((YL(),V7)),OT((r=P(AD(this,16),29),r||V7),e),t,n)},Q.Th=function(e){var t,n;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return H5e(this);case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&xy(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&xy(this.q).i==0);case 10:return(this.Bb&aK)==0;case 11:return(this.Bb&QW)!=0;case 12:return(this.Bb&Hz)!=0;case 13:return this.j!=null;case 14:return $P(this)!=null;case 15:return(this.Bb&lK)!=0;case 16:return(this.Bb&ER)!=0;case 17:return!!bx(this);case 18:return(this.Bb&XW)!=0;case 19:return!!$Re(this)}return wS(this,e-Qv((YL(),V7)),OT((t=P(AD(this,16),29),t||V7),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:Ix(this,Vh(t));return;case 2:Sk(this,Zc(Bh(t)));return;case 3:Ck(this,Zc(Bh(t)));return;case 4:sE(this,P(t,15).a);return;case 5:dme(this,P(t,15).a);return;case 8:ek(this,P(t,143));return;case 9:r=oN(this,P(t,87),null),r&&r.mj();return;case 10:zk(this,Zc(Bh(t)));return;case 11:Vk(this,Zc(Bh(t)));return;case 12:Bk(this,Zc(Bh(t)));return;case 13:G_e(this,Vh(t));return;case 15:Rk(this,Zc(Bh(t)));return;case 16:nA(this,Zc(Bh(t)));return;case 18:rA(this,Zc(Bh(t)));return}lA(this,e-Qv((YL(),V7)),OT((n=P(AD(this,16),29),n||V7),e),t)},Q.fi=function(){return YL(),V7},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:j(this.Cb,88)&&eP(sC(P(this.Cb,88)),4),YE(this,null);return;case 2:Sk(this,!0);return;case 3:Ck(this,!0);return;case 4:sE(this,0);return;case 5:this.b=0,cE(this,1);return;case 8:ek(this,null);return;case 9:n=oN(this,null,null),n&&n.mj();return;case 10:zk(this,!0);return;case 11:Vk(this,!1);return;case 12:Bk(this,!1);return;case 13:this.i=null,NE(this,null);return;case 15:Rk(this,!1);return;case 16:nA(this,!1);return;case 18:rA(this,!1);return}xk(this,e-Qv((YL(),V7)),OT((t=P(AD(this,16),29),t||V7),e))},Q.mi=function(){JD(this),nb(Xw((zN(),l9),this)),OM(this),this.Bb|=1},Q.Hk=function(){return H5e(this)},Q.Wk=function(e,t){return this.b=0,this.a=null,kJe(this,e,t)},Q.Xk=function(e){dme(this,e)},Q.Ib=function(){var e;return this.Db&64?YF(this):(e=new eh(YF(this)),e.a+=` (iD: `,$l(e,(this.Bb&XW)!=0),e.a+=`)`,e.a)},Q.b=0,L(ZW,`EAttributeImpl`,335),q(360,439,{109:1,94:1,93:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,161:1,117:1,118:1,681:1}),Q.bl=function(e){return e.Ah()==this},Q.xh=function(e){return fM(this,e)},Q.yh=function(e,t){this.w=null,this.Db=t<<16|this.Db&255,this.Cb=e},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return lM(this);case 4:return this.gk();case 5:return this.F;case 6:return t?KT(this):vx(this);case 7:return!this.A&&(this.A=new Gm(L7,this,7)),this.A}return Ow(this,e-Qv(this.fi()),OT((r=P(AD(this,16),29),r||this.fi()),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?fM(this,n):this.Cb.Qh(this,-1-i,null,n))),vI(this,e,6,n)}return a=P(OT((r=P(AD(this,16),29),r||this.fi()),t),69),a.uk().xk(this,QA(this),t-Qv(this.fi()),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 6:return vI(this,null,6,n);case 7:return!this.A&&(this.A=new Gm(L7,this,7)),kj(this.A,e,n)}return i=P(OT((r=P(AD(this,16),29),r||this.fi()),t),69),i.uk().yk(this,QA(this),t-Qv(this.fi()),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!lM(this);case 4:return this.gk()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!vx(this);case 7:return!!this.A&&this.A.i!=0}return wS(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:Lx(this,Vh(t));return;case 2:dm(this,Vh(t));return;case 5:_L(this,Vh(t));return;case 7:!this.A&&(this.A=new Gm(L7,this,7)),cL(this.A),!this.A&&(this.A=new Gm(L7,this,7)),$v(this.A,P(t,18));return}lA(this,e-Qv(this.fi()),OT((n=P(AD(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return YL(),BBt},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:j(this.Cb,184)&&(P(this.Cb,184).tb=null),YE(this,null);return;case 2:KO(this,null),lE(this,this.D);return;case 5:_L(this,null);return;case 7:!this.A&&(this.A=new Gm(L7,this,7)),cL(this.A);return}xk(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.fk=function(){var e;return this.G==-1&&(this.G=(e=KT(this),e?Ij(e.si(),this):-1)),this.G},Q.gk=function(){return null},Q.hk=function(){return KT(this)},Q.cl=function(){return this.v},Q.ik=function(){return lM(this)},Q.jk=function(){return this.D==null?this.B:this.D},Q.kk=function(){return this.F},Q.dk=function(e){return CI(this,e)},Q.dl=function(e){this.v=e},Q.el=function(e){tWe(this,e)},Q.fl=function(e){this.C=e},Q.ri=function(e){Lx(this,e)},Q.Ib=function(){return EA(this)},Q.C=null,Q.D=null,Q.G=-1,L(ZW,`EClassifierImpl`,360),q(88,360,{109:1,94:1,93:1,29:1,143:1,158:1,197:1,57:1,114:1,52:1,100:1,88:1,360:1,161:1,471:1,117:1,118:1,681:1},qae),Q.bl=function(e){return LCe(this,e.Ah())},Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return lM(this);case 4:return null;case 5:return this.F;case 6:return t?KT(this):vx(this);case 7:return!this.A&&(this.A=new Gm(L7,this,7)),this.A;case 8:return ih(),!!(this.Bb&256);case 9:return ih(),!!(this.Bb&512);case 10:return Jb(this);case 11:return!this.q&&(this.q=new F(N7,this,11,10)),this.q;case 12:return WI(this);case 13:return BI(this);case 14:return BI(this),this.r;case 15:return WI(this),this.k;case 16:return w8e(this);case 17:return II(this);case 18:return AI(this);case 19:return JP(this);case 20:return WI(this),this.o;case 21:return!this.s&&(this.s=new F(T7,this,21,17)),this.s;case 22:return PS(this);case 23:return zF(this)}return Ow(this,e-Qv((YL(),H7)),OT((r=P(AD(this,16),29),r||H7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?fM(this,n):this.Cb.Qh(this,-1-i,null,n))),vI(this,e,6,n);case 11:return!this.q&&(this.q=new F(N7,this,11,10)),jA(this.q,e,n);case 21:return!this.s&&(this.s=new F(T7,this,21,17)),jA(this.s,e,n)}return a=P(OT((r=P(AD(this,16),29),r||(YL(),H7)),t),69),a.uk().xk(this,QA(this),t-Qv((YL(),H7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 6:return vI(this,null,6,n);case 7:return!this.A&&(this.A=new Gm(L7,this,7)),kj(this.A,e,n);case 11:return!this.q&&(this.q=new F(N7,this,11,10)),kj(this.q,e,n);case 21:return!this.s&&(this.s=new F(T7,this,21,17)),kj(this.s,e,n);case 22:return kj(PS(this),e,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),H7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),H7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!lM(this);case 4:return!1;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!vx(this);case 7:return!!this.A&&this.A.i!=0;case 8:return!!(this.Bb&256);case 9:return!!(this.Bb&512);case 10:return!!this.u&&PS(this.u.a).i!=0&&!(this.n&&qj(this.n));case 11:return!!this.q&&this.q.i!=0;case 12:return WI(this).i!=0;case 13:return BI(this).i!=0;case 14:return BI(this),this.r.i!=0;case 15:return WI(this),this.k.i!=0;case 16:return w8e(this).i!=0;case 17:return II(this).i!=0;case 18:return AI(this).i!=0;case 19:return JP(this).i!=0;case 20:return WI(this),!!this.o;case 21:return!!this.s&&this.s.i!=0;case 22:return!!this.n&&qj(this.n);case 23:return zF(this).i!=0}return wS(this,e-Qv((YL(),H7)),OT((t=P(AD(this,16),29),t||H7),e))},Q.Wh=function(e){return(this.i==null||this.q&&this.q.i!=0?null:dF(this,e))||Xdt(this,e)},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:Lx(this,Vh(t));return;case 2:dm(this,Vh(t));return;case 5:_L(this,Vh(t));return;case 7:!this.A&&(this.A=new Gm(L7,this,7)),cL(this.A),!this.A&&(this.A=new Gm(L7,this,7)),$v(this.A,P(t,18));return;case 8:zJe(this,Zc(Bh(t)));return;case 9:BJe(this,Zc(Bh(t)));return;case 10:lL(Jb(this)),$v(Jb(this),P(t,18));return;case 11:!this.q&&(this.q=new F(N7,this,11,10)),cL(this.q),!this.q&&(this.q=new F(N7,this,11,10)),$v(this.q,P(t,18));return;case 21:!this.s&&(this.s=new F(T7,this,21,17)),cL(this.s),!this.s&&(this.s=new F(T7,this,21,17)),$v(this.s,P(t,18));return;case 22:cL(PS(this)),$v(PS(this),P(t,18));return}lA(this,e-Qv((YL(),H7)),OT((n=P(AD(this,16),29),n||H7),e),t)},Q.fi=function(){return YL(),H7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:j(this.Cb,184)&&(P(this.Cb,184).tb=null),YE(this,null);return;case 2:KO(this,null),lE(this,this.D);return;case 5:_L(this,null);return;case 7:!this.A&&(this.A=new Gm(L7,this,7)),cL(this.A);return;case 8:zJe(this,!1);return;case 9:BJe(this,!1);return;case 10:this.u&&lL(this.u);return;case 11:!this.q&&(this.q=new F(N7,this,11,10)),cL(this.q);return;case 21:!this.s&&(this.s=new F(T7,this,21,17)),cL(this.s);return;case 22:this.n&&cL(this.n);return}xk(this,e-Qv((YL(),H7)),OT((t=P(AD(this,16),29),t||H7),e))},Q.mi=function(){var e,t;if(WI(this),BI(this),w8e(this),II(this),AI(this),JP(this),zF(this),wC(YEe(sC(this))),this.s)for(e=0,t=this.s.i;e<t;++e)Hh(H(this.s,e));if(this.q)for(e=0,t=this.q.i;e<t;++e)Hh(H(this.q,e));gk((zN(),l9),this).ve(),this.Bb|=1},Q.Ib=function(){return V2e(this)},Q.k=null,Q.r=null;var n9,XBt,r9;L(ZW,`EClassImpl`,88),q(2057,2056,vbt),Q.Ci=function(e,t){return TI(this,e,t)},Q.Di=function(e){return TI(this,this.i,e)},Q.Ei=function(e,t){O7e(this,e,t)},Q.Fi=function(e){DP(this,e)},Q.Uk=function(e,t){return jA(this,e,t)},Q.Yi=function(e){return Tw(this,e)},Q.Vk=function(e,t){return kj(this,e,t)},Q.Vi=function(e,t){return xst(this,e,t)},Q.Gi=function(){return new vh(this)},Q.Hi=function(){return new yh(this)},Q.Ii=function(e){return bE(this,e)},L(oK,`NotifyingInternalEListImpl`,2057),q(624,2057,yK),Q.Gc=function(e){return $ct(this,e)},Q.Gj=function(e,t,n,r,i){return Ex(this,e,t,n,r,i)},Q.Hj=function(e){pc(this,e)},Q.Dk=function(e){return this},Q.Jk=function(){return OT(this.e.Ah(),this.Jj())},Q.Ij=function(){return this.Jk()},Q.Jj=function(){return wA(this.e.Ah(),this.Jk())},Q.gl=function(){return P(this.Jk().Fk(),29).ik()},Q.hl=function(){return Uj(P(this.Jk(),19)).n},Q.hj=function(){return this.e},Q.il=function(){return!0},Q.jl=function(){return!1},Q.kl=function(){return!1},Q.ll=function(){return!1},Q.bd=function(e){return Ij(this,e)},Q.Lj=function(e,t){var n=P(e,52);return this.kl()?this.il()?n.Oh(this.e,this.hl(),this.gl(),t):n.Oh(this.e,wA(n.Ah(),Uj(P(this.Jk(),19))),null,t):n.Oh(this.e,-1-this.Jj(),null,t)},Q.Mj=function(e,t){var n=P(e,52);return this.kl()?this.il()?n.Qh(this.e,this.hl(),this.gl(),t):n.Qh(this.e,wA(n.Ah(),Uj(P(this.Jk(),19))),null,t):n.Qh(this.e,-1-this.Jj(),null,t)},Q.$k=function(){return!1},Q.ml=function(){return!0},Q.dk=function(e){return cLe(this.d,e)},Q.Nj=function(){return nm(this.e)},Q.Oj=function(){return this.i!=0},Q.$i=function(e){return uE(this.d,e)},Q.Ui=function(e,t){return this.ml()&&this.ll()?TP(this,e,P(t,57)):t},Q.nl=function(e){return e.Sh()?uk(this.e,P(e,52)):e},Q.Wb=function(e){Jye(this,e)},Q.Nc=function(){return lBe(this)},Q.Oc=function(e){var t;if(this.ll())for(t=this.i-1;t>=0;--t)H(this,t);return MXe(this,e)},Q.Ek=function(){cL(this)},Q.Xi=function(e,t){return KHe(this,e,t)},L(oK,`EcoreEList`,624),q(491,624,yK,Jg),Q.Ji=function(){return!1},Q.Jj=function(){return this.c},Q.Kj=function(){return!1},Q.ml=function(){return!0},Q.Qi=function(){return!0},Q.Ui=function(e,t){return t},Q.Wi=function(){return!1},Q.c=0,L(oK,`EObjectEList`,491),q(81,491,yK,Wm),Q.Kj=function(){return!0},Q.kl=function(){return!1},Q.$k=function(){return!0},L(oK,`EObjectContainmentEList`,81),q(544,81,yK,Um),Q.Li=function(){this.b=!0},Q.Oj=function(){return this.b},Q.Ek=function(){var e;cL(this),nm(this.e)?(e=this.b,this.b=!1,SD(this.e,new lC(this.e,2,this.c,e,!1))):this.b=!1},Q.b=!1,L(oK,`EObjectContainmentEList/Unsettable`,544),q(1131,544,yK,LOe),Q.Ri=function(e,t){var n=P(Ik(this,e,t),87),r;return nm(this.e)&&pc(this,new yw(this.a,7,(YL(),VBt),G(t),(r=n.c,j(r,88)?P(r,29):J7),e)),n},Q.Sj=function(e,t){return BXe(this,P(e,87),t)},Q.Tj=function(e,t){return zXe(this,P(e,87),t)},Q.Uj=function(e,t,n){return _2e(this,P(e,87),P(t,87),n)},Q.Gj=function(e,t,n,r,i){switch(e){case 3:return Ex(this,e,t,n,r,this.i>1);case 5:return Ex(this,e,t,n,r,this.i-P(n,16).gc()>0);default:return new nT(this.e,e,this.c,t,n,r,!0)}},Q.Rj=function(){return!0},Q.Oj=function(){return qj(this)},Q.Ek=function(){cL(this)},L(ZW,`EClassImpl/1`,1131),q(1145,1144,eK),Q.bj=function(e){var t,n=e.ej(),r,i,a,o,s;if(n!=8){if(r=fQe(e),r==0)switch(n){case 1:case 9:s=e.ij(),s!=null&&(t=sC(P(s,471)),!t.c&&(t.c=new Ro),uT(t.c,e.hj())),o=e.gj(),o!=null&&(i=P(o,471),i.Bb&1||(t=sC(i),!t.c&&(t.c=new Ro),fw(t.c,P(e.hj(),29))));break;case 3:o=e.gj(),o!=null&&(i=P(o,471),i.Bb&1||(t=sC(i),!t.c&&(t.c=new Ro),fw(t.c,P(e.hj(),29))));break;case 5:if(o=e.gj(),o!=null)for(a=P(o,18).Jc();a.Ob();)i=P(a.Pb(),471),i.Bb&1||(t=sC(i),!t.c&&(t.c=new Ro),fw(t.c,P(e.hj(),29)));break;case 4:s=e.ij(),s!=null&&(i=P(s,471),i.Bb&1||(t=sC(i),!t.c&&(t.c=new Ro),uT(t.c,e.hj())));break;case 6:if(s=e.ij(),s!=null)for(a=P(s,18).Jc();a.Ob();)i=P(a.Pb(),471),i.Bb&1||(t=sC(i),!t.c&&(t.c=new Ro),uT(t.c,e.hj()))}this.ol(r)}},Q.ol=function(e){Grt(this,e)},Q.b=63,L(ZW,`ESuperAdapter`,1145),q(1146,1145,eK,Gue),Q.ol=function(e){eP(this,e)},L(ZW,`EClassImpl/10`,1146),q(1135,699,yK),Q.Ci=function(e,t){return aN(this,e,t)},Q.Di=function(e){return F$e(this,e)},Q.Ei=function(e,t){_k(this,e,t)},Q.Fi=function(e){TC(this,e)},Q.Yi=function(e){return Tw(this,e)},Q.Vi=function(e,t){return lT(this,e,t)},Q.Uk=function(e,t){throw E(new sc)},Q.Gi=function(){return new vh(this)},Q.Hi=function(){return new yh(this)},Q.Ii=function(e){return bE(this,e)},Q.Vk=function(e,t){throw E(new sc)},Q.Dk=function(e){return this},Q.Oj=function(){return this.i!=0},Q.Wb=function(e){throw E(new sc)},Q.Ek=function(){throw E(new sc)},L(oK,`EcoreEList/UnmodifiableEList`,1135),q(333,1135,yK,Up),Q.Wi=function(){return!1},L(oK,`EcoreEList/UnmodifiableEList/FastCompare`,333),q(1138,333,yK,vKe),Q.bd=function(e){var t,n,r;if(j(e,179)&&(t=P(e,179),n=t.Jj(),n!=-1)){for(r=this.i;n<r;++n)if(A(this.g[n])===A(e))return n}return-1},L(ZW,`EClassImpl/1EAllStructuralFeaturesList`,1138),q(1132,492,LG,Zne),Q.$i=function(e){return V(M7,ybt,87,e,0,1)},Q.Wi=function(){return!1},L(ZW,`EClassImpl/1EGenericSuperTypeEList`,1132),q(625,492,LG,Ao),Q.$i=function(e){return V(T7,_K,179,e,0,1)},Q.Wi=function(){return!1},L(ZW,`EClassImpl/1EStructuralFeatureUniqueEList`,625),q(743,492,LG,jo),Q.$i=function(e){return V(I7,_K,19,e,0,1)},Q.Wi=function(){return!1},L(ZW,`EClassImpl/1ReferenceList`,743),q(1133,492,LG,Kue),Q.Ki=function(e,t){VOe(this,P(t,38))},Q.$i=function(e){return V(E7,_K,38,e,0,1)},Q.Wi=function(){return!1},L(ZW,`EClassImpl/2`,1133),q(1134,492,LG,Qne),Q.$i=function(e){return V(E7,_K,38,e,0,1)},Q.Wi=function(){return!1},L(ZW,`EClassImpl/3`,1134),q(1136,333,yK,_De),Q.Ec=function(e){return MLe(this,P(e,38))},Q.Fi=function(e){vhe(this,P(e,38))},L(ZW,`EClassImpl/4`,1136),q(1137,333,yK,vDe),Q.Ec=function(e){return NLe(this,P(e,19))},Q.Fi=function(e){yhe(this,P(e,19))},L(ZW,`EClassImpl/5`,1137),q(1139,492,LG,$ne),Q.$i=function(e){return V(N7,vK,62,e,0,1)},Q.Wi=function(){return!1},L(ZW,`EClassImpl/6`,1139),q(1140,492,LG,ere),Q.$i=function(e){return V(I7,_K,19,e,0,1)},Q.Wi=function(){return!1},L(ZW,`EClassImpl/7`,1140),q(2060,2059,{3:1,4:1,20:1,31:1,56:1,18:1,16:1,71:1,61:1,72:1}),Q.Ci=function(e,t){return bot(this,e,t)},Q.Di=function(e){return bot(this,this.Cj(),e)},Q.Ei=function(e,t){$7e(this,e,t)},Q.Fi=function(e){D7e(this,e)},Q.Uk=function(e,t){return I$e(this,e,t)},Q.Vk=function(e,t){return WQe(this,e,t)},Q.Vi=function(e,t){return xot(this,e,t)},Q.Yi=function(e){return this.vj(e)},Q.Gi=function(){return new vh(this)},Q.nj=function(){return this.qj()},Q.Hi=function(){return new yh(this)},Q.Ii=function(e){return bE(this,e)},L(oK,`DelegatingNotifyingInternalEListImpl`,2060),q(744,2060,CK),Q.Ji=function(){var e=OT(Yb(this.b),this.Jj()).Fk();return j(e,159)&&!j(e,459)&&!(e.ik().i&1)},Q.Gc=function(e){var t,n,r,i,a,o,s,c;if(this.ml()){if(c=this.Cj(),c>4){if(this.dk(e)){if(this.$k()){if(r=P(e,52),n=r.Bh(),s=n==this.b&&(this.kl()?r.vh(r.Ch(),P(OT(Yb(this.b),this.Jj()).Fk(),29).ik())==Uj(P(OT(Yb(this.b),this.Jj()),19)).n:-1-r.Ch()==this.Jj()),this.ll()&&!s&&!n&&r.Gh()){for(i=0;i<c;++i)if(t=wv(this,this.vj(i)),A(t)===A(e))return!0}return s}if(this.kl()&&!this.jl()){if(a=P(e,57).Jh(Uj(P(OT(Yb(this.b),this.Jj()),19))),A(a)===A(this.b))return!0;if(a==null||!P(a,57).Sh())return!1}}else return!1}if(o=this.sj(e),this.ll()&&!o){for(i=0;i<c;++i)if(r=wv(this,this.vj(i)),A(r)===A(e))return!0}return o}return this.sj(e)},Q.Gj=function(e,t,n,r,i){return new nT(this.b,e,this.Jj(),t,n,r,i)},Q.Hj=function(e){SD(this.b,e)},Q.Dk=function(e){return this},Q.Ij=function(){return OT(Yb(this.b),this.Jj())},Q.Jj=function(){return wA(Yb(this.b),OT(Yb(this.b),this.Jj()))},Q.hj=function(){return this.b},Q.il=function(){return!!OT(Yb(this.b),this.Jj()).Fk().ik()},Q.Kj=function(){var e,t=OT(Yb(this.b),this.Jj());return j(t,103)?(e=P(t,19),(e.Bb&XW)!=0||!!Uj(P(t,19))):!1},Q.jl=function(){var e,t=OT(Yb(this.b),this.Jj()),n,r;return j(t,103)?(e=P(t,19),n=Uj(e),!!n&&(r=n.t,r>1||r==-1)):!1},Q.kl=function(){var e,t=OT(Yb(this.b),this.Jj()),n;return j(t,103)?(e=P(t,19),n=Uj(e),!!n):!1},Q.ll=function(){var e,t=OT(Yb(this.b),this.Jj());return j(t,103)?(e=P(t,19),(e.Bb&Wz)!=0):!1},Q.bd=function(e){var t,n,r=this.xj(e),i;if(r>=0)return r;if(this.ml()){for(n=0,i=this.Cj();n<i;++n)if(t=wv(this,this.vj(n)),A(t)===A(e))return n}return-1},Q.Lj=function(e,t){var n=P(e,52);return this.kl()?this.il()?n.Oh(this.b,Uj(P(OT(Yb(this.b),this.Jj()),19)).n,P(OT(Yb(this.b),this.Jj()).Fk(),29).ik(),t):n.Oh(this.b,wA(n.Ah(),Uj(P(OT(Yb(this.b),this.Jj()),19))),null,t):n.Oh(this.b,-1-this.Jj(),null,t)},Q.Mj=function(e,t){var n=P(e,52);return this.kl()?this.il()?n.Qh(this.b,Uj(P(OT(Yb(this.b),this.Jj()),19)).n,P(OT(Yb(this.b),this.Jj()).Fk(),29).ik(),t):n.Qh(this.b,wA(n.Ah(),Uj(P(OT(Yb(this.b),this.Jj()),19))),null,t):n.Qh(this.b,-1-this.Jj(),null,t)},Q.$k=function(){var e,t=OT(Yb(this.b),this.Jj());return j(t,103)?(e=P(t,19),(e.Bb&XW)!=0):!1},Q.ml=function(){return j(OT(Yb(this.b),this.Jj()).Fk(),88)},Q.dk=function(e){return OT(Yb(this.b),this.Jj()).Fk().dk(e)},Q.Nj=function(){return nm(this.b)},Q.Oj=function(){return!this.yj()},Q.Qi=function(){return OT(Yb(this.b),this.Jj()).Qi()},Q.Ui=function(e,t){return hL(this,e,t)},Q.Wb=function(e){lL(this),$v(this,P(e,16))},Q.Nc=function(){var e;if(this.ll())for(e=this.Cj()-1;e>=0;--e)hL(this,e,this.vj(e));return this.Dj()},Q.Oc=function(e){var t;if(this.ll())for(t=this.Cj()-1;t>=0;--t)hL(this,t,this.vj(t));return this.Ej(e)},Q.Ek=function(){lL(this)},Q.Xi=function(e,t){return gBe(this,e,t)},L(oK,`DelegatingEcoreEList`,744),q(1141,744,CK,HSe),Q.oj=function(e,t){nSe(this,e,P(t,29))},Q.pj=function(e){oye(this,P(e,29))},Q.vj=function(e){var t=P(H(PS(this.a),e),87).c;return j(t,88)?P(t,29):(YL(),J7)},Q.Aj=function(e){var t=P(jF(PS(this.a),e),87).c;return j(t,88)?P(t,29):(YL(),J7)},Q.Bj=function(e,t){return L$e(this,e,P(t,29))},Q.Ji=function(){return!1},Q.Gj=function(e,t,n,r,i){return null},Q.qj=function(){return new que(this)},Q.rj=function(){cL(PS(this.a))},Q.sj=function(e){return UJe(this,e)},Q.tj=function(e){for(var t,n=e.Jc();n.Ob();)if(t=n.Pb(),!UJe(this,t))return!1;return!0},Q.uj=function(e){var t,n,r;if(j(e,16)&&(r=P(e,16),r.gc()==PS(this.a).i)){for(t=r.Jc(),n=new Jm(this);t.Ob();)if(A(t.Pb())!==A(yj(n)))return!1;return!0}return!1},Q.wj=function(){var e,t,n=1,r,i;for(t=new Jm(PS(this.a));t.e!=t.i.gc();)e=P(yj(t),87),r=(i=e.c,j(i,88)?P(i,29):(YL(),J7)),n=31*n+(r?lh(r):0);return n},Q.xj=function(e){var t,n,r=0,i;for(n=new Jm(PS(this.a));n.e!=n.i.gc();){if(t=P(yj(n),87),A(e)===A((i=t.c,j(i,88)?P(i,29):(YL(),J7))))return r;++r}return-1},Q.yj=function(){return PS(this.a).i==0},Q.zj=function(){return null},Q.Cj=function(){return PS(this.a).i},Q.Dj=function(){var e,t,n,r,i,a=PS(this.a).i;for(i=V(Oq,lR,1,a,5,1),n=0,t=new Jm(PS(this.a));t.e!=t.i.gc();)e=P(yj(t),87),i[n++]=(r=e.c,j(r,88)?P(r,29):(YL(),J7));return i},Q.Ej=function(e){var t,n,r,i,a,o,s=PS(this.a).i;for(e.length<s&&(i=uE(FO(e).c,s),e=i),e.length>s&&ly(e,s,null),r=0,n=new Jm(PS(this.a));n.e!=n.i.gc();)t=P(yj(n),87),a=(o=t.c,j(o,88)?P(o,29):(YL(),J7)),ly(e,r++,a);return e},Q.Fj=function(){var e,t,n,r,i=new yl;for(i.a+=`[`,e=PS(this.a),t=0,r=PS(this.a).i;t<r;)Np(i,$m((n=P(H(e,t),87).c,j(n,88)?P(n,29):(YL(),J7)))),++t<r&&(i.a+=cR);return i.a+=`]`,i.a},Q.Hj=function(e){},Q.Jj=function(){return 10},Q.il=function(){return!0},Q.Kj=function(){return!1},Q.jl=function(){return!1},Q.kl=function(){return!1},Q.ll=function(){return!0},Q.$k=function(){return!1},Q.ml=function(){return!0},Q.dk=function(e){return j(e,88)},Q.Oj=function(){return hFe(this.a)},Q.Qi=function(){return!0},Q.Wi=function(){return!0},L(ZW,`EClassImpl/8`,1141),q(1142,2027,WR,que),Q.dd=function(e){return bE(this.a,e)},Q.gc=function(){return PS(this.a.a).i},L(ZW,`EClassImpl/8/1`,1142),q(1143,492,LG,Mo),Q.$i=function(e){return V(D7,lR,143,e,0,1)},Q.Wi=function(){return!1},L(ZW,`EClassImpl/9`,1143),q(1130,48,omt,pfe),L(ZW,`EClassImpl/MyHashSet`,1130),q(563,360,{109:1,94:1,93:1,143:1,159:1,832:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,161:1,117:1,118:1,681:1},lc),Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return lM(this);case 4:return this.gk();case 5:return this.F;case 6:return t?KT(this):vx(this);case 7:return!this.A&&(this.A=new Gm(L7,this,7)),this.A;case 8:return ih(),!!(this.Bb&256)}return Ow(this,e-Qv(this.fi()),OT((r=P(AD(this,16),29),r||this.fi()),e),t,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!lM(this);case 4:return this.gk()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!vx(this);case 7:return!!this.A&&this.A.i!=0;case 8:return!(this.Bb&256)}return wS(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:Lx(this,Vh(t));return;case 2:dm(this,Vh(t));return;case 5:_L(this,Vh(t));return;case 7:!this.A&&(this.A=new Gm(L7,this,7)),cL(this.A),!this.A&&(this.A=new Gm(L7,this,7)),$v(this.A,P(t,18));return;case 8:wk(this,Zc(Bh(t)));return}lA(this,e-Qv(this.fi()),OT((n=P(AD(this,16),29),n||this.fi()),e),t)},Q.fi=function(){return YL(),HBt},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:j(this.Cb,184)&&(P(this.Cb,184).tb=null),YE(this,null);return;case 2:KO(this,null),lE(this,this.D);return;case 5:_L(this,null);return;case 7:!this.A&&(this.A=new Gm(L7,this,7)),cL(this.A);return;case 8:wk(this,!0);return}xk(this,e-Qv(this.fi()),OT((t=P(AD(this,16),29),t||this.fi()),e))},Q.mi=function(){gk((zN(),l9),this).ve(),this.Bb|=1},Q.mk=function(){var e,t,n;if(!this.c&&(e=net(KT(this)),!e.dc()))for(n=e.Jc();n.Ob();)t=Vh(n.Pb()),yI(this,t)&&dYe(this);return this.b},Q.gk=function(){var e;if(!this.e){e=null;try{e=lM(this)}catch(e){if(e=eO(e),!j(e,101))throw E(e)}this.d=null,e&&e.i&1&&(this.d=e==J9?(ih(),iJ):e==q9?G(0):e==Q9?new ls(0):e==Z9?0:e==Y9?tj(0):e==$9?fk(0):e==X9?aT(0):MD(0)),this.e=!0}return this.d},Q.lk=function(){return!!(this.Bb&256)},Q.pl=function(e){e&&(this.D=`org.eclipse.emf.common.util.AbstractEnumerator`)},Q.el=function(e){tWe(this,e),this.pl(e)},Q.fl=function(e){this.C=e,this.e=!1},Q.Ib=function(){var e;return this.Db&64?EA(this):(e=new eh(EA(this)),e.a+=` (serializable: `,$l(e,!!(this.Bb&256)),e.a+=`)`,e.a)},Q.c=!1,Q.d=null,Q.e=!1,L(ZW,`EDataTypeImpl`,563),q(459,563,{109:1,94:1,93:1,143:1,159:1,832:1,675:1,158:1,197:1,57:1,114:1,52:1,100:1,360:1,459:1,161:1,117:1,118:1,681:1},mfe),Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D==null?this.B:this.D;case 3:return lM(this);case 4:return Dqe(this);case 5:return this.F;case 6:return t?KT(this):vx(this);case 7:return!this.A&&(this.A=new Gm(L7,this,7)),this.A;case 8:return ih(),!!(this.Bb&256);case 9:return!this.a&&(this.a=new F(j7,this,9,5)),this.a}return Ow(this,e-Qv((YL(),U7)),OT((r=P(AD(this,16),29),r||U7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 6:return this.Cb&&(n=(i=this.Db>>16,i>=0?fM(this,n):this.Cb.Qh(this,-1-i,null,n))),vI(this,e,6,n);case 9:return!this.a&&(this.a=new F(j7,this,9,5)),jA(this.a,e,n)}return a=P(OT((r=P(AD(this,16),29),r||(YL(),U7)),t),69),a.uk().xk(this,QA(this),t-Qv((YL(),U7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 6:return vI(this,null,6,n);case 7:return!this.A&&(this.A=new Gm(L7,this,7)),kj(this.A,e,n);case 9:return!this.a&&(this.a=new F(j7,this,9,5)),kj(this.a,e,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),U7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),U7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return!!lM(this);case 4:return!!Dqe(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return!!vx(this);case 7:return!!this.A&&this.A.i!=0;case 8:return!(this.Bb&256);case 9:return!!this.a&&this.a.i!=0}return wS(this,e-Qv((YL(),U7)),OT((t=P(AD(this,16),29),t||U7),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:Lx(this,Vh(t));return;case 2:dm(this,Vh(t));return;case 5:_L(this,Vh(t));return;case 7:!this.A&&(this.A=new Gm(L7,this,7)),cL(this.A),!this.A&&(this.A=new Gm(L7,this,7)),$v(this.A,P(t,18));return;case 8:wk(this,Zc(Bh(t)));return;case 9:!this.a&&(this.a=new F(j7,this,9,5)),cL(this.a),!this.a&&(this.a=new F(j7,this,9,5)),$v(this.a,P(t,18));return}lA(this,e-Qv((YL(),U7)),OT((n=P(AD(this,16),29),n||U7),e),t)},Q.fi=function(){return YL(),U7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:j(this.Cb,184)&&(P(this.Cb,184).tb=null),YE(this,null);return;case 2:KO(this,null),lE(this,this.D);return;case 5:_L(this,null);return;case 7:!this.A&&(this.A=new Gm(L7,this,7)),cL(this.A);return;case 8:wk(this,!0);return;case 9:!this.a&&(this.a=new F(j7,this,9,5)),cL(this.a);return}xk(this,e-Qv((YL(),U7)),OT((t=P(AD(this,16),29),t||U7),e))},Q.mi=function(){var e,t;if(this.a)for(e=0,t=this.a.i;e<t;++e)Hh(H(this.a,e));gk((zN(),l9),this).ve(),this.Bb|=1},Q.gk=function(){return Dqe(this)},Q.dk=function(e){return e!=null},Q.pl=function(e){},L(ZW,`EEnumImpl`,459),q(568,439,{109:1,94:1,93:1,2004:1,684:1,158:1,197:1,57:1,114:1,52:1,100:1,568:1,161:1,117:1,118:1},pde),Q.ve=function(){return this.zb},Q.xh=function(e){return a0e(this,e)},Q.Ih=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return G(this.d);case 3:return this.b?this.b:this.a;case 4:return i=this.c,i??this.zb;case 5:return this.Db>>16==5?P(this.Cb,675):null}return Ow(this,e-Qv((YL(),W7)),OT((r=P(AD(this,16),29),r||W7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 5:return this.Cb&&(n=(i=this.Db>>16,i>=0?a0e(this,n):this.Cb.Qh(this,-1-i,null,n))),vI(this,e,5,n)}return a=P(OT((r=P(AD(this,16),29),r||(YL(),W7)),t),69),a.uk().xk(this,QA(this),t-Qv((YL(),W7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 5:return vI(this,null,5,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),W7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),W7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return!!this.b;case 4:return this.c!=null;case 5:return!!(this.Db>>16==5&&P(this.Cb,675))}return wS(this,e-Qv((YL(),W7)),OT((t=P(AD(this,16),29),t||W7),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:YE(this,Vh(t));return;case 2:oE(this,P(t,15).a);return;case 3:f7e(this,P(t,2004));return;case 4:OE(this,Vh(t));return}lA(this,e-Qv((YL(),W7)),OT((n=P(AD(this,16),29),n||W7),e),t)},Q.fi=function(){return YL(),W7},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:YE(this,null);return;case 2:oE(this,0);return;case 3:f7e(this,null);return;case 4:OE(this,null);return}xk(this,e-Qv((YL(),W7)),OT((t=P(AD(this,16),29),t||W7),e))},Q.Ib=function(){return this.c??this.zb},Q.b=null,Q.c=null,Q.d=0,L(ZW,`EEnumLiteralImpl`,568);var ZBt=g_(ZW,`EFactoryImpl/InternalEDateTimeFormat`);q(485,1,{2079:1},Ls),L(ZW,`EFactoryImpl/1ClientInternalEDateTimeFormat`,485),q(248,118,{109:1,94:1,93:1,87:1,57:1,114:1,52:1,100:1,248:1,117:1,118:1},qs),Q.zh=function(e,t,n){var r;return n=vI(this,e,t,n),this.e&&j(e,179)&&(r=qP(this,this.e),r!=this.c&&(n=vL(this,r,n))),n},Q.Ih=function(e,t,n){var r;switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new Wm(M7,this,1)),this.d;case 2:return t?SI(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?Xj(this):this.a}return Ow(this,e-Qv((YL(),K7)),OT((r=P(AD(this,16),29),r||K7),e),t,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return aJe(this,null,n);case 1:return!this.d&&(this.d=new Wm(M7,this,1)),kj(this.d,e,n);case 3:return iJe(this,null,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),K7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),K7)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.f;case 1:return!!this.d&&this.d.i!=0;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return wS(this,e-Qv((YL(),K7)),OT((t=P(AD(this,16),29),t||K7),e))},Q.$h=function(e,t){var n;switch(e){case 0:K2e(this,P(t,87));return;case 1:!this.d&&(this.d=new Wm(M7,this,1)),cL(this.d),!this.d&&(this.d=new Wm(M7,this,1)),$v(this.d,P(t,18));return;case 3:G2e(this,P(t,87));return;case 4:R3e(this,P(t,835));return;case 5:GT(this,P(t,143));return}lA(this,e-Qv((YL(),K7)),OT((n=P(AD(this,16),29),n||K7),e),t)},Q.fi=function(){return YL(),K7},Q.hi=function(e){var t;switch(e){case 0:K2e(this,null);return;case 1:!this.d&&(this.d=new Wm(M7,this,1)),cL(this.d);return;case 3:G2e(this,null);return;case 4:R3e(this,null);return;case 5:GT(this,null);return}xk(this,e-Qv((YL(),K7)),OT((t=P(AD(this,16),29),t||K7),e))},Q.Ib=function(){var e=new th(FP(this));return e.a+=` (expression: `,$I(this,e),e.a+=`)`,e.a};var QBt;L(ZW,`EGenericTypeImpl`,248),q(2032,2027,wK),Q.Ei=function(e,t){BSe(this,e,t)},Q.Uk=function(e,t){return BSe(this,this.gc(),e),t},Q.Yi=function(e){return Oj(this.nj(),e)},Q.Gi=function(){return this.Hi()},Q.nj=function(){return new $ue(this)},Q.Hi=function(){return this.Ii(0)},Q.Ii=function(e){return this.nj().dd(e)},Q.Vk=function(e,t){return CA(this,e,!0),t},Q.Ri=function(e,t){var n,r=CM(this,t);return n=this.dd(e),n.Rb(r),r},Q.Si=function(e,t){var n;CA(this,t,!0),n=this.dd(e),n.Rb(t)},L(oK,`AbstractSequentialInternalEList`,2032),q(482,2032,wK,hh),Q.Yi=function(e){return Oj(this.nj(),e)},Q.Gi=function(){return this.b==null?(rd(),rd(),a9):this.ql()},Q.nj=function(){return new gve(this.a,this.b)},Q.Hi=function(){return this.b==null?(rd(),rd(),a9):this.ql()},Q.Ii=function(e){var t,n;if(this.b==null){if(e<0||e>1)throw E(new Hc(nK+e+`, size=0`));return rd(),rd(),a9}for(n=this.ql(),t=0;t<e;++t)jD(n);return n},Q.dc=function(){var e,t,n,r,i,a;if(this.b!=null){for(n=0;n<this.b.length;++n)if(e=this.b[n],!this.tl()||this.a.Uh(e)){if(a=this.a.Kh(e,!1),ad(),P(e,69).vk()){for(t=P(a,163),r=0,i=t.gc();r<i;++r)if(DAe(t.Rl(r))&&t.Sl(r)!=null)return!1}else if(e.Hk()){if(!P(a,18).dc())return!1}else if(a!=null)return!1}}return!0},Q.Jc=function(){return LUe(this)},Q.dd=function(e){var t,n;if(this.b==null){if(e!=0)throw E(new Hc(nK+e+`, size=0`));return rd(),rd(),a9}for(n=this.sl()?this.rl():this.ql(),t=0;t<e;++t)jD(n);return n},Q.Ri=function(e,t){throw E(new sc)},Q.Si=function(e,t){throw E(new sc)},Q.ql=function(){return new gh(this.a,this.b)},Q.rl=function(){return new Yxe(this.a,this.b)},Q.sl=function(){return!0},Q.gc=function(){var e,t,n,r,i=0,a,o;if(this.b!=null){for(n=0;n<this.b.length;++n)if(e=this.b[n],!this.tl()||this.a.Uh(e)){if(o=this.a.Kh(e,!1),ad(),P(e,69).vk())for(t=P(o,163),r=0,a=t.gc();r<a;++r)DAe(t.Rl(r))&&t.Sl(r)!=null&&++i;else e.Hk()?i+=P(o,18).gc():o!=null&&++i}}return i},Q.tl=function(){return!0};var i9;L(oK,`EContentsEList`,482),q(1147,482,wK,Jxe),Q.ql=function(){return new Xxe(this.a,this.b)},Q.rl=function(){return new Zxe(this.a,this.b)},Q.tl=function(){return!1},L(ZW,`ENamedElementImpl/1`,1147),q(287,1,TK,gh),Q.Nb=function(e){jv(this,e)},Q.Rb=function(e){throw E(new sc)},Q.ul=function(e){if(this.g!=0||this.e)throw E(new Yc(`Iterator already in use or already filtered`));this.e=e},Q.Ob=function(){var e,t,n,r,i,a;switch(this.g){case 3:case 2:return!0;case 1:return!1;case-3:this.p?this.p.Pb():++this.n;default:if(!this.k||(this.p?!s8e(this,this.p):!_7e(this))){for(;this.d<this.c.length;)if(t=this.c[this.d++],(!this.e||t.nk()!=z5||t.Jj()!=0)&&(!this.tl()||this.b.Uh(t))){if(a=this.b.Kh(t,this.sl()),this.f=(ad(),P(t,69).vk()),this.f||t.Hk()){if(this.sl()?(r=P(a,16),this.k=r):(r=P(a,72),this.k=this.j=r),j(this.k,59)?(this.p=null,this.o=this.k.gc(),this.n=0):this.p=this.j?this.j.Hi():this.k.cd(),this.p?s8e(this,this.p):_7e(this))return i=this.p?this.p.Pb():this.j?this.j.Yi(this.n++):this.k.Xb(this.n++),this.f?(e=P(i,75),e.Jk(),n=e.kd(),this.i=n):(n=i,this.i=n),this.g=3,!0}else if(a!=null)return this.k=null,this.p=null,n=a,this.i=n,this.g=2,!0}return this.k=null,this.p=null,this.f=!1,this.g=1,!1}return i=this.p?this.p.Pb():this.j?this.j.Yi(this.n++):this.k.Xb(this.n++),this.f?(e=P(i,75),e.Jk(),n=e.kd(),this.i=n):(n=i,this.i=n),this.g=3,!0}},Q.Sb=function(){var e,t,n,r,i,a;switch(this.g){case-3:case-2:return!0;case-1:return!1;case 3:this.p?this.p.Ub():--this.n;default:if(!this.k||(this.p?!c8e(this,this.p):!H8e(this))){for(;this.d>0;)if(t=this.c[--this.d],(!this.e||t.nk()!=z5||t.Jj()!=0)&&(!this.tl()||this.b.Uh(t))){if(a=this.b.Kh(t,this.sl()),this.f=(ad(),P(t,69).vk()),this.f||t.Hk()){if(this.sl()?(r=P(a,16),this.k=r):(r=P(a,72),this.k=this.j=r),j(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ii(this.k.gc()):this.k.dd(this.k.gc()),this.p?c8e(this,this.p):H8e(this))return i=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(e=P(i,75),e.Jk(),n=e.kd(),this.i=n):(n=i,this.i=n),this.g=-3,!0}else if(a!=null)return this.k=null,this.p=null,n=a,this.i=n,this.g=-2,!0}return this.k=null,this.p=null,this.g=-1,!1}return i=this.p?this.p.Ub():this.j?this.j.Yi(--this.n):this.k.Xb(--this.n),this.f?(e=P(i,75),e.Jk(),n=e.kd(),this.i=n):(n=i,this.i=n),this.g=-3,!0}},Q.Pb=function(){return jD(this)},Q.Tb=function(){return this.a},Q.Ub=function(){var e;if(this.g<-1||this.Sb())return--this.a,this.g=0,e=this.i,this.Sb(),e;throw E(new cc)},Q.Vb=function(){return this.a-1},Q.Qb=function(){throw E(new sc)},Q.sl=function(){return!1},Q.Wb=function(e){throw E(new sc)},Q.tl=function(){return!0},Q.a=0,Q.d=0,Q.f=!1,Q.g=0,Q.n=0,Q.o=0;var a9;L(oK,`EContentsEList/FeatureIteratorImpl`,287),q(700,287,TK,Yxe),Q.sl=function(){return!0},L(oK,`EContentsEList/ResolvingFeatureIteratorImpl`,700),q(1148,700,TK,Zxe),Q.tl=function(){return!1},L(ZW,`ENamedElementImpl/1/1`,1148),q(1149,287,TK,Xxe),Q.tl=function(){return!1},L(ZW,`ENamedElementImpl/1/2`,1149),q(39,151,tK,zS,BS,bv,vw,nT,lC,FHe,SFe,IHe,CFe,fC,wFe,zHe,TFe,dC,EFe,LHe,DFe,xv,yw,Mb,RHe,OFe,uC,xFe),Q.Ij=function(){return dw(this)},Q.Pj=function(){var e=dw(this);return e?e.gk():null},Q.fj=function(e){return this.b==-1&&this.a&&(this.b=this.c.Eh(this.a.Jj(),this.a.nk())),this.c.vh(this.b,e)},Q.hj=function(){return this.c},Q.Qj=function(){var e=dw(this);return e?e.rk():!1},Q.b=-1,L(ZW,`ENotificationImpl`,39),q(403,293,{109:1,94:1,93:1,158:1,197:1,57:1,62:1,114:1,470:1,52:1,100:1,161:1,403:1,293:1,117:1,118:1},Oc),Q.xh=function(e){return C0e(this,e)},Q.Ih=function(e,t,n){var r,i,a;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return ih(),!!(this.Bb&256);case 3:return ih(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return ih(),a=this.t,a>1||a==-1;case 7:return ih(),i=this.s,i>=1;case 8:return t?OM(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?P(this.Cb,29):null;case 11:return!this.d&&(this.d=new Gm(L7,this,11)),this.d;case 12:return!this.c&&(this.c=new F(F7,this,12,10)),this.c;case 13:return!this.a&&(this.a=new Jh(this,this)),this.a;case 14:return Qw(this)}return Ow(this,e-Qv((YL(),Y7)),OT((r=P(AD(this,16),29),r||Y7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 10:return this.Cb&&(n=(i=this.Db>>16,i>=0?C0e(this,n):this.Cb.Qh(this,-1-i,null,n))),vI(this,e,10,n);case 12:return!this.c&&(this.c=new F(F7,this,12,10)),jA(this.c,e,n)}return a=P(OT((r=P(AD(this,16),29),r||(YL(),Y7)),t),69),a.uk().xk(this,QA(this),t-Qv((YL(),Y7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 9:return ey(this,n);case 10:return vI(this,null,10,n);case 11:return!this.d&&(this.d=new Gm(L7,this,11)),kj(this.d,e,n);case 12:return!this.c&&(this.c=new F(F7,this,12,10)),kj(this.c,e,n);case 14:return kj(Qw(this),e,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),Y7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),Y7)),e,n)},Q.Th=function(e){var t,n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&xy(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&xy(this.q).i==0);case 10:return!!(this.Db>>16==10&&P(this.Cb,29));case 11:return!!this.d&&this.d.i!=0;case 12:return!!this.c&&this.c.i!=0;case 13:return!!this.a&&Qw(this.a.a).i!=0&&!(this.b&&Jj(this.b));case 14:return!!this.b&&Jj(this.b)}return wS(this,e-Qv((YL(),Y7)),OT((t=P(AD(this,16),29),t||Y7),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:YE(this,Vh(t));return;case 2:Sk(this,Zc(Bh(t)));return;case 3:Ck(this,Zc(Bh(t)));return;case 4:sE(this,P(t,15).a);return;case 5:cE(this,P(t,15).a);return;case 8:ek(this,P(t,143));return;case 9:r=oN(this,P(t,87),null),r&&r.mj();return;case 11:!this.d&&(this.d=new Gm(L7,this,11)),cL(this.d),!this.d&&(this.d=new Gm(L7,this,11)),$v(this.d,P(t,18));return;case 12:!this.c&&(this.c=new F(F7,this,12,10)),cL(this.c),!this.c&&(this.c=new F(F7,this,12,10)),$v(this.c,P(t,18));return;case 13:!this.a&&(this.a=new Jh(this,this)),lL(this.a),!this.a&&(this.a=new Jh(this,this)),$v(this.a,P(t,18));return;case 14:cL(Qw(this)),$v(Qw(this),P(t,18));return}lA(this,e-Qv((YL(),Y7)),OT((n=P(AD(this,16),29),n||Y7),e),t)},Q.fi=function(){return YL(),Y7},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:YE(this,null);return;case 2:Sk(this,!0);return;case 3:Ck(this,!0);return;case 4:sE(this,0);return;case 5:cE(this,1);return;case 8:ek(this,null);return;case 9:n=oN(this,null,null),n&&n.mj();return;case 11:!this.d&&(this.d=new Gm(L7,this,11)),cL(this.d);return;case 12:!this.c&&(this.c=new F(F7,this,12,10)),cL(this.c);return;case 13:this.a&&lL(this.a);return;case 14:this.b&&cL(this.b);return}xk(this,e-Qv((YL(),Y7)),OT((t=P(AD(this,16),29),t||Y7),e))},Q.mi=function(){var e,t;if(this.c)for(e=0,t=this.c.i;e<t;++e)Hh(H(this.c,e));OM(this),this.Bb|=1},L(ZW,`EOperationImpl`,403),q(500,744,CK,Jh),Q.oj=function(e,t){tSe(this,e,P(t,143))},Q.pj=function(e){sye(this,P(e,143))},Q.vj=function(e){return P(H(Qw(this.a),e),87).c||(YL(),q7)},Q.Aj=function(e){return P(jF(Qw(this.a),e),87).c||(YL(),q7)},Q.Bj=function(e,t){return NZe(this,e,P(t,143))},Q.Ji=function(){return!1},Q.Gj=function(e,t,n,r,i){return null},Q.qj=function(){return new Jue(this)},Q.rj=function(){cL(Qw(this.a))},Q.sj=function(e){return XJe(this,e)},Q.tj=function(e){for(var t,n=e.Jc();n.Ob();)if(t=n.Pb(),!XJe(this,t))return!1;return!0},Q.uj=function(e){var t,n,r;if(j(e,16)&&(r=P(e,16),r.gc()==Qw(this.a).i)){for(t=r.Jc(),n=new Jm(this);t.Ob();)if(A(t.Pb())!==A(yj(n)))return!1;return!0}return!1},Q.wj=function(){var e,t,n=1,r,i;for(t=new Jm(Qw(this.a));t.e!=t.i.gc();)e=P(yj(t),87),r=(i=e.c,i||(YL(),q7)),n=31*n+(r?qE(r):0);return n},Q.xj=function(e){var t,n,r=0,i;for(n=new Jm(Qw(this.a));n.e!=n.i.gc();){if(t=P(yj(n),87),A(e)===A((i=t.c,i||(YL(),q7))))return r;++r}return-1},Q.yj=function(){return Qw(this.a).i==0},Q.zj=function(){return null},Q.Cj=function(){return Qw(this.a).i},Q.Dj=function(){var e,t,n,r,i,a=Qw(this.a).i;for(i=V(Oq,lR,1,a,5,1),n=0,t=new Jm(Qw(this.a));t.e!=t.i.gc();)e=P(yj(t),87),i[n++]=(r=e.c,r||(YL(),q7));return i},Q.Ej=function(e){var t,n,r,i,a,o,s=Qw(this.a).i;for(e.length<s&&(i=uE(FO(e).c,s),e=i),e.length>s&&ly(e,s,null),r=0,n=new Jm(Qw(this.a));n.e!=n.i.gc();)t=P(yj(n),87),a=(o=t.c,o||(YL(),q7)),ly(e,r++,a);return e},Q.Fj=function(){var e,t,n,r,i=new yl;for(i.a+=`[`,e=Qw(this.a),t=0,r=Qw(this.a).i;t<r;)Np(i,$m((n=P(H(e,t),87).c,n||(YL(),q7)))),++t<r&&(i.a+=cR);return i.a+=`]`,i.a},Q.Hj=function(e){},Q.Jj=function(){return 13},Q.il=function(){return!0},Q.Kj=function(){return!1},Q.jl=function(){return!1},Q.kl=function(){return!1},Q.ll=function(){return!0},Q.$k=function(){return!1},Q.ml=function(){return!0},Q.dk=function(e){return j(e,143)},Q.Oj=function(){return IFe(this.a)},Q.Qi=function(){return!0},Q.Wi=function(){return!0},L(ZW,`EOperationImpl/1`,500),q(1331,2027,WR,Jue),Q.dd=function(e){return bE(this.a,e)},Q.gc=function(){return Qw(this.a.a).i},L(ZW,`EOperationImpl/1/1`,1331),q(1332,544,yK,ROe),Q.Ri=function(e,t){var n=P(Ik(this,e,t),87),r;return nm(this.e)&&pc(this,new yw(this.a,7,(YL(),GBt),G(t),(r=n.c,r||q7),e)),n},Q.Sj=function(e,t){return jJe(this,P(e,87),t)},Q.Tj=function(e,t){return AJe(this,P(e,87),t)},Q.Uj=function(e,t,n){return sQe(this,P(e,87),P(t,87),n)},Q.Gj=function(e,t,n,r,i){switch(e){case 3:return Ex(this,e,t,n,r,this.i>1);case 5:return Ex(this,e,t,n,r,this.i-P(n,16).gc()>0);default:return new nT(this.e,e,this.c,t,n,r,!0)}},Q.Rj=function(){return!0},Q.Oj=function(){return Jj(this)},Q.Ek=function(){cL(this)},L(ZW,`EOperationImpl/2`,1332),q(493,1,{2002:1,493:1},V_e),L(ZW,`EPackageImpl/1`,493),q(14,81,yK,F),Q.gl=function(){return this.d},Q.hl=function(){return this.b},Q.kl=function(){return!0},Q.b=0,L(oK,`EObjectContainmentWithInverseEList`,14),q(361,14,yK,ug),Q.ll=function(){return!0},Q.Ui=function(e,t){return TP(this,e,P(t,57))},L(oK,`EObjectContainmentWithInverseEList/Resolving`,361),q(313,361,yK,yv),Q.Li=function(){this.a.tb=null},L(ZW,`EPackageImpl/2`,313),q(1244,1,{},No),L(ZW,`EPackageImpl/3`,1244),q(721,44,eB,hfe),Q._b=function(e){return Cp(e)?Rb(this,e):!!L_(this.f,e)},L(ZW,`EPackageRegistryImpl`,721),q(504,293,{109:1,94:1,93:1,158:1,197:1,57:1,2081:1,114:1,470:1,52:1,100:1,161:1,504:1,293:1,117:1,118:1},kc),Q.xh=function(e){return w0e(this,e)},Q.Ih=function(e,t,n){var r,i,a;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return ih(),!!(this.Bb&256);case 3:return ih(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return ih(),a=this.t,a>1||a==-1;case 7:return ih(),i=this.s,i>=1;case 8:return t?OM(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?P(this.Cb,62):null}return Ow(this,e-Qv((YL(),Z7)),OT((r=P(AD(this,16),29),r||Z7),e),t,n)},Q.Ph=function(e,t,n){var r,i,a;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),jA(this.Ab,e,n);case 10:return this.Cb&&(n=(i=this.Db>>16,i>=0?w0e(this,n):this.Cb.Qh(this,-1-i,null,n))),vI(this,e,10,n)}return a=P(OT((r=P(AD(this,16),29),r||(YL(),Z7)),t),69),a.uk().xk(this,QA(this),t-Qv((YL(),Z7)),e,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 9:return ey(this,n);case 10:return vI(this,null,10,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),Z7)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),Z7)),e,n)},Q.Th=function(e){var t,n,r;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return r=this.t,r>1||r==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&xy(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&xy(this.q).i==0);case 10:return!!(this.Db>>16==10&&P(this.Cb,62))}return wS(this,e-Qv((YL(),Z7)),OT((t=P(AD(this,16),29),t||Z7),e))},Q.fi=function(){return YL(),Z7},L(ZW,`EParameterImpl`,504),q(103,451,{109:1,94:1,93:1,158:1,197:1,57:1,19:1,179:1,69:1,114:1,470:1,52:1,100:1,161:1,103:1,451:1,293:1,117:1,118:1,682:1},_Se),Q.Ih=function(e,t,n){var r,i,a,o;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return ih(),!!(this.Bb&256);case 3:return ih(),!!(this.Bb&512);case 4:return G(this.s);case 5:return G(this.t);case 6:return ih(),o=this.t,o>1||o==-1;case 7:return ih(),i=this.s,i>=1;case 8:return t?OM(this):this.r;case 9:return this.q;case 10:return ih(),(this.Bb&aK)!=0;case 11:return ih(),(this.Bb&QW)!=0;case 12:return ih(),(this.Bb&Hz)!=0;case 13:return this.j;case 14:return $P(this);case 15:return ih(),(this.Bb&lK)!=0;case 16:return ih(),(this.Bb&ER)!=0;case 17:return bx(this);case 18:return ih(),(this.Bb&XW)!=0;case 19:return ih(),a=Uj(this),!!(a&&(a.Bb&XW)!=0);case 20:return ih(),(this.Bb&Wz)!=0;case 21:return t?Uj(this):this.b;case 22:return t?fKe(this):TRe(this);case 23:return!this.a&&(this.a=new Km(E7,this,23)),this.a}return Ow(this,e-Qv((YL(),Q7)),OT((r=P(AD(this,16),29),r||Q7),e),t,n)},Q.Th=function(e){var t,n,r,i;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!(this.Bb&256);case 3:return!(this.Bb&512);case 4:return this.s!=0;case 5:return this.t!=1;case 6:return i=this.t,i>1||i==-1;case 7:return n=this.s,n>=1;case 8:return!!this.r&&!this.q.e&&xy(this.q).i==0;case 9:return!!this.q&&!(this.r&&!this.q.e&&xy(this.q).i==0);case 10:return(this.Bb&aK)==0;case 11:return(this.Bb&QW)!=0;case 12:return(this.Bb&Hz)!=0;case 13:return this.j!=null;case 14:return $P(this)!=null;case 15:return(this.Bb&lK)!=0;case 16:return(this.Bb&ER)!=0;case 17:return!!bx(this);case 18:return(this.Bb&XW)!=0;case 19:return r=Uj(this),!!r&&(r.Bb&XW)!=0;case 20:return(this.Bb&Wz)==0;case 21:return!!this.b;case 22:return!!TRe(this);case 23:return!!this.a&&this.a.i!=0}return wS(this,e-Qv((YL(),Q7)),OT((t=P(AD(this,16),29),t||Q7),e))},Q.$h=function(e,t){var n,r;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:Ix(this,Vh(t));return;case 2:Sk(this,Zc(Bh(t)));return;case 3:Ck(this,Zc(Bh(t)));return;case 4:sE(this,P(t,15).a);return;case 5:cE(this,P(t,15).a);return;case 8:ek(this,P(t,143));return;case 9:r=oN(this,P(t,87),null),r&&r.mj();return;case 10:zk(this,Zc(Bh(t)));return;case 11:Vk(this,Zc(Bh(t)));return;case 12:Bk(this,Zc(Bh(t)));return;case 13:G_e(this,Vh(t));return;case 15:Rk(this,Zc(Bh(t)));return;case 16:nA(this,Zc(Bh(t)));return;case 18:ZNe(this,Zc(Bh(t)));return;case 20:kYe(this,Zc(Bh(t)));return;case 21:BUe(this,P(t,19));return;case 23:!this.a&&(this.a=new Km(E7,this,23)),cL(this.a),!this.a&&(this.a=new Km(E7,this,23)),$v(this.a,P(t,18));return}lA(this,e-Qv((YL(),Q7)),OT((n=P(AD(this,16),29),n||Q7),e),t)},Q.fi=function(){return YL(),Q7},Q.hi=function(e){var t,n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:j(this.Cb,88)&&eP(sC(P(this.Cb,88)),4),YE(this,null);return;case 2:Sk(this,!0);return;case 3:Ck(this,!0);return;case 4:sE(this,0);return;case 5:cE(this,1);return;case 8:ek(this,null);return;case 9:n=oN(this,null,null),n&&n.mj();return;case 10:zk(this,!0);return;case 11:Vk(this,!1);return;case 12:Bk(this,!1);return;case 13:this.i=null,NE(this,null);return;case 15:Rk(this,!1);return;case 16:nA(this,!1);return;case 18:OYe(this,!1),j(this.Cb,88)&&eP(sC(P(this.Cb,88)),2);return;case 20:kYe(this,!0);return;case 21:BUe(this,null);return;case 23:!this.a&&(this.a=new Km(E7,this,23)),cL(this.a);return}xk(this,e-Qv((YL(),Q7)),OT((t=P(AD(this,16),29),t||Q7),e))},Q.mi=function(){fKe(this),nb(Xw((zN(),l9),this)),OM(this),this.Bb|=1},Q.sk=function(){return Uj(this)},Q.Zk=function(){var e=Uj(this);return!!e&&(e.Bb&XW)!=0},Q.$k=function(){return(this.Bb&XW)!=0},Q._k=function(){return(this.Bb&Wz)!=0},Q.Wk=function(e,t){return this.c=null,kJe(this,e,t)},Q.Ib=function(){var e;return this.Db&64?YF(this):(e=new eh(YF(this)),e.a+=` (containment: `,$l(e,(this.Bb&XW)!=0),e.a+=`, resolveProxies: `,$l(e,(this.Bb&Wz)!=0),e.a+=`)`,e.a)},L(ZW,`EReferenceImpl`,103),q(550,118,{109:1,45:1,94:1,93:1,136:1,57:1,114:1,52:1,100:1,550:1,117:1,118:1},Po),Q.Fb=function(e){return this===e},Q.jd=function(){return this.b},Q.kd=function(){return this.c},Q.Hb=function(){return lh(this)},Q.Ai=function(e){rOe(this,Vh(e))},Q.ld=function(e){return TDe(this,Vh(e))},Q.Ih=function(e,t,n){var r;switch(e){case 0:return this.b;case 1:return this.c}return Ow(this,e-Qv((YL(),$7)),OT((r=P(AD(this,16),29),r||$7),e),t,n)},Q.Th=function(e){var t;switch(e){case 0:return this.b!=null;case 1:return this.c!=null}return wS(this,e-Qv((YL(),$7)),OT((t=P(AD(this,16),29),t||$7),e))},Q.$h=function(e,t){var n;switch(e){case 0:iOe(this,Vh(t));return;case 1:SUe(this,Vh(t));return}lA(this,e-Qv((YL(),$7)),OT((n=P(AD(this,16),29),n||$7),e),t)},Q.fi=function(){return YL(),$7},Q.hi=function(e){var t;switch(e){case 0:EUe(this,null);return;case 1:SUe(this,null);return}xk(this,e-Qv((YL(),$7)),OT((t=P(AD(this,16),29),t||$7),e))},Q.yi=function(){var e;return this.a==-1&&(e=this.b,this.a=e==null?0:DO(e)),this.a},Q.zi=function(e){this.a=e},Q.Ib=function(){var e;return this.Db&64?FP(this):(e=new eh(FP(this)),e.a+=` (key: `,Np(e,this.b),e.a+=`, value: `,Np(e,this.c),e.a+=`)`,e.a)},Q.a=-1,Q.b=null,Q.c=null;var o9=L(ZW,`EStringToStringMapEntryImpl`,550),$Bt=g_(oK,`FeatureMap/Entry/Internal`);q(562,1,EK),Q.vl=function(e){return this.wl(P(e,52))},Q.wl=function(e){return this.vl(e)},Q.Fb=function(e){var t,n;return this===e?!0:j(e,75)?(t=P(e,75),t.Jk()==this.c&&(n=this.kd(),n==null?t.kd()==null:yk(n,t.kd()))):!1},Q.Jk=function(){return this.c},Q.Hb=function(){var e=this.kd();return qE(this.c)^(e==null?0:qE(e))},Q.Ib=function(){var e=this.c,t=KT(e.ok()).vi();return e.ve(),(t!=null&&t.length!=0?t+`:`+e.ve():e.ve())+`=`+this.kd()},L(ZW,`EStructuralFeatureImpl/BasicFeatureMapEntry`,562),q(778,562,EK,oCe),Q.wl=function(e){return new oCe(this.c,e)},Q.kd=function(){return this.a},Q.xl=function(e,t,n){return DWe(this,e,this.a,t,n)},Q.yl=function(e,t,n){return OWe(this,e,this.a,t,n)},L(ZW,`EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry`,778),q(1305,1,{},H_e),Q.wk=function(e,t,n,r,i){return P(Cw(e,this.b),219).Wl(this.a).Dk(r)},Q.xk=function(e,t,n,r,i){return P(Cw(e,this.b),219).Nl(this.a,r,i)},Q.yk=function(e,t,n,r,i){return P(Cw(e,this.b),219).Ol(this.a,r,i)},Q.zk=function(e,t,n){return P(Cw(e,this.b),219).Wl(this.a).Oj()},Q.Ak=function(e,t,n,r){P(Cw(e,this.b),219).Wl(this.a).Wb(r)},Q.Bk=function(e,t,n){return P(Cw(e,this.b),219).Wl(this.a)},Q.Ck=function(e,t,n){P(Cw(e,this.b),219).Wl(this.a).Ek()},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator`,1305),q(89,1,{},Ig,xb,Ub,LS),Q.wk=function(e,t,n,r,i){var a=t.ii(n);if(a??t.ji(n,a=HL(this,e)),!i)switch(this.e){case 50:case 41:return P(a,587)._j();case 40:return P(a,219).Tl()}return a},Q.xk=function(e,t,n,r,i){var a,o=t.ii(n);return o??t.ji(n,o=HL(this,e)),a=P(o,72).Uk(r,i),a},Q.yk=function(e,t,n,r,i){var a=t.ii(n);return a!=null&&(i=P(a,72).Vk(r,i)),i},Q.zk=function(e,t,n){var r=t.ii(n);return r!=null&&P(r,78).Oj()},Q.Ak=function(e,t,n,r){var i=P(t.ii(n),78);!i&&t.ji(n,i=HL(this,e)),i.Wb(r)},Q.Bk=function(e,t,n){var r,i=t.ii(n);return i??t.ji(n,i=HL(this,e)),j(i,78)?P(i,78):(r=P(t.ii(n),16),new Yue(r))},Q.Ck=function(e,t,n){var r=P(t.ii(n),78);!r&&t.ji(n,r=HL(this,e)),r.Ek()},Q.b=0,Q.e=0,L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateMany`,89),q(499,1,{}),Q.xk=function(e,t,n,r,i){throw E(new sc)},Q.yk=function(e,t,n,r,i){throw E(new sc)},Q.Bk=function(e,t,n){return new Cje(this,e,t,n)};var s9;L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingle`,499),q(1322,1,sK,Cje),Q.Dk=function(e){return this.a.wk(this.c,this.d,this.b,e,!0)},Q.Oj=function(){return this.a.zk(this.c,this.d,this.b)},Q.Wb=function(e){this.a.Ak(this.c,this.d,this.b,e)},Q.Ek=function(){this.a.Ck(this.c,this.d,this.b)},Q.b=0,L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingle/1`,1322),q(771,499,{},YMe),Q.wk=function(e,t,n,r,i){return oI(e,e.Mh(),e.Ch())==this.b?this._k()&&r?OP(e):e.Mh():null},Q.xk=function(e,t,n,r,i){var a,o;return e.Mh()&&(i=(a=e.Ch(),a>=0?e.xh(i):e.Mh().Qh(e,-1-a,null,i))),o=wA(e.Ah(),this.e),e.zh(r,o,i)},Q.yk=function(e,t,n,r,i){var a=wA(e.Ah(),this.e);return e.zh(null,a,i)},Q.zk=function(e,t,n){var r=wA(e.Ah(),this.e);return!!e.Mh()&&e.Ch()==r},Q.Ak=function(e,t,n,r){var i,a,o,s,c;if(r!=null&&!CI(this.a,r))throw E(new qc(DK+(j(r,57)?V2e(P(r,57).Ah()):gHe(FO(r)))+OK+this.a+`'`));if(i=e.Mh(),o=wA(e.Ah(),this.e),A(r)!==A(i)||e.Ch()!=o&&r!=null){if(EM(e,P(r,57)))throw E(new Jc(eG+e.Ib()));c=null,i&&(c=(a=e.Ch(),a>=0?e.xh(c):e.Mh().Qh(e,-1-a,null,c))),s=P(r,52),s&&(c=s.Oh(e,wA(s.Ah(),this.b),null,c)),c=e.zh(s,o,c),c&&c.mj()}else e.sh()&&e.th()&&SD(e,new bv(e,1,o,r,r))},Q.Ck=function(e,t,n){var r=e.Mh(),i,a,o;r?(o=(i=e.Ch(),i>=0?e.xh(null):e.Mh().Qh(e,-1-i,null,null)),a=wA(e.Ah(),this.e),o=e.zh(null,a,o),o&&o.mj()):e.sh()&&e.th()&&SD(e,new xv(e,1,this.e,null,null))},Q._k=function(){return!1},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleContainer`,771),q(1306,771,{},PEe),Q._k=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving`,1306),q(560,499,{}),Q.wk=function(e,t,n,r,i){var a=t.ii(n);return a==null?this.b:A(a)===A(s9)?null:a},Q.zk=function(e,t,n){var r=t.ii(n);return r!=null&&(A(r)===A(s9)||!yk(r,this.b))},Q.Ak=function(e,t,n,r){var i,a;e.sh()&&e.th()?(i=(a=t.ii(n),a==null?this.b:A(a)===A(s9)?null:a),r==null?this.c==null?this.b==null?t.ji(n,null):t.ji(n,s9):(t.ji(n,null),r=this.b):(this.zl(r),t.ji(n,r)),SD(e,this.d.Al(e,1,this.e,i,r))):r==null?this.c==null?this.b==null?t.ji(n,null):t.ji(n,s9):t.ji(n,null):(this.zl(r),t.ji(n,r))},Q.Ck=function(e,t,n){var r,i;e.sh()&&e.th()?(r=(i=t.ii(n),i==null?this.b:A(i)===A(s9)?null:i),t.ki(n),SD(e,this.d.Al(e,1,this.e,r,this.b))):t.ki(n)},Q.zl=function(e){throw E(new Sde)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData`,560),q(kK,1,{},Fo),Q.Al=function(e,t,n,r,i){return new xv(e,t,n,r,i)},Q.Bl=function(e,t,n,r,i,a){return new Mb(e,t,n,r,i,a)};var eVt,tVt,nVt,rVt,iVt,aVt,oVt,c9,sVt;L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator`,kK),q(1323,kK,{},tre),Q.Al=function(e,t,n,r,i){return new uC(e,t,n,Zc(Bh(r)),Zc(Bh(i)))},Q.Bl=function(e,t,n,r,i,a){return new xFe(e,t,n,Zc(Bh(r)),Zc(Bh(i)),a)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1`,1323),q(1324,kK,{},nre),Q.Al=function(e,t,n,r,i){return new FHe(e,t,n,P(r,221).a,P(i,221).a)},Q.Bl=function(e,t,n,r,i,a){return new SFe(e,t,n,P(r,221).a,P(i,221).a,a)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2`,1324),q(1325,kK,{},Io),Q.Al=function(e,t,n,r,i){return new IHe(e,t,n,P(r,180).a,P(i,180).a)},Q.Bl=function(e,t,n,r,i,a){return new CFe(e,t,n,P(r,180).a,P(i,180).a,a)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3`,1325),q(1326,kK,{},rre),Q.Al=function(e,t,n,r,i){return new fC(e,t,n,D(N(r)),D(N(i)))},Q.Bl=function(e,t,n,r,i,a){return new wFe(e,t,n,D(N(r)),D(N(i)),a)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4`,1326),q(1327,kK,{},ire),Q.Al=function(e,t,n,r,i){return new zHe(e,t,n,P(r,164).a,P(i,164).a)},Q.Bl=function(e,t,n,r,i,a){return new TFe(e,t,n,P(r,164).a,P(i,164).a,a)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5`,1327),q(1328,kK,{},Lo),Q.Al=function(e,t,n,r,i){return new dC(e,t,n,P(r,15).a,P(i,15).a)},Q.Bl=function(e,t,n,r,i,a){return new EFe(e,t,n,P(r,15).a,P(i,15).a,a)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6`,1328),q(1329,kK,{},are),Q.Al=function(e,t,n,r,i){return new LHe(e,t,n,P(r,190).a,P(i,190).a)},Q.Bl=function(e,t,n,r,i,a){return new DFe(e,t,n,P(r,190).a,P(i,190).a,a)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7`,1329),q(1330,kK,{},ore),Q.Al=function(e,t,n,r,i){return new RHe(e,t,n,P(r,191).a,P(i,191).a)},Q.Bl=function(e,t,n,r,i,a){return new OFe(e,t,n,P(r,191).a,P(i,191).a,a)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8`,1330),q(1308,560,{},Dje),Q.zl=function(e){if(!this.a.dk(e))throw E(new qc(DK+FO(e)+OK+this.a+`'`))},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic`,1308),q(1309,560,{},zOe),Q.zl=function(e){},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic`,1309),q(772,560,{}),Q.zk=function(e,t,n){return t.ii(n)!=null},Q.Ak=function(e,t,n,r){var i,a;e.sh()&&e.th()?(i=!0,a=t.ii(n),a==null?(i=!1,a=this.b):A(a)===A(s9)&&(a=null),r==null?this.c==null?t.ji(n,s9):(t.ji(n,null),r=this.b):(this.zl(r),t.ji(n,r)),SD(e,this.d.Bl(e,1,this.e,a,r,!i))):r==null?this.c==null?t.ji(n,s9):t.ji(n,null):(this.zl(r),t.ji(n,r))},Q.Ck=function(e,t,n){var r,i;e.sh()&&e.th()?(r=!0,i=t.ii(n),i==null?(r=!1,i=this.b):A(i)===A(s9)&&(i=null),t.ki(n),SD(e,this.d.Bl(e,2,this.e,i,this.b,r))):t.ki(n)},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable`,772),q(1310,772,{},Oje),Q.zl=function(e){if(!this.a.dk(e))throw E(new qc(DK+FO(e)+OK+this.a+`'`))},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic`,1310),q(1311,772,{},BOe),Q.zl=function(e){},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic`,1311),q(402,499,{},D_),Q.wk=function(e,t,n,r,i){var a,o,s,c,l=t.ii(n);if(this.rk()&&A(l)===A(s9))return null;if(this._k()&&r&&l!=null){if(s=P(l,52),s.Sh()&&(c=uk(e,s),s!=c)){if(!CI(this.a,c))throw E(new qc(DK+FO(c)+OK+this.a+`'`));t.ji(n,l=c),this.$k()&&(a=P(c,52),o=s.Qh(e,this.b?wA(s.Ah(),this.b):-1-wA(e.Ah(),this.e),null,null),!a.Mh()&&(o=a.Oh(e,this.b?wA(a.Ah(),this.b):-1-wA(e.Ah(),this.e),null,o)),o&&o.mj()),e.sh()&&e.th()&&SD(e,new xv(e,9,this.e,s,c))}return l}return l},Q.xk=function(e,t,n,r,i){var a,o=t.ii(n);return A(o)===A(s9)&&(o=null),t.ji(n,r),this.Kj()?A(o)!==A(r)&&o!=null&&(a=P(o,52),i=a.Qh(e,wA(a.Ah(),this.b),null,i)):this.$k()&&o!=null&&(i=P(o,52).Qh(e,-1-wA(e.Ah(),this.e),null,i)),e.sh()&&e.th()&&(!i&&(i=new ql(4)),i.lj(new xv(e,1,this.e,o,r))),i},Q.yk=function(e,t,n,r,i){var a=t.ii(n);return A(a)===A(s9)&&(a=null),t.ki(n),e.sh()&&e.th()&&(!i&&(i=new ql(4)),this.rk()?i.lj(new xv(e,2,this.e,a,null)):i.lj(new xv(e,1,this.e,a,null))),i},Q.zk=function(e,t,n){return t.ii(n)!=null},Q.Ak=function(e,t,n,r){var i,a,o,s,c;if(r!=null&&!CI(this.a,r))throw E(new qc(DK+(j(r,57)?V2e(P(r,57).Ah()):gHe(FO(r)))+OK+this.a+`'`));c=t.ii(n),s=c!=null,this.rk()&&A(c)===A(s9)&&(c=null),o=null,this.Kj()?A(c)!==A(r)&&(c!=null&&(i=P(c,52),o=i.Qh(e,wA(i.Ah(),this.b),null,o)),r!=null&&(i=P(r,52),o=i.Oh(e,wA(i.Ah(),this.b),null,o))):this.$k()&&A(c)!==A(r)&&(c!=null&&(o=P(c,52).Qh(e,-1-wA(e.Ah(),this.e),null,o)),r!=null&&(o=P(r,52).Oh(e,-1-wA(e.Ah(),this.e),null,o))),r==null&&this.rk()?t.ji(n,s9):t.ji(n,r),e.sh()&&e.th()?(a=new Mb(e,1,this.e,c,r,this.rk()&&!s),o?(o.lj(a),o.mj()):SD(e,a)):o&&o.mj()},Q.Ck=function(e,t,n){var r,i,a,o,s=t.ii(n);o=s!=null,this.rk()&&A(s)===A(s9)&&(s=null),a=null,s!=null&&(this.Kj()?(r=P(s,52),a=r.Qh(e,wA(r.Ah(),this.b),null,a)):this.$k()&&(a=P(s,52).Qh(e,-1-wA(e.Ah(),this.e),null,a))),t.ki(n),e.sh()&&e.th()?(i=new Mb(e,this.rk()?2:1,this.e,s,null,o),a?(a.lj(i),a.mj()):SD(e,i)):a&&a.mj()},Q.Kj=function(){return!1},Q.$k=function(){return!1},Q._k=function(){return!1},Q.rk=function(){return!1},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObject`,402),q(561,402,{},Lh),Q.$k=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment`,561),q(1314,561,{},aSe),Q._k=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving`,1314),q(774,561,{},oSe),Q.rk=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable`,774),q(1316,774,{},sSe),Q._k=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving`,1316),q(639,561,{},Lg),Q.Kj=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse`,639),q(1315,639,{},LEe),Q._k=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving`,1315),q(775,639,{},REe),Q.rk=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable`,775),q(1317,775,{},zEe),Q._k=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving`,1317),q(640,402,{},rSe),Q._k=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving`,640),q(1318,640,{},cSe),Q.rk=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable`,1318),q(776,640,{},FEe),Q.Kj=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse`,776),q(1319,776,{},BEe),Q.rk=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable`,1319),q(1312,402,{},iSe),Q.rk=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable`,1312),q(773,402,{},IEe),Q.Kj=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse`,773),q(1313,773,{},VEe),Q.rk=function(){return!0},L(ZW,`EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable`,1313),q(777,562,EK,vy),Q.wl=function(e){return new vy(this.a,this.c,e)},Q.kd=function(){return this.b},Q.xl=function(e,t,n){return Ize(this,e,this.b,n)},Q.yl=function(e,t,n){return Lze(this,e,this.b,n)},L(ZW,`EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry`,777),q(1320,1,sK,Yue),Q.Dk=function(e){return this.a},Q.Oj=function(){return j(this.a,98)?P(this.a,98).Oj():!this.a.dc()},Q.Wb=function(e){this.a.$b(),this.a.Fc(P(e,16))},Q.Ek=function(){j(this.a,98)?P(this.a,98).Ek():this.a.$b()},L(ZW,`EStructuralFeatureImpl/SettingMany`,1320),q(1321,562,EK,PLe),Q.vl=function(e){return new ag((pL(),k9),this.b.oi(this.a,e))},Q.kd=function(){return null},Q.xl=function(e,t,n){return n},Q.yl=function(e,t,n){return n},L(ZW,`EStructuralFeatureImpl/SimpleContentFeatureMapEntry`,1321),q(641,562,EK,ag),Q.vl=function(e){return new ag(this.c,e)},Q.kd=function(){return this.a},Q.xl=function(e,t,n){return n},Q.yl=function(e,t,n){return n},L(ZW,`EStructuralFeatureImpl/SimpleFeatureMapEntry`,641),q(396,492,LG,Ro),Q.$i=function(e){return V(O7,lR,29,e,0,1)},Q.Wi=function(){return!1},L(ZW,`ESuperAdapter/1`,396),q(446,439,{109:1,94:1,93:1,158:1,197:1,57:1,114:1,835:1,52:1,100:1,161:1,446:1,117:1,118:1},zo),Q.Ih=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new k_(this,M7,this)),this.a}return Ow(this,e-Qv((YL(),e9)),OT((r=P(AD(this,16),29),r||e9),e),t,n)},Q.Rh=function(e,t,n){var r,i;switch(t){case 0:return!this.Ab&&(this.Ab=new F(C7,this,0,3)),kj(this.Ab,e,n);case 2:return!this.a&&(this.a=new k_(this,M7,this)),kj(this.a,e,n)}return i=P(OT((r=P(AD(this,16),29),r||(YL(),e9)),t),69),i.uk().yk(this,QA(this),t-Qv((YL(),e9)),e,n)},Q.Th=function(e){var t;switch(e){case 0:return!!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return!!this.a&&this.a.i!=0}return wS(this,e-Qv((YL(),e9)),OT((t=P(AD(this,16),29),t||e9),e))},Q.$h=function(e,t){var n;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab),!this.Ab&&(this.Ab=new F(C7,this,0,3)),$v(this.Ab,P(t,18));return;case 1:YE(this,Vh(t));return;case 2:!this.a&&(this.a=new k_(this,M7,this)),cL(this.a),!this.a&&(this.a=new k_(this,M7,this)),$v(this.a,P(t,18));return}lA(this,e-Qv((YL(),e9)),OT((n=P(AD(this,16),29),n||e9),e),t)},Q.fi=function(){return YL(),e9},Q.hi=function(e){var t;switch(e){case 0:!this.Ab&&(this.Ab=new F(C7,this,0,3)),cL(this.Ab);return;case 1:YE(this,null);return;case 2:!this.a&&(this.a=new k_(this,M7,this)),cL(this.a);return}xk(this,e-Qv((YL(),e9)),OT((t=P(AD(this,16),29),t||e9),e))},L(ZW,`ETypeParameterImpl`,446),q(447,81,yK,k_),Q.Lj=function(e,t){return Y4e(this,P(e,87),t)},Q.Mj=function(e,t){return X4e(this,P(e,87),t)},L(ZW,`ETypeParameterImpl/1`,447),q(638,44,eB,Ac),Q.ec=function(){return new Rs(this)},L(ZW,`ETypeParameterImpl/2`,638),q(557,bR,xR,Rs),Q.Ec=function(e){return BCe(this,P(e,87))},Q.Fc=function(e){var t,n,r=!1;for(n=e.Jc();n.Ob();)t=P(n.Pb(),87),Hy(this.a,t,``)??(r=!0);return r},Q.$b=function(){Lv(this.a)},Q.Gc=function(e){return Ov(this.a,e)},Q.Jc=function(){return new zs(new yD(new ps(this.a).a))},Q.Kc=function(e){return JRe(this,e)},Q.gc=function(){return xu(this.a)},L(ZW,`ETypeParameterImpl/2/1`,557),q(558,1,gR,zs),Q.Nb=function(e){jv(this,e)},Q.Pb=function(){return P(PE(this.a).jd(),87)},Q.Ob=function(){return this.a.b},Q.Qb=function(){ZBe(this.a)},L(ZW,`ETypeParameterImpl/2/1/1`,558),q(1282,44,eB,gfe),Q._b=function(e){return Cp(e)?Rb(this,e):!!L_(this.f,e)},Q.xc=function(e){var t=Cp(e)?ix(this,e):Tp(L_(this.f,e)),n;return j(t,836)?(n=P(t,836),t=n.Ik(),Hy(this,P(e,241),t),t):t??(e==null?(id(),hVt):null)},L(ZW,`EValidatorRegistryImpl`,1282),q(1304,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,2005:1,52:1,100:1,161:1,117:1,118:1},sre),Q.oi=function(e,t){switch(e.fk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return t==null?null:uA(t);case 25:return pHe(t);case 27:return fBe(t);case 28:return pBe(t);case 29:return t==null?null:zye(n7[0],P(t,205));case 41:return t==null?``:tu(P(t,298));case 42:return uA(t);case 50:return Vh(t);default:throw E(new Jc(tG+e.ve()+nG))}},Q.pi=function(e){var t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g;switch(e.G==-1&&(e.G=(f=KT(e),f?Ij(f.si(),e):-1)),e.G){case 0:return n=new Dc,n;case 1:return t=new ko,t;case 2:return r=new qae,r;case 4:return i=new lc,i;case 5:return a=new mfe,a;case 6:return o=new pde,o;case 7:return s=new Kae,s;case 10:return l=new Do,l;case 11:return u=new Oc,u;case 12:return d=new Zje,d;case 13:return p=new kc,p;case 14:return m=new _Se,m;case 17:return h=new Po,h;case 18:return c=new qs,c;case 19:return g=new zo,g;default:throw E(new Jc(aG+e.zb+nG))}},Q.qi=function(e,t){switch(e.fk()){case 20:return t==null?null:new pme(t);case 21:return t==null?null:new pm(t);case 23:case 22:return t==null?null:OZe(t);case 26:case 24:return t==null?null:aT(hI(t,-128,127)<<24>>24);case 25:return J9e(t);case 27:return T1e(t);case 28:return E1e(t);case 29:return E3e(t);case 32:case 31:return t==null?null:xN(t);case 38:case 37:return t==null?null:new jde(t);case 40:case 39:return t==null?null:G(hI(t,YR,iR));case 41:return null;case 42:return null;case 44:case 43:return t==null?null:tj(OL(t));case 49:case 48:return t==null?null:fk(hI(t,jK,32767)<<16>>16);case 50:return t;default:throw E(new Jc(tG+e.ve()+nG))}},L(ZW,`EcoreFactoryImpl`,1304),q(549,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,2003:1,52:1,100:1,161:1,184:1,549:1,117:1,118:1,680:1},WAe),Q.gb=!1,Q.hb=!1;var cVt,lVt=!1;L(ZW,`EcorePackageImpl`,549),q(1200,1,{836:1},cre),Q.Ik=function(){return Dbe(),gVt},L(ZW,`EcorePackageImpl/1`,1200),q(1209,1,IK,Bo),Q.dk=function(e){return j(e,158)},Q.ek=function(e){return V(K5,lR,158,e,0,1)},L(ZW,`EcorePackageImpl/10`,1209),q(1210,1,IK,Vo),Q.dk=function(e){return j(e,197)},Q.ek=function(e){return V(J5,lR,197,e,0,1)},L(ZW,`EcorePackageImpl/11`,1210),q(1211,1,IK,Ho),Q.dk=function(e){return j(e,57)},Q.ek=function(e){return V(R5,lR,57,e,0,1)},L(ZW,`EcorePackageImpl/12`,1211),q(1212,1,IK,Uo),Q.dk=function(e){return j(e,403)},Q.ek=function(e){return V(N7,vK,62,e,0,1)},L(ZW,`EcorePackageImpl/13`,1212),q(1213,1,IK,lre),Q.dk=function(e){return j(e,241)},Q.ek=function(e){return V(Y5,lR,241,e,0,1)},L(ZW,`EcorePackageImpl/14`,1213),q(1214,1,IK,Wo),Q.dk=function(e){return j(e,504)},Q.ek=function(e){return V(F7,lR,2081,e,0,1)},L(ZW,`EcorePackageImpl/15`,1214),q(1215,1,IK,Go),Q.dk=function(e){return j(e,103)},Q.ek=function(e){return V(I7,_K,19,e,0,1)},L(ZW,`EcorePackageImpl/16`,1215),q(1216,1,IK,Ko),Q.dk=function(e){return j(e,179)},Q.ek=function(e){return V(T7,_K,179,e,0,1)},L(ZW,`EcorePackageImpl/17`,1216),q(1217,1,IK,ure),Q.dk=function(e){return j(e,470)},Q.ek=function(e){return V(w7,lR,470,e,0,1)},L(ZW,`EcorePackageImpl/18`,1217),q(1218,1,IK,dre),Q.dk=function(e){return j(e,550)},Q.ek=function(e){return V(o9,nbt,550,e,0,1)},L(ZW,`EcorePackageImpl/19`,1218),q(1201,1,IK,fre),Q.dk=function(e){return j(e,335)},Q.ek=function(e){return V(E7,_K,38,e,0,1)},L(ZW,`EcorePackageImpl/2`,1201),q(1219,1,IK,pre),Q.dk=function(e){return j(e,248)},Q.ek=function(e){return V(M7,ybt,87,e,0,1)},L(ZW,`EcorePackageImpl/20`,1219),q(1220,1,IK,mre),Q.dk=function(e){return j(e,446)},Q.ek=function(e){return V(L7,lR,835,e,0,1)},L(ZW,`EcorePackageImpl/21`,1220),q(1221,1,IK,hre),Q.dk=function(e){return xp(e)},Q.ek=function(e){return V(oJ,X,473,e,8,1)},L(ZW,`EcorePackageImpl/22`,1221),q(1222,1,IK,gre),Q.dk=function(e){return j(e,195)},Q.ek=function(e){return V(X9,X,195,e,0,2)},L(ZW,`EcorePackageImpl/23`,1222),q(1223,1,IK,_re),Q.dk=function(e){return j(e,221)},Q.ek=function(e){return V(sJ,X,221,e,0,1)},L(ZW,`EcorePackageImpl/24`,1223),q(1224,1,IK,vre),Q.dk=function(e){return j(e,180)},Q.ek=function(e){return V(lJ,X,180,e,0,1)},L(ZW,`EcorePackageImpl/25`,1224),q(1225,1,IK,yre),Q.dk=function(e){return j(e,205)},Q.ek=function(e){return V(Qq,X,205,e,0,1)},L(ZW,`EcorePackageImpl/26`,1225),q(1226,1,IK,bre),Q.dk=function(e){return!1},Q.ek=function(e){return V(sHt,lR,2177,e,0,1)},L(ZW,`EcorePackageImpl/27`,1226),q(1227,1,IK,xre),Q.dk=function(e){return Sp(e)},Q.ek=function(e){return V(dJ,X,346,e,7,1)},L(ZW,`EcorePackageImpl/28`,1227),q(1228,1,IK,Sre),Q.dk=function(e){return j(e,61)},Q.ek=function(e){return V(gBt,MB,61,e,0,1)},L(ZW,`EcorePackageImpl/29`,1228),q(1202,1,IK,Cre),Q.dk=function(e){return j(e,505)},Q.ek=function(e){return V(C7,{3:1,4:1,5:1,1998:1},588,e,0,1)},L(ZW,`EcorePackageImpl/3`,1202),q(1229,1,IK,wre),Q.dk=function(e){return j(e,568)},Q.ek=function(e){return V(SBt,lR,2004,e,0,1)},L(ZW,`EcorePackageImpl/30`,1229),q(1230,1,IK,Tre),Q.dk=function(e){return j(e,163)},Q.ek=function(e){return V(mVt,MB,163,e,0,1)},L(ZW,`EcorePackageImpl/31`,1230),q(1231,1,IK,Ere),Q.dk=function(e){return j(e,75)},Q.ek=function(e){return V(t9,Obt,75,e,0,1)},L(ZW,`EcorePackageImpl/32`,1231),q(1232,1,IK,Dre),Q.dk=function(e){return j(e,164)},Q.ek=function(e){return V(fJ,X,164,e,0,1)},L(ZW,`EcorePackageImpl/33`,1232),q(1233,1,IK,Ore),Q.dk=function(e){return j(e,15)},Q.ek=function(e){return V(pJ,X,15,e,0,1)},L(ZW,`EcorePackageImpl/34`,1233),q(1234,1,IK,kre),Q.dk=function(e){return j(e,298)},Q.ek=function(e){return V(kq,lR,298,e,0,1)},L(ZW,`EcorePackageImpl/35`,1234),q(1235,1,IK,Are),Q.dk=function(e){return j(e,190)},Q.ek=function(e){return V(hJ,X,190,e,0,1)},L(ZW,`EcorePackageImpl/36`,1235),q(1236,1,IK,jre),Q.dk=function(e){return j(e,92)},Q.ek=function(e){return V(jq,lR,92,e,0,1)},L(ZW,`EcorePackageImpl/37`,1236),q(1237,1,IK,Mre),Q.dk=function(e){return j(e,589)},Q.ek=function(e){return V(uVt,lR,589,e,0,1)},L(ZW,`EcorePackageImpl/38`,1237),q(1238,1,IK,Nre),Q.dk=function(e){return!1},Q.ek=function(e){return V(cHt,lR,2178,e,0,1)},L(ZW,`EcorePackageImpl/39`,1238),q(1203,1,IK,Pre),Q.dk=function(e){return j(e,88)},Q.ek=function(e){return V(O7,lR,29,e,0,1)},L(ZW,`EcorePackageImpl/4`,1203),q(1239,1,IK,Fre),Q.dk=function(e){return j(e,191)},Q.ek=function(e){return V(bJ,X,191,e,0,1)},L(ZW,`EcorePackageImpl/40`,1239),q(1240,1,IK,Ire),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(ZW,`EcorePackageImpl/41`,1240),q(1241,1,IK,Lre),Q.dk=function(e){return j(e,586)},Q.ek=function(e){return V(vBt,lR,586,e,0,1)},L(ZW,`EcorePackageImpl/42`,1241),q(1242,1,IK,Rre),Q.dk=function(e){return!1},Q.ek=function(e){return V(lHt,X,2179,e,0,1)},L(ZW,`EcorePackageImpl/43`,1242),q(1243,1,IK,zre),Q.dk=function(e){return j(e,45)},Q.ek=function(e){return V(Fq,FR,45,e,0,1)},L(ZW,`EcorePackageImpl/44`,1243),q(1204,1,IK,Bre),Q.dk=function(e){return j(e,143)},Q.ek=function(e){return V(D7,lR,143,e,0,1)},L(ZW,`EcorePackageImpl/5`,1204),q(1205,1,IK,Vre),Q.dk=function(e){return j(e,159)},Q.ek=function(e){return V(k7,lR,159,e,0,1)},L(ZW,`EcorePackageImpl/6`,1205),q(1206,1,IK,Hre),Q.dk=function(e){return j(e,459)},Q.ek=function(e){return V(A7,lR,675,e,0,1)},L(ZW,`EcorePackageImpl/7`,1206),q(1207,1,IK,Ure),Q.dk=function(e){return j(e,568)},Q.ek=function(e){return V(j7,lR,684,e,0,1)},L(ZW,`EcorePackageImpl/8`,1207),q(1208,1,IK,Wre),Q.dk=function(e){return j(e,469)},Q.ek=function(e){return V(q5,lR,469,e,0,1)},L(ZW,`EcorePackageImpl/9`,1208),q(1020,2045,tbt,rpe),Q.Ki=function(e,t){NJe(this,P(t,415))},Q.Oi=function(e,t){O8e(this,e,P(t,415))},L(ZW,`MinimalEObjectImpl/1ArrayDelegatingAdapterList`,1020),q(1021,151,tK,bAe),Q.hj=function(){return this.a.a},L(ZW,`MinimalEObjectImpl/1ArrayDelegatingAdapterList/1`,1021),q(1048,1047,{},mye),L(`org.eclipse.emf.ecore.plugin`,`EcorePlugin`,1048);var uVt=g_(kbt,`Resource`);q(787,1486,Abt),Q.Fl=function(e){},Q.Gl=function(e){},Q.Cl=function(){return!this.a&&(this.a=new Vs(this)),this.a},Q.Dl=function(e){var t,n,r=e.length,i,a;if(r>0){if(Ux(0,e.length),e.charCodeAt(0)==47){for(a=new cw(4),i=1,t=1;t<r;++t)Ux(t,e.length),e.charCodeAt(t)==47&&(M(a,i==t?``:(rw(i,t,e.length),e.substr(i,t-i))),i=t+1);return M(a,(Ux(i,e.length+1),e.substr(i))),Y0e(this,a)}Ux(r-1,e.length),e.charCodeAt(r-1)==63&&(n=RCe(e,cN(63),r-2),n>0&&(e=(rw(0,n,e.length),e.substr(0,n))))}return k5e(this,e)},Q.El=function(){return this.c},Q.Ib=function(){var e;return tu(this.Pm)+`@`+(e=qE(this)>>>0,e.toString(16))+` uri='`+this.d+`'`},Q.b=!1,L(LK,`ResourceImpl`,787),q(1487,787,Abt,Que),L(LK,`BinaryResourceImpl`,1487),q(1160,697,RG),Q._i=function(e){return j(e,57)?yMe(this,P(e,57)):j(e,589)?new Jm(P(e,589).Cl()):A(e)===A(this.f)?P(e,18).Jc():(Yh(),v7.a)},Q.Ob=function(){return u7e(this)},Q.a=!1,L(oK,`EcoreUtil/ContentTreeIterator`,1160),q(1488,1160,RG,_ke),Q._i=function(e){return A(e)===A(this.f)?P(e,16).Jc():new gIe(P(e,57))},L(LK,`ResourceImpl/5`,1488),q(648,2057,vbt,Vs),Q.Gc=function(e){return this.i<=4?FM(this,e):j(e,52)&&P(e,52).Gh()==this.a},Q.Ki=function(e,t){e==this.i-1&&(this.a.b||(this.a.b=!0))},Q.Mi=function(e,t){e==0?this.a.b||(this.a.b=!0):QC(this,e,t)},Q.Oi=function(e,t){},Q.Pi=function(e,t,n){},Q.Jj=function(){return 2},Q.hj=function(){return this.a},Q.Kj=function(){return!0},Q.Lj=function(e,t){return t=P(e,52).ci(this.a,t),t},Q.Mj=function(e,t){return P(e,52).ci(null,t)},Q.Nj=function(){return!1},Q.Qi=function(){return!0},Q.$i=function(e){return V(R5,lR,57,e,0,1)},Q.Wi=function(){return!1},L(LK,`ResourceImpl/ContentsEList`,648),q(954,2027,WR,$ue),Q.dd=function(e){return this.a.Ii(e)},Q.gc=function(){return this.a.gc()},L(oK,`AbstractSequentialInternalEList/1`,954);var dVt,fVt,l9,pVt;q(626,1,{},yDe);var u9,d9;L(oK,`BasicExtendedMetaData`,626),q(1151,1,{},U_e),Q.Hl=function(){return null},Q.Il=function(){return this.a==-2&&ise(this,m3e(this.d,this.b)),this.a},Q.Jl=function(){return null},Q.Kl=function(){return Cb(),Cb(),RJ},Q.ve=function(){return this.c==ZK&&sse(this,GZe(this.d,this.b)),this.c},Q.Ll=function(){return 0},Q.a=-2,Q.c=ZK,L(oK,`BasicExtendedMetaData/EClassExtendedMetaDataImpl`,1151),q(1152,1,{},AFe),Q.Hl=function(){return this.a==(RC(),u9)&&ase(this,tit(this.f,this.b)),this.a},Q.Il=function(){return 0},Q.Jl=function(){return this.c==(RC(),u9)&&cse(this,nit(this.f,this.b)),this.c},Q.Kl=function(){return!this.d&&use(this,nst(this.f,this.b)),this.d},Q.ve=function(){return this.e==ZK&&fse(this,GZe(this.f,this.b)),this.e},Q.Ll=function(){return this.g==-2&&mse(this,y4e(this.f,this.b)),this.g},Q.e=ZK,Q.g=-2,L(oK,`BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl`,1152),q(1150,1,{},W_e),Q.b=!1,Q.c=!1,L(oK,`BasicExtendedMetaData/EPackageExtendedMetaDataImpl`,1150),q(1153,1,{},jFe),Q.c=-2,Q.e=ZK,Q.f=ZK,L(oK,`BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl`,1153),q(582,624,yK,Yg),Q.Jj=function(){return this.c},Q.ml=function(){return!1},Q.Ui=function(e,t){return t},Q.c=0,L(oK,`EDataTypeEList`,582);var mVt=g_(oK,`FeatureMap`);q(76,582,{3:1,4:1,20:1,31:1,56:1,18:1,16:1,59:1,71:1,67:1,61:1,78:1,163:1,219:1,2001:1,72:1,98:1},vD),Q._c=function(e,t){ktt(this,e,P(t,75))},Q.Ec=function(e){return Iet(this,P(e,75))},Q.Fi=function(e){$ke(this,P(e,75))},Q.Lj=function(e,t){return swe(this,P(e,75),t)},Q.Mj=function(e,t){return cwe(this,P(e,75),t)},Q.Ri=function(e,t){return Tat(this,e,t)},Q.Ui=function(e,t){return Ult(this,e,P(t,75))},Q.fd=function(e,t){return Tnt(this,e,P(t,75))},Q.Sj=function(e,t){return lwe(this,P(e,75),t)},Q.Tj=function(e,t){return uwe(this,P(e,75),t)},Q.Uj=function(e,t,n){return q2e(this,P(e,75),P(t,75),n)},Q.Xi=function(e,t){return $M(this,e,P(t,75))},Q.Ml=function(e,t){return iat(this,e,t)},Q.ad=function(e,t){var n,r,i,a,o,s,c,l=new PT(t.gc()),u;for(i=t.Jc();i.Ob();)if(r=P(i.Pb(),75),a=r.Jk(),wF(this.e,a))(!a.Qi()||!kS(this,a,r.kd())&&!FM(l,r))&&fw(l,r);else{for(u=bF(this.e.Ah(),a),n=P(this.g,122),o=!0,s=0;s<this.i;++s)if(c=n[s],u.$l(c.Jk())){P(Fj(this,s,r),75),o=!1;break}o&&fw(l,r)}return rKe(this,e,l)},Q.Fc=function(e){var t,n,r,i,a,o,s,c=new PT(e.gc()),l;for(r=e.Jc();r.Ob();)if(n=P(r.Pb(),75),i=n.Jk(),wF(this.e,i))(!i.Qi()||!kS(this,i,n.kd())&&!FM(c,n))&&fw(c,n);else{for(l=bF(this.e.Ah(),i),t=P(this.g,122),a=!0,o=0;o<this.i;++o)if(s=t[o],l.$l(s.Jk())){P(Fj(this,o,n),75),a=!1;break}a&&fw(c,n)}return $v(this,c)},Q.Di=function(e){return this.j=-1,TI(this,this.i,e)},Q.Nl=function(e,t,n){return sit(this,e,t,n)},Q.Vk=function(e,t){return lI(this,e,t)},Q.Ol=function(e,t,n){return Jst(this,e,t,n)},Q.Pl=function(){return this},Q.Ql=function(e,t){return KI(this,e,t)},Q.Rl=function(e){return P(H(this,e),75).Jk()},Q.Sl=function(e){return P(H(this,e),75).kd()},Q.Tl=function(){return this.b},Q.Kj=function(){return!0},Q.Rj=function(){return!0},Q.Ul=function(e){return!kA(this,e)},Q.$i=function(e){return V($Bt,Obt,344,e,0,1)},Q.nl=function(e){return Rh(this,e)},Q.Wb=function(e){Vv(this,e)},Q.Vl=function(e,t){QI(this,e,t)},Q.Wl=function(e){return OUe(this,e)},Q.Xl=function(e){$$e(this,e)},L(oK,`BasicFeatureMap`,76),q(1925,1,wR),Q.Nb=function(e){jv(this,e)},Q.Rb=function(e){if(this.g==-1)throw E(new ac);Q_(this);try{Nnt(this.e,this.b,this.a,e),this.d=this.e.j,Mj(this)}catch(e){throw e=eO(e),j(e,99)?E(new rc):E(e)}},Q.Ob=function(){return NO(this)},Q.Sb=function(){return sqe(this)},Q.Pb=function(){return Mj(this)},Q.Tb=function(){return this.a},Q.Ub=function(){var e;if(sqe(this))return Q_(this),this.g=--this.a,this.sl()&&(e=pP(this.e,this.b,this.c,this.a,this.j),this.j=e),this.i=0,this.j;throw E(new cc)},Q.Vb=function(){return this.a-1},Q.Qb=function(){if(this.g==-1)throw E(new ac);Q_(this);try{J6e(this.e,this.b,this.g),this.d=this.e.j,this.g<this.a&&(--this.a,--this.c),--this.g}catch(e){throw e=eO(e),j(e,99)?E(new rc):E(e)}},Q.sl=function(){return!1},Q.Wb=function(e){if(this.g==-1)throw E(new ac);Q_(this);try{sst(this.e,this.b,this.g,e),this.d=this.e.j}catch(e){throw e=eO(e),j(e,99)?E(new rc):E(e)}},Q.a=0,Q.c=0,Q.d=0,Q.f=!1,Q.g=0,Q.i=0,L(oK,`FeatureMapUtil/BasicFeatureEIterator`,1925),q(412,1925,wR,ID),Q.Yl=function(){var e,t,n=this.e.i;for(e=P(this.e.g,122);this.c<n;){if(t=e[this.c],this.k.$l(t.Jk()))return this.j=this.f?t:t.kd(),this.i=2,!0;++this.c}return this.i=1,this.g=-1,!1},Q.Zl=function(){for(var e=P(this.e.g,122),t;--this.c>=0;)if(t=e[this.c],this.k.$l(t.Jk()))return this.j=this.f?t:t.kd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},L(oK,`BasicFeatureMap/FeatureEIterator`,412),q(666,412,wR,Wp),Q.sl=function(){return!0},L(oK,`BasicFeatureMap/ResolvingFeatureEIterator`,666),q(952,482,wK,Zye),Q.nj=function(){return this},L(oK,`EContentsEList/1`,952),q(953,482,wK,gve),Q.sl=function(){return!1},L(oK,`EContentsEList/2`,953),q(951,287,TK,Qye),Q.ul=function(e){},Q.Ob=function(){return!1},Q.Sb=function(){return!1},L(oK,`EContentsEList/FeatureIteratorImpl/1`,951),q(825,582,yK,gbe),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;cL(this),nm(this.e)?(e=this.a,this.a=!1,SD(this.e,new lC(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(oK,`EDataTypeEList/Unsettable`,825),q(1923,582,yK,_be),Q.Qi=function(){return!0},L(oK,`EDataTypeUniqueEList`,1923),q(1924,825,yK,vbe),Q.Qi=function(){return!0},L(oK,`EDataTypeUniqueEList/Unsettable`,1924),q(145,81,yK,Gm),Q.ll=function(){return!0},Q.Ui=function(e,t){return TP(this,e,P(t,57))},L(oK,`EObjectContainmentEList/Resolving`,145),q(1154,544,yK,ybe),Q.ll=function(){return!0},Q.Ui=function(e,t){return TP(this,e,P(t,57))},L(oK,`EObjectContainmentEList/Unsettable/Resolving`,1154),q(753,14,yK,CCe),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;cL(this),nm(this.e)?(e=this.a,this.a=!1,SD(this.e,new lC(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(oK,`EObjectContainmentWithInverseEList/Unsettable`,753),q(1188,753,yK,wCe),Q.ll=function(){return!0},Q.Ui=function(e,t){return TP(this,e,P(t,57))},L(oK,`EObjectContainmentWithInverseEList/Unsettable/Resolving`,1188),q(745,491,yK,bbe),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;cL(this),nm(this.e)?(e=this.a,this.a=!1,SD(this.e,new lC(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(oK,`EObjectEList/Unsettable`,745),q(339,491,yK,Km),Q.ll=function(){return!0},Q.Ui=function(e,t){return TP(this,e,P(t,57))},L(oK,`EObjectResolvingEList`,339),q(1828,745,yK,xbe),Q.ll=function(){return!0},Q.Ui=function(e,t){return TP(this,e,P(t,57))},L(oK,`EObjectResolvingEList/Unsettable`,1828),q(1489,1,{},Gre);var hVt;L(oK,`EObjectValidator`,1489),q(548,491,yK,Sv),Q.gl=function(){return this.d},Q.hl=function(){return this.b},Q.Kj=function(){return!0},Q.kl=function(){return!0},Q.b=0,L(oK,`EObjectWithInverseEList`,548),q(1191,548,yK,TCe),Q.jl=function(){return!0},L(oK,`EObjectWithInverseEList/ManyInverse`,1191),q(627,548,yK,dg),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;cL(this),nm(this.e)?(e=this.a,this.a=!1,SD(this.e,new lC(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(oK,`EObjectWithInverseEList/Unsettable`,627),q(1190,627,yK,ECe),Q.jl=function(){return!0},L(oK,`EObjectWithInverseEList/Unsettable/ManyInverse`,1190),q(754,548,yK,DCe),Q.ll=function(){return!0},Q.Ui=function(e,t){return TP(this,e,P(t,57))},L(oK,`EObjectWithInverseResolvingEList`,754),q(33,754,yK,fg),Q.jl=function(){return!0},L(oK,`EObjectWithInverseResolvingEList/ManyInverse`,33),q(755,627,yK,OCe),Q.ll=function(){return!0},Q.Ui=function(e,t){return TP(this,e,P(t,57))},L(oK,`EObjectWithInverseResolvingEList/Unsettable`,755),q(1189,755,yK,kCe),Q.jl=function(){return!0},L(oK,`EObjectWithInverseResolvingEList/Unsettable/ManyInverse`,1189),q(1155,624,yK),Q.Ji=function(){return!(this.b&1792)},Q.Li=function(){this.b|=1},Q.il=function(){return!!(this.b&4)},Q.Kj=function(){return!!(this.b&40)},Q.jl=function(){return!!(this.b&16)},Q.kl=function(){return!!(this.b&8)},Q.ll=function(){return(this.b&QW)!=0},Q.$k=function(){return!!(this.b&32)},Q.ml=function(){return(this.b&aK)!=0},Q.dk=function(e){return this.d?cLe(this.d,e):this.Jk().Fk().dk(e)},Q.Oj=function(){return this.b&2?!!(this.b&1):this.i!=0},Q.Qi=function(){return!!(this.b&128)},Q.Ek=function(){var e;cL(this),this.b&2&&(nm(this.e)?(e=!!(this.b&1),this.b&=-2,pc(this,new lC(this.e,2,wA(this.e.Ah(),this.Jk()),e,!1))):this.b&=-2)},Q.Wi=function(){return!(this.b&1536)},Q.b=0,L(oK,`EcoreEList/Generic`,1155),q(1156,1155,yK,$je),Q.Jk=function(){return this.a},L(oK,`EcoreEList/Dynamic`,1156),q(752,67,LG,ede),Q.$i=function(e){return uE(this.a.a,e)},L(oK,`EcoreEMap/1`,752),q(751,81,yK,yke),Q.Ki=function(e,t){Wj(this.b,P(t,136))},Q.Mi=function(e,t){QWe(this.b)},Q.Ni=function(e,t,n){var r;++(r=this.b,P(t,136),r).e},Q.Oi=function(e,t){Lk(this.b,P(t,136))},Q.Pi=function(e,t,n){Lk(this.b,P(n,136)),A(n)===A(t)&&P(n,136).zi(aye(P(t,136).jd())),Wj(this.b,P(t,136))},L(oK,`EcoreEMap/DelegateEObjectContainmentEList`,751),q(1186,142,cK,YHe),L(oK,`EcoreEMap/Unsettable`,1186),q(1187,751,yK,ACe),Q.Li=function(){this.a=!0},Q.Oj=function(){return this.a},Q.Ek=function(){var e;cL(this),nm(this.e)?(e=this.a,this.a=!1,SD(this.e,new lC(this.e,2,this.c,e,!1))):this.a=!1},Q.a=!1,L(oK,`EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList`,1187),q(1159,223,eB,tAe),Q.a=!1,Q.b=!1,L(oK,`EcoreUtil/Copier`,1159),q(747,1,gR,gIe),Q.Nb=function(e){jv(this,e)},Q.Ob=function(){return XXe(this)},Q.Pb=function(){var e;return XXe(this),e=this.b,this.b=null,e},Q.Qb=function(){this.a.Qb()},L(oK,`EcoreUtil/ProperContentIterator`,747),q(1490,1489,{},Jae);var gVt;L(oK,`EcoreValidator`,1490);var _Vt;g_(oK,`FeatureMapUtil/Validator`),q(1260,1,{2006:1},Kre),Q.$l=function(e){return!0},L(oK,`FeatureMapUtil/1`,1260),q(760,1,{2006:1},Edt),Q.$l=function(e){var t;return this.c==e||(t=Bh(uy(this.a,e)),t==null?dit(this,e)?(IRe(this.a,e,(ih(),aJ)),!0):(IRe(this.a,e,(ih(),iJ)),!1):t==(ih(),aJ))},Q.e=!1;var f9;L(oK,`FeatureMapUtil/BasicValidator`,760),q(761,44,eB,nbe),L(oK,`FeatureMapUtil/BasicValidator/Cache`,761),q(495,56,{20:1,31:1,56:1,18:1,16:1,61:1,78:1,72:1,98:1},Op),Q._c=function(e,t){Nnt(this.c,this.b,e,t)},Q.Ec=function(e){return iat(this.c,this.b,e)},Q.ad=function(e,t){return hct(this.c,this.b,e,t)},Q.Fc=function(e){return Mm(this,e)},Q.Ei=function(e,t){ZVe(this.c,this.b,e,t)},Q.Uk=function(e,t){return sit(this.c,this.b,e,t)},Q.Yi=function(e){return qI(this.c,this.b,e,!1)},Q.Gi=function(){return Gve(this.c,this.b)},Q.Hi=function(){return Kve(this.c,this.b)},Q.Ii=function(e){return Rze(this.c,this.b,e)},Q.Vk=function(e,t){return XSe(this,e,t)},Q.$b=function(){mc(this)},Q.Gc=function(e){return kS(this.c,this.b,e)},Q.Hc=function(e){return TWe(this.c,this.b,e)},Q.Xb=function(e){return qI(this.c,this.b,e,!0)},Q.Dk=function(e){return this},Q.bd=function(e){return xLe(this.c,this.b,e)},Q.dc=function(){return bp(this)},Q.Oj=function(){return!kA(this.c,this.b)},Q.Jc=function(){return sVe(this.c,this.b)},Q.cd=function(){return cVe(this.c,this.b)},Q.dd=function(e){return pYe(this.c,this.b,e)},Q.Ri=function(e,t){return kot(this.c,this.b,e,t)},Q.Si=function(e,t){Bze(this.c,this.b,e,t)},Q.ed=function(e){return J6e(this.c,this.b,e)},Q.Kc=function(e){return Xit(this.c,this.b,e)},Q.fd=function(e,t){return sst(this.c,this.b,e,t)},Q.Wb=function(e){wP(this.c,this.b),Mm(this,P(e,16))},Q.gc=function(){return mYe(this.c,this.b)},Q.Nc=function(){return NFe(this.c,this.b)},Q.Oc=function(e){return SLe(this.c,this.b,e)},Q.Ib=function(){var e,t=new yl;for(t.a+=`[`,e=Gve(this.c,this.b);NO(e);)Np(t,$m(Mj(e))),NO(e)&&(t.a+=cR);return t.a+=`]`,t.a},Q.Ek=function(){wP(this.c,this.b)},L(oK,`FeatureMapUtil/FeatureEList`,495),q(635,39,tK,VS),Q.fj=function(e){return Tk(this,e)},Q.kj=function(e){var t,n,r,i,a,o,s;switch(this.d){case 1:case 2:if(a=e.hj(),A(a)===A(this.c)&&Tk(this,null)==e.fj(null))return this.g=e.gj(),e.ej()==1&&(this.d=1),!0;break;case 3:if(i=e.ej(),i===3&&(a=e.hj(),A(a)===A(this.c)&&Tk(this,null)==e.fj(null)))return this.d=5,t=new PT(2),fw(t,this.g),fw(t,e.gj()),this.g=t,!0;break;case 5:if(i=e.ej(),i===3&&(a=e.hj(),A(a)===A(this.c)&&Tk(this,null)==e.fj(null)))return n=P(this.g,18),n.Ec(e.gj()),!0;break;case 4:switch(i=e.ej(),i){case 3:if(a=e.hj(),A(a)===A(this.c)&&Tk(this,null)==e.fj(null))return this.d=1,this.g=e.gj(),!0;break;case 4:if(a=e.hj(),A(a)===A(this.c)&&Tk(this,null)==e.fj(null))return this.d=6,s=new PT(2),fw(s,this.n),fw(s,e.ij()),this.n=s,o=U(O(q9,1),yz,30,15,[this.o,e.jj()]),this.g=o,!0}break;case 6:if(i=e.ej(),i===4&&(a=e.hj(),A(a)===A(this.c)&&Tk(this,null)==e.fj(null)))return n=P(this.n,18),n.Ec(e.ij()),o=P(this.g,54),r=V(q9,yz,30,o.length+1,15,1),EI(o,0,r,0,o.length),r[o.length]=e.jj(),this.g=r,!0}return!1},L(oK,`FeatureMapUtil/FeatureENotificationImpl`,635),q(554,495,{20:1,31:1,56:1,18:1,16:1,61:1,78:1,163:1,219:1,2001:1,72:1,98:1},u_),Q.Ml=function(e,t){return iat(this.c,e,t)},Q.Nl=function(e,t,n){return sit(this.c,e,t,n)},Q.Ol=function(e,t,n){return Jst(this.c,e,t,n)},Q.Pl=function(){return this},Q.Ql=function(e,t){return KI(this.c,e,t)},Q.Rl=function(e){return P(qI(this.c,this.b,e,!1),75).Jk()},Q.Sl=function(e){return P(qI(this.c,this.b,e,!1),75).kd()},Q.Tl=function(){return this.a},Q.Ul=function(e){return!kA(this.c,e)},Q.Vl=function(e,t){QI(this.c,e,t)},Q.Wl=function(e){return OUe(this.c,e)},Q.Xl=function(e){$$e(this.c,e)},L(oK,`FeatureMapUtil/FeatureFeatureMap`,554),q(1259,1,sK,$_e),Q.Dk=function(e){return qI(this.b,this.a,-1,e)},Q.Oj=function(){return!kA(this.b,this.a)},Q.Wb=function(e){QI(this.b,this.a,e)},Q.Ek=function(){wP(this.b,this.a)},L(oK,`FeatureMapUtil/FeatureValue`,1259);var p9,m9,h9,g9,vVt,_9=g_($K,`AnyType`);q(670,63,XR,ul),L($K,`InvalidDatatypeValueException`,670);var v9=g_($K,Mbt),y9=g_($K,Nbt),yVt=g_($K,Pbt),bVt,b9,xVt,x9,SVt,CVt,wVt,TVt,EVt,DVt,OVt,kVt,AVt,jVt,MVt,S9,NVt,C9,w9,PVt,T9,E9,D9,FVt,O9,k9;q(829,502,{109:1,94:1,93:1,57:1,52:1,100:1,842:1},_fe),Q.Ih=function(e,t,n){switch(e){case 0:return n?(!this.c&&(this.c=new vD(this,0)),this.c):(!this.c&&(this.c=new vD(this,0)),this.c.b);case 1:return n?(!this.c&&(this.c=new vD(this,0)),P(zx(this.c,(pL(),x9)),163)):(!this.c&&(this.c=new vD(this,0)),P(P(zx(this.c,(pL(),x9)),163),219)).Tl();case 2:return n?(!this.b&&(this.b=new vD(this,2)),this.b):(!this.b&&(this.b=new vD(this,2)),this.b.b)}return Ow(this,e-Qv(this.fi()),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():this.fi(),e),t,n)},Q.Rh=function(e,t,n){var r;switch(t){case 0:return!this.c&&(this.c=new vD(this,0)),lI(this.c,e,n);case 1:return(!this.c&&(this.c=new vD(this,0)),P(P(zx(this.c,(pL(),x9)),163),72)).Vk(e,n);case 2:return!this.b&&(this.b=new vD(this,2)),lI(this.b,e,n)}return r=P(OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():this.fi(),t),69),r.uk().yk(this,oT(this),t-Qv(this.fi()),e,n)},Q.Th=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new vD(this,0)),P(zx(this.c,(pL(),x9)),163)).dc();case 2:return!!this.b&&this.b.i!=0}return wS(this,e-Qv(this.fi()),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():this.fi(),e))},Q.$h=function(e,t){switch(e){case 0:!this.c&&(this.c=new vD(this,0)),Vv(this.c,t);return;case 1:(!this.c&&(this.c=new vD(this,0)),P(P(zx(this.c,(pL(),x9)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new vD(this,2)),Vv(this.b,t);return}lA(this,e-Qv(this.fi()),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():this.fi(),e),t)},Q.fi=function(){return pL(),xVt},Q.hi=function(e){switch(e){case 0:!this.c&&(this.c=new vD(this,0)),cL(this.c);return;case 1:(!this.c&&(this.c=new vD(this,0)),P(zx(this.c,(pL(),x9)),163)).$b();return;case 2:!this.b&&(this.b=new vD(this,2)),cL(this.b);return}xk(this,e-Qv(this.fi()),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():this.fi(),e))},Q.Ib=function(){var e;return this.j&4?FP(this):(e=new eh(FP(this)),e.a+=` (mixed: `,Mp(e,this.c),e.a+=`, anyAttribute: `,Mp(e,this.b),e.a+=`)`,e.a)},L(eq,`AnyTypeImpl`,829),q(671,502,{109:1,94:1,93:1,57:1,52:1,100:1,2084:1,671:1},Qre),Q.Ih=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return Ow(this,e-Qv((pL(),S9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():S9,e),t,n)},Q.Th=function(e){switch(e){case 0:return this.a!=null;case 1:return this.b!=null}return wS(this,e-Qv((pL(),S9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():S9,e))},Q.$h=function(e,t){switch(e){case 0:_se(this,Vh(t));return;case 1:yse(this,Vh(t));return}lA(this,e-Qv((pL(),S9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():S9,e),t)},Q.fi=function(){return pL(),S9},Q.hi=function(e){switch(e){case 0:this.a=null;return;case 1:this.b=null;return}xk(this,e-Qv((pL(),S9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():S9,e))},Q.Ib=function(){var e;return this.j&4?FP(this):(e=new eh(FP(this)),e.a+=` (data: `,Np(e,this.a),e.a+=`, target: `,Np(e,this.b),e.a+=`)`,e.a)},Q.a=null,Q.b=null,L(eq,`ProcessingInstructionImpl`,671),q(672,829,{109:1,94:1,93:1,57:1,52:1,100:1,842:1,2085:1,672:1},vfe),Q.Ih=function(e,t,n){switch(e){case 0:return n?(!this.c&&(this.c=new vD(this,0)),this.c):(!this.c&&(this.c=new vD(this,0)),this.c.b);case 1:return n?(!this.c&&(this.c=new vD(this,0)),P(zx(this.c,(pL(),x9)),163)):(!this.c&&(this.c=new vD(this,0)),P(P(zx(this.c,(pL(),x9)),163),219)).Tl();case 2:return n?(!this.b&&(this.b=new vD(this,2)),this.b):(!this.b&&(this.b=new vD(this,2)),this.b.b);case 3:return!this.c&&(this.c=new vD(this,0)),Vh(KI(this.c,(pL(),w9),!0));case 4:return NCe(this.a,(!this.c&&(this.c=new vD(this,0)),Vh(KI(this.c,(pL(),w9),!0))));case 5:return this.a}return Ow(this,e-Qv((pL(),C9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():C9,e),t,n)},Q.Th=function(e){switch(e){case 0:return!!this.c&&this.c.i!=0;case 1:return!(!this.c&&(this.c=new vD(this,0)),P(zx(this.c,(pL(),x9)),163)).dc();case 2:return!!this.b&&this.b.i!=0;case 3:return!this.c&&(this.c=new vD(this,0)),Vh(KI(this.c,(pL(),w9),!0))!=null;case 4:return NCe(this.a,(!this.c&&(this.c=new vD(this,0)),Vh(KI(this.c,(pL(),w9),!0))))!=null;case 5:return!!this.a}return wS(this,e-Qv((pL(),C9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():C9,e))},Q.$h=function(e,t){switch(e){case 0:!this.c&&(this.c=new vD(this,0)),Vv(this.c,t);return;case 1:(!this.c&&(this.c=new vD(this,0)),P(P(zx(this.c,(pL(),x9)),163),219)).Wb(t);return;case 2:!this.b&&(this.b=new vD(this,2)),Vv(this.b,t);return;case 3:MFe(this,Vh(t));return;case 4:MFe(this,MCe(this.a,t));return;case 5:vse(this,P(t,159));return}lA(this,e-Qv((pL(),C9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():C9,e),t)},Q.fi=function(){return pL(),C9},Q.hi=function(e){switch(e){case 0:!this.c&&(this.c=new vD(this,0)),cL(this.c);return;case 1:(!this.c&&(this.c=new vD(this,0)),P(zx(this.c,(pL(),x9)),163)).$b();return;case 2:!this.b&&(this.b=new vD(this,2)),cL(this.b);return;case 3:!this.c&&(this.c=new vD(this,0)),QI(this.c,(pL(),w9),null);return;case 4:MFe(this,MCe(this.a,null));return;case 5:this.a=null;return}xk(this,e-Qv((pL(),C9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():C9,e))},L(eq,`SimpleAnyTypeImpl`,672),q(673,502,{109:1,94:1,93:1,57:1,52:1,100:1,2086:1,673:1},yfe),Q.Ih=function(e,t,n){switch(e){case 0:return n?(!this.a&&(this.a=new vD(this,0)),this.a):(!this.a&&(this.a=new vD(this,0)),this.a.b);case 1:return n?(!this.b&&(this.b=new _w((YL(),$7),o9,this,1)),this.b):(!this.b&&(this.b=new _w((YL(),$7),o9,this,1)),XC(this.b));case 2:return n?(!this.c&&(this.c=new _w((YL(),$7),o9,this,2)),this.c):(!this.c&&(this.c=new _w((YL(),$7),o9,this,2)),XC(this.c));case 3:return!this.a&&(this.a=new vD(this,0)),zx(this.a,(pL(),E9));case 4:return!this.a&&(this.a=new vD(this,0)),zx(this.a,(pL(),D9));case 5:return!this.a&&(this.a=new vD(this,0)),zx(this.a,(pL(),O9));case 6:return!this.a&&(this.a=new vD(this,0)),zx(this.a,(pL(),k9))}return Ow(this,e-Qv((pL(),T9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():T9,e),t,n)},Q.Rh=function(e,t,n){var r;switch(t){case 0:return!this.a&&(this.a=new vD(this,0)),lI(this.a,e,n);case 1:return!this.b&&(this.b=new _w((YL(),$7),o9,this,1)),gg(this.b,e,n);case 2:return!this.c&&(this.c=new _w((YL(),$7),o9,this,2)),gg(this.c,e,n);case 5:return!this.a&&(this.a=new vD(this,0)),XSe(zx(this.a,(pL(),O9)),e,n)}return r=P(OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():(pL(),T9),t),69),r.uk().yk(this,oT(this),t-Qv((pL(),T9)),e,n)},Q.Th=function(e){switch(e){case 0:return!!this.a&&this.a.i!=0;case 1:return!!this.b&&this.b.f!=0;case 2:return!!this.c&&this.c.f!=0;case 3:return!this.a&&(this.a=new vD(this,0)),!bp(zx(this.a,(pL(),E9)));case 4:return!this.a&&(this.a=new vD(this,0)),!bp(zx(this.a,(pL(),D9)));case 5:return!this.a&&(this.a=new vD(this,0)),!bp(zx(this.a,(pL(),O9)));case 6:return!this.a&&(this.a=new vD(this,0)),!bp(zx(this.a,(pL(),k9)))}return wS(this,e-Qv((pL(),T9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():T9,e))},Q.$h=function(e,t){switch(e){case 0:!this.a&&(this.a=new vD(this,0)),Vv(this.a,t);return;case 1:!this.b&&(this.b=new _w((YL(),$7),o9,this,1)),gD(this.b,t);return;case 2:!this.c&&(this.c=new _w((YL(),$7),o9,this,2)),gD(this.c,t);return;case 3:!this.a&&(this.a=new vD(this,0)),mc(zx(this.a,(pL(),E9))),!this.a&&(this.a=new vD(this,0)),Mm(zx(this.a,E9),P(t,18));return;case 4:!this.a&&(this.a=new vD(this,0)),mc(zx(this.a,(pL(),D9))),!this.a&&(this.a=new vD(this,0)),Mm(zx(this.a,D9),P(t,18));return;case 5:!this.a&&(this.a=new vD(this,0)),mc(zx(this.a,(pL(),O9))),!this.a&&(this.a=new vD(this,0)),Mm(zx(this.a,O9),P(t,18));return;case 6:!this.a&&(this.a=new vD(this,0)),mc(zx(this.a,(pL(),k9))),!this.a&&(this.a=new vD(this,0)),Mm(zx(this.a,k9),P(t,18));return}lA(this,e-Qv((pL(),T9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():T9,e),t)},Q.fi=function(){return pL(),T9},Q.hi=function(e){switch(e){case 0:!this.a&&(this.a=new vD(this,0)),cL(this.a);return;case 1:!this.b&&(this.b=new _w((YL(),$7),o9,this,1)),this.b.c.$b();return;case 2:!this.c&&(this.c=new _w((YL(),$7),o9,this,2)),this.c.c.$b();return;case 3:!this.a&&(this.a=new vD(this,0)),mc(zx(this.a,(pL(),E9)));return;case 4:!this.a&&(this.a=new vD(this,0)),mc(zx(this.a,(pL(),D9)));return;case 5:!this.a&&(this.a=new vD(this,0)),mc(zx(this.a,(pL(),O9)));return;case 6:!this.a&&(this.a=new vD(this,0)),mc(zx(this.a,(pL(),k9)));return}xk(this,e-Qv((pL(),T9)),OT(this.j&2?(!this.k&&(this.k=new Jo),this.k).Lk():T9,e))},Q.Ib=function(){var e;return this.j&4?FP(this):(e=new eh(FP(this)),e.a+=` (mixed: `,Mp(e,this.a),e.a+=`)`,e.a)},L(eq,`XMLTypeDocumentRootImpl`,673),q(1993,710,{109:1,94:1,93:1,469:1,158:1,57:1,114:1,52:1,100:1,161:1,117:1,118:1,2087:1},qre),Q.oi=function(e,t){switch(e.fk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return t==null?null:uA(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return Vh(t);case 6:return hSe(P(t,195));case 12:case 47:case 49:case 11:return yut(this,e,t);case 13:return t==null?null:Sct(P(t,247));case 15:case 14:return t==null?null:Rke(D(N(t)));case 17:return J2e((pL(),t));case 18:return J2e(t);case 21:case 20:return t==null?null:zke(P(t,164).a);case 27:return gSe(P(t,195));case 30:return e1e((pL(),P(t,16)));case 31:return e1e(P(t,16));case 40:return mSe((pL(),t));case 42:return Y2e((pL(),t));case 43:return Y2e(t);case 59:case 48:return pSe((pL(),t));default:throw E(new Jc(tG+e.ve()+nG))}},Q.pi=function(e){var t,n,r,i,a;switch(e.G==-1&&(e.G=(n=KT(e),n?Ij(n.si(),e):-1)),e.G){case 0:return t=new _fe,t;case 1:return r=new Qre,r;case 2:return i=new vfe,i;case 3:return a=new yfe,a;default:throw E(new Jc(aG+e.zb+nG))}},Q.qi=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_;switch(e.fk()){case 5:case 52:case 4:return t;case 6:return SQe(t);case 8:case 7:return t==null?null:c4e(t);case 9:return t==null?null:aT(hI((r=XI(t,!0),r.length>0&&(Ux(0,r.length),r.charCodeAt(0)==43)?(Ux(1,r.length+1),r.substr(1)):r),-128,127)<<24>>24);case 10:return t==null?null:aT(hI((i=XI(t,!0),i.length>0&&(Ux(0,i.length),i.charCodeAt(0)==43)?(Ux(1,i.length+1),i.substr(1)):i),-128,127)<<24>>24);case 11:return Vh(FL(this,(pL(),wVt),t));case 12:return Vh(FL(this,(pL(),TVt),t));case 13:return t==null?null:new pme(XI(t,!0));case 15:case 14:return Bet(t);case 16:return Vh(FL(this,(pL(),EVt),t));case 17:return cZe((pL(),t));case 18:return cZe(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return XI(t,!0);case 21:case 20:return $et(t);case 22:return Vh(FL(this,(pL(),DVt),t));case 23:return Vh(FL(this,(pL(),OVt),t));case 24:return Vh(FL(this,(pL(),kVt),t));case 25:return Vh(FL(this,(pL(),AVt),t));case 26:return Vh(FL(this,(pL(),jVt),t));case 27:return cQe(t);case 30:return lZe((pL(),t));case 31:return lZe(t);case 32:return t==null?null:G(hI((u=XI(t,!0),u.length>0&&(Ux(0,u.length),u.charCodeAt(0)==43)?(Ux(1,u.length+1),u.substr(1)):u),YR,iR));case 33:return t==null?null:new pm((d=XI(t,!0),d.length>0&&(Ux(0,d.length),d.charCodeAt(0)==43)?(Ux(1,d.length+1),d.substr(1)):d));case 34:return t==null?null:G(hI((f=XI(t,!0),f.length>0&&(Ux(0,f.length),f.charCodeAt(0)==43)?(Ux(1,f.length+1),f.substr(1)):f),YR,iR));case 36:return t==null?null:tj(OL((p=XI(t,!0),p.length>0&&(Ux(0,p.length),p.charCodeAt(0)==43)?(Ux(1,p.length+1),p.substr(1)):p)));case 37:return t==null?null:tj(OL((m=XI(t,!0),m.length>0&&(Ux(0,m.length),m.charCodeAt(0)==43)?(Ux(1,m.length+1),m.substr(1)):m)));case 40:return z$e((pL(),t));case 42:return uZe((pL(),t));case 43:return uZe(t);case 44:return t==null?null:new pm((h=XI(t,!0),h.length>0&&(Ux(0,h.length),h.charCodeAt(0)==43)?(Ux(1,h.length+1),h.substr(1)):h));case 45:return t==null?null:new pm((g=XI(t,!0),g.length>0&&(Ux(0,g.length),g.charCodeAt(0)==43)?(Ux(1,g.length+1),g.substr(1)):g));case 46:return XI(t,!1);case 47:return Vh(FL(this,(pL(),MVt),t));case 59:case 48:return R$e((pL(),t));case 49:return Vh(FL(this,(pL(),NVt),t));case 50:return t==null?null:fk(hI((_=XI(t,!0),_.length>0&&(Ux(0,_.length),_.charCodeAt(0)==43)?(Ux(1,_.length+1),_.substr(1)):_),jK,32767)<<16>>16);case 51:return t==null?null:fk(hI((a=XI(t,!0),a.length>0&&(Ux(0,a.length),a.charCodeAt(0)==43)?(Ux(1,a.length+1),a.substr(1)):a),jK,32767)<<16>>16);case 53:return Vh(FL(this,(pL(),PVt),t));case 55:return t==null?null:fk(hI((o=XI(t,!0),o.length>0&&(Ux(0,o.length),o.charCodeAt(0)==43)?(Ux(1,o.length+1),o.substr(1)):o),jK,32767)<<16>>16);case 56:return t==null?null:fk(hI((s=XI(t,!0),s.length>0&&(Ux(0,s.length),s.charCodeAt(0)==43)?(Ux(1,s.length+1),s.substr(1)):s),jK,32767)<<16>>16);case 57:return t==null?null:tj(OL((c=XI(t,!0),c.length>0&&(Ux(0,c.length),c.charCodeAt(0)==43)?(Ux(1,c.length+1),c.substr(1)):c)));case 58:return t==null?null:tj(OL((l=XI(t,!0),l.length>0&&(Ux(0,l.length),l.charCodeAt(0)==43)?(Ux(1,l.length+1),l.substr(1)):l)));case 60:return t==null?null:G(hI((n=XI(t,!0),n.length>0&&(Ux(0,n.length),n.charCodeAt(0)==43)?(Ux(1,n.length+1),n.substr(1)):n),YR,iR));case 61:return t==null?null:G(hI(XI(t,!0),YR,iR));default:throw E(new Jc(tG+e.ve()+nG))}};var IVt,LVt,RVt,zVt;L(eq,`XMLTypeFactoryImpl`,1993),q(583,184,{109:1,94:1,93:1,158:1,197:1,57:1,241:1,114:1,52:1,100:1,161:1,184:1,117:1,118:1,680:1,2009:1,583:1},GAe),Q.N=!1,Q.O=!1;var BVt=!1;L(eq,`XMLTypePackageImpl`,583),q(1926,1,{836:1},Jre),Q.Ik=function(){return Tot(),aHt},L(eq,`XMLTypePackageImpl/1`,1926),q(1935,1,IK,Yre),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/10`,1935),q(1936,1,IK,Xre),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/11`,1936),q(1937,1,IK,Zre),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/12`,1937),q(1938,1,IK,$re),Q.dk=function(e){return Sp(e)},Q.ek=function(e){return V(dJ,X,346,e,7,1)},L(eq,`XMLTypePackageImpl/13`,1938),q(1939,1,IK,eie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/14`,1939),q(1940,1,IK,tie),Q.dk=function(e){return j(e,16)},Q.ek=function(e){return V(Pq,MB,16,e,0,1)},L(eq,`XMLTypePackageImpl/15`,1940),q(1941,1,IK,nie),Q.dk=function(e){return j(e,16)},Q.ek=function(e){return V(Pq,MB,16,e,0,1)},L(eq,`XMLTypePackageImpl/16`,1941),q(1942,1,IK,rie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/17`,1942),q(1943,1,IK,iie),Q.dk=function(e){return j(e,164)},Q.ek=function(e){return V(fJ,X,164,e,0,1)},L(eq,`XMLTypePackageImpl/18`,1943),q(1944,1,IK,aie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/19`,1944),q(1927,1,IK,oie),Q.dk=function(e){return j(e,842)},Q.ek=function(e){return V(_9,lR,842,e,0,1)},L(eq,`XMLTypePackageImpl/2`,1927),q(1945,1,IK,sie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/20`,1945),q(1946,1,IK,cie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/21`,1946),q(1947,1,IK,lie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/22`,1947),q(1948,1,IK,uie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/23`,1948),q(1949,1,IK,die),Q.dk=function(e){return j(e,195)},Q.ek=function(e){return V(X9,X,195,e,0,2)},L(eq,`XMLTypePackageImpl/24`,1949),q(1950,1,IK,fie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/25`,1950),q(1951,1,IK,pie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/26`,1951),q(1952,1,IK,mie),Q.dk=function(e){return j(e,16)},Q.ek=function(e){return V(Pq,MB,16,e,0,1)},L(eq,`XMLTypePackageImpl/27`,1952),q(1953,1,IK,hie),Q.dk=function(e){return j(e,16)},Q.ek=function(e){return V(Pq,MB,16,e,0,1)},L(eq,`XMLTypePackageImpl/28`,1953),q(1954,1,IK,gie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/29`,1954),q(1928,1,IK,_ie),Q.dk=function(e){return j(e,671)},Q.ek=function(e){return V(v9,lR,2084,e,0,1)},L(eq,`XMLTypePackageImpl/3`,1928),q(1955,1,IK,vie),Q.dk=function(e){return j(e,15)},Q.ek=function(e){return V(pJ,X,15,e,0,1)},L(eq,`XMLTypePackageImpl/30`,1955),q(1956,1,IK,yie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/31`,1956),q(1957,1,IK,bie),Q.dk=function(e){return j(e,190)},Q.ek=function(e){return V(hJ,X,190,e,0,1)},L(eq,`XMLTypePackageImpl/32`,1957),q(1958,1,IK,xie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/33`,1958),q(1959,1,IK,Sie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/34`,1959),q(1960,1,IK,Cie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/35`,1960),q(1961,1,IK,wie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/36`,1961),q(1962,1,IK,Tie),Q.dk=function(e){return j(e,16)},Q.ek=function(e){return V(Pq,MB,16,e,0,1)},L(eq,`XMLTypePackageImpl/37`,1962),q(1963,1,IK,Eie),Q.dk=function(e){return j(e,16)},Q.ek=function(e){return V(Pq,MB,16,e,0,1)},L(eq,`XMLTypePackageImpl/38`,1963),q(1964,1,IK,Die),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/39`,1964),q(1929,1,IK,Oie),Q.dk=function(e){return j(e,672)},Q.ek=function(e){return V(y9,lR,2085,e,0,1)},L(eq,`XMLTypePackageImpl/4`,1929),q(1965,1,IK,kie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/40`,1965),q(1966,1,IK,Aie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/41`,1966),q(1967,1,IK,jie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/42`,1967),q(1968,1,IK,Mie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/43`,1968),q(1969,1,IK,Nie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/44`,1969),q(1970,1,IK,Pie),Q.dk=function(e){return j(e,191)},Q.ek=function(e){return V(bJ,X,191,e,0,1)},L(eq,`XMLTypePackageImpl/45`,1970),q(1971,1,IK,Fie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/46`,1971),q(1972,1,IK,Iie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/47`,1972),q(1973,1,IK,Lie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/48`,1973),q(1974,1,IK,Rie),Q.dk=function(e){return j(e,191)},Q.ek=function(e){return V(bJ,X,191,e,0,1)},L(eq,`XMLTypePackageImpl/49`,1974),q(1930,1,IK,zie),Q.dk=function(e){return j(e,673)},Q.ek=function(e){return V(yVt,lR,2086,e,0,1)},L(eq,`XMLTypePackageImpl/5`,1930),q(1975,1,IK,Bie),Q.dk=function(e){return j(e,190)},Q.ek=function(e){return V(hJ,X,190,e,0,1)},L(eq,`XMLTypePackageImpl/50`,1975),q(1976,1,IK,Vie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/51`,1976),q(1977,1,IK,Hie),Q.dk=function(e){return j(e,15)},Q.ek=function(e){return V(pJ,X,15,e,0,1)},L(eq,`XMLTypePackageImpl/52`,1977),q(1931,1,IK,Uie),Q.dk=function(e){return Cp(e)},Q.ek=function(e){return V(CJ,X,2,e,6,1)},L(eq,`XMLTypePackageImpl/6`,1931),q(1932,1,IK,Wie),Q.dk=function(e){return j(e,195)},Q.ek=function(e){return V(X9,X,195,e,0,2)},L(eq,`XMLTypePackageImpl/7`,1932),q(1933,1,IK,Gie),Q.dk=function(e){return xp(e)},Q.ek=function(e){return V(oJ,X,473,e,8,1)},L(eq,`XMLTypePackageImpl/8`,1933),q(1934,1,IK,Kie),Q.dk=function(e){return j(e,221)},Q.ek=function(e){return V(sJ,X,221,e,0,1)},L(eq,`XMLTypePackageImpl/9`,1934);var A9,j9,M9,N9,$;q(53,63,XR,ll),L(pq,`RegEx/ParseException`,53),q(821,1,{},qie),Q._l=function(e){return e<this.j&&Vy(this.i,e)==63},Q.am=function(){var e,t,n,r,i;if(this.c!=10)throw E(new ll(QL((xm(),BG))));switch(e=this.a,e){case 101:e=27;break;case 102:e=12;break;case 110:e=10;break;case 114:e=13;break;case 116:e=9;break;case 120:if(zL(this),this.c!=0)throw E(new ll(QL((xm(),ZG))));if(this.a==123){i=0,n=0;do{if(zL(this),this.c!=0)throw E(new ll(QL((xm(),ZG))));if((i=Zj(this.a))<0)break;if(n>n*16)throw E(new ll(QL((xm(),Gyt))));n=n*16+i}while(1);if(this.a!=125)throw E(new ll(QL((xm(),Kyt))));if(n>mq)throw E(new ll(QL((xm(),qyt))));e=n}else{if(i=0,this.c!=0||(i=Zj(this.a))<0||(n=i,zL(this),this.c!=0||(i=Zj(this.a))<0))throw E(new ll(QL((xm(),ZG))));n=n*16+i,e=n}break;case 117:if(r=0,zL(this),this.c!=0||(r=Zj(this.a))<0||(t=r,zL(this),this.c!=0||(r=Zj(this.a))<0)||(t=t*16+r,zL(this),this.c!=0||(r=Zj(this.a))<0)||(t=t*16+r,zL(this),this.c!=0||(r=Zj(this.a))<0))throw E(new ll(QL((xm(),ZG))));t=t*16+r,e=t;break;case 118:if(zL(this),this.c!=0||(r=Zj(this.a))<0||(t=r,zL(this),this.c!=0||(r=Zj(this.a))<0)||(t=t*16+r,zL(this),this.c!=0||(r=Zj(this.a))<0)||(t=t*16+r,zL(this),this.c!=0||(r=Zj(this.a))<0)||(t=t*16+r,zL(this),this.c!=0||(r=Zj(this.a))<0)||(t=t*16+r,zL(this),this.c!=0||(r=Zj(this.a))<0))throw E(new ll(QL((xm(),ZG))));if(t=t*16+r,t>mq)throw E(new ll(QL((xm(),`parser.descappe.4`))));e=t;break;case 65:case 90:case 122:throw E(new ll(QL((xm(),Jyt))))}return e},Q.bm=function(e){var t,n;switch(e){case 100:n=(this.e&32)==32?kL(`Nd`,!0):(KL(),z9);break;case 68:n=(this.e&32)==32?kL(`Nd`,!1):(KL(),JVt);break;case 119:n=(this.e&32)==32?kL(`IsWord`,!0):(KL(),U9);break;case 87:n=(this.e&32)==32?kL(`IsWord`,!1):(KL(),XVt);break;case 115:n=(this.e&32)==32?kL(`IsSpace`,!0):(KL(),H9);break;case 83:n=(this.e&32)==32?kL(`IsSpace`,!1):(KL(),YVt);break;default:throw E(new Lc((t=e,Jbt+t.toString(16))))}return n},Q.cm=function(e){var t,n,r,i,a,o,s,c,l,u,d,f;for(this.b=1,zL(this),t=null,this.c==0&&this.a==94?(zL(this),e?u=(KL(),KL(),++W9,new Qx(5)):(t=(KL(),KL(),++W9,new Qx(4)),OF(t,0,mq),u=(++W9,new Qx(4)))):u=(KL(),KL(),++W9,new Qx(4)),i=!0;(f=this.c)!=1&&(f!=0||this.a!=93||i);){if(i=!1,n=this.a,r=!1,f==10)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:ZI(u,this.bm(n)),r=!0;break;case 105:case 73:case 99:case 67:n=this.sm(u,n),n<0&&(r=!0);break;case 112:case 80:if(d=U5e(this,n),!d)throw E(new ll(QL((xm(),GG))));ZI(u,d),r=!0;break;default:n=this.am()}else if(f==20){if(o=Sh(this.i,58,this.d),o<0)throw E(new ll(QL((xm(),KG))));if(s=!0,Vy(this.i,this.d)==94&&(++this.d,s=!1),a=Gb(this.i,this.d,o),c=Qze(a,s,(this.e&512)==512),!c)throw E(new ll(QL((xm(),Byt))));if(ZI(u,c),r=!0,o+1>=this.j||Vy(this.i,o+1)!=93)throw E(new ll(QL((xm(),KG))));this.d=o+2}if(zL(this),!r){if(this.c!=0||this.a!=45)OF(u,n,n);else{if(zL(this),(f=this.c)==1)throw E(new ll(QL((xm(),qG))));f==0&&this.a==93?(OF(u,n,n),OF(u,45,45)):(l=this.a,f==10&&(l=this.am()),zL(this),OF(u,n,l))}}(this.e&aK)==aK&&this.c==0&&this.a==44&&zL(this)}if(this.c==1)throw E(new ll(QL((xm(),qG))));return t&&(gL(t,u),u=t),PP(u),aL(u),this.b=0,zL(this),u},Q.dm=function(){for(var e,t,n=this.cm(!1),r;(r=this.c)!=7;)if(e=this.a,r==0&&(e==45||e==38)||r==4){if(zL(this),this.c!=9)throw E(new ll(QL((xm(),Hyt))));if(t=this.cm(!1),r==4)ZI(n,t);else if(e==45)gL(n,t);else if(e==38)out(n,t);else throw E(new Lc(`ASSERT`))}else throw E(new ll(QL((xm(),Uyt))));return zL(this),n},Q.em=function(){var e=this.a-48,t=(KL(),KL(),++W9,new $b(12,null,e));return!this.g&&(this.g=new gc),fc(this.g,new tde(e)),zL(this),t},Q.fm=function(){return zL(this),KL(),QVt},Q.gm=function(){return zL(this),KL(),ZVt},Q.hm=function(){throw E(new ll(QL((xm(),QG))))},Q.im=function(){throw E(new ll(QL((xm(),QG))))},Q.jm=function(){return zL(this),KKe()},Q.km=function(){return zL(this),KL(),eHt},Q.lm=function(){return zL(this),KL(),nHt},Q.mm=function(){var e;if(this.d>=this.j||((e=Vy(this.i,this.d++))&65504)!=64)throw E(new ll(QL((xm(),Lyt))));return zL(this),KL(),KL(),++W9,new E_(0,e-64)},Q.nm=function(){return zL(this),Jot()},Q.om=function(){return zL(this),KL(),rHt},Q.pm=function(){var e=(KL(),KL(),++W9,new E_(0,105));return zL(this),e},Q.qm=function(){return zL(this),KL(),tHt},Q.rm=function(){return zL(this),KL(),$Vt},Q.sm=function(e,t){return this.am()},Q.tm=function(){return zL(this),KL(),KVt},Q.um=function(){var e,t,n,r,i;if(this.d+1>=this.j)throw E(new ll(QL((xm(),Pyt))));if(r=-1,t=null,e=Vy(this.i,this.d),49<=e&&e<=57){if(r=e-48,!this.g&&(this.g=new gc),fc(this.g,new tde(r)),++this.d,Vy(this.i,this.d)!=41)throw E(new ll(QL((xm(),HG))));++this.d}else switch(e==63&&--this.d,zL(this),t=PL(this),t.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw E(new ll(QL((xm(),HG))));break;default:throw E(new ll(QL((xm(),Fyt))))}if(zL(this),i=YA(this),n=null,i.e==2){if(i.Nm()!=2)throw E(new ll(QL((xm(),Iyt))));n=i.Jm(1),i=i.Jm(0)}if(this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),KL(),KL(),++W9,new PVe(r,t,i,n)},Q.vm=function(){return zL(this),KL(),qVt},Q.wm=function(){var e;if(zL(this),e=kv(24,YA(this)),this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),e},Q.xm=function(){var e;if(zL(this),e=kv(20,YA(this)),this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),e},Q.ym=function(){var e;if(zL(this),e=kv(22,YA(this)),this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),e},Q.zm=function(){var e=0,t,n=0,r,i;for(t=-1;this.d<this.j&&(t=Vy(this.i,this.d),i=B7e(t),i!=0);)e|=i,++this.d;if(this.d>=this.j)throw E(new ll(QL((xm(),UG))));if(t==45){for(++this.d;this.d<this.j&&(t=Vy(this.i,this.d),i=B7e(t),i!=0);)n|=i,++this.d;if(this.d>=this.j)throw E(new ll(QL((xm(),UG))))}if(t==58){if(++this.d,zL(this),r=Qke(YA(this),e,n),this.c!=7)throw E(new ll(QL((xm(),HG))));zL(this)}else if(t==41)++this.d,zL(this),r=Qke(YA(this),e,n);else throw E(new ll(QL((xm(),Nyt))));return r},Q.Am=function(){var e;if(zL(this),e=kv(21,YA(this)),this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),e},Q.Bm=function(){var e;if(zL(this),e=kv(23,YA(this)),this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),e},Q.Cm=function(){var e,t;if(zL(this),e=this.f++,t=Av(YA(this),e),this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),t},Q.Dm=function(){var e;if(zL(this),e=Av(YA(this),0),this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),e},Q.Em=function(e){return zL(this),this.c==5?(zL(this),T_(e,(KL(),KL(),++W9,new MS(9,e)))):T_(e,(KL(),KL(),++W9,new MS(3,e)))},Q.Fm=function(e){var t;return zL(this),t=(KL(),KL(),++W9,new Sm(2)),this.c==5?(zL(this),sL(t,B9),sL(t,e)):(sL(t,e),sL(t,B9)),t},Q.Gm=function(e){return zL(this),this.c==5?(zL(this),KL(),KL(),++W9,new MS(9,e)):(KL(),KL(),++W9,new MS(3,e))},Q.a=0,Q.b=0,Q.c=0,Q.d=0,Q.e=0,Q.f=1,Q.g=null,Q.j=0,L(pq,`RegEx/RegexParser`,821),q(1913,821,{},bfe),Q._l=function(e){return!1},Q.am=function(){return BF(this)},Q.bm=function(e){return gI(e)},Q.cm=function(e){return mpt(this)},Q.dm=function(){throw E(new ll(QL((xm(),QG))))},Q.em=function(){throw E(new ll(QL((xm(),QG))))},Q.fm=function(){throw E(new ll(QL((xm(),QG))))},Q.gm=function(){throw E(new ll(QL((xm(),QG))))},Q.hm=function(){return zL(this),gI(67)},Q.im=function(){return zL(this),gI(73)},Q.jm=function(){throw E(new ll(QL((xm(),QG))))},Q.km=function(){throw E(new ll(QL((xm(),QG))))},Q.lm=function(){throw E(new ll(QL((xm(),QG))))},Q.mm=function(){return zL(this),gI(99)},Q.nm=function(){throw E(new ll(QL((xm(),QG))))},Q.om=function(){throw E(new ll(QL((xm(),QG))))},Q.pm=function(){return zL(this),gI(105)},Q.qm=function(){throw E(new ll(QL((xm(),QG))))},Q.rm=function(){throw E(new ll(QL((xm(),QG))))},Q.sm=function(e,t){return ZI(e,gI(t)),-1},Q.tm=function(){return zL(this),KL(),KL(),++W9,new E_(0,94)},Q.um=function(){throw E(new ll(QL((xm(),QG))))},Q.vm=function(){return zL(this),KL(),KL(),++W9,new E_(0,36)},Q.wm=function(){throw E(new ll(QL((xm(),QG))))},Q.xm=function(){throw E(new ll(QL((xm(),QG))))},Q.ym=function(){throw E(new ll(QL((xm(),QG))))},Q.zm=function(){throw E(new ll(QL((xm(),QG))))},Q.Am=function(){throw E(new ll(QL((xm(),QG))))},Q.Bm=function(){throw E(new ll(QL((xm(),QG))))},Q.Cm=function(){var e;if(zL(this),e=Av(YA(this),0),this.c!=7)throw E(new ll(QL((xm(),HG))));return zL(this),e},Q.Dm=function(){throw E(new ll(QL((xm(),QG))))},Q.Em=function(e){return zL(this),T_(e,(KL(),KL(),++W9,new MS(3,e)))},Q.Fm=function(e){var t;return zL(this),t=(KL(),KL(),++W9,new Sm(2)),sL(t,e),sL(t,B9),t},Q.Gm=function(e){return zL(this),KL(),KL(),++W9,new MS(3,e)};var P9=null,F9=null;L(pq,`RegEx/ParserForXMLSchema`,1913),q(121,1,Cq,Hs),Q.Hm=function(e){throw E(new Lc(`Not supported.`))},Q.Im=function(){return-1},Q.Jm=function(e){return null},Q.Km=function(){return null},Q.Lm=function(e){},Q.Mm=function(e){},Q.Nm=function(){return 0},Q.Ib=function(){return this.Om(0)},Q.Om=function(e){return this.e==11?`.`:``},Q.e=0;var VVt,I9,L9,HVt,UVt,R9=null,z9,WVt=null,GVt,B9,V9=null,KVt,qVt,JVt,YVt,XVt,ZVt,H9,QVt,$Vt,eHt,tHt,U9,nHt,rHt,W9=0,iHt=L(pq,`RegEx/Token`,121);q(137,121,{3:1,137:1,121:1},Qx),Q.Om=function(e){var t,n,r;if(this.e==4){if(this==GVt)n=`.`;else if(this==z9)n=`\\d`;else if(this==U9)n=`\\w`;else if(this==H9)n=`\\s`;else{for(r=new yl,r.a+=`[`,t=0;t<this.b.length;t+=2)(e&aK)!=0&&t>0&&(r.a+=`,`),this.b[t]===this.b[t+1]?Np(r,PI(this.b[t])):(Np(r,PI(this.b[t])),r.a+=`-`,Np(r,PI(this.b[t+1])));r.a+=`]`,n=r.a}}else if(this==JVt)n=`\\D`;else if(this==XVt)n=`\\W`;else if(this==YVt)n=`\\S`;else{for(r=new yl,r.a+=`[^`,t=0;t<this.b.length;t+=2)(e&aK)!=0&&t>0&&(r.a+=`,`),this.b[t]===this.b[t+1]?Np(r,PI(this.b[t])):(Np(r,PI(this.b[t])),r.a+=`-`,Np(r,PI(this.b[t+1])));r.a+=`]`,n=r.a}return n},Q.a=!1,Q.c=!1,L(pq,`RegEx/RangeToken`,137),q(581,1,{581:1},tde),Q.a=0,L(pq,`RegEx/RegexParser/ReferencePosition`,581),q(580,1,{3:1,580:1},_he),Q.Fb=function(e){var t;return e==null||!j(e,580)?!1:(t=P(e,580),mg(this.b,t.b)&&this.a==t.a)},Q.Hb=function(){return DO(this.b+`/`+vF(this.a))},Q.Ib=function(){return this.c.Om(this.a)},Q.a=0,L(pq,`RegEx/RegularExpression`,580),q(228,121,Cq,E_),Q.Im=function(){return this.a},Q.Om=function(e){var t,n,r;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:r=`\\`+eg(this.a&az);break;case 12:r=`\\f`;break;case 10:r=`\\n`;break;case 13:r=`\\r`;break;case 9:r=`\\t`;break;case 27:r=`\\e`;break;default:this.a>=Wz?(n=(t=this.a>>>0,`0`+t.toString(16)),r=`\\v`+Gb(n,n.length-6,n.length)):r=``+eg(this.a&az)}break;case 8:r=this==KVt||this==qVt?``+eg(this.a&az):`\\`+eg(this.a&az);break;default:r=null}return r},Q.a=0,L(pq,`RegEx/Token/CharToken`,228),q(323,121,Cq,MS),Q.Jm=function(e){return this.a},Q.Lm=function(e){this.b=e},Q.Mm=function(e){this.c=e},Q.Nm=function(){return 1},Q.Om=function(e){var t;if(this.e==3){if(this.c<0&&this.b<0)t=this.a.Om(e)+`*`;else if(this.c==this.b)t=this.a.Om(e)+`{`+this.c+`}`;else if(this.c>=0&&this.b>=0)t=this.a.Om(e)+`{`+this.c+`,`+this.b+`}`;else if(this.c>=0&&this.b<0)t=this.a.Om(e)+`{`+this.c+`,}`;else throw E(new Lc(`Token#toString(): CLOSURE `+this.c+cR+this.b))}else if(this.c<0&&this.b<0)t=this.a.Om(e)+`*?`;else if(this.c==this.b)t=this.a.Om(e)+`{`+this.c+`}?`;else if(this.c>=0&&this.b>=0)t=this.a.Om(e)+`{`+this.c+`,`+this.b+`}?`;else if(this.c>=0&&this.b<0)t=this.a.Om(e)+`{`+this.c+`,}?`;else throw E(new Lc(`Token#toString(): NONGREEDYCLOSURE `+this.c+cR+this.b));return t},Q.b=0,Q.c=0,L(pq,`RegEx/Token/ClosureToken`,323),q(822,121,Cq,Fke),Q.Jm=function(e){return e==0?this.a:this.b},Q.Nm=function(){return 2},Q.Om=function(e){return this.b.e==3&&this.b.Jm(0)==this.a?this.a.Om(e)+`+`:this.b.e==9&&this.b.Jm(0)==this.a?this.a.Om(e)+`+?`:this.a.Om(e)+(``+this.b.Om(e))},L(pq,`RegEx/Token/ConcatToken`,822),q(1911,121,Cq,PVe),Q.Jm=function(e){if(e==0)return this.d;if(e==1)return this.b;throw E(new Lc(`Internal Error: `+e))},Q.Nm=function(){return this.b?2:1},Q.Om=function(e){var t=this.c>0?`(?(`+this.c+`)`:this.a.e==8?`(?(`+this.a+`)`:`(?`+this.a;return this.b?t+=this.d+`|`+this.b+`)`:t+=this.d+`)`,t},Q.c=0,L(pq,`RegEx/Token/ConditionToken`,1911),q(1912,121,Cq,tFe),Q.Jm=function(e){return this.b},Q.Nm=function(){return 1},Q.Om=function(e){return`(?`+(this.a==0?``:vF(this.a))+(this.c==0?``:vF(this.c))+`:`+this.b.Om(e)+`)`},Q.a=0,Q.c=0,L(pq,`RegEx/Token/ModifierToken`,1912),q(823,121,Cq,yy),Q.Jm=function(e){return this.a},Q.Nm=function(){return 1},Q.Om=function(e){var t=null;switch(this.e){case 6:t=this.b==0?`(?:`+this.a.Om(e)+`)`:`(`+this.a.Om(e)+`)`;break;case 20:t=`(?=`+this.a.Om(e)+`)`;break;case 21:t=`(?!`+this.a.Om(e)+`)`;break;case 22:t=`(?<=`+this.a.Om(e)+`)`;break;case 23:t=`(?<!`+this.a.Om(e)+`)`;break;case 24:t=`(?>`+this.a.Om(e)+`)`}return t},Q.b=0,L(pq,`RegEx/Token/ParenToken`,823),q(518,121,{3:1,121:1,518:1},$b),Q.Km=function(){return this.b},Q.Om=function(e){return this.e==12?`\\`+this.a:vet(this.b)},Q.a=0,L(pq,`RegEx/Token/StringToken`,518),q(466,121,Cq,Sm),Q.Hm=function(e){sL(this,e)},Q.Jm=function(e){return P(Dy(this.a,e),121)},Q.Nm=function(){return this.a?this.a.a.c.length:0},Q.Om=function(e){var t,n,r,i,a;if(this.e==1){if(this.a.a.c.length==2)t=P(Dy(this.a,0),121),n=P(Dy(this.a,1),121),i=n.e==3&&n.Jm(0)==t?t.Om(e)+`+`:n.e==9&&n.Jm(0)==t?t.Om(e)+`+?`:t.Om(e)+(``+n.Om(e));else{for(a=new yl,r=0;r<this.a.a.c.length;r++)Np(a,P(Dy(this.a,r),121).Om(e));i=a.a}return i}if(this.a.a.c.length==2&&P(Dy(this.a,1),121).e==7)i=P(Dy(this.a,0),121).Om(e)+`?`;else if(this.a.a.c.length==2&&P(Dy(this.a,0),121).e==7)i=P(Dy(this.a,1),121).Om(e)+`??`;else{for(a=new yl,Np(a,P(Dy(this.a,0),121).Om(e)),r=1;r<this.a.a.c.length;r++)a.a+=`|`,Np(a,P(Dy(this.a,r),121).Om(e));i=a.a}return i},L(pq,`RegEx/Token/UnionToken`,466),q(515,1,{590:1},lu),Q.Ib=function(){return this.a.b},L(Qbt,`XMLTypeUtil/PatternMatcherImpl`,515),q(1676,1489,{},Jie);var aHt;L(Qbt,`XMLTypeValidator`,1676),q(270,1,MR,X_),Q.Ic=function(e){QS(this,e)},Q.Jc=function(){return(this.b-this.a)*this.c<0?G9:new qm(this)},Q.a=0,Q.b=0,Q.c=0;var G9;L(Tq,`ExclusiveRange`,270),q(1055,1,wR,Yie),Q.Rb=function(e){P(e,15),gye()},Q.Nb=function(e){jv(this,e)},Q.Pb=function(){return Gme()},Q.Ub=function(){return Kme()},Q.Wb=function(e){P(e,15),hye()},Q.Ob=function(){return!1},Q.Sb=function(){return!1},Q.Tb=function(){return-1},Q.Vb=function(){return-1},Q.Qb=function(){throw E(new al(txt))},L(Tq,`ExclusiveRange/1`,1055),q(259,1,wR,qm),Q.Rb=function(e){P(e,15),_ye()},Q.Nb=function(e){jv(this,e)},Q.Pb=function(){return Jqe(this)},Q.Ub=function(){return aBe(this)},Q.Wb=function(e){P(e,15),vye()},Q.Ob=function(){return this.c.c<0?this.a>=this.c.b:this.a<=this.c.b},Q.Sb=function(){return this.b>0},Q.Tb=function(){return this.b},Q.Vb=function(){return this.b-1},Q.Qb=function(){throw E(new al(txt))},Q.a=0,Q.b=0,L(Tq,`ExclusiveRange/RangeIterator`,259);var K9=Ly(dK,`C`),q9=Ly(mK,`I`),J9=Ly(eR,`Z`),Y9=Ly(hK,`J`),X9=Ly(uK,`B`),Z9=Ly(fK,`D`),Q9=Ly(pK,`F`),$9=Ly(gK,`S`),oHt=g_(`org.eclipse.elk.core.labels`,`ILabelManager`),sHt=g_(CG,`DiagnosticChain`),cHt=g_(kbt,`ResourceSet`),lHt=L(CG,`InvocationTargetException`,null),uHt=(vl(),wRe),dHt=dHt=P2e;tUe(xde),nWe(`permProps`,[[[`locale`,`default`],[nxt,`gecko1_8`]],[[`locale`,`default`],[nxt,`safari`]]]),dHt(null,`elk`,null)}))(),1),fte=yn.default.Worker??yn.default.default??yn.default,bn=null,xn;function pte(){return bn||(bn=new fte,bn.onmessage=e=>{xn=e.data},bn.dispatcher.saveDispatch({data:{id:0,cmd:`register`,algorithms:[`layered`]}}),bn)}function Sn(e){let t=pte();if(xn=void 0,t.dispatcher.saveDispatch({data:{id:1,cmd:`layout`,graph:e,layoutOptions:{},options:{}}}),!xn)throw Error(`ELK returned no result (the synchronous dispatch path of elkjs changed)`);if(xn.error)throw Error(`ELK layout failed: ${String(xn.error.message??xn.error)}`);return xn.data}var Cn=10,mte=1400,wn=16,Tn=11,En={out:{bottom:0,right:40,left:40,top:700},in:{top:0,left:40,right:40,bottom:700}},Dn=[1,0,-1,0],On=[0,1,0,-1],kn=(e,t,n,r,i,a)=>Math.max(e,n)>i.x-a&&Math.min(e,n)<i.x+i.w+a&&Math.max(t,r)>i.y-a&&Math.min(t,r)<i.y+i.h+a;function An(e,t,n=!1,r=0){let i=e.x+e.w/2,a=e.y+e.h/2,o=[[i,e.y,`top`],[i,e.y+e.h,`bottom`],[e.x,a,`left`],[e.x+e.w,a,`right`]];if(!t){for(let t of[.25,.75])o.push([e.x+e.w*t,e.y,`top`,!0],[e.x+e.w*t,e.y+e.h,`bottom`,!0]);if(n){let t=r?Math.min(Math.max(r,e.h/4),e.h/2-8):e.h/4;for(let n of[-t,t])o.push([e.x,e.y+e.h/2+n,`left`,!0],[e.x+e.w,e.y+e.h/2+n,`right`,!0])}}return o}var jn={top:3,bottom:1,left:2,right:0};function Mn(e,t,n,r,i){let a=Math.abs(t-r)<.5;for(let[[o,s],[c,l]]of i)if(Math.abs(s-l)<.5===a){if(a){if(Math.abs(s-t)>=10)continue;if(Math.min(Math.max(e,n),Math.max(o,c))-Math.max(Math.min(e,n),Math.min(o,c))>.5)return!0}else{if(Math.abs(o-e)>=10)continue;if(Math.min(Math.max(t,r),Math.max(s,l))-Math.max(Math.min(t,r),Math.min(s,l))>.5)return!0}}return!1}var Nn=e=>[[[e.x,e.y],[e.x+e.w,e.y]],[[e.x,e.y+e.h],[e.x+e.w,e.y+e.h]],[[e.x,e.y],[e.x,e.y+e.h]],[[e.x+e.w,e.y],[e.x+e.w,e.y+e.h]]],hte=class{constructor(){this.n=0,this.k=new Float64Array(1024),this.s=new Int32Array(1024),this.c=new Float64Array(1024)}swap(e,t){let{k:n,s:r,c:i}=this,a=n[e];n[e]=n[t],n[t]=a;let o=r[e];r[e]=r[t],r[t]=o;let s=i[e];i[e]=i[t],i[t]=s}push(e,t,n){if(this.n===this.k.length){let e=(e,t)=>{let n=new t(e.length*2);return n.set(e),n};this.k=e(this.k,Float64Array),this.s=e(this.s,Int32Array),this.c=e(this.c,Float64Array)}let r=this.n;for(this.n+=1,this.k[r]=e,this.s[r]=t,this.c[r]=n;r>0;){let e=r-1>>1;if(this.k[e]<=this.k[r])break;this.swap(e,r),r=e}}pop(){let{k:e,s:t,c:n}=this;if(this.top=[e[0],t[0],n[0]],--this.n,this.n>0){e[0]=e[this.n],t[0]=t[this.n],n[0]=n[this.n];let r=0;for(;;){let t=r*2+1,n=t+1,i=r;if(t<this.n&&e[t]<e[i]&&(i=t),n<this.n&&e[n]<e[i]&&(i=n),i===r)break;this.swap(i,r),r=i}}return this.top}get size(){return this.n}};function Pn(e){let{from:t,to:n,nodes:r,blocks:i=[],routes:a=[],borders:o=[],bounds:s=null}=e,c={out:{...En.out,...e.portCost?.out},in:{...En.in,...e.portCost?.in}},l=e.crossCost??1400,u=e.parallelGap??10,d=[...a.filter(e=>!e.share&&e.points.length).flatMap(e=>[e.points[0],e.points[e.points.length-1]]),...e.taken??[]],f=([e,t])=>!d.some(([n,r])=>Math.abs(n-e)<1&&Math.abs(r-t)<1),p=An(t,e.fromDiamond,e.sidePorts,e.sideSpread).filter(([t,n,r])=>(!e.outSides||e.outSides.includes(r))&&f([t,n])),m=t=>!e.inAt||e.inAt.some(([e,n])=>Math.abs(e-t[0])<1&&Math.abs(n-t[1])<1),h=An(n,e.toDiamond,e.sidePorts,e.sideSpread).filter(([t,n,r])=>(!e.inSides||e.inSides.includes(r))&&f([t,n])&&m([t,n])),g=e=>e===t||e===n||e.x===t.x&&e.y===t.y||e.x===n.x&&e.y===n.y,_=r.filter(e=>!g(e)),v=new Set,y=new Set;for(let e of _)v.add(e.x-Cn-1).add(e.x+e.w+Cn+1),y.add(e.y-Cn-1).add(e.y+e.h+Cn+1);for(let e of i)v.add(e.x-4).add(e.x+e.w+4),y.add(e.y-4).add(e.y+e.h+4);for(let[[e,t],[n,r]]of o)v.add(e-10-1).add(e+10+1).add(n-10-1).add(n+10+1),y.add(t-10-1).add(t+10+1).add(r-10-1).add(r+10+1);for(let[e,t]of[...p,...h])v.add(e),y.add(t);for(let e of[t,n])v.add(e.x-Cn-1).add(e.x+e.w+Cn+1),y.add(e.y-Cn-1).add(e.y+e.h+Cn+1);for(let t of a)for(let[n,r]of t.points)v.add(n-u-1).add(n+u+1),y.add(r-u-1).add(r+u+1),t.share&&e.join&&(v.add(n),y.add(r));let b=e=>[...e].map(e=>Math.round(e*2)/2).sort((e,t)=>e-t).filter((e,t,n)=>t===0||e!==n[t-1]),x=b(v),S=b(y),C=e=>e.flatMap((t,n)=>n===0?[t]:[(e[n-1]+t)/2,t]);x=C(x),S=C(S);let ee=new Map(x.map((e,t)=>[e,t])),w=new Map(S.map((e,t)=>[e,t])),te=x.length,ne=S.length,re=[],ie=[];for(let e of a)for(let t=1;t<e.points.length;t+=1){let[n,r]=e.points[t-1],[i,a]=e.points[t];Math.abs(r-a)<.5?re.push({y:r,a:Math.min(n,i),b:Math.max(n,i),share:e.share}):ie.push({x:n,a:Math.min(r,a),b:Math.max(r,a),share:e.share})}let ae=(e,r,a,c)=>{if(s&&(Math.min(e,a)<s.x||Math.max(e,a)>s.x+s.w||Math.min(r,c)<s.y||Math.max(r,c)>s.y+s.h)||Mn(e,r,a,c,o)||_.some(t=>kn(e,r,a,c,t,Cn))||[t,n].some(t=>kn(e,r,a,c,t,-.5))||i.some(t=>kn(e,r,a,c,t,2)))return null;if(Math.abs(r-c)<.5){let t=Math.min(e,a),n=Math.max(e,a);return re.some(e=>!e.share&&Math.abs(e.y-r)<u&&Math.min(n,e.b)-Math.max(t,e.a)>.5)?null:ie.filter(e=>!e.share&&e.x>=t-.01&&e.x<n-.01&&r>e.a+.5&&r<e.b-.5).length}let l=Math.min(r,c),d=Math.max(r,c);return ie.some(t=>!t.share&&Math.abs(t.x-e)<u&&Math.min(d,t.b)-Math.max(l,t.a)>.5)?null:re.filter(t=>!t.share&&t.y>=l-.01&&t.y<d-.01&&e>t.a+.5&&e<t.b-.5).length},oe=(e,t,n,r)=>Math.abs(t-r)<.5?re.some(r=>r.share&&Math.abs(r.y-t)<.5&&Math.min(Math.max(e,n),r.b)-Math.max(Math.min(e,n),r.a)>.5):ie.some(n=>n.share&&Math.abs(n.x-e)<.5&&Math.min(Math.max(t,r),n.b)-Math.max(Math.min(t,r),n.a)>.5),se=te*ne,ce=new Uint8Array(se),le=new Uint8Array(se),ue=new Uint16Array(se),de=new Uint16Array(se),fe=new Uint8Array(se),pe=new Uint8Array(se),me=(e,t)=>{let n=0,r=e.length;for(;n<r;){let i=n+r>>1;e[i]<t?n=i+1:r=i}return n},he=(e,t,n,r,i)=>{let a=Math.max(0,me(x,e)-1),o=Math.min(te-1,me(x,t)+1),s=Math.max(0,me(S,n)-1),c=Math.min(ne-1,me(S,r)+1);for(let e=s;e<=c;e+=1)for(let t=a;t<=o;t+=1)i(t,e)},ge=e=>(t,n)=>{let r=n*te+t;t+1<te&&!ce[r]&&e(x[t],S[n],x[t+1],S[n])&&(ce[r]=1),n+1<ne&&!le[r]&&e(x[t],S[n],x[t],S[n+1])&&(le[r]=1)};for(let e of _)he(e.x-Cn,e.x+e.w+Cn,e.y-Cn,e.y+e.h+Cn,ge((t,n,r,i)=>kn(t,n,r,i,e,Cn)));for(let e of[t,n])he(e.x,e.x+e.w,e.y,e.y+e.h,ge((t,n,r,i)=>kn(t,n,r,i,e,-.5)));for(let e of i)he(e.x-2,e.x+e.w+2,e.y-2,e.y+e.h+2,ge((t,n,r,i)=>kn(t,n,r,i,e,2)));for(let e of o){let[[t,n],[r,i]]=e;he(Math.min(t,r)-10,Math.max(t,r)+10,Math.min(n,i)-10,Math.max(n,i)+10,ge((t,n,r,i)=>Mn(t,n,r,i,[e])))}for(let t of re)t.share?he(t.a,t.b,t.y,t.y,(n,r)=>{e.join&&n+1<te&&Math.abs(t.y-S[r])<.5&&x[n]>=t.a-.5&&x[n+1]<=t.b+.5&&(fe[r*te+n]=1)}):(he(t.a,t.b,t.y-u,t.y+u,(e,n)=>{e+1<te&&Math.abs(t.y-S[n])<u&&Math.min(x[e+1],t.b)-Math.max(x[e],t.a)>.5&&(ce[n*te+e]=1)}),he(t.a,t.b,t.y,t.y,(e,n)=>{n+1<ne&&t.y>=S[n]-.01&&t.y<S[n+1]-.01&&x[e]>t.a+.5&&x[e]<t.b-.5&&(de[n*te+e]+=1)}));for(let t of ie)t.share?he(t.x,t.x,t.a,t.b,(n,r)=>{e.join&&r+1<ne&&Math.abs(t.x-x[n])<.5&&S[r]>=t.a-.5&&S[r+1]<=t.b+.5&&(pe[r*te+n]=1)}):(he(t.x-u,t.x+u,t.a,t.b,(e,n)=>{n+1<ne&&Math.abs(t.x-x[e])<u&&Math.min(S[n+1],t.b)-Math.max(S[n],t.a)>.5&&(le[n*te+e]=1)}),he(t.x,t.x,t.a,t.b,(e,n)=>{e+1<te&&t.x>=x[e]-.01&&t.x<x[e+1]-.01&&S[n]>t.a+.5&&S[n]<t.b-.5&&(ue[n*te+e]+=1)}));let _e=new Uint8Array(se),ve=new Uint8Array(se);for(let t of e.soft??[])he(t.x,t.x+t.w,t.y,t.y+t.h,(e,n)=>{let r=n*te+e,i=(e,n)=>e>t.x&&e<t.x+t.w&&n>t.y&&n<t.y+t.h;e+1<te&&i((x[e]+x[e+1])/2,S[n])&&(_e[r]=1),n+1<ne&&i(x[e],(S[n]+S[n+1])/2)&&(ve[r]=1)});let ye=(e,t,n,r)=>!s||!(Math.min(e,n)<s.x||Math.max(e,n)>s.x+s.w||Math.min(t,r)<s.y||Math.max(t,r)>s.y+s.h),be=(e,t,n)=>{let r=e+Dn[n],i=t+On[n];if(r<0||i<0||r>=te||i>=ne)return null;let a=n===0||n===2,o=a?t*te+Math.min(e,r):Math.min(t,i)*te+e;if((a?ce[o]:le[o])||!ye(x[e],S[t],x[r],S[i]))return null;let s=Math.abs(x[r]-x[e])+Math.abs(S[i]-S[t]),c=a?ue[o]:de[o],u=a?fe[o]:pe[o],d=a?_e[o]:ve[o];return{ni:r,nj:i,cost:s*(u?.8:d?1.05:1)+c*l}},xe=new Map;for(let[e,t,n,r]of h){let i=ee.get(Math.round(e*2)/2),a=w.get(Math.round(t*2)/2);if(i===void 0||a===void 0)continue;let o=(jn[n]+2)%4;xe.set((a*te+i)*4+o,c.in[n]+(r?wn:0))}let Se=new Uint8Array(te*ne);for(let[e,t,n]of h){let r=ee.get(Math.round(e*2)/2),i=w.get(Math.round(t*2)/2);if(r===void 0||i===void 0)continue;let a=jn[n];for(let n=r+Dn[a],o=i+On[a];n>=0&&o>=0&&n<te&&o<ne&&!(Math.abs(x[n]-e)+Math.abs(S[o]-t)>=Tn);n+=Dn[a],o+=On[a])Se[o*te+n]=1}let Ce=h.map(([e,t,n])=>[e,t,(jn[n]+2)%4]),we=e.join&&a.some(e=>e.share)?.8:1,Te=t=>{if(e.exhaustive)return 0;let n=t%4,r=(t-n)/4,i=r%te,a=(r-i)/te,o=x[i],s=S[a],c=1/0;for(let[e,t,r]of Ce){let i;i=n===r?(Dn[n]?Math.abs(t-s)<.5&&(e-o)*Dn[n]>-.5:Math.abs(e-o)<.5&&(t-s)*On[n]>-.5)?0:2:(n+2)%4===r?2:1,c=Math.min(c,Math.max(0,Math.abs(e-o)+Math.abs(t-s)-.5)*we+i*600)}return c},Ee=new Float64Array(te*ne*4).fill(1/0),De=new Int32Array(te*ne*4).fill(-1),Oe=new hte,ke=new Set;for(let[e,t,n,r]of p){let i=ee.get(Math.round(e*2)/2),a=w.get(Math.round(t*2)/2);if(i===void 0||a===void 0)continue;let o=(a*te+i)*4+jn[n],s=c.out[n]+(r?wn:0);ke.add(o),s<Ee[o]&&(Ee[o]=s,Oe.push(s+Te(o),o,s))}let Ae=null,je=e.maxCost??1/0;for(;Oe.size;){let[e,t,n]=Oe.pop();if(n>Ee[t])continue;if(e>=je)break;if(xe.has(t)){let e=n+xe.get(t);e<je&&(je=e,Ae=t)}let r=t%4,i=(t-r)/4,a=i%te,o=(i-a)/te;for(let e of ke.has(t)||Se[i]?[r]:[r,(r+1)%4,(r+3)%4]){let i=be(a,o,e);if(!i)continue;let s=(i.nj*te+i.ni)*4+e,c=n+i.cost+(e===r?0:600);c<Ee[s]&&(Ee[s]=c,De[s]=t,Oe.push(c+Te(s),s,c))}}if(e.onCost?.(je),Ae===null)return null;let Me=[];for(let e=Ae;e!==-1;e=De[e]){let t=(e-e%4)/4,n=t%te,r=(t-n)/te;Me.push([x[n],S[r]])}Me.reverse();let Ne=[Me[0]];for(let e=1;e<Me.length-1;e+=1){let[t,n]=Ne[Ne.length-1],[r,i]=Me[e],[a,o]=Me[e+1];t===r&&r===a||n===i&&i===o||Ne.push(Me[e])}return Ne.push(Me[Me.length-1]),_te(Ne,ae,e.join?oe:void 0)}var gte=160;function _te(e,t,n=()=>!1){let r=e.map(e=>[...e]);for(let e=1;e<r.length-2;e+=1){let i=Math.abs(r[e][0]-r[e+1][0])<.5?0:1,a=r[e][i];if(n(...r[e],...r[e+1]))continue;let o=n=>{let a=[...r[e-1]],o=[...r[e]],s=[...r[e+1]],c=[...r[e+2]];if(o[i]=n,s[i]=n,e===1&&Math.abs(a[i]-o[i])+Math.abs(a[1-i]-o[1-i])<Tn||e+2===r.length-1&&Math.abs(s[i]-c[i])+Math.abs(s[1-i]-c[1-i])<Tn)return null;let l=[t(...a,...o),t(...o,...s),t(...s,...c)];return l.some(e=>e===null)?null:l.reduce((e,t)=>e+t,0)},s=o(a);if(s===null)continue;let c=e=>{let t=a;for(let n=2;n<=gte;n+=2){let r=o(a+e*n);if(r===null||r>s)return{v:t,open:!1};t=a+e*n}return{v:t,open:!0}},l=c(-1),u=c(1);if(l.open||u.open)continue;let d=Math.round((l.v+u.v)/2);r[e][i]=d,r[e+1][i]=d}return r}var Fn=8,In=3,vte=8,yte=1.2,bte=12,Ln=14,Rn=20,xte=10,Ste=12;function zn(e){let t=0;for(let n=1;n<e.length-1;n+=1){let[r,i]=e[n-1],[a,o]=e[n],[s,c]=e[n+1];r===a&&a===s||i===o&&o===c||(t+=1)}return t}var Bn={main:3,branch:2,back:1};function Vn(e,t,n,r=e.points,i=!1){if(r.length<2)return 0;let a=zn(r)*(Bn[e.kind]??1);if(e.kind!==`back`){for(let[i,o]of[[e.from,r[0]],[e.to,r[r.length-1]]]){if(!n.has(i))continue;let r=t.get(i),s=r.x+r.w/2,c=r.y+r.h/2;Math.abs(o[0]-s)<1||Math.abs(o[1]-c)<1||(a+=Bn[e.kind])}let o=t.get(e.to);if(i&&o&&!n.has(e.to)&&r.length>=2){let t=r[r.length-1],n=r[r.length-2];t[0]===n[0]&&Math.abs(t[0]-(o.x+o.w/2))>vte&&(a+=Bn[e.kind]*yte)}}return a}var Hn=e=>e.slice(1).map((t,n)=>[e[n],t]),Un=e=>Hn(e).reduce((e,[t,n])=>e+Math.abs(n[0]-t[0])+Math.abs(n[1]-t[1]),0);function Wn([e,t],n,r){let i=Math.min(e[0],t[0]),a=Math.max(e[0],t[0]),o=Math.min(e[1],t[1]),s=Math.max(e[1],t[1]);return a>n.x-r&&i<n.x+n.w+r&&s>n.y-r&&o<n.y+n.h+r}var Gn=(e,t,n)=>e.x<t.x+t.w+n&&t.x<e.x+e.w+n&&e.y<t.y+t.h+n&&t.y<e.y+e.h+n;function Cte([e,t],[n,r]){let i=Math.abs(e[0]-t[0])<.5;if(i!==Math.abs(n[0]-r[0])<.5)return!1;let[a,o]=i?[0,1]:[1,0];if(Math.abs(e[a]-n[a])>=bte)return!1;let s=Math.max(Math.min(e[o],t[o]),Math.min(n[o],r[o]));return Math.min(Math.max(e[o],t[o]),Math.max(n[o],r[o]))-s>2}function wte([e,t],[n,r]){let i=Math.abs(e[0]-t[0])<.5;if(i===Math.abs(n[0]-r[0])<.5)return!1;let[a,o,s,c]=i?[e,t,n,r]:[n,r,e,t],l=a[0],u=s[1];return l>Math.min(s[0],c[0])+.5&&l<Math.max(s[0],c[0])-.5&&u>Math.min(a[1],o[1])+.5&&u<Math.max(a[1],o[1])-.5}function Kn(e,t,n,r,i=new Set,a={}){let{borders:o=[],within:s=()=>null}=a,c=(e,t)=>r?[t,e]:[e,t],l=e=>{let n=t.get(e),[i,a,o,s]=r?[n.y,n.x,n.h,n.w]:[n.x,n.y,n.w,n.h];return{a0:i,a1:i+o,am:i+o/2,c0:a,c1:a+s,cm:a+s/2}},u=[...t.entries()].map(([e,t])=>({id:e,...t})),d=e=>e.labelAt&&e.labelSize?{x:e.labelAt.x,y:e.labelAt.y,w:e.labelSize.width,h:e.labelSize.height}:null,f=(e,t,n)=>Hn(e).every((e,r,i)=>u.every(a=>r===0&&a.id===t||r===i.length-1&&a.id===n||!Wn(e,a,a.id===t||a.id===n?0:Fn))),p=e=>Hn(e).every(e=>n.every(t=>!Wn(e,t,2))),m=(e,t)=>{if(Hn(t).some(([e,t])=>Mn(e[0],e[1],t[0],t[1],o)))return!1;let n=s(e);return!n||t.every(([e,t])=>e>=n.x&&e<=n.x+n.w&&t>=n.y&&t<=n.y+n.h)},h=e=>{let n=l(e.from),r=l(e.to),a=[];if(e.kind!==`back`){let t=(e,t,n)=>i.has(t)?Math.abs(n-e.cm)<1:n>=e.c0+Fn&&n<=e.c1-Fn,o=Math.max(n.c0,r.c0),s=Math.min(n.c1,r.c1);for(let i of[n.cm,r.cm,(o+s)/2])r.a0>n.a1&&t(n,e.from,i)&&t(r,e.to,i)&&a.push([c(n.a1,i),c(r.a0,i)]);let l=(e,t)=>i.has(t)?[e.cm]:[e.cm,e.cm-(e.c1-e.c0)/4,e.cm+(e.c1-e.c0)/4];for(let t of l(r,e.to)){let e=t>n.cm?1:-1;(e>0?t>=n.c1+Ln:t<=n.c0-Ln)&&r.a0>n.am+Ln&&a.push([c(n.am,e>0?n.c1:n.c0),c(n.am,t),c(r.a0,t)])}for(let t of l(n,e.from)){let e=t>r.cm?r.c1:r.c0;(t>r.cm?t>=r.c1+Ln:t<=r.c0-Ln)&&r.am>n.a1+Ln&&a.push([c(n.a1,t),c(r.am,t),c(r.am,e)])}if(r.a0-n.a1>28){let t=[.5,.25,.75].map(e=>n.a1+Ln+(r.a0-n.a1-28)*e);for(let i of l(n,e.from))for(let o of l(r,e.to))if(!(Math.abs(i-o)<1))for(let e of t)a.push([c(n.a1,i),c(e,i),c(e,o),c(r.a0,o)])}}else if(r.a1<n.a0){let o=(e,t,n,r)=>{if(!i.has(t))return r?e.a0:e.a1;let a=(e.a1-e.a0)/2*(1-Math.abs(n-e.cm)/((e.c1-e.c0)/2));return r?e.am-a:e.am+a},s=(e,t,n)=>i.has(t)?Math.abs(n-e.cm)<=(e.c1-e.c0)*.35:n>=e.c0+Fn&&n<=e.c1-Fn,u=Math.max(n.c0,r.c0),d=Math.min(n.c1,r.c1),f=[(u+d)/2];for(let e=u+Fn;e<=d-Fn;e+=6)f.push(e);for(let t of f)s(n,e.from,t)&&s(r,e.to,t)&&a.push([c(o(n,e.from,t,!0),t),c(o(r,e.to,t,!1),t)]);if(i.has(e.to)){let t=r.c1-r.c0,i=[];for(let e=.04;e<=.35;e+=.02)i.push(r.cm-t*e,r.cm+t*e);for(let t of i){let i=t>n.cm?1:-1;(i>0?t<n.c1+Ln:t>n.c0-Ln)||a.push([c(n.am,i>0?n.c1:n.c0),c(n.am,t),c(o(r,e.to,t,!1),t)])}}let p=r.cm>n.cm?1:-1;(p>0?r.cm>=n.c1+Ln:r.cm<=n.c0-Ln)&&a.push([c(n.am,p>0?n.c1:n.c0),c(n.am,r.cm),c(r.a1,r.cm)]),(n.cm>r.cm?n.cm>=r.c1+Ln:n.cm<=r.c0-Ln)&&a.push([c(n.a0,n.cm),c(r.am,n.cm),c(r.am,n.cm>r.cm?r.c1:r.c0)]);let m=[...t.keys()].map(l).filter(e=>e.a1>r.am&&e.a0<n.am);for(let e of[-1,1]){let t=e>0?Math.max(n.c1,r.c1):Math.min(n.c0,r.c0),i=[];for(let n=0;n<Ste;n+=1)i.push(t+e*(Rn+n*xte));for(let t of m)i.push(e>0?t.c1+Rn:t.c0-Rn);for(let o of i){if(e>0?o<t:o>t)continue;let i=e>0?n.c1:n.c0,s=e>0?r.c1:r.c0;a.push([c(n.am,i),c(n.am,o),c(r.am,o),c(r.am,s)])}}}return a},g=r=>{let a=e.map(e=>({...e})),o=new Set(a.filter(e=>!(r&&e.kind===`back`))),s=e=>a.filter(t=>t!==e&&o.has(t)),c=(e,t)=>s(t).reduce((t,n)=>t+Hn(e).reduce((e,t)=>e+Hn(n.points).filter(e=>wte(t,e)).length,0),0),l=(e,t)=>s(t).some(t=>Hn(e).some(e=>Hn(t.points).some(t=>Cte(e,t)))),g=(e,t)=>s(t).some(t=>{let n=d(t);return n&&Hn(e).some(e=>Wn(e,n,1))}),_=(e,t,r=!1)=>{if(!e.labelSize)return{ok:!0,at:null};let{width:i,height:a}=e.labelSize,o=r=>r.x<8||r.y<8||u.some(e=>Gn(r,e,In))||n.some(e=>Gn(r,e,In))||s(e).some(e=>{let t=d(e);return t&&Gn(r,t,In)||Hn(e.points).some(e=>Wn(e,r,In))})||Hn(t).some(e=>Wn(e,r,1)),c=d(e);if(c&&r&&!o(c))return{ok:!0,at:e.labelAt};for(let[e,n]of Hn(t)){let t=Math.abs(e[1]-n[1])<.5,r=Math.abs(n[0]-e[0])+Math.abs(n[1]-e[1]),s=t?i:a;if(r<s+8)continue;let c=Math.sign(t?n[0]-e[0]:n[1]-e[1]);for(let n of[6,(r-s)/2])for(let r of[-1,1]){let s;if(t)s={x:c>0?e[0]+n:e[0]-n-i,y:r<0?e[1]-4-a:e[1]+4,w:i,h:a};else{let t=c>0?e[1]+n:e[1]-n-a;s={x:r<0?e[0]-4-i:e[0]+4,y:t,w:i,h:a}}if(!o(s))return{ok:!0,at:{x:s.x,y:s.y}}}}return{ok:!1}},v=(e,t)=>{let n=[e[0],e[e.length-1]];return s(t).some(e=>[e.points[0],e.points[e.points.length-1]].some(e=>e&&n.some(t=>Math.abs(t[0]-e[0])<1&&Math.abs(t[1]-e[1])<1)))},y=(e,t)=>!v(t,e)&&f(t,e.from,e.to)&&p(t)&&!l(t,e)&&!g(t,e)&&m(e,t),b=(e,t)=>{let n=s(e).filter(e=>{let n=d(e);return n&&Hn(t).some(e=>Wn(e,n,1))}),r={points:e.points,labelAt:e.labelAt,moved:n.map(e=>[e,e.labelAt])},i=()=>{e.points=r.points,e.labelAt=r.labelAt;for(let[e,t]of r.moved)e.labelAt=t};e.points=t;for(let e of n){e.labelAt=null;let t=_(e,e.points);if(!t.ok)return i(),null;e.labelAt=t.at}return i},x=(e,n)=>{let r=Vn(e,t,i,e.points,!0),a=c(e.points,e),o=Un(e.points),s=h(e).map(n=>({pts:n,cost:Vn(e,t,i,n,!0),len:Un(n)})).filter(e=>n||e.cost<=r&&e.len<=o*1.6+40).map(t=>({...t,cross:c(t.pts,e)})).filter(e=>n||e.cost<r||e.cross<a).sort((e,t)=>(n?e.cross-t.cross:0)||e.cost-t.cost||e.len-t.len);for(let t of s){if(!n&&t.cross>a||!f(t.pts,e.from,e.to)||!p(t.pts)||l(t.pts,e)||!m(e,t.pts)||v(t.pts,e))continue;let r=b(e,t.pts);if(!r)continue;let i=_(e,t.pts);if(!i.ok)r();else return i.at&&(e.labelAt=i.at),!0}return!1},S={main:0,branch:1,back:2},C=[...a].sort((e,t)=>S[e.kind]-S[t.kind]),ee=e=>{for(let n=0,r=!0;r&&n<4;n+=1){r=!1;for(let n of e)n.points.length>=2&&Vn(n,t,i,n.points,!0)>0&&x(n,!1)&&(r=!0)}};if(ee(C.filter(e=>o.has(e))),r){for(let e of C.filter(e=>!o.has(e))){o.add(e);let t=y(e,e.points)&&_(e,e.points,!0);if(t?.ok)t.at&&(e.labelAt=t.at);else if(!x(e,!0))return null}ee(C)}return a};return g(!0)??g(!1)}var qn=.5,Jn=e=>e.slice(1).map((t,n)=>[e[n],t]),Yn=([e,t])=>Math.abs(e[0]-t[0])<qn,Xn=(e,t)=>Math.min(e,t),Zn=(e,t)=>Math.max(e,t);function Qn(e,t){if(Yn(e)!==Yn(t))return 0;let n=+!Yn(e);if(Math.abs(e[0][n]-t[0][n])>=qn)return 0;let r=1-n;return Math.max(0,Xn(Zn(e[0][r],e[1][r]),Zn(t[0][r],t[1][r]))-Zn(Xn(e[0][r],e[1][r]),Xn(t[0][r],t[1][r])))}var $n=10;function er(e,t){if(Yn(e)!==Yn(t))return!1;let n=+!Yn(e),r=Math.abs(e[0][n]-t[0][n]);if(r<qn||r>=$n)return!1;let i=1-n;return Xn(Zn(e[0][i],e[1][i]),Zn(t[0][i],t[1][i]))-Zn(Xn(e[0][i],e[1][i]),Xn(t[0][i],t[1][i]))>qn}function tr([e,t],[n,r]){return e>=Xn(n[0],r[0])-qn&&e<=Zn(n[0],r[0])+qn&&t>=Xn(n[1],r[1])-qn&&t<=Zn(n[1],r[1])+qn}function nr(e,t){if(Yn(e)===Yn(t))return!1;let[n,r]=Yn(e)?[e,t]:[t,e],i=n[0][0],a=r[0][1];return i>Xn(r[0][0],r[1][0])+qn&&i<Zn(r[0][0],r[1][0])-qn&&a>Xn(n[0][1],n[1][1])+qn&&a<Zn(n[0][1],n[1][1])-qn}function rr(e,t){let n=Jn(e),r=Jn(t);if(n.some(e=>r.some(t=>nr(e,t)||er(e,t))))return!1;let i=n.map(e=>r.some(t=>Qn(e,t)>qn)),a=i.indexOf(!0);if(a<0)return!0;let[o,s]=e[e.length-1],[c,l]=t[t.length-1];if(Math.abs(o-c)>=qn||Math.abs(s-l)>=qn||!i.slice(a).every(Boolean))return!1;for(let e=a;e<n.length;e+=1){let t=n[e];if(e>a&&!ir(t[0],r)||!ir(t[1],r))return!1}return!0}var ir=(e,t)=>t.some(t=>tr(e,t));function ar(e,t){let n=t.flatMap(e=>Jn(e)),r=Jn(e),i=r.findIndex(e=>n.some(t=>Qn(e,t)>qn));if(i<0)return e;let a=r[i],o=+!!Yn(a),s=Math.sign(a[1][o]-a[0][o]),c=a[1][o];for(let e of n){if(Qn(a,e)<=qn)continue;let t=s>0?Xn(e[0][o],e[1][o]):Zn(e[0][o],e[1][o]);c=s>0?Math.min(c,Math.max(t,a[0][o])):Math.max(c,Math.min(t,a[0][o]))}let l=[...a[0]];return l[o]=c,[...e.slice(0,i+1),l]}var or=10,sr={x:8,y:8,w:1e6,h:1e6},cr={back:0,branch:1,main:2},lr=150,ur=400,dr=600;function fr(e,t,n){if(e.length<2)return!1;let[r,i]=e.slice(-2),a=t.x+t.w/2,o=t.y+t.h/2;return Math.abs(r[1]-i[1])<.5?i[0]<r[0]?a<n.x:a>n.x+n.w:i[1]<r[1]?o<n.y:o>n.y+n.h}var pr=40;function mr(e,t,n){let r=e.map(e=>e[0]),i=e.map(e=>e[1]);return Math.max(0,Math.max(...r)-Math.max(t.x+t.w,n.x+n.w),Math.min(t.x,n.x)-Math.min(...r),Math.max(...i)-Math.max(t.y+t.h,n.y+n.h),Math.min(t.y,n.y)-Math.min(...i))}var hr=e=>e.slice(1).reduce((t,n,r)=>t+Math.abs(n[0]-e[r][0])+Math.abs(n[1]-e[r][1]),0);function gr(e,t){let n=([e,t],[n,r])=>{let i=Math.abs(e[0]-t[0])<.5;if(i===Math.abs(n[0]-r[0])<.5)return!1;let[a,o,s,c]=i?[e,t,n,r]:[n,r,e,t];return a[0]>Math.min(s[0],c[0])+.5&&a[0]<Math.max(s[0],c[0])-.5&&s[1]>Math.min(a[1],o[1])+.5&&s[1]<Math.max(a[1],o[1])-.5},r=yr(e);return t.reduce((e,t)=>e+r.reduce((e,r)=>e+yr(t.points).filter(e=>n(r,e)).length,0),0)}var _r=(e,t,n)=>e.x<t.x+t.w+n&&t.x<e.x+e.w+n&&e.y<t.y+t.h+n&&t.y<e.y+e.h+n,vr=([e,t],n,r)=>Math.max(e[0],t[0])>n.x-r&&Math.min(e[0],t[0])<n.x+n.w+r&&Math.max(e[1],t[1])>n.y-r&&Math.min(e[1],t[1])<n.y+n.h+r,yr=e=>e.slice(1).map((t,n)=>[e[n],t]);function br([e,t],[n,r]){return e[0]===t[0]&&n[0]===r[0]&&e[0]===n[0]?Math.min(Math.max(e[1],t[1]),Math.max(n[1],r[1]))-Math.max(Math.min(e[1],t[1]),Math.min(n[1],r[1]))>.5:e[1]===t[1]&&n[1]===r[1]&&e[1]===n[1]&&Math.min(Math.max(e[0],t[0]),Math.max(n[0],r[0]))-Math.max(Math.min(e[0],t[0]),Math.min(n[0],r[0]))>.5}function xr(e,t,n){return e.x<t.x+t.w+n&&t.x<e.x+e.w+n&&e.y<t.y+t.h+n&&t.y<e.y+e.h+n}function Sr(e){let{placed:t,diamonds:n,titles:r=[],borders:i=[],within:a=()=>null,boxes:o=[]}=e,s=[...t.values()],c=e=>e.labelAt?{x:e.labelAt.x,y:e.labelAt.y,w:e.labelSize.width,h:e.labelSize.height}:null,l=e=>e.isBack??e.kind===`back`,u=(e,t)=>t.to===e.to&&!l(e)&&t.kind!==`back`,d=(e,n)=>hr(e)+lr*zn(e)+(!l(n)&&fr(e,t.get(n.from),t.get(n.to))?ur:0);return{routeFor:(e,l,f=[],p=!1,m=void 0)=>{let h=l.filter(t=>t!==e),g=h.map(c).filter(Boolean),_=c=>Pn({from:t.get(e.from),to:t.get(e.to),fromDiamond:n.has(e.from),toDiamond:n.has(e.to),nodes:s,blocks:[...r,...g],routes:h.map(t=>({points:t.points,share:c&&u(e,t)})),taken:f,inAt:c?h.filter(t=>u(e,t)).map(e=>e.points[e.points.length-1]):void 0,join:c,soft:a(e)?void 0:o,borders:i,bounds:a(e)??sr,maxCost:m});if(p){let t=h.some(t=>u(e,t))?_(!0):null,n=h.filter(t=>u(e,t)).map(e=>e.points);return t&&n.every(e=>rr(t,e))&&ar(t,n)!==t?t:null}let v=_(!1),y=t.get(e.from),b=t.get(e.to),x=!(v&&!fr(v,y,b)&&mr(v,y,b)<=pr&&zn(v)<3)&&h.some(t=>u(e,t))?_(!0):null,S=x&&h.every(t=>!u(e,t)||rr(x,t.points)),C=t=>d(t,e)+mr(t,y,b)+dr*gr(t,h);return S&&(!v||C(x)<C(v))?x:v},joinable:u,routeScore:d,labelRect:c}}function Cr(e){let{placed:t,connections:n,diamonds:r,titles:i=[],borders:a=[],within:o=()=>null,boxOf:s=()=>null}=e,c=[...t.values()],{routeFor:l,joinable:u,routeScore:d,labelRect:f}=Sr(e),p=(e,t,n=null)=>{let r=e.points.map(e=>[...e]);if(r.length<2)return null;if(n&&r[0][0]===r[1][0]&&r[0][0]>=n.x+t+8&&r[0][0]<=n.x+n.w+t-8)return r;if(r[0][0]===r[1][0]){if(r.length<3||r[1][1]!==r[2][1]||(r[0][0]+=t,r[1][0]+=t,Math.sign(r[2][0]-r[1][0])!==Math.sign(e.points[2][0]-e.points[1][0])||r[2][0]===r[1][0]))return null}else if(r[0][1]===r[1][1]){if(r[0][0]+=t,Math.sign(r[1][0]-r[0][0])!==Math.sign(e.points[1][0]-e.points[0][0])||r[1][0]===r[0][0])return null}else return null;return r},m=(e,t,n=null)=>{let r=p({points:[...e.points].reverse()},t,n);return r?r.reverse():null},h=(e,t)=>yr(e).every(e=>t.every(t=>!vr(e,t,4))),g=e=>e.points.length===2&&e.points[0][0]===e.points[1][0],_=e=>{let t=e.points;return g(e)||t.length===4&&t[0][0]===t[1][0]&&t[1][1]===t[2][1]&&t[2][0]===t[3][0]&&Math.abs(t[1][0]-t[2][0])<=8},v=(e,i,a,o)=>{let s=[e],c=[i],l=new Set,u=new Map;if(a){let e=m(a,i);if(!e)return null;u.set(a,e)}for(let e=0;e<s.length;e+=1){let i=s[e];for(let d of n){if(d===o||d===a)continue;let f=e=>r.has(e)?null:t.get(e);if(d.to===i&&!l.has(d)){let t=m(d,c[e],f(i));if(!t)return null;u.set(d,t)}else if(d.from===i){if(d.kind!==`back`&&_(d)&&n.filter(e=>e.to===d.to).length===1){if(l.add(d),s.includes(d.to))continue;s.push(d.to);let n=t.get(i),a=t.get(d.to);c.push(r.has(i)?n.x+n.w/2+c[e]-(a.x+a.w/2):c[e])}else{let t=p(d,c[e],f(i));if(!t)return null;u.set(d,t)}}}}return{dx:i,dxs:c,chain:s,rects:s.map(e=>t.get(e)),chainLinks:l,adapted:u}},y=(e,r,a)=>{let{chain:o,rects:l,chainLinks:u,adapted:d}=e,p=new Map;l.forEach((t,n)=>p.set(t,e.dxs[n]));for(let e of r)e.rects.forEach((t,n)=>p.set(t,e.dxs[n]));let m=e=>p.has(e)?{x:e.x+p.get(e),y:e.y,w:e.w,h:e.h}:e,g=c.map(e=>({orig:e,now:m(e)})),_=e=>e!==a&&!u.has(e)&&!d.has(e)&&!r.some(t=>t.chainLinks.has(e)||t.adapted.has(e));return l.every((e,t)=>{let r=m(e),a=s(o[t]);return a&&(r.x<a.x+28||r.x+r.w>a.x+a.w-28)||g.some(e=>!l.includes(e.orig)&&xr(r,e.now,14))||i.some(e=>xr(r,e,4))||n.some(e=>_(e)&&yr(e.points).some(e=>vr(e,r,8)))?!1:!n.some(e=>_(e)&&f(e)&&xr(r,f(e),4))})&&[...d.entries()].every(([e,r])=>h(r,g.filter(n=>n.orig!==t.get(e.from)&&n.orig!==t.get(e.to)).map(e=>e.now))&&gr(r,n.filter(e=>_(e)))<=gr(e.points,n.filter(e=>_(e))))},b=e=>{e.rects.forEach((t,n)=>{t.x+=e.dxs[n]});for(let n of e.chainLinks){let i=e.chain.indexOf(n.from);if(r.has(n.from)){let e=t.get(n.from),r=t.get(n.to);n.points=[[e.x+e.w/2,e.y+e.h],[e.x+e.w/2,r.y]]}else n.points=n.points.map(([t,n])=>[t+e.dxs[i],n]);n.labelAt&&={x:n.labelAt.x+e.dxs[i],y:n.labelAt.y}}for(let[t,n]of e.adapted)t.points=n},x=()=>n.every(e=>yr(e.points).every((n,r,i)=>c.every(a=>{let o=a===t.get(e.from)||a===t.get(e.to);return o&&(r===0||r===i.length-1)?!0:!vr(n,a,o?-.5:1)}))),S=(e,o,p,m,h)=>{let g=new Map([[e.to,h]]);for(let e=!0;e;){e=!1;for(let i of n){if(i.kind===`back`||!g.has(i.from)||g.has(i.to)||!_(i)||n.filter(e=>e.to===i.to&&e.kind!==`back`).length!==1)continue;let a=t.get(i.from),o=t.get(i.to);g.set(i.to,r.has(i.from)?a.x+a.w/2+g.get(i.from)-(o.x+o.w/2):g.get(i.from)),e=!0}}let v=new Map([...t].map(([e,t])=>[t,e])),y=e=>({...e,x:e.x+(g.get(v.get(e))??0)});for(let[e]of[...g]){let n=y(t.get(e));for(let t of c){let r=v.get(t);if(g.has(r)||!xr(n,y(t),14))continue;let i=g.get(e)<0?n.x-14-(t.x+t.w):n.x+n.w+14-t.x;g.set(r,i)}}for(let t of c){let n=v.get(t);if(n===e.from||n===e.to)continue;let r=y(t);if(!vr([[o,p],[o,m]],r,or))continue;let i=r.x+r.w/2>=o?o+or+1-r.x:o-or-1-(r.x+r.w);g.set(n,(g.get(n)??0)+i)}for(let[e]of g){let n=y(t.get(e)),r=s(e);if(r&&(n.x<r.x+28-6||n.x+n.w>r.x+r.w-28+6)||c.some(r=>r!==t.get(e)&&xr(n,y(r),(g.has(v.get(r)),14)))||i.some(e=>xr(n,e,4)))return!1}let b=n.filter(t=>t!==e&&(g.has(t.from)||g.has(t.to)));for(let[r]of g){let i=y(t.get(r));if(n.some(t=>t!==e&&!b.includes(t)&&yr(t.points).some(e=>vr(e,i,8))))return!1}let S=e=>{let r=n.filter(t=>t!==e);return d(e.points,e)+mr(e.points,t.get(e.from),t.get(e.to))+dr*gr(e.points,r)},C=[e,...b].reduce((e,t)=>e+S(t),0),ee={rects:[...g.keys()].map(e=>[t.get(e),t.get(e).x]),lines:n.map(e=>[e,e.points,e.labelAt])},w=()=>{for(let[e,t]of ee.rects)e.x=t;for(let[e,t,n]of ee.lines)e.points=t,e.labelAt=n;return!1};for(let[e,n]of g)t.get(e).x+=n;if(e.points=[[o,p],[o,m]],yr(e.points).some(n=>c.some(r=>r!==t.get(e.from)&&r!==t.get(e.to)&&vr(n,r,8))))return w();for(let e of[...b].sort((e,t)=>cr[t.kind]-cr[e.kind])){let t=l(e,n);if(!t)return w();e.points=t}if([e,...b].reduce((e,t)=>e+S(t),0)>=C||!x())return w();for(let t of[e,...b]){if(!t.labelSize)continue;let e=n.filter(e=>e!==t),r=e.map(f).filter(Boolean);t.labelAt=wr(ar(t.points,e.filter(e=>u(t,e)).map(e=>e.points)),t.labelSize,c,[...i,...r],e,a)}return!0},C=()=>{let e=!1;for(let i of n){let a=i.points.length===4&&i.points[0][0]===i.points[1][0]&&i.points[1][1]===i.points[2][1]&&i.points[2][0]===i.points[3][0]||i.points.length===3&&i.points[0][0]===i.points[1][0]&&i.points[1][1]===i.points[2][1];if(i.kind===`back`||!(g(i)||a))continue;let o=t.get(i.from),s=t.get(i.to);if(!o||!s||i.kind!==`main`&&n.filter(e=>e.to===i.to&&e.kind!==`back`).length!==1)continue;let l=r.has(i.from),u=n.filter(e=>e.from===i.from&&e.kind!==`back`).length===1,d=l||u?o.x+o.w/2:i.points[0][0],f=l?o.y+o.h:i.points[0][1],p=d-(s.x+s.w/2),m=!l||Math.abs(i.points[0][1]-f)<.5;if(Math.abs(p)<.5&&m)continue;let h=g(i)||i.points.length===4?i.points[i.points.length-1][1]:s.y;if(Math.abs(p)<.5){let t=i.points;i.points=[[d,f],[d,h]],!yr(i.points).some(e=>c.some(t=>t!==o&&t!==s&&vr(e,t,or)))&&x()?e=!0:(i.points=t,S(i,d,f,h,0)&&(e=!0));continue}let _=v(i.to,p,null,i);if(!_){S(i,d,f,h,p)&&(e=!0);continue}let C=[],ee={x:s.x+p,y:s.y,w:s.w,h:s.h},w=!1;for(let e of c){if(_.rects.includes(e)||!xr(ee,e,14))continue;let a=[...t.keys()].find(n=>t.get(n)===e),o=n.filter(e=>e.to===a);if(!a||o.length!==1||o[0].kind===`back`||r.has(a)){w=!0;break}let s=p<0?ee.x-14-(e.x+e.w):ee.x+ee.w+14-e.x,c=v(a,p<0?Math.min(0,s):Math.max(0,s),o[0],i);if(!c||!y(c,[_],i)){w=!0;break}C.push(c)}if(w||!y(_,C,i)){S(i,d,f,h,p)&&(e=!0);continue}let te=new Map;for(let e of[_,...C])e.rects.forEach((t,n)=>te.set(t,e.dxs[n]));let ne=e=>te.has(e)?{...e,x:e.x+te.get(e)}:e,re=(e,n,r)=>yr(e).some(e=>c.some(i=>i!==t.get(n)&&i!==t.get(r)&&vr(e,ne(i),or)));if(re([[d,f],[d,h]],i.from,i.to)){S(i,d,f,h,p)&&(e=!0);continue}if([_,...C].some(e=>[...e.chainLinks].some(t=>re(t.points.map(([n,r])=>[n+e.dxs[e.chain.indexOf(t.from)],r]),t.from,t.to))))continue;let ie={rects:c.map(e=>[e,e.x]),lines:n.map(e=>[e,e.points,e.labelAt])};b(_);for(let e of C)b(e);let ae=i.points;if(i.points=[[d,f],[d,h]],!x()){for(let[e,t]of ie.rects)e.x=t;for(let[e,t,n]of ie.lines)e.points=t,e.labelAt=n;i.points=ae,S(i,d,f,h,p)&&(e=!0)}else e=!0}return e};for(let e=0;e<3&&C();e+=1);for(let e of r){let r=t.get(e),o=e=>Math.abs(e[0]-(r.x+r.w/2))<1&&Math.abs(e[1]-r.y)<1,s=n.filter(t=>t.to===e&&t.kind!==`back`);if(s.some(e=>o(e.points[e.points.length-1])))for(let e of s){if(o(e.points[e.points.length-1]))continue;let t=n.filter(t=>t!==e),r=l(e,n,[],!0);if(r&&o(r[r.length-1])&&!(gr(r,t)>gr(e.points,t)||zn(r)>zn(e.points)+1)&&(e.points=r,e.labelSize)){let n=t.map(f).filter(Boolean);e.labelAt=wr(ar(r,t.filter(t=>u(e,t)).map(e=>e.points)),e.labelSize,c,[...i,...n],t,a)}}}for(let e of n){if(e.kind===`back`||!r.has(e.from)||e.points.length<2)continue;let o=t.get(e.from),[s,u]=e.points,d=o.y+o.h,p=o.x+o.w/2;if(s[0]!==u[0]||u[1]<=s[1]||s[1]>=d-1.5||s[1]<o.y+o.h/2||u[1]-d<24)continue;let m=Math.min(14,(u[1]-d)/2),h=Math.abs(s[0]-p)<4?[[p,d],...e.points.slice(1)]:[[p,d],[p,d+m],[s[0],d+m],...e.points.slice(1)],g=n.filter(t=>t!==e);if(yr(h).some((n,r,i)=>c.some(r=>r!==o&&r!==t.get(e.to)&&vr(n,r,2))&&r<i.length))continue;let _=e=>Math.abs(e[0]-p)<1&&Math.abs(e[1]-d)<1,v=g.filter(t=>t.from===e.from&&_(t.points[0])||yr(t.points).some(e=>yr(h).slice(0,3).some(t=>br(e,t))));if(!v.length){gr(h,g)<=gr(e.points,g)&&(e.points=h);continue}let[y]=v;if(e.kind!==`main`||v.length!==1||y.kind===`back`||y.from!==e.from||!_(y.points[0]))continue;let b=n.filter(t=>t!==e&&t!==y),x={...e,points:h},S=l(y,[...b,x],[[p,d]]);if(!(!S||zn(S)>zn(y.points)+1)&&!(gr(S,[...b,x])>gr(y.points,[...b,e]))&&!(gr(h,[...b,{points:S}])>gr(e.points,[...b,y]))&&(e.points=h,y.points=S,y.labelSize)){let e=n.filter(e=>e!==y).map(f).filter(Boolean);y.labelAt=wr(y.points,y.labelSize,c,[...i,...e],n.filter(e=>e!==y),a)}}for(let e=0;e<2&&C();e+=1);let ee=(e,n,i)=>{let a=t.get(n);return r.has(n)?Math.abs(e[i]-(i===0?a.x+a.w/2:a.y+a.h/2))<.5:i===0?e[0]>=a.x+8&&e[0]<=a.x+a.w-8:e[1]>=a.y+8&&e[1]<=a.y+a.h-8},w=e=>e.filter((t,n)=>n===0||n===e.length-1||(e[n-1][0]!==t[0]||t[0]!==e[n+1][0])&&(e[n-1][1]!==t[1]||t[1]!==e[n+1][1])).filter((e,t,n)=>t===0||e[0]!==n[t-1][0]||e[1]!==n[t-1][1]);for(let e=0;e<2;e+=1)for(let e of n){let r=n.filter(t=>t!==e);if(!r.some(t=>t.to===e.to&&yr(t.points).some(t=>yr(e.points).some(e=>br(e,t)))))for(let n=1;n<e.points.length-2;n+=1){let i=e.points,[a,o,s,l]=[i[n-1],i[n],i[n+1],i[n+2]],u=+(o[0]===s[0]),d=s[u]-o[u];if(Math.abs(d)<.5||Math.abs(d)>8||a[u]!==o[u]||s[u]!==l[u]||Math.sign(o[1-u]-a[1-u])!==Math.sign(l[1-u]-s[1-u]))continue;let f=(e,t,n,r)=>e.map((e,i)=>i>=t&&i<=n?u===0?[e[0]+r,e[1]]:[e[0],e[1]+r]:e),p=[f(i,0,n,d),f(i,n+1,i.length-1,-d)],m=(n,a)=>{let o=a===`start`?n[0]:n[n.length-1];return!ee(o,a===`start`?e.from:e.to,u)||yr(n).some((n,r,i)=>c.some(a=>(r!==0||a!==t.get(e.from))&&(r!==i.length-1||a!==t.get(e.to))&&vr(n,a,a===t.get(e.from)||a===t.get(e.to)?-.5:2)))||r.some(e=>yr(e.points).some(e=>yr(n).some(t=>br(t,e))))?!1:gr(n,r)<=gr(i,r)},h=[m(p[0],`start`)&&p[0],m(p[1],`end`)&&p[1]].find(Boolean);if(h){e.points=w(h);break}}}for(let e of n){if(!e.points.slice(1).some((t,n)=>Mn(e.points[n][0],e.points[n][1],t[0],t[1],a)))continue;let s=n.filter(t=>t!==e),l=s.map(f).filter(Boolean),u=Pn({from:t.get(e.from),to:t.get(e.to),fromDiamond:r.has(e.from),toDiamond:r.has(e.to),nodes:c,blocks:[...i,...l],routes:s.map(e=>({points:e.points})),borders:a,bounds:o(e)??sr});!u||gr(u,s)>gr(e.points,s)||(e.points=u,e.labelSize&&(e.labelAt=wr(u,e.labelSize,c,[...i,...l],s,a)))}let te=(e,n,r)=>d(n,e)+mr(n,t.get(e.from),t.get(e.to))+dr*gr(n,r),ne=(e,t)=>hr(e)+600*zn(e)+mte*gr(e,t)+1400,re=e=>{let t=n.filter(t=>t!==e),r=l(e,n,[],!1,ne(e.points,t));if(!(!r||te(e,r,t)>=te(e,e.points,t))&&(e.points=r,e.labelSize)){let n=t.map(f).filter(Boolean);e.labelAt=wr(ar(r,t.filter(t=>u(e,t)).map(e=>e.points)),e.labelSize,c,[...i,...n],t,a)}},ie=e=>{let t=new Set([e.from,e.to]),r=n.filter(r=>r!==e&&r.kind!==`back`&&(t.has(r.from)||t.has(r.to))&&n.some(e=>e!==r&&u(r,e))).slice(0,3);for(let t of r){let r=[t.points,t.labelAt,e.points,e.labelAt],o=()=>{let r=n.filter(n=>n!==t&&n!==e);return te(t,t.points,[...r,e])+te(e,e.points,[...r,t])},s=o(),d=l(t,n,[],!0);if(!d)continue;t.points=d;let p=l(e,n);if(p&&(e.points=p),p&&o()<s){for(let r of[t,e]){if(!r.labelSize)continue;let e=n.filter(e=>e!==r),t=e.map(f).filter(Boolean);r.labelAt=wr(ar(r.points,e.filter(e=>u(r,e)).map(e=>e.points)),r.labelSize,c,[...i,...t],e,a)}return}[t.points,t.labelAt,e.points,e.labelAt]=r}},ae=[...n].sort((e,t)=>cr[e.kind]-cr[t.kind]);for(let e of ae)gr(e.points,n.filter(t=>t!==e))>0&&re(e);for(let e of ae){if(e.kind===`back`)continue;let n=t.get(e.from),r=t.get(e.to),i=()=>fr(e.points,n,r)||mr(e.points,n,r)>pr||zn(e.points)>=3;i()&&(re(e),i()&&ie(e))}for(let e of n){let t=f(e);if(!t)continue;let r=n.filter(t=>t!==e);if(!r.some(e=>yr(e.points).some(e=>vr(e,t,2)))&&!c.some(e=>xr(t,e,2)))continue;let o=r.map(f).filter(Boolean);e.labelAt=wr(e.points,e.labelSize,c,[...i,...o],r,a)}}function wr(e,t,n,r,i,a=[],o={}){let{width:s,height:c}=t,l=t=>(t.x<16||t.y<16?100:0)+n.filter(e=>_r(t,e,3)).length*50+r.filter(e=>_r(t,e,3)).length*20+i.filter(e=>yr(e.points).some(e=>vr(e,t,3))).length*10+a.filter(e=>vr(e,t,3)).length*5+(yr(e).some(e=>vr(e,t,1))?30:0),u=null;for(let[t,n]of yr(e)){let e=Math.abs(t[1]-n[1])<.5,r=Math.abs(n[0]-t[0])+Math.abs(n[1]-t[1]),i=e?s:c;if(r<i+8)continue;let a=Math.sign(e?n[0]-t[0]:n[1]-t[1]),o=[(r-i)/2,6,r-i-6];for(let e=6;e<=r-i-6;e+=8)o.push(e);for(let n of[4,14])for(let i of o)for(let o of[1,-1]){let d=e?{x:a>0?t[0]+i:t[0]-i-s,y:o<0?t[1]-n-c:t[1]+n,w:s,h:c}:{x:o<0?t[0]-n-s:t[0]+n,y:a>0?t[1]+i:t[1]-i-c,w:s,h:c},f=l(d);if(f===0)return{x:d.x,y:d.y};(!u||f<u.bad||f===u.bad&&r>u.len)&&(u={bad:f,len:r,x:d.x,y:d.y})}}if(o.onLine)for(let[t,n]of yr(e)){let e=Math.abs(t[1]-n[1])<.5,r=Math.abs(n[0]-t[0])+Math.abs(n[1]-t[1]);if(r<(e?s:c)+8)continue;let i={x:(t[0]+n[0])/2-s/2,y:(t[1]+n[1])/2-c/2,w:s,h:c},a=l(i)-30+4;(!u||a<u.bad)&&(u={bad:a,len:r,x:i.x,y:i.y})}if(u)return{x:u.x,y:u.y};let[d,f]=yr(e).sort((e,t)=>Math.abs(t[1][0]-t[0][0])+Math.abs(t[1][1]-t[0][1])-(Math.abs(e[1][0]-e[0][0])+Math.abs(e[1][1]-e[0][1])))[0];return{x:Math.max(16,(d[0]+f[0])/2+4),y:Math.max(16,(d[1]+f[1])/2-c/2)}}var Tte=1.5,Ete=480,Tr=.7;function Er(e){let t=[...e.placed.entries()];if(t.length<4)return null;let n=[...new Set(t.map(([,e])=>e.y))].sort((e,t)=>e-t),r=null;for(let i=1;i<n.length;i+=1){let a=n[i],o=new Set(t.filter(([,e])=>e.y<a).map(([e])=>e)),s=new Set(t.filter(([,e])=>e.y>=a).map(([e])=>e));if(o.size<2||s.size<2)continue;let c=e.inner.filter(e=>o.has(e.from)!==o.has(e.to)),l=c.filter(e=>!e.isBack).length,u=c.length-l,d=Math.max(...t.filter(([e])=>o.has(e)).map(([,e])=>e.y+e.h)),f=Math.max(...t.map(([,e])=>e.y+e.h))-a,p=l*1e3+u*300+Math.abs(d-f);(!r||p<r.score)&&(r={score:p,top:o,bottom:s})}return r?[r.top,r.bottom]:null}function Dr(e){let t=e.width;for(let[n,r]of e.placed)e.placed.set(n,{...r,x:t-r.x-r.w});for(let n of e.connections)n.points=n.points.map(([e,n])=>[t-e,n]),n.labelAt&&={x:t-n.labelAt.x-n.labelSize.width,y:n.labelAt.y}}var Or={x:-1e6,y:-1e6,w:2e6,h:2e6},kr={"elk.layered.priority.straightness":`10`,"elk.layered.priority.direction":`10`},Ar=[{"elk.layered.nodePlacement.strategy":`BRANDES_KOEPF`,"elk.layered.nodePlacement.bk.fixedAlignment":`BALANCED`},{"elk.layered.nodePlacement.strategy":`NETWORK_SIMPLEX`},{"elk.layered.nodePlacement.strategy":`BRANDES_KOEPF`}],jr=(e,t,n)=>{let r=Math.min(e.w-56,Je(t)*13+4);return n?{x:e.x+28-2,y:e.y+7,w:r,h:18}:{x:e.x+7,y:e.y+28-2,w:18,h:r}};function Mr({nodes:e,groups:t,stages:n,ruleEnds:r,labelBox:i,vertical:a}){let o=new Map(e.map(e=>[e.id,e])),s=a?44:28,c=a?28:44,l=new Set(e.filter(e=>e.kind===`decision`).map(e=>e.id)),u=e=>{let{w:t,h:n}=rn(e);return a?{w:t,h:n}:{w:n,h:t}},d=e=>{let t=i(e);return a?t:{width:t.height,height:t.width}},f=(e,n)=>{let r=new Set(n.map(e=>e.id)),i=t.filter(e=>r.has(e.from)&&r.has(e.to)),a=t.filter(e=>r.has(e.from)&&!r.has(e.to)&&!e.isBack),o=t.filter(e=>!r.has(e.from)&&r.has(e.to)&&!e.isBack),s=null;for(let e of Ar){let t=y(n,i,e,a,o),r=t.connections.reduce((e,n)=>e+Vn(n,t.placed,l),0);(!s||r<s.cost)&&(s={...t,cost:r})}return{st:e,ids:r,inner:i,...s}},p=n.map(t=>f(t,e.filter(e=>e.stageId===t.id))),m=p.map(e=>e.height).sort((e,t)=>e-t),h=m[Math.floor((m.length-1)/2)],g=p.reduce((e,t)=>e+t.width+56+56,0),_=[];for(let t of p){let n=t.height>Ete&&t.height>h*Tte&&t.height>g*Tr?Er(t):null;if(n)for(let r of n)_.push(f(t.st,e.filter(e=>r.has(e.id))));else _.push(t)}let v=new Map;_.forEach((e,t)=>{for(let n of e.ids)v.set(n,t)}),_.forEach((e,n)=>{let r=r=>{let i=[...e.placed.entries()],a=(t,n)=>{let a=e.placed.get(t);return i.some(([e,i])=>{if(e===t||i.y>=a.y+a.h||i.y+i.h<=a.y)return!1;let o=i.x>=a.x+a.w,s=i.x+i.w<=a.x;return n===`right`?r?s:o:r?o:s})},o=0;for(let e of t){if(e.isBack)continue;let t=v.get(e.from),r=v.get(e.to);t===n&&r>n&&a(e.from,`right`)&&(o+=1),r===n&&t<n&&a(e.to,`left`)&&(o+=1)}return o};r(!0)<r(!1)&&Dr(e)});function y(e,t,n,i=[],a=[]){let o=`__exit__`,s=`__entry__`,c=[];i.length&&c.push({id:o,width:1,height:1,layoutOptions:{"elk.layered.layering.layerConstraint":`LAST_SEPARATE`}}),a.length&&c.push({id:s,width:1,height:1,layoutOptions:{"elk.layered.layering.layerConstraint":`FIRST_SEPARATE`}});let f=[...i.map((e,t)=>({id:`x${t}`,sources:[e.from],targets:[o],layoutOptions:e.isMain?kr:{}})),...a.map((e,t)=>({id:`y${t}`,sources:[s],targets:[e.to],layoutOptions:e.isMain?kr:{}}))],p={id:`root`,layoutOptions:{"elk.algorithm":`layered`,"elk.direction":`DOWN`,"elk.padding":`[top=0,left=0,bottom=0,right=0]`,"elk.edgeRouting":`ORTHOGONAL`,"elk.spacing.nodeNode":`44`,"elk.layered.spacing.nodeNodeBetweenLayers":`28`,"elk.spacing.edgeNode":`16`,"elk.spacing.edgeEdge":`10`,"elk.spacing.edgeLabel":`4`,"elk.layered.spacing.edgeNodeBetweenLayers":`16`,"elk.layered.crossingMinimization.strategy":`LAYER_SWEEP`,...n,"elk.layered.considerModelOrder.strategy":`NODES_AND_EDGES`,"elk.edgeLabels.inline":`false`,"elk.separateConnectedComponents":`false`},children:[...e.map(e=>{let{w:t,h:n}=u(e),i=r.has(e.id)?{"elk.layered.layering.layerConstraint":`LAST`}:{};return{id:e.id,width:t,height:n,layoutOptions:i}}),...c],edges:t.map((e,t)=>({id:`g${t}`,sources:[e.isBack?e.to:e.from],targets:[e.isBack?e.from:e.to],labels:e.label?[{id:`l${t}`,text:e.label,...d(e.label)}]:[],layoutOptions:e.isMain?kr:{}}))};p.edges.push(...f);let m=Sn(p),h=new Map(m.children.filter(e=>e.id!==o&&e.id!==s).map(e=>[e.id,{x:e.x,y:e.y,w:e.width,h:e.height}])),g=new Map((m.edges??[]).map(e=>[e.id,e])),_=Kn(t.map((e,t)=>{let n=g.get(`g${t}`),r=n?.sections?.[0],i=r?[r.startPoint,...r.bendPoints??[],r.endPoint].map(e=>[e.x,e.y]):[];e.isBack&&i.reverse(),i.length>=2&&(i[0]=Pr(i[0],h.get(e.from),l.has(e.from)),i[i.length-1]=Pr(i[i.length-1],h.get(e.to),l.has(e.to)));let a=n?.labels?.[0];return{id:`c:${e.from}->${e.to}`,from:e.from,to:e.to,kind:e.isBack?`back`:e.isMain?`main`:`branch`,merged:e.merged,points:i,label:e.label,labelAt:a?{x:a.x,y:a.y}:null,labelSize:a?{width:a.width,height:a.height}:null}}),h,[],!0,l);Cr({placed:h,connections:_,diamonds:l,within:()=>Or,boxOf:()=>null});let v=1/0,y=1/0,b=-1/0,x=-1/0,S=(e,t)=>{v=Math.min(v,e),y=Math.min(y,t),b=Math.max(b,e),x=Math.max(x,t)};for(let e of h.values())S(e.x,e.y),S(e.x+e.w,e.y+e.h);for(let e of _){for(let[t,n]of e.points)S(t,n);e.labelAt&&(S(e.labelAt.x,e.labelAt.y),S(e.labelAt.x+e.labelSize.width,e.labelAt.y+e.labelSize.height))}let C=([e,t])=>[e-v,t-y];for(let[e,t]of h)h.set(e,{...t,x:t.x-v,y:t.y-y});for(let e of _)e.points=e.points.map(C),e.labelAt&&={x:e.labelAt.x-v,y:e.labelAt.y-y};return{placed:h,connections:_,width:b-v,height:x-y}}let b=new Map,x=[],S=[],C=32;for(let e of n){let t=_.filter(t=>t.st===e),n=t.reduce((e,t)=>e+t.width,0)+56*(t.length-1),r=Je(e.label)*13+56,i=Math.max(n+c+28,a?r:0,a?180:0),o=Math.max(Math.max(...t.map(e=>e.height))+s+28,a?0:r);x.push({stageId:e.id,label:e.label,x:C,y:32,w:i,h:o});let l=C+c+(i-c-28-n)/2,u=32+s;for(let e of t){for(let[t,n]of e.placed)b.set(t,{...n,x:n.x+l,y:n.y+u});for(let t of e.connections)S.push({...t,points:t.points.map(([e,t])=>[e+l,t+u]),labelAt:t.labelAt?{x:t.labelAt.x+l,y:t.labelAt.y+u}:null});l+=e.width+56}C+=i+56}let ee=Math.max(...x.map(e=>e.h)),w=x.flatMap(Nn),te=new Map(x.map(e=>[e.stageId,e])),ne=e=>{let t=o.get(e.from).stageId;return t===o.get(e.to).stageId?te.get(t):null},re=x.map(e=>jr(e,e.label,a)),ie=[...b.values()],ae=e=>e.labelAt?{x:e.labelAt.x,y:e.labelAt.y,w:e.labelSize.width,h:e.labelSize.height}:null,oe={placed:b,connections:S,diamonds:l,titles:re,boxes:x,borders:w,within:ne,boxOf:e=>te.get(o.get(e)?.stageId)??null},{routeFor:se,joinable:ce}=Sr(oe),le=e=>e.isMain?0:e.isBack?2:1,ue=t.filter(e=>v.get(e.from)!==v.get(e.to)).sort((e,t)=>le(e)-le(t));for(let e of ue){let t=S.filter(t=>t.kind===`back`&&!e.isBack),n=se(e,S.filter(e=>!t.includes(e)),t.flatMap(e=>[e.points[0],e.points[e.points.length-1]]))??Fr(b.get(e.from),b.get(e.to)),r=S.map(ae).filter(Boolean),i=e.label?d(e.label):null,a=ar(n,S.filter(t=>ce(e,t)).map(e=>e.points)),o=i?wr(a,i,ie,[...re,...r],S,w):null;S.push({id:`c:${e.from}->${e.to}`,from:e.from,to:e.to,kind:e.isBack?`back`:e.isMain?`main`:`branch`,merged:e.merged,points:n,label:e.label,labelAt:o,labelSize:i})}let de=Kn(S,b,re,!0,l,{borders:w,within:ne});S.splice(0,S.length,...de),Cr(oe);let fe=C-56+32,pe=32+ee+32;for(let e of S){for(let[t,n]of e.points)fe=Math.max(fe,t+32),pe=Math.max(pe,n+32);e.labelAt&&(fe=Math.max(fe,e.labelAt.x+e.labelSize.width+32),pe=Math.max(pe,e.labelAt.y+e.labelSize.height+32))}let me={boxes:x,placed:b,connections:S,titles:re,borders:w,width:fe,height:pe,diamonds:l};return{frame:me,...Nr(me,a)}}function Nr(e,t){let n=t?e=>e:([e,t])=>[t,e],r=t?e=>e:e=>({...e,x:e.y,y:e.x,w:e.h,h:e.w});return{placed:new Map([...e.placed].map(([e,t])=>[e,r(t)])),stageBoxes:e.boxes.map(e=>r(e)),connections:e.connections.map(e=>({...e,points:e.points.map(n),labelAt:e.labelAt?t?e.labelAt:{x:e.labelAt.y,y:e.labelAt.x}:null,labelSize:e.labelSize?t?e.labelSize:{width:e.labelSize.height,height:e.labelSize.width}:null})),size:t?{width:e.width,height:e.height}:{width:e.height,height:e.width}}}function Pr(e,t,n){if(!n||!t)return e;let[r,i]=e,a=t.x+t.w/2,o=t.y+t.h/2;if(Math.abs(i-t.y)<.5||Math.abs(i-(t.y+t.h))<.5){let e=t.h/2*(1-Math.min(1,Math.abs(r-a)/(t.w/2)));return[r,i<o?o-e:o+e]}let s=t.w/2*(1-Math.min(1,Math.abs(i-o)/(t.h/2)));return[r<a?a-s:a+s,i]}function Fr(e,t){let n=e.y+e.h/2,r=t.y+t.h/2,i=e.x+e.w,a=t.x,o=(i+a)/2;return[[i,n],[o,n],[o,r],[a,r]]}var Ir=e=>Array.isArray(e.when)?e.when:[e.when];function Lr({rules:e,stages:t,byId:n,x:r,y:i,available:a}){let o=Math.round(Math.min(an,Math.max(640,a))),s=on.map(e=>Math.round(o*e)),c=new Map(t.map((e,t)=>[e.id,t])),l=(e,t,n=1)=>Math.max(1,Math.ceil(e*13*n*sn/(t-24))),u=e.map((e,n)=>{let r=(e.stageIds??[]).filter(e=>c.has(e)).map(e=>c.get(e)).sort((e,t)=>e-t),i=Ir(e),a=i.length>1?1+i.reduce((e,t)=>e+l(Je(t),s[0]-16),0):l(Je(i[0]),s[0]),o=l(Je(e.then),s[1],1.08),u=r.length?t[r[0]].label:``,d=r.length?t[r[r.length-1]].label:``,f=r.length>1?Je(u)+Je(d)+3:Je(u||`全程`),p=l(f,s[2]);return{rule:e,index:n,h:Math.max(a,o,p)*20+18+1,stageIds:r.map(e=>t[e].id),scope:r.length===0?{kind:`all`}:r.length===1?{kind:`one`,stage:u}:{kind:`range`,from:u,to:d,n:r.length},first:r.length?r[0]:-1}}),d=(e,t)=>e.first-t.first||e.index-t.index,f=[...new Set(e.map(e=>e.endId).filter(e=>e&&n.has(e)))],p=[...f.map(e=>({endId:e,endLabel:n.get(e).label,rows:u.filter(t=>t.rule.endId===e).sort(d)})),{endId:null,endLabel:null,rows:u.filter(e=>!e.rule.endId||!n.has(e.rule.endId)).sort(d)}].filter(e=>e.rows.length),m=f.length>0,h=84;for(let e of p){e.headed=m,e.y=h,m&&(h+=40);for(let t of e.rows)t.y=h,h+=t.h;e.h=h-e.y}return{x:r,y:i,w:o,h,cols:s,groups:p,count:e.length}}var Rr=e=>`${e.from}|${e.to}|${e.condition??``}`;function zr(e,t=8){if(!Array.isArray(e)||e.length<2)return``;if(e.length===2)return`M ${e[0][0]} ${e[0][1]} L ${e[1][0]} ${e[1][1]}`;let n=[`M ${e[0][0]} ${e[0][1]}`];for(let r=1;r<e.length-1;r+=1){let[i,a]=e[r-1],[o,s]=e[r],[c,l]=e[r+1],u=Math.hypot(o-i,s-a),d=Math.hypot(c-o,l-s),f=Math.max(0,Math.min(t,u/2,d/2));if(f===0){n.push(`L ${o} ${s}`);continue}let p=(o-i)/(u||1),m=(s-a)/(u||1),h=(c-o)/(d||1),g=(l-s)/(d||1);n.push(`L ${o-p*f} ${s-m*f}`),n.push(`Q ${o} ${s} ${o+h*f} ${s+g*f}`)}let r=e[e.length-1];return n.push(`L ${r[0]} ${r[1]}`),n.join(` `)}var Br=12;function Vr(e,t=40){if(!Array.isArray(e)||e.length<2)return``;if(e.length===2)return zr(e);let n=[`M ${e[0][0]} ${e[0][1]}`];for(let r=1;r<e.length-1;r+=1){let[i,a]=e[r-1],[o,s]=e[r],[c,l]=e[r+1],u=Math.hypot(o-i,s-a),d=Math.hypot(c-o,l-s),f=r===1?u:u/2,p=r===e.length-2?Math.max(0,d-Br):d/2,m=Math.max(0,Math.min(t,f,p));if(m===0){n.push(`L ${o} ${s}`);continue}let h=(o-i)/(u||1),g=(s-a)/(u||1),_=(c-o)/(d||1),v=(l-s)/(d||1),y=.55,b=o-h*m,x=s-g*m,S=o+_*m,C=s+v*m;n.push(`L ${b} ${x}`),n.push(`C ${b+h*m*y} ${x+g*m*y} ${S-_*m*y} ${C-v*m*y} ${S} ${C}`)}let r=e[e.length-1];return n.push(`L ${r[0]} ${r[1]}`),n.join(` `)}var Hr=()=>({nodes:0,edges:0,connections:0,layers:0,widest:0,backEdges:0,decisions:0,ends:0,groupedEdges:0});function Ur(e){let t=Je(e)*12;return{width:Math.min(150,Math.ceil(t+12)),height:Math.max(1,Math.ceil(t/138-1e-9))*16+2}}function Wr(e,t={},n,r=`vertical`){let i=mn(e),a=hn(e),o=r!==`horizontal`,s=o?`vertical`:`horizontal`;if(i.length)return{errors:i,hints:a,orientation:s,nodes:[],edges:[],connections:[],rows:[],spine:[],stageBoxes:[],ruleTable:null,size:{width:0,height:0},stats:Hr()};let c=e.nodes,l=new Map((e.stages??[]).map(e=>[e.id,e])),u=new Map(c.map(e=>[e.id,e])),d=c.map(e=>e.id),f=new Map(d.map(e=>[e,[]])),p=new Map(d.map(e=>[e,[]]));e.edges.forEach((e,t)=>{f.get(e.from).push({...e,index:t}),p.get(e.to).push({...e,index:t})});let m=new Set,h=new Map,g=e=>{h.set(e,1);for(let t of f.get(e)){let e=h.get(t.to)??0;e===1?m.add(Rr(t)):e===0&&g(t.to)}h.set(e,2)},_=[...d.filter(e=>p.get(e).length===0),...d];for(let e of _)(h.get(e)??0)===0&&g(e);let v=new Set([...pn(e)].filter(e=>u.has(e)&&p.get(e).length===0)),y=d.filter(e=>p.get(e).length===0&&!v.has(e)),b=[],x=new Set;{let e=y[0],t=new Set;for(;e!==void 0&&!t.has(e)&&(t.add(e),b.push(e),x.add(e),u.get(e).kind!==`end`);){let n=f.get(e);e=(n.find(e=>e.main===!0)??n.find(e=>!e.condition&&!t.has(e.to))??n.find(e=>!t.has(e.to)))?.to}}let S=new Map(b.slice(0,-1).map((e,t)=>[e,b[t+1]])),C=new Map;for(let t of e.edges){let e=`${t.from}|${t.to}`;C.has(e)||C.set(e,[]),C.get(e).push(t)}let ee=[...C.values()].map(e=>{let{from:t,to:n}=e[0],r=m.has(Rr(e[0])),i=e.map(e=>e.condition).filter(Boolean);return{from:t,to:n,isBack:r,isMain:!r&&S.get(t)===n,merged:e.length,label:i.length?i.join(` / `):``}}),w=t?.stages!==!1&&l.size>0,te=(e.stages??[]).filter(e=>c.some(t=>t.stageId===e.id)),ne=e=>{let{w:t,h:n}=rn(e),r=v.has(e.id)?{"elk.layered.layering.layerConstraint":`LAST`}:{};return{id:e.id,width:t,height:n,layoutOptions:r}},re={"elk.spacing.nodeNode":`44`,"elk.layered.spacing.nodeNodeBetweenLayers":`28`,"elk.spacing.edgeNode":`16`,"elk.spacing.edgeEdge":`10`,"elk.spacing.edgeLabel":`4`,"elk.layered.spacing.edgeNodeBetweenLayers":`16`},ie={...re,"elk.padding":`[top=44,left=28,bottom=28,right=28]`},ae=(e,t)=>({id:`root`,layoutOptions:{"elk.algorithm":`layered`,"elk.direction":o?`DOWN`:`RIGHT`,"elk.padding":`[top=0,left=0,bottom=0,right=0]`,"elk.edgeRouting":`ORTHOGONAL`,...re,"elk.layered.crossingMinimization.strategy":`LAYER_SWEEP`,...t,"elk.layered.considerModelOrder.strategy":`NODES_AND_EDGES`,"elk.edgeLabels.inline":`false`,"elk.separateConnectedComponents":`false`,"elk.hierarchyHandling":`INCLUDE_CHILDREN`,"elk.json.shapeCoords":`ROOT`,"elk.json.edgeCoords":`ROOT`},children:e?[...te.map(e=>({id:`stage:${e.id}`,layoutOptions:ie,children:c.filter(t=>t.stageId===e.id).map(ne)})),...c.filter(e=>!te.some(t=>t.id===e.stageId)).map(ne)]:c.map(ne),edges:ee.map((e,t)=>({id:`g${t}`,sources:[e.isBack?e.to:e.from],targets:[e.isBack?e.from:e.to],labels:e.label?[{id:`l${t}`,text:e.label,...Ur(e.label)}]:[],layoutOptions:e.isMain?{"elk.layered.priority.straightness":`10`,"elk.layered.priority.direction":`10`}:{}}))}),oe=new Set(c.filter(e=>e.kind===`decision`).map(e=>e.id)),se=e=>{let t,n=w&&te.length>0;try{t=Sn(ae(n,e))}catch(r){if(!n)throw r;t=Sn(ae(!1,e))}let r=new Map,i=[],a=e=>{for(let t of e??[])if(t.id.startsWith(`stage:`)){let e=l.get(t.id.slice(6));i.push({stageId:e.id,label:e.label,x:t.x+32,y:t.y+32,w:t.width,h:t.height}),a(t.children)}else r.set(t.id,{x:t.x+32,y:t.y+32,w:t.width,h:t.height})};a(t.children);let s={width:t.width+32+32,height:t.height+32+32},c=(e,t)=>{if(u.get(t)?.kind!==`decision`)return e;let n=r.get(t),[i,a]=e,o=n.x+n.w/2,s=n.y+n.h/2;if(Math.abs(a-n.y)<.5||Math.abs(a-(n.y+n.h))<.5){let e=n.h/2*(1-Math.min(1,Math.abs(i-o)/(n.w/2)));return[i,a<s?s-e:s+e]}let c=n.w/2*(1-Math.min(1,Math.abs(a-s)/(n.h/2)));return[i<o?o-c:o+c,a]},d=new Map(t.edges.map(e=>[e.id,e])),f=ee.map((e,t)=>{let n=d.get(`g${t}`),r=n?.sections?.[0],i=r?[r.startPoint,...r.bendPoints??[],r.endPoint].map(e=>[e.x+32,e.y+32]):[];e.isBack&&i.reverse(),i.length>=2&&(i[0]=c(i[0],e.from),i[i.length-1]=c(i[i.length-1],e.to));let a=n?.labels?.[0];return{id:`c:${e.from}->${e.to}`,from:e.from,to:e.to,kind:e.isBack?`back`:e.isMain?`main`:`branch`,merged:e.merged,points:i,d:zr(i),label:e.label,labelAt:a?{x:a.x+32,y:a.y+32}:null,labelSize:a?{width:a.width,height:a.height}:null}}),p=i.map(e=>({x:e.x+28-2,y:e.y+7,w:Math.min(e.w-56,Je(e.label)*13+4),h:18}));Kn(f,r,p,o,oe).forEach((e,t)=>{f[t]={...e,d:zr(e.points),dCurve:Vr(e.points)}});for(let e of f){for(let[t,n]of e.points)s.width=Math.max(s.width,t+32),s.height=Math.max(s.height,n+32);e.labelAt&&(s.width=Math.max(s.width,e.labelAt.x+e.labelSize.width+32),s.height=Math.max(s.height,e.labelAt.y+e.labelSize.height+32))}return{placed:r,stageBoxes:i,stageTitles:p,connections:f,size:s}},ce=[{"elk.layered.nodePlacement.strategy":`BRANDES_KOEPF`,"elk.layered.nodePlacement.bk.fixedAlignment":`BALANCED`},{"elk.layered.nodePlacement.strategy":`NETWORK_SIMPLEX`},{"elk.layered.nodePlacement.strategy":`BRANDES_KOEPF`}],le=w&&te.length>1&&c.every(e=>l.has(e.stageId)),ue=null;if(le)ue=Mr({nodes:c,groups:ee,stages:te,ruleEnds:v,labelBox:Ur,vertical:o});else for(let e of ce){let t=se(e),n=t.connections.reduce((e,n)=>e+Vn(n,t.placed,oe),0);(!ue||n<ue.cost)&&(ue={...t,cost:n})}le||Gr(ue,oe,o,u);let{placed:de,stageBoxes:fe,size:pe}=ue,me=ue.connections.map(e=>({...e,d:zr(e.points),dCurve:Vr(e.points)})),he=new Map([...de.entries()].map(([e,t])=>{let n=o?t.y:t.x,r=o?t.x:t.y,i=o?t.h:t.w,a=o?t.w:t.h;return[e,{a0:n,a1:n+i,c0:r,c1:r+a,am:n+i/2,cm:r+a/2}]})),ge=e.edges.filter(e=>m.has(Rr(e))),_e=[...new Set(d.map(e=>Math.round(he.get(e).a0)))].sort((e,t)=>e-t),ve=e=>_e.indexOf(Math.round(he.get(e).a0)),ye=_e.map((e,t)=>{let n=d.filter(e=>ve(e)===t);return{layer:t,along:e,extent:Math.max(...n.map(t=>he.get(t).a1-e)),count:n.length}}),be=t?.rules!==!1&&Array.isArray(e.rules)&&e.rules.length>0,xe=null;be&&(xe=Lr({rules:e.rules,stages:e.stages??[],byId:u,x:32,y:pe.height-32+40,available:pe.width-64}),pe.width=Math.max(pe.width,xe.x+xe.w+32),pe.height=xe.y+xe.h+32);let Se=new Map;for(let t of e.rules??[])t.endId&&Se.set(t.endId,(Se.get(t.endId)??0)+1);let Ce=new Map((e.actors??[]).map(e=>[e.id,e])),we=new Map((e.sources??[]).map(e=>[e.id,e])),Te=c.map(e=>{let n=de.get(e.id);return{id:e.id,type:`pnode`,position:{x:n.x,y:n.y},data:{node:e,w:n.w,h:n.h,textW:rn(e).textW,cut:rn(e).cut,isSpine:x.has(e.id),stageLabel:l.get(e.stageId)?.label??``,actorNames:(e.actorIds??[]).map(e=>Ce.get(e)?.name??e),sources:(e.sourceIds??[]).map(e=>we.get(e)).filter(Boolean),sourceCount:(e.sourceIds??[]).filter(e=>we.has(e)).length,layer:ve(e.id),ruleCount:be?Se.get(e.id)??0:0,showDetail:t?.detail!==!1,vertical:o}}}),Ee={nodes:c.length,edges:e.edges.length,connections:me.length,layers:ye.length,widest:Math.max(...ye.map(e=>e.count)),backEdges:ge.length,decisions:c.filter(e=>e.kind===`decision`).length,ends:c.filter(e=>e.kind===`end`).length,groupedEdges:e.edges.length-me.length};return{errors:i,hints:a,orientation:s,nodes:Te,edges:[],connections:me,rows:ye,spine:b,stageBoxes:fe,ruleTable:xe,size:{width:Math.ceil(pe.width),height:Math.ceil(pe.height)},stats:Ee}}function Gr(e,t,n,r){let i=n?e=>({...e}):e=>({...e,x:e.y,y:e.x,w:e.h,h:e.w}),a=n?e=>[...e]:([e,t])=>[t,e],o=e=>({...e,points:e.points.map(a),labelAt:e.labelAt?n?{...e.labelAt}:{x:e.labelAt.y,y:e.labelAt.x}:null,labelSize:e.labelSize?n?{...e.labelSize}:{width:e.labelSize.height,height:e.labelSize.width}:null}),s=new Map([...e.placed].map(([e,t])=>[e,i(t)])),c=e.stageBoxes.map(i),l=e.connections.map(o),u={x:-6,y:-1e6,w:1e7,h:2e7},d=e=>c.find(t=>t.stageId===r.get(e)?.stageId)??u;Cr({placed:s,connections:l,diamonds:t,titles:(e.stageTitles??[]).map(i),boxes:c,borders:c.flatMap(Nn),within:e=>{let t=d(e.from);return t!==u&&t===d(e.to)?t:null},boxOf:d}),e.placed=new Map([...s].map(([e,t])=>[e,i(t)])),e.connections=l.map(o);for(let t of e.placed.values())e.size.width=Math.max(e.size.width,t.x+t.w+32),e.size.height=Math.max(e.size.height,t.y+t.h+32);for(let t of e.connections)for(let[n,r]of t.points)e.size.width=Math.max(e.size.width,n+32),e.size.height=Math.max(e.size.height,r+32)}var Kr={envelope:[{name:`type`,req:`yes`,ty:`string`,note:`always "procedure"`},Oe(1),{name:`title`,req:`yes`,ty:`string`,note:`diagram title, shown at the top left`}],domain:[{name:`domain`,req:`no`,ty:`string`,note:`which class of flow this is: ${un.join(` / `)}`}],actors:[{name:`id`,req:`yes`,ty:`string`,note:`unique within the diagram; nodes reference it via actorIds`},{name:`name`,req:`yes`,ty:`string`,note:`display name, e.g. "Party A"`},{name:`role`,req:`no`,ty:`string`,note:`role, e.g. "owner"`},{name:``,req:``,ty:``,note:`actorIds on a node is display-only (it marks who acted); it never affects placement`}],stages:[{name:`id`,req:`yes`,ty:`string`,note:`nodes reference it via stageId`},{name:`label`,req:`yes`,ty:`string`,note:`stage name, e.g. "requirements sign-off"`},{name:``,req:``,ty:``,note:`array order is the order in the flow; omit stages and no stage bands are drawn`}],sources:[{name:`id`,req:`yes`,ty:`string`,note:`nodes reference it via sourceIds`},{name:`type`,req:`yes`,ty:`string`,note:`contract / evidence / judgment and four more, the same seven as fact`},{name:`name`,req:`yes`,ty:`string`,note:`material name, e.g. "software development services contract"`},{name:`loc`,req:`no`,ty:`object`,note:`location, e.g. { file, clause, page }`}],nodes:[{name:`id`,req:`yes`,ty:`string`,note:`unique within the diagram; edges reference it via from/to`},{name:`kind`,req:`yes`,ty:`string`,note:`shape: ${cn.join(` / `)} (decision = a diamond decision point; it needs at least 2 outgoing edges, each with a condition)`},{name:`label`,req:`yes`,ty:`string`,note:`the text shown on the node: two lines, about 20 Chinese characters; a longer label is cut on the node and hinted by validate. Keep it a short phrase and put the rest in detail`},{name:`detail`,req:`no`,ty:`string`,note:`amounts, deadlines and the like; the first line, about 16 Chinese characters, shows under the label (a ⋯ mark says more is left), the full text is in the popover`},{name:`actorIds`,req:`no`,ty:`string[]`,note:`references actors; display-only`},{name:`stageId`,req:`no`,ty:`string`,note:`references stages; decides which stage band it falls in`},{name:`outcome`,req:`no`,ty:`string`,note:`outcome (drives colour, not shape): ${ln.join(` / `)}, default neutral`},{name:`sourceIds`,req:`no`,ty:`string[]`,note:`which materials it rests on`}],rules:[{name:``,req:``,ty:``,note:`Optional (v1.1). Contingent clauses: breach, delay liability, rights to terminate`},{name:``,req:``,ty:``,note:`a rule is NOT a step: write it here, not as a node with edges out of some step`},{name:`id`,req:`yes`,ty:`string`,note:`unique among rules and nodes`},{name:`when`,req:`yes`,ty:`string|str[]`,note:`the trigger; an array means "any one of these"`},{name:`then`,req:`yes`,ty:`string`,note:`the consequence, with amounts, e.g. "penalty 0.1% per day, capped at 5%"`},{name:`stageIds`,req:`no`,ty:`string[]`,note:`the stages it applies in; omit = throughout. One rule for all its stages, never one copy per stage`},{name:`outcome`,req:`no`,ty:`string`,note:`colour: ${ln.join(` / `)}`},{name:`endId`,req:`no`,ty:`string`,note:`only if it ends the contract: the id of the end node it leads to`},{name:`sourceIds`,req:`no`,ty:`string[]`,note:`which clause it rests on`}],edges:[{name:`from`,req:`yes`,ty:`string`,note:`id of the source node`},{name:`to`,req:`yes`,ty:`string`,note:`id of the target node`},{name:`condition`,req:`no`,ty:`string`,note:`the condition for taking this edge (a human-readable phrase such as "pass" or "Party B's fault"). Required on every outgoing edge of a decision`},{name:`main`,req:`no`,ty:`boolean`,note:`whether this edge is on the main line. If marked, it must connect through to an end; if unmarked the engine infers it`},{name:``,req:``,ty:``,note:`several edges may run between the same pair of nodes (different conditions); they are merged into one link with the conditions shown side by side`}]};function qr(){let e=[`Fields of a procedure spec. "yes" means required.`,``];for(let[t,n]of Object.entries(Kr)){e.push(`[${t}]`);for(let t of n)t.name?e.push(` ${t.name.padEnd(10)} ${t.req.padEnd(2)} ${t.ty.padEnd(10)} ${t.note}`):e.push(` · ${t.note}`);e.push(``)}return e.push(`Cross-field rules (dangling references, whether a decision has enough`),e.push(`outgoing edges, isolated nodes, whether the main line connects through) are`),e.push(`not listed above: call antu_validate after writing. It reports each problem.`),e.join(`
1455
1455
  `)}function Jr(e,t,{canvas:n}){let r=t(e,{}),i=Math.max(Number(Yt(r.size,n).toFixed(3)),.7);return{text:{font:14,canvas:n,open:{name:`route`,fit:Math.min(i,1)},other:{name:`route`,fit:Math.min(i,1)}},counts:{nodes:r.stats.nodes,edges:r.edgeCount,rules:r.rules,stages:Array.isArray(e.stages)?e.stages.length:0,actors:e.actors?.length??0,sources:e.sources?.length??0},size:r.size,stations:r.stations,hangs:r.hangs,loops:r.loops,jumps:r.jumps,cut:r.cut,off:r.off,notFollowed:r.notFollowed,edgesDrawn:r.edgesDrawn,hints:r.hints}}function Yr(e){let t=e.counts,n=[`Kind: route (the main line as one line, left to right; orientation does not apply)`,`Data: ${t.nodes} nodes / ${t.edges} edges / ${t.rules} rules / ${t.stages} stages / ${t.actors} parties / ${t.sources} sources`,`Content ${e.size.width}×${e.size.height}; it opens at a readable zoom from the left, a long route scrolls sideways`,`${e.stations} stations on the main line, ${e.hangs} branch(es) hanging below it, ${e.loops} loop(s) back and ${e.jumps} jump(s) ahead drawn as arcs; ${e.edgesDrawn} of ${t.edges} edges are on the picture`];return e.cut&&n.push(`${e.cut} hanging branch(es) cut off after 4 boxes ("... and N more")`),e.notFollowed&&n.push(`${e.notFollowed} way(s) out of a hanging branch not followed (the flowchart shows them)`),e.off&&n.push(`${e.off} node(s) not on the picture (listed under it)`),t.rules&&n.push(`${t.rules} rule(s) not drawn here; the flowchart lists them`),n.push(...Qt(e.text,`splitting the flow by stage`)),e.hints.length&&n.push(``,`${e.hints.length} hint(s):`,...e.hints.map(e=>` - ${e}`)),n.join(`
1456
- `)}var Xr={specVersion:1,label:`graphType.procedure`,fields:Kr,describe:qr,info:(e,t,n)=>{let r=Array.isArray(e.nodes)?e.nodes.length:0,i=Array.isArray(e.stages)?e.stages.length:0,a=t(`info.nodes`,{n:n(r)});return i>0&&(a+=` · ${t(`info.stages`,{n:n(i)})}`),[a,t(`info.actors`,{n:n(e.actors?.length||0)}),t(`info.sources`,{n:n(e.sources?.length||0)})]},report:(e,t,{canvas:n,kind:r})=>{if(r===`route`)return Jr(e,t,{canvas:n});let i={},a;for(let r of[`vertical`,`horizontal`])a=t(e,{},void 0,r),i[r]={size:a.size,fit:Number(Yt(a.size,n).toFixed(3))};let o=i.vertical,s=i.horizontal;return{text:{font:14,canvas:n,open:{name:`vertical`,fit:o.fit},other:{name:`horizontal`,fit:s.fit}},counts:{nodes:a.stats.nodes,edges:a.stats.edges,links:a.stats.connections,layers:a.stats.layers,widest:a.stats.widest,backEdges:a.stats.backEdges,rules:Array.isArray(e.rules)?e.rules.length:0,stages:Array.isArray(e.stages)?e.stages.length:0,actors:e.actors?.length??0,sources:e.sources?.length??0},byOrientation:i,suggestedOrientation:`vertical`,betterFit:s.fit>o.fit?`horizontal`:`vertical`,hints:a.hints}},formatReport:e=>{if(e.kind===`route`)return Yr(e);let t=e.counts,n=e.byOrientation.vertical,r=e.byOrientation.horizontal,i=[`Data: ${t.nodes} nodes / ${t.edges} edges (${t.links} links after merging) / ${t.rules} rules / ${t.stages} stages / ${t.actors} parties / ${t.sources} sources`,`Shape: ${t.layers} layers, widest layer ${t.widest} nodes, ${t.backEdges} loop(s) back`,`Vertical: content ${n.size.width}×${n.size.height}, fit zoom ${n.fit}`,`Horizontal: content ${r.size.width}×${r.size.height}, fit zoom ${r.fit}`,`Suggested orientation: ${e.suggestedOrientation} (what the diagram opens with; a flowchart reads top to bottom)`];return e.betterFit!==e.suggestedOrientation&&i.push(`Horizontal fits a screen better (${r.fit} vs ${n.fit}); the reader can switch to it.`),i.push(...Qt(e.text,`splitting the flow by stage`)),e.hints.length&&i.push(``,`${e.hints.length} hint(s):`,...e.hints.map(e=>` - ${e}`)),i.join(`
1456
+ `)}var Xr={specVersion:1,label:`graphType.procedure`,fields:Kr,describe:qr,info:(e,t,n)=>{let r=Array.isArray(e.nodes)?e.nodes.length:0,i=Array.isArray(e.stages)?e.stages.length:0,a=t(`info.nodes`,{n:n(r)});return i>0&&(a+=` · ${t(`info.stages`,{n:n(i)})}`),[a,t(`info.actors`,{n:n(e.actors?.length||0)}),t(`info.sources`,{n:n(e.sources?.length||0)})]},report:(e,t,{canvas:n,kind:r})=>{if(r===`route`)return Jr(e,t,{canvas:n});let i={},a;for(let r of[`vertical`,`horizontal`])a=t(e,{rules:!1},void 0,r),i[r]={size:a.size,fit:Number(Yt(a.size,n).toFixed(3))};let o=i.vertical,s=i.horizontal;return{text:{font:14,canvas:n,open:{name:`vertical`,fit:o.fit},other:{name:`horizontal`,fit:s.fit}},counts:{nodes:a.stats.nodes,edges:a.stats.edges,links:a.stats.connections,layers:a.stats.layers,widest:a.stats.widest,backEdges:a.stats.backEdges,rules:Array.isArray(e.rules)?e.rules.length:0,stages:Array.isArray(e.stages)?e.stages.length:0,actors:e.actors?.length??0,sources:e.sources?.length??0},byOrientation:i,suggestedOrientation:`vertical`,betterFit:s.fit>o.fit?`horizontal`:`vertical`,hints:a.hints}},formatReport:e=>{if(e.kind===`route`)return Yr(e);let t=e.counts,n=e.byOrientation.vertical,r=e.byOrientation.horizontal,i=[`Data: ${t.nodes} nodes / ${t.edges} edges (${t.links} links after merging) / ${t.rules} rules / ${t.stages} stages / ${t.actors} parties / ${t.sources} sources`,`Shape: ${t.layers} layers, widest layer ${t.widest} nodes, ${t.backEdges} loop(s) back`,`Vertical: content ${n.size.width}×${n.size.height}, fit zoom ${n.fit}`,`Horizontal: content ${r.size.width}×${r.size.height}, fit zoom ${r.fit}`,`Suggested orientation: ${e.suggestedOrientation} (what the diagram opens with; a flowchart reads top to bottom)`];return e.betterFit!==e.suggestedOrientation&&i.push(`Horizontal fits a screen better (${r.fit} vs ${n.fit}); the reader can switch to it.`),i.push(...Qt(e.text,`splitting the flow by stage`)),e.hints.length&&i.push(``,`${e.hints.length} hint(s):`,...e.hints.map(e=>` - ${e}`)),i.join(`
1457
1457
  `)},summarize:e=>{let t=Array.isArray(e.nodes)?e.nodes.length:0,n=Array.isArray(e.edges)?e.edges.length:0,r=Array.isArray(e.rules)?e.rules.length:0,i=Array.isArray(e.stages)?e.stages.length:0;return{nodes:t,edges:n,rules:r,stages:i,line:`${t} nodes / ${n} edges / ${r} rules / ${i} stages`}},validate:e=>mn(e),normalize:e=>Wee(e),diagrams:{flow:{version:1,status:`experimental`,since:`0.2.0`},route:{version:1,status:`experimental`,since:`0.7.0`}},layouts:{flow:Wr,route:dte}},Zr={statute:`sourceType.statute`,case:`sourceType.case`,contract:`sourceType.contract`,evidence:`sourceType.evidence`,document:`sourceType.document`,web:`sourceType.web`,other:`sourceType.other`},Qr=[`person`,`company`,`organization`,`government`,`other`],$r=[`equity`,`control`,`contract`,`debt`,`guarantee`,`kinship`,`employment`,`agency`,`other`],ei=new Set([`contract`,`kinship`]),ti=[`equity`],ni=[`debt`,`contract`],ri=[`guarantee`],ii=[`debt`,`contract`],Dte=/^\d{4}(-\d{2}(-\d{2})?)?$/,ai=e=>typeof e==`object`&&!!e&&!Array.isArray(e),oi=e=>Array.isArray(e)?e:[],si=e=>typeof e?.directed==`boolean`?e.directed:!ei.has(e?.kind);function ci(e){let t=[];if(!ai(e))return[Pe(`err.specNotObject`)];if(e.asOf!==void 0&&(typeof e.asOf!=`string`||!Dte.test(e.asOf))&&t.push(Pe(`rerr.badAsOf`,{value:String(e.asOf)})),(typeof e.title!=`string`||!e.title.trim())&&t.push(Pe(`rerr.required`,{at:`the diagram`,field:`title`})),(!Array.isArray(e.entities)||e.entities.length===0)&&t.push(Pe(`rerr.entitiesEmpty`)),(!Array.isArray(e.relations)||e.relations.length===0)&&t.push(Pe(`rerr.relationsEmpty`)),t.length)return t;let n=new Set;e.groups!==void 0&&(Array.isArray(e.groups)?e.groups.forEach((e,r)=>{let i=`groups[${r}]`+(ai(e)&&e.id?` (${e.id})`:``);if(!ai(e))return void t.push(Pe(`rerr.notObject`,{at:`groups[${r}]`}));!e.id||typeof e.id!=`string`?t.push(Pe(`rerr.required`,{at:i,field:`id`})):n.has(e.id)?t.push(Pe(`rerr.duplicateId`,{at:i,id:e.id,what:`group`})):n.add(e.id),(!e.label||typeof e.label!=`string`)&&t.push(Pe(`rerr.required`,{at:i,field:`label`}))}):t.push(Pe(`rerr.notArray`,{field:`groups`})));let r=new Set;e.sources!==void 0&&(Array.isArray(e.sources)?e.sources.forEach((e,n)=>{let i=`sources[${n}]`+(ai(e)&&e.id?` (${e.id})`:``);if(!ai(e))return void t.push(Pe(`rerr.notObject`,{at:`sources[${n}]`}));!e.id||typeof e.id!=`string`?t.push(Pe(`rerr.required`,{at:i,field:`id`})):r.has(e.id)?t.push(Pe(`rerr.duplicateId`,{at:i,id:e.id,what:`source`})):r.add(e.id),(!e.name||typeof e.name!=`string`)&&t.push(Pe(`rerr.required`,{at:i,field:`name`})),Object.keys(Zr).includes(e.type)||t.push(Pe(`rerr.badSourceType`,{at:i,value:String(e.type),allowed:Object.keys(Zr).join(` / `)}))}):t.push(Pe(`rerr.notArray`,{field:`sources`})));let i=new Map;e.entities.forEach((e,a)=>{if(!ai(e))return void t.push(Pe(`rerr.notObject`,{at:`entities[${a}]`}));let o=`entities[${a}]`+(e.id?` (${e.id})`:``);if(!e.id||typeof e.id!=`string`)t.push(Pe(`rerr.required`,{at:o,field:`id`}));else{i.has(e.id)?t.push(Pe(`rerr.duplicateId`,{at:o,id:e.id,what:`entity`})):i.set(e.id,e),Qr.includes(e.kind)||t.push(Pe(`rerr.badEntityKind`,{at:o,value:String(e.kind),allowed:Qr.join(` / `)})),(!e.label||typeof e.label!=`string`)&&t.push(Pe(`rerr.required`,{at:o,field:`label`}));for(let n of[`role`,`detail`])e[n]!==void 0&&typeof e[n]!=`string`&&t.push(Pe(`rerr.mustBeString`,{at:o,field:n}));e.groupId!==void 0&&!n.has(e.groupId)&&t.push(Pe(`rerr.badRef`,{at:o,field:`groupId`,kind:`group`,id:String(e.groupId)}));for(let n of oi(e.sourceIds))r.has(n)||t.push(Pe(`rerr.badRef`,{at:o,field:`sourceIds`,kind:`source`,id:String(n)}))}});let a=new Map,o=new Set;return e.relations.forEach((e,n)=>{if(!ai(e))return void t.push(Pe(`rerr.notObject`,{at:`relations[${n}]`}));let s=`relations[${n}]`+(e.id?` (${e.id})`:``);!e.id||typeof e.id!=`string`?t.push(Pe(`rerr.required`,{at:s,field:`id`})):a.has(e.id)?t.push(Pe(`rerr.duplicateId`,{at:s,id:e.id,what:`relation`})):a.set(e.id,e),$r.includes(e.kind)||t.push(Pe(`rerr.badRelationKind`,{at:s,value:String(e.kind),allowed:$r.join(` / `)}));for(let n of[`from`,`to`])(typeof e[n]!=`string`||!i.has(e[n]))&&t.push(Pe(`rerr.badEnd`,{at:s,end:n,id:String(e[n])}));if(typeof e.from==`string`&&e.from===e.to&&t.push(Pe(`rerr.selfRelation`,{at:s,id:e.from})),typeof e.from==`string`&&typeof e.to==`string`){let n=[e.from,e.to,e.kind,e.label??``].join(`\0`);o.has(n)&&t.push(Pe(`rerr.duplicateRelation`,{at:s,from:e.from,to:e.to,kind:String(e.kind)})),o.add(n)}for(let n of[`label`,`detail`])e[n]!==void 0&&typeof e[n]!=`string`&&t.push(Pe(`rerr.mustBeString`,{at:s,field:n}));e.directed!==void 0&&typeof e.directed!=`boolean`&&t.push(Pe(`rerr.mustBeBoolean`,{at:s,field:`directed`}));for(let n of oi(e.sourceIds))r.has(n)||t.push(Pe(`rerr.badRef`,{at:s,field:`sourceIds`,kind:`source`,id:String(n)}));e.share!==void 0&&(ti.includes(e.kind)?(typeof e.share!=`number`||!(e.share>=0&&e.share<=100))&&t.push(Pe(`rerr.badShare`,{at:s,value:String(e.share)})):t.push(Pe(`rerr.fieldNotHere`,{at:s,field:`share`,kinds:ti.join(` / `)}))),e.amount!==void 0&&(ni.includes(e.kind)?(typeof e.amount!=`string`||!e.amount.trim())&&t.push(Pe(`rerr.mustBeString`,{at:s,field:`amount`})):t.push(Pe(`rerr.fieldNotHere`,{at:s,field:`amount`,kinds:ni.join(` / `)}))),e.secures!==void 0&&!ri.includes(e.kind)&&t.push(Pe(`rerr.fieldNotHere`,{at:s,field:`secures`,kinds:ri.join(` / `)}))}),e.relations.forEach((e,n)=>{if(!ai(e)||e.secures===void 0||!ri.includes(e.kind))return;let r=`relations[${n}]`+(e.id?` (${e.id})`:``),i=a.get(e.secures);i?ii.includes(i.kind)||t.push(Pe(`rerr.securesNotClaim`,{at:r,id:e.secures,kind:String(i.kind),claims:ii.join(` / `)})):t.push(Pe(`rerr.badSecures`,{at:r,id:String(e.secures)}))}),t}function li(e){let t=[];if(!ai(e)||!Array.isArray(e.entities)||!Array.isArray(e.relations))return t;let n=oi(e.entities).filter(e=>ai(e)&&typeof e.id==`string`),r=new Set(n.map(e=>e.id)),i=oi(e.relations).filter(e=>ai(e)&&r.has(e.from)&&r.has(e.to)),a=e=>n.find(t=>t.id===e)?.label??e,o=new Map;for(let e of i)e.kind===`equity`&&typeof e.share==`number`&&o.set(e.to,(o.get(e.to)??0)+e.share);for(let[e,n]of o)n>100+1e-9&&t.push(Pe(`rhint.shareOver100`,{id:e,label:a(e),total:Number(n.toFixed(4))}));let s=new Set(i.flatMap(e=>[e.from,e.to]));for(let e of n)s.has(e.id)||t.push(Pe(`rhint.isolated`,{id:e.id,label:e.label??e.id}));for(let e of i)e.kind===`guarantee`&&e.secures===void 0&&t.push(Pe(`rhint.noSecures`,{id:e.id??`${e.from}->${e.to}`}));let c=new Map;for(let e of i)e.kind===`equity`&&c.set(e.from,[...c.get(e.from)??[],e.to]);let l=new Map,u=[];for(let e of c.keys()){if(l.has(e))continue;let t=[e],n=[0];for(l.set(e,1);t.length;){let e=t.at(-1),r=c.get(e)??[],i=n.at(-1);if(i<r.length){n[n.length-1]+=1;let e=r[i];l.get(e)===1?u.push([...t.slice(t.indexOf(e)),e]):l.has(e)||(l.set(e,1),t.push(e),n.push(0))}else l.set(e,2),t.pop(),n.pop()}}for(let e of u)t.push(Pe(`rhint.equityCycle`,{path:e.map(a).join(` → `)}));return t}var ui=8;function di(e,t,n,r=12){if(!Array.isArray(e)||e.length!==4||!t||!n)return e;let[i,a,o,s]=e,c=(e,t,n)=>e>=t+ui&&e<=t+n-ui;if(i[0]===a[0]&&a[1]===o[1]&&o[0]===s[0]){let l=Math.abs(o[0]-a[0]);if(l===0||l>=r)return e;let u=(i[0]+s[0])/2;return c(u,t.x,t.w)&&c(u,n.x,n.w)?[[u,i[1]],[u,s[1]]]:e}if(i[1]===a[1]&&a[0]===o[0]&&o[1]===s[1]){let l=Math.abs(o[1]-a[1]);if(l===0||l>=r)return e;let u=(i[1]+s[1])/2;return c(u,t.y,t.h)&&c(u,n.y,n.h)?[[i[0],u],[s[0],u]]:e}return e}function fi(e,t=Pe){return typeof e.label==`string`&&e.label.trim()?e.label:t(`rel.auto.${e.kind}`,{share:e.share,amount:e.amount})}var Ote=1.3,pi=1.2,mi=(e,t)=>{let n=String(e??``),r=[...n].filter(e=>e.codePointAt(0)<11904).join(``);return Je(n)+Je(r)*(t-1)},kte=1300;function hi(e,t){if(t>1)return Ate(e,t);let n=mi(e,pi)*12;return{width:Math.min(150,Math.ceil(n+12)),height:Math.max(1,Math.ceil(n/138-1e-9))*16+2}}function gi(e){let t=String(e?.label??``),n=e?.role?String(e.role):``,r=mi(t,Ote)*14,i=n?Je(n)*12:0,a=ae(Math.min(168,Math.max(r,i))+32),o=a-32;return{w:a,h:oe(Math.min(2,Math.max(1,Math.ceil(r/o-1e-9)))*20+(n?18:0)+10),textW:o}}function Ate(e,t){let n=mi(e,pi)*12,r=Math.min(138,n/t+12),i=Math.max(1,Math.ceil(n/r-1e-9));return{width:Math.ceil(r+12),height:i*16+2}}function _i(e,t=Pe){let n=e.entities,r=e.relations,i=new Map((e.sources??[]).map(e=>[e.id,e])),a=new Map((e.groups??[]).map(e=>[e.id,e])),o=new Map(n.map(e=>[e.id,e.label])),s=r.map(e=>fi(e,t)),c=new Map(n.map(e=>[e.id,gi(e)])),l=new Map(n.map(e=>[e.id,0]));for(let e of r)l.set(e.from,l.get(e.from)+1),l.set(e.to,l.get(e.to)+1);let u=e=>r.map((e,t)=>({r:e,i:t})).filter(({r:t})=>t.from===e||t.to===e).map(({r:t,i:n})=>({id:t.id,kind:t.kind,directed:si(t),out:t.from===e,other:o.get(t.from===e?t.to:t.from),text:s[n]}));return{labelTexts:s,sizes:c,dataOf:(e,t={})=>({entity:e,w:c.get(e.id).w,h:c.get(e.id).h,textW:c.get(e.id).textW,groupLabel:a.get(e.groupId)?.label??``,sources:(e.sourceIds??[]).map(e=>i.get(e)).filter(Boolean),sourceCount:(e.sourceIds??[]).filter(e=>i.has(e)).length,relationCount:l.get(e.id),relations:u(e.id),vertical:!0,...t})}}var jte=15,Mte=16;function vi(e){return e.length<=1?[e]:e.flatMap((t,n)=>vi([...e.slice(0,n),...e.slice(n+1)]).map(e=>[t,...e]))}function Nte(e){return()=>{e|=0,e=e+1831565813|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296}}function Pte(e,t){let n=[...e];for(let e=n.length-1;e>0;--e){let r=Math.floor(t()*(e+1));[n[e],n[r]]=[n[r],n[e]]}return n}var Fte=()=>({entities:0,relations:0,groups:0,layers:0,widest:0,kinds:{}}),yi=(e,t,n)=>{let r=Math.min((n?e.w:e.h)-36,Je(t)*13+4);return n?{x:e.x+18-2,y:e.y+7,w:r,h:18}:{x:e.x+7,y:e.y+18-2,w:18,h:r}},bi=e=>[[[e.x,e.y],[e.x+e.w,e.y]],[[e.x,e.y+e.h],[e.x+e.w,e.y+e.h]],[[e.x,e.y],[e.x,e.y+e.h]],[[e.x+e.w,e.y],[e.x+e.w,e.y+e.h]]];function xi(e,t){let n=t.y+t.h<e.y;if(!(t.y>e.y+e.h))return n?{out:{bottom:700,top:0},in:{top:700,bottom:0}}:{out:{bottom:200,top:200,left:0,right:0},in:{top:200,bottom:200,left:0,right:0}}}var Ite=60,Si=e=>e.slice(1).map((t,n)=>[e[n],t]),Ci=(e,t,n)=>e.x<t.x+t.w+n&&t.x<e.x+e.w+n&&e.y<t.y+t.h+n&&t.y<e.y+e.h+n,wi=([e,t],n,r)=>Math.max(e[0],t[0])>n.x-r&&Math.min(e[0],t[0])<n.x+n.w+r&&Math.max(e[1],t[1])>n.y-r&&Math.min(e[1],t[1])<n.y+n.h+r,Lte=[.5,.42,.58,.34,.66,.26,.74,.18,.82,.1,.9,.02,.98];function Ti(e,t,n,r,i,a){let o=Ei(e,t,n,r,i,a);if(o.length){let e=o[0];for(let t of o)(t.bad<e.bad-1e-9||Math.abs(t.bad-e.bad)<1e-9&&t.len>e.len)&&(e=t);return{x:e.x,y:e.y,bad:e.bad}}let{width:s,height:c}=t,[l,u]=Si(e).sort((e,t)=>Math.abs(t[1][0]-t[0][0])+Math.abs(t[1][1]-t[0][1])-(Math.abs(e[1][0]-e[0][0])+Math.abs(e[1][1]-e[0][1])))[0];return{x:Math.max(16,(l[0]+u[0])/2-s/2),y:Math.max(16,(l[1]+u[1])/2-c/2),bad:1/0}}function Ei(e,t,n,r,i,a){let{width:o,height:s}=t,c=e=>(e.x<0||e.y<0?100:0)+n.filter(t=>Ci(e,t,2)).length*50+r.filter(t=>Ci(e,t,2)).length*20+i.filter(t=>Si(t.points).some(t=>wi(t,e,2))).length*10+a.filter(t=>wi(t,e,2)).length*3,l=[];for(let[t,n]of Si(e)){let e=Math.abs(t[1]-n[1])<.5,r=Math.abs(n[0]-t[0])+Math.abs(n[1]-t[1]),i=e?o:s;if(r<i+8)continue;let a=Math.min(22,(r-i)/2),u=r-i-a*2;for(let d of Lte){let f=a+i/2+u*d,p=Math.sign(e?n[0]-t[0]:n[1]-t[1]),m=e?t[0]+p*f:t[0],h=e?t[1]:t[1]+p*f,g={x:m-o/2,y:h-s/2,w:o,h:s};l.push({bad:c(g)+Math.abs(d-.5)*2,len:r,x:g.x,y:g.y});for(let t of[1,-1]){let n=e?{x:g.x,y:g.y+t*(s/2+2),w:o,h:s}:{x:g.x+t*(o/2+2),y:g.y,w:o,h:s};l.push({bad:c(n)+Math.abs(d-.5)*2+4,len:r,x:n.x,y:n.y})}}}return l}function Di(e,t){let n=e.y+e.h/2,r=t.y+t.h/2,i=t.x>=e.x,a=i?e.x+e.w:e.x,o=i?t.x:t.x+t.w,s=(a+o)/2;return[[a,n],[s,n],[s,r],[o,r]]}function Rte(e,t={},n,r=`vertical`){let i=ci(e),a=li(e),o=r!==`horizontal`,s=o?`vertical`:`horizontal`;if(i.length)return{errors:i,hints:a,orientation:s,nodes:[],edges:[],connections:[],groupBoxes:[],size:{width:0,height:0},stats:Fte()};let c=typeof t?.t==`function`?t.t:Pe,l=e.entities,u=e.relations,d=(e.groups??[]).filter(e=>l.some(t=>t.groupId===e.id)),f=t?.groups!==!1&&d.length>0;l.length>25&&a.push(Pe(`rhint.tooLarge`,{n:l.length,limit:25})),u.length>40&&a.push(Pe(`rhint.tooManyRelations`,{n:u.length,limit:40}));let p=f?d.map(e=>({group:e,members:l.filter(t=>t.groupId===e.id)})):[],m=f?l.filter(e=>!d.some(t=>t.id===e.groupId)):l,h=[...p];m.length&&h.splice(h.length===2?1:h.length,0,{group:null,members:m});let g=e=>{let{w:t,h:n}=gi(e);return o?{w:t,h:n}:{w:n,h:t}},_=u.map(e=>{let t=fi(e,c),n=hi(t);return{text:t,frame:o?n:{width:n.height,height:n.width}}}),v={"elk.algorithm":`layered`,"elk.direction":`DOWN`,"elk.padding":`[top=0,left=0,bottom=0,right=0]`,"elk.edgeRouting":`ORTHOGONAL`,"elk.spacing.nodeNode":`32`,"elk.layered.spacing.nodeNodeBetweenLayers":`48`,"elk.spacing.edgeNode":`16`,"elk.spacing.edgeEdge":`12`,"elk.spacing.edgeLabel":`4`,"elk.layered.spacing.edgeNodeBetweenLayers":`16`,"elk.layered.crossingMinimization.strategy":`LAYER_SWEEP`,"elk.layered.nodePlacement.strategy":`BRANDES_KOEPF`,"elk.layered.considerModelOrder.strategy":`NODES_AND_EDGES`,"elk.edgeLabels.inline":`false`,"elk.separateConnectedComponents":`false`},y=new Map;h.forEach((e,t)=>e.members.forEach(e=>y.set(e.id,t)));let b=(e,t)=>{let n=u.filter(t=>t.from===e.id||t.to===e.id).map(n=>Math.sign(y.get(n.from===e.id?n.to:n.from)-t));return n.length?n.reduce((e,t)=>e+t,0)/n.length:0},x=(e,t)=>{let n=new Set(e.map(e=>e.id)),r=e.map((e,n)=>({e,i:n,pull:b(e,t)})).sort((e,t)=>e.pull-t.pull||e.i-t.i).map(e=>e.e);if(e.length>1&&!u.some(e=>n.has(e.from)&&n.has(e.to))&&r.every(e=>b(e,t)!==0)){let e=r.map(g),t=Math.max(...e.map(e=>e.w)),n=0;return{at:new Map(r.map((r,i)=>{let a={x:(t-e[i].w)/2,y:n,w:e[i].w,h:e[i].h};return n+=e[i].h+32,[r.id,a]})),width:t,height:n-32,level:new Map(r.map(e=>[e.id,0])),levels:1}}let i=u.map((e,t)=>({r:e,i:t})).filter(({r:e})=>n.has(e.from)&&n.has(e.to)),a=e=>Sn({id:`camp${t}`,layoutOptions:v,children:e.map(e=>({id:e.id,width:g(e).w,height:g(e).h})),edges:i.filter(({r:e})=>si(e)).map(({r:e,i:t})=>({id:`r${t}`,sources:[e.from],targets:[e.to],labels:[{id:`l${t}`,text:_[t].text,width:_[t].frame.width,height:_[t].frame.height}]}))}),s=n=>{let r=new Map(n.children.map(e=>[e.id,[e.x+e.width/2,e.y+e.height/2]])),a=i.map(({r:e})=>({ends:[e.from,e.to],p:r.get(e.from),q:r.get(e.to)})),s=n.width+1e4;for(let n of e){let e=b(n,t);if(e===0)continue;let[i,o]=r.get(n.id);a.push({ends:[n.id],p:[i,o],q:[e>0?i+s:i-s,o]})}let c=(e,t,n)=>Math.sign((t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])),l=0,d=new Map(n.children.map(e=>[e.id,e]));for(let n of o?e:[]){let i=b(n,t);if(i===0)continue;let a=u.filter(e=>(e.from===n.id||e.to===n.id)&&y.get(e.from===n.id?e.to:e.from)!==t).length,[o,s]=r.get(n.id);e.some(e=>{if(e.id===n.id)return!1;let t=d.get(e.id);return s>t.y&&s<t.y+t.height&&(i>0?t.x>o:t.x+t.width<o)})&&(l+=a)}return a.forEach((e,t)=>a.slice(t+1).forEach(t=>{e.ends.some(e=>t.ends.includes(e))||c(e.p,e.q,t.p)*c(e.p,e.q,t.q)<0&&c(t.p,t.q,e.p)*c(t.p,t.q,e.q)<0&&(l+=1)})),l},c=[r];if(e.length>2&&i.length&&e.some(e=>b(e,t)!==0)){let n=Nte(t+e.length*7919),i=e.length<=5?vi(r):Array.from({length:40},()=>Pte(r,n));c.push(...i)}let l=null,d=1/0;for(let e of c){let t=a(e),n=s(t);if(n<d&&(l=t,d=n),d===0)break}let f=new Map(l.children.map(e=>[e.id,{x:e.x,y:e.y,w:e.width,h:e.height}])),p=l.width;u.map((e,t)=>({r:e,i:t})).filter(({r:e})=>n.has(e.from)&&n.has(e.to)&&!si(e)).map(({r:e,i:t})=>({i:t,pair:[f.get(e.from),f.get(e.to)].sort((e,t)=>e.x-t.x)})).filter(({pair:[e,t]})=>e.y<t.y+t.h&&t.y<e.y+e.h).sort((e,t)=>e.pair[1].x-t.pair[1].x).forEach(({i:e,pair:[t,n]})=>{let r=_[e].frame.width+40-(n.x-t.x-t.w);if(r<=0)return;let i=n.x;for(let e of f.values())e.x>=i&&(e.x+=r);p+=r});let m=[...new Set([...f.values()].map(e=>Math.round(e.y)))].sort((e,t)=>e-t),h=new Map([...f].map(([e,t])=>[e,m.indexOf(Math.round(t.y))]));return{at:f,width:p,height:l.height,level:h,levels:m.length}},S=o?32:18,C=o?18:32,ee=e=>{let t=[...e].sort((e,t)=>e-t);return t.length?t.length%2?t[(t.length-1)/2]:(t[t.length/2-1]+t[t.length/2])/2:0},w=h.findIndex(e=>!e.group&&h.some(e=>e.group)),te=h.map((e,t)=>t===w?null:x(e.members,t)),ne=new Map,re=[];h.forEach((e,t)=>{if(t===w)return;let n=te[t],r=e.group?S:0,i=[];for(let e of u)for(let[t,a]of[[e.from,e.to],[e.to,e.from]]){if(!n.at.has(t)||!ne.has(a))continue;let e=n.at.get(t);i.push(ne.get(a)-(r+e.y+e.h/2))}re[t]=i.length?ee(i):0;for(let[e,i]of n.at)ne.set(e,re[t]+r+i.y+i.h/2)});let ie=null;if(w>=0){let e=h[w].members.map(e=>{let t=u.filter(t=>t.from===e.id||t.to===e.id).map(t=>ne.get(t.from===e.id?t.to:t.from)).filter(e=>e!==void 0);return{e,want:t.length?ee(t):null,size:g(e)}}),t=e=>{let t=l.find(t=>t.id===e),n=g(t).h;return[ne.get(e)-n/2,ne.get(e)+n/2]},n=[];for(let e of u){if(!ne.has(e.from)||!ne.has(e.to)||y.get(e.from)===y.get(e.to))continue;let[r,i]=t(e.from),[a,o]=t(e.to);Math.min(i,o)>Math.max(r,a)&&n.push([Math.max(r,a),Math.min(i,o)])}for(let t of e){if(t.want===null)continue;let e=t.size.h/2,r=t=>n.some(([n,r])=>t+e+14>n&&t-e-14<r);if(!r(t.want))continue;let i=n.flatMap(([t,n])=>[t-14-e,n+14+e]).filter(e=>!r(e));i.length&&(t.want=i.sort((e,n)=>Math.abs(e-t.want)-Math.abs(n-t.want))[0])}let r=Math.max(0,...ne.values());e.forEach((e,t)=>{e.want===null&&(e.want=r+(t+1)*(e.size.h+32))}),e.sort((e,t)=>e.want-t.want);let i=new Map,a=-1/0,o=Math.max(...e.map(e=>e.size.w));for(let t of e){let e=Math.max(t.want-t.size.h/2,a);i.set(t.e.id,{x:(o-t.size.w)/2,y:e,w:t.size.w,h:t.size.h}),a=e+t.size.h+48}ie={at:i,width:o};for(let[e,t]of i)ne.set(e,t.y+t.h/2)}let ae=h.map((e,t)=>{let n=new Map;return u.forEach((e,r)=>{let[i,a]=[y.get(e.from),y.get(e.to)].sort((e,t)=>e-t);if(!(i<=t&&a>t))return;let o=[e.from,e.to].sort().join(`\0`),s=n.get(o)??{w:0,k:0};n.set(o,{w:s.w+_[r].frame.width+20,k:s.k+1})}),Math.max(110,...[...n.values()].map(({w:e,k:t})=>e+20*(t>1?3:1)))}),oe=[];h.forEach((e,t)=>{t===w?oe.push(Math.min(...[...ie.at.values()].map(e=>e.y))):oe.push(re[t])});let se=32-Math.min(...oe),ce=new Map,le=[],ue=new Map,de=1,fe=32,pe=32;h.forEach((e,t)=>{if(t===w){for(let[e,t]of ie.at)ce.set(e,{x:fe+t.x,y:se+t.y,w:t.w,h:t.h}),pe=Math.max(pe,se+t.y+t.h),ue.set(e,0);fe+=ie.width+ae[t];return}let n=te[t],r=e.group?C:0,i=e.group?S:0,a=se+re[t];for(let[e,t]of n.at)ce.set(e,{x:fe+r+t.x,y:a+i+t.y,w:t.w,h:t.h}),ue.set(e,n.level.get(e));de=Math.max(de,n.levels);let o=n.width+r+(e.group?18:0),s=i+n.height+(e.group?18:0);e.group&&le.push({groupId:e.group.id,label:e.group.label,x:fe,y:a,w:o,h:s}),pe=Math.max(pe,a+s),fe+=o+ae[t]});let me=fe-ae[h.length-1]+32,he=pe+32,ge=[...ce.values()],_e=le.map(e=>yi(e,e.label,o)),ve=le.flatMap(bi),ye=e=>({x:e.labelAt.x,y:e.labelAt.y,w:e.labelSize.width,h:e.labelSize.height}),be=e=>{let t=ce.get(e.from),n=ce.get(e.to);return Math.abs(t.x-n.x)+Math.abs(t.y-n.y)},xe=e=>[e.kind,e.from,e.to].join(`\0`),Se=new Map;for(let e of u)Se.set(xe(e),(Se.get(xe(e))??0)+1);let Ce=e=>{let t=ce.get(e.from),n=ce.get(e.to),r=(e,t,n,r)=>Math.min(e+t,n+r)-Math.max(e,n)>0;return r(t.y,t.h,n.y,n.h)||r(t.x,t.w,n.x,n.w)},we=e=>Se.get(xe(e))>1?0:Ce(e)?1:2,Te=u.map((e,t)=>t).sort((e,t)=>we(u[e])-we(u[t])||be(u[e])-be(u[t])||e-t),Ee=Array(u.length),De=[];for(let e of Te){let t=ce.get(u[e].from),n=ce.get(u[e].to),r=y.get(u[e].from)===y.get(u[e].to)&&h[y.get(u[e].from)].group&&(t.y+t.h<=n.y||n.y+n.h<=t.y),i=e=>Pn({from:t,to:n,nodes:ge,blocks:_e,outSides:e,inSides:e,routes:De.map(e=>({points:e.points,share:!1})),borders:ve,portCost:xi(t,n),crossCost:kte,sidePorts:!0,sideSpread:Mte,parallelGap:jte}),a={index:e,points:(r?i([`top`,`bottom`]):null)??i(void 0)??Di(t,n),labelAt:null,labelSize:{width:_[e].frame.width,height:_[e].frame.height}};Ee[e]=a,De.push(a)}Ee.forEach(e=>{e.points=di(e.points,ce.get(u[e.index].from),ce.get(u[e.index].to),Ite)});let Oe=(e,t)=>{let n=hi(_[e.index].text,t);return o?n:{width:n.height,height:n.width}},ke=(e,t,n)=>{let r=Oe(e,t),i=Ti(e.points,r,ge,n,Ee.filter(t=>t!==e),ve);return{at:{x:i.x,y:i.y},size:r,bad:i.bad+(t-1)}},Ae=[];for(let e of Te){let t=Ee[e],n=ke(t,1,[..._e,...Ae.map(ye)]);t.labelAt=n.at,t.labelBad=n.bad,Ae.push(t)}for(let e of Ae){if(e.labelBad<10)continue;let t=[..._e,...Ae.filter(t=>t!==e).map(ye)],n=null;for(let r of[2,3]){let i=ke(e,r,t);(!n||i.bad<n.bad)&&(n=i)}n&&n.bad<e.labelBad-3&&(e.labelAt=n.at,e.labelSize=n.size,e.labelBad=n.bad)}let je=(e,t)=>Ci(ye(e),ye(t),0);for(let e of Ae)for(let t of Ae){if(e===t||!je(e,t))continue;let n=[..._e,...Ae.filter(n=>n!==e&&n!==t).map(ye)],r=null;for(let i of[1,2,3]){let a=Oe(e,i);for(let o of Ei(e.points,a,ge,n,Ee.filter(t=>t!==e),ve)){let e={at:{x:o.x,y:o.y},size:a,bad:o.bad+(i-1)},s={x:o.x,y:o.y,w:a.width,h:a.height};for(let i of[1,2,3]){let a=ke(t,i,[...n,s]);(!r||e.bad+a.bad<r.bad-1e-9)&&(r={bad:e.bad+a.bad,pa:e,pb:a})}}}r&&(e.labelAt=r.pa.at,e.labelSize=r.pa.size,t.labelAt=r.pb.at,t.labelSize=r.pb.size)}let Me=Nr({placed:ce,boxes:le,connections:Ee,width:me,height:he},o),Ne={...Me.size},Fe=Me.connections.map(e=>{let t=u[e.index];return{id:`r:${t.id}`,relationId:t.id,from:t.from,to:t.to,kind:t.kind,directed:si(t),secures:t.secures??null,label:_[e.index].text,points:e.points,d:zr(e.points),dCurve:Vr(e.points),labelAt:e.labelAt,labelSize:e.labelSize}});for(let e of Fe){for(let[t,n]of e.points)Ne.width=Math.max(Ne.width,t+32),Ne.height=Math.max(Ne.height,n+32);Ne.width=Math.max(Ne.width,e.labelAt.x+e.labelSize.width+32),Ne.height=Math.max(Ne.height,e.labelAt.y+e.labelSize.height+32)}let Ie=Array.from({length:de},(e,t)=>l.filter(e=>ue.get(e.id)===t).length),Le=_i(e,c),Re=l.map(e=>{let t=Me.placed.get(e.id);return{id:e.id,type:`rnode`,position:{x:t.x,y:t.y},data:Le.dataOf(e,{w:t.w,h:t.h,layer:ue.get(e.id),vertical:o})}}),ze={};for(let e of u)ze[e.kind]=(ze[e.kind]??0)+1;return{errors:i,hints:a,orientation:s,nodes:Re,edges:[],connections:Fe,groupBoxes:Me.stageBoxes.map((e,t)=>({groupId:le[t].groupId,label:le[t].label,x:e.x,y:e.y,w:e.w,h:e.h})),size:{width:Math.ceil(Ne.width),height:Math.ceil(Ne.height)},stats:{entities:l.length,relations:u.length,groups:d.length,layers:de,widest:Math.max(...Ie),kinds:ze}}}var zte=1.7,Oi=14,ki=4,Bte=70,Vte=.4,Hte=60,Ute=56,Ai=64,ji=24,Wte=36,Gte=20,Mi=e=>({x:e.x,y:e.y,w:e.w,h:e.h}),Ni=e=>[e.x+e.w/2,e.y+e.h/2],Pi=(e,t,n)=>e.x<t.x+t.w+n&&t.x<e.x+e.w+n&&e.y<t.y+t.h+n&&t.y<e.y+e.h+n;function Kte(e,t,n,r=0){let i=0,a=1,o=[t[0]-e[0],t[1]-e[1]],s=[n.x-r,n.y-r],c=[n.x+n.w+r,n.y+n.h+r];for(let t=0;t<2;t+=1)if(Math.abs(o[t])<1e-9){if(e[t]<s[t]||e[t]>c[t])return!1}else{let n=(s[t]-e[t])/o[t],r=(c[t]-e[t])/o[t];if(n>r&&([n,r]=[r,n]),i=Math.max(i,n),a=Math.min(a,r),i>a)return!1}return!0}function Fi(e,t,n=2){let[r,i]=Ni(e),a=t[0]-r,o=t[1]-i;if(Math.abs(a)<1e-9&&Math.abs(o)<1e-9)return[r,i-e.h/2-n];let s=Math.min((e.w/2+n)/(Math.abs(a)||1e-9),(e.h/2+n)/(Math.abs(o)||1e-9));return[r+a*s,i+o*s]}function Ii(e,t,n,r=2){let[i,a]=Ni(e),o=n[0]-t[0],s=n[1]-t[1],c=(e,t,n,i)=>Math.abs(e)<1e-9?1/0:(Math.sign(e)*(i+r)-(t-n))/e,l=Math.min(c(o,t[0],i,e.w/2),c(s,t[1],a,e.h/2));return Number.isFinite(l)?[t[0]+o*l,t[1]+s*l]:Fi(e,n,r)}function Li(e){let t=new Map((e?.entities??[]).map(e=>[e.id,0]));for(let n of e?.relations??[])t.has(n.from)&&t.set(n.from,t.get(n.from)+1),t.has(n.to)&&t.set(n.to,t.get(n.to)+1);let n=null;for(let r of e?.entities??[])(n===null||t.get(r.id)>t.get(n))&&(n=r.id);return n}function qte(e){let t=(e?.entities??[]).map(e=>e.id),n=new Map(t.map(e=>[e,[]]));for(let t of e?.relations??[])n.has(t.from)&&n.has(t.to)&&(n.get(t.from).push(t.to),n.get(t.to).push(t.from));let r=new Set,i=[];for(let e of t){if(r.has(e))continue;let a=[],o=[e];for(r.add(e);o.length;){let e=o.shift();a.push(e);for(let t of n.get(e))r.has(t)||(r.add(t),o.push(t))}i.push(t.filter(e=>a.includes(e)))}return i}function Jte(e,t,n,r=Oi){let i=e.length;if(i<=1)return[...e];let a=Math.PI*2,o=e=>(e%a+a)%a,s=e.map((e,t)=>t).sort((t,n)=>o(e[t])-o(e[n])),c=s.map(t=>o(e[t])),l=s.map((e,a)=>2*Math.asin(Math.min(1,(t[e]+t[s[(a+1)%i]]+r)/(2*n))));if(l.reduce((e,t)=>e+t,0)>a)return null;let u=!1;for(let e=0;e<400&&!u;e+=1){u=!0;for(let e=0;e<i;e+=1){let t=(e+1)%i,n=c[t]+(t===0?a:0)-c[e];if(n<l[e]-1e-9){let r=(l[e]-n)/2;c[e]-=r,c[t]+=r,u=!1}}}if(!u)return null;let d=Array(i);return s.forEach((e,t)=>d[e]=c[t]),d}var Ri=.62;function Yte(e,t,n){let r=e.length;if(r<2||!t.length||r>7)return null;let i=e=>n(e)===`a`?Math.PI:n(e)===`b`?0:-Math.PI/2,a=(e,t)=>{let n=Math.abs(e-t)%(Math.PI*2);return Math.min(n,Math.PI*2-n)},o=Math.PI*2/r,s=r===2?[Math.PI,0].map(e=>[e-Ri,e+Ri]):[0,o/2].map(e=>Array.from({length:r},(t,n)=>e+n*o)),c=null;for(let n of s)for(let r of vi(e)){let o=new Map(r.map((e,t)=>[e,n[t]])),s=t.reduce((e,t)=>e+a(o.get(t.from),o.get(t.to)),0)+.04*e.reduce((e,t)=>e+a(o.get(t),i(t)),0);(!c||s<c.cost-1e-9)&&(c={cost:s,at:o})}return e.map(e=>c.at.get(e))}function Xte(e,t,n,r,i,a=()=>0){let o=new Set(e.map(e=>e.id)),s=new Map(e.map((e,t)=>[e.id,t])),c=new Map(e.map(e=>[e.id,[]]));for(let e of t)o.has(e.from)&&o.has(e.to)&&(c.get(e.from).push(e.to),c.get(e.to).push(e.from));let l=new Map([[n,0]]),u=[[n]];for(let e=0;u[e]?.length;e+=1){let t=[];for(let n of u[e])for(let r of c.get(n))l.has(r)||(l.set(r,e+1),t.push(r));if(t.length)u.push([...new Set(t)].sort((e,t)=>s.get(e)-s.get(t)));else break}let d=e=>({w:r.get(e).w,h:r.get(e).h}),f=e=>Math.hypot(d(e).w,d(e).h)/2,p=new Map;p.set(n,{x:-d(n).w/2,y:-d(n).h/2,...d(n),ring:0,angle:0});let m=[0],h=[f(n)],g=(e,t)=>[Math.cos(e)*t*zte,Math.sin(e)*t],_=e=>{let t=(Math.cos(e)>=-1e-9?0:Math.PI)-e;for(;t>Math.PI;)t-=Math.PI*2;for(;t<-Math.PI;)t+=Math.PI*2;return e+t*Vte};for(let e=1;e<u.length;e+=1){let n=u[e],r=Math.max(...n.map(f)),o;if(e===1){let e=Math.PI*2/n.length,r=n.filter(e=>i(e)===`a`),a=n.filter(e=>i(e)===`b`),s=n.filter(e=>i(e)===`n`),c=s.slice(0,Math.ceil(s.length/2)),l=s.slice(Math.ceil(s.length/2)),u=new Map,d=[[r,(t,n)=>Math.PI+((n.length-1)/2-t)*e],[a,(t,n)=>(t-(n.length-1)/2)*e],[c,(t,n)=>3*Math.PI/2+(t-(n.length-1)/2)*e],[l,(t,n)=>Math.PI/2-(t-(n.length-1)/2)*e]],f=(e,t)=>e.forEach((n,r)=>u.set(n,t(r,e)));d.forEach(([e,t])=>f(e,t));let p=t.filter(e=>e.from!==e.to&&n.includes(e.from)&&n.includes(e.to)),m=(e,t)=>{let n=Math.abs(e-t)%(Math.PI*2);return Math.min(n,Math.PI*2-n)},h=()=>p.reduce((e,t)=>e+m(u.get(t.from),u.get(t.to)),0);for(let e=0;e<2&&p.length;e+=1)for(let e of d){let[t,n]=e;if(t.length<2||t.length>6)continue;let r={c:h()-1e-9,order:t};for(let e of vi(t)){f(e,n);let t=h();t<r.c-1e-9&&(r={c:t,order:e})}e[0]=r.order,f(r.order,n)}o=n.map(e=>u.get(e));let g=Yte(n,p,i);g&&(o=g)}else{o=n.map(t=>{let n=c.get(t).filter(t=>l.get(t)===e-1).map(e=>p.get(e).angle),r=n.reduce((e,t)=>e+Math.sin(t),0),i=n.reduce((e,t)=>e+Math.cos(t),0);return _(Math.atan2(r,i))});let t=new Map;n.forEach((e,n)=>{let r=o[n].toFixed(4);t.set(r,[...t.get(r)??[],n])});for(let e of t.values())e.forEach((t,n)=>o[t]+=(n-(e.length-1)/2)*.16)}let s=.4*Math.max(0,...t.filter(t=>l.get(t.from)===e-1&&l.get(t.to)===e||l.get(t.to)===e-1&&l.get(t.from)===e).map(a)),v=(e===1?h[0]+r+Hte:m[e-1]+h[e-1]+r+Bte)+s,y=t=>{n.forEach((n,r)=>{let[i,a]=g(t[r],v);p.set(n,{x:i-d(n).w/2,y:a-d(n).h/2,...d(n),ring:e,angle:t[r]})})},b=n.map(f);for(let t=0;t<200;t+=1){let t=Jte(o,b,v);if(!t)v*=1.06;else{if(y(t),!n.some((t,r)=>[...p.entries()].some(([i,a])=>i!==t&&(l.get(i)<e||n.indexOf(i)>r)&&Pi(Mi(p.get(t)),Mi(a),Oi))))break;v*=1.03}}m.push(v),h.push(r)}return{boxes:p,rings:u,radii:m,halves:h,ring:l,at:g}}var Zte=(e,t,n)=>[...e.entries()].filter(([e])=>e!==t&&e!==n).map(([,e])=>Mi(e));function zi(e){let t=`M ${e[0][0]} ${e[0][1]}`,n=[e[0]];for(let r=0;r<e.length-1;r+=1){let i=e[Math.max(0,r-1)],a=e[r],o=e[r+1],s=e[Math.min(e.length-1,r+2)],c=[a[0]+(o[0]-i[0])/6,a[1]+(o[1]-i[1])/6],l=[o[0]-(s[0]-a[0])/6,o[1]-(s[1]-a[1])/6];t+=` C ${c[0]} ${c[1]} ${l[0]} ${l[1]} ${o[0]} ${o[1]}`;for(let e of[.25,.5,.75,1]){let t=1-e;n.push([t*t*t*a[0]+3*t*t*e*c[0]+3*t*e*e*l[0]+e*e*e*o[0],t*t*t*a[1]+3*t*t*e*c[1]+3*t*e*e*l[1]+e*e*e*o[1]])}}return{points:n,d:t}}var Bi=(e,t,n)=>e.slice(1).some((r,i)=>t.some(t=>Kte(e[i],r,t,n)));function Vi(e,t,n,r,i){let a=null;for(let o of Hi(e,t,n,r,i))(!a||o.bad<a.bad)&&(a=o);return a}var Qte=[.5,.42,.58,.34,.66,.26,.74,.18,.82,.1,.9];function Hi(e,t,n,r,i){let a=e.slice(1).map((t,n)=>[e[n],t]),o=a.map(([e,t])=>Math.hypot(t[0]-e[0],t[1]-e[1])),s=o.reduce((e,t)=>e+t,0),c=t=>{let n=s*t;for(let e=0;e<a.length;e+=1){if(n<=o[e]||e===a.length-1){let t=o[e]?Math.min(1,n/o[e]):0,r=a[e][1][0]-a[e][0][0],i=a[e][1][1]-a[e][0][1];return[a[e][0][0]+r*t,a[e][0][1]+i*t,r,i]}n-=o[e]}return[e[0][0],e[0][1],1,0]},l=[];for(let e of Qte){let[a,o,s,u]=c(e),d=Math.hypot(s,u)||1,f=[-u/d,s/d],p=Math.abs(f[0])*(t.width/2)+Math.abs(f[1])*(t.height/2)+3;for(let s of[0,1,-1]){let c=a+f[0]*s*p,u=o+f[1]*s*p,d={x:c-t.width/2,y:u-t.height/2,w:t.width,h:t.height},m=n.filter(e=>Pi(d,e,2)).length*50+r.filter(e=>Pi(d,e,2)).length*20+i.filter(e=>Bi(e,[d],0)).length*4+Math.abs(e-.5)+(s?.6:0);l.push({bad:m,x:d.x,y:d.y})}}return l}function $te(e,t={}){let n=ci(e),r=li(e);if(n.length)return{errors:n,hints:r,nodes:[],edges:[],connections:[],size:{width:0,height:0},stats:{entities:0,relations:0,groups:0,kinds:{}}};let i=typeof t?.t==`function`?t.t:Pe,a=e.entities,o=e.relations;a.length>25&&r.push(Pe(`rhint.tooLarge`,{n:a.length,limit:25}));let s=e.groups??[],c=e=>s.findIndex(t=>t.id===e.groupId),l=new Map(a.map(e=>[e.id,e])),u=e=>{let t=c(l.get(e));return t===0?`a`:t===1?`b`:`n`},d=new Map(a.map(e=>[e.id,gi(e)])),f=o.map(e=>fi(e,i)),p=f.map(e=>hi(e)),m=l.has(t?.centre)?t.centre:Li(e),h=qte(e);h.sort((e,t)=>Number(t.includes(m))-Number(e.includes(m)));let g=h.map((e,t)=>{let n=a.filter(t=>e.includes(t.id)),r=o.filter(t=>e.includes(t.from)&&e.includes(t.to)),i=t===0?m:Li({entities:n,relations:r}),s=Xte(n,r,i,d,u,e=>p[o.indexOf(e)].width),c=e=>[e.from,e.to].sort().join(`\0`),l=new Map;r.forEach(e=>l.set(c(e),[...l.get(c(e))??[],e]));let f=new Map([...s.boxes.entries()].map(([e,t])=>[e,Mi(t)])),h=new Map,g=[];for(let e of r){let t=f.get(e.from),n=f.get(e.to),r=l.get(c(e)),a=r.indexOf(e),o=Ni(t),u=Ni(n),d=Math.hypot(u[0]-o[0],u[1]-o[1])||1,p=e.from<e.to?1:-1,m=[-(u[1]-o[1])/d*p,(u[0]-o[0])/d*p],_=(a-(r.length-1)/2)*Math.min(ji,(Math.min(t.h,n.h)/2-5)/Math.max(1,(r.length-1)/2)),v=[o[0]+m[0]*_,o[1]+m[1]*_],y=[u[0]+m[0]*_,u[1]+m[1]*_],b=Ii(t,v,y),x=Ii(n,y,v),S=[b,x],C=`M ${b[0]} ${b[1]} L ${x[0]} ${x[1]}`,ee=Zte(s.boxes,e.from,e.to);if(Bi(S,ee,ki)){let r=[(o[0]+u[0])/2,(o[1]+u[1])/2],i=(e,i)=>{let a=[r[0]+m[0]*e*i,r[1]+m[1]*e*i];return zi([Fi(t,a),a,Fi(n,a)])},s=e=>{for(let t=0;t<10;t+=1){let n=Wte+t*Gte+a*ji,r=i(e,n);if(!Bi(r.points,ee,ki))return{arc:r,off:n,side:e}}return null},l=h.get(c(e)),d=null;for(let e of l?[l,-l]:[1,-1]){let t=s(e);if(t&&(!d||!l&&t.off<d.off)&&(d=t),d&&l)break}d&&(h.set(c(e),d.side),S=d.arc.points,C=d.arc.d)}if(Bi(S,ee,ki)){let r=s.boxes.get(e.from),i=s.boxes.get(e.to),a=i.angle-r.angle;for(;a>Math.PI;)a-=Math.PI*2;for(;a<-Math.PI;)a+=Math.PI*2;let o=Math.max(r.ring,i.ring),c=Math.max(4,Math.ceil(Math.abs(a)/.2));for(let e=0;e<6;e+=1){let i=s.radii[o]+s.halves[o]+26+e*36,l=Array.from({length:c+1},(e,t)=>s.at(r.angle+a*t/c,i)),u=Fi(t,l[0]),d=Fi(n,l[c]),f=zi([u,...l,d]);if(S=f.points,C=f.d,!Bi(S,ee,ki))break}}g.push({r:e,points:S,d:C,faint:e.from!==i&&e.to!==i})}let _=[],v=g.map((e,t)=>t).sort((e,t)=>g[e].points.length-g[t].points.length);for(let e of v){let t=g[e],n=p[o.indexOf(t.r)];t.labelSize={width:n.width,height:n.height};let r=Vi(t.points,t.labelSize,[...f.values()],_,g.filter(e=>e!==t).map(e=>e.points));t.labelAt={x:r.x,y:r.y},_.push({x:t.labelAt.x,y:t.labelAt.y,w:t.labelSize.width,h:t.labelSize.height})}let y=e=>({x:e.labelAt.x,y:e.labelAt.y,w:e.labelSize.width,h:e.labelSize.height});for(let e of g)for(let t of g){if(e===t||!Pi(y(e),y(t),0))continue;let n=g.filter(n=>n!==e&&n!==t).map(y),r=e=>g.filter(t=>t!==e).map(e=>e.points),i=null;for(let a of Hi(e.points,e.labelSize,[...f.values()],n,r(e))){let o={x:a.x,y:a.y,w:e.labelSize.width,h:e.labelSize.height},s=Vi(t.points,t.labelSize,[...f.values()],[...n,o],r(t));(!i||a.bad+s.bad<i.bad-1e-9)&&(i={bad:a.bad+s.bad,sa:a,sb:s})}e.labelAt={x:i.sa.x,y:i.sa.y},t.labelAt={x:i.sb.x,y:i.sb.y}}let b=1/0,x=1/0,S=-1/0,C=-1/0,ee=(e,t,n=0,r=0)=>{b=Math.min(b,e),x=Math.min(x,t),S=Math.max(S,e+n),C=Math.max(C,t+r)};for(let e of s.boxes.values())ee(e.x,e.y-18,e.w,e.h+18);for(let e of g){for(let[t,n]of e.points)ee(t,n);ee(e.labelAt.x,e.labelAt.y,e.labelSize.width,e.labelSize.height)}return{centre:i,laid:s,conns:g,bounds:{x0:b,y0:x,x1:S,y1:C},ids:e}}),_=g[0],v=_.bounds.x1-_.bounds.x0,y=Math.max(v,900),b=new Map;b.set(0,[32-_.bounds.x0,32-_.bounds.y0]);let x=32,S=32+(_.bounds.y1-_.bounds.y0)+Ai+(g.length>1?36:0),C=0,ee=g.length>1?{x:32,y:32+(_.bounds.y1-_.bounds.y0)+Ai-6}:null;for(let e=1;e<g.length;e+=1){let t=g[e].bounds,n=t.x1-t.x0,r=t.y1-t.y0;x>32&&x+n>32+y&&(x=32,S+=C+Ai,C=0),b.set(e,[x-t.x0,S-t.y0]),x+=n+Ute,C=Math.max(C,r)}let w=_i(e,i),te=e=>s.find(t=>t.id===e.groupId)?.label??``,ne=[],re=[],ie=e=>b.get(e)[1],ae={};for(let e of o)ae[e.kind]=(ae[e.kind]??0)+1;let oe=0,se=0;g.forEach((e,t)=>{let[n,r]=b.get(t);for(let[i,a]of e.laid.boxes){let o=l.get(i),s=c(o);ne.push({id:i,type:`rnode`,position:{x:a.x+n,y:a.y+r},data:w.dataOf(o,{layer:a.y+r+a.h/2<ie(t)?0:1,centre:i===e.centre,ring:a.ring,camp:te(o)?{label:te(o),tone:s===0?0:s===1?1:2}:null})})}for(let t of e.conns){let e=o.indexOf(t.r);re.push({id:`r:${t.r.id}`,relationId:t.r.id,from:t.r.from,to:t.r.to,kind:t.r.kind,directed:si(t.r),secures:t.r.secures??null,label:f[e],points:t.points.map(([e,t])=>[e+n,t+r]),d:ene(t.d,n,r),labelAt:{x:t.labelAt.x+n,y:t.labelAt.y+r},labelSize:t.labelSize,faint:t.faint})}oe=Math.max(oe,e.bounds.x1+n),se=Math.max(se,e.bounds.y1+r)});let ce=ne.find(e=>e.data.centre&&g[0].laid.boxes.has(e.id));return{errors:n,hints:r,nodes:ne,edges:[],connections:re,centre:m,defaultCentre:Li(e),islands:g.map(e=>({centre:e.centre,ids:e.ids})),note:ee,rings:g[0].laid.rings.map(e=>e.length),size:{width:Math.ceil(oe+32),height:Math.ceil(se+32)},centreAt:ce?.position,stats:{entities:a.length,relations:o.length,groups:s.length,kinds:ae}}}function ene(e,t,n){let r=e.match(/-?\d+(\.\d+)?(e-?\d+)?/g).map(Number),i=0;return e.replace(/-?\d+(\.\d+)?(e-?\d+)?/g,()=>{let e=r[i]+(i%2==0?t:n);return i+=1,String(e)})}var tne=13,Ui=18,nne=11.5,rne=15,Wi=4,Gi=6,Ki=24,ine=168,ane={latin:1.2,cjk:1.06},qi=(e,t,n)=>Math.max(1,Xe(e,t*.86/n,ane));function Ji(e,t=``){let n=new Set((e.groups??[]).map(e=>e.id)),r=(e.groups??[]).map(t=>({id:t.id,label:t.label,members:e.entities.filter(e=>e.groupId===t.id)})),i=e.entities.filter(e=>!n.has(e.groupId));i.length&&r.push({id:null,label:t,members:i});let a=[],o=[];for(let e of r)e.members.length&&(o.push({id:e.id,label:e.label,from:a.length,to:a.length+e.members.length-1}),a.push(...e.members));return{order:a,bands:o}}function Yi(e,t){let n=new Map(t.map((e,t)=>[e.id,t])),r=new Map,i=(e,t,n)=>{let i=`${e}|${t}`;r.has(i)||r.set(i,[]),r.get(i).push(n)};for(let t of e.relations){let e=n.get(t.from),r=n.get(t.to);i(e,r,t),!si(t)&&e!==r&&i(r,e,t)}return r}function Xi(e,t={}){let n=ci(e),r=li(e),i={errors:n,hints:r,nodes:[],edges:[],connections:[],size:{width:0,height:0},stats:{entities:0,relations:0,groups:0,kinds:{}}};if(n.length)return i;let a=typeof t?.t==`function`?t.t:Pe,o=e.entities,s=e.relations;o.length>25&&r.push(Pe(`rhint.tooLarge`,{n:o.length,limit:25}));let c=_i(e,a),l=new Map(s.map((e,t)=>[e.id,t])),u=e=>c.labelTexts[l.get(e.id)],{order:d,bands:f}=Ji(e,a(`rel.matrix.ungrouped`)),p=Yi(e,d),m=d.length,h=e.groups?.length?Ki:0,g=(e,t)=>qi(e,t-8,tne),_=Math.max(...d.map(e=>g(e.label,136)))*Ui+12,v=ine,y=e=>e.map(e=>{let t=u(e);return{rel:e,text:t,h:qi(t,108,nne)*rne+8}}),b=[];for(let e=0;e<m;e++){let t=Math.max(44,Math.ceil(g(d[e].label,v)*Ui+12));for(let n=0;n<m;n++){let r=p.get(`${e}|${n}`);if(!r)continue;let i=y(r);t=Math.max(t,i.reduce((e,t)=>e+t.h,0)+Wi*(i.length-1)+12)}b.push(t)}let x=32+h+v,S=32+h+_,C=[],ee=S;for(let e=0;e<m;e++)C.push(ee),ee+=b[e];let w=x+m*136+32,te=Math.ceil(ee+32),ne={width:w,height:te,corner:{x:32,y:32,w:x-32,h:S-32},bands:[],heads:[],rowHeads:[],cells:[],diagonal:[],chipsTotal:0,filled:0};f.forEach((e,t)=>{let n=x+e.from*136,r=(e.to-e.from+1)*136,i=C[e.from],a=C[e.to]+b[e.to]-i;ne.bands.push({id:e.id,label:e.label,tone:t%2,top:{x:n,y:32,w:r,h:Ki},left:{x:32,y:i,w:Ki,h:a}})}),d.forEach((e,t)=>{ne.heads.push({id:e.id,text:e.label,x:x+t*136,y:32+h,w:136,h:_}),ne.rowHeads.push({id:e.id,text:e.label,x:32+h,y:C[t],w:v,h:b[t]}),ne.diagonal.push({x:x+t*136,y:C[t],w:136,h:b[t]})});for(let[e,t]of p){let[n,r]=e.split(`|`).map(Number),i=x+r*136,a=C[n],o=a+Gi,s=y(t).map(e=>{let t={id:e.rel.id,kind:e.rel.kind,text:e.text,x:i+Gi,y:o,w:124,h:e.h};return o+=e.h+Wi,t});ne.chipsTotal+=s.length,ne.filled+=1,ne.cells.push({row:d[n].id,col:d[r].id,x:i,y:a,w:136,h:b[n],chips:s})}let re=[{id:`__matrix__`,type:`matrixLayer`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:ne}],ie={};for(let e of s)ie[e.kind]=(ie[e.kind]??0)+1;let ae=[...p.values()].filter(e=>e.length>1).length;return{errors:n,hints:r,nodes:re,edges:[],connections:[],order:d.map(e=>e.id),filled:ne.filled,stacked:ae,possible:m*(m-1),size:{width:Math.ceil(w),height:te},stats:{entities:o.length,relations:s.length,groups:e.groups?.length??0,kinds:ie}}}var Zi=16;function Qi(e,t,n){let r=new Map;for(let i of e)r.set(t.get(i),Math.max(r.get(t.get(i))??0,n(i).w));return e=>{let i=n(e),a=r.get(t.get(e));return a>i.w?{...i,w:a,textW:a-28}:i}}function $i(e,t){let n=new Map(e.map(e=>[e,[]]));for(let e of t)n.get(e.from).push(e);let r=new Set(t.map(e=>e.to)),i=new Set,a=new Map,o=e=>{let t=[{id:e,i:0}];for(a.set(e,1);t.length;){let e=t.at(-1),r=n.get(e.id);if(e.i<r.length){let n=r[e.i++];a.get(n.to)===1?i.add(n.key):a.has(n.to)||(a.set(n.to,1),t.push({id:n.to,i:0}))}else a.set(e.id,2),t.pop()}};for(let t of e)!r.has(t)&&!a.has(t)&&o(t);for(let t of e)a.has(t)||o(t);let s=new Map(e.map(e=>[e,[]])),c=new Map(e.map(e=>[e,0]));for(let e of t)i.has(e.key)||(s.get(e.from).push(e.to),c.set(e.to,c.get(e.to)+1));let l=new Map(e.map(e=>[e,0])),u=e.filter(e=>c.get(e)===0);for(let e=0;e<u.length;e++)for(let t of s.get(u[e]))l.set(t,Math.max(l.get(t),l.get(u[e])+1)),c.set(t,c.get(t)-1),c.get(t)===0&&u.push(t);return{back:i,level:new Map(e.map(e=>[e,l.get(e)])),roots:e.filter(e=>!r.has(e))}}function ea(e,t,n,{horizontal:r=!1,gapAcross:i=40,gapAlong:a=96}={}){let{back:o,level:s,roots:c}=$i(e,t),l=new Set,u=e=>l.has(e),d=e=>u(e)?Zi:r?n(e).h:n(e).w,f=e=>u(e)?0:r?n(e).w:n(e).h,p=(e,t)=>r?[t,e]:[e,t],m=[];for(let t of e)(m[s.get(t)]??=[]).push(t);let h=new Map(e.map(e=>[e,[]])),g=new Map(e.map(e=>[e,[]])),_=new Map;for(let e of t){if(o.has(e.key))continue;let t=[e.from];for(let n=s.get(e.from)+1;n<s.get(e.to);n++){let e=`\u0000wp${l.size}`;l.add(e),m[n].push(e),h.set(e,[]),g.set(e,[]),t.push(e)}_.set(e.key,t.slice(1)),t.push(e.to);for(let e=0;e+1<t.length;e++)h.get(t[e+1]).push(t[e]),g.get(t[e]).push(t[e+1])}let v=(e,t,n)=>{let r=new Map(e.map((e,r)=>{let i=t.get(e).map(e=>n.get(e)).filter(e=>e!==void 0);return[e,i.length?i.reduce((e,t)=>e+t,0)/i.length:r]}));return[...e].sort((e,t)=>r.get(e)-r.get(t))},y=e=>new Map(e.map((e,t)=>[e,t]));for(let e=0;e<4;e++){for(let e=1;e<m.length;e++)m[e]=v(m[e],h,y(m[e-1]));for(let e=m.length-2;e>=0;e--)m[e]=v(m[e],g,y(m[e+1]))}let b=new Map,x=e=>e.reduce((e,t)=>e+d(t),0)+i*(e.length-1),S=m.length?Math.max(...m.map(x)):0;for(let e of m){let t=(S-x(e))/2;for(let n of e)b.set(n,t+d(n)/2),t+=d(n)+i}let C=(e,t)=>{let n=e.map(e=>{let n=t.get(e);return n.length?n.reduce((e,t)=>e+b.get(t),0)/n.length:b.get(e)}),r=n.slice();for(let t=1;t<e.length;t++)r[t]=Math.max(r[t],r[t-1]+d(e[t-1])/2+i+d(e[t])/2);let a=r.reduce((e,t,r)=>e+(t-n[r]),0)/(e.length||1);e.forEach((e,t)=>b.set(e,r[t]-a))};for(let e=0;e<6;e++){for(let e=1;e<m.length;e++)C(m[e],h);for(let e=m.length-2;e>=0;e--)C(m[e],g)}let ee=1/0,w=-1/0;for(let e of m)for(let t of e)ee=Math.min(ee,b.get(t)-d(t)/2),w=Math.max(w,b.get(t)+d(t)/2);m.length||(ee=w=0);let te=new Map,ne=new Map,re=[],ie=0;m.forEach((e,t)=>{let r=Math.max(...e.map(f));re[t]=ie+r/2;for(let t of e){let e=b.get(t)-ee;if(u(t)){ne.set(t,p(e,ie+r/2));continue}let[i,a]=p(e-d(t)/2,ie+(r-f(t))/2);te.set(t,{x:i,y:a,w:n(t).w,h:n(t).h})}ie+=r+(t<m.length-1?a:0)});let ae=e=>r?[e.x+e.w,e.y+e.h/2]:[e.x+e.w/2,e.y+e.h],oe=e=>r?e[1]:e[0],se=(e,t)=>r?[e.x,t]:[t,e.y],ce=e=>{let t=_.get(e.key)??[];return t.length?oe(ne.get(t.at(-1))):oe(ae(te.get(e.from)))},le=new Map;for(let n of e){let e=t.filter(e=>!o.has(e.key)&&e.to===n&&!(_.get(e.key)??[]).length);new Set(e.map(e=>e.from)).size>=2&&le.set(n,e)}let ue=new Set([...le.values()].flat().map(e=>e.key)),de=new Map;for(let n of e){let e=te.get(n),i=r?e.h:e.w,a=r?e.y:e.x;for(let e of le.get(n)??[])de.set(e.key,a+i/2);let s=t.filter(e=>!o.has(e.key)&&e.to===n&&!ue.has(e.key)).sort((e,t)=>ce(e)-ce(t));s.forEach((e,t)=>de.set(e.key,a+i*(t+1)/(s.length+1)))}let fe=new Map,pe=new Map,me=new Map;for(let e of t){if(o.has(e.key))continue;let t=`${e.from}\u0000${e.to}`;me.set(t,[...me.get(t)??[],e.key])}let he=e=>{let t=ae(te.get(e.from)),n=me.get(`${e.from}\u0000${e.to}`);if(n.length<2)return t;let i=te.get(e.from),a=(r?i.h:i.w)/2-8,o=Math.max(-a,Math.min(a,(n.indexOf(e.key)-(n.length-1)/2)*12));return r?[t[0],t[1]+o]:[t[0]+o,t[1]]};for(let e of t){if(o.has(e.key))continue;let t=(_.get(e.key)??[]).map(e=>ne.get(e)),n=[he(e),...t,se(te.get(e.to),de.get(e.key))];fe.set(e.key,n);for(let t=0;t+1<n.length;t++){let r=Math.min(oe(n[t]),oe(n[t+1])),i=Math.max(oe(n[t]),oe(n[t+1])),a=s.get(e.from)+t;pe.has(a)||pe.set(a,[]);let o=pe.get(a);if(ue.has(e.key)){let n=o.find(t=>t.bar===e.to);n?(n.lo=Math.min(n.lo,r),n.hi=Math.max(n.hi,i),n.members.push(`${e.key}#${t}`)):o.push({bar:e.to,members:[`${e.key}#${t}`],lo:r,hi:i,track:0})}else i-r<.5||o.push({members:[`${e.key}#${t}`],lo:r,hi:i,track:0})}}let ge=new Map;for(let e of pe.values()){if(!e.length)continue;let t=[];e.sort((e,t)=>e.lo-t.lo||e.hi-t.hi);for(let n of e){for(;t.some(e=>e.track===n.track&&Math.min(e.hi,n.hi)-Math.max(e.lo,n.lo)>.5);)n.track+=1;t.push(n)}let n=Math.max(...e.map(e=>e.track))+1;for(let t of e)for(let e of t.members)ge.set(e,n===1?.45:.25+.35*t.track/(n-1))}let _e=new Map,ve=0,ye=0,be=new Map,xe=new Map;for(let e of t){let t=te.get(e.from),n=te.get(e.to);if(o.has(e.key)){let i=s.get(e.to),a=s.get(e.from),o=0;for(let e=i;e<=a;e++)for(let t of m[e])te.has(t)&&(o=Math.max(o,r?te.get(t).y+te.get(t).h:te.get(t).x+te.get(t).w));let c=o+36+26*ve++;ye=Math.max(ye,c);let l=(be.get(e.from)??0)+1,u=(xe.get(e.to)??0)+1;be.set(e.from,l),xe.set(e.to,u);let d=(e,t)=>Math.min((e-1)*10,(r?t.w:t.h)/2-6),f=r?[t.x+t.w/2+d(l,t),t.y+t.h]:[t.x+t.w,t.y+t.h/2+d(l,t)],p=r?[n.x+n.w/2+d(u,n),n.y+n.h]:[n.x+n.w,n.y+n.h/2+d(u,n)],h=r?[f[0],c]:[c,f[1]],g=r?[p[0],c]:[c,p[1]];_e.set(e.key,{back:!0,segs:[[f,h,g,p]],via:[]})}else{let t=fe.get(e.key),n=t.slice(1,-1),i=[];for(let n=0;n+1<t.length;n++){let[a,o]=[t[n],t[n+1]],s=ge.get(`${e.key}#${n}`)??.45,c=r?a[0]+(o[0]-a[0])*s:a[1]+(o[1]-a[1])*s;i.push(r?[a,[c,a[1]],[c,o[1]],o]:[a,[a[0],c],[o[0],c],o])}_e.set(e.key,{back:!1,segs:i,via:n,gathered:ue.has(e.key)})}}let Se=Math.max(w-ee,ye),Ce=ie;return{levels:m,boxes:te,links:_e,level:s,back:o,roots:c,size:r?{width:Ce,height:Se}:{width:Se,height:Ce}}}function ta(e){let t=[],n=e=>t.some(t=>e.x<t.x+t.w&&t.x<e.x+e.w&&e.y<t.y+t.h&&t.y<e.y+e.h),r=e.map(()=>null),i=([e,t],n,r=22)=>({x:e-n/2-1,y:t-r/2-1,w:n+2,h:r+2});return e.forEach((e,n)=>{if(!e.back)return;let[,a,o]=e.seg;r[n]=[(a[0]+o[0])/2,(a[1]+o[1])/2],t.push(i(r[n],e.w,e.h))}),e.forEach((e,a)=>{if(e.back)return;let[o,s,c,l]=e.seg;if(e.gathered&&Math.hypot(s[0]-o[0],s[1]-o[1])>=28){let c=e.w/2-14,l=(c>8?[0,c,-c]:[0]).flatMap(e=>[.3,.75,.52].map(t=>[o[0]+(s[0]-o[0])*t+e,o[1]+(s[1]-o[1])*t]));r[a]=l.find(t=>!n(i(t,e.w,e.h)))??l[0],t.push(i(r[a],e.w,e.h));return}let u=Math.hypot(l[0]-c[0],l[1]-c[1]),d=e.w/2-14,f=u>=30?(d>8?[0,d,-d]:[0]).flatMap(e=>[.55,.2,.38,.72].map(t=>[c[0]+(l[0]-c[0])*t+e,c[1]+(l[1]-c[1])*t])):[Math.hypot(c[0]-s[0],c[1]-s[1])>.5?[(s[0]+c[0])/2,(s[1]+c[1])/2]:[(o[0]+l[0])/2,(o[1]+l[1])/2]],p=f.find(t=>!n(i(t,e.w,e.h)))??f[0];r[a]=p,t.push(i(p,e.w,e.h))}),r}function na(e,t=0,n=0){let r=([e,r])=>`${e+t} ${r+n}`;return`M ${r(e[0][0])}`+e.map(([,e,t,n])=>` L ${r(e)} L ${r(t)} L ${r(n)}`).join(``)}var ra=20,ia=34,aa=12.5,oa=19,sa={latin:1.2,cjk:1.06},ca=(e,t)=>Math.max(1,Xe(e,t/aa,sa));function la(e,t,n){let r=t-40;return{section(i,a){let o=n,s=o+ia;for(let t of a){let n=ca(t.main,r)*oa+(t.sub?ca(t.sub,r)*oa:0);e.texts.push({x:32+ra,y:s,w:r,main:t.main,sub:t.sub,tone:t.tone}),s+=n+6}e.frames.push({x:32,y:o,w:t,h:s-o+ra-6,title:i,titleAt:[32+ra,o+22]}),n=s+ra-6+28},empty(r,i){e.empties.push({x:32,y:n,w:t,h:84,text:r,sub:i}),n+=112},y:()=>n}}function ua(e,t){let n=new Map;for(let t of e)n.set(t.from,[...n.get(t.from)??[],t.to]);let r=new Set([t]),i=[t];for(;i.length;)for(let e of n.get(i.pop())??[])r.has(e)||(r.add(e),i.push(e));return r}function da(e,t){let n=ua(e,t),r=e.filter(e=>n.has(e.from)&&n.has(e.to)),i=fa(e,t);return r.length?{drawn:r,above:e.filter(e=>i.has(e.from)&&i.has(e.to)&&!r.includes(e))}:{drawn:e.filter(e=>i.has(e.from)&&i.has(e.to)),above:[]}}function fa(e,t){let n=new Map,r=new Map,i=(e,t,n)=>e.set(t,[...e.get(t)??[],n]);for(let t of e)i(r,t.from,t.to),i(n,t.to,t.from);let a=new Set([t]);for(let e of[n,r]){let n=[t],r=new Set([t]);for(;n.length;)for(let t of e.get(n.pop())??[])r.has(t)||(r.add(t),a.add(t),n.push(t))}return a}function pa(e,t){let n=new Map(e.map(e=>[e,e])),r=e=>{let t=e;for(;n.get(t)!==t;)t=n.get(t);for(;n.get(e)!==t;){let r=n.get(e);n.set(e,t),e=r}return t};for(let e of t)n.set(r(e.from),r(e.to));return new Set(e.map(r)).size}var ma=(e,t)=>pa(e,t)>1;function ha(e,t){if(pa(e,t)<2)return null;let n=e=>t.filter(t=>t.from===e||t.to===e).length,r=null;for(let t of e)(r===null||n(t)>n(r))&&(r=t);return r}function ga(e,t,n){return e===`*`?null:t.includes(e)?e:ha(t,n)}var _a=e=>20+[...e].reduce((e,t)=>e+(/[\u2e80-\u9fff\uff00-\uffef]/.test(t)?12.5:7.4),0),va=e=>Math.min(220,_a(e)),ya=e=>22+18*(Math.max(1,Math.ceil(_a(e)/220-1e-9))-1),ba=40,xa=96,Sa=760,Ca=e=>`${Number(Number(e).toFixed(2))}%`;function wa(e,t){let n=e.relations.filter(e=>e.kind===`equity`).map(e=>({key:e.id,rel:e,from:e.from,to:e.to,back:!1})),r=new Set(n.flatMap(e=>[e.from,e.to])),i=e.entities.map(e=>e.id).filter(e=>r.has(e)),a=ga(t,i,n),o=a?da(n,a):null,s=o?o.drawn:n,c=o?o.above.map(e=>e.rel):[],l=new Set(s.map(e=>e.key)),u=new Set(c.map(e=>e.id)),d=e.relations.filter(e=>!l.has(e.id)&&!u.has(e.id)),f=new Set([...a?[a]:[],...s.flatMap(e=>[e.from,e.to])]),p=e.entities.map(e=>e.id).filter(e=>f.has(e)),m=new Set(c.flatMap(e=>[e.from,e.to])),h=e.entities.filter(e=>!f.has(e.id)&&!m.has(e.id)),{back:g,level:_,roots:v}=$i(p,s);for(let e of s)e.back=g.has(e.key);return{edges:s,ids:p,level:_,roots:v,rest:d,above:c,apart:h,company:a,several:ma(i,n),companies:i}}function Ta(e,t=wa(e)){let n=new Map(t.ids.map(e=>[e,[]]));for(let e of t.edges)e.back||n.get(e.from).push(e);let r=[];for(let e of t.roots){let i=new Map,a=(e,t,r)=>{for(let o of n.get(e)){let e=[...t,o.rel.share],n=r&&typeof o.rel.share==`number`,s=i.get(o.to)??{paths:[],unknown:!1,long:!1};n?s.paths.push(e):s.unknown=!0,e.length>=2&&(s.long=!0),i.set(o.to,s),a(o.to,e,n)}};a(e,[],!0);for(let n of t.ids){let t=i.get(n);if(t&&t.long){if(t.unknown)r.push({holder:e,held:n,total:null,terms:null});else{let i=t.paths.map(e=>e.reduce((e,t)=>t/100*e,1)*100).reduce((e,t)=>e+t,0);r.push({holder:e,held:n,total:Math.round(i*100)/100,terms:t.paths.map(e=>e.map(Ca).join(` × `))})}}}}return r}function Ea(e,t={}){let n=ci(e),r=li(e),i={errors:n,hints:r,nodes:[],edges:[],connections:[],size:{width:0,height:0},stats:{entities:0,relations:0,groups:0,kinds:{}}};if(n.length)return i;let a=typeof t?.t==`function`?t.t:Pe,o=e.entities,s=e.relations;o.length>25&&r.push(Pe(`rhint.tooLarge`,{n:o.length,limit:25}));let c=new Map(o.map(e=>[e.id,e])),l=_i(e,a),u=wa(e,t.company),d=e=>c.get(e).label,f=Qi(u.ids,u.level,e=>l.sizes.get(e)),p=ea(u.ids,u.edges,f,{gapAcross:ba,gapAlong:xa}),m=u.edges.filter(e=>e.back).length,h=p.size.width,g=m?24:0,_=Math.max(h+g,Sa-64),v=32+(_-h-g)/2,y=[],b={width:_+64,height:0,links:[],pills:[],empties:[],frames:[],texts:[]};for(let[e,t]of p.boxes)y.push({id:e,type:`rnode`,position:{x:t.x+v,y:t.y+32},data:l.dataOf(c.get(e),{layer:p.level.get(e),hintKey:`rel.previewHint`,w:t.w,textW:f(e).textW})});let x=p.levels,S=p.size.height+32,C=u.edges.map(e=>{let t=typeof e.rel.share==`number`?Ca(e.rel.share):a(`rel.equity.noShare`);return e.back?`${t} · ${a(`rel.equity.cross`)}`:t}),ee=ta(u.edges.map((e,t)=>({seg:p.links.get(e.key).segs.at(-1),w:va(C[t]),h:ya(C[t]),back:e.back,gathered:p.links.get(e.key).gathered})));u.edges.forEach((e,t)=>{let n=p.links.get(e.key);b.links.push({d:na(n.segs,v,32),back:e.back,via:n.via.map(([e,t])=>[e+v,t+32])}),b.pills.push({x:ee[t][0]+v,y:ee[t][1]+32,text:C[t],unknown:typeof e.rel.share!=`number`,back:e.back,relId:e.rel.id})});let w=la(b,_,S+(x.length?28:0)),te=w.section;u.ids.length||w.empty(a(`rel.equity.noEquity`),a(`rel.equity.noEquityHint`)),u.above.length&&te(a(`rel.equity.above`,{n:u.above.length}),u.above.map(e=>({main:`${d(e.from)} → ${d(e.to)}${a(`rel.equity.colon`)}${typeof e.share==`number`?Ca(e.share):a(`rel.equity.noShare`)}`})));let ne=Ta(e,u);if(ne.length){let e=ne.slice(0,30),t=e.map(e=>e.total===null?{main:`${d(e.holder)} → ${d(e.held)}: ${a(`rel.equity.notComputable`)}`,tone:`note`}:{main:`${d(e.holder)} → ${d(e.held)}: ${Ca(e.total)}`,sub:e.terms.length>1||e.terms[0].includes(`×`)?`${e.terms.join(` + `)}`:void 0});ne.length>e.length&&t.push({main:a(`rel.equity.moreRows`,{n:ne.length-e.length}),tone:`note`}),te(a(`rel.equity.indirect`,{n:ne.length}),t)}let re=Math.ceil(w.y()-28+32);b.height=re,y.unshift({id:`__equity__`,type:`lineLayer`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:b});let ie={};for(let e of s)ie[e.kind]=(ie[e.kind]??0)+1;return{errors:n,hints:r,nodes:y,edges:[],connections:[],levels:x.length,holders:u.roots.length,treeParties:u.ids.length,equityLines:u.edges.length,noShare:u.edges.filter(e=>typeof e.rel.share!=`number`).length,crossHoldings:u.edges.filter(e=>e.back).length,indirect:ne.length,apart:u.apart.length,above:u.above.length,other:u.rest.length,company:u.company,several:u.several,companies:u.companies.map(e=>({id:e,label:c.get(e).label})),size:{width:Math.ceil(b.width),height:re},stats:{entities:o.length,relations:s.length,groups:e.groups?.length??0,kinds:ie}}}var Da=[`control`,`employment`,`agency`],Oa=40,ka=160,Aa=760;function ja(e,t){let n=e.relations.filter(e=>Da.includes(e.kind)).map(e=>({key:e.id,rel:e,from:e.from,to:e.to,back:!1})),r=new Set(n.flatMap(e=>[e.from,e.to])),i=e.entities.map(e=>e.id).filter(e=>r.has(e)),a=ga(t,i,n),o=a?da(n,a):null,s=o?o.drawn:n,c=o?o.above.map(e=>e.rel):[],l=new Set(s.map(e=>e.key)),u=new Set(c.map(e=>e.id)),d=e.relations.filter(e=>!l.has(e.id)&&!u.has(e.id)),f=new Set([...a?[a]:[],...s.flatMap(e=>[e.from,e.to])]),p=e.entities.map(e=>e.id).filter(e=>f.has(e)),m=new Set(c.flatMap(e=>[e.from,e.to])),h=e.entities.filter(e=>!f.has(e.id)&&!m.has(e.id)),{back:g,level:_,roots:v}=$i(p,s);for(let e of s)e.back=g.has(e.key);return{edges:s,ids:p,level:_,roots:v,rest:d,above:c,apart:h,company:a,several:ma(i,n),companies:i}}function Ma(e,t={}){let n=ci(e),r=li(e),i={errors:n,hints:r,nodes:[],edges:[],connections:[],size:{width:0,height:0},stats:{entities:0,relations:0,groups:0,kinds:{}}};if(n.length)return i;let a=typeof t?.t==`function`?t.t:Pe,o=e.entities,s=e.relations;o.length>25&&r.push(Pe(`rhint.tooLarge`,{n:o.length,limit:25}));let c=new Map(o.map(e=>[e.id,e])),l=_i(e,a),u=new Map(s.map((e,t)=>[e.id,t])),d=e=>l.labelTexts[u.get(e.id)],f=e=>c.get(e).label,p=ja(e,t.company),m=Qi(p.ids,p.level,e=>l.sizes.get(e)),h=ea(p.ids,p.edges,m,{gapAcross:Oa,gapAlong:ka}),g=p.edges.filter(e=>e.back).length,_=Math.max(h.size.width+(g?24:0),Aa-64),v=32+(_-h.size.width-(g?24:0))/2,y=[],b={width:_+64,height:0,links:[],pills:[],empties:[],frames:[],texts:[]};for(let[e,t]of h.boxes)y.push({id:e,type:`rnode`,position:{x:t.x+v,y:t.y+32},data:l.dataOf(c.get(e),{layer:h.level.get(e),hintKey:`rel.previewHint`,w:t.w,textW:m(e).textW})});let x=p.edges.map(e=>e.back?`${d(e.rel)} · ${a(`rel.authority.cycle`)}`:d(e.rel)),S=ta(p.edges.map((e,t)=>({seg:h.links.get(e.key).segs.at(-1),w:va(x[t]),h:ya(x[t]),back:e.back,gathered:h.links.get(e.key).gathered})));p.edges.forEach((e,t)=>{let n=h.links.get(e.key);b.links.push({d:na(n.segs,v,32),kind:e.rel.kind,back:e.back,via:n.via.map(([e,t])=>[e+v,t+32]),arrow:si(e.rel)?`end`:`none`}),b.pills.push({x:S[t][0]+v,y:S[t][1]+32,text:x[t],kind:e.rel.kind,back:e.back,relId:e.rel.id})});let C=la(b,_,h.size.height+32+(p.ids.length?28:0));p.ids.length||C.empty(a(`rel.authority.none`),a(`rel.authority.noneHint`)),p.above.length&&C.section(a(`rel.authority.above`,{n:p.above.length}),p.above.map(e=>({main:`${d(e)}${a(`rel.equity.colon`)}${f(e.from)} → ${f(e.to)}`})));let ee=Math.ceil(C.y()-28+32);b.height=ee,y.unshift({id:`__authority__`,type:`lineLayer`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:b});let w={};for(let e of s)w[e.kind]=(w[e.kind]??0)+1;return{errors:n,hints:r,nodes:y,edges:[],connections:[],levels:h.levels.length,tops:p.roots.length,chartParties:p.ids.length,authorityLines:p.edges.length,cycles:g,apart:p.apart.length,above:p.above.length,other:p.rest.length,company:p.company,several:p.several,companies:p.companies.map(e=>({id:e,label:c.get(e).label})),size:{width:Math.ceil(b.width),height:ee},stats:{entities:o.length,relations:s.length,groups:e.groups?.length??0,kinds:w}}}var Na=[190,130,400,200],one=70,Pa=34,sne=13,Fa=19,cne={latin:1.2,cjk:1.06},Ia=(e,t)=>Math.max(1,Xe(e,(t-20)/sne,cne));function lne(e,t){return e.entities.some(e=>e.id===t)?t:Li(e)}var La=(e,t)=>si(e)?e.from===t?`→`:`←`:`↔`;function Ra(e,t){let n=new Map((e.sources??[]).map(e=>[e.id,e.name])),r=new Map;for(let n of e.relations){if(n.from!==t&&n.to!==t)continue;let e=n.from===t?n.to:n.from;r.has(e)||r.set(e,[]),r.get(e).push({rel:n,arrow:La(n,t)})}let i=[];for(let a of e.entities){if(a.id===t||!r.has(a.id))continue;let e=r.get(a.id);i.push({id:a.id,name:a.label,role:a.role??``,kinds:[...new Set(e.map(e=>e.rel.kind))],rels:e,sources:[...new Set(e.flatMap(e=>(e.rel.sourceIds??[]).map(e=>n.get(e)??e)))]})}return{rows:i,none:e.entities.filter(e=>e.id!==t&&!r.has(e.id)),rest:e.relations.filter(e=>e.from!==t&&e.to!==t)}}function une(e,t={}){let n=ci(e),r=li(e),i={errors:n,hints:r,nodes:[],edges:[],connections:[],size:{width:0,height:0},stats:{entities:0,relations:0,groups:0,kinds:{}}};if(n.length)return i;let a=typeof t?.t==`function`?t.t:Pe,o=e.entities,s=e.relations;o.length>25&&r.push(Pe(`rhint.tooLarge`,{n:o.length,limit:25}));let c=new Map(o.map(e=>[e.id,e])),l=_i(e,a),u=new Map(s.map((e,t)=>[e.id,t])),d=e=>l.labelTexts[u.get(e.id)],f=e=>c.get(e).label,p=lne(e,t.centre),{rows:m,none:h,rest:g}=Ra(e,p),_=m.some(e=>e.sources.length),v=_?Na:Na.slice(0,3),y=v.reduce((e,t)=>e+t,0),b=y+64,x={width:b,height:0,links:[],pills:[],empties:[],frames:[],texts:[],table:null},S=m.reduce((e,t)=>e+t.rels.length,0);x.texts.push({x:32,y:32,w:y,main:a(`rel.related.title`,{name:f(p)}),sub:a(`rel.related.count`,{n:m.length,m:S}),tone:`title`});let C=32+one,ee=a(`rel.equity.sep`),w=[a(`rel.related.colParty`),a(`rel.related.colKind`),a(`rel.related.colText`),..._?[a(`rel.related.colSource`)]:[]],te=v.reduce((e,t)=>[...e,e.at(-1)+t],[32]),ne=e=>si(e)?`${f(e.from)} → ${f(e.to)}`:a(`rel.related.dirNone`,{a:f(e.from),b:f(e.to)}),re=C+Pa,ie=[];for(let e of m){let t=e.rels.map(e=>{let t=ne(e.rel),n=[[a(`rel.kind.${e.rel.kind}`)],[d(e.rel),t]];return{texts:n,h:Math.max(...n.map((e,t)=>e.reduce((e,n)=>e+Ia(n,Na[t+1]),0)))*Fa+16}}),n=[e.name,...e.role?[e.role]:[]],r=[e.sources.length?e.sources.join(ee):`—`],i=(e,t)=>e.reduce((e,n)=>e+Ia(n,t)*Fa,0)+16,o=Math.max(t.reduce((e,t)=>e+t.h,0),i(n,Na[0]),_?i(r,Na[3]):0),s=o-t.reduce((e,t)=>e+t.h,0),c=re;t.forEach((i,a)=>{let l=i.h+(a===t.length-1?s:0),u=i.texts.map((e,t)=>({x:te[t+1],w:Na[t+1],lines:e,bold:!1,sub:e.length>1}));a===0&&(u.unshift({x:te[0],w:Na[0],lines:n,bold:!0,y:re,h:o}),_&&u.push({x:te[3],w:Na[3],lines:r,bold:!1,y:re,h:o})),ie.push({id:a===0?e.id:`${e.id}#${a}`,party:e.id,y:c,h:l,sep:a===t.length-1,cells:u}),c+=l}),re+=o}x.table={x:32,y:C,w:y,headH:Pa,xs:te,header:w.map((e,t)=>({x:te[t],w:v[t],text:e})),rows:ie,bottom:re};let ae=la(x,y,re+28);m.length||ae.empty(a(`rel.related.none`,{name:f(p)}),a(`rel.related.noneHint`));let oe=Math.ceil(ae.y()-28+32);x.height=oe;let se=[{id:`__related__`,type:`lineLayer`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:x}],ce={};for(let e of s)ce[e.kind]=(ce[e.kind]??0)+1;return{errors:n,hints:r,nodes:se,edges:[],connections:[],centre:p,defaultCentre:Li(e),related:m.length,none:h.length,rest:g.length,size:{width:b,height:oe},stats:{entities:o.length,relations:s.length,groups:e.groups?.length??0,kinds:ce}}}var za=3,dne=5e3,fne=760,pne=150,Ba=140,mne=14,Va=108;function hne(e){let t=new Map,n=new Map;if(!e.length)return{pos:t,row:n};e[0].nodes.forEach((e,r)=>{t.set(e,2*r),n.set(e,0)});let r=(e,r)=>[...t].some(([t,i])=>n.get(t)===e&&i===r),i=1;for(let a=1;a<e.length;a+=1){let o=e[a].nodes,s=!1,c=0;for(;c<o.length;){if(t.has(o[c])){c+=1;continue}let e=c;for(;e<o.length&&!t.has(o[e]);)e+=1;let a=o.slice(c,e),l=a.length,u=o[c-1],d=o[e],f=t.get(u),p=t.get(d);if(p>f&&p-f<2*l){let e=2*l-(p-f);for(let[n,r]of t)r>=p&&t.set(n,r+e);p+=e}let m=p<=f?a.map((e,t)=>f+1+2*t):l===1?[f+Math.round((p-f)/2)]:a.map((e,t)=>f+1+Math.round(t*(p-f-2)/(l-1))),h=[u,d].map(e=>n.get(e)).filter(e=>e!==0),g;if(h.length){let e=h.reduce((e,t)=>Math.abs(t)>Math.abs(e)?t:e);g=e+Math.sign(e)}else g=i,s=!0;let _=e=>{let i=Math.sign(e);for(let t of m)for(let n=-1;n<=1;n+=1)if(r(e,t+n))return!1;if(l>1&&[...t].some(([t,r])=>n.get(t)===e&&r>m[0]&&r<m[l-1]))return!1;for(let a of[u,d])if(!(Math.abs(n.get(a))>=Math.abs(e))){for(let o=n.get(a)+i;o!==e;o+=i)if(r(o,t.get(a)))return!1}return!0},v=g;for(let e=0;e<8&&!_(v);e+=1)v+=Math.sign(g);a.forEach((e,r)=>{t.set(e,m[r]),n.set(e,v)}),c=e}s&&(i=-i)}return{pos:t,row:n}}function Ha(e,t){let n=new Map(e.entities.map(e=>[e.id,[]]));for(let t of e.relations)n.get(t.from).push(t.to),n.get(t.to).push(t.from);let r=new Map([[t,0]]),i=[t];for(let e=0;e<i.length;e++)for(let t of n.get(i[e]))r.has(t)||(r.set(t,r.get(i[e])+1),i.push(t));return r}function Ua(e){let t=null;for(let n of e.entities){let r=Ha(e,n.id);for(let i of e.entities)i.id!==n.id&&r.has(i.id)&&(t===null||r.get(i.id)>t.d)&&(t={from:n.id,to:i.id,d:r.get(i.id)})}return t?{from:t.from,to:t.to}:{from:e.entities[0].id,to:e.entities[Math.min(1,e.entities.length-1)].id}}function gne(e,t={}){let n=t=>e.entities.some(e=>e.id===t);return n(t.from)&&n(t.to)&&t.from!==t.to?{from:t.from,to:t.to}:Ua(e)}function Wa(e,t,n){let r=Ha(e,n);if(!r.has(t))return{chains:[],total:0,truncated:!1,shortest:0};let i=r.get(t),a=new Map(e.entities.map(e=>[e.id,[]]));e.relations.forEach((e,t)=>{a.get(e.from).push({r:e,i:t,other:e.to}),a.get(e.to).push({r:e,i:t,other:e.from})});let o=[],s=!1,c=(e,t,l,u)=>{if(o.length>=dne)s=!0;else if(e===n)o.push({nodes:[...t],rels:[...l]});else for(let{r:n,other:o}of a.get(e))u.has(o)||l.length+1+(r.get(o)??1/0)>i+za||(u.add(o),t.push(o),l.push(n),c(o,t,l,u),l.pop(),t.pop(),u.delete(o))};c(t,[t],[],new Set([t]));let l=new Map(e.relations.map((e,t)=>[e.id,t]));o.sort((e,t)=>e.rels.length-t.rels.length||e.rels.map(e=>l.get(e.id)).join(`,`).localeCompare(t.rels.map(e=>l.get(e.id)).join(`,`),void 0,{numeric:!0}));let u=new Set,d=o.filter(e=>{let t=e.rels.map(e=>e.id).sort().join(`\0`);return!u.has(t)&&(u.add(t),!0)});return{chains:d.slice(0,3),total:d.length,truncated:s,shortest:i}}function _ne(e,t={}){let n=ci(e),r=li(e),i={errors:n,hints:r,nodes:[],edges:[],connections:[],size:{width:0,height:0},stats:{entities:0,relations:0,groups:0,kinds:{}}};if(n.length)return i;let a=typeof t?.t==`function`?t.t:Pe,o=e.entities,s=e.relations;o.length>25&&r.push(Pe(`rhint.tooLarge`,{n:o.length,limit:25}));let c=new Map(o.map(e=>[e.id,e])),l=_i(e,a),u=new Map(s.map((e,t)=>[e.id,t])),d=e=>l.labelTexts[u.get(e.id)],f=e=>c.get(e).label,p=gne(e,t),m=Wa(e,p.from,p.to),h=m.chains,g=h[0]?.rels.length??0,{pos:_,row:v}=hne(h),y=[..._.keys()],b=Math.max(pne,...y.map(e=>l.sizes.get(e).w)),x=y.length?Math.max(...y.map(e=>l.sizes.get(e).h)):0,S=Math.min(0,...v.values()),C=Math.max(0,...v.values()),ee=y.length?Math.max(..._.values())+1:0,w=x+88,te=e=>32+Va+(e-S)*w,ne=e=>Math.min(b/2-16,50+14*(e-1)),re=Math.max(6,Math.min(14,(x-16)/3)),ie=[],ae=new Map;h.forEach(e=>e.rels.forEach((t,n)=>{let r=e.rels.length===g;if(ae.has(t.id)){r&&(ae.get(t.id).heavy=!0);return}let i={r:t,a:e.nodes[n],b:e.nodes[n+1],heavy:r,pw:va(d(t))};ae.set(t.id,i),ie.push(i)}));for(let e of ie){let[t,n,r,i]=[_.get(e.a),_.get(e.b),v.get(e.a),v.get(e.b)];if(r===i)e.type=`row`,[e.s,e.e]=t<=n?[e.a,e.b]:[e.b,e.a];else if(t===n)e.type=`col`,[e.s,e.e]=r<i?[e.a,e.b]:[e.b,e.a];else{e.type=`bend`;let a=Math.abs(r)<Math.abs(i)||Math.abs(r)===Math.abs(i)&&t<n;[e.s,e.e]=a?[e.a,e.b]:[e.b,e.a],e.dir=Math.sign(v.get(e.e)-v.get(e.s)),e.toRight=_.get(e.e)>_.get(e.s)}}let oe=new Map;for(let e of ie.filter(e=>e.type===`row`)){let t=[e.s,e.e].join(`\0`);oe.has(t)||oe.set(t,[]),oe.get(t).push(e)}for(let e of oe.values()){if(e.length>=3||e.length===2&&e.some(e=>ya(d(e.r))>22)){let t=[...e].sort((e,t)=>e.pw-t.pw);t.slice(1).forEach((e,t)=>{e.type=`round`,e.side=t%2==0?-1:1,e.level=Math.floor(t/2)+1,e.ph=ya(d(e.r))});for(let e of[-1,1]){let n=0,r=0;for(let i of t.filter(t=>t.type===`round`&&t.side===e).sort((e,t)=>e.level-t.level))n=r?n+Math.max(32,(r+i.ph)/2+8):Math.max(26,i.ph/2+8),i.off=n,r=i.ph}e.splice(0,e.length,t[0])}e.forEach((t,n)=>{t.y=te(v.get(t.s))+x/2+(n-(e.length-1)/2)*re,t.slotOf=e})}let se=new Map;for(let e of ie.filter(e=>e.type===`bend`)){let t=`${e.e}\u0000${e.toRight?`l`:`r`}`;se.has(t)||se.set(t,[]),se.get(t).push(e)}let ce=new Map;for(let e of oe.values())ce.set(`${e[0].s}\u0000r`,(ce.get(`${e[0].s}\u0000r`)??0)+e.length),ce.set(`${e[0].e}\u0000l`,(ce.get(`${e[0].e}\u0000l`)??0)+e.length);for(let[e,t]of se){let n=e=>Math.abs(_.get(e.s)-_.get(e.e));t.sort((e,t)=>e.dir>0?n(e)-n(t):n(t)-n(e));let r=ce.get(e)??0;t.forEach((e,n)=>{let i=te(v.get(e.e))+x/2;e.y=r?e.dir>0?i-((r-1)/2+t.length-n)*re:i+((r-1)/2+1+n)*re:i+(n-(t.length-1)/2)*re})}let le=new Map;for(let e of ie.filter(e=>e.type===`bend`)){let t=`${e.s}\u0000${e.dir}\u0000${e.toRight?`r`:`l`}`;le.has(t)||le.set(t,[]),le.get(t).push(e)}for(let e of le.values()){e.sort((e,t)=>Math.abs(t.y-te(v.get(t.s)))-Math.abs(e.y-te(v.get(e.s))));let t=b/2-14;e.forEach((n,r)=>{let i=e.length===1?14:14+r*(t-14)/(e.length-1);n.exitAt=(n.toRight?1:-1)*Math.min(i,t),n.exitRank=r})}let ue=Array.from({length:Math.max(0,ee-1)},()=>(b+Ba)/2),de=[];for(let e=S;e<=C;e+=1){let t=y.filter(t=>v.get(t)===e).sort((e,t)=>_.get(e)-_.get(t));for(let e=1;e<t.length;e+=1){let n=ie.filter(n=>n.type===`row`&&n.s===t[e-1]&&n.e===t[e]),r=[...new Set(n.map(e=>e.slotOf))].reduce((e,t)=>e+t.reduce((e,t)=>e+t.pw+28,0),0);de.push({a:_.get(t[e-1]),b:_.get(t[e]),w:b+Math.max(Ba,r)})}}for(let e of ie.filter(e=>e.type===`round`))de.push({a:_.get(e.s),b:_.get(e.e),w:b+e.pw-2*ne(e.level)+28});for(let e of ie.filter(e=>e.type===`bend`)){let[t,n]=[_.get(e.s),_.get(e.e)];de.push({a:Math.min(t,n),b:Math.max(t,n),w:b/2+56+Math.abs(e.exitAt)})}for(let e=0;e<40;e+=1){let e=!1;for(let t of de){let n=0;for(let e=t.a;e<t.b;e+=1)n+=ue[e];if(n<t.w-.01){for(let e=t.a;e<t.b;e+=1)ue[e]+=(t.w-n)/(t.b-t.a);e=!0}}if(!e)break}let fe=e=>32+b/2+ue.slice(0,e).reduce((e,t)=>e+t,0),pe=ee?fe(ee-1)+b/2:32,me=Math.max(pe-32,fne-64),he=[],ge={width:me+64,height:0,links:[],pills:[],empties:[],frames:[],texts:[]},_e=new Set,ve=new Set,ye=h[0],be=e=>e===ye?.nodes[0]||e===ye?.nodes[ye.nodes.length-1];for(let e of y)_e.add(e),he.push({id:e,type:`rnode`,position:{x:fe(_.get(e))-b/2,y:te(v.get(e))},data:{...l.dataOf(c.get(e),{layer:0,hintKey:`rel.previewHint`,vertical:!1,end:be(e)}),w:b,h:x,textW:b-28}});let xe=Math.max(0,...ie.filter(e=>e.type===`round`&&e.side>0).map(e=>e.off+e.ph/2)),Se=h.length?te(C)+x+xe:32+Va,Ce=[];for(let e of ie){ve.add(e.r.id);let t=si(e.r)?e.r.from===e.s?`end`:`start`:`none`,n={kind:e.r.kind,ink:!0,back:!1,via:[],arrow:t,width:e.heavy?2.6:1.4},r={text:d(e.r),kind:e.r.kind,ink:!0,back:!1,relId:e.r.id};if(e.type===`row`){let t=fe(_.get(e.s))+b/2,i=fe(_.get(e.e))-b/2,a=e.slotOf.reduce((e,t)=>e+t.pw+28,0),o=e.slotOf.slice(0,e.slotOf.indexOf(e)).reduce((e,t)=>e+t.pw+28,0);n.d=`M ${t} ${e.y} L ${i} ${e.y}`,ge.links.push(n);let s=e.slotOf.indexOf(e),c=ya(d(e.r))>22,l=ya(d(e.r))/2-3,u=e.slotOf.length<2||!c?0:s===0?-l:s===e.slotOf.length-1?l:0;ge.pills.push({...r,x:t+(i-t-a)/2+o+mne+e.pw/2,y:e.y+u})}else if(e.type===`round`){let t=v.get(e.s),i=e.side<0?te(t):te(t)+x,a=i+e.side*e.off,o=fe(_.get(e.s))+b/2-ne(e.level),s=fe(_.get(e.e))-b/2+ne(e.level);n.d=`M ${o} ${i} L ${o} ${a} L ${s} ${a} L ${s} ${i}`,ge.links.push(n),ge.pills.push({...r,x:(o+s)/2,y:a})}else if(e.type===`col`){let t=fe(_.get(e.s)),i=te(v.get(e.s))+x,a=te(v.get(e.e));n.d=`M ${t} ${i} L ${t} ${a}`,ge.links.push(n),ge.pills.push({...r,x:t,y:(i+a)/2})}else{let t=fe(_.get(e.s))+e.exitAt,i=te(v.get(e.s))+(e.dir>0?x:0),a=fe(_.get(e.e))+(e.toRight?-b/2:b/2);n.d=`M ${t} ${i} L ${t} ${e.y} L ${a} ${e.y}`,ge.links.push(n);let o={...r,x:t,y:i+e.dir*30};ge.pills.push(o),Ce.push({pill:o,link:ge.links.length-1,h:e,px:t,y0:i,xe:a})}}let we=e=>{let t=[...e.matchAll(/[ML] ([\d.-]+) ([\d.-]+)/g)].map(e=>[+e[1],+e[2]]);return t.slice(1).map((e,n)=>[t[n],e])},Te=(e,[t,n])=>Math.max(t[0],n[0])>e.x&&Math.min(t[0],n[0])<e.x+e.w&&Math.max(t[1],n[1])>e.y&&Math.min(t[1],n[1])<e.y+e.h,Ee=(e,t)=>({x:e.x-t/2,y:e.y-ya(e.text)/2,w:t,h:ya(e.text)}),De=ge.links.map(e=>we(e.d)),Oe=ge.pills.filter(e=>!Ce.some(t=>t.pill===e)).map(e=>Ee(e,va(e.text))),ke=he.filter(e=>e.type===`rnode`).map(e=>({x:e.position.x,y:e.position.y,w:b,h:x}));for(let e of Ce){let t=va(e.pill.text),{px:n,y0:r,xe:i,h:a}=e,o=[];for(let e of[.5,.25,.75,.38,.62]){let t=r+a.dir*20,i=a.y-a.dir*16;(i-t)*a.dir>=0&&o.push([n,t+(i-t)*e])}let s=t/2-14;for(let e of[.5,.25,.75]){let t=r+a.dir*20,i=a.y-a.dir*16;if((i-t)*a.dir>=0&&s>8)for(let r of[s,-s])o.push([n+r,t+(i-t)*e])}Math.abs(i-n)>=t+12&&o.push([(n+i)/2,a.y]),o.length||o.push([n,r+a.dir*30]);let c=null;for(let[n,r]of o){let i=Ee({x:n,y:r,text:e.pill.text},t),a=Oe.some(e=>i.x<e.x+e.w&&e.x<i.x+i.w&&i.y<e.y+e.h&&e.y<i.y+i.h)||ke.some(e=>i.x<e.x+e.w&&e.x<i.x+i.w&&i.y<e.y+e.h&&e.y<i.y+i.h),o={x:i.x+3,y:i.y+2,w:i.w-6,h:i.h-4},s=De.reduce((t,n,r)=>r===e.link?t:t+n.filter(e=>Te(o,e)).length,0),l=(a?1e3:0)+s;if((!c||l<c.score)&&(c={score:l,x:n,y:r}),l===0)break}e.pill.x=c.x,e.pill.y=c.y,Oe.push(Ee(e.pill,t))}let Ae=h.length?Se+28:32+Va,je=m.total-h.length;h.length&&(je>0||m.truncated)&&(ge.texts.push({x:32,y:Ae-28+14,w:me,main:a(`rel.path.more`,{n:je,atLeast:+!!m.truncated}),tone:`note`}),Ae+=24);let Me=la(ge,me,Ae);h.length||Me.empty(a(`rel.path.noChain`,{a:f(p.from),b:f(p.to)}),a(`rel.path.noChainHint`));let Ne=o.filter(e=>!_e.has(e.id)),Fe=s.filter(e=>!ve.has(e.id)),Ie=Math.ceil(Me.y()-28+32);ge.height=Ie,he.unshift({id:`__path__`,type:`lineLayer`,position:{x:0,y:0},width:1,height:1,draggable:!1,selectable:!1,connectable:!1,focusable:!1,style:{pointerEvents:`none`},data:ge});let Le={};for(let e of s)Le[e.kind]=(Le[e.kind]??0)+1;return{errors:n,hints:r,nodes:he,edges:[],connections:[],from:p.from,to:p.to,defaultEnds:Ua(e),chains:h.length,totalChains:m.total,truncated:m.truncated,shortest:m.shortest,drawnParties:_e.size,off:Ne.length,offRels:Fe.length,size:{width:Math.ceil(ge.width),height:Ie},stats:{entities:o.length,relations:s.length,groups:e.groups?.length??0,kinds:Le}}}var Ga={envelope:[{name:`type`,req:`yes`,ty:`string`,note:`always "relationship"`},Oe(1),{name:`title`,req:`yes`,ty:`string`,note:`diagram title, shown at the top left`},{name:`asOf`,req:`no`,ty:`ISO date`,note:`the date these relations hold; the diagram is a cross-section at one point in time`}],groups:[{name:`id`,req:`yes`,ty:`string`,note:`entities reference it via groupId`},{name:`label`,req:`yes`,ty:`string`,note:`the camp or cluster boxed together, e.g. "creditor side"`},{name:``,req:``,ty:``,note:`an entity is in at most one group; groups do not nest; omit groups and no boxes are drawn`}],entities:[{name:`id`,req:`yes`,ty:`string`,note:`unique among entities; relations reference it via from/to`},{name:`kind`,req:`yes`,ty:`string`,note:`${Qr.join(` / `)}; fixes the shape and colour only`},{name:`label`,req:`yes`,ty:`string`,note:`the name shown on the box`},{name:`role`,req:`no`,ty:`string`,note:`the role in this case, one short line under the name, e.g. "guarantor"`},{name:`detail`,req:`no`,ty:`string`,note:`registered capital, ID number and the like; the full text in the popover`},{name:`groupId`,req:`no`,ty:`string`,note:`references groups`},{name:`sourceIds`,req:`no`,ty:`string[]`,note:`which materials it rests on`}],relations:[{name:`id`,req:`yes`,ty:`string`,note:`unique among relations (a guarantee's secures refers to it)`},{name:`from`,req:`yes`,ty:`string`,note:`entity id; the direction of the relation runs from here`},{name:`to`,req:`yes`,ty:`string`,note:`entity id`},{name:`kind`,req:`yes`,ty:`string`,note:`${$r.join(` / `)}. equity: holder -> held. debt: creditor -> debtor. guarantee: guarantor -> creditor. control/employment/agency: the controlling / employing / authorising side first. A tie that stands, never an act (a blow, an insult): acts go in a fact diagram`},{name:`label`,req:`no`,ty:`string`,note:`a short phrase on the line; omit it and the engine writes one from the kind ("Holds 60%")`},{name:`detail`,req:`no`,ty:`string`,note:`terms, dates; the full text in the popover`},{name:`directed`,req:`no`,ty:`boolean`,note:`override of the kind's default: contract and kinship have no arrowhead, the rest do`},{name:`share`,req:`no`,ty:`number`,note:`equity only: the percentage held, 0 to 100`},{name:`amount`,req:`no`,ty:`string`,note:`debt and contract only: the sum as it should be read, e.g. "CNY 500,000"`},{name:`secures`,req:`no`,ty:`string`,note:`guarantee only: the id of the debt or contract relation it secures`},{name:`sourceIds`,req:`no`,ty:`string[]`,note:`which materials it rests on`}],sources:[{name:`id`,req:`yes`,ty:`string`,note:`entities and relations reference it via sourceIds`},{name:`type`,req:`yes`,ty:`string`,note:`contract / evidence / statute and four more, the same seven as fact`},{name:`name`,req:`yes`,ty:`string`,note:`material name, e.g. "loan contract"`},{name:`loc`,req:`no`,ty:`object`,note:`location, e.g. { file, page }`}]};function vne(){let e=[`Fields of a relationship spec. "yes" means required.`,``];for(let[t,n]of Object.entries(Ga)){e.push(`[${t}]`);for(let t of n)t.name?e.push(` ${t.name.padEnd(10)} ${t.req.padEnd(2)} ${t.ty.padEnd(10)} ${t.note}`):e.push(` · ${t.note}`);e.push(``)}return e.push(`Cross-field rules (dangling references, a relation from an entity to itself, share and amount on the`),e.push(`wrong kind, a guarantee that secures something that is not a claim) are not listed above: call`),e.push(`antu_validate after writing. It reports each problem.`),e.join(`
1458
1458
  `)}function yne(e,t,{canvas:n}){let r=t(e,{}),i=Number(Yt(r.size,n).toFixed(3)),a=(e.entities??[]).find(e=>e.id===r.centre)?.label??r.centre;return{text:{font:14,canvas:n,open:{name:`fitted whole`,fit:i},other:{name:`fitted whole`,fit:i}},counts:{entities:r.stats.entities,relations:r.stats.relations,groups:r.stats.groups,kinds:r.stats.kinds,sources:e.sources?.length??0},size:r.size,centre:{id:r.centre,label:a},rings:r.rings,islands:r.islands.length-1,apart:r.islands.slice(1).reduce((e,t)=>e+t.ids.length,0),hints:r.hints}}function bne(e){let t=e.counts,n=[`Kind: focus (one party in the middle; orientation does not apply)`,`Data: ${t.entities} entities / ${t.relations} relations / ${t.groups} groups / ${t.sources} sources`,`Opens centred on "${e.centre.label}" (the party with most relations; the reader can pick another)`,`Rings around it: ${e.rings.slice(1).map((e,t)=>`${e} at ${t+1} step${t?`s`:``}`).join(`, `)||`none (it has no relations)`}`,`Content ${e.size.width}×${e.size.height}`];return e.apart&&n.push(`${e.apart} part${e.apart===1?`y is`:`ies are`} not reached from the centre, laid out apart under the picture (${e.islands} separate group${e.islands===1?``:`s`})`),n.push(...Qt(e.text,`splitting the diagram by group`)),e.hints.length&&n.push(``,`${e.hints.length} hint(s):`,...e.hints.map(e=>` - ${e}`)),n.join(`
1459
1459
  `)}function xne(e,t,{canvas:n}){let r=t(e,{}),i=Number(Yt({width:r.size.width,height:1},{width:n.width,height:n.height*1e6}).toFixed(3));return{text:{font:14,canvas:n,open:{name:`fitted to width`,fit:i},other:{name:`fitted to width`,fit:i}},counts:{entities:r.stats.entities,relations:r.stats.relations,groups:r.stats.groups,kinds:r.stats.kinds,sources:e.sources?.length??0},size:r.size,filled:r.filled,stacked:r.stacked,possible:r.possible,fit:i,hints:r.hints}}function Sne(e){let t=e.counts,n=[`Kind: matrix (parties x parties, row to column; orientation does not apply)`,`Data: ${t.entities} entities / ${t.relations} relations / ${t.groups} groups / ${t.sources} sources`,`Content ${e.size.width}×${e.size.height}; it opens fitted to its width (zoom ${e.fit})`,`${e.filled} of ${e.possible} possible pairs have a relation; ${e.stacked} cell(s) hold more than one`];return e.fit<.6&&n.push(`The table is wide for one screen: the reader will zoom in. Splitting the diagram by group keeps each table smaller.`),n.push(...Qt(e.text,`splitting the diagram by group`)),e.hints.length&&n.push(``,`${e.hints.length} hint(s):`,...e.hints.map(e=>` - ${e}`)),n.join(`
@@ -1480,7 +1480,7 @@ import{execFileSync as e,spawn as t,spawnSync as n}from"node:child_process";impo
1480
1480
  })()`);if(!r)throw Error(`Cannot hover element: ${e}`);let{x:i,y:a}=JSON.parse(r);await _.send(`Input.dispatchMouseEvent`,{type:`mouseMoved`,x:i+t,y:a+n})},get requests(){return v.slice()},get errors(){return y.slice()},async close(){_.close(),await No(p),await Fo(h)}};return b}async function nre(e,{width:t=1600,height:n=900,settleMs:r=800}={}){let i=Date.now(),a=await tre({width:t,height:n});try{await a.open(h(e).href,{settleMs:r});let o=await a.eval(`document.querySelectorAll(${JSON.stringify(Eo)}).length`);return{data:await a.screenshotData(),mimeType:`image/png`,width:t,height:n,cards:o,ms:Date.now()-i}}finally{await a.close()}}var Io=`@zh-xx/antu`,rre=`https://registry.npmjs.org/${Io.replace(/\//g,`%2f`)}/latest`,ire=1500;function Lo(e,t){let n=e=>/^(\d+)\.(\d+)\.(\d+)$/.exec(String(e))?.slice(1).map(Number),r=n(e),i=n(t);if(!r||!i)return null;for(let e=0;e<3;e+=1)if(r[e]!==i[e])return r[e]<i[e]?-1:1;return 0}function are(e=m(import.meta.url)){let t=d(e);return u(t)===`scripts`&&r(f(t,`..`,`SKILL.md`))?`skill`:e.split(/[\\/]/).includes(`node_modules`)?`npm`:`source`}function ore({current:e,latest:t,where:n}){return Lo(e,t)===-1?n===`skill`?[`Notice: Antu ${t} is out; this skill is ${e}.`,`When the request is done, tell the user in a sentence or two that the skill can be updated with:`,` npx skills update antu -g`,`Do not run it unless the user agrees.`].join(`
1481
1481
  `):n===`npm`?[`Notice: Antu ${t} is out; this is ${e}.`,`When the request is done, tell the user in a sentence or two that it can be updated with:`,` npm update -g ${Io} (or run it with: npx -y ${Io}@latest)`,`Do not run it unless the user agrees.`].join(`
1482
1482
  `):``:``}async function Ro({url:e,cacheFile:t,now:n}){try{let e=JSON.parse(a(t,`utf8`));if(typeof e.latest==`string`&&n-e.checkedAt<864e5)return e.latest}catch{}let r=new AbortController,i=setTimeout(()=>r.abort(),ire);try{let i=await fetch(e,{signal:r.signal,headers:{accept:`application/json`}});if(!i.ok)return null;let a=(await i.json())?.version;if(typeof a!=`string`)return null;try{c(t,JSON.stringify({checkedAt:n,latest:a}))}catch{}return a}catch{return null}finally{clearTimeout(i)}}async function zo({current:e,where:t=are(),env:n=process.env,now:r=Date.now()}={}){try{if(n.ANTU_NO_UPDATE_NOTIFIER||t===`source`||Lo(e,e)===null)return``;let i=n.ANTU_REGISTRY_URL||rre,a=await Ro({url:i,cacheFile:f(l(),`antu-update-check-${g(`sha1`).update(i).digest(`hex`).slice(0,16)}.json`),now:r});return a?ore({current:e,latest:a,where:t}):``}catch{return``}}function sre(e,t){return{release:e,types:we().map(e=>e.type).filter(e=>!t||e===t).map(e=>({type:e,specVersion:Ce(e).specVersion,diagrams:Se(e).map(({kind:e,version:t,status:n,since:r})=>({kind:e,version:t,status:n,since:r}))}))}}function cre(e){let t=[`Antu ${e.release}`,``];for(let n of e.types){t.push(`${n.type}: format generation ${n.specVersion}`);let e=Math.max(...n.diagrams.map(e=>e.kind.length));n.diagrams.forEach((n,r)=>t.push(` ${n.kind.padEnd(e)} v${n.version} ${n.status} since ${n.since}${r===0?` (default)`:``}`))}return t.join(`
1483
- `)}var Bo=`0.16.2`,Vo=`Antu ${Bo}: check and draw an Antu diagram (JSON)
1483
+ `)}var Bo=`0.16.4`,Vo=`Antu ${Bo}: check and draw an Antu diagram (JSON)
1484
1484
 
1485
1485
  node antu.mjs validate <spec.json> is the JSON valid? (each problem, with its field path)
1486
1486
  node antu.mjs layout <spec.json> [--orientation vertical|horizontal] [--kind K]